Commit 2afba2e5 authored by 吴春's avatar 吴春

提交代码

parent f84a7e29
...@@ -4023,7 +4023,7 @@ namespace Mall.Module.User ...@@ -4023,7 +4023,7 @@ namespace Mall.Module.User
/// <param name="demodel"></param> /// <param name="demodel"></param>
/// <param name="NewUserId"></param> /// <param name="NewUserId"></param>
/// <returns></returns> /// <returns></returns>
public object GetUserMyTeamPageListForFX(int pageIndex, int pageSize, out long count, RB_Distributor_Info_Extend demodel,int NewUserId=0) public object GetUserMyTeamPageListForFX(int pageIndex, int pageSize, out long count, RB_Distributor_Info_Extend demodel, int NewUserId = 0)
{ {
string UserIds = member_UserRepository.GetMemberChildIdStr(demodel.UserId ?? 0); string UserIds = member_UserRepository.GetMemberChildIdStr(demodel.UserId ?? 0);
...@@ -4036,8 +4036,8 @@ namespace Mall.Module.User ...@@ -4036,8 +4036,8 @@ namespace Mall.Module.User
TenantId = demodel.TenantId, TenantId = demodel.TenantId,
MallBaseId = demodel.MallBaseId, MallBaseId = demodel.MallBaseId,
SortNum = demodel.SortNum, SortNum = demodel.SortNum,
IsDirect=demodel.IsDirect, IsDirect = demodel.IsDirect,
Id=(demodel.UserId ?? 0) Id = (demodel.UserId ?? 0)
}); });
List<object> RList = new List<object>(); List<object> RList = new List<object>();
if (list.Any()) if (list.Any())
...@@ -4362,6 +4362,8 @@ namespace Mall.Module.User ...@@ -4362,6 +4362,8 @@ namespace Mall.Module.User
List<RB_Goods_Order_Extend> olist = goods_OrderRepository.GetAppletGoodsOrderNumStatistics(umodel.Id, umodel.TenantId, umodel.MallBaseId); List<RB_Goods_Order_Extend> olist = goods_OrderRepository.GetAppletGoodsOrderNumStatistics(umodel.Id, umodel.TenantId, umodel.MallBaseId);
//待评价 //待评价
int WaitCommentNum = goods_OrderRepository.GetAppletGoodsOrderWaitCommentNum(umodel.Id, umodel.TenantId, umodel.MallBaseId); int WaitCommentNum = goods_OrderRepository.GetAppletGoodsOrderWaitCommentNum(umodel.Id, umodel.TenantId, umodel.MallBaseId);
//司导订单待评价
int GuideCarWaitCommentNum = goods_OrderRepository.GetAppletGoodsOrderWaitCommentNum(umodel.Id, umodel.TenantId, umodel.MallBaseId, 1);
//售后处理中 //售后处理中
int AfterSaleNum = goods_OrderRepository.GetAppletGoodsOrderAfterSaleNum(umodel.Id, umodel.TenantId, umodel.MallBaseId); int AfterSaleNum = goods_OrderRepository.GetAppletGoodsOrderAfterSaleNum(umodel.Id, umodel.TenantId, umodel.MallBaseId);
string parent_name = ""; string parent_name = "";
...@@ -4457,12 +4459,20 @@ namespace Mall.Module.User ...@@ -4457,12 +4459,20 @@ namespace Mall.Module.User
}, },
MyOrder = new MyOrder = new
{ {
NonPayment = olist.Where(x => x.OrderStatus == Common.Enum.Goods.OrderStatusEnum.NonPayment).FirstOrDefault()?.OrderNum ?? 0, NonPayment = olist.Where(x => x.OrderClassify == 0 && x.OrderStatus == Common.Enum.Goods.OrderStatusEnum.NonPayment).FirstOrDefault()?.OrderNum ?? 0,
WaitSendGoods = olist.Where(x => x.OrderStatus == Common.Enum.Goods.OrderStatusEnum.WaitSendGoods).FirstOrDefault()?.OrderNum ?? 0, WaitSendGoods = olist.Where(x => x.OrderClassify == 0 && x.OrderStatus == Common.Enum.Goods.OrderStatusEnum.WaitSendGoods).FirstOrDefault()?.OrderNum ?? 0,
WaitReceiving = olist.Where(x => x.OrderStatus == Common.Enum.Goods.OrderStatusEnum.WaitReceiving).FirstOrDefault()?.OrderNum ?? 0, WaitReceiving = olist.Where(x => x.OrderClassify == 0 && x.OrderStatus == Common.Enum.Goods.OrderStatusEnum.WaitReceiving).FirstOrDefault()?.OrderNum ?? 0,
WaitCommentNum, WaitCommentNum,
AfterSaleNum AfterSaleNum
}, },
MyGuideCarOrder = new
{
NonPayment = olist.Where(x => x.OrderClassify == 1 && x.OrderStatus == Common.Enum.Goods.OrderStatusEnum.NonPayment).FirstOrDefault()?.OrderNum ?? 0,
WaitSendGoods = olist.Where(x => x.OrderClassify == 1 && x.OrderStatus == Common.Enum.Goods.OrderStatusEnum.WaitSendGoods).FirstOrDefault()?.OrderNum ?? 0,
WaitReceiving = olist.Where(x => x.OrderClassify == 1 && x.OrderStatus == Common.Enum.Goods.OrderStatusEnum.WaitReceiving).FirstOrDefault()?.OrderNum ?? 0,
GuideCarWaitCommentNum,
Completed = olist.Where(x => x.OrderClassify == 1 && x.OrderStatus == Common.Enum.Goods.OrderStatusEnum.Completed).FirstOrDefault()?.OrderNum ?? 0,
},
isShowDistributionCenter = IsShowDistributionCenter isShowDistributionCenter = IsShowDistributionCenter
}; };
} }
......
...@@ -117,11 +117,12 @@ namespace Mall.Repository.Product ...@@ -117,11 +117,12 @@ namespace Mall.Repository.Product
{ {
where += $@" and o.{nameof(RB_Goods_Order.Recycled)}={(int)dmodel.Recycled}"; where += $@" and o.{nameof(RB_Goods_Order.Recycled)}={(int)dmodel.Recycled}";
} }
if (dmodel.SmallShopsId.HasValue&& dmodel.SmallShopsId > 0) if (dmodel.SmallShopsId.HasValue && dmodel.SmallShopsId > 0)
{ {
where += $@" and o.{nameof(RB_Goods_Order.SmallShopsId)}={dmodel.SmallShopsId}"; where += $@" and o.{nameof(RB_Goods_Order.SmallShopsId)}={dmodel.SmallShopsId}";
} }
if (dmodel.IsSelectPayMoney == 1) { if (dmodel.IsSelectPayMoney == 1)
{
where += $@" and o.{nameof(RB_Goods_Order.PaymentTime)} IS NOT NULL"; where += $@" and o.{nameof(RB_Goods_Order.PaymentTime)} IS NOT NULL";
} }
...@@ -636,7 +637,7 @@ WHERE od.GoodsId in({goodsIds}) and o.`Status`=0 and o.OrderStatus <> 7 group by ...@@ -636,7 +637,7 @@ WHERE od.GoodsId in({goodsIds}) and o.`Status`=0 and o.OrderStatus <> 7 group by
/// <returns></returns> /// <returns></returns>
public List<RB_Goods_Order_Extend> GetAppletGoodsOrderNumStatistics(int userId, int tenantId, int mallBaseId) public List<RB_Goods_Order_Extend> GetAppletGoodsOrderNumStatistics(int userId, int tenantId, int mallBaseId)
{ {
string sql = $" SELECT OrderStatus,COUNT(0) as OrderNum FROM rb_goods_order WHERE `Status`=0 and OrderStatus in (1,2,3) and UserId={userId} and TenantId={tenantId} and MallBaseId={mallBaseId} GROUP BY OrderStatus"; string sql = $" SELECT OrderStatus,COUNT(0) as OrderNum,OrderClassify FROM rb_goods_order WHERE `Status`=0 and OrderStatus in (1,2,3,5) and UserId={userId} and TenantId={tenantId} and MallBaseId={mallBaseId} GROUP BY OrderStatus,OrderClassify";
return Get<RB_Goods_Order_Extend>(sql).ToList(); return Get<RB_Goods_Order_Extend>(sql).ToList();
} }
...@@ -647,12 +648,12 @@ WHERE od.GoodsId in({goodsIds}) and o.`Status`=0 and o.OrderStatus <> 7 group by ...@@ -647,12 +648,12 @@ WHERE od.GoodsId in({goodsIds}) and o.`Status`=0 and o.OrderStatus <> 7 group by
/// <param name="tenantId"></param> /// <param name="tenantId"></param>
/// <param name="mallBaseId"></param> /// <param name="mallBaseId"></param>
/// <returns></returns> /// <returns></returns>
public int GetAppletGoodsOrderWaitCommentNum(int userId, int tenantId, int mallBaseId) public int GetAppletGoodsOrderWaitCommentNum(int userId, int tenantId, int mallBaseId, int OrderClassify = 0)
{ {
string sql = $@"SELECT COUNT(0) as OrderNum FROM( string sql = $@"SELECT COUNT(0) as OrderNum FROM(
SELECT o.OrderId FROM rb_goods_order o SELECT o.OrderId FROM rb_goods_order o
INNER JOIN rb_goods_orderdetail od on o.OrderId=od.OrderId INNER JOIN rb_goods_orderdetail od on o.OrderId=od.OrderId
WHERE o.`Status`=0 and o.OrderStatus =4 and od.IsComment=2 and o.UserId={userId} and o.TenantId={tenantId} and o.MallBaseId={mallBaseId} WHERE o.`Status`=0 and o.OrderStatus =4 and od.IsComment=2 and o.UserId={userId} and o.TenantId={tenantId} and o.MallBaseId={mallBaseId} and o.OrderClassify={OrderClassify}
GROUP BY o.OrderId)t"; GROUP BY o.OrderId)t";
var obj = ExecuteScalar(sql); var obj = ExecuteScalar(sql);
if (obj != null) if (obj != null)
......
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