Commit 68e95a3b authored by liudong1993's avatar liudong1993

订单取消+微店调整

parent fca629f7
......@@ -6115,15 +6115,25 @@ namespace Mall.Module.Product
}
else if (type == 2)
{
if (omodel.OrderStatus != OrderStatusEnum.WaitSendGoods)
if (omodel.OrderClassify == 1)
{
return false;
if (omodel.OrderStatus != OrderStatusEnum.WaitSendGoods || omodel.OrderStatus != OrderStatusEnum.WaitReceiving)
{
return false;
}
}
//物流
var erlist = goods_ExpressRelevanceRepository.GetList(new RB_Goods_ExpressRelevance_Extend() { TenantId = tenantId, MallBaseId = mallBaseId, OrderId = orderId });
if (erlist.Any())
else
{
return false;//已有商品发货,无法退款
if (omodel.OrderStatus != OrderStatusEnum.WaitSendGoods)
{
return false;
}
//物流
var erlist = goods_ExpressRelevanceRepository.GetList(new RB_Goods_ExpressRelevance_Extend() { TenantId = tenantId, MallBaseId = mallBaseId, OrderId = orderId });
if (erlist.Any())
{
return false;//已有商品发货,无法退款
}
}
}
var trans = goods_OrderRepository.DbTransaction;
......@@ -8601,6 +8611,7 @@ namespace Mall.Module.Product
keyValues.Add(nameof(RB_Goods_Order.CancelTime), DateTime.Now);
keyValues.Add(nameof(RB_Goods_Order.ApplyForCancelStatus), 1);
keyValues.Add(nameof(RB_Goods_Order.RefundOrderNo), RefundOrderNo);
keyValues.Add(nameof(RB_Goods_Order.Refund), omodel.Income);
}
else
{
......@@ -8608,7 +8619,6 @@ namespace Mall.Module.Product
keyValues.Add(nameof(RB_Goods_Order.OrderStatus), omodel.HistoryOrderStatus);
keyValues.Add(nameof(RB_Goods_Order.RejectRemark), remark);
keyValues.Add(nameof(RB_Goods_Order.IsApplyForCancel), 2);
keyValues.Add(nameof(RB_Goods_Order.Refund), omodel.Income);
}
List<WhereHelper> wheres = new List<WhereHelper>() {
......
......@@ -867,7 +867,7 @@ namespace Mall.Module.User
//查询出所有商品id
string goodsIds = string.Join(",", goodsList.Select(x => x.GoodsId ?? 0).Distinct());
var glist = goodsRepository.GetSingleList(new RB_Goods_Extend() { GoodsIds = goodsIds, TenantId = demodel.TenantId, MallBaseId = demodel.MallBaseId });
var glist = goodsRepository.GetSingleList(new RB_Goods_Extend() { GoodsIds = goodsIds, TenantId = demodel.TenantId, MallBaseId = demodel.MallBaseId }, true);
foreach (var item in glist)
{
item.CoverImage = "";
......@@ -1021,7 +1021,7 @@ namespace Mall.Module.User
public object GetSmallShopsChooseGoodsPageList(int pageIndex, int pageSize, out long count, RB_SmallShops_Price_Extend demodel)
{
List<object> RList = new List<object>();
var glist = goodsRepository.GetPageList(pageIndex, pageSize, out count, new RB_Goods_Extend() { Id = demodel.GoodsId ?? 0, Name = demodel.GoodsName, TenantId = demodel.TenantId, MallBaseId = demodel.MallBaseId });
var glist = goodsRepository.GetPageList(pageIndex, pageSize, out count, new RB_Goods_Extend() { Id = demodel.GoodsId ?? 0, Name = demodel.GoodsName, TenantId = demodel.TenantId, MallBaseId = demodel.MallBaseId }, true);
if (glist.Any())
{
//查询出所有商品id
......
......@@ -22,9 +22,12 @@ namespace Mall.Repository.Product
/// <param name="rowCount">总条数</param>
/// <param name="dmodel">查询条件</param>
/// <returns></returns>
public List<RB_Goods_Extend> GetPageList(int pageIndex, int pageSize, out long rowCount, RB_Goods_Extend dmodel)
public List<RB_Goods_Extend> GetPageList(int pageIndex, int pageSize, out long rowCount, RB_Goods_Extend dmodel,bool IsAllClassify = false)
{
string where = $" 1=1 and g.{nameof(RB_Goods_Extend.Status)}=0 and g.GoodsClassify=0";
string where = $" 1=1 and g.{nameof(RB_Goods_Extend.Status)}=0 ";
if (IsAllClassify == false) {
where += $@" and g.GoodsClassify=0";
}
if (dmodel.TenantId > 0)
{
where += $@" and g.{nameof(RB_Goods_Extend.TenantId)}={dmodel.TenantId}";
......@@ -199,9 +202,12 @@ WHERE {where} group by g.Id order by g.CreateDate desc";
/// </summary>
/// <param name="dmodel"></param>
/// <returns></returns>
public List<RB_Goods_Extend> GetSingleList(RB_Goods_Extend dmodel)
public List<RB_Goods_Extend> GetSingleList(RB_Goods_Extend dmodel,bool IsAllClassify = false)
{
string where = $" 1=1 and g.{nameof(RB_Goods_Extend.Status)}=0 and g.GoodsClassify=0";
string where = $" 1=1 and g.{nameof(RB_Goods_Extend.Status)}=0 ";
if (IsAllClassify == false) {
where += $@" and g.GoodsClassify=0";
}
if (dmodel.TenantId > 0)
{
where += $@" and g.{nameof(RB_Goods_Extend.TenantId)}={dmodel.TenantId}";
......
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