fixed 修改订单列表的按钮展示
This commit is contained in:
parent
a2c521bb60
commit
77c7099baa
@ -107,7 +107,7 @@ namespace ARW.Model.Dto.Business.Custom.Customers
|
||||
/// <summary>
|
||||
/// OpenId
|
||||
/// </summary>
|
||||
public string CustomerXcxOpenidCode { get; set; }
|
||||
public string CustomerXcxOpenid { get; set; }
|
||||
|
||||
}
|
||||
|
||||
|
@ -105,6 +105,12 @@ namespace ARW.Model.Vo.Api.OrderManage.Orders
|
||||
/// 订单状态名称 (1待付款 2待发货 3待收货 4已完成)
|
||||
/// </summary>
|
||||
public string StatusName { get; set; }
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 按钮
|
||||
/// </summary>
|
||||
public List<ButtonVO> ButtonVOs { get; set; }
|
||||
}
|
||||
|
||||
|
||||
|
@ -29,6 +29,7 @@ using ARW.Service.Business.IBusinessService.Custom.Regions;
|
||||
using Infrastructure.Kuaidi100;
|
||||
using ARW.Model.Models.Business.LogisticsManage.LogisticsCompanys;
|
||||
using ARW.Repository.Business.LogisticsManage.LogisticsCompanys;
|
||||
using ARW.Repository.Business.OrderManage.OrderRefunds;
|
||||
|
||||
namespace ARW.Service.Api.BusinessService.OrderManage.Orders
|
||||
{
|
||||
@ -51,9 +52,10 @@ namespace ARW.Service.Api.BusinessService.OrderManage.Orders
|
||||
private readonly SpecValueRepository _SpecValueRepository;
|
||||
private readonly ShopRepository _ShopRepository;
|
||||
private readonly LogisticsCompanyRepository _LogisticsCompanyRepository;
|
||||
private readonly OrderRefundRepository _OrderRefundRepository;
|
||||
private readonly IRegionService _RegionService;
|
||||
|
||||
public OrderServiceImplApi(OrderRepository OrderRepository, OrderGoodsRepository orderGoodsRepository, GoodsRepository goodsRepository, GoodsSkuRepository goodsSkuRepository, SpecRepository specRepository, SpecValueRepository specValueRepository, GoodsCommentRepository goodsCommentRepository, ShopRepository shopRepository, OrderCustomerAddressRepository orderCustomerAddressRepository, IRegionService regionService, LogisticsCompanyRepository logisticsCompanyRepository)
|
||||
public OrderServiceImplApi(OrderRepository OrderRepository, OrderGoodsRepository orderGoodsRepository, GoodsRepository goodsRepository, GoodsSkuRepository goodsSkuRepository, SpecRepository specRepository, SpecValueRepository specValueRepository, GoodsCommentRepository goodsCommentRepository, ShopRepository shopRepository, OrderCustomerAddressRepository orderCustomerAddressRepository, IRegionService regionService, LogisticsCompanyRepository logisticsCompanyRepository, OrderRefundRepository orderRefundRepository)
|
||||
{
|
||||
this._OrderRepository = OrderRepository;
|
||||
_OrderGoodsRepository = orderGoodsRepository;
|
||||
@ -66,6 +68,7 @@ namespace ARW.Service.Api.BusinessService.OrderManage.Orders
|
||||
_OrderCustomerAddressRepository = orderCustomerAddressRepository;
|
||||
_RegionService = regionService;
|
||||
_LogisticsCompanyRepository = logisticsCompanyRepository;
|
||||
_OrderRefundRepository = orderRefundRepository;
|
||||
}
|
||||
|
||||
#region Api接口代码
|
||||
@ -139,21 +142,79 @@ namespace ARW.Service.Api.BusinessService.OrderManage.Orders
|
||||
{
|
||||
item.Status = 1;
|
||||
item.StatusName = "待付款";
|
||||
var buttonVoList = new List<ButtonVO>();
|
||||
var buttonVo = new ButtonVO()
|
||||
{
|
||||
Name = "取消订单",
|
||||
Type = 2
|
||||
};
|
||||
var buttonVo1 = new ButtonVO()
|
||||
{
|
||||
Name = "付款",
|
||||
Type = 1
|
||||
};
|
||||
buttonVoList.Add(buttonVo);
|
||||
buttonVoList.Add(buttonVo1);
|
||||
item.ButtonVOs = buttonVoList;
|
||||
}
|
||||
if(item.DeliveryStatus == 1 && item.PayStatus == 2 && item.OrderStatus == 1)
|
||||
{
|
||||
item.Status = 2;
|
||||
item.StatusName = "待发货";
|
||||
var buttonVoList = new List<ButtonVO>();
|
||||
var buttonVo = new ButtonVO()
|
||||
{
|
||||
Name = "取消订单",
|
||||
Type = 2
|
||||
};
|
||||
var buttonVo1 = new ButtonVO()
|
||||
{
|
||||
Name = "再次购买",
|
||||
Type = 9
|
||||
};
|
||||
buttonVoList.Add(buttonVo);
|
||||
buttonVoList.Add(buttonVo1);
|
||||
item.ButtonVOs = buttonVoList;
|
||||
}
|
||||
if (item.DeliveryStatus == 2 && item.ReceiptStatus == 1 && item.PayStatus == 2 && item.OrderStatus == 1)
|
||||
{
|
||||
item.Status = 3;
|
||||
item.StatusName = "待收货";
|
||||
var buttonVoList = new List<ButtonVO>();
|
||||
var buttonVo = new ButtonVO()
|
||||
{
|
||||
Name = "确认收货",
|
||||
Type = 3
|
||||
};
|
||||
buttonVoList.Add(buttonVo);
|
||||
item.ButtonVOs = buttonVoList;
|
||||
}
|
||||
if (item.PayStatus == 2 && item.OrderStatus == 4)
|
||||
{
|
||||
item.Status = 4;
|
||||
item.StatusName = "已完成";
|
||||
|
||||
var buttonVoList = new List<ButtonVO>();
|
||||
var refund = await _OrderRefundRepository.GetFirstAsync(s => s.OrderGuid == item.OrderGuid);
|
||||
if(refund != null)
|
||||
{
|
||||
var buttonVo = new ButtonVO()
|
||||
{
|
||||
Name = "申请售后",
|
||||
Type = 4
|
||||
};
|
||||
buttonVoList.Add(buttonVo);
|
||||
}
|
||||
if (item.IsComment == 2)
|
||||
{
|
||||
var buttonVo1 = new ButtonVO()
|
||||
{
|
||||
Name = "评价",
|
||||
Type = 6
|
||||
};
|
||||
buttonVoList.Add(buttonVo1);
|
||||
}
|
||||
item.ButtonVOs = buttonVoList;
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -70,7 +70,7 @@ namespace ARW.WebApi.Controllers.Api.Wechat
|
||||
addModal.CustomerGender = 1;
|
||||
addModal.CustomerType = 1;
|
||||
addModal.CustomerLastLoginTime = DateTime.Now;
|
||||
addModal.CustomerXcxOpenid = parm.CustomerXcxOpenidCode;
|
||||
addModal.CustomerXcxOpenid = parm.CustomerXcxOpenid;
|
||||
var response = await _customerService.InsertReturnSnowflakeIdAsync(addModal);
|
||||
if (response == 0)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user