Commit 68e95a3b authored by liudong1993's avatar liudong1993

订单取消+微店调整

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