Commit c9662f95 authored by 黄奎's avatar 黄奎

代码优化

parent f4e88060
...@@ -33,7 +33,7 @@ namespace Mall.WebApi.Controllers.AppletWeChat ...@@ -33,7 +33,7 @@ namespace Mall.WebApi.Controllers.AppletWeChat
[EnableCors("AllowCors")] [EnableCors("AllowCors")]
public class WeChatPayController : BaseController public class WeChatPayController : BaseController
{ {
private IHttpContextAccessor _accessor; private readonly IHttpContextAccessor _accessor;
/// <summary> /// <summary>
/// 构造函数 /// 构造函数
...@@ -47,7 +47,7 @@ namespace Mall.WebApi.Controllers.AppletWeChat ...@@ -47,7 +47,7 @@ namespace Mall.WebApi.Controllers.AppletWeChat
/// <summary> /// <summary>
/// 商户小程序处理类 /// 商户小程序处理类
/// </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 UserModule userModule = new UserModule();
private readonly RechargeModule rechargeModule = new RechargeModule(); private readonly RechargeModule rechargeModule = new RechargeModule();
private readonly UserVipModule userVipModule = new UserVipModule(); private readonly UserVipModule userVipModule = new UserVipModule();
...@@ -576,7 +576,7 @@ namespace Mall.WebApi.Controllers.AppletWeChat ...@@ -576,7 +576,7 @@ namespace Mall.WebApi.Controllers.AppletWeChat
string orderNo = parms.GetStringValue("orderNo"); string orderNo = parms.GetStringValue("orderNo");
int orderId = parms.GetInt("orderId"); int orderId = parms.GetInt("orderId");
int userId = parms.GetInt("userId"); 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); return ApiResult.Success("", Robj);
} }
......
...@@ -842,7 +842,6 @@ namespace Mall.WebApi.Controllers.MallBase ...@@ -842,7 +842,6 @@ namespace Mall.WebApi.Controllers.MallBase
int Type = parms.GetInt("Type", 0);//类型 1修改备注 2修改金额 3强制取消 4放入回收站 5确认收货 6确认完成 7回收恢复 8回收删除 int Type = parms.GetInt("Type", 0);//类型 1修改备注 2修改金额 3强制取消 4放入回收站 5确认收货 6确认完成 7回收恢复 8回收删除
string Remark = parms.GetStringValue("Remark"); string Remark = parms.GetStringValue("Remark");
decimal Income = parms.GetDecimal("Income"); decimal Income = parms.GetDecimal("Income");
string Address = parms.GetStringValue("Address");
if (OrderId <= 0) if (OrderId <= 0)
{ {
return ApiResult.ParamIsNull("请传递id"); return ApiResult.ParamIsNull("请传递id");
...@@ -937,7 +936,7 @@ namespace Mall.WebApi.Controllers.MallBase ...@@ -937,7 +936,7 @@ namespace Mall.WebApi.Controllers.MallBase
return ApiResult.ParamIsNull("参数有误"); 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) if (flag)
{ {
return ApiResult.Success(); 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