Commit c5433921 authored by 黄奎's avatar 黄奎

页面修改

parent 7799bbca
...@@ -3728,6 +3728,29 @@ namespace Mall.Module.Product ...@@ -3728,6 +3728,29 @@ namespace Mall.Module.Product
} }
} }
/// <summary>
/// ERP修改商品订单状态
/// </summary>
/// <param name="extModel"></param>
/// <param name="tradeModel"></param>
/// <returns></returns>
public bool UpdateERPGoodsOrderInfoModule(RB_Goods_Order_Extend extModel, RB_Goods_Online_Trade_Extend tradeModel)
{
bool flag = false;
Dictionary<string, object> fileds = new Dictionary<string, object>()
{
{nameof(RB_Goods_Order_Extend.MerchantsNo),extModel.MerchantsNo },
{nameof(RB_Goods_Order_Extend.OrderStatus),extModel.OrderStatus },
{nameof(RB_Goods_Order_Extend.PaymentTime),extModel.PaymentTime },
};
flag = goods_OrderRepository.Update(fileds, new WhereHelper(nameof(RB_Goods_Order_Extend.OrderId), extModel.OrderId));
if (flag)
{
flag = goods_Online_TradeRepository.Insert(tradeModel) > 0;
}
return flag;
}
/// <summary> /// <summary>
/// 赠送粉象等级 /// 赠送粉象等级
/// </summary> /// </summary>
......
...@@ -19,6 +19,7 @@ using Mall.Model.Extend.User; ...@@ -19,6 +19,7 @@ using Mall.Model.Extend.User;
using Mall.Model.Entity.BaseSetUp; using Mall.Model.Entity.BaseSetUp;
using Microsoft.AspNetCore.Http; using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Authorization; using Microsoft.AspNetCore.Authorization;
using Mall.Common.Enum.Goods;
namespace Mall.WebApi.Controllers.MallBase namespace Mall.WebApi.Controllers.MallBase
{ {
...@@ -600,6 +601,52 @@ namespace Mall.WebApi.Controllers.MallBase ...@@ -600,6 +601,52 @@ namespace Mall.WebApi.Controllers.MallBase
return orderModule.SetAppletGoodsOrderInfo(demodel); return orderModule.SetAppletGoodsOrderInfo(demodel);
} }
/// <summary>
/// ERP修改订单状态
/// </summary>
/// <returns></returns>
[HttpPost]
[AllowAnonymous]
public ApiResult UpdateERPGoodsOrderInfo()
{
var req = RequestParm;
JObject parms = JObject.Parse(req.msg.ToString());
RB_Goods_Order_Extend extModel = new RB_Goods_Order_Extend()
{
OrderId=parms.GetInt("OrderId"),
MerchantsNo=parms.GetStringValue("MerchantsNo"),
OrderStatus= OrderStatusEnum.WaitSendGoods,
PaymentTime=DateTime.Now,
};
RB_Goods_Online_Trade_Extend tradeModel = new RB_Goods_Online_Trade_Extend()
{
User_Id = parms.GetInt("User_Id"),
Type = 1,
OrderId = parms.GetInt("OrderId"),
Out_Trade_No = parms.GetStringValue("Out_Trade_No"),
Transaction_Id = parms.GetStringValue("Transaction_Id"),
PayWay = (OrderPayTypeEnum)parms.GetInt("PayWay"),
PayType = "JSAPI",
Money = parms.GetDecimal("Money"),
Remarks = parms.GetStringValue("Remarks"),
Pay_Result = 0,
Pay_Date = DateTime.Now,
IsRefund = 2,
RefundMoney = 0,
RefundStatus = 0,
RefundTrade_Order = "",
Refund_Id = "",
Refund_Date = null,
FinanceId = 0,
MallBaseId = 1,
TenantId = 1,
CreateDate = DateTime.Now,
};
bool flag = orderModule.UpdateERPGoodsOrderInfoModule(extModel, tradeModel);
return flag ? ApiResult.Success() : ApiResult.Failed();
}
/// <summary> /// <summary>
/// 返佣初始化 /// 返佣初始化
/// </summary> /// </summary>
......
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