修改订单价格
This commit is contained in:
parent
fa81bfd853
commit
9140db4e33
|
|
@ -48,8 +48,14 @@ namespace HuanMeng.MiaoYu.Code.Order
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
var ip = HttpContextAccessor.HttpContext.GetClientIpAddress();
|
var ip = HttpContextAccessor.HttpContext.GetClientIpAddress();
|
||||||
|
var price = product.Price;
|
||||||
var payment = PaymentExtend.GetPayment(paymentMethod);
|
var payment = PaymentExtend.GetPayment(paymentMethod);
|
||||||
(var orderId, var order) = await payment.CreateOrder(product.ProductName, product.Price, product, ip);
|
UserInfoBLL userInfo = new UserInfoBLL(Dao, _UserId);
|
||||||
|
if (userInfo.User.IsTest ?? false)
|
||||||
|
{
|
||||||
|
price = (decimal)0.01;
|
||||||
|
}
|
||||||
|
(var orderId, var order) = await payment.CreateOrder(product.ProductName, price, product, ip);
|
||||||
var t = product.ToIntentOrder(paymentMethod, orderId);
|
var t = product.ToIntentOrder(paymentMethod, orderId);
|
||||||
t.UserId = _UserId;
|
t.UserId = _UserId;
|
||||||
Dao.daoDbMiaoYu.context.Add(t);
|
Dao.daoDbMiaoYu.context.Add(t);
|
||||||
|
|
|
||||||
|
|
@ -942,6 +942,7 @@ public partial class MiaoYuContext : MultiTenantDbContext//DbContext
|
||||||
.HasMaxLength(100)
|
.HasMaxLength(100)
|
||||||
.HasComment("Ip地址");
|
.HasComment("Ip地址");
|
||||||
entity.Property(e => e.IsActive).HasComment("是否活跃");
|
entity.Property(e => e.IsActive).HasComment("是否活跃");
|
||||||
|
entity.Property(e => e.IsTest).HasComment("是否是测试账号");
|
||||||
entity.Property(e => e.LastLoginAt)
|
entity.Property(e => e.LastLoginAt)
|
||||||
.HasComment("最后一次登录时间")
|
.HasComment("最后一次登录时间")
|
||||||
.HasColumnType("datetime");
|
.HasColumnType("datetime");
|
||||||
|
|
|
||||||
|
|
@ -73,4 +73,9 @@ public partial class T_User: MultiTenantEntity
|
||||||
/// 0正常,1注销
|
/// 0正常,1注销
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public virtual int State { get; set; }
|
public virtual int State { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 是否是测试账号
|
||||||
|
/// </summary>
|
||||||
|
public virtual bool? IsTest { get; set; }
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user