From ece0023cdc2e1211c222b9df6c9ee62d3f2a7f5e Mon Sep 17 00:00:00 2001
From: lwh <2679599887@qq.com>
Date: Fri, 22 Sep 2023 22:08:32 +0800
Subject: [PATCH] =?UTF-8?q?fixed=20=E4=BF=AE=E6=94=B9=E7=BB=86=E8=8A=82?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../Business/OrderManage/Orders/OrderDto.cs | 9 ++++
ARW.Model/Vo/Api/Carts/CartApiVo.cs | 5 ++
.../CustomerAddresses/CustomerAddressApiVo.cs | 5 ++
.../Vo/Api/GoodsManager/Goodss/GoodsApiVo.cs | 6 +++
.../BusinessService/Carts/CartServiceApi.cs | 46 +++++++++++--------
.../CustomerAddressServiceApi.cs | 4 ++
.../GoodsManager/Goodss/GoodsServiceApi.cs | 1 +
.../OrderManage/Orders/OrderService.cs | 4 ++
8 files changed, 61 insertions(+), 19 deletions(-)
diff --git a/ARW.Model/Dto/Business/OrderManage/Orders/OrderDto.cs b/ARW.Model/Dto/Business/OrderManage/Orders/OrderDto.cs
index 3621274..6acf226 100644
--- a/ARW.Model/Dto/Business/OrderManage/Orders/OrderDto.cs
+++ b/ARW.Model/Dto/Business/OrderManage/Orders/OrderDto.cs
@@ -133,6 +133,15 @@ namespace ARW.Model.Dto.Business.OrderManage.Orders
public int? OrderStatus { get; set; }
public string ids { get; set; }
+
+ public DateTime BeginTime { get; set; }
+
+ public DateTime EndTime { get; set; }
+
+ public string CustomerNickNme { get; set; }
+
+ public string CustomerPhome { get; set; }
+
}
diff --git a/ARW.Model/Vo/Api/Carts/CartApiVo.cs b/ARW.Model/Vo/Api/Carts/CartApiVo.cs
index 2c627d6..95414be 100644
--- a/ARW.Model/Vo/Api/Carts/CartApiVo.cs
+++ b/ARW.Model/Vo/Api/Carts/CartApiVo.cs
@@ -84,6 +84,11 @@ namespace ARW.Model.Vo.Api.Carts
[JsonConverter(typeof(ValueToStringConverter))]
public long StoreId { get; set; }
+ ///
+ /// 店铺名称
+ ///
+ public string StoreName { get; set; }
+
///
/// 商品Id
///
diff --git a/ARW.Model/Vo/Api/Custom/CustomerAddresses/CustomerAddressApiVo.cs b/ARW.Model/Vo/Api/Custom/CustomerAddresses/CustomerAddressApiVo.cs
index 9590b5e..1bf29ec 100644
--- a/ARW.Model/Vo/Api/Custom/CustomerAddresses/CustomerAddressApiVo.cs
+++ b/ARW.Model/Vo/Api/Custom/CustomerAddresses/CustomerAddressApiVo.cs
@@ -51,6 +51,11 @@ namespace ARW.Model.Vo.Api.Custom.CustomerAddresses
///
public bool IsDefault { get; set; }
+ public string ProvinceName { get; set; }
+ public string CityName { get; set; }
+ public string DistrictName { get; set; }
+ public string DetaiaddresslAddress { get; set; }
+
}
diff --git a/ARW.Model/Vo/Api/GoodsManager/Goodss/GoodsApiVo.cs b/ARW.Model/Vo/Api/GoodsManager/Goodss/GoodsApiVo.cs
index 989986a..6a308e1 100644
--- a/ARW.Model/Vo/Api/GoodsManager/Goodss/GoodsApiVo.cs
+++ b/ARW.Model/Vo/Api/GoodsManager/Goodss/GoodsApiVo.cs
@@ -219,6 +219,12 @@ namespace ARW.Model.Vo.Api.GoodsManager.Goodss
public string Desc { get; set; }
+ ///
+ /// 卖点
+ ///
+ public string GoodsSellingPoint { get; set; }
+
+
///
/// 商品规格列表
///
diff --git a/ARW.Service/Api/BusinessService/Carts/CartServiceApi.cs b/ARW.Service/Api/BusinessService/Carts/CartServiceApi.cs
index b77a6d9..900686f 100644
--- a/ARW.Service/Api/BusinessService/Carts/CartServiceApi.cs
+++ b/ARW.Service/Api/BusinessService/Carts/CartServiceApi.cs
@@ -29,6 +29,7 @@ using Senparc.Weixin.MP.AdvancedAPIs.MerChant;
using Infrastructure;
using ARW.Model.Models.Business.Marketing.CouponManage.CustomerCoupons;
using ARW.Model.Models.Business.Marketing.CouponManage.Coupons;
+using Senparc.Weixin.WxOpen.AdvancedAPIs.WxApp.WxAppJson;
namespace ARW.Service.Api.BusinessService.Carts
{
@@ -242,6 +243,8 @@ namespace ARW.Service.Api.BusinessService.Carts
goodsPromotion.CartId = _item.CartId;
goodsPromotion.IsSelected = _item.IsSelected;
goodsPromotion.StoreId = goods.ShopGuid;
+ var shop = await _ShopRepository.GetFirstAsync(s => s.ShopGuid == goods.ShopGuid);
+ goodsPromotion.StoreName = shop.ShopName;
goodsPromotion.SpuId = goods.GoodsGuid;
goodsPromotion.SkuId = _item.GoodsSkuId;
goodsPromotion.Thumb = goods.GoodsPicture.Split(',').First();
@@ -254,29 +257,34 @@ namespace ARW.Service.Api.BusinessService.Carts
if (_item.GoodsSkuId != 0)
{
var sku = await _GoodsSkuRepository.GetFirstAsync(s => s.GoodsSkuId == _item.GoodsSkuId);
- if (sku == null) throw new CustomException("所选规格不存在,请重新挑选");
- goodsPromotion.Price = sku.GoodsSkuPrice;
- goodsPromotion.OriginPrice = sku.GoodsSkuLinePrice;
-
- // 查找当前规格的详细信息
- var specInfoList = new List();
-
- if (sku.SpecValueId != 0)
+ if (sku != null)
{
- var specInfo = await GetSpecInfo(sku.SpecValueId);
- specInfoList.Add(specInfo);
- if (sku.SpecSecondValueId != 0)
+ goodsPromotion.Price = sku.GoodsSkuPrice;
+ goodsPromotion.OriginPrice = sku.GoodsSkuLinePrice;
+ if (!string.IsNullOrEmpty(sku.GoodsSkuImg))
+ goodsPromotion.Thumb = sku.GoodsSkuImg;
+
+ // 查找当前规格的详细信息
+ var specInfoList = new List();
+
+ if (sku.SpecValueId != 0)
{
- var specInfo2 = await GetSpecInfo(sku.SpecSecondValueId);
- specInfoList.Add(specInfo2);
- }
- if (sku.SpecThirdValueId != 0)
- {
- var specInfo3 = await GetSpecInfo(sku.SpecThirdValueId);
- specInfoList.Add(specInfo3);
+ var specInfo = await GetSpecInfo(sku.SpecValueId);
+ specInfoList.Add(specInfo);
+ if (sku.SpecSecondValueId != 0)
+ {
+ var specInfo2 = await GetSpecInfo(sku.SpecSecondValueId);
+ specInfoList.Add(specInfo2);
+ }
+ if (sku.SpecThirdValueId != 0)
+ {
+ var specInfo3 = await GetSpecInfo(sku.SpecThirdValueId);
+ specInfoList.Add(specInfo3);
+ }
}
+ goodsPromotion.SpecInfo = specInfoList;
}
- goodsPromotion.SpecInfo = specInfoList;
+ //throw new CustomException("所选规格不存在,请重新挑选");
}
else
{
diff --git a/ARW.Service/Api/BusinessService/Custom/CustomerAddresses/CustomerAddressServiceApi.cs b/ARW.Service/Api/BusinessService/Custom/CustomerAddresses/CustomerAddressServiceApi.cs
index b0d72d6..f6354b8 100644
--- a/ARW.Service/Api/BusinessService/Custom/CustomerAddresses/CustomerAddressServiceApi.cs
+++ b/ARW.Service/Api/BusinessService/Custom/CustomerAddresses/CustomerAddressServiceApi.cs
@@ -66,7 +66,11 @@ namespace ARW.Service.Api.BusinessService.Custom.CustomerAddresses
CustomerAddressGuid = s.CustomerAddressGuid,
Name = s.CustomerAddressName,
PhoneNumber = s.CustomerAddressPhone,
+ ProvinceName = c.RegionName,
+ CityName = d.RegionName,
+ DistrictName = f.RegionName,
Address = c.RegionName + d.RegionName + f.RegionName + s.CustomerAddressDetailed,
+ DetaiaddresslAddress = s.CustomerAddressDetailed,
IsDefault = s.CustomerAddressGuid == g.CustomerDefaultAddressGuid
});
diff --git a/ARW.Service/Api/BusinessService/GoodsManager/Goodss/GoodsServiceApi.cs b/ARW.Service/Api/BusinessService/GoodsManager/Goodss/GoodsServiceApi.cs
index 01e3736..8d493cc 100644
--- a/ARW.Service/Api/BusinessService/GoodsManager/Goodss/GoodsServiceApi.cs
+++ b/ARW.Service/Api/BusinessService/GoodsManager/Goodss/GoodsServiceApi.cs
@@ -203,6 +203,7 @@ namespace ARW.Service.Api.BusinessService.GoodsManager.Goodss
SoldNum = s.GoodsSalesInitial + s.GoodsSalesActual,
Desc = s.GoodsDetails,
IsPutOnSale = s.GoodsShelfStatus,
+ GoodsSellingPoint = s.GoodsSellingPoint
}).Take(1);
diff --git a/ARW.Service/Business/BusinessService/OrderManage/Orders/OrderService.cs b/ARW.Service/Business/BusinessService/OrderManage/Orders/OrderService.cs
index 42f2864..57a5d5e 100644
--- a/ARW.Service/Business/BusinessService/OrderManage/Orders/OrderService.cs
+++ b/ARW.Service/Business/BusinessService/OrderManage/Orders/OrderService.cs
@@ -77,10 +77,14 @@ namespace ARW.Service.Business.BusinessService.OrderManage.Orders
predicate = predicate.AndIF(parm.DeliveryStatus != null, s => s.DeliveryStatus == parm.DeliveryStatus);
predicate = predicate.AndIF(parm.ReceiptStatus != null, s => s.ReceiptStatus == parm.ReceiptStatus);
predicate = predicate.AndIF(parm.OrderStatus != null, s => s.OrderStatus == parm.OrderStatus);
+ predicate = predicate.AndIF(parm.BeginTime != DateTime.MinValue, s => s.Create_time >= parm.BeginTime);
+ predicate = predicate.AndIF(parm.EndTime != DateTime.MinValue, s => s.Create_time <= parm.EndTime);
var query = _OrderRepository
.Queryable()
.LeftJoin((s, c) => s.CustomerGuid == c.CustomerGuid)
.Where(predicate.ToExpression())
+ .WhereIF(!string.IsNullOrEmpty(parm.CustomerNickNme), (s, c) => c.CustomerNickname.Contains(parm.CustomerNickNme) )
+ .WhereIF(!string.IsNullOrEmpty(parm.CustomerPhome), (s, c) => c.CustomerMobilePhoneNumber.Contains(parm.CustomerPhome))
.OrderBy(s => s.Create_time, OrderByType.Desc)
.Select((s, c) => new OrderVo
{