Commit c9662f95 authored by 黄奎's avatar 黄奎

代码优化

parent f4e88060
......@@ -33,7 +33,7 @@ namespace Mall.WebApi.Controllers.AppletWeChat
[EnableCors("AllowCors")]
public class WeChatPayController : BaseController
{
private IHttpContextAccessor _accessor;
private readonly IHttpContextAccessor _accessor;
/// <summary>
/// 构造函数
......@@ -47,7 +47,7 @@ namespace Mall.WebApi.Controllers.AppletWeChat
/// <summary>
/// 商户小程序处理类
/// </summary>
private Module.User.MiniProgramModule programModule = new Module.User.MiniProgramModule();
private readonly MiniProgramModule programModule = new MiniProgramModule();
private readonly UserModule userModule = new UserModule();
private readonly RechargeModule rechargeModule = new RechargeModule();
private readonly UserVipModule userVipModule = new UserVipModule();
......@@ -576,7 +576,7 @@ namespace Mall.WebApi.Controllers.AppletWeChat
string orderNo = parms.GetStringValue("orderNo");
int orderId = parms.GetInt("orderId");
int userId = parms.GetInt("userId");
var Robj = userCommonModule.InsertVipBuyCommission(userId, orderId, orderNo, orderNo + "1111", Common.Enum.Goods.OrderPayTypeEnum.WeChatPay, Convert.ToDecimal(365.00), System.DateTime.Now);
var Robj = userCommonModule.InsertVipBuyCommission(userId, orderId, orderNo,Convert.ToDecimal(365.00), System.DateTime.Now);
return ApiResult.Success("", Robj);
}
......
......@@ -842,7 +842,6 @@ namespace Mall.WebApi.Controllers.MallBase
int Type = parms.GetInt("Type", 0);//类型 1修改备注 2修改金额 3强制取消 4放入回收站 5确认收货 6确认完成 7回收恢复 8回收删除
string Remark = parms.GetStringValue("Remark");
decimal Income = parms.GetDecimal("Income");
string Address = parms.GetStringValue("Address");
if (OrderId <= 0)
{
return ApiResult.ParamIsNull("请传递id");
......@@ -937,7 +936,7 @@ namespace Mall.WebApi.Controllers.MallBase
return ApiResult.ParamIsNull("参数有误");
}
bool flag = orderModule.SetOrderOperation(omodel, Type, Remark, Income, Address, req.TenantId, req.MallBaseId, _accessor);
bool flag = orderModule.SetOrderOperation(omodel, Type, Remark, Income, req.TenantId, req.MallBaseId, _accessor);
if (flag)
{
return ApiResult.Success();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment