diff --git a/ARW.Model/Dto/Api/Carts/CartApiDto.cs b/ARW.Model/Dto/Api/Carts/CartApiDto.cs deleted file mode 100644 index 3ab6fc2..0000000 --- a/ARW.Model/Dto/Api/Carts/CartApiDto.cs +++ /dev/null @@ -1,20 +0,0 @@ -using System; -using System.Collections.Generic; -using System.ComponentModel.DataAnnotations; -using ARW.Model.Models.Business.Carts; - -namespace ARW.Model.Dto.Api.Carts -{ - - /// - /// 购物车记录查询对象Api - /// - /// @author lwh - /// @date 2023-07-20 - /// - public class CartQueryDtoApi : PagerInfo - { - [Required(ErrorMessage = "客户Guid不能为空")] - public long CustomerGuid { get; set; } - } -} diff --git a/ARW.Model/Dto/Api/Carts/CartGoodsNumDto.cs b/ARW.Model/Dto/Api/Carts/CartGoodsNumDto.cs deleted file mode 100644 index a54f54e..0000000 --- a/ARW.Model/Dto/Api/Carts/CartGoodsNumDto.cs +++ /dev/null @@ -1,22 +0,0 @@ -using System; -using System.Collections.Generic; -using System.ComponentModel.DataAnnotations; -using ARW.Model.Models.Business.Carts; - -namespace ARW.Model.Dto.Api.Carts -{ - - /// - /// 修改购物车商品选中状态Dto - /// - /// @author lwh - /// @date 2023-08-05 - /// - public class CartGoodsNumDto - { - public int CartId { get; set; } - public int CartGoodsNum { get; set; } - } - - -} diff --git a/ARW.Model/Dto/Api/Carts/CartGoodsSelectDto.cs b/ARW.Model/Dto/Api/Carts/CartGoodsSelectDto.cs deleted file mode 100644 index e4ff715..0000000 --- a/ARW.Model/Dto/Api/Carts/CartGoodsSelectDto.cs +++ /dev/null @@ -1,23 +0,0 @@ -using System; -using System.Collections.Generic; -using System.ComponentModel.DataAnnotations; -using ARW.Model.Models.Business.Carts; - -namespace ARW.Model.Dto.Api.Carts -{ - - /// - /// 修改购物车商品选中状态Dto - /// - /// @author lwh - /// @date 2023-08-05 - /// - public class CartGoodsSelectDto - { - public long CustomerGuid { get; set; } - public int CartId { get; set; } - public bool IsSelected { get; set; } - } - - -} diff --git a/ARW.Model/Dto/Api/Custom/CustomerAddresses/CustomerAddressApiDto.cs b/ARW.Model/Dto/Api/Custom/CustomerAddresses/CustomerAddressApiDto.cs deleted file mode 100644 index 7efaa69..0000000 --- a/ARW.Model/Dto/Api/Custom/CustomerAddresses/CustomerAddressApiDto.cs +++ /dev/null @@ -1,69 +0,0 @@ -using System; -using System.Collections.Generic; -using System.ComponentModel.DataAnnotations; -using ARW.Model.Models.Business.Custom.CustomerAddresses; - -namespace ARW.Model.Dto.Api.Custom.CustomerAddresses -{ - - /// - /// 客户收货地址查询对象Api - /// - /// @author admin - /// @date 2023-06-09 - /// - public class CustomerAddressQueryDtoApi : PagerInfo - { - public long CustomerAddressCustomerGuid { get; set; } - public string CustomerAddressName { get; set; } - public string CustomerAddressPhone { get; set; } - } - - - /// - /// 客户收货地址详情输入对象Api - /// - /// @author admin - /// @date 2023-06-09 - /// - public class CustomerAddressDtoApi - { - [Required(ErrorMessage = "CustomerAddressId不能为空")] - public long CustomerAddressId { get; set; } - } - - - - public class CustomerAddressAddDtoApi - { - - public int CustomerAddressId { get; set; } - - public long CustomerAddressGuid { get; set; } - - public long CustomerAddressCustomerGuid { get; set; } - - [Required(ErrorMessage = "省编码不能为空")] - public string ProvinceCode { get; set; } - - [Required(ErrorMessage = "市编码不能为空")] - public string CityCode { get; set; } - - [Required(ErrorMessage = "区编码不能为空")] - public string DistrictCode { get; set; } - - [Required(ErrorMessage = "收货人名称不能为空")] - public string CustomerAddressName { get; set; } - - [Required(ErrorMessage = "收货电话不能为空")] - public string CustomerAddressPhone { get; set; } - - [Required(ErrorMessage = "详细地址不能为空")] - public string CustomerAddressDetailed { get; set; } - - [Required(ErrorMessage = "是否默认地址不能为空")] - public int IsDefault { get; set; } - - } - -} diff --git a/ARW.Model/Dto/Api/GoodsManager/GoodsCategorys/GoodsCategoryApiDto.cs b/ARW.Model/Dto/Api/GoodsManager/GoodsCategorys/GoodsCategoryApiDto.cs deleted file mode 100644 index ea89b12..0000000 --- a/ARW.Model/Dto/Api/GoodsManager/GoodsCategorys/GoodsCategoryApiDto.cs +++ /dev/null @@ -1,35 +0,0 @@ -using System; -using System.Collections.Generic; -using System.ComponentModel.DataAnnotations; -using ARW.Model.Models.Business.GoodsManager.GoodsCategorys; - -namespace ARW.Model.Dto.Api.GoodsManager.GoodsCategorys -{ - - /// - /// 经营类目查询对象Api - /// - /// @author lwh - /// @date 2023-07-08 - /// - public class GoodsCategoryQueryDtoApi : PagerInfo - { - public string GoodsCategoryName { get; set; } - public int? GoodsCategoryDisplayStatus { get; set; } - public int? GoodsCategoryIsPopular { get; set; } - } - - - /// - /// 经营类目详情输入对象Api - /// - /// @author lwh - /// @date 2023-07-08 - /// - public class GoodsCategoryDtoApi - { - [Required(ErrorMessage = "GoodsCategoryGuid不能为空")] - public long GoodsCategoryGuid { get; set; } - } - -} diff --git a/ARW.Model/Dto/Api/GoodsManager/GoodsComments/GoodsCommentApiDto.cs b/ARW.Model/Dto/Api/GoodsManager/GoodsComments/GoodsCommentApiDto.cs deleted file mode 100644 index 2ffb2f5..0000000 --- a/ARW.Model/Dto/Api/GoodsManager/GoodsComments/GoodsCommentApiDto.cs +++ /dev/null @@ -1,40 +0,0 @@ -using System; -using System.Collections.Generic; -using System.ComponentModel.DataAnnotations; -using ARW.Model.Models.Business.GoodsManager.GoodsComments; - -namespace ARW.Model.Dto.Api.GoodsManager.GoodsComments -{ - - /// - /// 商品评价查询对象Api - /// - /// @author admin - /// @date 2023-07-17 - /// - public class GoodsCommentQueryDtoApi : PagerInfo - { - public long? ShopGuid { get; set; } - - [Required(ErrorMessage = "商品Id不能为空")] - public long SpuId { get; set; } - - public int CommentLevel { get; set; } - - public bool HasImage { get; set; } - } - - - /// - /// 商品详情页评价输入对象Api - /// - /// @author admin - /// @date 2023-07-17 - /// - public class GoodsCommentDtoApi - { - [Required(ErrorMessage = "商品Id不能为空")] - public long SpuId { get; set; } - } - -} diff --git a/ARW.Model/Dto/Api/GoodsManager/Goodss/GoodsApiDto.cs b/ARW.Model/Dto/Api/GoodsManager/Goodss/GoodsApiDto.cs deleted file mode 100644 index 6c79bda..0000000 --- a/ARW.Model/Dto/Api/GoodsManager/Goodss/GoodsApiDto.cs +++ /dev/null @@ -1,49 +0,0 @@ -using System; -using System.Collections.Generic; -using System.ComponentModel.DataAnnotations; -using ARW.Model.Models.Business.GoodsManager.Goodss; - -namespace ARW.Model.Dto.Api.GoodsManager.Goodss -{ - - /// - /// 商品查询对象Api - /// - /// @author lwh - /// @date 2023-07-09 - /// - public class GoodsQueryDtoApi : PagerInfo - { - public long? ShopGuid { get; set; } - - /// - /// 店铺经营类目 - /// - public long GoodsCategoryGuid { get; set; } - - /// - /// 店铺商品类目 - /// - public long ShopGoodsCategoryGuid { get; set; } - public string GoodsName { get; set; } - public string GoodsCoding { get; set; } - public int GoodsSort { get; set; } - public int GoodsSortType { get; set; } - public decimal MinPrice { get; set;} - public decimal MaxPrice { get; set;} - } - - - /// - /// 商品详情输入对象Api - /// - /// @author lwh - /// @date 2023-07-09 - /// - public class GoodsDtoApi - { - [Required(ErrorMessage = "商品Id不能为空")] - public long SpuId { get; set; } - } - -} diff --git a/ARW.Model/Dto/Api/GoodsManager/Goodss/GoodsFreightDto.cs b/ARW.Model/Dto/Api/GoodsManager/Goodss/GoodsFreightDto.cs deleted file mode 100644 index 002ede2..0000000 --- a/ARW.Model/Dto/Api/GoodsManager/Goodss/GoodsFreightDto.cs +++ /dev/null @@ -1,30 +0,0 @@ -using System; -using System.Collections.Generic; -using System.ComponentModel.DataAnnotations; -using ARW.Model.Dto.Api.Pay; -using ARW.Model.Models.Business.GoodsManager.Goodss; - -namespace ARW.Model.Dto.Api.GoodsManager.Goodss -{ - - /// - /// 商品查询对象Api - /// - /// @author lwh - /// @date 2023-07-09 - /// - public class GoodsFreightDto - { - /// - /// 待结算商品 - /// - public List GoodsRequestList { get; set; } - - /// - /// 地址guid - /// - public long CustomerAddressGuid { get; set; } - - } - -} diff --git a/ARW.Model/Dto/Api/GoodsManager/ShopGoodsCategorys/ShopGoodsCategoryApiDto.cs b/ARW.Model/Dto/Api/GoodsManager/ShopGoodsCategorys/ShopGoodsCategoryApiDto.cs deleted file mode 100644 index ddaa820..0000000 --- a/ARW.Model/Dto/Api/GoodsManager/ShopGoodsCategorys/ShopGoodsCategoryApiDto.cs +++ /dev/null @@ -1,24 +0,0 @@ -using System; -using System.Collections.Generic; -using System.ComponentModel.DataAnnotations; -using ARW.Model.Models.Business.GoodsManager.ShopGoodsCategorys; - -namespace ARW.Model.Dto.Api.GoodsManager.ShopGoodsCategorys -{ - - /// - /// 店铺商品类目查询对象Api - /// - /// @author lwh - /// @date 2023-07-20 - /// - public class ShopGoodsCategoryQueryDtoApi : PagerInfo - { - [Required(ErrorMessage = "ShopGuid不能为空")] - public long ShopGuid { get; set; } - public string ShopGoodsCategoryName { get; set; } - } - - - -} diff --git a/ARW.Model/Dto/Api/Marketing/CouponManage/Coupons/CouponApiDto.cs b/ARW.Model/Dto/Api/Marketing/CouponManage/Coupons/CouponApiDto.cs deleted file mode 100644 index 2a83a76..0000000 --- a/ARW.Model/Dto/Api/Marketing/CouponManage/Coupons/CouponApiDto.cs +++ /dev/null @@ -1,39 +0,0 @@ -using System; -using System.Collections.Generic; -using System.ComponentModel.DataAnnotations; -using ARW.Model.Models.Business.Marketing.CouponManage.Coupons; - -namespace ARW.Model.Dto.Api.Marketing.CouponManage.Coupons -{ - - /// - /// 优惠券查询对象Api - /// - /// @author lwh - /// @date 2023-08-01 - /// - public class CouponQueryDtoApi : PagerInfo - { - public long CustomerGuid { get; set; } - public long ShopGuid { get; set; } - public string CouponName { get; set; } - public int? CouponType { get; set; } - public int? CouponExpireType { get; set; } - public int? CouponApplicableScope { get; set; } - public int? CouponDisplayStatus { get; set; } - } - - - /// - /// 优惠券详情输入对象Api - /// - /// @author lwh - /// @date 2023-08-01 - /// - public class CouponDtoApi - { - [Required(ErrorMessage = "CouponGuid不能为空")] - public long CouponGuid { get; set; } - } - -} diff --git a/ARW.Model/Dto/Api/Marketing/CouponManage/CustomerCoupons/CustomerCouponApiDto.cs b/ARW.Model/Dto/Api/Marketing/CouponManage/CustomerCoupons/CustomerCouponApiDto.cs deleted file mode 100644 index fcc2840..0000000 --- a/ARW.Model/Dto/Api/Marketing/CouponManage/CustomerCoupons/CustomerCouponApiDto.cs +++ /dev/null @@ -1,38 +0,0 @@ -using System; -using System.Collections.Generic; -using System.ComponentModel.DataAnnotations; -using ARW.Model.Models.Business.Marketing.CouponManage.CustomerCoupons; - -namespace ARW.Model.Dto.Api.Marketing.CouponManage.CustomerCoupons -{ - - /// - /// 领券记录查询对象Api - /// - /// @author lwh - /// @date 2023-07-31 - /// - public class CustomerCouponQueryDtoApi : PagerInfo - { - [Required(ErrorMessage = "CustomerGuid不能为空")] - public long CustomerGuid{ get; set; } - - public long ShopGuid { get; set; } - - public int Status { get; set; } - } - - - /// - /// 领券记录详情输入对象Api - /// - /// @author lwh - /// @date 2023-07-31 - /// - public class CustomerCouponDtoApi - { - [Required(ErrorMessage = "CustomerCouponGuid不能为空")] - public long CustomerCouponId { get; set; } - } - -} diff --git a/ARW.Model/Dto/Api/OrderManage/OrderRefunds/AddOrderRefundApiDto.cs b/ARW.Model/Dto/Api/OrderManage/OrderRefunds/AddOrderRefundApiDto.cs deleted file mode 100644 index 4bdf1e0..0000000 --- a/ARW.Model/Dto/Api/OrderManage/OrderRefunds/AddOrderRefundApiDto.cs +++ /dev/null @@ -1,47 +0,0 @@ -using System; -using System.Collections.Generic; -using System.ComponentModel.DataAnnotations; -using ARW.Model.Models.Business.OrderManage.OrderRefunds; - -namespace ARW.Model.Dto.Api.OrderManage.OrderRefunds -{ - - /// - /// 售后单记录表对象Api - /// - /// @author lwh - /// @date 2023-10-16 - /// - public class AddOrderRefundApiDto - { - public int OrderRefundId { get; set; } - - public long OrderRefundGuid { get; set; } - - [Required(ErrorMessage = "订单guid不能为空")] - public long OrderGuid { get; set; } - - [Required(ErrorMessage = "店铺guid不能为空")] - public long ShopGuid { get; set; } - - public long CustomerGuid { get; set; } - - [Required(ErrorMessage = "售后类型(1退货退款 2退货(无需退款) 3换货)不能为空")] - public int RefundType { get; set; } - - [Required(ErrorMessage = "商品收货状态(1未收到货 2已收到货)不能为空")] - public int GoodsReceiveStatus { get; set; } - - public int RefundReason { get; set; } - - [Required(ErrorMessage = "退款金额")] - public decimal RefundMoney { get; set; } - - public string CustomerRefundDesc { get; set; } - - public string CustomerRefundImg { get; set; } - - } - - -} diff --git a/ARW.Model/Dto/Api/OrderManage/OrderRefunds/BuyerDeliveryApiDto.cs b/ARW.Model/Dto/Api/OrderManage/OrderRefunds/BuyerDeliveryApiDto.cs deleted file mode 100644 index 7c361e2..0000000 --- a/ARW.Model/Dto/Api/OrderManage/OrderRefunds/BuyerDeliveryApiDto.cs +++ /dev/null @@ -1,41 +0,0 @@ -using System; -using System.Collections.Generic; -using System.ComponentModel.DataAnnotations; -using ARW.Model.Models.Business.OrderManage.OrderRefunds; - -namespace ARW.Model.Dto.Api.OrderManage.OrderRefunds -{ - - /// - /// 买家发货对象Api - /// - /// @author lwh - /// @date 2023-10-17 - /// - public class BuyerDeliveryApiDto - { - public int OrderRefundId { get; set; } - - public long OrderRefundGuid { get; set; } - - /// - /// 物流公司guid - /// - [Required(ErrorMessage = "物流公司guid不能为空")] - public long LogisticsCompanyGuid { get; set; } - - /// - /// 客户发货物流单号 - /// - public string ExpressNo { get; set; } - - - /// - /// 客户发货备注 - /// - public string CustomerWaybillRemark { get; set; } - - } - - -} diff --git a/ARW.Model/Dto/Api/OrderManage/OrderRefunds/OrderRefundApiDto.cs b/ARW.Model/Dto/Api/OrderManage/OrderRefunds/OrderRefundApiDto.cs deleted file mode 100644 index f98ce1a..0000000 --- a/ARW.Model/Dto/Api/OrderManage/OrderRefunds/OrderRefundApiDto.cs +++ /dev/null @@ -1,39 +0,0 @@ -using System; -using System.Collections.Generic; -using System.ComponentModel.DataAnnotations; -using ARW.Model.Models.Business.OrderManage.OrderRefunds; - -namespace ARW.Model.Dto.Api.OrderManage.OrderRefunds -{ - - /// - /// 售后单记录表查询对象Api - /// - /// @author lwh - /// @date 2023-10-16 - /// - public class OrderRefundQueryDtoApi : PagerInfo - { - public long CustomerGuid { get; set; } - public int? RefundType { get; set; } - public int? RefundReason { get; set; } - public int? GoodsReceiveStatus { get; set; } - public int? MerchantAuditStatus { get; set; } - public int? IsCustomerSend { get; set; } - public int? OrderRefundStatus { get; set; } - } - - - /// - /// 售后单记录表详情输入对象Api - /// - /// @author lwh - /// @date 2023-10-16 - /// - public class OrderRefundDtoApi - { - [Required(ErrorMessage = "OrderRefundGuid不能为空")] - public long OrderRefundGuid { get; set; } - } - -} diff --git a/ARW.Model/Dto/Api/OrderManage/Orders/AddCommentDto.cs b/ARW.Model/Dto/Api/OrderManage/Orders/AddCommentDto.cs deleted file mode 100644 index 71e9657..0000000 --- a/ARW.Model/Dto/Api/OrderManage/Orders/AddCommentDto.cs +++ /dev/null @@ -1,36 +0,0 @@ -using System; -using System.Collections.Generic; -using System.ComponentModel.DataAnnotations; -using ARW.Model.Models.Business.OrderManage.Orders; - -namespace ARW.Model.Dto.Api.OrderManage.Orders -{ - - /// - /// 添加评论对象Api - /// - /// @author lwh - /// @date 2023-10-19 - /// - public class AddCommentDto - { - public long CustomerGuid { get; set; } - - [Required(ErrorMessage = "订单guid不能为空")] - public long OrderGuid { get; set; } - - [Required(ErrorMessage = "商品guid不能为空")] - public long GoodsGuid { get; set; } - - [Required(ErrorMessage = "评分分数不能为空")] - public float GoodsCommentRating { get; set; } - - - [Required(ErrorMessage = "评价内容不能为空")] - public string GoodsCommentContent { get; set; } - - public string GoodsCommentImages { get; set; } - - } - -} diff --git a/ARW.Model/Dto/Api/OrderManage/Orders/OrderCoupon.cs b/ARW.Model/Dto/Api/OrderManage/Orders/OrderCoupon.cs deleted file mode 100644 index d272212..0000000 --- a/ARW.Model/Dto/Api/OrderManage/Orders/OrderCoupon.cs +++ /dev/null @@ -1,22 +0,0 @@ -using System; -using System.Collections.Generic; -using System.ComponentModel.DataAnnotations; -using ARW.Model.Models.Business.OrderManage.Orders; - -namespace ARW.Model.Dto.Api.OrderManage.Orders -{ - - /// - /// 订单优惠券对象Api - /// - /// @author lwh - /// @date 2023-09-01 - /// - public class OrderCoupon - { - public long ShopGuid { get; set; } - public int Key { get; set; } - } - - -} diff --git a/ARW.Model/Dto/Api/OrderManage/Orders/OrderDtoApi.cs b/ARW.Model/Dto/Api/OrderManage/Orders/OrderDtoApi.cs deleted file mode 100644 index f1ddc26..0000000 --- a/ARW.Model/Dto/Api/OrderManage/Orders/OrderDtoApi.cs +++ /dev/null @@ -1,36 +0,0 @@ -using System; -using System.Collections.Generic; -using System.ComponentModel.DataAnnotations; -using ARW.Model.Models.Business.OrderManage.Orders; - -namespace ARW.Model.Dto.Api.OrderManage.Orders -{ - - /// - /// 订单查询对象Api - /// - /// @author lwh - /// @date 2023-09-01 - /// - public class OrderQueryDtoApi : PagerInfo - { - public long CustomerGuid { get; set; } - public string OrderNumber { get; set; } - public int Status { get; set; } - public string LogisticsTrackingNumber { get; set; } - } - - - /// - /// 订单详情输入对象Api - /// - /// @author lwh - /// @date 2023-09-01 - /// - public class OrderDtoApi - { - [Required(ErrorMessage = "OrderGuid不能为空")] - public long OrderGuid { get; set; } - } - -} diff --git a/ARW.Model/Dto/Api/OrderManage/Orders/StoreInfo.cs b/ARW.Model/Dto/Api/OrderManage/Orders/StoreInfo.cs deleted file mode 100644 index 0d0146e..0000000 --- a/ARW.Model/Dto/Api/OrderManage/Orders/StoreInfo.cs +++ /dev/null @@ -1,24 +0,0 @@ -using System; -using System.Collections.Generic; -using System.ComponentModel.DataAnnotations; -using ARW.Model.Models.Business.OrderManage.Orders; - -namespace ARW.Model.Dto.Api.OrderManage.Orders -{ - - /// - /// 订单店铺对象Api - /// - /// @author lwh - /// @date 2023-09-01 - /// - public class StoreInfo - { - - public long StoreId { get; set; } - public string StoreName { get; set; } - public string Remark { get; set; } - } - - -} diff --git a/ARW.Model/Dto/Api/Pay/AddPayOrderDtoApi.cs b/ARW.Model/Dto/Api/Pay/AddPayOrderDtoApi.cs index ad3d73b..32e48c5 100644 --- a/ARW.Model/Dto/Api/Pay/AddPayOrderDtoApi.cs +++ b/ARW.Model/Dto/Api/Pay/AddPayOrderDtoApi.cs @@ -1,8 +1,3 @@ -using System; -using System.Collections.Generic; -using System.ComponentModel.DataAnnotations; -using ARW.Model.Models.Business.Carts; - namespace ARW.Model.Dto.Api.Pay { diff --git a/ARW.Model/Dto/Api/Pay/CommitPayDtoApi.cs b/ARW.Model/Dto/Api/Pay/CommitPayDtoApi.cs index de77089..5952114 100644 --- a/ARW.Model/Dto/Api/Pay/CommitPayDtoApi.cs +++ b/ARW.Model/Dto/Api/Pay/CommitPayDtoApi.cs @@ -1,8 +1,4 @@ -using System; using System.Collections.Generic; -using System.ComponentModel.DataAnnotations; -using ARW.Model.Dto.Api.OrderManage.Orders; -using ARW.Model.Models.Business.Carts; namespace ARW.Model.Dto.Api.Pay { @@ -59,13 +55,13 @@ namespace ARW.Model.Dto.Api.Pay /// /// 优惠券列表 /// - public List CouponList; + //public List CouponList; /// /// 店铺信息 /// - public List StoreInfoList; + //public List StoreInfoList; } diff --git a/ARW.Model/Dto/Api/Pay/DiscountRes.cs b/ARW.Model/Dto/Api/Pay/DiscountRes.cs index c416b57..ff925f4 100644 --- a/ARW.Model/Dto/Api/Pay/DiscountRes.cs +++ b/ARW.Model/Dto/Api/Pay/DiscountRes.cs @@ -1,8 +1,3 @@ -using System; -using System.Collections.Generic; -using System.ComponentModel.DataAnnotations; -using ARW.Model.Models.Business.Carts; - namespace ARW.Model.Dto.Api.Pay { diff --git a/ARW.Model/Dto/Api/Pay/GoodsRequest.cs b/ARW.Model/Dto/Api/Pay/GoodsRequest.cs index d7713cb..37b7b40 100644 --- a/ARW.Model/Dto/Api/Pay/GoodsRequest.cs +++ b/ARW.Model/Dto/Api/Pay/GoodsRequest.cs @@ -1,7 +1,4 @@ using System; -using System.Collections.Generic; -using System.ComponentModel.DataAnnotations; -using ARW.Model.Models.Business.Carts; namespace ARW.Model.Dto.Api.Pay { diff --git a/ARW.Model/Dto/Api/Pay/RepayDtoApi.cs b/ARW.Model/Dto/Api/Pay/RepayDtoApi.cs index d0047a4..47022ff 100644 --- a/ARW.Model/Dto/Api/Pay/RepayDtoApi.cs +++ b/ARW.Model/Dto/Api/Pay/RepayDtoApi.cs @@ -1,9 +1,3 @@ -using System; -using System.Collections.Generic; -using System.ComponentModel.DataAnnotations; -using ARW.Model.Dto.Api.OrderManage.Orders; -using ARW.Model.Models.Business.Carts; - namespace ARW.Model.Dto.Api.Pay { diff --git a/ARW.Model/Dto/Api/ShopManager/Shops/ShopApiDto.cs b/ARW.Model/Dto/Api/ShopManager/Shops/ShopApiDto.cs deleted file mode 100644 index cf47a98..0000000 --- a/ARW.Model/Dto/Api/ShopManager/Shops/ShopApiDto.cs +++ /dev/null @@ -1,34 +0,0 @@ -using System; -using System.Collections.Generic; -using System.ComponentModel.DataAnnotations; -using ARW.Model.Models.Business.ShopManager.Shops; - -namespace ARW.Model.Dto.Api.ShopManager.Shops -{ - - /// - /// 店铺查询对象Api - /// - /// @author lwh - /// @date 2023-06-12 - /// - public class ShopQueryDtoApi : PagerInfo - { - public string ShopName { get; set; } - public int? ShopAuditStatus { get; set; } - } - - - /// - /// 店铺详情输入对象Api - /// - /// @author lwh - /// @date 2023-06-12 - /// - public class ShopDtoApi - { - [Required(ErrorMessage = "ShopGuid不能为空")] - public long ShopGuid { get; set; } - } - -} diff --git a/ARW.Model/Dto/Business/Carts/CartDto.cs b/ARW.Model/Dto/Business/Carts/CartDto.cs deleted file mode 100644 index 1396086..0000000 --- a/ARW.Model/Dto/Business/Carts/CartDto.cs +++ /dev/null @@ -1,56 +0,0 @@ -using System; -using System.Collections.Generic; -using System.ComponentModel.DataAnnotations; -using ARW.Model.Models.Business.Carts; - -namespace ARW.Model.Dto.Business.Carts -{ - /// - /// 购物车记录输入对象 - /// - /// @author lwh - /// @date 2023-07-20 - /// - public class CartDto - { - - public int CartId { get; set; } - - public long CartGuid { get; set; } - - public long ShopGuid { get; set; } - - public long GoodsGuid { get; set; } - - public int GoodsSkuId { get; set; } - - [Required(ErrorMessage = "商品数量不能为空")] - public int CartGoodsNum { get; set; } - - - - - - } - - - /// - /// 购物车记录查询对象 - /// - /// @author lwh - /// @date 2023-07-20 - /// - public class CartQueryDto : PagerInfo - { - - public long? CustomerGuid { get; set; } - - public long? ShopGuid { get; set; } - - public string ids { get; set; } - } - - - - -} diff --git a/ARW.Model/Dto/Business/Custom/CustomerAddresses/CustomerAddressDto.cs b/ARW.Model/Dto/Business/Custom/CustomerAddresses/CustomerAddressDto.cs deleted file mode 100644 index c201fd9..0000000 --- a/ARW.Model/Dto/Business/Custom/CustomerAddresses/CustomerAddressDto.cs +++ /dev/null @@ -1,68 +0,0 @@ -using System; -using System.Collections.Generic; -using System.ComponentModel.DataAnnotations; -using ARW.Model.Models.Business.Custom.CustomerAddresses; - -namespace ARW.Model.Dto.Business.Custom.CustomerAddresses -{ - /// - /// 客户收货地址输入对象 - /// - /// @author admin - /// @date 2023-06-05 - /// - public class CustomerAddressDto - { - - public int CustomerAddressId { get; set; } - - public long CustomerAddressGuid { get; set; } - - [Required(ErrorMessage = "客户guid不能为空")] - public long CustomerAddressCustomerGuid { get; set; } - - [Required(ErrorMessage = "省id不能为空")] - public int CustomerAddressProvinceId { get; set; } - - [Required(ErrorMessage = "市id不能为空")] - public int CustomerAddressCityId { get; set; } - - [Required(ErrorMessage = "区id不能为空")] - public int CustomerAddressAreaId { get; set; } - - [Required(ErrorMessage = "收货人名称不能为空")] - public string CustomerAddressName { get; set; } - - [Required(ErrorMessage = "收货电话不能为空")] - public string CustomerAddressPhone { get; set; } - - [Required(ErrorMessage = "详细地址不能为空")] - public string CustomerAddressDetailed { get; set; } - - - - - - } - - - /// - /// 客户收货地址查询对象 - /// - /// @author admin - /// @date 2023-06-05 - /// - public class CustomerAddressQueryDto : PagerInfo - { - - public string CustomerAddressName { get; set; } - - public string CustomerAddressPhone { get; set; } - - public string ids { get; set; } - } - - - - -} diff --git a/ARW.Model/Dto/Business/GoodsManager/GoodsCategorys/GoodsCategoryDto.cs b/ARW.Model/Dto/Business/GoodsManager/GoodsCategorys/GoodsCategoryDto.cs deleted file mode 100644 index 1d36f92..0000000 --- a/ARW.Model/Dto/Business/GoodsManager/GoodsCategorys/GoodsCategoryDto.cs +++ /dev/null @@ -1,67 +0,0 @@ -using System; -using System.Collections.Generic; -using System.ComponentModel.DataAnnotations; -using ARW.Model.Models.Business.GoodsManager.GoodsCategorys; - -namespace ARW.Model.Dto.Business.GoodsManager.GoodsCategorys -{ - /// - /// 商品类目输入对象 - /// - /// @author lwh - /// @date 2023-06-12 - /// - public class GoodsCategoryDto - { - - public int GoodsCategoryId { get; set; } - - public long GoodsCategoryGuid { get; set; } - - [Required(ErrorMessage = "父级guid不能为空")] - public long GoodsCategoryParentGuid { get; set; } - - public string GoodsCategoryAncestralGuid { get; set; } - - [Required(ErrorMessage = "名称不能为空")] - public string GoodsCategoryName { get; set; } - - public string GoodsCategoryImg { get; set; } - - [Required(ErrorMessage = "显示状态不能为空")] - public int GoodsCategoryDisplayStatus { get; set; } - - public int? GoodsCategoryIsPopular { get; set; } - - [Required(ErrorMessage = "排序不能为空")] - public int ProductCategorySort { get; set; } - - - - - - } - - - /// - /// 商品类目查询对象 - /// - /// @author lwh - /// @date 2023-06-12 - /// - public class GoodsCategoryQueryDto : PagerInfo - { - - public string GoodsCategoryName { get; set; } - - public int? GoodsCategoryDisplayStatus { get; set; } - - public int? GoodsCategoryIsPopular { get; set; } - - public string ids { get; set; } - } - - - - -} diff --git a/ARW.Model/Dto/Business/GoodsManager/GoodsComments/GoodsCommentDto.cs b/ARW.Model/Dto/Business/GoodsManager/GoodsComments/GoodsCommentDto.cs deleted file mode 100644 index 53ce348..0000000 --- a/ARW.Model/Dto/Business/GoodsManager/GoodsComments/GoodsCommentDto.cs +++ /dev/null @@ -1,105 +0,0 @@ -using System; -using System.Collections.Generic; -using System.ComponentModel.DataAnnotations; -using ARW.Model.Models.Business.GoodsManager.GoodsComments; - -namespace ARW.Model.Dto.Business.GoodsManager.GoodsComments -{ - /// - /// 商品评价输入对象 - /// - /// @author admin - /// @date 2023-07-15 - /// - public class GoodsCommentDto - { - - public int GoodsCommentId { get; set; } - - public long GoodsCommentGuid { get; set; } - - [Required(ErrorMessage = "店铺guid不能为空")] - public long ShopGuid { get; set; } - - [Required(ErrorMessage = "客户guid不能为空")] - public long CustomerGuid { get; set; } - - [Required(ErrorMessage = "订单guid不能为空")] - public long OrderGuid { get; set; } - - [Required(ErrorMessage = "商品guid不能为空")] - public long GoodsGuid { get; set; } - - [Required(ErrorMessage = "订单商品guid不能为空")] - public long OrderGoodsGuid { get; set; } - - [Required(ErrorMessage = "评分分数不能为空")] - public float GoodsCommentRating { get; set; } - - [Required(ErrorMessage = "评分类型不能为空")] - public int GoodsCommentRatingType { get; set; } - - [Required(ErrorMessage = "评价内容不能为空")] - public string GoodsCommentContent { get; set; } - - public string GoodsCommentImages { get; set; } - - [Required(ErrorMessage = "回复状态不能为空")] - public int GoodsCommentRecoverStatus { get; set; } - - public string GoodsCommentRecoverContent { get; set; } - - [Required(ErrorMessage = "显示状态不能为空")] - public int GoodsCommentStatus { get; set; } - - [Required(ErrorMessage = "排序不能为空")] - public int GoodsCommentSort { get; set; } - - - - - - } - - - /// - /// 商品评价查询对象 - /// - /// @author admin - /// @date 2023-07-15 - /// - public class GoodsCommentQueryDto : PagerInfo - { - - public string ShopName { get; set; } - - public string GoodsName { get; set; } - - public long? ShopGuid { get; set; } - public int? GoodsCommentRatingType { get; set; } - - public int? GoodsCommentStatus { get; set; } - - public int? GoodsCommentRecoverStatus { get; set; } - - public string ids { get; set; } - } - - - /// - /// - /// @author admin - /// @date 2023-07-17 - /// 回复对象 - /// - public class GoodsCommentRecoverDto - { - [Required(ErrorMessage = "id不能为空")] - public int GoodsCommentId { get; set; } - - [Required(ErrorMessage = "回复内容不能为空")] - public string GoodsCommentRecoverContent { get; set; } - } - - -} diff --git a/ARW.Model/Dto/Business/GoodsManager/GoodsServicess/GoodsServicesDto.cs b/ARW.Model/Dto/Business/GoodsManager/GoodsServicess/GoodsServicesDto.cs deleted file mode 100644 index 5c20737..0000000 --- a/ARW.Model/Dto/Business/GoodsManager/GoodsServicess/GoodsServicesDto.cs +++ /dev/null @@ -1,68 +0,0 @@ -using System; -using System.Collections.Generic; -using System.ComponentModel.DataAnnotations; -using ARW.Model.Models.Business.GoodsManager.GoodsServicess; - -namespace ARW.Model.Dto.Business.GoodsManager.GoodsServicess -{ - /// - /// 商品服务与承诺输入对象 - /// - /// @author lwh - /// @date 2023-06-18 - /// - public class GoodsServicesDto - { - - public int GoodsServicesId { get; set; } - - public long GoodsServicesGuid { get; set; } - - [Required(ErrorMessage = "店铺guid不能为空")] - public long ShopGuid { get; set; } - - [Required(ErrorMessage = "服务名称不能为空")] - public string GoodsServicesName { get; set; } - - public string GoodsServicesSummary { get; set; } - - [Required(ErrorMessage = "是否默认不能为空")] - public int GoodsServicesIsDefault { get; set; } - - [Required(ErrorMessage = "显示状态不能为空")] - public int GoodsServicesDisplayStatus { get; set; } - - [Required(ErrorMessage = "排序不能为空")] - public int GoodsServicesSort { get; set; } - - - - - - } - - - /// - /// 商品服务与承诺查询对象 - /// - /// @author lwh - /// @date 2023-06-18 - /// - public class GoodsServicesQueryDto : PagerInfo - { - - public long ShopGuid { get; set; } - public string ShopName { get; set; } - public string GoodsServicesName { get; set; } - - public int? GoodsServicesIsDefault { get; set; } - - public int? GoodsServicesDisplayStatus { get; set; } - - public string ids { get; set; } - } - - - - -} diff --git a/ARW.Model/Dto/Business/GoodsManager/GoodsServicess/GoodsServicesRels/GoodsServicesRelDto.cs b/ARW.Model/Dto/Business/GoodsManager/GoodsServicess/GoodsServicesRels/GoodsServicesRelDto.cs deleted file mode 100644 index a2e0ad1..0000000 --- a/ARW.Model/Dto/Business/GoodsManager/GoodsServicess/GoodsServicesRels/GoodsServicesRelDto.cs +++ /dev/null @@ -1,48 +0,0 @@ -using System.ComponentModel.DataAnnotations; - -namespace ARW.Model.Dto.Business.GoodsManager.GoodsServicess.GoodsServicesRels -{ - /// - /// 商品服务与承诺关系表输入对象 - /// - /// @author lwh - /// @date 2023-06-18 - /// - public class GoodsServicesRelDto - { - - public int Id { get; set; } - - public long Guid { get; set; } - - [Required(ErrorMessage = "店铺guid不能为空")] - public long ShopGuid { get; set; } - - [Required(ErrorMessage = "商品guid不能为空")] - public long GoodsGuid { get; set; } - - [Required(ErrorMessage = "服务与承诺guid不能为空")] - public long ServiceGuid { get; set; } - - - - - - } - - - /// - /// 商品服务与承诺关系表查询对象 - /// - /// @author lwh - /// @date 2023-06-18 - /// - public class GoodsServicesRelQueryDto : PagerInfo - { - public long GoodsGuid { get; set; } - } - - - - -} diff --git a/ARW.Model/Dto/Business/GoodsManager/GoodsSpecs/GoodsSkus/GoodsSkuDto.cs b/ARW.Model/Dto/Business/GoodsManager/GoodsSpecs/GoodsSkus/GoodsSkuDto.cs deleted file mode 100644 index cc2db03..0000000 --- a/ARW.Model/Dto/Business/GoodsManager/GoodsSpecs/GoodsSkus/GoodsSkuDto.cs +++ /dev/null @@ -1,70 +0,0 @@ -using System; -using System.Collections.Generic; -using System.ComponentModel.DataAnnotations; -using ARW.Model.Models.Business.GoodsManager.GoodsSpecs.GoodsSkus; - -namespace ARW.Model.Dto.Business.GoodsManager.GoodsSpecs.GoodsSkus -{ - /// - /// 商品规格输入对象 - /// - /// @author lwh - /// @date 2023-06-19 - /// - public class GoodsSkuDto - { - - public int GoodsSkuId { get; set; } - - [Required(ErrorMessage = "商品guid不能为空")] - public long GoodsGuid { get; set; } - - [Required(ErrorMessage = "第一规格值不能为空")] - public string SpecValue { get; set; } - - public string SpecSecondValue { get; set; } - - public string SpecThirdValue { get; set; } - - [Required(ErrorMessage = "图片不能为空")] - public string GoodsSkuImg { get; set; } - - public string GoodsSkuSkuCode { get; set; } - - [Required(ErrorMessage = "价格不能为空")] - public decimal GoodsSkuPrice { get; set; } - - [Required(ErrorMessage = "划线价格不能为空")] - public decimal GoodsSkuLinePrice { get; set; } - - [Required(ErrorMessage = "当前库存数量不能为空")] - public int GoodsSkuStockNum { get; set; } - - [Required(ErrorMessage = "商品重量(Kg)不能为空")] - public decimal GoodsSkuWeight { get; set; } - - public string GoodsSkuProps { get; set; } - - - - - - } - - - /// - /// 商品规格查询对象 - /// - /// @author lwh - /// @date 2023-06-19 - /// - public class GoodsSkuQueryDto : PagerInfo - { - - public long GoodsGuid { get; set; } - } - - - - -} diff --git a/ARW.Model/Dto/Business/GoodsManager/GoodsSpecs/GoodsSpecRels/GoodsSpecRelDto.cs b/ARW.Model/Dto/Business/GoodsManager/GoodsSpecs/GoodsSpecRels/GoodsSpecRelDto.cs deleted file mode 100644 index 7f739b2..0000000 --- a/ARW.Model/Dto/Business/GoodsManager/GoodsSpecs/GoodsSpecRels/GoodsSpecRelDto.cs +++ /dev/null @@ -1,50 +0,0 @@ -using System; -using System.Collections.Generic; -using System.ComponentModel.DataAnnotations; -using ARW.Model.Models.Business.GoodsManager.GoodsSpecs.GoodsSpecRels; - -namespace ARW.Model.Dto.Business.GoodsManager.GoodsSpecs.GoodsSpecRels -{ - /// - /// 商品与规格值关系记录输入对象 - /// - /// @author lwh - /// @date 2023-06-19 - /// - public class GoodsSpecRelDto - { - - public int GoodsSpecRelId { get; set; } - - [Required(ErrorMessage = "商品Guid不能为空")] - public long GoodsGuid { get; set; } - - [Required(ErrorMessage = "规格组ID不能为空")] - public int SpecId { get; set; } - - [Required(ErrorMessage = "规格值ID不能为空")] - public int SpecValueId { get; set; } - - - - - - } - - - /// - /// 商品与规格值关系记录查询对象 - /// - /// @author lwh - /// @date 2023-06-19 - /// - public class GoodsSpecRelQueryDto : PagerInfo - { - - public string ids { get; set; } - } - - - - -} diff --git a/ARW.Model/Dto/Business/GoodsManager/GoodsSpecs/SpecValues/SpecValueDto.cs b/ARW.Model/Dto/Business/GoodsManager/GoodsSpecs/SpecValues/SpecValueDto.cs deleted file mode 100644 index dca4649..0000000 --- a/ARW.Model/Dto/Business/GoodsManager/GoodsSpecs/SpecValues/SpecValueDto.cs +++ /dev/null @@ -1,47 +0,0 @@ -using System; -using System.Collections.Generic; -using System.ComponentModel.DataAnnotations; -using ARW.Model.Models.Business.GoodsManager.GoodsSpecs.SpecValues; - -namespace ARW.Model.Dto.Business.GoodsManager.GoodsSpecs.SpecValues -{ - /// - /// 商品规格值输入对象 - /// - /// @author lwh - /// @date 2023-06-19 - /// - public class SpecValueDto - { - - public int SpecValueId { get; set; } - - [Required(ErrorMessage = "规格组ID不能为空")] - public int SpecId { get; set; } - - [Required(ErrorMessage = "规格值名称不能为空")] - public string SpecName { get; set; } - - - - - - } - - - /// - /// 商品规格值查询对象 - /// - /// @author lwh - /// @date 2023-06-19 - /// - public class SpecValueQueryDto : PagerInfo - { - - public string ids { get; set; } - } - - - - -} diff --git a/ARW.Model/Dto/Business/GoodsManager/GoodsSpecs/Specs/SpecDto.cs b/ARW.Model/Dto/Business/GoodsManager/GoodsSpecs/Specs/SpecDto.cs deleted file mode 100644 index b79dc2f..0000000 --- a/ARW.Model/Dto/Business/GoodsManager/GoodsSpecs/Specs/SpecDto.cs +++ /dev/null @@ -1,44 +0,0 @@ -using System; -using System.Collections.Generic; -using System.ComponentModel.DataAnnotations; -using ARW.Model.Models.Business.GoodsManager.GoodsSpecs.Specs; - -namespace ARW.Model.Dto.Business.GoodsManager.GoodsSpecs.Specs -{ - /// - /// 商品规格组输入对象 - /// - /// @author lwh - /// @date 2023-06-19 - /// - public class SpecDto - { - - public int SpecId { get; set; } - - [Required(ErrorMessage = "规格值名称不能为空")] - public string SpecValueName { get; set; } - - - - - - } - - - /// - /// 商品规格组查询对象 - /// - /// @author lwh - /// @date 2023-06-19 - /// - public class SpecQueryDto : PagerInfo - { - - public string ids { get; set; } - } - - - - -} diff --git a/ARW.Model/Dto/Business/GoodsManager/Goodss/GoodsDto.cs b/ARW.Model/Dto/Business/GoodsManager/Goodss/GoodsDto.cs deleted file mode 100644 index ddb67a9..0000000 --- a/ARW.Model/Dto/Business/GoodsManager/Goodss/GoodsDto.cs +++ /dev/null @@ -1,228 +0,0 @@ -using System; -using System.Collections.Generic; -using System.ComponentModel.DataAnnotations; -using System.Reflection.Metadata.Ecma335; -using ARW.Model.Models.Business.GoodsManager.Goodss; -using Microsoft.AspNetCore.Mvc.RazorPages.Infrastructure; -using MimeKit; -using OfficeOpenXml.Attributes; - -namespace ARW.Model.Dto.Business.GoodsManager.Goodss -{ - /// - /// 商品输入对象 - /// - /// @author lwh - /// @date 2023-06-19 - /// - public class GoodsDto - { - - public int GoodsId { get; set; } - - public long GoodsGuid { get; set; } - - public long ShopGuid { get; set; } - - [Required(ErrorMessage = "商品类目guid不能为空")] - public long ShopGoodsCategoryGuid { get; set; } - - public string GoodsSkuIds { get; set; } - - public string GoodsServicesIds { get; set; } - - /// - /// 商品规格 - /// - public List GoodsSpecList { get; set; } - - - /// - /// 商品sku列表 - /// - public List SkuList { get; set; } - - - [Required(ErrorMessage = "配送模板guid不能为空")] - public long DeliveryGuid { get; set; } - - [Required(ErrorMessage = "名称不能为空")] - public string GoodsName { get; set; } - - public string GoodsCoding { get; set; } - - public string GoodsMainImageVideo { get; set; } - - public string GoodsVideoCover { get; set; } - - public string GoodsSellingPoint { get; set; } - - public int GoodsSpecType { get; set; } - - - [Required(ErrorMessage = "图片不能为空")] - public string GoodsPicture { get; set; } - - public decimal GoodsWeight { get; set; } - - public decimal GoodsPriceLowest { get; set; } - - [Required(ErrorMessage = "价格(最高)不能为空")] - public decimal GoodsPriceHighest { get; set; } - - public decimal GoodsDashedPriceLowest { get; set; } - - [Required(ErrorMessage = "划线价格(最高)不能为空")] - public decimal GoodsDashedPriceHighest { get; set; } - - [Required(ErrorMessage = "库存总量不能为空")] - public int GoodsTotalInventory { get; set; } - - [Required(ErrorMessage = "初始销量不能为空")] - public int GoodsSalesInitial { get; set; } - - public int GoodsSalesActual { get; set; } - - [Required(ErrorMessage = "详情不能为空")] - public string GoodsDetails { get; set; } - - [Required(ErrorMessage = "库存计算方式不能为空")] - public int GoodsDeductStockType { get; set; } - - [Required(ErrorMessage = "是否赠送积分不能为空")] - public int GoodsIsPointsGift { get; set; } - - [Required(ErrorMessage = "是否允许使用积分抵扣不能为空")] - public int GoodsIsPointsDiscount { get; set; } - - [Required(ErrorMessage = "积分抵扣设置不能为空")] - public int GoodsIsAlonePointsDiscount { get; set; } - - public string GoodsPointsDiscountConfig { get; set; } - - [Required(ErrorMessage = "是否开启会员折扣能为空")] - public int GoodsIsEnableGrade { get; set; } - - [Required(ErrorMessage = "会员折扣设置不能为空")] - public int GoodsIsAloneGrade { get; set; } - - public string GoodsAloneGradeEquity { get; set; } - - [Required(ErrorMessage = "上下架状态不能为空")] - public int GoodsShelfStatus { get; set; } - - [Required(ErrorMessage = "排序不能为空")] - public int GoodsSort { get; set; } - - - - - - } - - /// - /// - /// @author lwh - /// @date 2023-06-28 - /// 上下架对象 - /// - public class GoodsShelfDto - { - public int GoodsShelfStatus { get; set; } - public string ids { get; set; } - } - - - /// - /// 商品查询对象 - /// - /// @author lwh - /// @date 2023-06-19 - /// - public class GoodsQueryDto : PagerInfo - { - - public long ShopGuid { get; set; } - - public string ShopName { get; set; } - - public long? GoodsCategoryGuid { get; set; } - public long? ShopGoodsCategoryGuid { get; set; } - - public string GoodsName { get; set; } - - public string GoodsCoding { get; set; } - - public string ids { get; set; } - } - - - /// - /// 商品规格组对象 - /// - /// @author lwh - /// @date 2023-06-24 - /// - public class GoodsSpecDto - { - - public int SpecId { get; set; } - - public string SpecName { get; set; } - - public List Props { get; set; } - } - - - /// - /// 商品规格值列表对象 - /// - /// @author lwh - /// @date 2023-06-24 - /// - public class GoodsSpecValueDto - { - - public int SpecId { get; set; } - - public int SpecValueId { get; set; } - - public string SpecValueName { get; set; } - - } - - - /// - /// 商品sku列表对象 - /// - /// @author lwh - /// @date 2023-06-24 - /// - public class SkuDto - { - public int GoodsSkuId { get; set; } - - public string SpecValue{ get; set; } - - public string SpecSecondValue { get; set; } - - public string SpecThirdValue { get; set; } - - public long GoodsGuid { get; set; } - - public string GoodsSkuImg { get; set; } - - public decimal GoodsSkuPrice { get; set; } - - public decimal GoodsSkuLinePrice { get; set; } - - public int GoodsSkuStockNum { get; set; } - - public decimal GoodsSkuWeight { get; set; } - - public string GoodsSkuSkuCode { get;set; } - - } - - -} diff --git a/ARW.Model/Dto/Business/GoodsManager/ShopGoodsCategorys/ShopGoodsCategoryDto.cs b/ARW.Model/Dto/Business/GoodsManager/ShopGoodsCategorys/ShopGoodsCategoryDto.cs deleted file mode 100644 index 5ad1fc7..0000000 --- a/ARW.Model/Dto/Business/GoodsManager/ShopGoodsCategorys/ShopGoodsCategoryDto.cs +++ /dev/null @@ -1,69 +0,0 @@ -using System; -using System.Collections.Generic; -using System.ComponentModel.DataAnnotations; -using ARW.Model.Models.Business.GoodsManager.ShopGoodsCategorys; - -namespace ARW.Model.Dto.Business.GoodsManager.ShopGoodsCategorys -{ - /// - /// 店铺商品类目输入对象 - /// - /// @author lwh - /// @date 2023-06-15 - /// - public class ShopGoodsCategoryDto - { - - public int ShopGoodsCategoryId { get; set; } - - public long ShopGoodsCategoryGuid { get; set; } - - public long ShopGuid { get; set; } - - [Required(ErrorMessage = "上级类目不能为空")] - public long ShopGoodsCategoryParentGuid { get; set; } - - public string ShopGoodsCategoryAncestralGuid { get; set; } - - [Required(ErrorMessage = "名称不能为空")] - public string ShopGoodsCategoryName { get; set; } - - public string ShopGoodsCategoryImg { get; set; } - - [Required(ErrorMessage = "显示状态不能为空")] - public int ShopGoodsCategoryDisplayStatus { get; set; } - - [Required(ErrorMessage = "是否为热门不能为空")] - public int ShopGoodsCategoryIsPopular { get; set; } - - [Required(ErrorMessage = "排序不能为空")] - public int ShopGoodsCategorySort { get; set; } - - - - - - } - - - /// - /// 店铺商品类目查询对象 - /// - /// @author lwh - /// @date 2023-06-15 - /// - public class ShopGoodsCategoryQueryDto : PagerInfo - { - public long ShopGuid { get; set;} - public string ShopName { get; set; } - public string ShopGoodsCategoryName { get; set; } - - public int? ShopGoodsCategoryDisplayStatus { get; set; } - - public string ids { get; set; } - } - - - - -} diff --git a/ARW.Model/Dto/Business/LogisticsManage/DeliveryRules/DeliveryRuleDto.cs b/ARW.Model/Dto/Business/LogisticsManage/DeliveryRules/DeliveryRuleDto.cs deleted file mode 100644 index 485cfd6..0000000 --- a/ARW.Model/Dto/Business/LogisticsManage/DeliveryRules/DeliveryRuleDto.cs +++ /dev/null @@ -1,66 +0,0 @@ -using System; -using System.Collections.Generic; -using System.ComponentModel.DataAnnotations; -using ARW.Model.Models.Business.LogisticsManage.DeliveryRules; - -namespace ARW.Model.Dto.Business.LogisticsManage.DeliveryRules -{ - /// - /// 配送模板区域及运费输入对象 - /// - /// @author lwh - /// @date 2023-06-16 - /// - public class DeliveryRuleDto - { - - public int DeliveryRuleId { get; set; } - - public long DeliveryRuleGuid { get; set; } - - [Required(ErrorMessage = "配送模板guid不能为空")] - public long DeliveryGuid { get; set; } - - [Required(ErrorMessage = "可配送区域(城市id集)不能为空")] - public string DeliveryRuleRegion { get; set; } - - [Required(ErrorMessage = "可配送区域(文字展示)不能为空")] - public string DeliveryRuleRegionText { get; set; } - - [Required(ErrorMessage = "首件(个)/首重(Kg)不能为空")] - public decimal DeliveryRuleFirst { get; set; } - - [Required(ErrorMessage = "运费(元)不能为空")] - public decimal DeliveryRuleFirstFee { get; set; } - - [Required(ErrorMessage = "续件/续重不能为空")] - public decimal DeliveryRuleAdditional { get; set; } - - [Required(ErrorMessage = "续费(元)不能为空")] - public decimal DeliveryRuleAdditionalFee { get; set; } - - - - - - } - - - /// - /// 配送模板区域及运费查询对象 - /// - /// @author lwh - /// @date 2023-06-16 - /// - public class DeliveryRuleQueryDto : PagerInfo - { - - public long? DeliveryGuid { get; set; } - - public string ids { get; set; } - } - - - - -} diff --git a/ARW.Model/Dto/Business/LogisticsManage/Deliverys/DeliveryDto.cs b/ARW.Model/Dto/Business/LogisticsManage/Deliverys/DeliveryDto.cs deleted file mode 100644 index ccc6526..0000000 --- a/ARW.Model/Dto/Business/LogisticsManage/Deliverys/DeliveryDto.cs +++ /dev/null @@ -1,77 +0,0 @@ -using System; -using System.Collections.Generic; -using System.ComponentModel.DataAnnotations; -using ARW.Model.Models.Business.LogisticsManage.DeliveryRules; -using ARW.Model.Models.Business.LogisticsManage.Deliverys; - -namespace ARW.Model.Dto.Business.LogisticsManage.Deliverys -{ - /// - /// 配送模板输入对象 - /// - /// @author lwh - /// @date 2023-06-16 - /// - public class DeliveryDto - { - - public int DeliveryId { get; set; } - - public long DeliveryGuid { get; set; } - - [Required(ErrorMessage = "店铺guid不能为空")] - public long ShopGuid { get; set; } - - [Required(ErrorMessage = "模板名称不能为空")] - public string DeliveryName { get; set; } - - [Required(ErrorMessage = "计费方式不能为空")] - public int DeliveryBillingMethod { get; set; } - - [Required(ErrorMessage = "配送区域及运费不能为空")] - public List DeliveryRuleDataList { get; set; } - - [Required(ErrorMessage = "排序不能为空")] - public int DeliverySort { get; set; } - - - - - - } - - - /// - /// 配送模板查询对象 - /// - /// @author lwh - /// @date 2023-06-16 - /// - public class DeliveryQueryDto : PagerInfo - { - - public long? ShopGuid { get; set; } - public string ShopName { get; set; } - - public string DeliveryName { get; set; } - - public int? DeliveryBillingMethod { get; set; } - - public string ids { get; set; } - } - - - /// - /// 配送模板的配送区域和运费查询对象 - /// - /// @author lwh - /// @date 2023-06-16 - /// - public class DeliveryRuleEditDto - { - public long DeliveryGuid { get; set; } - } - - - -} diff --git a/ARW.Model/Dto/Business/LogisticsManage/LogisticsCompanys/LogisticsCompanyDto.cs b/ARW.Model/Dto/Business/LogisticsManage/LogisticsCompanys/LogisticsCompanyDto.cs deleted file mode 100644 index 810baff..0000000 --- a/ARW.Model/Dto/Business/LogisticsManage/LogisticsCompanys/LogisticsCompanyDto.cs +++ /dev/null @@ -1,56 +0,0 @@ -using System; -using System.Collections.Generic; -using System.ComponentModel.DataAnnotations; -using ARW.Model.Models.Business.LogisticsManage.LogisticsCompanys; - -namespace ARW.Model.Dto.Business.LogisticsManage.LogisticsCompanys -{ - /// - /// 物流公司输入对象 - /// - /// @author lwh - /// @date 2023-06-18 - /// - public class LogisticsCompanyDto - { - - public int LogisticsCompanyId { get; set; } - - public long LogisticsCompanyGuid { get; set; } - - [Required(ErrorMessage = "物流公司名称不能为空")] - public string LogisticsCompanyName { get; set; } - - [Required(ErrorMessage = "物流公司编码不能为空")] - public string LogisticsCompanyCode { get; set; } - - [Required(ErrorMessage = "排序不能为空")] - public int LogisticsCompanySort { get; set; } - - - - - - } - - - /// - /// 物流公司查询对象 - /// - /// @author lwh - /// @date 2023-06-18 - /// - public class LogisticsCompanyQueryDto : PagerInfo - { - - public string LogisticsCompanyName { get; set; } - - public string LogisticsCompanyCode { get; set; } - - public string ids { get; set; } - } - - - - -} diff --git a/ARW.Model/Dto/Business/Marketing/CouponManage/Coupons/CouponDto.cs b/ARW.Model/Dto/Business/Marketing/CouponManage/Coupons/CouponDto.cs deleted file mode 100644 index 4785a00..0000000 --- a/ARW.Model/Dto/Business/Marketing/CouponManage/Coupons/CouponDto.cs +++ /dev/null @@ -1,101 +0,0 @@ -using System; -using System.Collections.Generic; -using System.ComponentModel.DataAnnotations; -using ARW.Model.Models.Business.Marketing.CouponManage.Coupons; -using MimeKit; -using OfficeOpenXml.Attributes; -using SqlSugar; - -namespace ARW.Model.Dto.Business.Marketing.CouponManage.Coupons -{ - /// - /// 优惠券输入对象 - /// - /// @author lwh - /// @date 2023-07-24 - /// - public class CouponDto - { - - public int CouponId { get; set; } - - public long CouponGuid { get; set; } - - public long ShopGuid { get; set; } - - - [Required(ErrorMessage = "优惠劵名称不能为空")] - public string CouponName { get; set; } - - [Required(ErrorMessage = "优惠劵介绍不能为空")] - public string CouponDesc { get; set; } - public string CouponUseIntro { get; set; } - - [Required(ErrorMessage = "优惠劵类型不能为空")] - public int CouponType { get; set; } - - public decimal CouponDeductionMoney { get; set; } - - public byte CouponDiscountRate { get; set; } - - [Required(ErrorMessage = "最低消费金额不能为空")] - public decimal CouponMinConsumeMoney { get; set; } - - [Required(ErrorMessage = "到期类型不能为空")] - public int CouponExpireType { get; set; } - - public int? CouponEffectiveDays { get; set; } - - public DateTime CouponFixedStartTime { get; set; } - - public DateTime CouponFixedEndTime { get; set; } - - public int? CouponApplicableScope { get; set; } - - - [Required(ErrorMessage = "发送数量(-1不限制)不能为空")] - public int CouponSendNumber { get; set; } - - public int? CouponGetNumber { get; set; } - - [Required(ErrorMessage = "显示状态不能为空")] - public int CouponDisplayStatus { get; set; } - - [Required(ErrorMessage = "排序不能为空")] - public int CouponSort { get; set; } - - public string CouponApplicableScopeConfig { get; set; } - public string CouponGoodsIds { get; set; } - - - - - } - - - /// - /// 优惠券查询对象 - /// - /// @author lwh - /// @date 2023-07-24 - /// - public class CouponQueryDto : PagerInfo - { - public long ShopGuid { get; set; } - public string CouponName { get; set; } - - public int? CouponType { get; set; } - - public int? CouponExpireType { get; set; } - - public int? CouponApplicableScope { get; set; } - - public int? CouponDisplayStatus { get; set; } - - public string ids { get; set; } - } - - - - -} diff --git a/ARW.Model/Dto/Business/Marketing/CouponManage/CustomerCoupons/CustomerCouponDto.cs b/ARW.Model/Dto/Business/Marketing/CouponManage/CustomerCoupons/CustomerCouponDto.cs deleted file mode 100644 index f6e818f..0000000 --- a/ARW.Model/Dto/Business/Marketing/CouponManage/CustomerCoupons/CustomerCouponDto.cs +++ /dev/null @@ -1,56 +0,0 @@ -using System; -using System.Collections.Generic; -using System.ComponentModel.DataAnnotations; -using ARW.Model.Models.Business.Marketing.CouponManage.CustomerCoupons; - -namespace ARW.Model.Dto.Business.Marketing.CouponManage.CustomerCoupons -{ - /// - /// 领券记录输入对象 - /// - /// @author lwh - /// @date 2023-07-31 - /// - public class CustomerCouponDto - { - - public int CustomerCouponId { get; set; } - - public long CustomerCouponGuid { get; set; } - - [Required(ErrorMessage = "优惠劵guid不能为空")] - public long CouponGuid { get; set; } - - public long CustomerGuid { get; set; } - - public int CustomerCouponIsExpired { get; set; } - - public int CustomerCouponIsUsed { get; set; } - - - - - - } - - - /// - /// 领券记录查询对象 - /// - /// @author lwh - /// @date 2023-07-31 - /// - public class CustomerCouponQueryDto : PagerInfo - { - - public int? CustomerCouponIsExpired { get; set; } - - public int? CustomerCouponIsUsed { get; set; } - - public string ids { get; set; } - } - - - - -} diff --git a/ARW.Model/Dto/Business/OrderManage/OrderCustomerAddreses/OrderCustomerAddressDto.cs b/ARW.Model/Dto/Business/OrderManage/OrderCustomerAddreses/OrderCustomerAddressDto.cs deleted file mode 100644 index a6aa754..0000000 --- a/ARW.Model/Dto/Business/OrderManage/OrderCustomerAddreses/OrderCustomerAddressDto.cs +++ /dev/null @@ -1,70 +0,0 @@ -using System; -using System.Collections.Generic; -using System.ComponentModel.DataAnnotations; -using ARW.Model.Models.Business.OrderManage.OrderCustomerAddreses; - -namespace ARW.Model.Dto.Business.OrderManage.OrderCustomerAddreses -{ - /// - /// 订单收货地址记录输入对象 - /// - /// @author lwh - /// @date 2023-08-29 - /// - public class OrderCustomerAddressDto - { - - public int OrderCustomerAddressId { get; set; } - - public long OrderCustomerAddressGuid { get; set; } - - [Required(ErrorMessage = "订单guid不能为空")] - public long OrderGuid { get; set; } - - [Required(ErrorMessage = "客户guid不能为空")] - public long CustomerGuid { get; set; } - - [Required(ErrorMessage = "客户地址guid不能为空")] - public long CustomerAddressGuid { get; set; } - - [Required(ErrorMessage = "收货人姓名不能为空")] - public string ConsigneeName { get; set; } - - [Required(ErrorMessage = "联系电话不能为空")] - public string Phont { get; set; } - - [Required(ErrorMessage = "省份ID不能为空")] - public int ProvinceId { get; set; } - - [Required(ErrorMessage = "城市ID不能为空")] - public int CityId { get; set; } - - [Required(ErrorMessage = "区/县ID不能为空")] - public int RegionId { get; set; } - - [Required(ErrorMessage = "详细地址不能为空")] - public string Detail { get; set; } - - - - - - } - - - /// - /// 订单收货地址记录查询对象 - /// - /// @author lwh - /// @date 2023-08-29 - /// - public class OrderCustomerAddressQueryDto : PagerInfo - { - - public string ids { get; set; } - } - - - - -} diff --git a/ARW.Model/Dto/Business/OrderManage/OrderGoodss/OrderGoodsDto.cs b/ARW.Model/Dto/Business/OrderManage/OrderGoodss/OrderGoodsDto.cs deleted file mode 100644 index 1915915..0000000 --- a/ARW.Model/Dto/Business/OrderManage/OrderGoodss/OrderGoodsDto.cs +++ /dev/null @@ -1,60 +0,0 @@ -using System; -using System.Collections.Generic; -using System.ComponentModel.DataAnnotations; -using ARW.Model.Models.Business.OrderManage.OrderGoodss; - -namespace ARW.Model.Dto.Business.OrderManage.OrderGoodss -{ - /// - /// 订单商品记录输入对象 - /// - /// @author lwh - /// @date 2023-09-01 - /// - public class OrderGoodsDto - { - - public int OrderGoodsId { get; set; } - - public long OrderGoodsGuid { get; set; } - - [Required(ErrorMessage = "订单guid不能为空")] - public long OrderGuid { get; set; } - - [Required(ErrorMessage = "商品guid不能为空")] - public long GoodsGuid { get; set; } - - public int? GoodsSkuId { get; set; } - - [Required(ErrorMessage = "商品单价不能为空")] - public decimal GoodsPrice { get; set; } - - [Required(ErrorMessage = "商品购买数量不能为空")] - public int GoodsTotalNum { get; set; } - - [Required(ErrorMessage = "商品总额(单价 × 数量)不能为空")] - public decimal GoodsTotalAmoun { get; set; } - - - - - - } - - - /// - /// 订单商品记录查询对象 - /// - /// @author lwh - /// @date 2023-09-01 - /// - public class OrderGoodsQueryDto : PagerInfo - { - - public string ids { get; set; } - } - - - - -} diff --git a/ARW.Model/Dto/Business/OrderManage/OrderRefunds/OrderRefundAuditDto.cs b/ARW.Model/Dto/Business/OrderManage/OrderRefunds/OrderRefundAuditDto.cs deleted file mode 100644 index 0ce6825..0000000 --- a/ARW.Model/Dto/Business/OrderManage/OrderRefunds/OrderRefundAuditDto.cs +++ /dev/null @@ -1,31 +0,0 @@ -using System; -using System.Collections.Generic; -using System.ComponentModel.DataAnnotations; -using ARW.Model.Models.Business.OrderManage.OrderRefunds; - -namespace ARW.Model.Dto.Business.OrderManage.OrderRefunds -{ - /// - /// 售后单记录表输入对象 - /// - /// @author lwh - /// @date 2023-10-17 - /// - public class OrderRefundAuditDto - { - - public int OrderRefundId { get; set; } - - [Required(ErrorMessage = "售后单guid不能为空!")] - public long OrderRefundGuid { get; set; } - - - public bool IsAgree { get; set; } - - public string MerchantRefuseDesc { get; set; } - - public long? ShopAddressGuid { get; set; } - - } - -} diff --git a/ARW.Model/Dto/Business/OrderManage/OrderRefunds/OrderRefundDetailsDto.cs b/ARW.Model/Dto/Business/OrderManage/OrderRefunds/OrderRefundDetailsDto.cs deleted file mode 100644 index 721d551..0000000 --- a/ARW.Model/Dto/Business/OrderManage/OrderRefunds/OrderRefundDetailsDto.cs +++ /dev/null @@ -1,20 +0,0 @@ -using System; -using System.Collections.Generic; -using System.ComponentModel.DataAnnotations; -using ARW.Model.Models.Business.OrderManage.OrderRefunds; - -namespace ARW.Model.Dto.Business.OrderManage.OrderRefunds -{ - /// - /// 售后单详情记录表输入对象 - /// - /// @author lwh - /// @date 2023-10-16 - /// - public class OrderRefundDetailsDto - { - public int OrderRefundId { get; set; } - public long OrderRefundGuid { get; set; } - } - -} diff --git a/ARW.Model/Dto/Business/OrderManage/OrderRefunds/OrderRefundDto.cs b/ARW.Model/Dto/Business/OrderManage/OrderRefunds/OrderRefundDto.cs deleted file mode 100644 index a2c179d..0000000 --- a/ARW.Model/Dto/Business/OrderManage/OrderRefunds/OrderRefundDto.cs +++ /dev/null @@ -1,100 +0,0 @@ -using System; -using System.Collections.Generic; -using System.ComponentModel.DataAnnotations; -using ARW.Model.Models.Business.OrderManage.OrderRefunds; - -namespace ARW.Model.Dto.Business.OrderManage.OrderRefunds -{ - /// - /// 售后单记录表输入对象 - /// - /// @author lwh - /// @date 2023-08-29 - /// - public class OrderRefundDto - { - - public int OrderRefundId { get; set; } - - public long OrderRefundGuid { get; set; } - - [Required(ErrorMessage = "订单guid不能为空")] - public long OrderGuid { get; set; } - - [Required(ErrorMessage = "客户guid不能为空")] - public long CustomerGuid { get; set; } - - [Required(ErrorMessage = "售后类型(1退货退款 2退货(无需退款) 3换货)不能为空")] - public int RefundType { get; set; } - - [Required(ErrorMessage = "客户退货原因不能为空")] - public int RefundReason { get; set; } - - public string CustomerRefundDesc { get; set; } - - public string CustomerRefundImg { get; set; } - - [Required(ErrorMessage = "商品收货状态(1未收到货 2已收到货)不能为空")] - public int GoodsReceiveStatus { get; set; } - - [Required(ErrorMessage = "商家审核状态(1待审核 2已同意 3已拒绝)不能为空")] - public int MerchantAuditStatus { get; set; } - - public string MerchantRefuseDesc { get; set; } - - [Required(ErrorMessage = "实际退款金额不能为空")] - public decimal RefundMoney { get; set; } - - public long? ShopRefundAddressGuid { get; set; } - - [Required(ErrorMessage = "用户是否发货(1未发货 2已发货)不能为空")] - public int IsCustomerSend { get; set; } - - public DateTime? CustomerSendTime { get; set; } - - public long? LogisticsCompanyGuid { get; set; } - - public string ExpressNo { get; set; } - - [Required(ErrorMessage = "售后单状态(1进行中 2已拒绝 3已完成 4已取消)不能为空")] - public int OrderRefundStatus { get; set; } - - - - - - } - - - /// - /// 售后单记录表查询对象 - /// - /// @author lwh - /// @date 2023-08-29 - /// - public class OrderRefundQueryDto : PagerInfo - { - public long ShopGuid { get; set; } - public int? RefundType { get; set; } - - public int? RefundReason { get; set; } - - public int? GoodsReceiveStatus { get; set; } - - public int? MerchantAuditStatus { get; set; } - - public int? IsCustomerSend { get; set; } - - public int? OrderRefundStatus { get; set; } - - public string ids { get; set; } - - public DateTime BeginTime { get; set; } - - public DateTime EndTime { get; set; } - } - - - - -} diff --git a/ARW.Model/Dto/Business/OrderManage/Orders/OrderCancelOrderDto.cs b/ARW.Model/Dto/Business/OrderManage/Orders/OrderCancelOrderDto.cs deleted file mode 100644 index ec06044..0000000 --- a/ARW.Model/Dto/Business/OrderManage/Orders/OrderCancelOrderDto.cs +++ /dev/null @@ -1,22 +0,0 @@ -using System; -using System.Collections.Generic; -using System.ComponentModel.DataAnnotations; -using ARW.Model.Models.Business.OrderManage.Orders; - -namespace ARW.Model.Dto.Business.OrderManage.Orders -{ - /// - /// 审核取消订单输入对象 - /// - /// @author lwh - /// @date 2023-08-29 - /// - public class OrderCancelOrderDto - { - public long OrderGuid { get; set; } - - public bool IsAgree { get; set; } - - } - -} diff --git a/ARW.Model/Dto/Business/OrderManage/Orders/OrderChangePriceDto.cs b/ARW.Model/Dto/Business/OrderManage/Orders/OrderChangePriceDto.cs deleted file mode 100644 index d74dc70..0000000 --- a/ARW.Model/Dto/Business/OrderManage/Orders/OrderChangePriceDto.cs +++ /dev/null @@ -1,24 +0,0 @@ -using System; -using System.Collections.Generic; -using System.ComponentModel.DataAnnotations; -using ARW.Model.Models.Business.OrderManage.Orders; - -namespace ARW.Model.Dto.Business.OrderManage.Orders -{ - /// - /// 订单改价输入对象 - /// - /// @author lwh - /// @date 2023-08-29 - /// - public class OrderChangePriceDto - { - public long OrderGuid { get; set; } - - public decimal OrderAmount { get; set; } - - public decimal ExpressPrice { get; set; } - - } - -} diff --git a/ARW.Model/Dto/Business/OrderManage/Orders/OrderDeliverDto.cs b/ARW.Model/Dto/Business/OrderManage/Orders/OrderDeliverDto.cs deleted file mode 100644 index 2f7124c..0000000 --- a/ARW.Model/Dto/Business/OrderManage/Orders/OrderDeliverDto.cs +++ /dev/null @@ -1,26 +0,0 @@ -using System; -using System.Collections.Generic; -using System.ComponentModel.DataAnnotations; -using ARW.Model.Models.Business.OrderManage.Orders; - -namespace ARW.Model.Dto.Business.OrderManage.Orders -{ - /// - /// 订单发货输入对象 - /// - /// @author lwh - /// @date 2023-08-29 - /// - public class OrderDeliverDto - { - public long OrderGuid { get; set; } - - public long? LogisticsCompanyGuid { get; set; } - - public string LogisticsCompany { get; set; } - - public string LogisticsTrackingNumber { get; set; } - - } - -} diff --git a/ARW.Model/Dto/Business/OrderManage/Orders/OrderDto.cs b/ARW.Model/Dto/Business/OrderManage/Orders/OrderDto.cs deleted file mode 100644 index cb50764..0000000 --- a/ARW.Model/Dto/Business/OrderManage/Orders/OrderDto.cs +++ /dev/null @@ -1,155 +0,0 @@ -using System; -using System.Collections.Generic; -using System.ComponentModel.DataAnnotations; -using ARW.Model.Models.Business.OrderManage.Orders; - -namespace ARW.Model.Dto.Business.OrderManage.Orders -{ - /// - /// 订单输入对象 - /// - /// @author lwh - /// @date 2023-08-29 - /// - public class OrderDto - { - - public int OrderId { get; set; } - - public long OrderGuid { get; set; } - - [Required(ErrorMessage = "商品guid不能为空")] - public long GoodsGuid { get; set; } - - [Required(ErrorMessage = "订单流水guid不能为空")] - public long PaymentGuid { get; set; } - - [Required(ErrorMessage = "客户guid不能为空")] - public long CustomerGuid { get; set; } - - public long? ShopGuid { get; set; } - - [Required(ErrorMessage = "订单号不能为空")] - public string OrderNumber { get; set; } - - [Required(ErrorMessage = "商品总金额不能为空")] - public decimal GoodsTotalAmoun { get; set; } - - [Required(ErrorMessage = "订单金额不能为空")] - public decimal OrderAmount { get; set; } - - public long? CouponGuid { get; set; } - - public decimal CouponMoney { get; set; } - - public decimal PointsMoney { get; set; } - - public decimal PointsNum { get; set; } - - [Required(ErrorMessage = "实际付款金额(包含运费)不能为空")] - public decimal PayPrice { get; set; } - - public decimal UpdatePrice { get; set; } - - public string OrderRemark { get; set; } - - [Required(ErrorMessage = "支付方式(1微信支付 2余额支付)不能为空")] - public int PayType { get; set; } - - [Required(ErrorMessage = "付款状态(1未付款 2已付款)不能为空")] - public int PayStatus { get; set; } - - [Required(ErrorMessage = "付款时间不能为空")] - public DateTime? PayTime { get; set; } - - [Required(ErrorMessage = "配送方式(1快递配送)不能为空")] - public int DeliveryType { get; set; } - - [Required(ErrorMessage = "运费金额不能为空")] - public decimal ExpressPrice { get; set; } - - public long? LogisticsCompanyGuid { get; set; } - - public string LogisticsCompany { get; set; } - - public string LogisticsTrackingNumber { get; set; } - - [Required(ErrorMessage = "发货状态(1未发货 2已发货)不能为空")] - public int DeliveryStatus { get; set; } - - public DateTime? DeliveryTime { get; set; } - - [Required(ErrorMessage = "收货状态(1未收货 2已收货)不能为空")] - public int ReceiptStatus { get; set; } - - public DateTime? ReceiptTime { get; set; } - - [Required(ErrorMessage = "订单状态(1进行中 2取消 3待取消 4已完成)不能为空")] - public int OrderStatus { get; set; } - - public decimal PointsBonus { get; set; } - - [Required(ErrorMessage = "订单是否已结算(1未结算 2已结算)不能为空")] - public int IsSettled { get; set; } - - public string TransactionId { get; set; } - - [Required(ErrorMessage = "是否已评价(1否 2是)不能为空")] - public int IsComment { get; set; } - - [Required(ErrorMessage = "订单来源(1普通订单)不能为空")] - public int OrderSource { get; set; } - - - - - - } - - - /// - /// 订单查询对象 - /// - /// @author lwh - /// @date 2023-08-29 - /// - public class OrderQueryDto : PagerInfo - { - - public long ShopGuid { get; set; } - public string OrderNumber { get; set; } - - public int? PayType { get; set; } - - public int? PayStatus { get; set; } - - public int? DeliveryType { get; set; } - - public string LogisticsTrackingNumber { get; set; } - - public int? DeliveryStatus { get; set; } - - public int? ReceiptStatus { get; set; } - - 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; } - - } - - - public class OrderDetailDto - { - - public int OrderId { get; set; } - } - -} diff --git a/ARW.Model/Dto/Business/OrderTasks/OrderTaskDto.cs b/ARW.Model/Dto/Business/OrderTasks/OrderTaskDto.cs deleted file mode 100644 index 7027af7..0000000 --- a/ARW.Model/Dto/Business/OrderTasks/OrderTaskDto.cs +++ /dev/null @@ -1,60 +0,0 @@ -using System; -using System.Collections.Generic; -using System.ComponentModel.DataAnnotations; -using ARW.Model.Models.Business.OrderTasks; - -namespace ARW.Model.Dto.Business.OrderTasks -{ - /// - /// 订单取消任务输入对象 - /// - /// @author lwh - /// @date 2023-10-23 - /// - public class OrderTaskDto - { - - public int OrderTaskId { get; set; } - - public long OrderTaskGuid { get; set; } - - [Required(ErrorMessage = "客户guid(外键)不能为空")] - public long CustomerGuid { get; set; } - - [Required(ErrorMessage = "订单guid(外键)不能为空")] - public long OrderGuid { get; set; } - - [Required(ErrorMessage = "订单结束时间不能为空")] - public DateTime? EndTime { get; set; } - - [Required(ErrorMessage = "订单支付状态(1未支付 2已支付)不能为空")] - public int PayStatus { get; set; } - - [Required(ErrorMessage = "订单取消状态(1待取消 2已取消)不能为空")] - public int CancelStatus { get; set; } - - public string ErrorMsg { get; set; } - - - - - - } - - - /// - /// 订单取消任务查询对象 - /// - /// @author lwh - /// @date 2023-10-23 - /// - public class OrderTaskQueryDto : PagerInfo - { - - public string ids { get; set; } - } - - - - -} diff --git a/ARW.Model/Dto/Business/ShopManager/ShopAddresss/ShopAddressDto.cs b/ARW.Model/Dto/Business/ShopManager/ShopAddresss/ShopAddressDto.cs deleted file mode 100644 index a09d874..0000000 --- a/ARW.Model/Dto/Business/ShopManager/ShopAddresss/ShopAddressDto.cs +++ /dev/null @@ -1,73 +0,0 @@ -using System; -using System.Collections.Generic; -using System.ComponentModel.DataAnnotations; -using ARW.Model.Models.Business.ShopManager.ShopAddresss; -using Infrastructure; - -namespace ARW.Model.Dto.Business.ShopManager.ShopAddresss -{ - /// - /// 店铺地址输入对象 - /// - /// @author lwh - /// @date 2023-06-15 - /// - public class ShopAddressDto - { - - public int ShopAddressId { get; set; } - - public long ShopAddressGuid { get; set; } - - public long ShopGuid { get; set; } - - - [Required(ErrorMessage = "地址类型不能为空")] - public int ShopAddressType { get; set; } - - [Required(ErrorMessage = "省id不能为空")] - public int ProvinceId { get; set; } - - [Required(ErrorMessage = "市id不能为空")] - public int CityId { get; set; } - - [Required(ErrorMessage = "区id不能为空")] - public int DistrictId { get; set; } - - [Required(ErrorMessage = "联系人姓名不能为空")] - public string ShopAddressContactName { get; set; } - - [Required(ErrorMessage = "联系电话不能为空")] - public string ShopAddressContactNumber { get; set; } - - [Required(ErrorMessage = "详细地址不能为空")] - public string ShopAddressDetailedAddress { get; set; } - - [Required(ErrorMessage = "排序不能为空")] - public int ShopAddressSort { get; set; } - - - - - - } - - - /// - /// 店铺地址查询对象 - /// - /// @author lwh - /// @date 2023-06-15 - /// - public class ShopAddressQueryDto : PagerInfo - { - public long ShopGuid { get; set; } - public int? ShopAddressType { get; set; } - - public string ids { get; set; } - } - - - - -} diff --git a/ARW.Model/Dto/Business/ShopManager/Shops/ShopDto.cs b/ARW.Model/Dto/Business/ShopManager/Shops/ShopDto.cs deleted file mode 100644 index 4625b5a..0000000 --- a/ARW.Model/Dto/Business/ShopManager/Shops/ShopDto.cs +++ /dev/null @@ -1,147 +0,0 @@ -using System; -using System.Collections.Generic; -using System.ComponentModel.DataAnnotations; -using ARW.Model.Models.Business.ShopManager.Shops; -using MimeKit; -using OfficeOpenXml.Attributes; -using SqlSugar; - -namespace ARW.Model.Dto.Business.ShopManager.Shops -{ - /// - /// 店铺输入对象 - /// - /// @author lwh - /// @date 2023-06-09 - /// - public class ShopDto - { - - public int ShopId { get; set; } - - public long ShopGuid { get; set; } - - public int? ShopUserId { get; set; } - - public long? ShopCustomerGuid { get; set; } - - [Required(ErrorMessage = "经营类目guid不能为空")] - public long ShopBusinessCategoryGuid { get; set; } - - [Required(ErrorMessage = "图标不能为空")] - public string ShopLogo { get; set; } - - [Required(ErrorMessage = "营业执照不能为空")] - public string ShopBusinessLicense { get; set; } - - [Required(ErrorMessage = "名称不能为空")] - public string ShopName { get; set; } - - [Required(ErrorMessage = "简介不能为空")] - public string ShopIntro { get; set; } - - public int ShopSort { get; set; } - - public int ShopSalesOrderCount { get; set; } - - public int ShopAuditStatus { get; set; } - - public long ShopAuditUserGuid { get; set; } - - - - - - } - - - /// - /// 店铺查询对象 - /// - /// @author lwh - /// @date 2023-06-09 - /// - public class ShopQueryDto : PagerInfo - { - - public string ShopName { get; set; } - - public int? ShopAuditStatus { get; set; } - - public string ids { get; set; } - } - - - /// - /// - /// @author lwh - /// @date 2023-06-09 - /// 审核对象 - /// - public class ShopAuditDto - { - public int ShopAuditStatus { get; set; } - public string ids { get; set; } - } - - - /// - /// 未绑定的用户查询对象 - /// - /// @author lwh - /// @date 2023-06-09 - /// - public class UserWithOutBindQueryDto : PagerInfo - { - - public string UserName { get; set; } - - } - - - /// - /// 未绑定的客户查询对象 - /// - /// @author lwh - /// @date 2023-06-09 - /// - public class CustomerWithOutBindQueryDto : PagerInfo - { - - public string CustomerNickname { get; set; } - - } - - - - /// - /// 商户店铺查询对象 - /// - /// @author lwh - /// @date 2023-06-09 - /// - public class ShopOperatorQueryDto - { - public long ShopGuid { get; set; } - - } - - - /// - /// 商户店铺编辑对象 - /// - /// @author lwh - /// @date 2023-06-09 - /// - public class ShopOperatorEditDto - { - public long ShopGuid { get; set; } - - public string ShopLogo { get; set; } - - public string ShopName { get; set; } - - public string ShopIntro { get; set; } - } - -} diff --git a/ARW.Model/Models/Business/Carts/Cart.cs b/ARW.Model/Models/Business/Carts/Cart.cs deleted file mode 100644 index 3d9a60b..0000000 --- a/ARW.Model/Models/Business/Carts/Cart.cs +++ /dev/null @@ -1,88 +0,0 @@ -using System; -using System.Collections.Generic; -using SqlSugar; -using OfficeOpenXml.Attributes; -using Newtonsoft.Json; - -namespace ARW.Model.Models.Business.Carts -{ - /// - /// 购物车记录,数据实体对象 - /// - /// @author lwh - /// @date 2023-07-20 - /// - [SugarTable("tb_cart")] - public class Cart : BusinessBase - { - - /// - /// 描述 : - /// 空值 : false - /// - [SugarColumn(IsPrimaryKey = true, IsIdentity = true, ColumnName = "cart_id")] - public int CartId { get; set; } - - - /// - /// 描述 : - /// 空值 : false - /// - [JsonConverter(typeof(ValueToStringConverter))] - [SugarColumn(IsPrimaryKey = true, IsIdentity = false, ColumnName = "cart_guid")] - public long CartGuid { get; set; } - - - /// - /// 描述 :客户Guid - /// 空值 : false - /// - [JsonConverter(typeof(ValueToStringConverter))] - [SugarColumn(ColumnName = "customer_guid")] - public long CustomerGuid { get; set; } - - - /// - /// 描述 :店铺Guid - /// 空值 : false - /// - [JsonConverter(typeof(ValueToStringConverter))] - [SugarColumn(ColumnName = "shop_guid")] - public long ShopGuid { get; set; } - - - /// - /// 描述 :商品Guid - /// 空值 : false - /// - [SugarColumn(ColumnName = "goods_guid")] - public long GoodsGuid { get; set; } - - - /// - /// 描述 :商品sku唯一标识 - /// 空值 : false - /// - [SugarColumn(ColumnName = "goods_sku_id")] - public int GoodsSkuId { get; set; } - - - /// - /// 描述 :商品数量 - /// 空值 : false - /// - [SugarColumn(ColumnName = "cart_goods_num")] - public int CartGoodsNum { get; set; } - - - - /// - /// 描述 :是否选中 - /// 空值 : false - /// - [SugarColumn(ColumnName = "is_selected")] - public bool IsSelected { get; set; } - - - } -} \ No newline at end of file diff --git a/ARW.Model/Models/Business/Custom/CustomerAddresses/CustomerAddress.cs b/ARW.Model/Models/Business/Custom/CustomerAddresses/CustomerAddress.cs deleted file mode 100644 index ac2f0d4..0000000 --- a/ARW.Model/Models/Business/Custom/CustomerAddresses/CustomerAddress.cs +++ /dev/null @@ -1,107 +0,0 @@ -using System; -using System.Collections.Generic; -using SqlSugar; -using OfficeOpenXml.Attributes; -using Newtonsoft.Json; - -namespace ARW.Model.Models.Business.Custom.CustomerAddresses -{ - /// - /// 客户收货地址,数据实体对象 - /// - /// @author admin - /// @date 2023-06-05 - /// - [SugarTable("tb_customer_address")] - public class CustomerAddress : BusinessBase - { - - /// - /// 描述 : - /// 空值 : false - /// - [EpplusTableColumn(Header = "CustomerAddressId")] - [SugarColumn(IsPrimaryKey = true, IsIdentity = true, ColumnName = "customer_address_id")] - public int CustomerAddressId { get; set; } - - - /// - /// 描述 : - /// 空值 : false - /// - [EpplusTableColumn(Header = "CustomerAddressGuid")] - [JsonConverter(typeof(ValueToStringConverter))] - [SugarColumn(IsPrimaryKey = true, IsIdentity = false, ColumnName = "customer_address_guid")] - public long CustomerAddressGuid { get; set; } - - - /// - /// 描述 :客户guid - /// 空值 : false - /// - [EpplusTableColumn(Header = "客户guid")] - [JsonConverter(typeof(ValueToStringConverter))] - [SugarColumn(ColumnName = "customer_address_customer_guid")] - public long CustomerAddressCustomerGuid { get; set; } - - - /// - /// 描述 :省id - /// 空值 : false - /// - [EpplusTableColumn(Header = "省id")] - [SugarColumn(ColumnName = "customer_address_province_id")] - public int CustomerAddressProvinceId { get; set; } - - - /// - /// 描述 :市id - /// 空值 : false - /// - [EpplusTableColumn(Header = "市id")] - [SugarColumn(ColumnName = "customer_address_city_id")] - public int CustomerAddressCityId { get; set; } - - - /// - /// 描述 :区id - /// 空值 : false - /// - [EpplusTableColumn(Header = "区id")] - [SugarColumn(ColumnName = "customer_address_area_id")] - public int CustomerAddressAreaId { get; set; } - - - /// - /// 描述 :收货人名称 - /// 空值 : false - /// - [EpplusTableColumn(Header = "收货人名称")] - [SugarColumn(ColumnName = "customer_address_name")] - public string CustomerAddressName { get; set; } - - - /// - /// 描述 :收货电话 - /// 空值 : false - /// - [EpplusTableColumn(Header = "收货电话")] - [SugarColumn(ColumnName = "customer_address_phone")] - public string CustomerAddressPhone { get; set; } - - - /// - /// 描述 :详细地址 - /// 空值 : false - /// - [EpplusTableColumn(Header = "详细地址")] - [SugarColumn(ColumnName = "customer_address_detailed")] - public string CustomerAddressDetailed { get; set; } - - - - - - - } -} \ No newline at end of file diff --git a/ARW.Model/Models/Business/GoodsManager/GoodsCategorys/GoodsCategory.cs b/ARW.Model/Models/Business/GoodsManager/GoodsCategorys/GoodsCategory.cs deleted file mode 100644 index 1b30aee..0000000 --- a/ARW.Model/Models/Business/GoodsManager/GoodsCategorys/GoodsCategory.cs +++ /dev/null @@ -1,111 +0,0 @@ -using System; -using System.Collections.Generic; -using SqlSugar; -using OfficeOpenXml.Attributes; -using Newtonsoft.Json; - -namespace ARW.Model.Models.Business.GoodsManager.GoodsCategorys -{ - /// - /// 商品类目,数据实体对象 - /// - /// @author lwh - /// @date 2023-06-12 - /// - [SugarTable("tb_goods_category")] - public class GoodsCategory : BusinessBase - { - - /// - /// 描述 : - /// 空值 : false - /// - [EpplusTableColumn(Header = "GoodsCategoryId")] - [SugarColumn(IsPrimaryKey = true, IsIdentity = true, ColumnName = "goods_category_id")] - public int GoodsCategoryId { get; set; } - - - /// - /// 描述 : - /// 空值 : false - /// - [EpplusTableColumn(Header = "GoodsCategoryGuid")] - [JsonConverter(typeof(ValueToStringConverter))] - [SugarColumn(IsPrimaryKey = true, IsIdentity = false, ColumnName = "goods_category_guid")] - public long GoodsCategoryGuid { get; set; } - - - /// - /// 描述 :父级guid - /// 空值 : false - /// - [EpplusTableColumn(Header = "父级guid")] - [JsonConverter(typeof(ValueToStringConverter))] - [SugarColumn(ColumnName = "goods_category_parent_guid")] - public long GoodsCategoryParentGuid { get; set; } - - - /// - /// 描述 :祖级guid - /// 空值 : false - /// - [EpplusTableColumn(Header = "祖级guid")] - [JsonConverter(typeof(ValueToStringConverter))] - [SugarColumn(ColumnName = "goods_category_ancestral_guid")] - public string GoodsCategoryAncestralGuid { get; set; } - - - /// - /// 描述 :名称 - /// 空值 : false - /// - [EpplusTableColumn(Header = "名称")] - [SugarColumn(ColumnName = "goods_category_name")] - public string GoodsCategoryName { get; set; } - - - /// - /// 描述 :图片 - /// 空值 : true - /// - [EpplusTableColumn(Header = "图片")] - [SugarColumn(ColumnName = "goods_category_img")] - public string GoodsCategoryImg { get; set; } - - - /// - /// 描述 :显示状态 - /// 空值 : false - /// - [EpplusTableColumn(Header = "显示状态")] - [SugarColumn(ColumnName = "goods_category_display_status")] - public int GoodsCategoryDisplayStatus { get; set; } - - - /// - /// 描述 :是否为热门 - /// 空值 : true - /// - [EpplusTableColumn(Header = "是否为热门")] - [SugarColumn(ColumnName = "goods_category_is_popular")] - public int? GoodsCategoryIsPopular { get; set; } - - - /// - /// 描述 :排序 - /// 空值 : false - /// - [EpplusTableColumn(Header = "排序")] - [SugarColumn(ColumnName = "product_category_sort")] - public int ProductCategorySort { get; set; } - - - - - - - [JsonProperty(NullValueHandling = NullValueHandling.Ignore)] - [SugarColumn(IsIgnore = true)] - public List Children { get; set; } - } -} \ No newline at end of file diff --git a/ARW.Model/Models/Business/GoodsManager/GoodsComments/GoodsComment.cs b/ARW.Model/Models/Business/GoodsManager/GoodsComments/GoodsComment.cs deleted file mode 100644 index 7d05c7f..0000000 --- a/ARW.Model/Models/Business/GoodsManager/GoodsComments/GoodsComment.cs +++ /dev/null @@ -1,150 +0,0 @@ -using System; -using System.Collections.Generic; -using SqlSugar; -using OfficeOpenXml.Attributes; -using Newtonsoft.Json; - -namespace ARW.Model.Models.Business.GoodsManager.GoodsComments -{ - /// - /// 商品评价,数据实体对象 - /// - /// @author admin - /// @date 2023-07-15 - /// - [SugarTable("tb_goods_comment")] - public class GoodsComment : BusinessBase - { - - /// - /// 描述 : - /// 空值 : false - /// - [SugarColumn(IsPrimaryKey = true, IsIdentity = true, ColumnName = "goods_comment_id")] - public int GoodsCommentId { get; set; } - - - /// - /// 描述 : - /// 空值 : false - /// - [JsonConverter(typeof(ValueToStringConverter))] - [SugarColumn(IsPrimaryKey = true, IsIdentity = false, ColumnName = "goods_comment_guid")] - public long GoodsCommentGuid { get; set; } - - - /// - /// 描述 :店铺guid - /// 空值 : false - /// - [JsonConverter(typeof(ValueToStringConverter))] - [SugarColumn(ColumnName = "shop_guid")] - public long ShopGuid { get; set; } - - - /// - /// 描述 :客户guid - /// 空值 : false - /// - [JsonConverter(typeof(ValueToStringConverter))] - [SugarColumn(ColumnName = "customer_guid")] - public long CustomerGuid { get; set; } - - - /// - /// 描述 :订单guid - /// 空值 : false - /// - [JsonConverter(typeof(ValueToStringConverter))] - [SugarColumn(ColumnName = "order_guid")] - public long OrderGuid { get; set; } - - - /// - /// 描述 :商品guid - /// 空值 : false - /// - [JsonConverter(typeof(ValueToStringConverter))] - [SugarColumn(ColumnName = "goods_guid")] - public long GoodsGuid { get; set; } - - - /// - /// 描述 :订单商品guid - /// 空值 : false - /// - [JsonConverter(typeof(ValueToStringConverter))] - [SugarColumn(ColumnName = "order_goods_guid")] - public long OrderGoodsGuid { get; set; } - - - /// - /// 描述 :评分分数 - /// 空值 : false - /// - [SugarColumn(ColumnName = "goods_comment_rating")] - public float GoodsCommentRating { get; set; } - - - /// - /// 描述 :评分类型 - /// 空值 : false - /// - [SugarColumn(ColumnName = "goods_comment_rating_type")] - public int GoodsCommentRatingType { get; set; } - - - /// - /// 描述 :评价内容 - /// 空值 : false - /// - [SugarColumn(ColumnName = "goods_comment_content")] - public string GoodsCommentContent { get; set; } - - - /// - /// 描述 :评价图片 - /// 空值 : true - /// - [SugarColumn(ColumnName = "goods_comment_images")] - public string GoodsCommentImages { get; set; } - - - /// - /// 描述 :回复状态 - /// 空值 : false - /// - [SugarColumn(ColumnName = "goods_comment_recover_status")] - public int GoodsCommentRecoverStatus { get; set; } - - - /// - /// 描述 :回复内容 - /// 空值 : true - /// - [SugarColumn(ColumnName = "goods_comment_recover_content")] - public string GoodsCommentRecoverContent { get; set; } - - - /// - /// 描述 :显示状态 - /// 空值 : false - /// - [SugarColumn(ColumnName = "goods_comment_status")] - public int GoodsCommentStatus { get; set; } - - - /// - /// 描述 :排序 - /// 空值 : false - /// - [SugarColumn(ColumnName = "goods_comment_sort")] - public int GoodsCommentSort { get; set; } - - - - - - - } -} \ No newline at end of file diff --git a/ARW.Model/Models/Business/GoodsManager/GoodsServicess/GoodsServices.cs b/ARW.Model/Models/Business/GoodsManager/GoodsServicess/GoodsServices.cs deleted file mode 100644 index 036504c..0000000 --- a/ARW.Model/Models/Business/GoodsManager/GoodsServicess/GoodsServices.cs +++ /dev/null @@ -1,98 +0,0 @@ -using System; -using System.Collections.Generic; -using SqlSugar; -using OfficeOpenXml.Attributes; -using Newtonsoft.Json; - -namespace ARW.Model.Models.Business.GoodsManager.GoodsServicess -{ - /// - /// 商品服务与承诺,数据实体对象 - /// - /// @author lwh - /// @date 2023-06-18 - /// - [SugarTable("tb_goods_services")] - public class GoodsServices : BusinessBase - { - - /// - /// 描述 : - /// 空值 : false - /// - [EpplusTableColumn(Header = "GoodsServicesId")] - [SugarColumn(IsPrimaryKey = true, IsIdentity = true, ColumnName = "goods_services_id")] - public int GoodsServicesId { get; set; } - - - /// - /// 描述 : - /// 空值 : false - /// - [EpplusTableColumn(Header = "GoodsServicesGuid")] - [JsonConverter(typeof(ValueToStringConverter))] - [SugarColumn(IsPrimaryKey = true, IsIdentity = false, ColumnName = "goods_services_guid")] - public long GoodsServicesGuid { get; set; } - - - /// - /// 描述 :店铺guid - /// 空值 : false - /// - [EpplusTableColumn(Header = "店铺guid")] - [JsonConverter(typeof(ValueToStringConverter))] - [SugarColumn(ColumnName = "shop_guid")] - public long ShopGuid { get; set; } - - - /// - /// 描述 :服务名称 - /// 空值 : false - /// - [EpplusTableColumn(Header = "服务名称")] - [SugarColumn(ColumnName = "goods_services_name")] - public string GoodsServicesName { get; set; } - - - /// - /// 描述 :概述 - /// 空值 : true - /// - [EpplusTableColumn(Header = "概述")] - [SugarColumn(ColumnName = "goods_services_summary")] - public string GoodsServicesSummary { get; set; } - - - /// - /// 描述 :是否默认 - /// 空值 : false - /// - [EpplusTableColumn(Header = "是否默认")] - [SugarColumn(ColumnName = "goods_services_is_default")] - public int GoodsServicesIsDefault { get; set; } - - - /// - /// 描述 :显示状态 - /// 空值 : false - /// - [EpplusTableColumn(Header = "显示状态")] - [SugarColumn(ColumnName = "goods_services_display_status")] - public int GoodsServicesDisplayStatus { get; set; } - - - /// - /// 描述 :排序 - /// 空值 : false - /// - [EpplusTableColumn(Header = "排序")] - [SugarColumn(ColumnName = "goods_services_sort")] - public int GoodsServicesSort { get; set; } - - - - - - - } -} \ No newline at end of file diff --git a/ARW.Model/Models/Business/GoodsManager/GoodsServicess/GoodsServicesRels/GoodsServicesRel.cs b/ARW.Model/Models/Business/GoodsManager/GoodsServicess/GoodsServicesRels/GoodsServicesRel.cs deleted file mode 100644 index 8abe134..0000000 --- a/ARW.Model/Models/Business/GoodsManager/GoodsServicess/GoodsServicesRels/GoodsServicesRel.cs +++ /dev/null @@ -1,59 +0,0 @@ -using System; -using System.Collections.Generic; -using SqlSugar; -using OfficeOpenXml.Attributes; -using Newtonsoft.Json; - -namespace ARW.Model.Models.Business.GoodsManager.GoodsServicess.GoodsServicesRels -{ - /// - /// 商品服务与承诺关系表,数据实体对象 - /// - /// @author lwh - /// @date 2023-06-18 - /// - [SugarTable("tb_goods_services_rel")] - public class GoodsServicesRel : BusinessBase - { - - /// - /// 描述 : - /// 空值 : false - /// - [SugarColumn(IsPrimaryKey = true, IsIdentity = true)] - public int Id { get; set; } - - - /// - /// 描述 :店铺guid - /// 空值 : false - /// - [JsonConverter(typeof(ValueToStringConverter))] - [SugarColumn(ColumnName = "shop_guid")] - public long ShopGuid { get; set; } - - - /// - /// 描述 :商品guid - /// 空值 : false - /// - [JsonConverter(typeof(ValueToStringConverter))] - [SugarColumn(ColumnName = "goods_guid")] - public long GoodsGuid { get; set; } - - - /// - /// 描述 :服务与承诺id - /// 空值 : false - /// - [JsonConverter(typeof(ValueToStringConverter))] - [SugarColumn(ColumnName = "service_id")] - public int ServiceId { get; set; } - - - - - - - } -} \ No newline at end of file diff --git a/ARW.Model/Models/Business/GoodsManager/GoodsSpecs/GoodsSkus/GoodsSku.cs b/ARW.Model/Models/Business/GoodsManager/GoodsSpecs/GoodsSkus/GoodsSku.cs deleted file mode 100644 index b6bfeee..0000000 --- a/ARW.Model/Models/Business/GoodsManager/GoodsSpecs/GoodsSkus/GoodsSku.cs +++ /dev/null @@ -1,121 +0,0 @@ -using System; -using System.Collections.Generic; -using SqlSugar; -using OfficeOpenXml.Attributes; -using Newtonsoft.Json; - -namespace ARW.Model.Models.Business.GoodsManager.GoodsSpecs.GoodsSkus -{ - /// - /// 商品规格,数据实体对象 - /// - /// @author lwh - /// @date 2023-06-19 - /// - [SugarTable("tb_goods_sku")] - public class GoodsSku : BusinessBase - { - - /// - /// 描述 : - /// 空值 : false - /// - [SugarColumn(IsPrimaryKey = true, IsIdentity = true, ColumnName = "goods_sku_id")] - public int GoodsSkuId { get; set; } - - - /// - /// 描述 :商品guid - /// 空值 : false - /// - [JsonConverter(typeof(ValueToStringConverter))] - [SugarColumn(ColumnName = "goods_guid")] - public long GoodsGuid { get; set; } - - - /// - /// 描述 :第一规格值ID - /// 空值 : false - /// - [SugarColumn(ColumnName = "spec_value_id")] - public int SpecValueId { get; set; } - - - /// - /// 描述 :第二规格值ID - /// 空值 : false - /// - [SugarColumn(ColumnName = "spec_second_value_id")] - public int SpecSecondValueId { get; set; } - - - /// - /// 描述 :第三规格值ID - /// 空值 : false - /// - [SugarColumn(ColumnName = "spec_third_value_id")] - public int SpecThirdValueId { get; set; } - - - /// - /// 描述 :图片 - /// 空值 : false - /// - [SugarColumn(ColumnName = "goods_sku_img")] - public string GoodsSkuImg { get; set; } - - - /// - /// 描述 :sku编码 - /// 空值 : true - /// - [SugarColumn(ColumnName = "goods_sku_sku_code")] - public string GoodsSkuSkuCode { get; set; } - - - /// - /// 描述 :价格 - /// 空值 : false - /// - [SugarColumn(ColumnName = "goods_sku_price")] - public decimal GoodsSkuPrice { get; set; } - - - /// - /// 描述 :划线价格 - /// 空值 : false - /// - [SugarColumn(ColumnName = "goods_sku_line_price")] - public decimal GoodsSkuLinePrice { get; set; } - - - /// - /// 描述 :当前库存数量 - /// 空值 : false - /// - [SugarColumn(ColumnName = "goods_sku_stock_num")] - public int GoodsSkuStockNum { get; set; } - - - /// - /// 描述 :商品重量(Kg) - /// 空值 : false - /// - [SugarColumn(ColumnName = "goods_sku_weight")] - public decimal GoodsSkuWeight { get; set; } - - - /// - /// 描述 :SKU的规格属性(json格式) - /// 空值 : true - /// - [SugarColumn(ColumnName = "goods_sku_props")] - public string GoodsSkuProps { get; set; } - - - - - - - } -} \ No newline at end of file diff --git a/ARW.Model/Models/Business/GoodsManager/GoodsSpecs/GoodsSpecRels/GoodsSpecRel.cs b/ARW.Model/Models/Business/GoodsManager/GoodsSpecs/GoodsSpecRels/GoodsSpecRel.cs deleted file mode 100644 index 886c4d3..0000000 --- a/ARW.Model/Models/Business/GoodsManager/GoodsSpecs/GoodsSpecRels/GoodsSpecRel.cs +++ /dev/null @@ -1,57 +0,0 @@ -using System; -using System.Collections.Generic; -using SqlSugar; -using OfficeOpenXml.Attributes; -using Newtonsoft.Json; - -namespace ARW.Model.Models.Business.GoodsManager.GoodsSpecs.GoodsSpecRels -{ - /// - /// 商品与规格值关系记录,数据实体对象 - /// - /// @author lwh - /// @date 2023-06-19 - /// - [SugarTable("tb_goods_spec_rel")] - public class GoodsSpecRel : BusinessBase - { - - /// - /// 描述 : - /// 空值 : false - /// - [SugarColumn(IsPrimaryKey = true, IsIdentity = true, ColumnName = "goods_spec_rel_id")] - public int GoodsSpecRelId { get; set; } - - - /// - /// 描述 :商品Guid - /// 空值 : false - /// - [JsonConverter(typeof(ValueToStringConverter))] - [SugarColumn(ColumnName = "goods_guid")] - public long GoodsGuid { get; set; } - - - /// - /// 描述 :规格组ID - /// 空值 : false - /// - [SugarColumn(ColumnName = "spec_id")] - public int SpecId { get; set; } - - - /// - /// 描述 :规格值ID - /// 空值 : false - /// - [SugarColumn(ColumnName = "spec_value_id")] - public int SpecValueId { get; set; } - - - - - - - } -} \ No newline at end of file diff --git a/ARW.Model/Models/Business/GoodsManager/GoodsSpecs/SpecValues/SpecValue.cs b/ARW.Model/Models/Business/GoodsManager/GoodsSpecs/SpecValues/SpecValue.cs deleted file mode 100644 index 567c5ad..0000000 --- a/ARW.Model/Models/Business/GoodsManager/GoodsSpecs/SpecValues/SpecValue.cs +++ /dev/null @@ -1,48 +0,0 @@ -using System; -using System.Collections.Generic; -using SqlSugar; -using OfficeOpenXml.Attributes; -using Newtonsoft.Json; - -namespace ARW.Model.Models.Business.GoodsManager.GoodsSpecs.SpecValues -{ - /// - /// 商品规格值,数据实体对象 - /// - /// @author lwh - /// @date 2023-06-19 - /// - [SugarTable("tb_spec_value")] - public class SpecValue : BusinessBase - { - - /// - /// 描述 : - /// 空值 : false - /// - [SugarColumn(IsPrimaryKey = true, IsIdentity = true, ColumnName = "spec_value_id")] - public int SpecValueId { get; set; } - - - /// - /// 描述 :规格组ID - /// 空值 : false - /// - [SugarColumn(ColumnName = "spec_id")] - public int SpecId { get; set; } - - - /// - /// 描述 :规格值名称 - /// 空值 : false - /// - [SugarColumn(ColumnName = "spec_value_name")] - public string SpecValueName { get; set; } - - - - - - - } -} \ No newline at end of file diff --git a/ARW.Model/Models/Business/GoodsManager/GoodsSpecs/Specs/Spec.cs b/ARW.Model/Models/Business/GoodsManager/GoodsSpecs/Specs/Spec.cs deleted file mode 100644 index 7c7fe6b..0000000 --- a/ARW.Model/Models/Business/GoodsManager/GoodsSpecs/Specs/Spec.cs +++ /dev/null @@ -1,45 +0,0 @@ -using System; -using System.Collections.Generic; -using SqlSugar; -using OfficeOpenXml.Attributes; -using Newtonsoft.Json; - -namespace ARW.Model.Models.Business.GoodsManager.GoodsSpecs.Specs -{ - /// - /// 商品规格组,数据实体对象 - /// - /// @author lwh - /// @date 2023-06-19 - /// - [SugarTable("tb_spec")] - public class Spec : BusinessBase - { - - /// - /// 描述 : - /// 空值 : false - /// - [SugarColumn(IsPrimaryKey = true, IsIdentity = true, ColumnName = "spec_id")] - public int SpecId { get; set; } - - - /// - /// 描述 :规格值名称 - /// 空值 : false - /// - [SugarColumn(ColumnName = "spec_name")] - public string SpecName { get; set; } - - - /// - /// 描述 :层级 - /// 空值 : false - /// - [SugarColumn(ColumnName = "level")] - public int Level { get; set; } - - - - } -} \ No newline at end of file diff --git a/ARW.Model/Models/Business/GoodsManager/Goodss/Goods.cs b/ARW.Model/Models/Business/GoodsManager/Goodss/Goods.cs deleted file mode 100644 index d667d81..0000000 --- a/ARW.Model/Models/Business/GoodsManager/Goodss/Goods.cs +++ /dev/null @@ -1,328 +0,0 @@ -using System; -using System.Collections.Generic; -using SqlSugar; -using OfficeOpenXml.Attributes; -using Newtonsoft.Json; -using ARW.Model.Dto.Business.GoodsManager.Goodss; - -namespace ARW.Model.Models.Business.GoodsManager.Goodss -{ - /// - /// 商品,数据实体对象 - /// - /// @author lwh - /// @date 2023-06-19 - /// - [SugarTable("tb_goods")] - public class Goods : BusinessBase - { - - /// - /// 描述 : - /// 空值 : false - /// - [EpplusTableColumn(Header = "GoodsId")] - [SugarColumn(IsPrimaryKey = true, IsIdentity = true, ColumnName = "goods_id")] - public int GoodsId { get; set; } - - - /// - /// 描述 : - /// 空值 : false - /// - [EpplusTableColumn(Header = "GoodsGuid")] - [JsonConverter(typeof(ValueToStringConverter))] - [SugarColumn(IsPrimaryKey = true, IsIdentity = false, ColumnName = "goods_guid")] - public long GoodsGuid { get; set; } - - - /// - /// 描述 :店铺guid - /// 空值 : false - /// - [EpplusTableColumn(Header = "店铺guid")] - [JsonConverter(typeof(ValueToStringConverter))] - [SugarColumn(ColumnName = "shop_guid")] - public long ShopGuid { get; set; } - - - /// - /// 描述 :商品类目guid - /// 空值 : false - /// - [EpplusTableColumn(Header = "商品类目guid")] - [JsonConverter(typeof(ValueToStringConverter))] - [SugarColumn(ColumnName = "shop_goods_category_guid")] - public long ShopGoodsCategoryGuid { get; set; } - - - /// - /// 描述 :商品规格guid - /// 空值 : false - /// - [EpplusTableColumn(Header = "商品规格ids")] - [JsonConverter(typeof(ValueToStringConverter))] - [SugarColumn(ColumnName = "goods_sku_ids")] - public string GoodsSkuIds { get; set; } - - - /// - /// 描述 :配送模板guid - /// 空值 : false - /// - [EpplusTableColumn(Header = "配送模板guid")] - [JsonConverter(typeof(ValueToStringConverter))] - [SugarColumn(ColumnName = "delivery_guid")] - public long DeliveryGuid { get; set; } - - - /// - /// 描述 :名称 - /// 空值 : false - /// - [EpplusTableColumn(Header = "名称")] - [SugarColumn(ColumnName = "goods_name")] - public string GoodsName { get; set; } - - - /// - /// 描述 :编码 - /// 空值 : false - /// - [EpplusTableColumn(Header = "编码")] - [SugarColumn(ColumnName = "goods_coding")] - public string GoodsCoding { get; set; } - - - /// - /// 描述 :主图视频 - /// 空值 : true - /// - [EpplusTableColumn(Header = "主图视频")] - [SugarColumn(ColumnName = "goods_main_image_video")] - public string GoodsMainImageVideo { get; set; } - - - /// - /// 描述 :视频封面 - /// 空值 : true - /// - [EpplusTableColumn(Header = "视频封面")] - [SugarColumn(ColumnName = "goods_video_cover")] - public string GoodsVideoCover { get; set; } - - - /// - /// 描述 :图片 - /// 空值 : false - /// - [EpplusTableColumn(Header = "图片")] - [SugarColumn(ColumnName = "goods_picture")] - public string GoodsPicture { get; set; } - - /// - /// 描述 :卖点 - /// 空值 : true - /// - [EpplusTableColumn(Header = "卖点")] - [SugarColumn(ColumnName = "goods_selling_point")] - public string GoodsSellingPoint { get; set; } - - /// - /// 描述 :商品规格(1单规格 2多规格) - /// 空值 : false - /// - [EpplusTableColumn(Header = "商品规格(1单规格 2多规格)")] - [SugarColumn(ColumnName = "goods_spec_type")] - public int GoodsSpecType { get; set; } - - - /// - /// 描述 :价格(最低) - /// 空值 : false - /// - [EpplusTableColumn(Header = "价格(最低)")] - [SugarColumn(ColumnName = "goods_price_lowest")] - public decimal GoodsPriceLowest { get; set; } - - - /// - /// 描述 :价格(最高) - /// 空值 : false - /// - [EpplusTableColumn(Header = "价格(最高)")] - [SugarColumn(ColumnName = "goods_price_highest")] - public decimal GoodsPriceHighest { get; set; } - - /// - /// 描述 :商品重量 - /// 空值 : false - /// - [EpplusTableColumn(Header = "商品重量")] - [SugarColumn(ColumnName = "goods_weight")] - public decimal GoodsWeight { get; set; } - - /// - /// 描述 :划线价格(最低) - /// 空值 : false - /// - [EpplusTableColumn(Header = "划线价格(最低)")] - [SugarColumn(ColumnName = "goods_dashed_price_lowest")] - public decimal GoodsDashedPriceLowest { get; set; } - - /// - /// 描述 :划线价格(最高) - /// 空值 : false - /// - [EpplusTableColumn(Header = "划线价格(最高)")] - [SugarColumn(ColumnName = "goods_dashed_price_highest")] - public decimal GoodsDashedPriceHighest { get; set; } - - - /// - /// 描述 :库存总量 - /// 空值 : false - /// - [EpplusTableColumn(Header = "库存总量")] - [SugarColumn(ColumnName = "goods_total_inventory")] - public int GoodsTotalInventory { get; set; } - - - /// - /// 描述 :初始销量 - /// 空值 : false - /// - [EpplusTableColumn(Header = "初始销量")] - [SugarColumn(ColumnName = "goods_sales_initial")] - public int GoodsSalesInitial { get; set; } - - - /// - /// 描述 :实际销量 - /// 空值 : false - /// - [EpplusTableColumn(Header = "实际销量")] - [SugarColumn(ColumnName = "goods_sales_actual")] - public int GoodsSalesActual { get; set; } - - - /// - /// 描述 :详情 - /// 空值 : false - /// - [EpplusTableColumn(Header = "详情")] - [SugarColumn(ColumnName = "goods_details")] - public string GoodsDetails { get; set; } - - - /// - /// 描述 :库存计算方式(1下单立减库存 2付款立减库存) - /// 空值 : false - /// - [EpplusTableColumn(Header = "库存计算方式(1下单立减库存 2付款立减库存)")] - [SugarColumn(ColumnName = "goods_deduct_stock_type")] - public int GoodsDeductStockType { get; set; } - - - /// - /// 描述 :是否赠送积分(1开启 0关闭) - /// 空值 : false - /// - [EpplusTableColumn(Header = "是否赠送积分(1开启 0关闭)")] - [SugarColumn(ColumnName = "goods_is_points_gift")] - public int GoodsIsPointsGift { get; set; } - - - /// - /// 描述 :是否允许使用积分抵扣(1允许 0不允许) - /// 空值 : false - /// - [EpplusTableColumn(Header = "是否允许使用积分抵扣(1允许 0不允许)")] - [SugarColumn(ColumnName = "goods_is_points_discount")] - public int GoodsIsPointsDiscount { get; set; } - - - /// - /// 描述 :积分抵扣设置(0默认抵扣 1单独设置抵扣) - /// 空值 : false - /// - [EpplusTableColumn(Header = "积分抵扣设置(0默认抵扣 1单独设置抵扣)")] - [SugarColumn(ColumnName = "goods_is_alone_points_discount")] - public int GoodsIsAlonePointsDiscount { get; set; } - - - /// - /// 描述 :单独设置积分抵扣的配置 - /// 空值 : true - /// - [EpplusTableColumn(Header = "单独设置积分抵扣的配置")] - [SugarColumn(ColumnName = "goods_points_discount_config")] - public string GoodsPointsDiscountConfig { get; set; } - - - /// - /// 描述 :是否开启会员折扣(1开启 0关闭) - /// 空值 : false - /// - [EpplusTableColumn(Header = "是否开启会员折扣(1开启 0关闭)")] - [SugarColumn(ColumnName = "goods_is_enable_grade")] - public int GoodsIsEnableGrade { get; set; } - - - /// - /// 描述 :会员折扣设置(0默认等级折扣 1单独设置折扣) - /// 空值 : false - /// - [EpplusTableColumn(Header = "会员折扣设置(0默认等级折扣 1单独设置折扣)")] - [SugarColumn(ColumnName = "goods_is_alone_grade")] - public int GoodsIsAloneGrade { get; set; } - - - /// - /// 描述 :单独设置折扣的配置 - /// 空值 : true - /// - [EpplusTableColumn(Header = "单独设置折扣的配置")] - [SugarColumn(ColumnName = "goods_alone_grade_equity")] - public string GoodsAloneGradeEquity { get; set; } - - - /// - /// 描述 :上下架状态(1上架 2下架) - /// 空值 : false - /// - [EpplusTableColumn(Header = "上下架状态(1上架 2下架)")] - [SugarColumn(ColumnName = "goods_shelf_status")] - public int GoodsShelfStatus { get; set; } - - - /// - /// 描述 :排序 - /// 空值 : false - /// - [EpplusTableColumn(Header = "排序")] - [SugarColumn(ColumnName = "goods_sort")] - public int GoodsSort { get; set; } - - - - - [SugarColumn(IsIgnore = true)] - public string GoodsServicesIds { get; set; } - - - /// - /// 商品规格 - /// - [SugarColumn(IsIgnore = true)] - public List GoodsSpecList { get; set; } - - - /// - /// 商品sku列表 - /// - [SugarColumn(IsIgnore = true)] - public List SkuList { get; set; } - - } -} \ No newline at end of file diff --git a/ARW.Model/Models/Business/GoodsManager/ShopGoodsCategorys/ShopGoodsCategory.cs b/ARW.Model/Models/Business/GoodsManager/ShopGoodsCategorys/ShopGoodsCategory.cs deleted file mode 100644 index 9493cfc..0000000 --- a/ARW.Model/Models/Business/GoodsManager/ShopGoodsCategorys/ShopGoodsCategory.cs +++ /dev/null @@ -1,121 +0,0 @@ -using System; -using System.Collections.Generic; -using SqlSugar; -using OfficeOpenXml.Attributes; -using Newtonsoft.Json; - -namespace ARW.Model.Models.Business.GoodsManager.ShopGoodsCategorys -{ - /// - /// 店铺商品类目,数据实体对象 - /// - /// @author lwh - /// @date 2023-06-15 - /// - [SugarTable("tb_shop_goods_category")] - public class ShopGoodsCategory : BusinessBase - { - - /// - /// 描述 : - /// 空值 : false - /// - [EpplusTableColumn(Header = "ShopGoodsCategoryId")] - [SugarColumn(IsPrimaryKey = true, IsIdentity = true, ColumnName = "shop_goods_category_id")] - public int ShopGoodsCategoryId { get; set; } - - - /// - /// 描述 : - /// 空值 : false - /// - [EpplusTableColumn(Header = "ShopGoodsCategoryGuid")] - [JsonConverter(typeof(ValueToStringConverter))] - [SugarColumn(IsPrimaryKey = true, IsIdentity = false, ColumnName = "shop_goods_category_guid")] - public long ShopGoodsCategoryGuid { get; set; } - - - /// - /// 描述 :店铺guid - /// 空值 : false - /// - [EpplusTableColumn(Header = "店铺guid")] - [JsonConverter(typeof(ValueToStringConverter))] - [SugarColumn(ColumnName = "shop_guid")] - public long ShopGuid { get; set; } - - - /// - /// 描述 :父级guid - /// 空值 : false - /// - [EpplusTableColumn(Header = "父级guid")] - [JsonConverter(typeof(ValueToStringConverter))] - [SugarColumn(ColumnName = "shop_goods_category_parent_guid")] - public long ShopGoodsCategoryParentGuid { get; set; } - - - /// - /// 描述 :祖级guid - /// 空值 : false - /// - [EpplusTableColumn(Header = "祖级guid")] - [JsonConverter(typeof(ValueToStringConverter))] - [SugarColumn(ColumnName = "shop_goods_category_ancestral_guid")] - public string ShopGoodsCategoryAncestralGuid { get; set; } - - - /// - /// 描述 :名称 - /// 空值 : false - /// - [EpplusTableColumn(Header = "名称")] - [SugarColumn(ColumnName = "shop_goods_category_name")] - public string ShopGoodsCategoryName { get; set; } - - - /// - /// 描述 :图标 - /// 空值 : false - /// - [EpplusTableColumn(Header = "图标")] - [SugarColumn(ColumnName = "shop_goods_category_img")] - public string ShopGoodsCategoryImg { get; set; } - - - /// - /// 描述 :是否为热门 - /// 空值 : false - /// - [EpplusTableColumn(Header = "是否为热门")] - [SugarColumn(ColumnName = "shop_goods_category_is_popular")] - public int ShopGoodsCategoryIsPopular { get; set; } - - - /// - /// 描述 :显示状态 - /// 空值 : false - /// - [EpplusTableColumn(Header = "显示状态")] - [SugarColumn(ColumnName = "shop_goods_category_display_status")] - public int ShopGoodsCategoryDisplayStatus { get; set; } - - - /// - /// 描述 :排序 - /// 空值 : false - /// - [EpplusTableColumn(Header = "排序")] - [SugarColumn(ColumnName = "shop_goods_category_sort")] - public int ShopGoodsCategorySort { get; set; } - - - - - - - [JsonProperty(NullValueHandling = NullValueHandling.Ignore)] - [SugarColumn(IsIgnore = true)] - public List Children { get; set; } - } -} \ No newline at end of file diff --git a/ARW.Model/Models/Business/LogisticsManage/DeliveryRules/DeliveryRule.cs b/ARW.Model/Models/Business/LogisticsManage/DeliveryRules/DeliveryRule.cs deleted file mode 100644 index 69565c1..0000000 --- a/ARW.Model/Models/Business/LogisticsManage/DeliveryRules/DeliveryRule.cs +++ /dev/null @@ -1,98 +0,0 @@ -using System; -using System.Collections.Generic; -using SqlSugar; -using OfficeOpenXml.Attributes; -using Newtonsoft.Json; - -namespace ARW.Model.Models.Business.LogisticsManage.DeliveryRules -{ - /// - /// 配送模板区域及运费,数据实体对象 - /// - /// @author lwh - /// @date 2023-06-16 - /// - [SugarTable("tb_delivery_rule")] - public class DeliveryRule : BusinessBase - { - - /// - /// 描述 : - /// 空值 : false - /// - [SugarColumn(IsPrimaryKey = true, IsIdentity = true, ColumnName = "delivery_rule_id")] - public int DeliveryRuleId { get; set; } - - - /// - /// 描述 : - /// 空值 : false - /// - [JsonConverter(typeof(ValueToStringConverter))] - [SugarColumn(IsPrimaryKey = true, IsIdentity = false, ColumnName = "delivery_rule_guid")] - public long DeliveryRuleGuid { get; set; } - - - /// - /// 描述 :配送模板guid - /// 空值 : false - /// - [JsonConverter(typeof(ValueToStringConverter))] - [SugarColumn(ColumnName = "delivery_guid")] - public long DeliveryGuid { get; set; } - - - /// - /// 描述 :可配送区域(城市id集) - /// 空值 : false - /// - [SugarColumn(ColumnName = "delivery_rule_region")] - public string DeliveryRuleRegion { get; set; } - - - /// - /// 描述 :可配送区域(文字展示) - /// 空值 : false - /// - [SugarColumn(ColumnName = "delivery_rule_region_text")] - public string DeliveryRuleRegionText { get; set; } - - - /// - /// 描述 :首件(个)/首重(Kg) - /// 空值 : false - /// - [SugarColumn(ColumnName = "delivery_rule_first")] - public decimal DeliveryRuleFirst { get; set; } - - - /// - /// 描述 :运费(元) - /// 空值 : false - /// - [SugarColumn(ColumnName = "delivery_rule_first_fee")] - public decimal DeliveryRuleFirstFee { get; set; } - - - /// - /// 描述 :续件/续重 - /// 空值 : false - /// - [SugarColumn(ColumnName = "delivery_rule_additional")] - public decimal DeliveryRuleAdditional { get; set; } - - - /// - /// 描述 :续费(元) - /// 空值 : false - /// - [SugarColumn(ColumnName = "delivery_rule_additional_fee")] - public decimal DeliveryRuleAdditionalFee { get; set; } - - - - - - - } -} \ No newline at end of file diff --git a/ARW.Model/Models/Business/LogisticsManage/Deliverys/Delivery.cs b/ARW.Model/Models/Business/LogisticsManage/Deliverys/Delivery.cs deleted file mode 100644 index 04e4528..0000000 --- a/ARW.Model/Models/Business/LogisticsManage/Deliverys/Delivery.cs +++ /dev/null @@ -1,82 +0,0 @@ -using System; -using System.Collections.Generic; -using SqlSugar; -using OfficeOpenXml.Attributes; -using Newtonsoft.Json; -using ARW.Model.Models.Business.LogisticsManage.DeliveryRules; - -namespace ARW.Model.Models.Business.LogisticsManage.Deliverys -{ - /// - /// 配送模板,数据实体对象 - /// - /// @author lwh - /// @date 2023-06-16 - /// - [SugarTable("tb_delivery")] - public class Delivery : BusinessBase - { - - /// - /// 描述 : - /// 空值 : false - /// - [EpplusTableColumn(Header = "DeliveryId")] - [SugarColumn(IsPrimaryKey = true, IsIdentity = true, ColumnName = "delivery_id")] - public int DeliveryId { get; set; } - - - /// - /// 描述 : - /// 空值 : false - /// - [EpplusTableColumn(Header = "DeliveryGuid")] - [JsonConverter(typeof(ValueToStringConverter))] - [SugarColumn(IsPrimaryKey = true, IsIdentity = false, ColumnName = "delivery_guid")] - public long DeliveryGuid { get; set; } - - - /// - /// 描述 :店铺guid - /// 空值 : false - /// - [EpplusTableColumn(Header = "店铺guid")] - [JsonConverter(typeof(ValueToStringConverter))] - [SugarColumn(ColumnName = "shop_guid")] - public long ShopGuid { get; set; } - - - /// - /// 描述 :模板名称 - /// 空值 : false - /// - [EpplusTableColumn(Header = "模板名称")] - [SugarColumn(ColumnName = "delivery_name")] - public string DeliveryName { get; set; } - - - /// - /// 描述 :计费方式 - /// 空值 : false - /// - [EpplusTableColumn(Header = "计费方式")] - [SugarColumn(ColumnName = "delivery_billing_method")] - public int DeliveryBillingMethod { get; set; } - - - /// - /// 描述 :排序 - /// 空值 : false - /// - [EpplusTableColumn(Header = "排序")] - [SugarColumn(ColumnName = "delivery_sort")] - public int DeliverySort { get; set; } - - - [SugarColumn(IsIgnore = true)] - public List DeliveryRuleDataList { get; set; } - - - - } -} \ No newline at end of file diff --git a/ARW.Model/Models/Business/LogisticsManage/LogisticsCompanys/LogisticsCompany.cs b/ARW.Model/Models/Business/LogisticsManage/LogisticsCompanys/LogisticsCompany.cs deleted file mode 100644 index a892c31..0000000 --- a/ARW.Model/Models/Business/LogisticsManage/LogisticsCompanys/LogisticsCompany.cs +++ /dev/null @@ -1,70 +0,0 @@ -using System; -using System.Collections.Generic; -using SqlSugar; -using OfficeOpenXml.Attributes; -using Newtonsoft.Json; - -namespace ARW.Model.Models.Business.LogisticsManage.LogisticsCompanys -{ - /// - /// 物流公司,数据实体对象 - /// - /// @author lwh - /// @date 2023-06-18 - /// - [SugarTable("tb_logistics_company")] - public class LogisticsCompany : BusinessBase - { - - /// - /// 描述 : - /// 空值 : false - /// - [EpplusTableColumn(Header = "LogisticsCompanyId")] - [SugarColumn(IsPrimaryKey = true, IsIdentity = true, ColumnName = "logistics_company_id")] - public int LogisticsCompanyId { get; set; } - - - /// - /// 描述 : - /// 空值 : false - /// - [EpplusTableColumn(Header = "LogisticsCompanyGuid")] - [JsonConverter(typeof(ValueToStringConverter))] - [SugarColumn(IsPrimaryKey = true, IsIdentity = false, ColumnName = "logistics_company_guid")] - public long LogisticsCompanyGuid { get; set; } - - - /// - /// 描述 :物流公司名称 - /// 空值 : false - /// - [EpplusTableColumn(Header = "物流公司名称")] - [SugarColumn(ColumnName = "logistics_company_name")] - public string LogisticsCompanyName { get; set; } - - - /// - /// 描述 :物流公司编码 - /// 空值 : false - /// - [EpplusTableColumn(Header = "物流公司编码")] - [SugarColumn(ColumnName = "logistics_company_code")] - public string LogisticsCompanyCode { get; set; } - - - /// - /// 描述 :排序 - /// 空值 : false - /// - [EpplusTableColumn(Header = "排序")] - [SugarColumn(ColumnName = "logistics_company_sort")] - public int LogisticsCompanySort { get; set; } - - - - - - - } -} \ No newline at end of file diff --git a/ARW.Model/Models/Business/Marketing/CouponManage/Coupons/Coupon.cs b/ARW.Model/Models/Business/Marketing/CouponManage/Coupons/Coupon.cs deleted file mode 100644 index 8ee2ee8..0000000 --- a/ARW.Model/Models/Business/Marketing/CouponManage/Coupons/Coupon.cs +++ /dev/null @@ -1,216 +0,0 @@ -using System; -using System.Collections.Generic; -using SqlSugar; -using OfficeOpenXml.Attributes; -using Newtonsoft.Json; - -namespace ARW.Model.Models.Business.Marketing.CouponManage.Coupons -{ - /// - /// 优惠券,数据实体对象 - /// - /// @author lwh - /// @date 2023-07-24 - /// - [SugarTable("tb_coupon")] - public class Coupon : BusinessBase - { - - /// - /// 描述 : - /// 空值 : false - /// - [EpplusTableColumn(Header = "CouponId")] - [SugarColumn(IsPrimaryKey = true, IsIdentity = true, ColumnName = "coupon_id")] - public int CouponId { get; set; } - - - /// - /// 描述 : - /// 空值 : false - /// - [EpplusTableColumn(Header = "CouponGuid")] - [JsonConverter(typeof(ValueToStringConverter))] - [SugarColumn(IsPrimaryKey = true, IsIdentity = false, ColumnName = "coupon_guid")] - public long CouponGuid { get; set; } - - - /// - /// 描述 : - /// 空值 : false - /// - [JsonConverter(typeof(ValueToStringConverter))] - [SugarColumn(ColumnName = "shop_guid")] - public long ShopGuid { get; set; } - - - /// - /// 描述 :优惠劵名称 - /// 空值 : false - /// - [EpplusTableColumn(Header = "优惠劵名称")] - [SugarColumn(ColumnName = "coupon_name")] - public string CouponName { get; set; } - - /// - /// 描述 :优惠劵介绍 - /// 空值 : false - /// - [EpplusTableColumn(Header = "优惠劵介绍")] - [SugarColumn(ColumnName = "coupon_desc")] - public string CouponDesc { get; set; } - - /// - /// 描述 :优惠劵使用须知 - /// 空值 : false - /// - [EpplusTableColumn(Header = "优惠劵使用须知")] - [SugarColumn(ColumnName = "coupon_use_intro")] - public string CouponUseIntro { get; set; } - - /// - /// 描述 :优惠劵类型 - /// 空值 : false - /// - [EpplusTableColumn(Header = "优惠劵类型")] - [SugarColumn(ColumnName = "coupon_type")] - public int CouponType { get; set; } - - - /// - /// 描述 :减免金额 - /// 空值 : true - /// - [EpplusTableColumn(Header = "减免金额")] - [SugarColumn(ColumnName = "coupon_deduction_money")] - public decimal CouponDeductionMoney { get; set; } - - - /// - /// 描述 :折扣率 - /// 空值 : true - /// - [EpplusTableColumn(Header = "折扣率")] - [SugarColumn(ColumnName = "coupon_discount_rate")] - public float CouponDiscountRate { get; set; } - - - /// - /// 描述 :最低消费金额 - /// 空值 : false - /// - [EpplusTableColumn(Header = "最低消费金额")] - [SugarColumn(ColumnName = "coupon_min_consume_money")] - public decimal CouponMinConsumeMoney { get; set; } - - - /// - /// 描述 :到期类型 - /// 空值 : false - /// - [EpplusTableColumn(Header = "到期类型")] - [SugarColumn(ColumnName = "coupon_expire_type")] - public int CouponExpireType { get; set; } - - - /// - /// 描述 :有效天数 - /// 空值 : true - /// - [EpplusTableColumn(Header = "有效天数")] - [SugarColumn(ColumnName = "coupon_effective_days")] - public int CouponEffectiveDays { get; set; } - - - /// - /// 描述 :固定时间-开始时间 - /// 空值 : true - /// - [EpplusTableColumn(Header = "固定时间-开始时间", NumberFormat = "yyyy-MM-dd HH:mm:ss")] - [SugarColumn(ColumnName = "coupon_fixed_start_time")] - public DateTime CouponFixedStartTime { get; set; } - - - /// - /// 描述 :固定时间-结束时间 - /// 空值 : true - /// - [EpplusTableColumn(Header = "固定时间-结束时间", NumberFormat = "yyyy-MM-dd HH:mm:ss")] - [SugarColumn(ColumnName = "coupon_fixed_end_time")] - public DateTime CouponFixedEndTime { get; set; } - - - /// - /// 描述 :适用范围 - /// 空值 : true - /// - [EpplusTableColumn(Header = "适用范围")] - [SugarColumn(ColumnName = "coupon_applicable_scope")] - public int CouponApplicableScope { get; set; } - - - /// - /// 描述 :适用范围配置(json) - /// 空值 : true - /// - [EpplusTableColumn(Header = "适用范围配置(json)")] - [SugarColumn(ColumnName = "coupon_applicable_scope_config")] - public string CouponApplicableScopeConfig { get; set; } - - - /// - /// 描述 :适用范围(指定商品的Id集) - /// 空值 : true - /// - [EpplusTableColumn(Header = "适用范围(指定商品的Id集)")] - [SugarColumn(ColumnName = "coupon_goods_ids")] - public string CouponGoodsIds { get; set; } - - - /// - /// 描述 :发送数量(-1不限制) - /// 空值 : false - /// - [EpplusTableColumn(Header = "发送数量(-1不限制)")] - [SugarColumn(ColumnName = "coupon_send_number")] - public int CouponSendNumber { get; set; } - - - /// - /// 描述 :已领取数量 - /// 空值 : true - /// - [EpplusTableColumn(Header = "已领取数量")] - [SugarColumn(ColumnName = "coupon_get_number")] - public int CouponGetNumber { get; set; } - - - /// - /// 描述 :显示状态 - /// 空值 : false - /// - [EpplusTableColumn(Header = "显示状态")] - [SugarColumn(ColumnName = "coupon_display_status")] - public int CouponDisplayStatus { get; set; } - - - /// - /// 描述 :排序 - /// 空值 : false - /// - [EpplusTableColumn(Header = "排序")] - [SugarColumn(ColumnName = "coupon_sort")] - public int CouponSort { get; set; } - - - /// - /// 描述 :优惠券状态(1: 正常 2: 失效) - /// 空值 : false - /// - [EpplusTableColumn(Header = "优惠券状态")] - [SugarColumn(ColumnName = "coupon_status")] - public int CouponStatus { get; set; } - - - } -} \ No newline at end of file diff --git a/ARW.Model/Models/Business/Marketing/CouponManage/CustomerCoupons/CustomerCoupon.cs b/ARW.Model/Models/Business/Marketing/CouponManage/CustomerCoupons/CustomerCoupon.cs deleted file mode 100644 index 28a1b58..0000000 --- a/ARW.Model/Models/Business/Marketing/CouponManage/CustomerCoupons/CustomerCoupon.cs +++ /dev/null @@ -1,75 +0,0 @@ -using System; -using System.Collections.Generic; -using SqlSugar; -using OfficeOpenXml.Attributes; -using Newtonsoft.Json; - -namespace ARW.Model.Models.Business.Marketing.CouponManage.CustomerCoupons -{ - /// - /// 领券记录,数据实体对象 - /// - /// @author lwh - /// @date 2023-07-31 - /// - [SugarTable("tb_customer_coupon")] - public class CustomerCoupon : BusinessBase - { - - /// - /// 描述 : - /// 空值 : false - /// - [SugarColumn(IsPrimaryKey = true, IsIdentity = true, ColumnName = "customer_coupon_id")] - public int CustomerCouponId { get; set; } - - - /// - /// 描述 : - /// 空值 : false - /// - [JsonConverter(typeof(ValueToStringConverter))] - [SugarColumn(IsPrimaryKey = true, IsIdentity = false, ColumnName = "customer_coupon_guid")] - public long CustomerCouponGuid { get; set; } - - - /// - /// 描述 :优惠劵guid - /// 空值 : false - /// - [JsonConverter(typeof(ValueToStringConverter))] - [SugarColumn(ColumnName = "coupon_guid")] - public long CouponGuid { get; set; } - - - /// - /// 描述 :客户guid - /// 空值 : false - /// - [JsonConverter(typeof(ValueToStringConverter))] - [SugarColumn(ColumnName = "customer_guid")] - public long CustomerGuid { get; set; } - - - /// - /// 描述 :是否过期 - /// 空值 : false - /// - [SugarColumn(ColumnName = "customer_coupon_is_expired")] - public int CustomerCouponIsExpired { get; set; } - - - /// - /// 描述 :是否已使用 - /// 空值 : false - /// - [SugarColumn(ColumnName = "customer_coupon_is_used")] - public int CustomerCouponIsUsed { get; set; } - - - - - - - } -} \ No newline at end of file diff --git a/ARW.Model/Models/Business/OrderManage/OrderCustomerAddreses/OrderCustomerAddress.cs b/ARW.Model/Models/Business/OrderManage/OrderCustomerAddreses/OrderCustomerAddress.cs deleted file mode 100644 index 7e86b85..0000000 --- a/ARW.Model/Models/Business/OrderManage/OrderCustomerAddreses/OrderCustomerAddress.cs +++ /dev/null @@ -1,114 +0,0 @@ -using System; -using System.Collections.Generic; -using SqlSugar; -using OfficeOpenXml.Attributes; -using Newtonsoft.Json; - -namespace ARW.Model.Models.Business.OrderManage.OrderCustomerAddreses -{ - /// - /// 订单收货地址记录,数据实体对象 - /// - /// @author lwh - /// @date 2023-08-29 - /// - [SugarTable("tb_order_customer_address")] - public class OrderCustomerAddress : BusinessBase - { - - /// - /// 描述 : - /// 空值 : false - /// - [SugarColumn(IsPrimaryKey = true, IsIdentity = true, ColumnName = "order_customer_address_id")] - public int OrderCustomerAddressId { get; set; } - - - /// - /// 描述 : - /// 空值 : false - /// - [JsonConverter(typeof(ValueToStringConverter))] - [SugarColumn(IsPrimaryKey = true, IsIdentity = false, ColumnName = "order_customer_address_guid")] - public long OrderCustomerAddressGuid { get; set; } - - - /// - /// 描述 :订单guid - /// 空值 : false - /// - [JsonConverter(typeof(ValueToStringConverter))] - [SugarColumn(ColumnName = "order_guid")] - public long OrderGuid { get; set; } - - - /// - /// 描述 :客户guid - /// 空值 : false - /// - [JsonConverter(typeof(ValueToStringConverter))] - [SugarColumn(ColumnName = "customer_guid")] - public long CustomerGuid { get; set; } - - - /// - /// 描述 :客户地址guid - /// 空值 : false - /// - [JsonConverter(typeof(ValueToStringConverter))] - [SugarColumn(ColumnName = "customer_address_guid")] - public long CustomerAddressGuid { get; set; } - - - /// - /// 描述 :收货人姓名 - /// 空值 : false - /// - [SugarColumn(ColumnName = "consignee_name")] - public string ConsigneeName { get; set; } - - - /// - /// 描述 :联系电话 - /// 空值 : false - /// - public string Phont { get; set; } - - - /// - /// 描述 :省份ID - /// 空值 : false - /// - [SugarColumn(ColumnName = "province_id")] - public int ProvinceId { get; set; } - - - /// - /// 描述 :城市ID - /// 空值 : false - /// - [SugarColumn(ColumnName = "city_id")] - public int CityId { get; set; } - - - /// - /// 描述 :区/县ID - /// 空值 : false - /// - [SugarColumn(ColumnName = "region_id")] - public int RegionId { get; set; } - - - /// - /// 描述 :详细地址 - /// 空值 : false - /// - public string Detail { get; set; } - - - - - - - } -} \ No newline at end of file diff --git a/ARW.Model/Models/Business/OrderManage/OrderGoodss/OrderGoods.cs b/ARW.Model/Models/Business/OrderManage/OrderGoodss/OrderGoods.cs deleted file mode 100644 index b44add6..0000000 --- a/ARW.Model/Models/Business/OrderManage/OrderGoodss/OrderGoods.cs +++ /dev/null @@ -1,91 +0,0 @@ -using System; -using System.Collections.Generic; -using SqlSugar; -using OfficeOpenXml.Attributes; -using Newtonsoft.Json; - -namespace ARW.Model.Models.Business.OrderManage.OrderGoodss -{ - /// - /// 订单商品记录,数据实体对象 - /// - /// @author lwh - /// @date 2023-09-01 - /// - [SugarTable("tb_order_goods")] - public class OrderGoods : BusinessBase - { - - /// - /// 描述 : - /// 空值 : false - /// - [SugarColumn(IsPrimaryKey = true, IsIdentity = true, ColumnName = "order_goods_id")] - public int OrderGoodsId { get; set; } - - - /// - /// 描述 : - /// 空值 : false - /// - [JsonConverter(typeof(ValueToStringConverter))] - [SugarColumn(IsPrimaryKey = true, IsIdentity = false, ColumnName = "order_goods_guid")] - public long OrderGoodsGuid { get; set; } - - - /// - /// 描述 :订单guid - /// 空值 : false - /// - [JsonConverter(typeof(ValueToStringConverter))] - [SugarColumn(ColumnName = "order_guid")] - public long OrderGuid { get; set; } - - - /// - /// 描述 :商品guid - /// 空值 : false - /// - [JsonConverter(typeof(ValueToStringConverter))] - [SugarColumn(ColumnName = "goods_guid")] - public long GoodsGuid { get; set; } - - - /// - /// 描述 :商品sku唯一标识 - /// 空值 : true - /// - [SugarColumn(ColumnName = "goods_sku_id")] - public int? GoodsSkuId { get; set; } - - - /// - /// 描述 :商品单价 - /// 空值 : false - /// - [SugarColumn(ColumnName = "goods_price")] - public decimal GoodsPrice { get; set; } - - - /// - /// 描述 :商品购买数量 - /// 空值 : false - /// - [SugarColumn(ColumnName = "goods_total_num")] - public int GoodsTotalNum { get; set; } - - - /// - /// 描述 :商品总额(单价 × 数量) - /// 空值 : false - /// - [SugarColumn(ColumnName = "goods_total_amoun")] - public decimal GoodsTotalAmoun { get; set; } - - - - - - - } -} \ No newline at end of file diff --git a/ARW.Model/Models/Business/OrderManage/OrderRefunds/OrderRefund.cs b/ARW.Model/Models/Business/OrderManage/OrderRefunds/OrderRefund.cs deleted file mode 100644 index 38c2723..0000000 --- a/ARW.Model/Models/Business/OrderManage/OrderRefunds/OrderRefund.cs +++ /dev/null @@ -1,235 +0,0 @@ -using System; -using System.Collections.Generic; -using SqlSugar; -using OfficeOpenXml.Attributes; -using Newtonsoft.Json; - -namespace ARW.Model.Models.Business.OrderManage.OrderRefunds -{ - /// - /// 售后单记录表,数据实体对象 - /// - /// @author lwh - /// @date 2023-08-29 - /// - [SugarTable("tb_order_refund")] - public class OrderRefund : BusinessBase - { - - /// - /// 描述 : - /// 空值 : false - /// - [EpplusTableColumn(Header = "OrderRefundId")] - [SugarColumn(IsPrimaryKey = true, IsIdentity = true, ColumnName = "order_refund_id")] - public int OrderRefundId { get; set; } - - - /// - /// 描述 : - /// 空值 : false - /// - [EpplusTableColumn(Header = "OrderRefundGuid")] - [JsonConverter(typeof(ValueToStringConverter))] - [SugarColumn(IsPrimaryKey = true, IsIdentity = false, ColumnName = "order_refund_guid")] - public long OrderRefundGuid { get; set; } - - - /// - /// 描述 :店铺guid - /// 空值 : false - /// - [EpplusTableColumn(Header = "店铺guid")] - [JsonConverter(typeof(ValueToStringConverter))] - [SugarColumn(ColumnName = "shop_guid")] - public long ShopGuid { get; set; } - - - /// - /// 描述 :订单guid - /// 空值 : false - /// - [EpplusTableColumn(Header = "订单guid")] - [JsonConverter(typeof(ValueToStringConverter))] - [SugarColumn(ColumnName = "order_guid")] - public long OrderGuid { get; set; } - - - /// - /// 描述 :客户guid - /// 空值 : false - /// - [EpplusTableColumn(Header = "客户guid")] - [JsonConverter(typeof(ValueToStringConverter))] - [SugarColumn(ColumnName = "customer_guid")] - public long CustomerGuid { get; set; } - - - /// - /// 描述 :售后类型(1退货退款 2退款(无需退货) 3换货) - /// 空值 : false - /// - [EpplusTableColumn(Header = "售后类型(1退货退款 2退款(无需退货) 3换货)")] - [SugarColumn(ColumnName = "refund_type")] - public int RefundType { get; set; } - - - /// - /// 描述 :客户退货原因 - /// 空值 : false - /// - [EpplusTableColumn(Header = "客户退货原因")] - [SugarColumn(ColumnName = "refund_reason")] - public int RefundReason { get; set; } - - - /// - /// 描述 :客户退款说明 - /// 空值 : true - /// - [EpplusTableColumn(Header = "客户退款说明")] - [SugarColumn(ColumnName = "customer_refund_desc")] - public string CustomerRefundDesc { get; set; } - - - /// - /// 描述 :客户退款凭证 - /// 空值 : true - /// - [EpplusTableColumn(Header = "客户退款凭证")] - [SugarColumn(ColumnName = "customer_refund_img")] - public string CustomerRefundImg { get; set; } - - - /// - /// 描述 :商品收货状态(1未收到货 2已收到货) - /// 空值 : false - /// - [EpplusTableColumn(Header = "商品收货状态(1未收到货 2已收到货)")] - [SugarColumn(ColumnName = "goods_receive_status")] - public int GoodsReceiveStatus { get; set; } - - - /// - /// 描述 :商家审核状态(1待审核 2已同意 3已拒绝) - /// 空值 : false - /// - [EpplusTableColumn(Header = "商家审核状态(1待审核 2已同意 3已拒绝)")] - [SugarColumn(ColumnName = "merchant_audit_status")] - public int MerchantAuditStatus { get; set; } - - - /// - /// 描述 :商家拒绝原因(说明) - /// 空值 : true - /// - [EpplusTableColumn(Header = "商家拒绝原因(说明)")] - [SugarColumn(ColumnName = "merchant_refuse_desc")] - public string MerchantRefuseDesc { get; set; } - - - /// - /// 描述 :退款金额 - /// 空值 : false - /// - [EpplusTableColumn(Header = "退款金额")] - [SugarColumn(ColumnName = "refund_money")] - public decimal RefundMoney { get; set; } - - /// - /// 描述 :实际退款金额 - /// 空值 : false - /// - [EpplusTableColumn(Header = "实际退款金额")] - [SugarColumn(ColumnName = "refund_actual_money")] - public decimal RefundActualMoney { get; set; } - - - /// - /// 描述 :商家退货地址guid - /// 空值 : true - /// - [EpplusTableColumn(Header = "商家退货地址guid")] - [JsonConverter(typeof(ValueToStringConverter))] - [SugarColumn(ColumnName = "shop_refund_address_guid")] - public long? ShopRefundAddressGuid { get; set; } - - - /// - /// 描述 :用户是否发货(1未发货 2已发货) - /// 空值 : false - /// - [EpplusTableColumn(Header = "用户是否发货(1未发货 2已发货)")] - [SugarColumn(ColumnName = "is_customer_send")] - public int IsCustomerSend { get; set; } - - - /// - /// 描述 :客户发货时间 - /// 空值 : true - /// - [EpplusTableColumn(Header = "客户发货时间", NumberFormat = "yyyy-MM-dd HH:mm:ss")] - [SugarColumn(ColumnName = "customer_send_time")] - public DateTime? CustomerSendTime { get; set; } - - - /// - /// 描述 :商家是否收货(1未收货 2已收货) - /// 空值 : false - /// - [EpplusTableColumn(Header = "商家是否收货(1未收货 2已收货)")] - [SugarColumn(ColumnName = "is_merchant_receive")] - public int IsMerchantReceive { get; set; } - - - /// - /// 描述 :商家收货时间 - /// 空值 : true - /// - [EpplusTableColumn(Header = "商家收货时间", NumberFormat = "yyyy-MM-dd HH:mm:ss")] - [SugarColumn(ColumnName = "merchant_receive_time")] - public DateTime? MerchantReceiveTime { get; set; } - - /// - /// 描述 :客户发货物流公司guid - /// 空值 : true - /// - [EpplusTableColumn(Header = "客户发货物流公司guid")] - [JsonConverter(typeof(ValueToStringConverter))] - [SugarColumn(ColumnName = "logistics_company_guid")] - public long? LogisticsCompanyGuid { get; set; } - - - /// - /// 描述 :客户发货物流单号 - /// 空值 : true - /// - [EpplusTableColumn(Header = "客户发货物流单号")] - [SugarColumn(ColumnName = "express_no")] - public string ExpressNo { get; set; } - - - /// - /// 描述 :客户发货备注 - /// 空值 : true - /// - [EpplusTableColumn(Header = "客户发货备注")] - [SugarColumn(ColumnName = "customer_waybill_remark")] - public string CustomerWaybillRemark { get; set; } - - - /// - /// 描述 :售后单状态(1进行中 2已拒绝 3已完成 4已取消) - /// 空值 : false - /// - [EpplusTableColumn(Header = "售后单状态(1进行中 2已拒绝 3已完成 4已取消)")] - [SugarColumn(ColumnName = "order_refund_status")] - public int OrderRefundStatus { get; set; } - - - - - - - } -} \ No newline at end of file diff --git a/ARW.Model/Models/Business/OrderManage/Orders/Order.cs b/ARW.Model/Models/Business/OrderManage/Orders/Order.cs deleted file mode 100644 index 5011d78..0000000 --- a/ARW.Model/Models/Business/OrderManage/Orders/Order.cs +++ /dev/null @@ -1,331 +0,0 @@ -using System; -using System.Collections.Generic; -using SqlSugar; -using OfficeOpenXml.Attributes; -using Newtonsoft.Json; - -namespace ARW.Model.Models.Business.OrderManage.Orders -{ - /// - /// 订单,数据实体对象 - /// - /// @author lwh - /// @date 2023-08-29 - /// - [SugarTable("tb_order")] - public class Order : BusinessBase - { - - /// - /// 描述 : - /// 空值 : false - /// - [EpplusTableColumn(Header = "OrderId")] - [SugarColumn(IsPrimaryKey = true, IsIdentity = true, ColumnName = "order_id")] - public int OrderId { get; set; } - - - /// - /// 描述 : - /// 空值 : false - /// - [EpplusTableColumn(Header = "OrderGuid")] - [JsonConverter(typeof(ValueToStringConverter))] - [SugarColumn(IsPrimaryKey = true, IsIdentity = false, ColumnName = "order_guid")] - public long OrderGuid { get; set; } - - - /// - /// 描述 :订单流水guid - /// 空值 : false - /// - [EpplusTableColumn(Header = "订单流水guid")] - [JsonConverter(typeof(ValueToStringConverter))] - [SugarColumn(ColumnName = "payment_guid")] - public long PaymentGuid { get; set; } - - - /// - /// 描述 :客户guid - /// 空值 : false - /// - [EpplusTableColumn(Header = "客户guid")] - [JsonConverter(typeof(ValueToStringConverter))] - [SugarColumn(ColumnName = "customer_guid")] - public long CustomerGuid { get; set; } - - - /// - /// 描述 :店铺guid - /// 空值 : false - /// - [EpplusTableColumn(Header = "店铺guid")] - [JsonConverter(typeof(ValueToStringConverter))] - [SugarColumn(ColumnName = "shop_guid")] - public long ShopGuid { get; set; } - - /// - /// 描述 :购物车Id - /// 空值 : false - /// - [EpplusTableColumn(Header = "购物车Id")] - [JsonConverter(typeof(ValueToStringConverter))] - [SugarColumn(ColumnName = "cart_ids")] - public string CartIds { get; set; } - - - /// - /// 描述 :订单号 - /// 空值 : false - /// - [EpplusTableColumn(Header = "订单号")] - [SugarColumn(ColumnName = "order_number")] - public string OrderNumber { get; set; } - - - /// - /// 描述 :商品总金额 - /// 空值 : false - /// - [EpplusTableColumn(Header = "商品总金额")] - [SugarColumn(ColumnName = "goods_total_amoun")] - public decimal GoodsTotalAmoun { get; set; } - - - /// - /// 描述 :订单金额 - /// 空值 : false - /// - [EpplusTableColumn(Header = "订单金额")] - [SugarColumn(ColumnName = "order_amount")] - public decimal OrderAmount { get; set; } - - - /// - /// 描述 :优惠券guid - /// 空值 : true - /// - [EpplusTableColumn(Header = "优惠券guid")] - [JsonConverter(typeof(ValueToStringConverter))] - [SugarColumn(ColumnName = "coupon_guid")] - public long? CouponGuid { get; set; } - - - /// - /// 描述 :优惠券抵扣金额 - /// 空值 : true - /// - [EpplusTableColumn(Header = "优惠券抵扣金额")] - [SugarColumn(ColumnName = "coupon_money")] - public decimal CouponMoney { get; set; } - - - /// - /// 描述 :积分抵扣金额 - /// 空值 : true - /// - [EpplusTableColumn(Header = "积分抵扣金额")] - [SugarColumn(ColumnName = "points_money")] - public decimal PointsMoney { get; set; } - - - /// - /// 描述 :积分抵扣数量 - /// 空值 : true - /// - [EpplusTableColumn(Header = "积分抵扣数量")] - [SugarColumn(ColumnName = "points_num")] - public decimal PointsNum { get; set; } - - - /// - /// 描述 :实际付款金额(包含运费) - /// 空值 : false - /// - [EpplusTableColumn(Header = "实际付款金额(包含运费)")] - [SugarColumn(ColumnName = "pay_price")] - public decimal PayPrice { get; set; } - - - /// - /// 描述 :后台修改的订单金额(差价) - /// 空值 : true - /// - [EpplusTableColumn(Header = "后台修改的订单金额(差价)")] - [SugarColumn(ColumnName = "update_price")] - public decimal UpdatePrice { get; set; } - - - /// - /// 描述 :买家留言 - /// 空值 : true - /// - [EpplusTableColumn(Header = "买家留言")] - [SugarColumn(ColumnName = "order_remark")] - public string OrderRemark { get; set; } - - - /// - /// 描述 :支付方式(1微信支付 2余额支付) - /// 空值 : false - /// - [EpplusTableColumn(Header = "支付方式(1微信支付 2余额支付)")] - [SugarColumn(ColumnName = "pay_type")] - public int PayType { get; set; } - - - /// - /// 描述 :付款状态(1未付款 2已付款) - /// 空值 : false - /// - [EpplusTableColumn(Header = "付款状态(1未付款 2已付款)")] - [SugarColumn(ColumnName = "pay_status")] - public int PayStatus { get; set; } - - - /// - /// 描述 :付款时间 - /// 空值 : false - /// - [EpplusTableColumn(Header = "付款时间", NumberFormat = "yyyy-MM-dd HH:mm:ss")] - [SugarColumn(ColumnName = "pay_time")] - public DateTime? PayTime { get; set; } - - - /// - /// 描述 :配送方式(1快递配送) - /// 空值 : false - /// - [EpplusTableColumn(Header = "配送方式(1快递配送)")] - [SugarColumn(ColumnName = "delivery_type")] - public int DeliveryType { get; set; } - - - /// - /// 描述 :运费金额 - /// 空值 : false - /// - [EpplusTableColumn(Header = "运费金额")] - [SugarColumn(ColumnName = "express_price")] - public decimal ExpressPrice { get; set; } - - - /// - /// 描述 :物流公司guid - /// 空值 : true - /// - [EpplusTableColumn(Header = "物流公司guid")] - [JsonConverter(typeof(ValueToStringConverter))] - [SugarColumn(ColumnName = "logistics_company_guid")] - public long? LogisticsCompanyGuid { get; set; } - - - /// - /// 描述 :物流公司 - /// 空值 : true - /// - [EpplusTableColumn(Header = "物流公司")] - [SugarColumn(ColumnName = "logistics_company")] - public string LogisticsCompany { get; set; } - - - /// - /// 描述 :物流单号 - /// 空值 : true - /// - [EpplusTableColumn(Header = "物流单号")] - [SugarColumn(ColumnName = "logistics_tracking_number")] - public string LogisticsTrackingNumber { get; set; } - - - /// - /// 描述 :发货状态(1未发货 2已发货) - /// 空值 : false - /// - [EpplusTableColumn(Header = "发货状态(1未发货 2已发货)")] - [SugarColumn(ColumnName = "delivery_status")] - public int DeliveryStatus { get; set; } - - - /// - /// 描述 :发货时间 - /// 空值 : true - /// - [EpplusTableColumn(Header = "发货时间", NumberFormat = "yyyy-MM-dd HH:mm:ss")] - [SugarColumn(ColumnName = "delivery_time")] - public DateTime? DeliveryTime { get; set; } - - - /// - /// 描述 :收货状态(1未收货 2已收货) - /// 空值 : false - /// - [EpplusTableColumn(Header = "收货状态(1未收货 2已收货)")] - [SugarColumn(ColumnName = "receipt_status")] - public int ReceiptStatus { get; set; } - - - /// - /// 描述 :收货时间 - /// 空值 : true - /// - [EpplusTableColumn(Header = "收货时间", NumberFormat = "yyyy-MM-dd HH:mm:ss")] - [SugarColumn(ColumnName = "receipt_time")] - public DateTime? ReceiptTime { get; set; } - - - /// - /// 描述 :订单状态(1进行中 2取消 3待取消 4已完成) - /// 空值 : false - /// - [EpplusTableColumn(Header = "订单状态(1进行中 2取消 3待取消 4已完成)")] - [SugarColumn(ColumnName = "order_status")] - public int OrderStatus { get; set; } - - - /// - /// 描述 :赠送的积分数量 - /// 空值 : true - /// - [EpplusTableColumn(Header = "赠送的积分数量")] - [SugarColumn(ColumnName = "points_bonus")] - public decimal PointsBonus { get; set; } - - - /// - /// 描述 :订单是否已结算(1未结算 2已结算) - /// 空值 : false - /// - [EpplusTableColumn(Header = "订单是否已结算(1未结算 2已结算)")] - [SugarColumn(ColumnName = "is_settled")] - public int IsSettled { get; set; } - - - /// - /// 描述 :微信支付交易号 - /// 空值 : true - /// - [EpplusTableColumn(Header = "微信支付交易号")] - [SugarColumn(ColumnName = "transaction_id")] - public string TransactionId { get; set; } - - - /// - /// 描述 :是否已评价(1否 2是) - /// 空值 : false - /// - [EpplusTableColumn(Header = "是否已评价(1否 2是)")] - [SugarColumn(ColumnName = "is_comment")] - public int IsComment { get; set; } - - - /// - /// 描述 :订单来源(1普通订单) - /// 空值 : false - /// - [EpplusTableColumn(Header = "订单来源(1普通订单)")] - [SugarColumn(ColumnName = "order_source")] - public int OrderSource { get; set; } - - } -} \ No newline at end of file diff --git a/ARW.Model/Models/Business/OrderTasks/OrderTask.cs b/ARW.Model/Models/Business/OrderTasks/OrderTask.cs deleted file mode 100644 index c3bfd9a..0000000 --- a/ARW.Model/Models/Business/OrderTasks/OrderTask.cs +++ /dev/null @@ -1,91 +0,0 @@ -using System; -using System.Collections.Generic; -using SqlSugar; -using OfficeOpenXml.Attributes; -using Newtonsoft.Json; - -namespace ARW.Model.Models.Business.OrderTasks -{ - /// - /// 订单取消任务,数据实体对象 - /// - /// @author lwh - /// @date 2023-10-23 - /// - [SugarTable("tb_order_task")] - public class OrderTask : BusinessBase - { - - /// - /// 描述 :订单取消任务id - /// 空值 : false - /// - [SugarColumn(IsPrimaryKey = true, IsIdentity = true, ColumnName = "order_task_id")] - public int OrderTaskId { get; set; } - - - /// - /// 描述 :订单取消任务guid - /// 空值 : false - /// - [JsonConverter(typeof(ValueToStringConverter))] - [SugarColumn(IsPrimaryKey = true, IsIdentity = false, ColumnName = "order_task_guid")] - public long OrderTaskGuid { get; set; } - - - /// - /// 描述 :客户guid(外键) - /// 空值 : false - /// - [JsonConverter(typeof(ValueToStringConverter))] - [SugarColumn(ColumnName = "customer_guid")] - public long CustomerGuid { get; set; } - - - /// - /// 描述 :订单guid(外键) - /// 空值 : false - /// - [JsonConverter(typeof(ValueToStringConverter))] - [SugarColumn(ColumnName = "order_guid")] - public long OrderGuid { get; set; } - - - /// - /// 描述 :订单结束时间 - /// 空值 : false - /// - [SugarColumn(ColumnName = "end_time")] - public DateTime? EndTime { get; set; } - - - /// - /// 描述 :订单支付状态(1未支付 2已支付) - /// 空值 : false - /// - [SugarColumn(ColumnName = "pay_status")] - public int PayStatus { get; set; } - - - /// - /// 描述 :订单取消状态(1待取消 2已取消) - /// 空值 : false - /// - [SugarColumn(ColumnName = "cancel_status")] - public int CancelStatus { get; set; } - - - /// - /// 描述 :失败原因 - /// 空值 : true - /// - [SugarColumn(ColumnName = "error_msg")] - public string ErrorMsg { get; set; } - - - - - - - } -} \ No newline at end of file diff --git a/ARW.Model/Models/Business/ShopManager/ShopAddresss/ShopAddress.cs b/ARW.Model/Models/Business/ShopManager/ShopAddresss/ShopAddress.cs deleted file mode 100644 index df0881b..0000000 --- a/ARW.Model/Models/Business/ShopManager/ShopAddresss/ShopAddress.cs +++ /dev/null @@ -1,122 +0,0 @@ -using System; -using System.Collections.Generic; -using SqlSugar; -using OfficeOpenXml.Attributes; -using Newtonsoft.Json; - -namespace ARW.Model.Models.Business.ShopManager.ShopAddresss -{ - /// - /// 店铺地址,数据实体对象 - /// - /// @author lwh - /// @date 2023-06-15 - /// - [SugarTable("tb_shop_address")] - public class ShopAddress : BusinessBase - { - - /// - /// 描述 : - /// 空值 : false - /// - [EpplusTableColumn(Header = "ShopAddressId")] - [SugarColumn(IsPrimaryKey = true, IsIdentity = true, ColumnName = "shop_address_id")] - public int ShopAddressId { get; set; } - - - /// - /// 描述 : - /// 空值 : false - /// - [EpplusTableColumn(Header = "ShopAddressGuid")] - [JsonConverter(typeof(ValueToStringConverter))] - [SugarColumn(IsPrimaryKey = true, ColumnName = "shop_address_guid")] - public long ShopAddressGuid { get; set; } - - /// - /// 描述 : 店铺guid - /// 空值 : false - /// - [JsonConverter(typeof(ValueToStringConverter))] - [SugarColumn(ColumnName = "shop_guid")] - public long ShopGuid { get; set; } - - /// - /// 描述 :地址类型 - /// 空值 : false - /// - [EpplusTableColumn(Header = "地址类型")] - [SugarColumn(ColumnName = "shop_address_type")] - public int ShopAddressType { get; set; } - - - /// - /// 描述 :省id - /// 空值 : false - /// - [EpplusTableColumn(Header = "省id")] - [SugarColumn(ColumnName = "province_id")] - public int ProvinceId { get; set; } - - - /// - /// 描述 :市id - /// 空值 : false - /// - [EpplusTableColumn(Header = "市id")] - [SugarColumn(ColumnName = "city_id")] - public int CityId { get; set; } - - - /// - /// 描述 :区id - /// 空值 : false - /// - [EpplusTableColumn(Header = "区id")] - [SugarColumn(ColumnName = "district_id")] - public int DistrictId { get; set; } - - - /// - /// 描述 :联系人姓名 - /// 空值 : false - /// - [EpplusTableColumn(Header = "联系人姓名")] - [SugarColumn(ColumnName = "shop_address_contact_name")] - public string ShopAddressContactName { get; set; } - - - /// - /// 描述 :联系电话 - /// 空值 : false - /// - [EpplusTableColumn(Header = "联系电话")] - [SugarColumn(ColumnName = "shop_address_contact_number")] - public string ShopAddressContactNumber { get; set; } - - - /// - /// 描述 :详细地址 - /// 空值 : false - /// - [EpplusTableColumn(Header = "详细地址")] - [SugarColumn(ColumnName = "shop_address_detailed_address")] - public string ShopAddressDetailedAddress { get; set; } - - - /// - /// 描述 :排序 - /// 空值 : false - /// - [EpplusTableColumn(Header = "排序")] - [SugarColumn(ColumnName = "shop_address_sort")] - public int ShopAddressSort { get; set; } - - - - - - - } -} \ No newline at end of file diff --git a/ARW.Model/Models/Business/ShopManager/Shops/Shop.cs b/ARW.Model/Models/Business/ShopManager/Shops/Shop.cs deleted file mode 100644 index fb3e19b..0000000 --- a/ARW.Model/Models/Business/ShopManager/Shops/Shop.cs +++ /dev/null @@ -1,145 +0,0 @@ -using System; -using System.Collections.Generic; -using SqlSugar; -using OfficeOpenXml.Attributes; -using Newtonsoft.Json; - -namespace ARW.Model.Models.Business.ShopManager.Shops -{ - /// - /// 店铺,数据实体对象 - /// - /// @author lwh - /// @date 2023-06-09 - /// - [SugarTable("tb_shop")] - public class Shop : BusinessBase - { - - /// - /// 描述 : - /// 空值 : false - /// - [EpplusTableColumn(Header = "ShopId")] - [SugarColumn(IsPrimaryKey = true, IsIdentity = true, ColumnName = "shop_id")] - public int ShopId { get; set; } - - - /// - /// 描述 : - /// 空值 : false - /// - [EpplusTableColumn(Header = "ShopGuid")] - [JsonConverter(typeof(ValueToStringConverter))] - [SugarColumn(IsPrimaryKey = true, IsIdentity = false, ColumnName = "shop_guid")] - public long ShopGuid { get; set; } - - - /// - /// 描述 :用户id - /// 空值 : true - /// - [EpplusTableColumn(Header = "用户id")] - [SugarColumn(ColumnName = "shop_user_id")] - public int? ShopUserId { get; set; } - - - /// - /// 描述 :客户guid - /// 空值 : true - /// - [EpplusTableColumn(Header = "客户guid")] - [JsonConverter(typeof(ValueToStringConverter))] - [SugarColumn(ColumnName = "shop_customer_guid")] - public long? ShopCustomerGuid { get; set; } - - - /// - /// 描述 :经营类目guid - /// 空值 : false - /// - [EpplusTableColumn(Header = "经营类目guid")] - [JsonConverter(typeof(ValueToStringConverter))] - [SugarColumn(ColumnName = "shop_business_category_guid")] - public long ShopBusinessCategoryGuid { get; set; } - - - /// - /// 描述 :图标 - /// 空值 : false - /// - [EpplusTableColumn(Header = "图标")] - [SugarColumn(ColumnName = "shop_logo")] - public string ShopLogo { get; set; } - - - /// - /// 描述 :营业执照 - /// 空值 : false - /// - [EpplusTableColumn(Header = "营业执照")] - [SugarColumn(ColumnName = "shop_business_license")] - public string ShopBusinessLicense { get; set; } - - - /// - /// 描述 :名称 - /// 空值 : false - /// - [EpplusTableColumn(Header = "名称")] - [SugarColumn(ColumnName = "shop_name")] - public string ShopName { get; set; } - - - /// - /// 描述 :简介 - /// 空值 : false - /// - [EpplusTableColumn(Header = "简介")] - [SugarColumn(ColumnName = "shop_intro")] - public string ShopIntro { get; set; } - - - /// - /// 描述 :排序 - /// 空值 : false - /// - [EpplusTableColumn(Header = "排序")] - [SugarColumn(ColumnName = "shop_sort")] - public int ShopSort { get; set; } - - - /// - /// 描述 :销售单量 - /// 空值 : false - /// - [EpplusTableColumn(Header = "销售单量")] - [SugarColumn(ColumnName = "shop_sales_order_count")] - public int ShopSalesOrderCount { get; set; } - - - /// - /// 描述 :审核状态 - /// 空值 : false - /// - [EpplusTableColumn(Header = "审核状态")] - [SugarColumn(ColumnName = "shop_audit_status")] - public int ShopAuditStatus { get; set; } - - - /// - /// 描述 :审核人 - /// 空值 : false - /// - [EpplusTableColumn(Header = "审核人")] - [JsonConverter(typeof(ValueToStringConverter))] - [SugarColumn(ColumnName = "shop_audit_user_guid")] - public long ShopAuditUserGuid { get; set; } - - - - - - - } -} \ No newline at end of file diff --git a/ARW.Model/Vo/Api/Carts/CartApiVo.cs b/ARW.Model/Vo/Api/Carts/CartApiVo.cs deleted file mode 100644 index df49953..0000000 --- a/ARW.Model/Vo/Api/Carts/CartApiVo.cs +++ /dev/null @@ -1,169 +0,0 @@ -using Newtonsoft.Json; -using OfficeOpenXml.Attributes; -using SqlSugar; -using System; -using System.Collections.Generic; - -namespace ARW.Model.Vo.Api.Carts -{ - /// - /// 购物车记录展示对象Api - /// - /// @author lwh - /// @date 2023-07-20 - /// - public class CartVoApi - { - - - /// - /// 描述 : 店铺Id - /// - [JsonConverter(typeof(ValueToStringConverter))] - public long StoreId { get; set; } - - - /// - /// 描述 : 店铺名称 - /// - public string StoreName { get; set; } - - /// - /// 优惠券的商品列表 - /// - public List PromotionGoodsList { get; set; } - - } - - - /// - /// 购物车记录详情展示对象Api - /// - public class PromotionGoods - { - /// - /// 优惠券Id - /// - public int PromotionId { get; set; } - - /// - /// 优惠券名称 - /// - public string Title { get; set; } - - /// - /// 优惠券编码 - /// - public string PromotionCode { get; set; } = "EMPTY_PROMOTION"; - - /// - /// 优惠价类型 - /// - public string Tag { get; set; } - - /// - /// 优惠券介绍 - /// - public string Description { get; set; } - - public List GoodsPromotionList { get; set; } - - } - - - public class GoodsPromotion - { - /// - /// 购物车商品Guid - /// - public int CartId { get; set; } - - /// - /// 店铺Id - /// - [JsonConverter(typeof(ValueToStringConverter))] - public long StoreId { get; set; } - - /// - /// 店铺名称 - /// - public string StoreName { get; set; } - - /// - /// 商品Id - /// - - [JsonConverter(typeof(ValueToStringConverter))] - public long SpuId { get; set; } - - /// - /// 商品SkuId - /// - public int SkuId { get; set; } - - /// - /// 商品封面 - /// - public string Thumb { get; set; } - - - /// - /// 商品名称 - /// - public string Title { get; set; } - - /// - /// 购物车商品数量 - /// - public int Quantity { get; set; } - - /// - /// 库存状态 - /// - public bool StockStatus { get; set; } - - /// - /// 库存总数 - /// - public int StockQuantity { get; set; } - - - /// - /// Sku库存总数 - /// - public int SkuStockQuantity { get; set; } - - /// - /// 价格 - /// - public decimal Price { get; set; } - - /// - /// 划线价格 - /// - public decimal OriginPrice { get; set;} - - /// - /// 商品规格详情 - /// - public List SpecInfo { get; set; } - - /// - /// 购物车加入时间 - /// - public DateTime JoinCartTime { get; set; } - - /// - /// 是否选中 - /// - public bool IsSelected { get; set; } - } - - - public class SpecInfo - { - public string SpecTitle { get; set; } - public string SpecValue { get; set; } - } - -} diff --git a/ARW.Model/Vo/Api/Carts/CartListApiVo.cs b/ARW.Model/Vo/Api/Carts/CartListApiVo.cs deleted file mode 100644 index 7f13607..0000000 --- a/ARW.Model/Vo/Api/Carts/CartListApiVo.cs +++ /dev/null @@ -1,55 +0,0 @@ -using Newtonsoft.Json; -using OfficeOpenXml.Attributes; -using SqlSugar; -using System; -using System.Collections.Generic; - -namespace ARW.Model.Vo.Api.Carts -{ - /// - /// 购物车列表记录展示对象Api - /// - /// @author lwh - /// @date 2023-08-03 - /// - public class CartListVoApi - { - - /// - /// 描述 : 是否为空 - /// - public bool IsNotEmpty { get; set; } - - - /// - /// 描述 : 是否全选 - /// - public bool IsAllSelected { get; set; } - - - /// - /// 描述 : 总计 - /// - public decimal TotalAmount { get; set; } - - - /// - /// 描述 : 选中的商品总数 - /// - public int SelectedGoodsCount { get; set; } - - - /// - /// 描述 : 折扣总计 - /// - public decimal TotalDiscountAmount { get; set; } - - /// - /// 购物车信息 - /// - public List StoreGoods { get; set; } - - } - - -} diff --git a/ARW.Model/Vo/Api/Custom/CustomerAddresses/CustomerAddressApiVo.cs b/ARW.Model/Vo/Api/Custom/CustomerAddresses/CustomerAddressApiVo.cs deleted file mode 100644 index 1bf29ec..0000000 --- a/ARW.Model/Vo/Api/Custom/CustomerAddresses/CustomerAddressApiVo.cs +++ /dev/null @@ -1,128 +0,0 @@ -using Newtonsoft.Json; -using OfficeOpenXml.Attributes; -using SqlSugar; -using System; - -namespace ARW.Model.Vo.Api.Custom.CustomerAddresses -{ - /// - /// 客户收货地址展示对象Api - /// - /// @author admin - /// @date 2023-06-09 - /// - public class CustomerAddressVoApi - { - - - /// - /// 描述 : id - /// - public int CustomerAddressId { get; set; } - - - /// - /// 描述 : guid - /// - [JsonConverter(typeof(ValueToStringConverter))] - [EpplusIgnore] - public long CustomerAddressGuid { get; set; } - - - /// - /// 描述 :收货人名称 - /// - public string Name { get; set; } - - - /// - /// 描述 :收货电话 - /// - public string PhoneNumber { get; set; } - - - /// - /// 描述 :详细地址 - /// - public string Address { get; set; } - - /// - /// 描述 : 是否为默认地址 - /// - 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; } - - } - - - /// - /// 客户收货地址详情展示对象Api - /// - public class CustomerAddressApiDetailsVo - { - public int CustomerAddressId { get; set; } - - [JsonConverter(typeof(ValueToStringConverter))] - public long CustomerAddressGuid { get; set; } - - /// - /// 省名称 - /// - public string ProvinceName { get; set; } - - /// - /// 省编码 - /// - public string ProvinceCode { get; set; } - - - /// - /// 市名称 - /// - public string CityName { get; set; } - - /// - /// 市编码 - /// - public string CityCode { get; set; } - - - /// - /// 区名称 - /// - public string DistrictName { get; set; } - - /// - /// 区编码 - /// - public string DistrictCode { get; set; } - - - /// - /// 收货人名称 - /// - public string Name { get; set; } - - /// - /// 收货电话 - /// - public string Phone { get; set; } - - /// - /// 详细地址 - /// - public string DetailAddress { get; set; } - - - /// - /// 是否为默认地址 - /// - public bool IsDefault { get; set; } - - } - -} diff --git a/ARW.Model/Vo/Api/GoodsManager/GoodsCategorys/GoodsCategoryApiVo.cs b/ARW.Model/Vo/Api/GoodsManager/GoodsCategorys/GoodsCategoryApiVo.cs deleted file mode 100644 index 5f86141..0000000 --- a/ARW.Model/Vo/Api/GoodsManager/GoodsCategorys/GoodsCategoryApiVo.cs +++ /dev/null @@ -1,51 +0,0 @@ -using Newtonsoft.Json; -using OfficeOpenXml.Attributes; -using SqlSugar; -using System; -using ARW.Model.Models.Business.GoodsManager.GoodsCategorys; -using System.Collections.Generic; - -namespace ARW.Model.Vo.Api.GoodsManager.GoodsCategorys -{ - /// - /// 经营类目展示对象Api - /// - /// @author lwh - /// @date 2023-07-08 - /// - public class GoodsCategoryVoApi - { - - /// - /// 描述 : - /// - [JsonConverter(typeof(ValueToStringConverter))] - [SugarColumn(IsTreeKey = true)] - [EpplusIgnore] - public long GroupId { get; set; } - - /// - /// 描述 :父级guid - /// - [JsonConverter(typeof(ValueToStringConverter))] - public long ParentGuid { get; set; } - - - /// - /// 描述 :名称 - /// - public string Name { get; set; } - - /// - /// 描述 :图片 - /// - [EpplusIgnore] - public string Thumbnail { get; set; } - - - [JsonProperty(NullValueHandling = NullValueHandling.Ignore)] - [SugarColumn(IsIgnore = true)] - public List Children { get; set; } - } - -} diff --git a/ARW.Model/Vo/Api/GoodsManager/GoodsComments/GoodsCommentApiVo.cs b/ARW.Model/Vo/Api/GoodsManager/GoodsComments/GoodsCommentApiVo.cs deleted file mode 100644 index f853553..0000000 --- a/ARW.Model/Vo/Api/GoodsManager/GoodsComments/GoodsCommentApiVo.cs +++ /dev/null @@ -1,101 +0,0 @@ -using Newtonsoft.Json; -using OfficeOpenXml.Attributes; -using SqlSugar; -using System; -using System.Collections.Generic; - -namespace ARW.Model.Vo.Api.GoodsManager.GoodsComments -{ - /// - /// 商品评价展示对象Api - /// - /// @author admin - /// @date 2023-07-17 - /// - public class GoodsCommentVoApi - { - /// - /// 评价Id - /// - public int Uid { get; set; } - - /// - /// 描述 : 商品Id - /// - [JsonConverter(typeof(ValueToStringConverter))] - public long SpuId { get; set; } - - - /// - /// 描述 : 商品SkuId - /// - [JsonConverter(typeof(ValueToStringConverter))] - public long SkuId { get; set; } - - - /// - /// 描述 : 商品规格 - /// - public long SpecInfo { get; set; } - - /// - /// 描述 :评分分数 - /// - public float CommentScore { get; set; } - - /// - /// 描述 :评价内容 - /// - public string CommentContent { get; set; } - - /// - /// 描述 :评价图片 - /// - public string GoodsCommentImages { get; set; } - - /// - /// 描述 :评价 - /// - public List CommentResources { get; set; } - - - /// - /// 描述 : 评价用户名称 - /// - public string UserName { get; set; } - - - /// - /// 描述 :评价用户头像 - /// - public string UserHeadUrl { get; set; } - - - /// - /// 描述 : 是否匿名 - /// - public int IsAnonymity { get; set; } - - - /// - /// 描述 : 回复 - /// - public string SellerReply { get; set; } - - /// - /// 商品所选Sku - /// - public string GoodsDetailInfo { get; set; } - - public string CommentTime { get; set; } - } - - public class ResourcesItem - { - public string Src { get; set; } - public string Type { get; set; } - public string CoverSrc { get; set; } - } - - -} diff --git a/ARW.Model/Vo/Api/GoodsManager/GoodsComments/GoodsCommentCountApiVo.cs b/ARW.Model/Vo/Api/GoodsManager/GoodsComments/GoodsCommentCountApiVo.cs deleted file mode 100644 index 7f92522..0000000 --- a/ARW.Model/Vo/Api/GoodsManager/GoodsComments/GoodsCommentCountApiVo.cs +++ /dev/null @@ -1,50 +0,0 @@ -using Newtonsoft.Json; -using OfficeOpenXml.Attributes; -using SqlSugar; -using System; -using System.Collections.Generic; - -namespace ARW.Model.Vo.Api.GoodsManager.GoodsComments -{ - /// - /// 商品详情页评论数展示对象Api - /// - /// @author lwh - /// @date 2023-07-18 - /// - public class GoodsCommentCountApiVo - { - /// - /// 评价总数 - /// - public int CommentCount { get; set; } - - /// - /// 描述 : 差评总数 - /// - public int BadCount { get; set; } - - - /// - /// 描述 : 中评总数 - /// - public int MiddleCount { get; set; } - - /// - /// 描述 : 好评总数 - /// - public int GoodCount { get; set; } - - /// - /// 描述 : 带图总数 - /// - public int HasImageCount { get; set; } - - /// - /// 好评率 - /// - public decimal GoodRate { get; set; } - - } - -} diff --git a/ARW.Model/Vo/Api/GoodsManager/Goodss/GoodsApiVo.cs b/ARW.Model/Vo/Api/GoodsManager/Goodss/GoodsApiVo.cs deleted file mode 100644 index 75ffa22..0000000 --- a/ARW.Model/Vo/Api/GoodsManager/Goodss/GoodsApiVo.cs +++ /dev/null @@ -1,245 +0,0 @@ -using Newtonsoft.Json; -using OfficeOpenXml.Attributes; -using SqlSugar; -using System; -using System.Collections.Generic; - -namespace ARW.Model.Vo.Api.GoodsManager.Goodss -{ - /// - /// 商品展示对象Api - /// - /// @author lwh - /// @date 2023-07-09 - /// - public class GoodsVoApi - { - - /// - /// 描述 : 商品Id - /// - [JsonConverter(typeof(ValueToStringConverter))] - [EpplusIgnore] - public long SpuId { get; set; } - - - /// - /// 描述 :店铺guid - /// - [JsonConverter(typeof(ValueToStringConverter))] - public long ShopGuid { get; set; } - - - /// - /// 描述 :店铺名称 - /// - public string ShopName { get; set; } - - - /// - /// 描述 :商品类目guid - /// - [JsonConverter(typeof(ValueToStringConverter))] - public long CategoryIds { get; set; } - - - /// - /// 描述 :商品名称 - /// - public string Title { get; set; } - - - /// - /// 描述 :编码 - /// - public string GoodsCoding { get; set; } - - - /// - /// 描述 :主图视频 - /// - public string Video { get; set; } - - - /// - /// 描述 :视频封面 - /// - public string PrimaryImage { get; set; } - - - /// - /// 描述 :图片 - /// - public string Images { get; set; } - - public string Thumb { get; set; } - - - - /// - /// 描述 :价格(最低) - /// - public decimal Price { get; set; } - - /// - /// 描述 :划线价格(最低) - /// - public decimal OriginPrice { get; set; } - - - /// - /// 描述 :库存总量 - /// - public int SpuStockQuantity { get; set; } - - /// - /// 描述 :销量 - /// - public int SoldNum { get; set; } - - /// - /// 描述 :上下架状态(1上架 2下架) - /// - public int IsPutOnSale { get; set; } - - - } - - - /// - /// 商品详情展示对象Api - /// - public class GoodsApiDetailsVo - { - - /// - /// 描述 : 商品Id - /// - [JsonConverter(typeof(ValueToStringConverter))] - [EpplusIgnore] - public long SpuId { get; set; } - - - /// - /// 描述 :店铺guid - /// - [JsonConverter(typeof(ValueToStringConverter))] - public long ShopGuid { get; set; } - - /// - /// 描述 :商品类目guid - /// - [JsonConverter(typeof(ValueToStringConverter))] - public long CategoryIds { get; set; } - - /// - /// 描述 :店铺Logo - /// - public string ShopLogo { get; set; } - - /// - /// 描述 :店铺名称 - /// - public string ShopName { get; set; } - - /// - /// 描述 :店铺销售单量 - /// - public int ShopSalesOrderCount { get; set; } - - /// - /// 描述 :店铺简介 - /// - public string ShopIntro { get; set; } - - /// - /// 描述 :商品名称 - /// - public string Title { get; set; } - - - /// - /// 描述 :编码 - /// - public string GoodsCoding { get; set; } - - - /// - /// 描述 :主图视频 - /// - public string Video { get; set; } - - - /// - /// 描述 :视频封面 - /// - public string PrimaryImage { get; set; } - - - /// - /// 描述 :图片 - /// - public string Images { get; set; } - - - /// - /// 描述 :价格(最低) - /// - public decimal MinSalePrice { get; set; } - - /// - /// 描述 :价格(最高) - /// - public decimal MaxSalePrice { get; set; } - - /// - /// 描述 :划线价格(最高) - /// - public decimal MaxLinePrice { get; set; } - - - /// - /// 描述 :库存总量 - /// - public int SpuStockQuantity { get; set; } - - /// - /// 描述 :销量 - /// - public int SoldNum { get; set; } - - /// - /// 描述 :上下架状态(1上架 2下架) - /// - public int IsPutOnSale { get; set; } - - /// - /// 描述 :详情 - /// - public string Desc { get; set; } - - - /// - /// 卖点 - /// - public string GoodsSellingPoint { get; set; } - - - /// - /// 商品规格列表 - /// - public List SpecList { get; set; } - - /// - /// 商品sku列表 - /// - public List SkuList { get; set; } - - - /// - /// 是否收藏 - /// - public bool IsCollect { get; set; } = false; - } - -} diff --git a/ARW.Model/Vo/Api/GoodsManager/Goodss/GoodsSpecApiVo.cs b/ARW.Model/Vo/Api/GoodsManager/Goodss/GoodsSpecApiVo.cs deleted file mode 100644 index 22e6f46..0000000 --- a/ARW.Model/Vo/Api/GoodsManager/Goodss/GoodsSpecApiVo.cs +++ /dev/null @@ -1,36 +0,0 @@ -using Newtonsoft.Json; -using OfficeOpenXml.Attributes; -using SqlSugar; -using System; -using System.Collections.Generic; - -namespace ARW.Model.Vo.Api.GoodsManager.Goodss -{ - /// - /// 商品规格组展示对象Api - /// - /// @author lwh - /// @date 2023-07-13 - /// - public class GoodsSpecApiVo - { - - /// - /// 描述 : 商品规格组Id - /// - public int SpecId { get; set; } - - /// - /// 描述 :商品规格组名称 - /// - public string Title { get; set; } - - - /// - /// 描述 : 商品规格列表 - /// - public List SpecValueList { get; set; } - - } - -} diff --git a/ARW.Model/Vo/Api/GoodsManager/Goodss/GoosSkuApiVo.cs b/ARW.Model/Vo/Api/GoodsManager/Goodss/GoosSkuApiVo.cs deleted file mode 100644 index fb2cb68..0000000 --- a/ARW.Model/Vo/Api/GoodsManager/Goodss/GoosSkuApiVo.cs +++ /dev/null @@ -1,66 +0,0 @@ -using Newtonsoft.Json; -using OfficeOpenXml.Attributes; -using SqlSugar; -using System; -using System.Collections.Generic; - -namespace ARW.Model.Vo.Api.GoodsManager.Goodss -{ - /// - /// 商品sku展示对象Api - /// - /// @author lwh - /// @date 2023-07-13 - /// - public class GoosSkuApiVo - { - - /// - /// 描述 : 商品SkuId - /// - public int SkuId { get; set; } - - /// - /// 描述 : 商品规格图片 - /// - public string SkuImage { get; set; } - - /// - /// 描述 :商品规格详情 - /// - public List SpecInfo { get; set; } - - /// - /// 描述 :商品sku价格 - /// - public List PriceInfo { get; set; } - - /// - /// 描述 : 商品sku库存总量 - /// - public int Quantity { get; set; } - - /// - /// 商品sku重量 - /// - public decimal Weight { get; set; } - - } - - - public class SkuSpecInfo - { - public int SpecId { get; set; } - public string SpecTitle { get; set; } - public int SpecValueId { get; set; } - public string SpecValue { get; set; } - } - - public class PriceInfo - { - public int PriceType { get; set; } - public decimal Price { get; set; } - public string PriceTypeName { get; set; } - } - -} diff --git a/ARW.Model/Vo/Api/GoodsManager/Goodss/SpecValueApiVo.cs b/ARW.Model/Vo/Api/GoodsManager/Goodss/SpecValueApiVo.cs deleted file mode 100644 index 2179555..0000000 --- a/ARW.Model/Vo/Api/GoodsManager/Goodss/SpecValueApiVo.cs +++ /dev/null @@ -1,41 +0,0 @@ -using Newtonsoft.Json; -using OfficeOpenXml.Attributes; -using SqlSugar; -using System; -using System.Collections.Generic; - -namespace ARW.Model.Vo.Api.GoodsManager.Goodss -{ - /// - /// 商品规格值展示对象Api - /// - /// @author lwh - /// @date 2023-07-13 - /// - public class SpecValueApiVo - { - - /// - /// 描述 : 商品规格值Id - /// - public int SpecValueId { get; set; } - - /// - /// 描述 : 商品规格组Id - /// - public int SpecId { get; set; } - - /// - /// 描述 :商品规格值名称 - /// - public string SpecValue { get; set; } - - - /// - /// 描述 : 商品规格值图片 - /// - public string Image { get; set; } - - } - -} diff --git a/ARW.Model/Vo/Api/GoodsManager/ShopGoodsCategorys/ShopGoodsCategoryApiVo.cs b/ARW.Model/Vo/Api/GoodsManager/ShopGoodsCategorys/ShopGoodsCategoryApiVo.cs deleted file mode 100644 index 4437c79..0000000 --- a/ARW.Model/Vo/Api/GoodsManager/ShopGoodsCategorys/ShopGoodsCategoryApiVo.cs +++ /dev/null @@ -1,54 +0,0 @@ -using Newtonsoft.Json; -using OfficeOpenXml.Attributes; -using SqlSugar; -using System; -using ARW.Model.Models.Business.GoodsManager.ShopGoodsCategorys; -using System.Collections.Generic; -using ARW.Model.Vo.Api.GoodsManager.Goodss; - -namespace ARW.Model.Vo.Api.GoodsManager.ShopGoodsCategorys -{ - /// - /// 店铺商品类目展示对象Api - /// - /// @author lwh - /// @date 2023-07-20 - /// - public class ShopGoodsCategoryVoApi - { - - /// - /// 描述 : - /// - [JsonConverter(typeof(ValueToStringConverter))] - [SugarColumn(IsTreeKey = true)] - [EpplusIgnore] - public long ShopGoodsCategoryGuid { get; set; } - - - /// - /// 描述 :父级guid - /// - [JsonConverter(typeof(ValueToStringConverter))] - [SugarColumn(IsTreeKey = true)] - [EpplusTableColumn(Header = "父级guid")] - public long ShopGoodsCategoryParentGuid { get; set; } - - - /// - /// 描述 :名称 - /// - [EpplusTableColumn(Header = "名称")] - public string Label { get; set; } - - - [JsonProperty(NullValueHandling = NullValueHandling.Ignore)] - [SugarColumn(IsIgnore = true)] - public List Items { get; set; } - - [JsonProperty(NullValueHandling = NullValueHandling.Ignore)] - [SugarColumn(IsIgnore = true)] - public List Children { get; set; } - } - -} diff --git a/ARW.Model/Vo/Api/Home/HomeCategoryApiVo.cs b/ARW.Model/Vo/Api/Home/HomeCategoryApiVo.cs index cf6c3ce..571ea3a 100644 --- a/ARW.Model/Vo/Api/Home/HomeCategoryApiVo.cs +++ b/ARW.Model/Vo/Api/Home/HomeCategoryApiVo.cs @@ -1,9 +1,5 @@ using Newtonsoft.Json; -using OfficeOpenXml.Attributes; using SqlSugar; -using System; -using ARW.Model.Models.Business.GoodsManager.GoodsCategorys; -using System.Collections.Generic; namespace ARW.Model.Vo.Api.Home { diff --git a/ARW.Model/Vo/Api/Marketing/CouponManage/Coupons/CouponApiVo.cs b/ARW.Model/Vo/Api/Marketing/CouponManage/Coupons/CouponApiVo.cs deleted file mode 100644 index 7380858..0000000 --- a/ARW.Model/Vo/Api/Marketing/CouponManage/Coupons/CouponApiVo.cs +++ /dev/null @@ -1,182 +0,0 @@ -using Newtonsoft.Json; -using OfficeOpenXml.Attributes; -using SqlSugar; -using System; - -namespace ARW.Model.Vo.Api.Marketing.CouponManage.Coupons -{ - /// - /// 优惠券展示对象Api - /// - /// @author lwh - /// @date 2023-08-01 - /// - public class CouponVoApi - { - - - /// - /// 描述 : - /// - [EpplusIgnore] - public int CouponId { get; set; } - - - /// - /// 描述 : - /// - [JsonConverter(typeof(ValueToStringConverter))] - [EpplusIgnore] - public long CouponGuid { get; set; } - - - /// - /// 描述 :优惠劵名称 - /// - [EpplusTableColumn(Header = "优惠劵名称")] - public string CouponName { get; set; } - - - /// - /// 描述 :优惠劵类型 - /// - [EpplusTableColumn(Header = "优惠劵类型")] - public int CouponType { get; set; } - - - /// - /// 描述 :减免金额 - /// - [EpplusIgnore] - public decimal CouponDeductionMoney { get; set; } - - - /// - /// 描述 :折扣率 - /// - [EpplusIgnore] - public float CouponDiscountRate { get; set; } - - - /// - /// 描述 :最低消费金额 - /// - [EpplusTableColumn(Header = "最低消费金额")] - public decimal CouponMinConsumeMoney { get; set; } - - - /// - /// 描述 :到期类型 - /// - [EpplusTableColumn(Header = "到期类型")] - public int CouponExpireType { get; set; } - - - /// - /// 描述 :有效天数 - /// - [EpplusIgnore] - public int? CouponEffectiveDays { get; set; } - - - /// - /// 描述 :固定时间-开始时间 - /// - [EpplusIgnore] - public DateTime? CouponFixedStartTime { get; set; } - - - /// - /// 描述 :固定时间-结束时间 - /// - [EpplusIgnore] - public DateTime? CouponFixedEndTime { get; set; } - - - /// - /// 描述 :适用范围 - /// - [EpplusIgnore] - public int? CouponApplicableScope { get; set; } - - - - /// - /// 描述 :发送数量(-1不限制) - /// - [EpplusTableColumn(Header = "发送数量(-1不限制)")] - public int CouponSendNumber { get; set; } - - - - /// - /// 描述 :显示状态 - /// - [EpplusTableColumn(Header = "显示状态")] - public int CouponDisplayStatus { get; set; } - - - /// - /// 描述 :排序 - /// - [EpplusTableColumn(Header = "排序")] - public int CouponSort { get; set; } - - } - - - /// - /// 优惠券详情展示对象Api - /// - public class CouponApiDetailsVo - { - /// - /// 描述 : Key - /// - [JsonConverter(typeof(ValueToStringConverter))] - public long Key { get; set; } - - - /// - /// 描述 :优惠劵类型 - /// - public int Type { get; set; } - - /// - /// 描述 :优惠劵状态 - /// - public int Status { get; set; } - - /// - /// 描述 :折扣或者满减值 - /// - public string Value { get; set; } - - - /// - /// 描述 :描述 - /// - public string Desc { get; set; } - - - /// - /// 描述 :标题 - /// - public string Title { get; set; } - - /// - /// 描述 :订单底价,满n元 - /// - public decimal Base { get; set; } - - /// - /// 描述 :有效时间限制 - /// - public string TimeLimit { get; set; } - - [JsonIgnore] - public DateTime CreateTime { get; set; } - - } - -} diff --git a/ARW.Model/Vo/Api/Marketing/CouponManage/CustomerCoupons/CustomerCouponApiVo.cs b/ARW.Model/Vo/Api/Marketing/CouponManage/CustomerCoupons/CustomerCouponApiVo.cs deleted file mode 100644 index 77f561f..0000000 --- a/ARW.Model/Vo/Api/Marketing/CouponManage/CustomerCoupons/CustomerCouponApiVo.cs +++ /dev/null @@ -1,148 +0,0 @@ -using Newtonsoft.Json; -using OfficeOpenXml.Attributes; -using SqlSugar; -using System; - -namespace ARW.Model.Vo.Api.Marketing.CouponManage.CustomerCoupons -{ - /// - /// 领券记录展示对象Api - /// - /// @author lwh - /// @date 2023-07-31 - /// - public class CustomerCouponVoApi - { - - /// - /// 描述 : CouponGuid - /// - [JsonConverter(typeof(ValueToStringConverter))] - public long CouponGuid { get; set; } - - - /// - /// 描述 : CouponGuid - /// - [JsonConverter(typeof(ValueToStringConverter))] - public long ShopGuid { get; set; } - - - /// - /// 描述 : Key - /// - public int Key { get; set; } - - - /// - /// 描述 :优惠劵类型 - /// - public int Type { get; set; } - - /// - /// 描述 :优惠劵状态 - /// - public int Status { get; set; } - - /// - /// 描述 :折扣或者满减值 - /// - public string Value { get; set; } - - - /// - /// 描述 :描述 - /// - public string Desc { get; set; } - - - /// - /// 描述 :标题 - /// - public string Title { get; set; } - - /// - /// 描述 :订单底价,满n元 - /// - public decimal Base { get; set; } - - /// - /// 描述 :有效时间限制 - /// - public string TimeLimit { get; set; } - - [JsonIgnore] - public DateTime CreateTime { get; set; } - } - - - /// - /// 领券记录详情展示对象Api - /// - public class CustomerCouponApiDetailsVo - { - /// - /// 描述 : CouponGuid - /// - [JsonConverter(typeof(ValueToStringConverter))] - public long CouponGuid { get; set; } - - - /// - /// 描述 : Key - /// - public int Key { get; set; } - - - /// - /// 描述 :优惠劵类型 - /// - public int Type { get; set; } - - /// - /// 描述 :优惠劵状态 - /// - public int Status { get; set; } - - /// - /// 描述 :折扣或者满减值 - /// - public string Value { get; set; } - - - /// - /// 描述 :描述 - /// - public string Desc { get; set; } - - - /// - /// 描述 :标题 - /// - public string Title { get; set; } - - /// - /// 描述 :订单底价,满n元 - /// - public decimal Base { get; set; } - - /// - /// 描述 :有效时间限制 - /// - public string TimeLimit { get; set; } - - [JsonIgnore] - public DateTime CreateTime { get; set; } - - /// - /// 适用范围 - /// - public string StoreAdapt { get; set; } - - /// - /// 使用须知 - /// - public string UseNotes { get; set; } - } - -} diff --git a/ARW.Model/Vo/Api/OrderManage/OrderRefunds/ButtonVO.cs b/ARW.Model/Vo/Api/OrderManage/OrderRefunds/ButtonVO.cs deleted file mode 100644 index 8f3dc9c..0000000 --- a/ARW.Model/Vo/Api/OrderManage/OrderRefunds/ButtonVO.cs +++ /dev/null @@ -1,38 +0,0 @@ -using Newtonsoft.Json; -using OfficeOpenXml.Attributes; -using SqlSugar; -using System; -using System.Collections.Generic; - -namespace ARW.Model.Vo.Api.OrderManage.Orders -{ - /// - /// 售后按钮展示对象Api - /// - /// @author lwh - /// @date 2023-10-21 - /// - public class ButtonVO - { - /// - /// 描述 :名称 - /// - public string Name { get; set; } - - - /// - /// 描述 : - /// - public bool Primary { get; set; } - - - /// - /// 类型 (2撤销 3填写运单号 4修改运单号 5查看物流 7删除订单 ) - /// - public int Type { get; set; } - - } - - - -} diff --git a/ARW.Model/Vo/Api/OrderManage/OrderRefunds/OrderRefundApiDetailsVo.cs b/ARW.Model/Vo/Api/OrderManage/OrderRefunds/OrderRefundApiDetailsVo.cs deleted file mode 100644 index 01be983..0000000 --- a/ARW.Model/Vo/Api/OrderManage/OrderRefunds/OrderRefundApiDetailsVo.cs +++ /dev/null @@ -1,169 +0,0 @@ -using ARW.Model.Vo.Api.OrderManage.Orders; -using Newtonsoft.Json; -using OfficeOpenXml.Attributes; -using SqlSugar; -using System; -using System.Collections.Generic; - -namespace ARW.Model.Vo.Api.OrderManage.OrderRefunds -{ - /// - /// 售后单记录表详情展示对象Api - /// - /// @author lwh - /// @date 2023-10-21 - /// - public class OrderRefundApiDetailsVo - { - /// - /// 描述 : - /// - public int OrderRefundId { get; set; } - - /// - /// 描述 : - /// - [JsonConverter(typeof(ValueToStringConverter))] - public long OrderRefundGuid { get; set; } - - - /// - /// 描述 :订单guid - /// - [JsonConverter(typeof(ValueToStringConverter))] - public long OrderGuid { get; set; } - - - /// - /// 订单号 - /// - public string OrderNo { get; set; } - - - /// - /// 店铺名称 - /// - public string StoreName { get; set; } - - - /// - /// 订单商品列表 - /// - public List OrderRefundGoodList { get; set; } - - - /// - /// 地址 - /// - public Logistics LogisticsVO { get; set; } - - - /// - /// 物流状态 - /// - public TrajectoryVo TrajectoryVos { get; set; } - - - /// - /// 描述 :售后类型(1退货退款 2退货(无需退款) 3换货) - /// - public int RefundType { get; set; } - - - /// - /// 描述 : 申请退款金额 - /// - public decimal RefundRequestAmount { get; set; } - - - /// - /// 描述 :商家审核状态(1待审核 2已同意 3已拒绝) - /// - public int MerchantAuditStatus { get; set; } - - - /// - /// 描述 :实际退款金额 - /// - public decimal RefundMoney { get; set; } - - - /// - /// 售后订单状态描述 - /// - public string EserRightsStatusDesc { get; set; } - - - /// - /// 状态(1待审核 2已审核 3已发货 4已完成 ) - /// - public int Status { get; set; } - - - public string StatusName { get; set; } - - - /// - /// 描述 :用户是否发货(1未发货 2已发货) - /// - public int IsCustomerSend { get; set; } - - - /// - /// 描述 :售后单状态(1进行中 2已拒绝 3已完成 4已取消) - /// - public int OrderRefundStatus { get; set; } - - - /// - /// 商家是否收货(1未收货 2已收货) - /// - public int IsMerchantReceive { get; set; } - - /// - /// 商家退货地址guid - /// - public long? ShopAddressGuid { get; set; } - - - /// - /// 退款原因(字典) - /// - public int RefundReason { get; set; } - - - /// - /// 退款原因 - /// - public string Reason { get; set; } - - - /// - /// 描述 :客户退款说明 - /// - public string CustomerRefundDesc { get; set; } - - - /// - /// 描述 :客户退款凭证 - /// - public string CustomerRefundImg { get; set; } - - - /// - /// 快递公司guid - /// - public long? LogisticsCompanyGuid { get; set; } - - /// - /// 订单号 - /// - public string ExpressNo { get; set; } - - /// - /// 申请时间 - /// - public DateTime CreateTime { get; set; } - } - -} diff --git a/ARW.Model/Vo/Api/OrderManage/OrderRefunds/OrderRefundApiVo.cs b/ARW.Model/Vo/Api/OrderManage/OrderRefunds/OrderRefundApiVo.cs deleted file mode 100644 index cdddbd1..0000000 --- a/ARW.Model/Vo/Api/OrderManage/OrderRefunds/OrderRefundApiVo.cs +++ /dev/null @@ -1,113 +0,0 @@ -using ARW.Model.Vo.Api.OrderManage.Orders; -using Newtonsoft.Json; -using OfficeOpenXml.Attributes; -using SqlSugar; -using System; -using System.Collections.Generic; - -namespace ARW.Model.Vo.Api.OrderManage.OrderRefunds -{ - /// - /// 售后单记录表展示对象Api - /// - /// @author lwh - /// @date 2023-10-16 - /// - public class OrderRefundVoApi - { - /// - /// 描述 : - /// - public int OrderRefundId { get; set; } - - /// - /// 描述 : - /// - [JsonConverter(typeof(ValueToStringConverter))] - public long OrderRefundGuid { get; set; } - - - /// - /// 描述 :订单guid - /// - [JsonConverter(typeof(ValueToStringConverter))] - public long OrderGuid { get; set; } - - - /// - /// 店铺guid - /// - public long ShopGuid { get; set; } - - /// - /// 店铺名称 - /// - public string StoreName { get; set; } - - - public List OrderRefundGoodList { get; set; } - - - /// - /// 描述 :售后类型(1退货退款 2退款(无需退货) 3换货) - /// - public int RefundType { get; set; } - - - /// - /// 描述 : 申请退款金额 - /// - public decimal RefundRequestAmount { get; set; } - - - /// - /// 描述 :商家审核状态(1待审核 2已同意 3已拒绝) - /// - public int MerchantAuditStatus { get; set; } - - - /// - /// 描述 :实际退款金额 - /// - public decimal RefundMoney { get; set; } - - - /// - /// 售后订单状态描述 - /// - public string EserRightsStatusDesc { get; set; } - - - /// - /// 状态(1待审核 2已审核 3已发货 4已完成 5已取消) - /// - public int Status { get; set; } - - - - /// - /// 描述 :用户是否发货(1未发货 2已发货) - /// - public int IsCustomerSend { get; set; } - - - /// - /// 描述 :售后单状态(1进行中 2已拒绝 3已完成 4已取消) - /// - public int OrderRefundStatus { get; set; } - - - /// - /// 商家是否收货(1未收货 2已收货) - /// - public int IsMerchantReceive { get; set; } - - - /// - /// 按钮 - /// - public List ButtonVOs { get; set; } - - } - -} diff --git a/ARW.Model/Vo/Api/OrderManage/OrderRefunds/OrderRefundGood.cs b/ARW.Model/Vo/Api/OrderManage/OrderRefunds/OrderRefundGood.cs deleted file mode 100644 index 3227909..0000000 --- a/ARW.Model/Vo/Api/OrderManage/OrderRefunds/OrderRefundGood.cs +++ /dev/null @@ -1,63 +0,0 @@ -using Newtonsoft.Json; -using OfficeOpenXml.Attributes; -using SqlSugar; -using System; -using System.Collections.Generic; - -namespace ARW.Model.Vo.Api.OrderManage.Orders -{ - /// - /// 售后订单商品展示对象Api - /// - /// @author lwh - /// @date 2023-10-14 - /// - public class OrderRefundGood - { - /// - /// 描述 : 商品guid - /// - [JsonConverter(typeof(ValueToStringConverter))] - public long GoodsGuId { get; set; } - - - /// - /// 描述 :封面 - /// - public string Thumb { get; set; } - - - /// - /// 描述 :商品名称 - /// - public string Title { get; set; } - - - /// - /// 描述 :商品skuId - /// - public int? SkuId { get; set; } - - - /// - /// 描述 : 商品规格 - /// - public List Specifications { get; set; } - - - /// - /// 商品价格 - /// - public decimal Price { get; set; } - - - /// - /// 购买数量 - /// - public int BuyQuantity { get; set; } - - } - - - -} diff --git a/ARW.Model/Vo/Api/OrderManage/Orders/Logistics.cs b/ARW.Model/Vo/Api/OrderManage/Orders/Logistics.cs deleted file mode 100644 index f270c10..0000000 --- a/ARW.Model/Vo/Api/OrderManage/Orders/Logistics.cs +++ /dev/null @@ -1,62 +0,0 @@ -using Newtonsoft.Json; -using OfficeOpenXml.Attributes; -using SqlSugar; -using System; -using System.Collections.Generic; - -namespace ARW.Model.Vo.Api.OrderManage.Orders -{ - /// - /// 订单详情地址展示对象Api - /// - /// @author lwh - /// @date 2023-10-19 - /// - public class Logistics - { - - /// - /// 描述 : 收货地址Guid - /// - public long ReceiverAddressId { get; set; } - - - /// - /// 描述 : 收货人名称 - /// - public string ReceiverName { get; set; } - - - /// - /// 描述 : 收货人电话 - /// - public string ReceiverPhone { get; set; } - - - /// - /// 描述 : 省 - /// - public string ReceiverProvince { get; set; } - - - /// - /// 描述 : 市 - /// - public string ReceiverCity { get; set; } - - - /// - /// 描述 : 区 - /// - public string receiverCountry { get; set; } - - - /// - /// 描述 : 详细地址 - /// - public string ReceiverAddress { get; set; } - - - } - -} diff --git a/ARW.Model/Vo/Api/OrderManage/Orders/OrderApiVo.cs b/ARW.Model/Vo/Api/OrderManage/Orders/OrderApiVo.cs deleted file mode 100644 index 8787ba0..0000000 --- a/ARW.Model/Vo/Api/OrderManage/Orders/OrderApiVo.cs +++ /dev/null @@ -1,222 +0,0 @@ -using Newtonsoft.Json; -using OfficeOpenXml.Attributes; -using SqlSugar; -using System; -using System.Collections.Generic; - -namespace ARW.Model.Vo.Api.OrderManage.Orders -{ - /// - /// 订单展示对象Api - /// - /// @author lwh - /// @date 2023-09-01 - /// - public class OrderVoApi - { - - - /// - /// 描述 : - /// - public int OrderId { get; set; } - - - /// - /// 描述 : - /// - [JsonConverter(typeof(ValueToStringConverter))] - public long OrderGuid { get; set; } - - - /// - /// 描述 :订单号 - /// - public string OrderNo { get; set; } - - - /// - /// 描述 :商品列表 - /// - public List GoodsList { get; set; } - - - /// - /// 描述 :商品总金额 - /// - public decimal GoodsTotalAmoun { get; set; } - - - /// - /// 描述 :订单金额 - /// - public decimal OrderAmount { get; set; } - - - /// - /// 描述 :实际付款金额(包含运费) - /// - public decimal PayPrice { get; set; } - - - /// - /// 描述 :运费金额 - /// - public decimal ExpressPrice { get; set; } - - - /// - /// 描述 :付款状态(1未付款 2已付款) - /// - public int PayStatus { get; set; } - - - /// - /// 描述 :发货状态(1未发货 2已发货) - /// - public int DeliveryStatus { get; set; } - - - /// - /// 描述 :收货状态(1未收货 2已收货) - /// - public int ReceiptStatus { get; set; } - - - /// - /// 描述 :订单状态(1进行中 2取消 3待取消 4已完成) - /// - public int OrderStatus { get; set; } - - - /// - /// 描述 :是否已评价(1否 2是) - /// - public int IsComment { get; set; } - - - - /// - /// 订单状态 (1待付款 2待发货 3待收货 4已完成) - /// - public int Status { get; set; } - - /// - /// 订单状态名称 (1待付款 2待发货 3待收货 4已完成 5已取消) - /// - public string StatusName { get; set; } - - - /// - /// 按钮 - /// - public List ButtonVOs { get; set; } - } - - - /// - /// 订单详情展示对象Api - /// - public class OrderApiDetailsVo - { - [EpplusIgnore] - public int OrderId { get; set; } - - - [JsonConverter(typeof(ValueToStringConverter))] - [EpplusIgnore] - public long OrderGuid { get; set; } - - - /// - /// 店铺名称 - /// - public string StoreName { get; set; } - - - /// - /// 订单号 - /// - public string OrderNo { get; set; } - - - /// - /// 订单状态(1: 待付款 2: 待发货 3: 待收货 4: 已完成 5:待取消) - /// - public int OrderStatus { get; set; } - - - /// - /// 订单总额 - /// - public decimal TotalAmount { get; set; } - - - /// - /// 商品总额 - /// - public decimal GoodsAmount { get; set; } - - - /// - /// 支付金额 - /// - public decimal PaymentAmount { get; set; } - - - /// - /// 运费 - /// - public decimal FreightFee { get; set; } - - - /// - /// 优惠券金额 - /// - public decimal CouponAmount { get; set; } - - - /// - /// 备注 - /// - public string Remark { get; set; } - - - /// - /// 订单商品 - /// - public List OrderItemVOs { get; set; } - - - /// - /// 地址 - /// - public Logistics LogisticsVO { get; set; } - - - /// - /// 物流状态 - /// - public TrajectoryVo TrajectoryVos { get; set; } - - - /// - /// 自动取消时间 - /// - public DateTime? AutoCancelTime { get; set; } - - - /// - /// 订单状态名称 - /// - public string OrderStatusName { get; set; } - - - /// - /// 下单时间 - /// - public DateTime CreateTime { get; set; } - - } - -} diff --git a/ARW.Model/Vo/Api/OrderManage/Orders/OrderGoodsApiVo.cs b/ARW.Model/Vo/Api/OrderManage/Orders/OrderGoodsApiVo.cs deleted file mode 100644 index c174479..0000000 --- a/ARW.Model/Vo/Api/OrderManage/Orders/OrderGoodsApiVo.cs +++ /dev/null @@ -1,63 +0,0 @@ -using Newtonsoft.Json; -using OfficeOpenXml.Attributes; -using SqlSugar; -using System; -using System.Collections.Generic; - -namespace ARW.Model.Vo.Api.OrderManage.Orders -{ - /// - /// 订单商品展示对象Api - /// - /// @author lwh - /// @date 2023-10-14 - /// - public class OrderGoodsApiVo - { - /// - /// 描述 : 商品guid - /// - [JsonConverter(typeof(ValueToStringConverter))] - public long GoodsGuId { get; set; } - - - /// - /// 描述 :封面 - /// - public string Thumb { get; set; } - - - /// - /// 描述 :商品名称 - /// - public string Title { get; set; } - - - /// - /// 描述 :商品skuId - /// - public int? SkuId { get; set; } - - - /// - /// 描述 : 商品规格 - /// - public List Specifications { get; set; } - - - /// - /// 商品价格 - /// - public decimal Price { get; set; } - - - /// - /// 购买数量 - /// - public int BuyQuantity { get; set; } - - } - - - -} diff --git a/ARW.Model/Vo/Api/OrderManage/Orders/OrderGoodsSpecApiVo.cs b/ARW.Model/Vo/Api/OrderManage/Orders/OrderGoodsSpecApiVo.cs deleted file mode 100644 index 2da0a86..0000000 --- a/ARW.Model/Vo/Api/OrderManage/Orders/OrderGoodsSpecApiVo.cs +++ /dev/null @@ -1,31 +0,0 @@ -using Newtonsoft.Json; -using OfficeOpenXml.Attributes; -using SqlSugar; -using System; - -namespace ARW.Model.Vo.Api.OrderManage.Orders -{ - /// - /// 订单商品规格展示对象Api - /// - /// @author lwh - /// @date 2023-10-14 - /// - public class OrderGoodsSpecApiVo - { - /// - /// 描述 :规格组名称 - /// - public string SpecTitle { get; set; } - - - /// - /// 描述 :规格值 - /// - public string SpecValue { get; set; } - - } - - - -} diff --git a/ARW.Model/Vo/Api/OrderManage/Orders/OrderItem.cs b/ARW.Model/Vo/Api/OrderManage/Orders/OrderItem.cs deleted file mode 100644 index 7a771f5..0000000 --- a/ARW.Model/Vo/Api/OrderManage/Orders/OrderItem.cs +++ /dev/null @@ -1,61 +0,0 @@ -using Newtonsoft.Json; -using OfficeOpenXml.Attributes; -using SqlSugar; -using System; -using System.Collections.Generic; - -namespace ARW.Model.Vo.Api.OrderManage.Orders -{ - /// - /// 订单详情商品展示对象Api - /// - /// @author lwh - /// @date 2023-10-19 - /// - public class OrderItem - { - - /// - /// 描述 : 商品Id - /// - public long SpuId { get; set; } - - - /// - /// 描述 : 商品SkuId - /// - public int? SkuId { get; set; } - - - /// - /// 描述 : 商品名称 - /// - public string GoodsName { get; set; } - - - /// - /// 描述 :商品规格 - /// - public List Specifications { get; set; } - - - /// - /// 描述 :商品图片 - /// - public string GoodsPictureUrl { get; set; } - - - /// - /// 描述 : 单价 - /// - public decimal Price { get; set; } - - /// - /// 描述 :购买数量 - /// - public decimal BuyQuantity { get; set; } - - - } - -} diff --git a/ARW.Model/Vo/Api/OrderManage/Orders/OrderShopApiVo.cs b/ARW.Model/Vo/Api/OrderManage/Orders/OrderShopApiVo.cs deleted file mode 100644 index 1577554..0000000 --- a/ARW.Model/Vo/Api/OrderManage/Orders/OrderShopApiVo.cs +++ /dev/null @@ -1,54 +0,0 @@ -using ARW.Model.Dto.Api.Pay; -using ARW.Model.Models.Business.OrderManage.Orders; -using ARW.Model.Vo.Api.Carts; -using Newtonsoft.Json; -using OfficeOpenXml.Attributes; -using SqlSugar; -using System; -using System.Collections.Generic; - -namespace ARW.Model.Vo.Api.OrderManage.Orders -{ - /// - /// 订单店铺展示对象Api - /// - /// @author lwh - /// @date 2023-10-17 - /// - public class OrderShopApiVo - { - /// - /// 描述 : 店铺Id - /// - [JsonConverter(typeof(ValueToStringConverter))] - public long ShopGuid { get; set; } - - - /// - /// 订单号 - /// - public string OrderNo { get; set; } - - - /// - /// 备注 - /// - public string ReMark { get; set; } - - - /// - /// 该店铺待结算列表 - /// - public List OrderShopGoodsRequestList { get; set; } - - - /// - /// 关联购物车ids - /// - public List CartIdsList { get; set; } - - } - - - -} diff --git a/ARW.Model/Vo/Api/OrderManage/Orders/Trajectory.cs b/ARW.Model/Vo/Api/OrderManage/Orders/Trajectory.cs deleted file mode 100644 index e0f7c99..0000000 --- a/ARW.Model/Vo/Api/OrderManage/Orders/Trajectory.cs +++ /dev/null @@ -1,48 +0,0 @@ -using Newtonsoft.Json; -using OfficeOpenXml.Attributes; -using SqlSugar; -using System; -using System.Collections.Generic; - -namespace ARW.Model.Vo.Api.OrderManage.Orders -{ - /// - /// 物流状态展示对象Api - /// - /// @author lwh - /// @date 2023-10-19 - /// - public class Trajectory - { - - /// - /// 描述 : 标题 - /// - public string Title { get; set; } - - - /// - /// 描述 : 图标 - /// - public string Icon { get; set; } - - - /// - /// 描述 : 物流节点 - /// - public List Nodes { get; set; } - - - /// - /// 描述 : 是否展示 - /// - public bool IsShow { get; set; } = true; - - - /// - /// 排序 - /// - public int Sort { get; set; } - } - -} diff --git a/ARW.Model/Vo/Api/OrderManage/Orders/TrajectoryNode.cs b/ARW.Model/Vo/Api/OrderManage/Orders/TrajectoryNode.cs deleted file mode 100644 index 77f06e5..0000000 --- a/ARW.Model/Vo/Api/OrderManage/Orders/TrajectoryNode.cs +++ /dev/null @@ -1,43 +0,0 @@ -using Newtonsoft.Json; -using OfficeOpenXml.Attributes; -using SqlSugar; -using System; -using System.Collections.Generic; - -namespace ARW.Model.Vo.Api.OrderManage.Orders -{ - /// - /// 物流状态详情对象Api - /// - /// @author lwh - /// @date 2023-10-19 - /// - public class TrajectoryNode - { - - /// - /// 描述 : 描述 - /// - public string Status { get; set; } - - - /// - /// 描述 : 时间 - /// - public DateTime? Timestamp { get; set; } - - - /// - /// 描述 : 备注 - /// - public string Remark { get; set; } - - - /// - /// 排序 - /// - public int Sort { get; set; } - - } - -} diff --git a/ARW.Model/Vo/Api/OrderManage/Orders/TrajectoryVo.cs b/ARW.Model/Vo/Api/OrderManage/Orders/TrajectoryVo.cs deleted file mode 100644 index 5a48c77..0000000 --- a/ARW.Model/Vo/Api/OrderManage/Orders/TrajectoryVo.cs +++ /dev/null @@ -1,36 +0,0 @@ -using Newtonsoft.Json; -using OfficeOpenXml.Attributes; -using SqlSugar; -using System; -using System.Collections.Generic; - -namespace ARW.Model.Vo.Api.OrderManage.Orders -{ - /// - /// 物流状态展示对象Api - /// - /// @author lwh - /// @date 2023-10-20 - /// - public class TrajectoryVo - { - - /// - /// 描述 : 快递单号 - /// - public string LogisticsCompanyCode { get; set; } - - /// - /// 描述 : 物流公司名称 - /// - public string LogisticsCompanyName { get; set; } - - - /// - /// 描述 : 物流节点 - /// - public List Trajectorys { get; set; } - - } - -} diff --git a/ARW.Model/Vo/Api/ShopManager/Shops/GoodsCategoryVoApi.cs b/ARW.Model/Vo/Api/ShopManager/Shops/GoodsCategoryVoApi.cs deleted file mode 100644 index b8dc918..0000000 --- a/ARW.Model/Vo/Api/ShopManager/Shops/GoodsCategoryVoApi.cs +++ /dev/null @@ -1,46 +0,0 @@ -using ARW.Model.Vo.Business.GoodsManager.GoodsCategorys; -using Newtonsoft.Json; -using OfficeOpenXml.Attributes; -using SqlSugar; -using System; -using System.Collections.Generic; - -namespace ARW.Model.Vo.Api.ShopManager.Shops -{ - /// - /// 经营类目对象Api - /// - /// @author lwh - /// @date 2023-06-13 - /// - public class GoodsCategoryVoApi - { - - /// - /// 描述 :名称 - /// - public string Label { get; set; } - - - /// - /// 描述 :值 - /// - [SugarColumn(IsTreeKey = true)] - [JsonConverter(typeof(ValueToStringConverter))] - public long Value { get; set; } - - - /// - /// 描述 :父级guid - /// - [JsonConverter(typeof(ValueToStringConverter))] - public long ParentGuid { get; set; } - - - [JsonProperty(NullValueHandling = NullValueHandling.Ignore)] - [SugarColumn(IsIgnore = true)] - public List Children { get; set; } - - } - -} diff --git a/ARW.Model/Vo/Api/ShopManager/Shops/ShopApiVo.cs b/ARW.Model/Vo/Api/ShopManager/Shops/ShopApiVo.cs deleted file mode 100644 index 6c19ee5..0000000 --- a/ARW.Model/Vo/Api/ShopManager/Shops/ShopApiVo.cs +++ /dev/null @@ -1,144 +0,0 @@ -using Newtonsoft.Json; -using OfficeOpenXml.Attributes; -using SqlSugar; -using System; - -namespace ARW.Model.Vo.Api.ShopManager.Shops -{ - /// - /// 店铺展示对象Api - /// - /// @author lwh - /// @date 2023-06-12 - /// - public class ShopVoApi - { - - - /// - /// 描述 : - /// - [EpplusIgnore] - public int ShopId { get; set; } - - - /// - /// 描述 : - /// - [JsonConverter(typeof(ValueToStringConverter))] - [EpplusIgnore] - public long ShopGuid { get; set; } - - - /// - /// 描述 :用户id - /// - [EpplusIgnore] - public int? ShopUserId { get; set; } - - - /// - /// 描述 :客户guid - /// - [JsonConverter(typeof(ValueToStringConverter))] - [EpplusIgnore] - public long? ShopCustomerGuid { get; set; } - - - /// - /// 描述 :经营类目guid - /// - [JsonConverter(typeof(ValueToStringConverter))] - [EpplusTableColumn(Header = "经营类目guid")] - public long ShopBusinessCategoryGuid { get; set; } - - - /// - /// 描述 :图标 - /// - [EpplusTableColumn(Header = "图标")] - public string ShopLogo { get; set; } - - - /// - /// 描述 :营业执照 - /// - [EpplusTableColumn(Header = "营业执照")] - public string ShopBusinessLicense { get; set; } - - - /// - /// 描述 :名称 - /// - [EpplusTableColumn(Header = "名称")] - public string ShopName { get; set; } - - - /// - /// 描述 :简介 - /// - [EpplusTableColumn(Header = "简介")] - public string ShopIntro { get; set; } - - - /// - /// 描述 :排序 - /// - [EpplusTableColumn(Header = "排序")] - public int ShopSort { get; set; } - - - /// - /// 描述 :销售单量 - /// - [EpplusTableColumn(Header = "销售单量")] - public int ShopSalesOrderCount { get; set; } - - - /// - /// 描述 :审核状态 - /// - [EpplusTableColumn(Header = "审核状态")] - public int ShopAuditStatus { get; set; } - - - /// - /// 描述 :审核人 - /// - [JsonConverter(typeof(ValueToStringConverter))] - [EpplusTableColumn(Header = "审核人")] - public long ShopAuditUserGuid { get; set; } - - } - - - /// - /// 店铺详情展示对象Api - /// - public class ShopApiDetailsVo - { - public int ShopId { get; set; } - - [JsonConverter(typeof(ValueToStringConverter))] - public long ShopGuid { get; set; } - - [JsonConverter(typeof(ValueToStringConverter))] - public long ShopBusinessCategoryGuid { get; set; } - - public string ShopLogo { get; set; } - - [EpplusTableColumn(Header = "营业执照")] - public string ShopBusinessLicense { get; set; } - - [EpplusTableColumn(Header = "名称")] - public string ShopName { get; set; } - - [EpplusTableColumn(Header = "简介")] - public string ShopIntro { get; set; } - - [EpplusTableColumn(Header = "销售单量")] - public int ShopSalesOrderCount { get; set; } - - } - -} diff --git a/ARW.Model/Vo/Business/Carts/CartVo.cs b/ARW.Model/Vo/Business/Carts/CartVo.cs deleted file mode 100644 index 980ecd6..0000000 --- a/ARW.Model/Vo/Business/Carts/CartVo.cs +++ /dev/null @@ -1,63 +0,0 @@ -using Newtonsoft.Json; -using OfficeOpenXml.Attributes; -using SqlSugar; -using System; - -namespace ARW.Model.Vo.Business.Carts -{ - /// - /// 购物车记录展示对象 - /// - /// @author lwh - /// @date 2023-07-20 - /// - public class CartVo - { - - - /// - /// 描述 : - /// - public int CartId { get; set; } - - - /// - /// 描述 : - /// - [JsonConverter(typeof(ValueToStringConverter))] - public long CartGuid { get; set; } - - - /// - /// 描述 :客户Guid - /// - [JsonConverter(typeof(ValueToStringConverter))] - public long CustomerGuid { get; set; } - - - /// - /// 描述 :店铺Guid - /// - [JsonConverter(typeof(ValueToStringConverter))] - public long ShopGuid { get; set; } - - - /// - /// 描述 :商品Guid - /// - public long GoodsGud { get; set; } - - - /// - /// 描述 :商品sku唯一标识 - /// - public int GoodsSkuId { get; set; } - - - /// - /// 描述 :商品数量 - /// - public int CartGoodsNum { get; set; } - - } -} diff --git a/ARW.Model/Vo/Business/Crawler/CrawlVo.cs b/ARW.Model/Vo/Business/Crawler/CrawlVo.cs deleted file mode 100644 index cfaeab6..0000000 --- a/ARW.Model/Vo/Business/Crawler/CrawlVo.cs +++ /dev/null @@ -1,51 +0,0 @@ -using Newtonsoft.Json; -using OfficeOpenXml.Attributes; -using SqlSugar; -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; -using ARW.Model.Models.Business; -using ARW.Model.Models.Business.Crawler; -using Newtonsoft.Json.Linq; - -namespace ARW.Model.Vo.Crawler -{ - public class CrawlVo - { - public long Id { get; set; } - - public string Name { get; set; } - - public string Intro { get; set; } - - public string Cover { get; set; } - - public string Link { get; set; } - - public string Type { get; set; } - - public DateTime PublishTime { get; set; } - - [JsonIgnore] - public List DownResources { get; set; } - - public string Resources - { - get - { - if (this.DownResources != null) - { - return JToken.FromObject(this.DownResources).ToString(); - } - else - { - return "[]"; - } - - } - } - } - -} diff --git a/ARW.Model/Vo/Business/Custom/CustomerAddresses/CustomerAddressVo.cs b/ARW.Model/Vo/Business/Custom/CustomerAddresses/CustomerAddressVo.cs deleted file mode 100644 index 0705d40..0000000 --- a/ARW.Model/Vo/Business/Custom/CustomerAddresses/CustomerAddressVo.cs +++ /dev/null @@ -1,95 +0,0 @@ -using Newtonsoft.Json; -using OfficeOpenXml.Attributes; -using SqlSugar; -using System; - -namespace ARW.Model.Vo.Business.Custom.CustomerAddresses -{ - /// - /// 客户收货地址展示对象 - /// - /// @author admin - /// @date 2023-06-05 - /// - public class CustomerAddressVo - { - - - /// - /// 描述 : - /// - [EpplusIgnore] - public int CustomerAddressId { get; set; } - - - /// - /// 描述 : - /// - [JsonConverter(typeof(ValueToStringConverter))] - [EpplusIgnore] - public long CustomerAddressGuid { get; set; } - - - /// - /// 描述 :客户guid - /// - [JsonConverter(typeof(ValueToStringConverter))] - [EpplusIgnore] - public long CustomerAddressCustomerGuid { get; set; } - - /// - /// 客户名称 - /// - [EpplusTableColumn(Header = "客户")] - public string CustomerName { get; set; } - - - /// - /// 描述 :省id - /// - [EpplusIgnore] - public int CustomerAddressProvinceId { get; set; } - - - /// - /// 描述 :市id - /// - [EpplusIgnore] - public int CustomerAddressCityId { get; set; } - - - /// - /// 描述 :区id - /// - [EpplusIgnore] - public int CustomerAddressAreaId { get; set; } - - /// - /// 所在地区 - /// - [EpplusTableColumn(Header = "所在地区")] - public string CustomerAddress { get; set; } - - - /// - /// 描述 :收货人名称 - /// - [EpplusTableColumn(Header = "收货人名称")] - public string CustomerAddressName { get; set; } - - - /// - /// 描述 :收货电话 - /// - [EpplusTableColumn(Header = "收货电话")] - public string CustomerAddressPhone { get; set; } - - - /// - /// 描述 :详细地址 - /// - [EpplusTableColumn(Header = "详细地址")] - public string CustomerAddressDetailed { get; set; } - - } -} diff --git a/ARW.Model/Vo/Business/GoodsManager/GoodsCategorys/GoodsCategoryVo.cs b/ARW.Model/Vo/Business/GoodsManager/GoodsCategorys/GoodsCategoryVo.cs deleted file mode 100644 index 215bfa7..0000000 --- a/ARW.Model/Vo/Business/GoodsManager/GoodsCategorys/GoodsCategoryVo.cs +++ /dev/null @@ -1,94 +0,0 @@ -using Newtonsoft.Json; -using OfficeOpenXml.Attributes; -using SqlSugar; -using System; -using ARW.Model.Models.Business.GoodsManager.GoodsCategorys; -using System.Collections.Generic; - -namespace ARW.Model.Vo.Business.GoodsManager.GoodsCategorys -{ - /// - /// 商品类目展示对象 - /// - /// @author lwh - /// @date 2023-06-12 - /// - public class GoodsCategoryVo - { - - - /// - /// 描述 : - /// - [EpplusIgnore] - public int GoodsCategoryId { get; set; } - - - /// - /// 描述 : - /// - [SugarColumn(IsTreeKey = true)] - [JsonConverter(typeof(ValueToStringConverter))] - [EpplusIgnore] - public long GoodsCategoryGuid { get; set; } - - - /// - /// 描述 :父级guid - /// - [JsonConverter(typeof(ValueToStringConverter))] - [EpplusTableColumn(Header = "父级guid")] - public long GoodsCategoryParentGuid { get; set; } - - - /// - /// 描述 :祖级guid - /// - [JsonConverter(typeof(ValueToStringConverter))] - [EpplusTableColumn(Header = "祖级guid")] - public string GoodsCategoryAncestralGuid { get; set; } - - - /// - /// 描述 :名称 - /// - [EpplusTableColumn(Header = "名称")] - public string GoodsCategoryName { get; set; } - - - /// - /// 描述 :图片 - /// - [EpplusIgnore] - public string GoodsCategoryImg { get; set; } - - - /// - /// 描述 :显示状态 - /// - [EpplusTableColumn(Header = "显示状态")] - public int GoodsCategoryDisplayStatus { get; set; } - - - /// - /// 描述 :是否为热门 - /// - [EpplusIgnore] - public int? GoodsCategoryIsPopular { get; set; } - - - /// - /// 描述 :排序 - /// - [EpplusTableColumn(Header = "排序")] - public int ProductCategorySort { get; set; } - - [EpplusIgnore] - public string ParentName { get; set; } - - [EpplusIgnore] - [JsonProperty(NullValueHandling = NullValueHandling.Ignore)] - [SugarColumn(IsIgnore = true)] - public List Children { get; set; } - } -} diff --git a/ARW.Model/Vo/Business/GoodsManager/GoodsComments/GoodsCommentVo.cs b/ARW.Model/Vo/Business/GoodsManager/GoodsComments/GoodsCommentVo.cs deleted file mode 100644 index 8165547..0000000 --- a/ARW.Model/Vo/Business/GoodsManager/GoodsComments/GoodsCommentVo.cs +++ /dev/null @@ -1,132 +0,0 @@ -using Newtonsoft.Json; -using OfficeOpenXml.Attributes; -using SqlSugar; -using System; - -namespace ARW.Model.Vo.Business.GoodsManager.GoodsComments -{ - /// - /// 商品评价展示对象 - /// - /// @author admin - /// @date 2023-07-15 - /// - public class GoodsCommentVo - { - - - /// - /// 描述 : - /// - public int GoodsCommentId { get; set; } - - - /// - /// 描述 : - /// - [JsonConverter(typeof(ValueToStringConverter))] - public long GoodsCommentGuid { get; set; } - - - /// - /// 描述 :店铺guid - /// - [JsonConverter(typeof(ValueToStringConverter))] - public long ShopGuid { get; set; } - - /// - /// 描述 :店铺名称 - /// - public string ShopName { get; set; } - - /// - /// 描述 :客户guid - /// - [JsonConverter(typeof(ValueToStringConverter))] - public long CustomerGuid { get; set; } - - /// - /// 描述 :客户名称 - /// - public string CustomerNickname { get; set; } - - - /// - /// 描述 :订单guid - /// - [JsonConverter(typeof(ValueToStringConverter))] - public long OrderGuid { get; set; } - - - /// - /// 描述 :商品guid - /// - [JsonConverter(typeof(ValueToStringConverter))] - public long GoodsGuid { get; set; } - - /// - /// 描述 :商品名称 - /// - public string GoodsName { get; set; } - - /// - /// 描述 :商品图片 - /// - public string GoodsPicture { get; set; } - - /// - /// 描述 :订单商品guid - /// - [JsonConverter(typeof(ValueToStringConverter))] - public long OrderGoodsGuid { get; set; } - - - /// - /// 描述 :评分分数 - /// - public float GoodsCommentRating { get; set; } - - - /// - /// 描述 :评分类型 - /// - public int GoodsCommentRatingType { get; set; } - - - /// - /// 描述 :评价内容 - /// - public string GoodsCommentContent { get; set; } - - - /// - /// 描述 :评价图片 - /// - public string GoodsCommentImages { get; set; } - - - /// - /// 描述 :回复状态 - /// - public int GoodsCommentRecoverStatus { get; set; } - - - /// - /// 描述 :回复内容 - /// - public string GoodsCommentRecoverContent { get; set; } - - - /// - /// 描述 :显示状态 - /// - public int GoodsCommentStatus { get; set; } - - - /// - /// 描述 :排序 - /// - public int GoodsCommentSort { get; set; } - - } -} diff --git a/ARW.Model/Vo/Business/GoodsManager/GoodsServicess/GoodsServicesRels/GoodsServicesRelVo.cs b/ARW.Model/Vo/Business/GoodsManager/GoodsServicess/GoodsServicesRels/GoodsServicesRelVo.cs deleted file mode 100644 index d1a2c78..0000000 --- a/ARW.Model/Vo/Business/GoodsManager/GoodsServicess/GoodsServicesRels/GoodsServicesRelVo.cs +++ /dev/null @@ -1,43 +0,0 @@ -using Newtonsoft.Json; -using OfficeOpenXml.Attributes; -using SqlSugar; -using System; - -namespace ARW.Model.Vo.Business.GoodsManager.GoodsServicess.GoodsServicesRels -{ - /// - /// 商品服务与承诺关系表展示对象 - /// - /// @author lwh - /// @date 2023-06-18 - /// - public class GoodsServicesRelVo - { - - - /// - /// 描述 : - /// - public int Id { get; set; } - - /// - /// 描述 :店铺guid - /// - [JsonConverter(typeof(ValueToStringConverter))] - public long ShopGuid { get; set; } - - - /// - /// 描述 :商品guid - /// - [JsonConverter(typeof(ValueToStringConverter))] - public long GoodsGuid { get; set; } - - - /// - /// 描述 :服务与承诺id - /// - public long ServiceId { get; set; } - - } -} diff --git a/ARW.Model/Vo/Business/GoodsManager/GoodsServicess/GoodsServicesVo.cs b/ARW.Model/Vo/Business/GoodsManager/GoodsServicess/GoodsServicesVo.cs deleted file mode 100644 index 9f4930f..0000000 --- a/ARW.Model/Vo/Business/GoodsManager/GoodsServicess/GoodsServicesVo.cs +++ /dev/null @@ -1,83 +0,0 @@ -using Newtonsoft.Json; -using OfficeOpenXml.Attributes; -using SqlSugar; -using System; - -namespace ARW.Model.Vo.Business.GoodsManager.GoodsServicess -{ - /// - /// 商品服务与承诺展示对象 - /// - /// @author lwh - /// @date 2023-06-18 - /// - public class GoodsServicesVo - { - - - /// - /// 描述 : - /// - [EpplusIgnore] - public int GoodsServicesId { get; set; } - - - /// - /// 描述 : - /// - [JsonConverter(typeof(ValueToStringConverter))] - [EpplusIgnore] - public long GoodsServicesGuid { get; set; } - - - /// - /// 描述 :店铺 - /// - [EpplusTableColumn(Header = "店铺")] - public string ShopName { get; set; } - - /// - /// 描述 :店铺guid - /// - [JsonConverter(typeof(ValueToStringConverter))] - [EpplusIgnore] - public long ShopGuid { get; set; } - - - /// - /// 描述 :服务名称 - /// - [EpplusTableColumn(Header = "服务名称")] - public string GoodsServicesName { get; set; } - - - /// - /// 描述 :概述 - /// - [EpplusIgnore] - [EpplusTableColumn(Header = "服务概述")] - public string GoodsServicesSummary { get; set; } - - - /// - /// 描述 :是否默认 - /// - [EpplusTableColumn(Header = "是否默认")] - public int GoodsServicesIsDefault { get; set; } - - - /// - /// 描述 :显示状态 - /// - [EpplusTableColumn(Header = "显示状态")] - public int GoodsServicesDisplayStatus { get; set; } - - - /// - /// 描述 :排序 - /// - [EpplusTableColumn(Header = "排序")] - public int GoodsServicesSort { get; set; } - - } -} diff --git a/ARW.Model/Vo/Business/GoodsManager/GoodsSpecs/GoodsSkus/GoodsSkuVo.cs b/ARW.Model/Vo/Business/GoodsManager/GoodsSpecs/GoodsSkus/GoodsSkuVo.cs deleted file mode 100644 index 12d8e82..0000000 --- a/ARW.Model/Vo/Business/GoodsManager/GoodsSpecs/GoodsSkus/GoodsSkuVo.cs +++ /dev/null @@ -1,73 +0,0 @@ -using Newtonsoft.Json; -using OfficeOpenXml.Attributes; -using SqlSugar; -using System; - -namespace ARW.Model.Vo.Business.GoodsManager.GoodsSpecs.GoodsSkus -{ - /// - /// 商品规格展示对象 - /// - /// @author lwh - /// @date 2023-06-19 - /// - public class GoodsSkuVo - { - - - /// - /// 描述 : - /// - public int GoodsSkuId { get; set; } - - - /// - /// 描述 :商品guid - /// - [JsonConverter(typeof(ValueToStringConverter))] - public long GoodsGuid { get; set; } - - public string SpecValue { get; set; } - - public string SpecSecondValue { get; set; } - - public string SpecThirdValue { get; set; } - - - /// - /// 描述 :图片 - /// - public string GoodsSkuImg { get; set; } - - - /// - /// 描述 :sku编码 - /// - public string GoodsSkuSkuCode { get; set; } - - - /// - /// 描述 :价格 - /// - public decimal GoodsSkuPrice { get; set; } - - - /// - /// 描述 :划线价格 - /// - public decimal GoodsSkuLinePrice { get; set; } - - - /// - /// 描述 :当前库存数量 - /// - public int GoodsSkuStockNum { get; set; } - - - /// - /// 描述 :商品重量(Kg) - /// - public decimal GoodsSkuWeight { get; set; } - - } -} diff --git a/ARW.Model/Vo/Business/GoodsManager/GoodsSpecs/GoodsSpecRels/GoodsSpecRelVo.cs b/ARW.Model/Vo/Business/GoodsManager/GoodsSpecs/GoodsSpecRels/GoodsSpecRelVo.cs deleted file mode 100644 index 86cc96e..0000000 --- a/ARW.Model/Vo/Business/GoodsManager/GoodsSpecs/GoodsSpecRels/GoodsSpecRelVo.cs +++ /dev/null @@ -1,43 +0,0 @@ -using Newtonsoft.Json; -using OfficeOpenXml.Attributes; -using SqlSugar; -using System; - -namespace ARW.Model.Vo.Business.GoodsManager.GoodsSpecs.GoodsSpecRels -{ - /// - /// 商品与规格值关系记录展示对象 - /// - /// @author lwh - /// @date 2023-06-19 - /// - public class GoodsSpecRelVo - { - - - /// - /// 描述 : - /// - public int GoodsSpecRelId { get; set; } - - - /// - /// 描述 :商品Guid - /// - [JsonConverter(typeof(ValueToStringConverter))] - public long GoodsGuid { get; set; } - - - /// - /// 描述 :规格组ID - /// - public int SpecId { get; set; } - - - /// - /// 描述 :规格值ID - /// - public int SpecValueId { get; set; } - - } -} diff --git a/ARW.Model/Vo/Business/GoodsManager/GoodsSpecs/SpecValues/SpecValueVo.cs b/ARW.Model/Vo/Business/GoodsManager/GoodsSpecs/SpecValues/SpecValueVo.cs deleted file mode 100644 index 4d96630..0000000 --- a/ARW.Model/Vo/Business/GoodsManager/GoodsSpecs/SpecValues/SpecValueVo.cs +++ /dev/null @@ -1,36 +0,0 @@ -using Newtonsoft.Json; -using OfficeOpenXml.Attributes; -using SqlSugar; -using System; - -namespace ARW.Model.Vo.Business.GoodsManager.GoodsSpecs.SpecValues -{ - /// - /// 商品规格值展示对象 - /// - /// @author lwh - /// @date 2023-06-19 - /// - public class SpecValueVo - { - - - /// - /// 描述 : - /// - public int SpecValueId { get; set; } - - - /// - /// 描述 :规格组ID - /// - public int SpecId { get; set; } - - - /// - /// 描述 :规格值名称 - /// - public string SpecValueName { get; set; } - - } -} diff --git a/ARW.Model/Vo/Business/GoodsManager/GoodsSpecs/Specs/SpecVo.cs b/ARW.Model/Vo/Business/GoodsManager/GoodsSpecs/Specs/SpecVo.cs deleted file mode 100644 index aec6dd7..0000000 --- a/ARW.Model/Vo/Business/GoodsManager/GoodsSpecs/Specs/SpecVo.cs +++ /dev/null @@ -1,30 +0,0 @@ -using Newtonsoft.Json; -using OfficeOpenXml.Attributes; -using SqlSugar; -using System; - -namespace ARW.Model.Vo.Business.GoodsManager.GoodsSpecs.Specs -{ - /// - /// 商品规格组展示对象 - /// - /// @author lwh - /// @date 2023-06-19 - /// - public class SpecVo - { - - - /// - /// 描述 : - /// - public int SpecId { get; set; } - - - /// - /// 描述 :规格值名称 - /// - public string SpecName { get; set; } - - } -} diff --git a/ARW.Model/Vo/Business/GoodsManager/Goodss/AllGoodsVo.cs b/ARW.Model/Vo/Business/GoodsManager/Goodss/AllGoodsVo.cs deleted file mode 100644 index 92e1055..0000000 --- a/ARW.Model/Vo/Business/GoodsManager/Goodss/AllGoodsVo.cs +++ /dev/null @@ -1,85 +0,0 @@ -using Newtonsoft.Json; -using OfficeOpenXml.Attributes; -using SqlSugar; -using System; -using System.Collections.Generic; - -namespace ARW.Model.Vo.Business.GoodsManager.Goodss -{ - /// - /// 全部商品展示对象 - /// - /// @author lwh - /// @date 2023-07-24 - /// - public class AllGoodsVo - { - - - /// - /// 描述 : - /// - [EpplusIgnore] - public int GoodsId { get; set; } - - - /// - /// 描述 : - /// - [JsonConverter(typeof(ValueToStringConverter))] - [EpplusIgnore] - public long GoodsGuid { get; set; } - - - /// - /// 描述 :名称 - /// - [EpplusTableColumn(Header = "商品名称")] - public string GoodsName { get; set; } - - - /// - /// 描述 :图片 - /// - [EpplusTableColumn(Header = "商品图片")] - public string GoodsPicture { get; set; } - - - /// - /// 描述 :价格(最低) - /// - [EpplusTableColumn(Header = "商品价格")] - public decimal GoodsPriceLowest { get; set; } - - - /// - /// 描述 :划线价格(最低) - /// - [EpplusTableColumn(Header = "划线价格")] - public decimal GoodsDashedPriceLowest { get; set; } - - /// - /// 库存总量 - /// - public int GoodsTotalInventory { get; set; } - - - /// - /// 描述 :上下架状态(1上架 2下架) - /// - [EpplusIgnore] - public int GoodsShelfStatus { get; set; } - - - [EpplusTableColumn(Header = "状态")] - public string GoodsShelfStatusName { get; set; } - - - /// - /// 描述 :排序 - /// - [EpplusTableColumn(Header = "排序")] - public int GoodsSort { get; set; } - - } -} diff --git a/ARW.Model/Vo/Business/GoodsManager/Goodss/GoodsSpecListVo.cs b/ARW.Model/Vo/Business/GoodsManager/Goodss/GoodsSpecListVo.cs deleted file mode 100644 index e82eb63..0000000 --- a/ARW.Model/Vo/Business/GoodsManager/Goodss/GoodsSpecListVo.cs +++ /dev/null @@ -1,47 +0,0 @@ -using Newtonsoft.Json; -using OfficeOpenXml.Attributes; -using SqlSugar; -using System; -using System.Collections.Generic; - -namespace ARW.Model.Vo.Business.GoodsManager.Goodss -{ - /// - /// 商品规格列表展示对象 - /// - /// @author lwh - /// @date 2023-06-26 - /// - public class GoodsSpecListVo - { - - /// - /// 描述 :规格组Id - /// - public int SpecId { get; set; } - - /// - /// 描述 :规格组名称 - /// - public string SpecName { get; set; } - - /// - /// 描述 :规格值列表 - /// - public List Props { get; set; } - - - } - - - public class SpecValueItem - { - public int SpecId { get; set; } - - public int SpecValueId { get; set; } - - public string SpecValueName { get; set; } - } - - -} diff --git a/ARW.Model/Vo/Business/GoodsManager/Goodss/GoodsSpecSkutVo.cs b/ARW.Model/Vo/Business/GoodsManager/Goodss/GoodsSpecSkutVo.cs deleted file mode 100644 index b0948e2..0000000 --- a/ARW.Model/Vo/Business/GoodsManager/Goodss/GoodsSpecSkutVo.cs +++ /dev/null @@ -1,34 +0,0 @@ -using ARW.Model.Models.Business.GoodsManager.GoodsSpecs.GoodsSkus; -using ARW.Model.Vo.Business.GoodsManager.GoodsSpecs.GoodsSkus; -using Newtonsoft.Json; -using OfficeOpenXml.Attributes; -using SqlSugar; -using System; -using System.Collections.Generic; - -namespace ARW.Model.Vo.Business.GoodsManager.Goodss -{ - /// - /// 商品规格列表展示对象 - /// - /// @author lwh - /// @date 2023-06-26 - /// - public class GoodsSpecSkutVo - { - - /// - /// 描述 :规格列表 - /// - public List GoodsSpecList { get; set; } - - - /// - /// 描述 :Sku列表 - /// - public List SkuList { get; set; } - - } - - -} diff --git a/ARW.Model/Vo/Business/GoodsManager/Goodss/GoodsVo.cs b/ARW.Model/Vo/Business/GoodsManager/Goodss/GoodsVo.cs deleted file mode 100644 index 36e895e..0000000 --- a/ARW.Model/Vo/Business/GoodsManager/Goodss/GoodsVo.cs +++ /dev/null @@ -1,272 +0,0 @@ -using Newtonsoft.Json; -using OfficeOpenXml.Attributes; -using SqlSugar; -using System; -using System.Collections.Generic; - -namespace ARW.Model.Vo.Business.GoodsManager.Goodss -{ - /// - /// 商品展示对象 - /// - /// @author lwh - /// @date 2023-06-19 - /// - public class GoodsVo - { - - - /// - /// 描述 : - /// - [EpplusIgnore] - public int GoodsId { get; set; } - - - /// - /// 描述 : - /// - [JsonConverter(typeof(ValueToStringConverter))] - [EpplusIgnore] - public long GoodsGuid { get; set; } - - - /// - /// 描述 :店铺guid - /// - [JsonConverter(typeof(ValueToStringConverter))] - [EpplusIgnore] - public long ShopGuid { get; set; } - - /// - /// 描述 :店铺名称 - /// - [JsonConverter(typeof(ValueToStringConverter))] - [EpplusTableColumn(Header = "店铺名称")] - public string ShopName { get; set; } - - /// - /// 描述 :商品类目guid - /// - [JsonConverter(typeof(ValueToStringConverter))] - [EpplusIgnore] - public long ShopGoodsCategoryGuid { get; set; } - - /// - /// 描述 :商品类目名称 - /// - [JsonConverter(typeof(ValueToStringConverter))] - [EpplusTableColumn(Header = "商品类目名称")] - public string GoodsCategoryName { get; set; } - - - /// - /// 描述 :商品规格ids - /// - [JsonConverter(typeof(ValueToStringConverter))] - [EpplusIgnore] - public string GoodsSkuIds { get; set; } - - - /// - /// 描述 :配送模板guid - /// - [JsonConverter(typeof(ValueToStringConverter))] - [EpplusIgnore] - public long DeliveryGuid { get; set; } - - - /// - /// 描述 :名称 - /// - [EpplusTableColumn(Header = "商品名称")] - public string GoodsName { get; set; } - - - /// - /// 描述 :编码 - /// - [EpplusTableColumn(Header = "商品编码")] - public string GoodsCoding { get; set; } - - - /// - /// 描述 :主图视频 - /// - [EpplusIgnore] - public string GoodsMainImageVideo { get; set; } - - - /// - /// 描述 :视频封面 - /// - [EpplusIgnore] - public string GoodsVideoCover { get; set; } - - /// - /// 描述 :卖点 - /// - [EpplusTableColumn(Header = "商品卖点")] - public string GoodsSellingPoint { get; set; } - - /// - /// 描述 :商品规格(1单规格 2多规格) - /// 空值 : false - /// - [EpplusIgnore] - public int GoodsSpecType { get; set; } - - /// - /// 描述 :图片 - /// - [EpplusTableColumn(Header = "商品图片")] - public string GoodsPicture { get; set; } - - /// - /// 描述 :商品重量 - /// 空值 : false - /// - [EpplusTableColumn(Header = "商品重量")] - public decimal GoodsWeight { get; set; } - - - /// - /// 描述 :价格(最低) - /// - [EpplusTableColumn(Header = "商品价格")] - public decimal GoodsPriceLowest { get; set; } - - - /// - /// 描述 :价格(最高) - /// - [EpplusIgnore] - public decimal GoodsPriceHighest { get; set; } - - - /// - /// 描述 :划线价格(最低) - /// - [EpplusTableColumn(Header = "划线价格")] - public decimal GoodsDashedPriceLowest { get; set; } - - /// - /// 描述 :划线价格(最高) - /// - [EpplusIgnore] - public decimal GoodsDashedPriceHighest { get; set; } - - - /// - /// 描述 :库存总量 - /// - [EpplusTableColumn(Header = "库存总量")] - public int GoodsTotalInventory { get; set; } - - - /// - /// 描述 :初始销量 - /// - [EpplusTableColumn(Header = "初始销量")] - public int GoodsSalesInitial { get; set; } - - - /// - /// 描述 :实际销量 - /// - [EpplusTableColumn(Header = "实际销量")] - public int GoodsSalesActual { get; set; } - - - /// - /// 描述 :详情 - /// - [EpplusTableColumn(Header = "详情")] - public string GoodsDetails { get; set; } - - - /// - /// 描述 :库存计算方式(1下单立减库存 2付款立减库存) - /// - [EpplusIgnore] - public int GoodsDeductStockType { get; set; } - - - /// - /// 描述 :是否赠送积分(1开启 0关闭) - /// - [EpplusIgnore] - public int GoodsIsPointsGift { get; set; } - - - /// - /// 描述 :是否允许使用积分抵扣(1允许 0不允许) - /// - [EpplusIgnore] - public int GoodsIsPointsDiscount { get; set; } - - - /// - /// 描述 :积分抵扣设置(0默认抵扣 1单独设置抵扣) - /// - [EpplusIgnore] - public int GoodsIsAlonePointsDiscount { get; set; } - - - /// - /// 描述 :单独设置积分抵扣的配置 - /// - [EpplusIgnore] - public string GoodsPointsDiscountConfig { get; set; } - - - /// - /// 描述 :是否开启会员折扣(1开启 0关闭) - /// - [EpplusIgnore] - public int GoodsIsEnableGrade { get; set; } - - - /// - /// 描述 :会员折扣设置(0默认等级折扣 1单独设置折扣) - /// - [EpplusIgnore] - public int GoodsIsAloneGrade { get; set; } - - - /// - /// 描述 :单独设置折扣的配置 - /// - [EpplusIgnore] - public string GoodsAloneGradeEquity { get; set; } - - - /// - /// 描述 :上下架状态(1上架 2下架) - /// - [EpplusIgnore] - public int GoodsShelfStatus { get; set; } - - - [EpplusTableColumn(Header = "状态")] - public string GoodsShelfStatusName { get; set; } - - - /// - /// 描述 :排序 - /// - [EpplusTableColumn(Header = "排序")] - public int GoodsSort { get; set; } - - - /// - /// 描述 :添加时间 - /// - [EpplusTableColumn(Header = "添加时间")] - public string CreateTime { get; set; } - - [EpplusIgnore] - public List GoodsServicesIds { get; set; } - - } -} diff --git a/ARW.Model/Vo/Business/GoodsManager/ShopGoodsCategorys/ShopGoodsCategoryVo.cs b/ARW.Model/Vo/Business/GoodsManager/ShopGoodsCategorys/ShopGoodsCategoryVo.cs deleted file mode 100644 index 3246d1f..0000000 --- a/ARW.Model/Vo/Business/GoodsManager/ShopGoodsCategorys/ShopGoodsCategoryVo.cs +++ /dev/null @@ -1,120 +0,0 @@ -using Newtonsoft.Json; -using OfficeOpenXml.Attributes; -using SqlSugar; -using System; -using ARW.Model.Models.Business.GoodsManager.ShopGoodsCategorys; -using System.Collections.Generic; - -namespace ARW.Model.Vo.Business.GoodsManager.ShopGoodsCategorys -{ - /// - /// 店铺商品类目展示对象 - /// - /// @author lwh - /// @date 2023-06-15 - /// - public class ShopGoodsCategoryVo - { - - - /// - /// 描述 : - /// - [EpplusIgnore] - public int ShopGoodsCategoryId { get; set; } - - - /// - /// 描述 : - /// - [JsonConverter(typeof(ValueToStringConverter))] - [SugarColumn(IsTreeKey = true)] - [EpplusIgnore] - public long ShopGoodsCategoryGuid { get; set; } - - - /// - /// 描述 :店铺guid - /// - [JsonConverter(typeof(ValueToStringConverter))] - [EpplusIgnore] - public long ShopGuid { get; set; } - - - /// - /// 描述 :店铺名称 - /// - [EpplusTableColumn(Header = "店铺名称")] - public string ShopName { get; set; } - - /// - /// 描述 :父级guid - /// - [JsonConverter(typeof(ValueToStringConverter))] - [SugarColumn(IsTreeKey = true)] - [EpplusIgnore] - public long ShopGoodsCategoryParentGuid { get; set; } - - - - [EpplusTableColumn(Header = "上级类目")] - public string ParentName { get; set; } - - - /// - /// 描述 :祖级guid - /// - [JsonConverter(typeof(ValueToStringConverter))] - [SugarColumn(IsTreeKey = true)] - [EpplusIgnore] - public string ShopGoodsCategoryAncestralGuid { get; set; } - - - /// - /// 描述 :名称 - /// - [EpplusTableColumn(Header = "商品类目名称")] - public string ShopGoodsCategoryName { get; set; } - - - /// - /// 描述 :图标 - /// - [EpplusTableColumn(Header = "商品类目图标")] - public string ShopGoodsCategoryImg { get; set; } - - /// - /// 描述 :显示状态 - /// - [EpplusIgnore] - public int ShopGoodsCategoryDisplayStatus { get; set; } - - - /// - /// 描述 :是否为热门 - /// - [EpplusTableColumn(Header = "是否为热门")] - public int ShopGoodsCategoryIsPopular { get; set; } - - - /// - /// 描述 :显示状态名称 - /// - [EpplusTableColumn(Header = "显示状态")] - public string ShopGoodsCategoryDisplayStatusName { get; set; } - - - - /// - /// 描述 :排序 - /// - [EpplusTableColumn(Header = "排序")] - public int ShopGoodsCategorySort { get; set; } - - - [EpplusIgnore] - [JsonProperty(NullValueHandling = NullValueHandling.Ignore)] - [SugarColumn(IsIgnore = true)] - public List Children { get; set; } - } -} diff --git a/ARW.Model/Vo/Business/LogisticsManage/DeliveryRules/DeliveryRuleVo.cs b/ARW.Model/Vo/Business/LogisticsManage/DeliveryRules/DeliveryRuleVo.cs deleted file mode 100644 index fbf624b..0000000 --- a/ARW.Model/Vo/Business/LogisticsManage/DeliveryRules/DeliveryRuleVo.cs +++ /dev/null @@ -1,78 +0,0 @@ -using ARW.Model.Vo.Business.Custom.Regions; -using Newtonsoft.Json; -using OfficeOpenXml.Attributes; -using SqlSugar; -using System; -using System.Collections.Generic; - -namespace ARW.Model.Vo.Business.LogisticsManage.DeliveryRules -{ - /// - /// 配送模板区域及运费展示对象 - /// - /// @author lwh - /// @date 2023-06-16 - /// - public class DeliveryRuleVo - { - - - /// - /// 描述 : - /// - public int DeliveryRuleId { get; set; } - - - /// - /// 描述 : - /// - [JsonConverter(typeof(ValueToStringConverter))] - public long DeliveryRuleGuid { get; set; } - - - /// - /// 描述 :配送模板guid - /// - [JsonConverter(typeof(ValueToStringConverter))] - public long DeliveryGuid { get; set; } - - - /// - /// 描述 :可配送区域(城市id集) - /// - public List DeliveryRuleRegion { get; set; } - - public string DeliveryRuleRegionName { get; set; } - - - /// - /// 描述 :可配送区域(文字展示) - /// - public string DeliveryRuleRegionText { get; set; } - - - /// - /// 描述 :首件(个)/首重(Kg) - /// - public decimal DeliveryRuleFirst { get; set; } - - - /// - /// 描述 :运费(元) - /// - public decimal DeliveryRuleFirstFee { get; set; } - - - /// - /// 描述 :续件/续重 - /// - public decimal DeliveryRuleAdditional { get; set; } - - - /// - /// 描述 :续费(元) - /// - public decimal DeliveryRuleAdditionalFee { get; set; } - - } -} diff --git a/ARW.Model/Vo/Business/LogisticsManage/Deliverys/DeliveryVo.cs b/ARW.Model/Vo/Business/LogisticsManage/Deliverys/DeliveryVo.cs deleted file mode 100644 index 410a38d..0000000 --- a/ARW.Model/Vo/Business/LogisticsManage/Deliverys/DeliveryVo.cs +++ /dev/null @@ -1,69 +0,0 @@ -using Newtonsoft.Json; -using OfficeOpenXml.Attributes; -using SqlSugar; -using System; - -namespace ARW.Model.Vo.Business.LogisticsManage.Deliverys -{ - /// - /// 配送模板展示对象 - /// - /// @author lwh - /// @date 2023-06-16 - /// - public class DeliveryVo - { - - - /// - /// 描述 : - /// - [EpplusIgnore] - public int DeliveryId { get; set; } - - - /// - /// 描述 : - /// - [JsonConverter(typeof(ValueToStringConverter))] - [EpplusIgnore] - public long DeliveryGuid { get; set; } - - - /// - /// 描述 :店铺guid - /// - [JsonConverter(typeof(ValueToStringConverter))] - [EpplusIgnore] - public long ShopGuid { get; set; } - - - /// - /// 描述 :店铺名称 - /// - [EpplusTableColumn(Header = "店铺名称")] - public string ShopName { get; set; } - - - /// - /// 描述 :模板名称 - /// - [EpplusTableColumn(Header = "模板名称")] - public string DeliveryName { get; set; } - - - /// - /// 描述 :计费方式 - /// - [EpplusTableColumn(Header = "计费方式")] - public int DeliveryBillingMethod { get; set; } - - - /// - /// 描述 :排序 - /// - [EpplusTableColumn(Header = "排序")] - public int DeliverySort { get; set; } - - } -} diff --git a/ARW.Model/Vo/Business/LogisticsManage/LogisticsCompanys/LogisticsCompanyVo.cs b/ARW.Model/Vo/Business/LogisticsManage/LogisticsCompanys/LogisticsCompanyVo.cs deleted file mode 100644 index 037b6bc..0000000 --- a/ARW.Model/Vo/Business/LogisticsManage/LogisticsCompanys/LogisticsCompanyVo.cs +++ /dev/null @@ -1,62 +0,0 @@ -using Newtonsoft.Json; -using OfficeOpenXml.Attributes; -using SqlSugar; -using System; - -namespace ARW.Model.Vo.Business.LogisticsManage.LogisticsCompanys -{ - /// - /// 物流公司展示对象 - /// - /// @author lwh - /// @date 2023-06-18 - /// - public class LogisticsCompanyVo - { - - - /// - /// 描述 : - /// - [EpplusIgnore] - public int LogisticsCompanyId { get; set; } - - - /// - /// 描述 : - /// - [JsonConverter(typeof(ValueToStringConverter))] - [EpplusIgnore] - public long LogisticsCompanyGuid { get; set; } - - - /// - /// 描述 :物流公司名称 - /// - [EpplusTableColumn(Header = "物流公司名称")] - public string LogisticsCompanyName { get; set; } - - - /// - /// 描述 :物流公司编码 - /// - [EpplusTableColumn(Header = "物流公司编码")] - public string LogisticsCompanyCode { get; set; } - - - /// - /// 描述 :排序 - /// - [EpplusTableColumn(Header = "排序")] - public int LogisticsCompanySort { get; set; } - - - /// - /// 描述 :添加时间 - /// - [EpplusTableColumn(Header = "添加时间")] - [EpplusIgnore] - public string CreateTime { get; set; } - - } -} diff --git a/ARW.Model/Vo/Business/Marketing/CouponManage/Coupons/CouponVo.cs b/ARW.Model/Vo/Business/Marketing/CouponManage/Coupons/CouponVo.cs deleted file mode 100644 index f85839d..0000000 --- a/ARW.Model/Vo/Business/Marketing/CouponManage/Coupons/CouponVo.cs +++ /dev/null @@ -1,167 +0,0 @@ -using Newtonsoft.Json; -using OfficeOpenXml.Attributes; -using SqlSugar; -using System; - -namespace ARW.Model.Vo.Business.Marketing.CouponManage.Coupons -{ - /// - /// 优惠券展示对象 - /// - /// @author lwh - /// @date 2023-07-24 - /// - public class CouponVo - { - - - /// - /// 描述 : - /// - [EpplusIgnore] - public int CouponId { get; set; } - - - /// - /// 描述 : - /// - [JsonConverter(typeof(ValueToStringConverter))] - [EpplusIgnore] - public long CouponGuid { get; set; } - - - /// - /// 描述 :优惠劵名称 - /// - [EpplusTableColumn(Header = "优惠劵名称")] - public string CouponName { get; set; } - - /// - /// 描述 : - /// - [JsonConverter(typeof(ValueToStringConverter))] - public long ShopGuid { get; set; } - - - /// - /// 描述 :店铺名称 - /// - [EpplusTableColumn(Header = "店铺名称")] - public string ShopName { get; set; } - - /// - /// 描述 :优惠劵介绍 - /// - [EpplusTableColumn(Header = "优惠劵介绍")] - public string CouponDesc { get; set; } - - /// - /// 描述 :优惠劵使用须知 - /// 空值 : false - /// - [EpplusTableColumn(Header = "优惠劵使用须知")] - public string CouponUseIntro { get; set; } - - /// - /// 描述 :优惠劵类型 - /// - [EpplusTableColumn(Header = "优惠劵类型")] - public int CouponType { get; set; } - - - /// - /// 描述 :减免金额 - /// - [EpplusIgnore] - public decimal CouponDeductionMoney { get; set; } - - - /// - /// 描述 :折扣率 - /// - [EpplusIgnore] - public float CouponDiscountRate { get; set; } - - - /// - /// 描述 :最低消费金额 - /// - [EpplusTableColumn(Header = "最低消费金额")] - public decimal CouponMinConsumeMoney { get; set; } - - - /// - /// 描述 :到期类型 - /// - [EpplusTableColumn(Header = "到期类型")] - public int CouponExpireType { get; set; } - - - /// - /// 描述 :有效天数 - /// - [EpplusIgnore] - public int? CouponEffectiveDays { get; set; } - - - /// - /// 描述 :固定时间-开始时间 - /// - [EpplusIgnore] - public DateTime CouponFixedStartTime { get; set; } - - - /// - /// 描述 :固定时间-结束时间 - /// - [EpplusIgnore] - public DateTime CouponFixedEndTime { get; set; } - - - /// - /// 描述 :适用范围 - /// - [EpplusIgnore] - public int? CouponApplicableScope { get; set; } - - /// - /// 描述 :领取数量 - /// - [EpplusTableColumn(Header = "领取数量")] - public int CouponGetNumber { get; set; } - - - /// - /// 描述 :发送数量(-1不限制) - /// - [EpplusTableColumn(Header = "发送数量(-1不限制)")] - public int CouponSendNumber { get; set; } - - - - /// - /// 描述 :显示状态 - /// - [EpplusTableColumn(Header = "显示状态")] - public int CouponDisplayStatus { get; set; } - - - /// - /// 描述 :排序 - /// - [EpplusTableColumn(Header = "排序")] - public int CouponSort { get; set; } - - [EpplusIgnore] - public string CouponApplicableScopeConfig { get; set; } - - [EpplusIgnore] - public string CouponGoodsIdsArr { get; set; } - [EpplusIgnore] - public string[] CouponGoodsIds { get; set; } - - public int CouponStatus { get; set; } - - - } -} diff --git a/ARW.Model/Vo/Business/Marketing/CouponManage/CustomerCoupons/CustomerCouponVo.cs b/ARW.Model/Vo/Business/Marketing/CouponManage/CustomerCoupons/CustomerCouponVo.cs deleted file mode 100644 index 9d6865b..0000000 --- a/ARW.Model/Vo/Business/Marketing/CouponManage/CustomerCoupons/CustomerCouponVo.cs +++ /dev/null @@ -1,59 +0,0 @@ -using Newtonsoft.Json; -using OfficeOpenXml.Attributes; -using SqlSugar; -using System; - -namespace ARW.Model.Vo.Business.Marketing.CouponManage.CustomerCoupons -{ - /// - /// 领券记录展示对象 - /// - /// @author lwh - /// @date 2023-07-31 - /// - public class CustomerCouponVo - { - - - /// - /// 描述 : - /// - public int CustomerCouponId { get; set; } - - - /// - /// 描述 : - /// - [JsonConverter(typeof(ValueToStringConverter))] - public long CustomerCouponGuid { get; set; } - - - /// - /// 描述 :优惠劵guid - /// - [JsonConverter(typeof(ValueToStringConverter))] - public long CouponGuid { get; set; } - - public string CouponName{ get; set; } - - /// - /// 描述 :客户guid - /// - [JsonConverter(typeof(ValueToStringConverter))] - public long CustomerGuid { get; set; } - - public string CustomerName { get; set; } - - /// - /// 描述 :是否过期 - /// - public int CustomerCouponIsExpired { get; set; } - - - /// - /// 描述 :是否已使用 - /// - public int CustomerCouponIsUsed { get; set; } - - } -} diff --git a/ARW.Model/Vo/Business/OrderManage/OrderCustomerAddreses/OrderCustomerAddressVo.cs b/ARW.Model/Vo/Business/OrderManage/OrderCustomerAddreses/OrderCustomerAddressVo.cs deleted file mode 100644 index 61de23e..0000000 --- a/ARW.Model/Vo/Business/OrderManage/OrderCustomerAddreses/OrderCustomerAddressVo.cs +++ /dev/null @@ -1,88 +0,0 @@ -using Newtonsoft.Json; -using OfficeOpenXml.Attributes; -using SqlSugar; -using System; - -namespace ARW.Model.Vo.Business.OrderManage.OrderCustomerAddreses -{ - /// - /// 订单收货地址记录展示对象 - /// - /// @author lwh - /// @date 2023-08-29 - /// - public class OrderCustomerAddressVo - { - - - /// - /// 描述 : - /// - public int OrderCustomerAddressId { get; set; } - - - /// - /// 描述 : - /// - [JsonConverter(typeof(ValueToStringConverter))] - public long OrderCustomerAddressGuid { get; set; } - - - /// - /// 描述 :订单guid - /// - [JsonConverter(typeof(ValueToStringConverter))] - public long OrderGuid { get; set; } - - - /// - /// 描述 :客户guid - /// - [JsonConverter(typeof(ValueToStringConverter))] - public long CustomerGuid { get; set; } - - - /// - /// 描述 :客户地址guid - /// - [JsonConverter(typeof(ValueToStringConverter))] - public long CustomerAddressGuid { get; set; } - - - /// - /// 描述 :收货人姓名 - /// - public string ConsigneeName { get; set; } - - - /// - /// 描述 :联系电话 - /// - public string Phont { get; set; } - - - /// - /// 描述 :省份ID - /// - public int ProvinceId { get; set; } - - - /// - /// 描述 :城市ID - /// - public int CityId { get; set; } - - - /// - /// 描述 :区/县ID - /// - public int RegionId { get; set; } - - - /// - /// 描述 :详细地址 - /// - public string Detail { get; set; } - - } -} diff --git a/ARW.Model/Vo/Business/OrderManage/OrderGoodss/OrderGoodsVo.cs b/ARW.Model/Vo/Business/OrderManage/OrderGoodss/OrderGoodsVo.cs deleted file mode 100644 index 32656e3..0000000 --- a/ARW.Model/Vo/Business/OrderManage/OrderGoodss/OrderGoodsVo.cs +++ /dev/null @@ -1,69 +0,0 @@ -using Newtonsoft.Json; -using OfficeOpenXml.Attributes; -using SqlSugar; -using System; - -namespace ARW.Model.Vo.Business.OrderManage.OrderGoodss -{ - /// - /// 订单商品记录展示对象 - /// - /// @author lwh - /// @date 2023-09-01 - /// - public class OrderGoodsVo - { - - - /// - /// 描述 : - /// - public int OrderGoodsId { get; set; } - - - /// - /// 描述 : - /// - [JsonConverter(typeof(ValueToStringConverter))] - public long OrderGoodsGuid { get; set; } - - - /// - /// 描述 :订单guid - /// - [JsonConverter(typeof(ValueToStringConverter))] - public long OrderGuid { get; set; } - - - /// - /// 描述 :商品guid - /// - [JsonConverter(typeof(ValueToStringConverter))] - public long GoodsGuid { get; set; } - - - /// - /// 描述 :商品sku唯一标识 - /// - public int? GoodsSkuId { get; set; } - - - /// - /// 描述 :商品单价 - /// - public decimal GoodsPrice { get; set; } - - - /// - /// 描述 :商品购买数量 - /// - public int GoodsTotalNum { get; set; } - - - /// - /// 描述 :商品总额(单价 × 数量) - /// - public decimal GoodsTotalAmoun { get; set; } - - } -} diff --git a/ARW.Model/Vo/Business/OrderManage/OrderRefunds/OrderRefundDetailVo.cs b/ARW.Model/Vo/Business/OrderManage/OrderRefunds/OrderRefundDetailVo.cs deleted file mode 100644 index 14834f2..0000000 --- a/ARW.Model/Vo/Business/OrderManage/OrderRefunds/OrderRefundDetailVo.cs +++ /dev/null @@ -1,182 +0,0 @@ -using ARW.Model.Vo.Business.LogisticsManage.Deliverys; -using ARW.Model.Vo.Business.OrderManage.Orders; -using Newtonsoft.Json; -using OfficeOpenXml.Attributes; -using SqlSugar; -using System; -using System.Collections.Generic; - -namespace ARW.Model.Vo.Business.OrderManage.OrderRefunds -{ - /// - /// 售后单记录表详情展示对象 - /// - /// @author lwh - /// @date 2023-10-16 - /// - public class OrderRefundDetailVo - { - - - /// - /// 描述 : - /// - [EpplusIgnore] - public int OrderRefundId { get; set; } - - - /// - /// 描述 : - /// - [JsonConverter(typeof(ValueToStringConverter))] - [EpplusIgnore] - public long OrderRefundGuid { get; set; } - - /// - /// 描述 :订单guid - /// - [JsonConverter(typeof(ValueToStringConverter))] - public long OrderGuid { get; set; } - - - /// - /// 描述 : 店铺guid - /// - [JsonConverter(typeof(ValueToStringConverter))] - public long ShopGuid { get; set; } - - /// - /// 描述 :订单号 - /// - [JsonConverter(typeof(ValueToStringConverter))] - public string OrderNumber { get; set; } - - - /// - /// 商品信息 - /// - public List GoodsInfoList { get; set; } - - - /// - /// 客户手机号 - /// - public string CustomerPhone { get; set; } - - - /// - /// 描述 :售后类型(1退货退款 2退货(无需退款) 3换货) - /// - [EpplusTableColumn(Header = "售后类型(1退货退款 2退货(无需退款) 3换货)")] - public int RefundType { get; set; } - - - /// - /// 描述 :客户退货原因 - /// - [EpplusTableColumn(Header = "客户退货原因")] - public int RefundReason { get; set; } - - - /// - /// 描述 :客户退款说明 - /// - [EpplusIgnore] - public string CustomerRefundDesc { get; set; } - - - /// - /// 描述 :客户退款凭证 - /// - [EpplusIgnore] - public string CustomerRefundImg { get; set; } - - - /// - /// 描述 :商品收货状态(1未收到货 2已收到货) - /// - [EpplusTableColumn(Header = "商品收货状态(1未收到货 2已收到货)")] - public int GoodsReceiveStatus { get; set; } - - - public int IsMerchantReceive { get; set; } - - /// - /// 描述 :商家审核状态(1待审核 2已同意 3已拒绝) - /// - [EpplusTableColumn(Header = "商家审核状态(1待审核 2已同意 3已拒绝)")] - public int MerchantAuditStatus { get; set; } - - - /// - /// 描述 :商家拒绝原因(说明) - /// - [EpplusIgnore] - public string MerchantRefuseDesc { get; set; } - - - /// - /// 描述 :实际退款金额 - /// - [EpplusTableColumn(Header = "实际退款金额")] - public decimal RefundMoney { get; set; } - - - /// - /// 描述 :商家退货地址guid - /// - [JsonConverter(typeof(ValueToStringConverter))] - [EpplusIgnore] - public long? ShopRefundAddressGuid { get; set; } - - - /// - /// 描述 :用户是否发货(1未发货 2已发货) - /// - [EpplusTableColumn(Header = "用户是否发货(1未发货 2已发货)")] - public int IsCustomerSend { get; set; } - - - /// - /// 描述 :客户发货时间 - /// - [EpplusIgnore] - public DateTime? CustomerSendTime { get; set; } - - - /// - /// 描述 :客户发货物流公司guid - /// - [JsonConverter(typeof(ValueToStringConverter))] - [EpplusIgnore] - public long? LogisticsCompanyGuid { get; set; } - - - /// - /// 描述 :客户发货物流单号 - /// - [EpplusIgnore] - public string ExpressNo { get; set; } - - - /// - /// 描述 :售后单状态(1进行中 2已拒绝 3已完成 4已取消) - /// - [EpplusTableColumn(Header = "售后单状态(1进行中 2已拒绝 3已完成 4已取消)")] - public int OrderRefundStatus { get; set; } - - - public string CreateTime { get; set; } - - - /// - /// 描述 :物流公司 - /// - public string LogisticsCompany { get; set; } - - /// - /// 收货信息 - /// - public OrderReceiveVo OrderReceive { get; set; } - } -} diff --git a/ARW.Model/Vo/Business/OrderManage/OrderRefunds/OrderRefundVo.cs b/ARW.Model/Vo/Business/OrderManage/OrderRefunds/OrderRefundVo.cs deleted file mode 100644 index 46a499b..0000000 --- a/ARW.Model/Vo/Business/OrderManage/OrderRefunds/OrderRefundVo.cs +++ /dev/null @@ -1,208 +0,0 @@ -using ARW.Model.Vo.Business.OrderManage.Orders; -using Newtonsoft.Json; -using OfficeOpenXml.Attributes; -using SqlSugar; -using System; -using System.Collections.Generic; - -namespace ARW.Model.Vo.Business.OrderManage.OrderRefunds -{ - /// - /// 售后单记录表展示对象 - /// - /// @author lwh - /// @date 2023-08-29 - /// - public class OrderRefundVo - { - - - /// - /// 描述 : - /// - [EpplusIgnore] - public int OrderRefundId { get; set; } - - - /// - /// 描述 : - /// - [JsonConverter(typeof(ValueToStringConverter))] - [EpplusIgnore] - public long OrderRefundGuid { get; set; } - - - /// - /// 描述 :订单guid - /// - [JsonConverter(typeof(ValueToStringConverter))] - [EpplusTableColumn(Header = "订单guid")] - public long OrderGuid { get; set; } - - - /// - /// 描述 :店铺guid - /// - [JsonConverter(typeof(ValueToStringConverter))] - [EpplusTableColumn(Header = "店铺guid")] - public long ShopGuid { get; set; } - - - /// - /// 描述 :订单号 - /// - [JsonConverter(typeof(ValueToStringConverter))] - [EpplusTableColumn(Header = "订单号")] - public string OrderNumber { get; set; } - - - /// - /// 描述 :实际付款 - /// - [EpplusTableColumn(Header = "实际付款")] - public decimal PayPrice { get; set; } - - - /// - /// 描述 :运费 - /// - [EpplusTableColumn(Header = "运费")] - public decimal ExpressPrice { get; set; } - - - /// - /// 商品信息 - /// - public List GoodsInfoList { get; set; } - - - /// - /// 描述 :客户guid - /// - [JsonConverter(typeof(ValueToStringConverter))] - [EpplusTableColumn(Header = "客户guid")] - public long CustomerGuid { get; set; } - - /// - /// 客户名称 - /// - public string CustomerNickName { get; set; } - - /// - /// 客户手机号 - /// - public string CustomerMobilePhoneNumber { get; set; } - - /// - /// 客户头像 - /// - public string CustomerAvatar { get; set; } - - - /// - /// 描述 :售后类型(1退货退款 2退货(无需退款) 3换货) - /// - [EpplusTableColumn(Header = "售后类型(1退货退款 2退货(无需退款) 3换货)")] - public int RefundType { get; set; } - - - /// - /// 描述 :客户退货原因 - /// - [EpplusTableColumn(Header = "客户退货原因")] - public int RefundReason { get; set; } - - - /// - /// 描述 :客户退款说明 - /// - [EpplusIgnore] - public string CustomerRefundDesc { get; set; } - - - /// - /// 描述 :客户退款凭证 - /// - [EpplusIgnore] - public string CustomerRefundImg { get; set; } - - - /// - /// 描述 :商品收货状态(1未收到货 2已收到货) - /// - [EpplusTableColumn(Header = "商品收货状态(1未收到货 2已收到货)")] - public int GoodsReceiveStatus { get; set; } - - - public int IsMerchantReceive { get; set; } - - - /// - /// 描述 :商家审核状态(1待审核 2已同意 3已拒绝) - /// - [EpplusTableColumn(Header = "商家审核状态(1待审核 2已同意 3已拒绝)")] - public int MerchantAuditStatus { get; set; } - - - /// - /// 描述 :商家拒绝原因(说明) - /// - [EpplusIgnore] - public string MerchantRefuseDesc { get; set; } - - - /// - /// 描述 :实际退款金额 - /// - [EpplusTableColumn(Header = "实际退款金额")] - public decimal RefundMoney { get; set; } - - - /// - /// 描述 :商家退货地址guid - /// - [JsonConverter(typeof(ValueToStringConverter))] - [EpplusIgnore] - public long? ShopRefundAddressGuid { get; set; } - - - /// - /// 描述 :用户是否发货(1未发货 2已发货) - /// - [EpplusTableColumn(Header = "用户是否发货(1未发货 2已发货)")] - public int IsCustomerSend { get; set; } - - - /// - /// 描述 :客户发货时间 - /// - [EpplusIgnore] - public DateTime? CustomerSendTime { get; set; } - - - /// - /// 描述 :客户发货物流公司guid - /// - [JsonConverter(typeof(ValueToStringConverter))] - [EpplusIgnore] - public long? LogisticsCompanyGuid { get; set; } - - - /// - /// 描述 :客户发货物流单号 - /// - [EpplusIgnore] - public string ExpressNo { get; set; } - - - /// - /// 描述 :售后单状态(1进行中 2已拒绝 3已完成 4已取消) - /// - [EpplusTableColumn(Header = "售后单状态(1进行中 2已拒绝 3已完成 4已取消)")] - public int OrderRefundStatus { get; set; } - - - public string CreateTime { get; set; } - - } -} diff --git a/ARW.Model/Vo/Business/OrderManage/Orders/OrderDetailVo.cs b/ARW.Model/Vo/Business/OrderManage/Orders/OrderDetailVo.cs deleted file mode 100644 index c6b2b78..0000000 --- a/ARW.Model/Vo/Business/OrderManage/Orders/OrderDetailVo.cs +++ /dev/null @@ -1,140 +0,0 @@ -using Newtonsoft.Json; -using OfficeOpenXml.Attributes; -using SqlSugar; -using System; -using System.Collections.Generic; - -namespace ARW.Model.Vo.Business.OrderManage.Orders -{ - /// - /// 订单详情展示对象Api - /// - public class OrderDetailsVo - { - public int OrderId { get; set; } - - [JsonConverter(typeof(ValueToStringConverter))] - public long OrderGuid { get; set; } - - public string CustomerPhone { get; set; } - - [EpplusTableColumn(Header = "订单号")] - public string OrderNumber { get; set; } - - [EpplusTableColumn(Header = "商品总金额")] - public decimal GoodsTotalAmoun { get; set; } - - [EpplusTableColumn(Header = "订单金额")] - public decimal OrderAmount { get; set; } - - [JsonConverter(typeof(ValueToStringConverter))] - public long? CouponGuid { get; set; } - - [EpplusIgnore] - public decimal CouponMoney { get; set; } - - [EpplusIgnore] - public decimal PointsMoney { get; set; } - - [EpplusIgnore] - public decimal PointsNum { get; set; } - - [EpplusTableColumn(Header = "实际付款金额(包含运费)")] - public decimal PayPrice { get; set; } - - [EpplusIgnore] - public decimal UpdatePrice { get; set; } - - [EpplusIgnore] - public string OrderRemark { get; set; } - - [EpplusTableColumn(Header = "支付方式(1微信支付 2余额支付)")] - public int PayType { get; set; } - - [EpplusTableColumn(Header = "付款状态(1未付款 2已付款)")] - public int PayStatus { get; set; } - - [EpplusTableColumn(Header = "付款时间", NumberFormat = "yyyy-MM-dd HH:mm:ss")] - public DateTime? PayTime { get; set; } - - - [EpplusTableColumn(Header = "配送方式(1快递配送)")] - public int DeliveryType { get; set; } - - - [EpplusTableColumn(Header = "运费金额")] - public decimal ExpressPrice { get; set; } - - - [JsonConverter(typeof(ValueToStringConverter))] - [EpplusIgnore] - public long? LogisticsCompanyGuid { get; set; } - - - [EpplusIgnore] - public string LogisticsCompany { get; set; } - - - [EpplusIgnore] - public string LogisticsTrackingNumber { get; set; } - - - [EpplusTableColumn(Header = "发货状态(1未发货 2已发货)")] - public int DeliveryStatus { get; set; } - - - [EpplusIgnore] - public DateTime? DeliveryTime { get; set; } - - - [EpplusTableColumn(Header = "收货状态(1未收货 2已收货)")] - public int ReceiptStatus { get; set; } - - - [EpplusIgnore] - public DateTime? ReceiptTime { get; set; } - - - [EpplusTableColumn(Header = "订单状态(1进行中 2取消 3待取消 4已完成)")] - public int OrderStatus { get; set; } - - - [EpplusIgnore] - public decimal PointsBonus { get; set; } - - - [EpplusTableColumn(Header = "订单是否已结算(1未结算 2已结算)")] - public int IsSettled { get; set; } - - - [EpplusIgnore] - public string TransactionId { get; set; } - - - [EpplusTableColumn(Header = "是否已评价(1否 2是)")] - public int IsComment { get; set; } - - - [EpplusTableColumn(Header = "订单来源(1普通订单)")] - public int OrderSource { get; set; } - - - /// - /// 下单时间 - /// - public DateTime CreateTime { get; set; } - - /// - /// 商品信息 - /// - public List GoodsInfoList { get; set; } - - - /// - /// 收货信息 - /// - public OrderReceiveVo OrderReceive { get; set; } - - } - -} diff --git a/ARW.Model/Vo/Business/OrderManage/Orders/OrderGoodsVo.cs b/ARW.Model/Vo/Business/OrderManage/Orders/OrderGoodsVo.cs deleted file mode 100644 index ce22fdb..0000000 --- a/ARW.Model/Vo/Business/OrderManage/Orders/OrderGoodsVo.cs +++ /dev/null @@ -1,60 +0,0 @@ -using Newtonsoft.Json; -using OfficeOpenXml.Attributes; -using SqlSugar; -using System; - -namespace ARW.Model.Vo.Business.OrderManage.Orders -{ - /// - /// 订单展示对象 - /// - /// @author lwh - /// @date 2023-08-29 - /// - public class OrderGoodsVo - { - - /// - /// 商品名称 - /// - public string GoodsName { get; set; } - - - /// - /// 商品图片 - /// - public string GoodsPicture { get; set; } - - - /// - /// 商品规格值 - /// - public string GoodsSpecName { get; set; } - - /// - /// 描述 :编码 - /// - public string GoodsCoding { get; set; } - - /// - /// 商品单价 - /// - public decimal GoodsPrice { get; set; } - - - /// - /// 购买数量 - /// - public int GoodsTotalNum { get; set; } - - /// - /// 商品总价 - /// - public decimal GoodsTotalPrice { get; set; } - - /// - /// 商品重量 - /// - public decimal GoodsWeight { get; set;} - } -} diff --git a/ARW.Model/Vo/Business/OrderManage/Orders/OrderReceiveVo.cs b/ARW.Model/Vo/Business/OrderManage/Orders/OrderReceiveVo.cs deleted file mode 100644 index 3df280c..0000000 --- a/ARW.Model/Vo/Business/OrderManage/Orders/OrderReceiveVo.cs +++ /dev/null @@ -1,40 +0,0 @@ -using Newtonsoft.Json; -using OfficeOpenXml.Attributes; -using SqlSugar; -using System; - -namespace ARW.Model.Vo.Business.OrderManage.Orders -{ - /// - /// 订单展示对象 - /// - /// @author lwh - /// @date 2023-09-03 - /// - public class OrderReceiveVo - { - - /// - /// 描述 :收货人姓名 - /// - public string ConsigneeName { get; set; } - - - /// - /// 描述 :联系电话 - /// - public string Phone { get; set; } - - - /// - /// 地区 - /// - public string Region { get; set; } - - /// - /// 描述 :详细地址 - /// - public string Detail { get; set; } - - } -} diff --git a/ARW.Model/Vo/Business/OrderManage/Orders/OrderVo.cs b/ARW.Model/Vo/Business/OrderManage/Orders/OrderVo.cs deleted file mode 100644 index 1a85115..0000000 --- a/ARW.Model/Vo/Business/OrderManage/Orders/OrderVo.cs +++ /dev/null @@ -1,131 +0,0 @@ -using Newtonsoft.Json; -using OfficeOpenXml.Attributes; -using SqlSugar; -using System; -using System.Collections.Generic; - -namespace ARW.Model.Vo.Business.OrderManage.Orders -{ - /// - /// 订单展示对象 - /// - /// @author lwh - /// @date 2023-08-29 - /// - public class OrderVo - { - - - /// - /// 描述 : - /// - [EpplusIgnore] - public int OrderId { get; set; } - - - /// - /// 描述 : - /// - [JsonConverter(typeof(ValueToStringConverter))] - [EpplusIgnore] - public long OrderGuid { get; set; } - - /// - /// 商品信息 - /// - public List GoodsInfoList { get; set; } - - - /// - /// 描述 :客户guid - /// - [JsonConverter(typeof(ValueToStringConverter))] - [EpplusTableColumn(Header = "客户guid")] - public long CustomerGuid { get; set; } - - /// - /// 客户名称 - /// - public string CustomerNickName { get; set;} - - /// - /// 客户手机号 - /// - public string CustomerMobilePhoneNumber { get; set; } - - /// - /// 客户头像 - /// - public string CustomerAvatar { get; set; } - - /// - /// 描述 :订单号 - /// - [EpplusTableColumn(Header = "订单号")] - public string OrderNumber { get; set; } - - - /// - /// 描述 :订单金额 - /// - [EpplusTableColumn(Header = "订单金额")] - public decimal OrderAmount { get; set; } - - /// - /// 描述 :实际付款金额(包含运费) - /// - [EpplusTableColumn(Header = "实际付款金额(包含运费)")] - public decimal PayPrice { get; set; } - - - /// - /// 描述 :运费金额 - /// - [EpplusTableColumn(Header = "运费金额")] - public decimal ExpressPrice { get; set; } - - /// - /// 描述 :支付方式(1微信支付 2余额支付) - /// - [EpplusTableColumn(Header = "支付方式")] - public int PayType { get; set; } - - - /// - /// 描述 :付款状态(1未付款 2已付款) - /// - [EpplusTableColumn(Header = "付款状态(1未付款 2已付款)")] - public int PayStatus { get; set; } - - - /// - /// 描述 :配送方式(1快递配送) - /// - [EpplusTableColumn(Header = "配送方式(1快递配送)")] - public int DeliveryType { get; set; } - - - /// - /// 描述 :发货状态(1未发货 2已发货) - /// - [EpplusTableColumn(Header = "发货状态(1未发货 2已发货)")] - public int DeliveryStatus { get; set; } - - /// - /// 描述 :收货状态(1未收货 2已收货) - /// - [EpplusTableColumn(Header = "收货状态(1未收货 2已收货)")] - public int ReceiptStatus { get; set; } - - /// - /// 描述 :订单状态(1进行中 2取消 3待取消 4已完成) - /// - [EpplusTableColumn(Header = "订单状态(1进行中 2取消 3待取消 4已完成)")] - public int OrderStatus { get; set; } - - /// - /// 下单时间 - /// - public DateTime CreateTime { get; set; } - } -} diff --git a/ARW.Model/Vo/Business/OrderTasks/OrderTaskVo.cs b/ARW.Model/Vo/Business/OrderTasks/OrderTaskVo.cs deleted file mode 100644 index 002c8d4..0000000 --- a/ARW.Model/Vo/Business/OrderTasks/OrderTaskVo.cs +++ /dev/null @@ -1,69 +0,0 @@ -using Newtonsoft.Json; -using OfficeOpenXml.Attributes; -using SqlSugar; -using System; - -namespace ARW.Model.Vo.Business.OrderTasks -{ - /// - /// 订单取消任务展示对象 - /// - /// @author lwh - /// @date 2023-10-23 - /// - public class OrderTaskVo - { - - - /// - /// 描述 :订单取消任务id - /// - public int OrderTaskId { get; set; } - - - /// - /// 描述 :订单取消任务guid - /// - [JsonConverter(typeof(ValueToStringConverter))] - public long OrderTaskGuid { get; set; } - - - /// - /// 描述 :客户guid(外键) - /// - [JsonConverter(typeof(ValueToStringConverter))] - public long CustomerGuid { get; set; } - - - /// - /// 描述 :订单guid(外键) - /// - [JsonConverter(typeof(ValueToStringConverter))] - public long OrderGuid { get; set; } - - - /// - /// 描述 :订单结束时间 - /// - public DateTime? EndTime { get; set; } - - - /// - /// 描述 :订单支付状态(1未支付 2已支付) - /// - public int PayStatus { get; set; } - - - /// - /// 描述 :订单取消状态(1待取消 2已取消) - /// - public int CancelStatus { get; set; } - - - /// - /// 描述 :失败原因 - /// - public string ErrorMsg { get; set; } - - } -} diff --git a/ARW.Model/Vo/Business/ShopManager/ShopAddresss/ShopAddressVo.cs b/ARW.Model/Vo/Business/ShopManager/ShopAddresss/ShopAddressVo.cs deleted file mode 100644 index 9b447c5..0000000 --- a/ARW.Model/Vo/Business/ShopManager/ShopAddresss/ShopAddressVo.cs +++ /dev/null @@ -1,120 +0,0 @@ -using Newtonsoft.Json; -using OfficeOpenXml.Attributes; -using SqlSugar; -using System; - -namespace ARW.Model.Vo.Business.ShopManager.ShopAddresss -{ - /// - /// 店铺地址展示对象 - /// - /// @author lwh - /// @date 2023-06-15 - /// - public class ShopAddressVo - { - - - /// - /// 描述 : - /// - [EpplusIgnore] - public int ShopAddressId { get; set; } - - - /// - /// 描述 : - /// - [JsonConverter(typeof(ValueToStringConverter))] - [EpplusIgnore] - public long ShopAddressGuid { get; set; } - - - /// - /// 描述 : 店铺guid - /// - [JsonConverter(typeof(ValueToStringConverter))] - [EpplusIgnore] - public long ShopGuid { get; set; } - - - /// - /// 描述 :店铺名称 - /// - [EpplusTableColumn(Header = "店铺")] - public string ShopName { get; set; } - - /// - /// 描述 :地址类型 - /// - [EpplusIgnore] - public int ShopAddressType { get; set; } - - - /// - /// 描述 :地址类型名称 - /// - [EpplusTableColumn(Header = "地址类型")] - public string ShopAddressTypeName { get; set; } - - - /// - /// 描述 :省id - /// - [EpplusIgnore] - public int ProvinceId { get; set; } - - - /// - /// 描述 :市id - /// - [EpplusIgnore] - public int CityId { get; set; } - - - /// - /// 描述 :区id - /// - [EpplusIgnore] - public int DistrictId { get; set; } - - - /// - /// 描述 :所在地区 - /// - [EpplusTableColumn(Header = "所在地区")] - public string AddressName { get; set; } - - - /// - /// 描述 :联系人姓名 - /// - [EpplusTableColumn(Header = "联系人姓名")] - public string ShopAddressContactName { get; set; } - - - /// - /// 描述 :联系电话 - /// - [EpplusTableColumn(Header = "联系电话")] - public string ShopAddressContactNumber { get; set; } - - - /// - /// 描述 :详细地址 - /// - [EpplusTableColumn(Header = "详细地址")] - public string ShopAddressDetailedAddress { get; set; } - - - /// - /// 描述 :排序 - /// - [EpplusTableColumn(Header = "排序")] - public int ShopAddressSort { get; set; } - - public string CreateTime { get; set; } - - - } -} diff --git a/ARW.Model/Vo/Business/ShopManager/Shops/CustomerWithOutBindVo.cs b/ARW.Model/Vo/Business/ShopManager/Shops/CustomerWithOutBindVo.cs deleted file mode 100644 index 1f35794..0000000 --- a/ARW.Model/Vo/Business/ShopManager/Shops/CustomerWithOutBindVo.cs +++ /dev/null @@ -1,29 +0,0 @@ -using Newtonsoft.Json; -using OfficeOpenXml.Attributes; -using SqlSugar; -using System; - -namespace ARW.Model.Vo.Business.ShopManager.Shops -{ - /// - /// 未绑定客户展示对象 - /// - /// @author lwh - /// @date 2023-06-12 - /// - public class CustomerWithOutBindVo - { - /// - /// 描述 : 客户guid - /// - [JsonConverter(typeof(ValueToStringConverter))] - public long CustomerGuid { get; set; } - - - /// - /// 描述 :客户名称 - /// - public string CustomerNickname { get; set; } - - } -} diff --git a/ARW.Model/Vo/Business/ShopManager/Shops/ShopVo.cs b/ARW.Model/Vo/Business/ShopManager/Shops/ShopVo.cs deleted file mode 100644 index 331d0ae..0000000 --- a/ARW.Model/Vo/Business/ShopManager/Shops/ShopVo.cs +++ /dev/null @@ -1,202 +0,0 @@ -using Newtonsoft.Json; -using OfficeOpenXml.Attributes; -using SqlSugar; -using System; - -namespace ARW.Model.Vo.Business.ShopManager.Shops -{ - /// - /// 店铺展示对象 - /// - /// @author lwh - /// @date 2023-06-09 - /// - public class ShopVo - { - - - /// - /// 描述 : - /// - [EpplusIgnore] - public int ShopId { get; set; } - - - /// - /// 描述 : - /// - [JsonConverter(typeof(ValueToStringConverter))] - [EpplusIgnore] - public long ShopGuid { get; set; } - - - /// - /// 描述 :用户id - /// - [EpplusIgnore] - public int? ShopUserId { get; set; } - - /// - /// 用户名 - /// - public string UserName { get; set; } - - - /// - /// 描述 :客户guid - /// - [JsonConverter(typeof(ValueToStringConverter))] - [EpplusIgnore] - public long? ShopCustomerGuid { get; set; } - - /// - /// 客户名 - /// - public string CustomerNickname { get; set; } - - - /// - /// 描述 :经营类目guid - /// - [JsonConverter(typeof(ValueToStringConverter))] - [EpplusTableColumn(Header = "经营类目guid")] - public long ShopBusinessCategoryGuid { get; set; } - - - /// - /// 经营类别名称 - /// - public string ShopBusinessCategoryName { get; set; } - - - /// - /// 描述 :图标 - /// - [EpplusTableColumn(Header = "图标")] - public string ShopLogo { get; set; } - - - /// - /// 描述 :营业执照 - /// - [EpplusTableColumn(Header = "营业执照")] - public string ShopBusinessLicense { get; set; } - - - /// - /// 描述 :名称 - /// - [EpplusTableColumn(Header = "名称")] - public string ShopName { get; set; } - - - /// - /// 描述 :简介 - /// - [EpplusTableColumn(Header = "简介")] - public string ShopIntro { get; set; } - - - /// - /// 描述 :排序 - /// - [EpplusTableColumn(Header = "排序")] - public int ShopSort { get; set; } - - - /// - /// 描述 :销售单量 - /// - [EpplusTableColumn(Header = "销售单量")] - public int ShopSalesOrderCount { get; set; } - - - /// - /// 描述 :审核状态 - /// - [EpplusTableColumn(Header = "审核状态")] - public int ShopAuditStatus { get; set; } - - - /// - /// 描述 :审核人 - /// - [JsonConverter(typeof(ValueToStringConverter))] - [EpplusTableColumn(Header = "审核人")] - public long ShopAuditUserGuid { get; set; } - - public string CreateTime { get; set; } - - } - - - - /// - /// 店铺详情展示对象 - /// - /// @author lwh - /// @date 2023-06-015 - /// - public class ShopDetailVo - { - - - /// - /// 描述 : - /// - public int ShopId { get; set; } - - - /// - /// 描述 : - /// - [JsonConverter(typeof(ValueToStringConverter))] - public long ShopGuid { get; set; } - - /// - /// 描述 :经营类目guid - /// - [JsonConverter(typeof(ValueToStringConverter))] - public long ShopBusinessCategoryGuid { get; set; } - - - /// - /// 经营类别名称 - /// - public string ShopBusinessCategoryName { get; set; } - - - /// - /// 描述 :图标 - /// - public string ShopLogo { get; set; } - - - /// - /// 描述 :营业执照 - /// - public string ShopBusinessLicense { get; set; } - - - /// - /// 描述 :名称 - /// - public string ShopName { get; set; } - - - /// - /// 描述 :简介 - /// - public string ShopIntro { get; set; } - - - /// - /// 描述 :销售单量 - /// - public int ShopSalesOrderCount { get; set; } - - - } - - -} diff --git a/ARW.Model/Vo/Business/ShopManager/Shops/UserWithOutBindVo.cs b/ARW.Model/Vo/Business/ShopManager/Shops/UserWithOutBindVo.cs deleted file mode 100644 index 8c497a0..0000000 --- a/ARW.Model/Vo/Business/ShopManager/Shops/UserWithOutBindVo.cs +++ /dev/null @@ -1,29 +0,0 @@ -using Newtonsoft.Json; -using OfficeOpenXml.Attributes; -using SqlSugar; -using System; - -namespace ARW.Model.Vo.Business.ShopManager.Shops -{ - /// - /// 未绑定用户展示对象 - /// - /// @author lwh - /// @date 2023-06-12 - /// - public class UserWithOutBindVo - { - /// - /// 描述 : 用户guid - /// - [JsonConverter(typeof(ValueToStringConverter))] - public long UserId { get; set; } - - - /// - /// 描述 :用户名称 - /// - public string UserName { get; set; } - - } -} diff --git a/ARW.Repository/Business/Carts/CartRepository.cs b/ARW.Repository/Business/Carts/CartRepository.cs deleted file mode 100644 index fc8539b..0000000 --- a/ARW.Repository/Business/Carts/CartRepository.cs +++ /dev/null @@ -1,20 +0,0 @@ -using System; -using Infrastructure.Attribute; -using ARW.Repository.System; -using ARW.Model.Models.Business.Carts; - -namespace ARW.Repository.Business.Carts -{ - /// - /// 购物车记录仓储 - /// - /// @author lwh - /// @date 2023-07-20 - /// - [AppService(ServiceLifetime = LifeTime.Transient)] - public class CartRepository : BaseRepository - { - #region 业务逻辑代码 - #endregion - } -} \ No newline at end of file diff --git a/ARW.Repository/Business/Crawler/CrawlRepository.cs b/ARW.Repository/Business/Crawler/CrawlRepository.cs deleted file mode 100644 index 58fa0b3..0000000 --- a/ARW.Repository/Business/Crawler/CrawlRepository.cs +++ /dev/null @@ -1,143 +0,0 @@ -using Infrastructure.Attribute; -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; -using ARW.Model.Models.Business.Crawler; -using AngleSharp.Html.Parser; -using RestSharp; - -namespace ARW.Repository.Business -{ - /// - /// 爬虫仓储服务 - /// - [AppService(ServiceLifetime = LifeTime.Transient)] - public class CrawlRepository : BaseRepository - { - protected static HtmlParser htmlParser = new HtmlParser(); - - - // 不羞涩 - public string LoadBuxiuseHTML(string url) - { - try - { - var client = new RestClient(url); - var request = new RestRequest("https://www.buxiuse.com/", Method.Get); - request.AddHeader("cookie", "SESSION=YmNhNjgxNTctNzk3MS00YTVkLThmM2YtMDBjYzhjZDNiNzNm; Hm_lvt_479b5d690f3b5d1eae450ce953f78480=1660291808,1660530399; Hm_lpvt_479b5d690f3b5d1eae450ce953f78480=1660530399"); - request.AddHeader("accept-encoding", "gzip, deflate, br"); - request.AddHeader("accept", "application/json, text/javascript, */*; q=0.01"); - request.AddHeader("user-agent", "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/104.0.0.0 Safari/537.36"); - request.AddHeader("upgrade-insecure-requests", "1"); - request.AddHeader("referer", "https://www.buxiuse.com/"); - request.AddHeader("cache-control", "max-age=0,no-cache"); - request.AddHeader("authority", "www.buxiuse.com"); - RestResponse response = client.Execute(request); - return response.IsSuccessful ? response.Content : ""; - - } - catch (Exception ex) - { - Console.WriteLine($"LoadHTML fail,url:{url},ex:{ex.ToString()}"); - - return string.Empty; - } - } - public int ParseBuxiusePic(string html) - { - var dom = htmlParser.ParseDocument(html); - var movies = new List(); - var lis = dom.QuerySelectorAll(".panel-body li"); - foreach (var li in lis) - { - - var onlineURL = "https://www.buxiuse.com" + li.QuerySelector("a").GetAttribute("href"); - var movie = new Crawl() - { - Name = li.QuerySelector("img").GetAttribute("title"), - Cover = li.QuerySelector("img").GetAttribute("src"), - Link = onlineURL, - Type = "图片", - PublishTime = DateTime.Now, - }; - //Context.Insertable(movie).ExecuteReturnIdentity(); - Add(movie); - movies.Add(movie); - } - - if (movies.Count == 0) - return 0; - else - return 1; - } - - - // Yellow - public string LoadYellowHTML(string url) - { - try - { - var client = new RestClient(url); - var request = new RestRequest(url, Method.Get); - request.AddHeader("cookie", "Hm_lvt_07f2c7e5bd9592209d606f0184fc3d8f=1660568257; recente=%5B%7B%22vod_name%22%3A%22%E5%9B%BD%E4%BA%A7AV%E5%89%A7%E6%83%85-%E4%B8%88%E5%A4%AB%E7%9A%84%22%2C%22vod_url%22%3A%22https%3A%2F%2Frra5ii1x6k3in.com%3A58002%2Findex.php%2Fvod%2Fplay%2Fid%2F138577%2Fsid%2F1%2Fnid%2F1.html%22%2C%22vod_part%22%3A%22%E7%AC%AC1%E9%9B%86%22%7D%5D; Hm_lvt_36ab7abfe863c7133f2af34068ebfc82=1660568383; Hm_lpvt_36ab7abfe863c7133f2af34068ebfc82=1660568383; Hm_lpvt_07f2c7e5bd9592209d606f0184fc3d8f=1660570678"); - request.AddHeader("accept-encoding", "gzip, deflate, br"); - request.AddHeader("accept", "text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9"); - request.AddHeader("user-agent", "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/104.0.0.0 Safari/537.36"); - request.AddHeader("upgrade-insecure-requests", "1"); - request.AddHeader("referer", url); - request.AddHeader("cache-control", "max-age=0"); - RestResponse response = client.Execute(request); - return response.IsSuccessful ? response.Content : ""; - } - catch (Exception ex) - { - Console.WriteLine($"LoadHTML fail,url:{url},ex:{ex.ToString()}"); - - return string.Empty; - } - } - public int ParseYellowPic(string html) - { - var dom = htmlParser.ParseDocument(html); - var movies = new List(); - var lis = dom.QuerySelectorAll(".stui-pannel_bd")?.SelectMany(div => div.QuerySelectorAll("li")); - foreach (var li in lis) - { - var onlineURL = "https://x4dgjgj002d5c.com:58002/" + li.QuerySelector("a").GetAttribute("href"); - var name = li.QuerySelector("a").GetAttribute("title"); - - string[] arr = { "福利姬","swag","丝" ,"jk","可爱","制服","网红"}; - - foreach (var item in arr) - { - if (name.Contains(item) == true) - { - var movie = new Crawl() - { - Name = name, - Link = onlineURL, - Type = "Yellow", - Cover = li.QuerySelector("a").GetAttribute("data-original"), - }; - Add(movie); - movies.Add(movie); - } - else - { - continue; - } - } - - } - - if (movies.Count == 0) - return 0; - else - return 1; - } - - - } -} diff --git a/ARW.Repository/Business/Custom/CustomerAddresses/CustomerAddressRepository.cs b/ARW.Repository/Business/Custom/CustomerAddresses/CustomerAddressRepository.cs deleted file mode 100644 index 0afabf5..0000000 --- a/ARW.Repository/Business/Custom/CustomerAddresses/CustomerAddressRepository.cs +++ /dev/null @@ -1,20 +0,0 @@ -using System; -using Infrastructure.Attribute; -using ARW.Repository.System; -using ARW.Model.Models.Business.Custom.CustomerAddresses; - -namespace ARW.Repository.Business.Custom.CustomerAddresses -{ - /// - /// 客户收货地址仓储 - /// - /// @author admin - /// @date 2023-06-05 - /// - [AppService(ServiceLifetime = LifeTime.Transient)] - public class CustomerAddressRepository : BaseRepository - { - #region 业务逻辑代码 - #endregion - } -} \ No newline at end of file diff --git a/ARW.Repository/Business/GoodsManager/GoodsCategorys/GoodsCategoryRepository.cs b/ARW.Repository/Business/GoodsManager/GoodsCategorys/GoodsCategoryRepository.cs deleted file mode 100644 index 6752043..0000000 --- a/ARW.Repository/Business/GoodsManager/GoodsCategorys/GoodsCategoryRepository.cs +++ /dev/null @@ -1,20 +0,0 @@ -using System; -using Infrastructure.Attribute; -using ARW.Repository.System; -using ARW.Model.Models.Business.GoodsManager.GoodsCategorys; - -namespace ARW.Repository.Business.GoodsManager.GoodsCategorys -{ - /// - /// 商品类目仓储 - /// - /// @author lwh - /// @date 2023-06-12 - /// - [AppService(ServiceLifetime = LifeTime.Transient)] - public class GoodsCategoryRepository : BaseRepository - { - #region 业务逻辑代码 - #endregion - } -} \ No newline at end of file diff --git a/ARW.Repository/Business/GoodsManager/GoodsComments/GoodsCommentRepository.cs b/ARW.Repository/Business/GoodsManager/GoodsComments/GoodsCommentRepository.cs deleted file mode 100644 index a8a8ed4..0000000 --- a/ARW.Repository/Business/GoodsManager/GoodsComments/GoodsCommentRepository.cs +++ /dev/null @@ -1,20 +0,0 @@ -using System; -using Infrastructure.Attribute; -using ARW.Repository.System; -using ARW.Model.Models.Business.GoodsManager.GoodsComments; - -namespace ARW.Repository.Business.GoodsManager.GoodsComments -{ - /// - /// 商品评价仓储 - /// - /// @author admin - /// @date 2023-07-15 - /// - [AppService(ServiceLifetime = LifeTime.Transient)] - public class GoodsCommentRepository : BaseRepository - { - #region 业务逻辑代码 - #endregion - } -} \ No newline at end of file diff --git a/ARW.Repository/Business/GoodsManager/GoodsServicess/GoodsServicesRels/GoodsServicesRelRepository.cs b/ARW.Repository/Business/GoodsManager/GoodsServicess/GoodsServicesRels/GoodsServicesRelRepository.cs deleted file mode 100644 index a1db6a0..0000000 --- a/ARW.Repository/Business/GoodsManager/GoodsServicess/GoodsServicesRels/GoodsServicesRelRepository.cs +++ /dev/null @@ -1,20 +0,0 @@ -using System; -using Infrastructure.Attribute; -using ARW.Repository.System; -using ARW.Model.Models.Business.GoodsManager.GoodsServicess.GoodsServicesRels; - -namespace ARW.Repository.Business.GoodsManager.GoodsServicess.GoodsServicesRels -{ - /// - /// 商品服务与承诺关系表仓储 - /// - /// @author lwh - /// @date 2023-06-18 - /// - [AppService(ServiceLifetime = LifeTime.Transient)] - public class GoodsServicesRelRepository : BaseRepository - { - #region 业务逻辑代码 - #endregion - } -} \ No newline at end of file diff --git a/ARW.Repository/Business/GoodsManager/GoodsServicess/GoodsServicesRepository.cs b/ARW.Repository/Business/GoodsManager/GoodsServicess/GoodsServicesRepository.cs deleted file mode 100644 index 3ea28e0..0000000 --- a/ARW.Repository/Business/GoodsManager/GoodsServicess/GoodsServicesRepository.cs +++ /dev/null @@ -1,20 +0,0 @@ -using System; -using Infrastructure.Attribute; -using ARW.Repository.System; -using ARW.Model.Models.Business.GoodsManager.GoodsServicess; - -namespace ARW.Repository.Business.GoodsManager.GoodsServicess -{ - /// - /// 商品服务与承诺仓储 - /// - /// @author lwh - /// @date 2023-06-18 - /// - [AppService(ServiceLifetime = LifeTime.Transient)] - public class GoodsServicesRepository : BaseRepository - { - #region 业务逻辑代码 - #endregion - } -} \ No newline at end of file diff --git a/ARW.Repository/Business/GoodsManager/GoodsSpecs/GoodsSkus/GoodsSkuRepository.cs b/ARW.Repository/Business/GoodsManager/GoodsSpecs/GoodsSkus/GoodsSkuRepository.cs deleted file mode 100644 index ff55a5a..0000000 --- a/ARW.Repository/Business/GoodsManager/GoodsSpecs/GoodsSkus/GoodsSkuRepository.cs +++ /dev/null @@ -1,20 +0,0 @@ -using System; -using Infrastructure.Attribute; -using ARW.Repository.System; -using ARW.Model.Models.Business.GoodsManager.GoodsSpecs.GoodsSkus; - -namespace ARW.Repository.Business.GoodsManager.GoodsSpecs.GoodsSkus -{ - /// - /// 商品规格仓储 - /// - /// @author lwh - /// @date 2023-06-19 - /// - [AppService(ServiceLifetime = LifeTime.Transient)] - public class GoodsSkuRepository : BaseRepository - { - #region 业务逻辑代码 - #endregion - } -} \ No newline at end of file diff --git a/ARW.Repository/Business/GoodsManager/GoodsSpecs/GoodsSpecRels/GoodsSpecRelRepository.cs b/ARW.Repository/Business/GoodsManager/GoodsSpecs/GoodsSpecRels/GoodsSpecRelRepository.cs deleted file mode 100644 index 2edacc8..0000000 --- a/ARW.Repository/Business/GoodsManager/GoodsSpecs/GoodsSpecRels/GoodsSpecRelRepository.cs +++ /dev/null @@ -1,20 +0,0 @@ -using System; -using Infrastructure.Attribute; -using ARW.Repository.System; -using ARW.Model.Models.Business.GoodsManager.GoodsSpecs.GoodsSpecRels; - -namespace ARW.Repository.Business.GoodsManager.GoodsSpecs.GoodsSpecRels -{ - /// - /// 商品与规格值关系记录仓储 - /// - /// @author lwh - /// @date 2023-06-19 - /// - [AppService(ServiceLifetime = LifeTime.Transient)] - public class GoodsSpecRelRepository : BaseRepository - { - #region 业务逻辑代码 - #endregion - } -} \ No newline at end of file diff --git a/ARW.Repository/Business/GoodsManager/GoodsSpecs/SpecValues/SpecValueRepository.cs b/ARW.Repository/Business/GoodsManager/GoodsSpecs/SpecValues/SpecValueRepository.cs deleted file mode 100644 index 1eefeae..0000000 --- a/ARW.Repository/Business/GoodsManager/GoodsSpecs/SpecValues/SpecValueRepository.cs +++ /dev/null @@ -1,20 +0,0 @@ -using System; -using Infrastructure.Attribute; -using ARW.Repository.System; -using ARW.Model.Models.Business.GoodsManager.GoodsSpecs.SpecValues; - -namespace ARW.Repository.Business.GoodsManager.GoodsSpecs.SpecValues -{ - /// - /// 商品规格值仓储 - /// - /// @author lwh - /// @date 2023-06-19 - /// - [AppService(ServiceLifetime = LifeTime.Transient)] - public class SpecValueRepository : BaseRepository - { - #region 业务逻辑代码 - #endregion - } -} \ No newline at end of file diff --git a/ARW.Repository/Business/GoodsManager/GoodsSpecs/Specs/SpecRepository.cs b/ARW.Repository/Business/GoodsManager/GoodsSpecs/Specs/SpecRepository.cs deleted file mode 100644 index 294ecb6..0000000 --- a/ARW.Repository/Business/GoodsManager/GoodsSpecs/Specs/SpecRepository.cs +++ /dev/null @@ -1,20 +0,0 @@ -using System; -using Infrastructure.Attribute; -using ARW.Repository.System; -using ARW.Model.Models.Business.GoodsManager.GoodsSpecs.Specs; - -namespace ARW.Repository.Business.GoodsManager.GoodsSpecs.Specs -{ - /// - /// 商品规格组仓储 - /// - /// @author lwh - /// @date 2023-06-19 - /// - [AppService(ServiceLifetime = LifeTime.Transient)] - public class SpecRepository : BaseRepository - { - #region 业务逻辑代码 - #endregion - } -} \ No newline at end of file diff --git a/ARW.Repository/Business/GoodsManager/Goodss/GoodsRepository.cs b/ARW.Repository/Business/GoodsManager/Goodss/GoodsRepository.cs deleted file mode 100644 index 0a15c6a..0000000 --- a/ARW.Repository/Business/GoodsManager/Goodss/GoodsRepository.cs +++ /dev/null @@ -1,20 +0,0 @@ -using System; -using Infrastructure.Attribute; -using ARW.Repository.System; -using ARW.Model.Models.Business.GoodsManager.Goodss; - -namespace ARW.Repository.Business.GoodsManager.Goodss -{ - /// - /// 商品仓储 - /// - /// @author lwh - /// @date 2023-06-19 - /// - [AppService(ServiceLifetime = LifeTime.Transient)] - public class GoodsRepository : BaseRepository - { - #region 业务逻辑代码 - #endregion - } -} \ No newline at end of file diff --git a/ARW.Repository/Business/GoodsManager/ShopGoodsCategorys/ShopGoodsCategoryRepository.cs b/ARW.Repository/Business/GoodsManager/ShopGoodsCategorys/ShopGoodsCategoryRepository.cs deleted file mode 100644 index 3fb02ad..0000000 --- a/ARW.Repository/Business/GoodsManager/ShopGoodsCategorys/ShopGoodsCategoryRepository.cs +++ /dev/null @@ -1,20 +0,0 @@ -using System; -using Infrastructure.Attribute; -using ARW.Repository.System; -using ARW.Model.Models.Business.GoodsManager.ShopGoodsCategorys; - -namespace ARW.Repository.Business.GoodsManager.ShopGoodsCategorys -{ - /// - /// 店铺商品类目仓储 - /// - /// @author lwh - /// @date 2023-06-15 - /// - [AppService(ServiceLifetime = LifeTime.Transient)] - public class ShopGoodsCategoryRepository : BaseRepository - { - #region 业务逻辑代码 - #endregion - } -} \ No newline at end of file diff --git a/ARW.Repository/Business/LogisticsManage/DeliveryRules/DeliveryRuleRepository.cs b/ARW.Repository/Business/LogisticsManage/DeliveryRules/DeliveryRuleRepository.cs deleted file mode 100644 index cc91c80..0000000 --- a/ARW.Repository/Business/LogisticsManage/DeliveryRules/DeliveryRuleRepository.cs +++ /dev/null @@ -1,20 +0,0 @@ -using System; -using Infrastructure.Attribute; -using ARW.Repository.System; -using ARW.Model.Models.Business.LogisticsManage.DeliveryRules; - -namespace ARW.Repository.Business.LogisticsManage.DeliveryRules -{ - /// - /// 配送模板区域及运费仓储 - /// - /// @author lwh - /// @date 2023-06-16 - /// - [AppService(ServiceLifetime = LifeTime.Transient)] - public class DeliveryRuleRepository : BaseRepository - { - #region 业务逻辑代码 - #endregion - } -} \ No newline at end of file diff --git a/ARW.Repository/Business/LogisticsManage/Deliverys/DeliveryRepository.cs b/ARW.Repository/Business/LogisticsManage/Deliverys/DeliveryRepository.cs deleted file mode 100644 index 978e771..0000000 --- a/ARW.Repository/Business/LogisticsManage/Deliverys/DeliveryRepository.cs +++ /dev/null @@ -1,20 +0,0 @@ -using System; -using Infrastructure.Attribute; -using ARW.Repository.System; -using ARW.Model.Models.Business.LogisticsManage.Deliverys; - -namespace ARW.Repository.Business.LogisticsManage.Deliverys -{ - /// - /// 配送模板仓储 - /// - /// @author lwh - /// @date 2023-06-16 - /// - [AppService(ServiceLifetime = LifeTime.Transient)] - public class DeliveryRepository : BaseRepository - { - #region 业务逻辑代码 - #endregion - } -} \ No newline at end of file diff --git a/ARW.Repository/Business/LogisticsManage/LogisticsCompanys/LogisticsCompanyRepository.cs b/ARW.Repository/Business/LogisticsManage/LogisticsCompanys/LogisticsCompanyRepository.cs deleted file mode 100644 index d05e2f2..0000000 --- a/ARW.Repository/Business/LogisticsManage/LogisticsCompanys/LogisticsCompanyRepository.cs +++ /dev/null @@ -1,20 +0,0 @@ -using System; -using Infrastructure.Attribute; -using ARW.Repository.System; -using ARW.Model.Models.Business.LogisticsManage.LogisticsCompanys; - -namespace ARW.Repository.Business.LogisticsManage.LogisticsCompanys -{ - /// - /// 物流公司仓储 - /// - /// @author lwh - /// @date 2023-06-18 - /// - [AppService(ServiceLifetime = LifeTime.Transient)] - public class LogisticsCompanyRepository : BaseRepository - { - #region 业务逻辑代码 - #endregion - } -} \ No newline at end of file diff --git a/ARW.Repository/Business/Marketing/CouponManage/Coupons/CouponRepository.cs b/ARW.Repository/Business/Marketing/CouponManage/Coupons/CouponRepository.cs deleted file mode 100644 index 283b6c8..0000000 --- a/ARW.Repository/Business/Marketing/CouponManage/Coupons/CouponRepository.cs +++ /dev/null @@ -1,20 +0,0 @@ -using System; -using Infrastructure.Attribute; -using ARW.Repository.System; -using ARW.Model.Models.Business.Marketing.CouponManage.Coupons; - -namespace ARW.Repository.Business.Marketing.CouponManage.Coupons -{ - /// - /// 优惠券仓储 - /// - /// @author lwh - /// @date 2023-07-24 - /// - [AppService(ServiceLifetime = LifeTime.Transient)] - public class CouponRepository : BaseRepository - { - #region 业务逻辑代码 - #endregion - } -} \ No newline at end of file diff --git a/ARW.Repository/Business/Marketing/CouponManage/CustomerCoupons/CustomerCouponRepository.cs b/ARW.Repository/Business/Marketing/CouponManage/CustomerCoupons/CustomerCouponRepository.cs deleted file mode 100644 index 0b6d122..0000000 --- a/ARW.Repository/Business/Marketing/CouponManage/CustomerCoupons/CustomerCouponRepository.cs +++ /dev/null @@ -1,20 +0,0 @@ -using System; -using Infrastructure.Attribute; -using ARW.Repository.System; -using ARW.Model.Models.Business.Marketing.CouponManage.CustomerCoupons; - -namespace ARW.Repository.Business.Marketing.CouponManage.CustomerCoupons -{ - /// - /// 领券记录仓储 - /// - /// @author lwh - /// @date 2023-07-31 - /// - [AppService(ServiceLifetime = LifeTime.Transient)] - public class CustomerCouponRepository : BaseRepository - { - #region 业务逻辑代码 - #endregion - } -} \ No newline at end of file diff --git a/ARW.Repository/Business/OrderManage/OrderCustomerAddreses/OrderCustomerAddressRepository.cs b/ARW.Repository/Business/OrderManage/OrderCustomerAddreses/OrderCustomerAddressRepository.cs deleted file mode 100644 index d662101..0000000 --- a/ARW.Repository/Business/OrderManage/OrderCustomerAddreses/OrderCustomerAddressRepository.cs +++ /dev/null @@ -1,20 +0,0 @@ -using System; -using Infrastructure.Attribute; -using ARW.Repository.System; -using ARW.Model.Models.Business.OrderManage.OrderCustomerAddreses; - -namespace ARW.Repository.Business.OrderManage.OrderCustomerAddreses -{ - /// - /// 订单收货地址记录仓储 - /// - /// @author lwh - /// @date 2023-08-29 - /// - [AppService(ServiceLifetime = LifeTime.Transient)] - public class OrderCustomerAddressRepository : BaseRepository - { - #region 业务逻辑代码 - #endregion - } -} \ No newline at end of file diff --git a/ARW.Repository/Business/OrderManage/OrderGoodss/OrderGoodsRepository.cs b/ARW.Repository/Business/OrderManage/OrderGoodss/OrderGoodsRepository.cs deleted file mode 100644 index 6ef00c8..0000000 --- a/ARW.Repository/Business/OrderManage/OrderGoodss/OrderGoodsRepository.cs +++ /dev/null @@ -1,20 +0,0 @@ -using System; -using Infrastructure.Attribute; -using ARW.Repository.System; -using ARW.Model.Models.Business.OrderManage.OrderGoodss; - -namespace ARW.Repository.Business.OrderManage.OrderGoodss -{ - /// - /// 订单商品记录仓储 - /// - /// @author lwh - /// @date 2023-09-01 - /// - [AppService(ServiceLifetime = LifeTime.Transient)] - public class OrderGoodsRepository : BaseRepository - { - #region 业务逻辑代码 - #endregion - } -} \ No newline at end of file diff --git a/ARW.Repository/Business/OrderManage/OrderRefunds/OrderRefundRepository.cs b/ARW.Repository/Business/OrderManage/OrderRefunds/OrderRefundRepository.cs deleted file mode 100644 index 40fed48..0000000 --- a/ARW.Repository/Business/OrderManage/OrderRefunds/OrderRefundRepository.cs +++ /dev/null @@ -1,20 +0,0 @@ -using System; -using Infrastructure.Attribute; -using ARW.Repository.System; -using ARW.Model.Models.Business.OrderManage.OrderRefunds; - -namespace ARW.Repository.Business.OrderManage.OrderRefunds -{ - /// - /// 售后单记录表仓储 - /// - /// @author lwh - /// @date 2023-08-29 - /// - [AppService(ServiceLifetime = LifeTime.Transient)] - public class OrderRefundRepository : BaseRepository - { - #region 业务逻辑代码 - #endregion - } -} \ No newline at end of file diff --git a/ARW.Repository/Business/OrderManage/Orders/OrderRepository.cs b/ARW.Repository/Business/OrderManage/Orders/OrderRepository.cs deleted file mode 100644 index ead0b74..0000000 --- a/ARW.Repository/Business/OrderManage/Orders/OrderRepository.cs +++ /dev/null @@ -1,20 +0,0 @@ -using System; -using Infrastructure.Attribute; -using ARW.Repository.System; -using ARW.Model.Models.Business.OrderManage.Orders; - -namespace ARW.Repository.Business.OrderManage.Orders -{ - /// - /// 订单仓储 - /// - /// @author lwh - /// @date 2023-08-29 - /// - [AppService(ServiceLifetime = LifeTime.Transient)] - public class OrderRepository : BaseRepository - { - #region 业务逻辑代码 - #endregion - } -} \ No newline at end of file diff --git a/ARW.Repository/Business/OrderTasks/OrderTaskRepository.cs b/ARW.Repository/Business/OrderTasks/OrderTaskRepository.cs deleted file mode 100644 index d03cf10..0000000 --- a/ARW.Repository/Business/OrderTasks/OrderTaskRepository.cs +++ /dev/null @@ -1,20 +0,0 @@ -using System; -using Infrastructure.Attribute; -using ARW.Repository.System; -using ARW.Model.Models.Business.OrderTasks; - -namespace ARW.Repository.Business.OrderTasks -{ - /// - /// 订单取消任务仓储 - /// - /// @author lwh - /// @date 2023-10-23 - /// - [AppService(ServiceLifetime = LifeTime.Transient)] - public class OrderTaskRepository : BaseRepository - { - #region 业务逻辑代码 - #endregion - } -} \ No newline at end of file diff --git a/ARW.Repository/Business/ShopManager/ShopAddresss/ShopAddressRepository.cs b/ARW.Repository/Business/ShopManager/ShopAddresss/ShopAddressRepository.cs deleted file mode 100644 index ee1b5c2..0000000 --- a/ARW.Repository/Business/ShopManager/ShopAddresss/ShopAddressRepository.cs +++ /dev/null @@ -1,20 +0,0 @@ -using System; -using Infrastructure.Attribute; -using ARW.Repository.System; -using ARW.Model.Models.Business.ShopManager.ShopAddresss; - -namespace ARW.Repository.Business.ShopManager.ShopAddresss -{ - /// - /// 店铺地址仓储 - /// - /// @author lwh - /// @date 2023-06-15 - /// - [AppService(ServiceLifetime = LifeTime.Transient)] - public class ShopAddressRepository : BaseRepository - { - #region 业务逻辑代码 - #endregion - } -} \ No newline at end of file diff --git a/ARW.Repository/Business/ShopManager/Shops/ShopRepository.cs b/ARW.Repository/Business/ShopManager/Shops/ShopRepository.cs deleted file mode 100644 index a6787a1..0000000 --- a/ARW.Repository/Business/ShopManager/Shops/ShopRepository.cs +++ /dev/null @@ -1,20 +0,0 @@ -using System; -using Infrastructure.Attribute; -using ARW.Repository.System; -using ARW.Model.Models.Business.ShopManager.Shops; - -namespace ARW.Repository.Business.ShopManager.Shops -{ - /// - /// 店铺仓储 - /// - /// @author lwh - /// @date 2023-06-09 - /// - [AppService(ServiceLifetime = LifeTime.Transient)] - public class ShopRepository : BaseRepository - { - #region 业务逻辑代码 - #endregion - } -} \ No newline at end of file diff --git a/ARW.Service/Api/BusinessService/Carts/CartServiceApi.cs b/ARW.Service/Api/BusinessService/Carts/CartServiceApi.cs deleted file mode 100644 index e2e5cf7..0000000 --- a/ARW.Service/Api/BusinessService/Carts/CartServiceApi.cs +++ /dev/null @@ -1,364 +0,0 @@ -using Infrastructure.Attribute; -using Microsoft.AspNetCore.Http; -using SqlSugar; -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; -using ARW.Model; -using ARW.Repository; -using ARW.Repository.Business.Carts; -using ARW.Service.Api.IBusinessService.Carts; -using ARW.Model.Dto.Api.Carts; -using ARW.Model.Models.Business.Carts; -using ARW.Model.Vo.Api.Carts; -using ARW.Model.Models.Business.Custom.Customers; -using ARW.Model.Models.Business.GoodsManager.Goodss; -using ARW.Model.Models.Business.ShopManager.Shops; -using Org.BouncyCastle.Crypto.Prng; -using ARW.Repository.Business.ShopManager.Shops; -using ARW.Repository.Business.Marketing.CouponManage.Coupons; -using ARW.Repository.Business.Marketing.CouponManage.CustomerCoupons; -using ARW.Repository.Business.GoodsManager.Goodss; -using ARW.Repository.Business.GoodsManager.GoodsSpecs.GoodsSkus; -using ARW.Repository.Business.GoodsManager.GoodsSpecs.Specs; -using ARW.Repository.Business.GoodsManager.GoodsSpecs.SpecValues; -using ARW.Repository.Business.GoodsManager.GoodsSpecs.GoodsSpecRels; -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 -{ - /// - /// 购物车记录接口实现类Api - /// - /// @author lwh - /// @date 2023-07-20 - /// - [AppService(ServiceType = typeof(ICartServiceApi), ServiceLifetime = LifeTime.Transient)] - public class CartServiceImplApi : BaseService, ICartServiceApi - { - private readonly CartRepository _CartRepository; - private readonly ShopRepository _ShopRepository; - private readonly CouponRepository _CouponRepository; - private readonly CustomerCouponRepository _CustomerCouponRepository; - private readonly GoodsRepository _GoodsRepository; - private readonly GoodsSkuRepository _GoodsSkuRepository; - private readonly SpecRepository _SpecRepository; - private readonly SpecValueRepository _SpecValueRepository; - - public CartServiceImplApi(CartRepository CartRepository, ShopRepository shopRepository, CustomerCouponRepository customerCouponRepository, CouponRepository couponRepository, GoodsRepository goodsRepository, GoodsSkuRepository goodsSkuRepository, SpecRepository specRepository, SpecValueRepository specValueRepository) - { - this._CartRepository = CartRepository; - _ShopRepository = shopRepository; - _CustomerCouponRepository = customerCouponRepository; - _CouponRepository = couponRepository; - _GoodsRepository = goodsRepository; - _GoodsSkuRepository = goodsSkuRepository; - _SpecRepository = specRepository; - _SpecValueRepository = specValueRepository; - } - - #region Api接口代码 - - #region 查询 - - /// - /// 查询购物车记录列表(Api) - /// - /// - /// - public async Task GetCartListApi(CartQueryDtoApi parm) - { - // 找到当前客户的所有购物车列表 - var customerCartList = await _CartRepository.Queryable() - .Where(s => s.CustomerGuid == parm.CustomerGuid) - .OrderBy(s => s.Create_time, OrderByType.Desc) - .ToListAsync(); - - // 找到店铺的Guids - var sameShopGuids = customerCartList - .OrderByDescending(s => s.Create_time) - .Select(item => item.ShopGuid) - .Distinct() - .ToList(); - - - var res = new List(); - - // 循环每个店铺中的购物车记录 - foreach (var item in sameShopGuids) - { - var shop = await _ShopRepository.GetFirstAsync(s => s.ShopGuid == item); - var shopCart = new CartVoApi(); - shopCart.StoreId = shop.ShopGuid; - shopCart.StoreName = shop.ShopName; - - var promotionGoodsList = new List(); - - #region 购物车优惠券算法 - // 查找当前客户可使用的优惠券 - //var couponList = await _CustomerCouponRepository.GetListAsync(s => s.CustomerGuid == parm.CustomerGuid && s.CustomerCouponIsUsed == 1 && s.CustomerCouponIsExpired == 1); - - // 如果有优惠券 - //if (couponList.Count() > 0) - //{ - // foreach (var customerCoupon in couponList) - // { - // var promotionGoods = new PromotionGoods(); - // var coupon = await _CouponRepository.GetFirstAsync(s => s.CouponGuid == customerCoupon.CouponGuid); - // promotionGoods.PromotionId = coupon.CouponId; - // promotionGoods.Title = coupon.CouponName; - // promotionGoods.PromotionCode = "MERCHANT"; - // if (coupon.CouponType == 1) - // promotionGoods.Tag = "满减"; - // else - // promotionGoods.Tag = "折扣"; - // promotionGoods.Description = coupon.CouponDesc; - - - // // 情况1:全部商品的通用券 - // if (coupon.CouponApplicableScope == 1) - // { - // var goodsPromotionList = await GetGoodsPromotionList(customerCartList, shop.ShopGuid); - // promotionGoods.GoodsPromotionList = goodsPromotionList; - // promotionGoodsList.Add(promotionGoods); - // } - // // // 情况2:指定商品的券 - // if (coupon.CouponApplicableScope == 2) - // { - // // 从优惠券中获取指定的商品ID列表 - // if (string.IsNullOrEmpty(coupon.CouponGoodsIds)) - // { - // throw new CustomException("该优惠券还未指定商品"); - // } - - // var goodsGuids = coupon.CouponGoodsIds.Split(',') - // .Select(id => Convert.ToInt32(id)) - // .Select(goodsId => _GoodsRepository.GetFirstAsync(s => s.GoodsId == goodsId)) - // .Select(task => task.Result.GoodsGuid) - // .ToList(); - - // var hasCouponGoodsList = new List(); - // var notHasCouponGoodsList = new List(); - - // // 根据优惠券指定的商品分组购物车中的商品 - // foreach (var cart in customerCartList) - // { - // foreach (var goodsGuid in goodsGuids) - // { - // if (cart.GoodsGuid == goodsGuid) - // { - // hasCouponGoodsList.Add(cart); - // } - // } - // } - // promotionGoods.GoodsPromotionList = await GetGoodsPromotionList(hasCouponGoodsList, shop.ShopGuid); - // if (promotionGoods.GoodsPromotionList.Count() > 0) - // { - // promotionGoodsList.Add(promotionGoods); - // } - // notHasCouponGoodsList = customerCartList.Except(hasCouponGoodsList).ToList(); - - // // 处理未包含在优惠券指定商品列表中的商品 - // var NotCouponPromotionGoods = new PromotionGoods(); - // NotCouponPromotionGoods.GoodsPromotionList = await GetGoodsPromotionList(notHasCouponGoodsList, shop.ShopGuid); - // if (NotCouponPromotionGoods.GoodsPromotionList.Count() > 0) - // { - // promotionGoodsList.Add(NotCouponPromotionGoods); - // } - // } - // } - //} - //else // 如果没有优惠券 - //{ - #endregion - - var promotionGoods = new PromotionGoods(); - - var goodsPromotionList = await GetGoodsPromotionList(customerCartList, shop.ShopGuid); - - promotionGoods.GoodsPromotionList = goodsPromotionList; - promotionGoodsList.Add(promotionGoods); - //} - - shopCart.PromotionGoodsList = promotionGoodsList; - res.Add(shopCart); - } - - - var cartList = new CartListVoApi(); - - decimal totalAmount = res - .SelectMany(item => item.PromotionGoodsList) - .SelectMany(item1 => item1.GoodsPromotionList) - .Where(item2 => item2.IsSelected) - .Sum(item2 => item2.Price * item2.Quantity); - - int selectedGoodsCount = res - .SelectMany(item => item.PromotionGoodsList) - .SelectMany(item1 => item1.GoodsPromotionList) - .Count(item2 => item2.IsSelected); - - cartList.TotalAmount = totalAmount; - cartList.SelectedGoodsCount = selectedGoodsCount; - - if (res.Count() > 0) - { - // 判断是否全选购物车 - cartList.IsAllSelected = customerCartList.All(cart => cart.IsSelected); - cartList.IsNotEmpty = true; - cartList.StoreGoods = res; - } - - return cartList; - - } - - - /// - /// 获取购物车商品信息 - /// - /// 当前客户的购物车列表 - /// 店铺guid - /// 购物车类型 - /// - /// - private async Task> GetGoodsPromotionList(List customerCartList, long shopGuid) - { - var goodsPromotionList = new List(); - foreach (var _item in customerCartList) - { - var goodsPromotion = new GoodsPromotion(); - if (_item.ShopGuid == shopGuid) - { - var goods = new Goods(); - goods = await _GoodsRepository.GetFirstAsync(s => s.GoodsGuid == _item.GoodsGuid); - if (goods == null) throw new CustomException("所选商品不存在,请重新挑选"); - - - - if (goods.GoodsId != 0) - { - 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(); - goodsPromotion.Title = goods.GoodsName; - goodsPromotion.Quantity = _item.CartGoodsNum; - goodsPromotion.StockStatus = goods.GoodsTotalInventory > _item.CartGoodsNum; - goodsPromotion.StockQuantity = goods.GoodsTotalInventory; - - // 查找当前规格的价格 - if (_item.GoodsSkuId != 0) - { - var sku = await _GoodsSkuRepository.GetFirstAsync(s => s.GoodsSkuId == _item.GoodsSkuId); - if (sku != null) - { - goodsPromotion.Price = sku.GoodsSkuPrice; - goodsPromotion.OriginPrice = sku.GoodsSkuLinePrice; - goodsPromotion.SkuStockQuantity = sku.GoodsSkuStockNum; - if (!string.IsNullOrEmpty(sku.GoodsSkuImg)) - goodsPromotion.Thumb = sku.GoodsSkuImg; - - // 查找当前规格的详细信息 - var specInfoList = new List(); - - if (sku.SpecValueId != 0) - { - 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; - } - //throw new CustomException("所选规格不存在,请重新挑选"); - } - else - { - goodsPromotion.Price = goods.GoodsPriceHighest; - goodsPromotion.OriginPrice = goods.GoodsDashedPriceHighest; - } - - goodsPromotion.JoinCartTime = _item.Create_time; - goodsPromotionList.Add(goodsPromotion); - } - - } - } - return goodsPromotionList; - } - - private async Task GetSpecInfo(int value) - { - var specInfo = new SpecInfo(); - var sepcValue = await _SpecValueRepository.GetFirstAsync(s => s.SpecValueId == value); - var sepc = await _SpecRepository.GetFirstAsync(s => s.SpecId == sepcValue.SpecId); - specInfo.SpecTitle = sepc.SpecName; - specInfo.SpecValue = sepcValue.SpecValueName; - return specInfo; - } - - #endregion - - - /// - /// 修改购物车商品数量 - /// - public async Task UpdateCartGoodsNum(CartGoodsNumDto parm) - { - var response = await _CartRepository.UpdateAsync(f => new Cart - { - CartGoodsNum = parm.CartGoodsNum - }, s => s.CartId == parm.CartId); - return "修改成功!"; - } - - - /// - /// 修改购物车商品选中状态 - /// - public async Task UpdateCartGoodsSelect(CartGoodsSelectDto parm) - { - var response = await _CartRepository.UpdateAsync(f => new Cart - { - IsSelected = !f.IsSelected - }, s => s.CartId == parm.CartId); - return "修改成功!"; - } - - - /// - /// 全选购物车商品 - /// - public async Task SelectAllCartGoods(CartGoodsSelectDto parm) - { - var response = await _CartRepository.UpdateAsync(f => new Cart - { - IsSelected = !f.IsSelected - }, s => s.CustomerGuid == parm.CustomerGuid && s.IsDelete == false); - return "修改成功!"; - } - - - #endregion - - } -} diff --git a/ARW.Service/Api/BusinessService/Custom/CustomerAddresses/CustomerAddressServiceApi.cs b/ARW.Service/Api/BusinessService/Custom/CustomerAddresses/CustomerAddressServiceApi.cs deleted file mode 100644 index f6354b8..0000000 --- a/ARW.Service/Api/BusinessService/Custom/CustomerAddresses/CustomerAddressServiceApi.cs +++ /dev/null @@ -1,175 +0,0 @@ -using Infrastructure.Attribute; -using Microsoft.AspNetCore.Http; -using SqlSugar; -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; -using ARW.Model; -using ARW.Repository; -using ARW.Repository.Business.Custom.CustomerAddresses; -using ARW.Service.Api.IBusinessService.Custom.CustomerAddresses; -using ARW.Model.Dto.Api.Custom.CustomerAddresses; -using ARW.Model.Models.Business.Custom.CustomerAddresses; -using ARW.Model.Vo.Api.Custom.CustomerAddresses; -using ARW.Model.Models.Business.Custom.Regions; -using ARW.Model.Models.Business.Custom.Customers; -using Microsoft.AspNetCore.Server.IISIntegration; -using ARW.Repository.Business.Custom.Customers; - -namespace ARW.Service.Api.BusinessService.Custom.CustomerAddresses -{ - /// - /// 客户收货地址接口实现类Api - /// - /// @author admin - /// @date 2023-06-09 - /// - [AppService(ServiceType = typeof(ICustomerAddressServiceApi), ServiceLifetime = LifeTime.Transient)] - public class CustomerAddressServiceImplApi : BaseService, ICustomerAddressServiceApi - { - private readonly CustomerAddressRepository _CustomerAddressRepository; - private readonly CustomerRepository _CustomerRepository; - - public CustomerAddressServiceImplApi(CustomerAddressRepository CustomerAddressRepository, CustomerRepository customerRepository) - { - this._CustomerAddressRepository = CustomerAddressRepository; - _CustomerRepository = customerRepository; - } - - #region Api接口代码 - - - /// - /// 查询客户收货地址列表(Api) - /// - /// - /// - public async Task> GetCustomerAddressListApi(CustomerAddressQueryDtoApi parm) - { - //开始拼装查询条件d - var predicate = Expressionable.Create(); - - var query = _CustomerAddressRepository - .Queryable() - .LeftJoin((s, c) => s.CustomerAddressProvinceId == c.RegionId) - .LeftJoin((s, c, d) => s.CustomerAddressCityId == d.RegionId) - .LeftJoin((s, c, d, f) => s.CustomerAddressAreaId == f.RegionId) - .LeftJoin((s, c, d, f, g) => s.CustomerAddressCustomerGuid == g.CustomerGuid) - .Where((s) => s.CustomerAddressCustomerGuid == parm.CustomerAddressCustomerGuid) - .Where(predicate.ToExpression()) - .OrderBy(s => s.Create_time, OrderByType.Asc) - .Select((s, c, d, f, g) => new CustomerAddressVoApi - { - CustomerAddressId = s.CustomerAddressId, - 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 - }); - - - return await query.ToListAsync(); - } - - /// - /// 查询客户收货地址详情(Api) - /// - /// - /// - public Task GetCustomerAddressDetails(CustomerAddressDtoApi parm) - { - - var query = _CustomerAddressRepository - .Queryable() - .LeftJoin((s, c) => s.CustomerAddressProvinceId == c.RegionId) - .LeftJoin((s, c, d) => s.CustomerAddressCityId == d.RegionId) - .LeftJoin((s, c, d, f) => s.CustomerAddressAreaId == f.RegionId) - .LeftJoin((s, c, d, f, g) => s.CustomerAddressCustomerGuid == g.CustomerGuid) - .Where(s => s.CustomerAddressId == parm.CustomerAddressId) - .Select((s, c, d, f, g) => new CustomerAddressApiDetailsVo - { - CustomerAddressId = s.CustomerAddressId, - CustomerAddressGuid = s.CustomerAddressGuid, - ProvinceName = c.RegionName, - ProvinceCode = c.RegionCode, - CityName = d.RegionName, - CityCode = d.RegionCode, - DistrictName = f.RegionName, - DistrictCode = f.RegionCode, - Name = s.CustomerAddressName, - Phone = s.CustomerAddressPhone, - DetailAddress = s.CustomerAddressDetailed, - IsDefault = s.CustomerAddressGuid == g.CustomerDefaultAddressGuid - }).Take(1); - - - return query.ToJsonAsync(); - } - - - - /// - /// 添加或修改客户收货地址 - /// - public async Task AddOrUpdateCustomerAddress(CustomerAddress model, int IsDefault) - { - if (model.CustomerAddressId != 0) - { - var response = await _CustomerAddressRepository.UpdateAsync(model); - await HandleDefaultAddress(model, IsDefault, model.CustomerAddressGuid); - return "修改成功!"; - } - else - { - var response = await _CustomerAddressRepository.InsertReturnSnowflakeIdAsync(model); - await HandleDefaultAddress(model, IsDefault, response); - return "添加成功!"; - } - } - - - /// - /// 默认收货地址处理 - /// - /// CustomerAddress模型 - /// 是否为默认地址 - /// 默认地址Guid - /// - public async Task HandleDefaultAddress(CustomerAddress model, int IsDefault, long defaultAddressGuid) - { - // 修改客户的默认地址guid - if (IsDefault == 1) - { - await _CustomerRepository.UpdateAsync(f => new Customer - { - CustomerDefaultAddressGuid = defaultAddressGuid - }, s => s.CustomerGuid == model.CustomerAddressCustomerGuid); - } - else if (IsDefault == 0) - { - // 找到当前客户的默认收货地址 - var customerDefaultAddress = await _CustomerRepository.GetFirstAsync(s => s.CustomerGuid == model.CustomerAddressCustomerGuid); - var customerDefaultAddressGuid = customerDefaultAddress.CustomerDefaultAddressGuid; - // 当前的收货地址guid如果与客户的默认收货地址相同 - if (customerDefaultAddressGuid != 0 && model.CustomerAddressGuid == customerDefaultAddressGuid) - { - // 重新设置为Null值 - await _CustomerRepository.UpdateAsync(f => new Customer - { - CustomerDefaultAddressGuid = null - }, s => s.CustomerGuid == model.CustomerAddressCustomerGuid); - } - } - } - - #endregion - - } -} diff --git a/ARW.Service/Api/BusinessService/Custom/Customers/CustomerServiceApi.cs b/ARW.Service/Api/BusinessService/Custom/Customers/CustomerServiceApi.cs index 196a625..920258f 100644 --- a/ARW.Service/Api/BusinessService/Custom/Customers/CustomerServiceApi.cs +++ b/ARW.Service/Api/BusinessService/Custom/Customers/CustomerServiceApi.cs @@ -1,11 +1,5 @@ using Infrastructure.Attribute; -using SqlSugar; -using System; -using System.Collections.Generic; -using System.Linq; using System.Threading.Tasks; -using ARW.Model; -using ARW.Repository; using ARW.Service.Api.IBusinessService.Custom.Customers; using ARW.Model.Dto.Api.Custom.Customers; using ARW.Model.Vo.Api.Custom.Customers; @@ -13,11 +7,8 @@ using ARW.Model.Models.Business.Custom.Customers; using ARW.Repository.Business.Custom.Customers; using ARW.Repository.Business.Custom.GoodsCollections; using ARW.Repository.Business.Custom.GoodsBrowsingHistorys; -using ARW.Repository.Business.OrderManage.Orders; -using ARW.Model.Vo.Api.GoodsManager.Goodss; using Newtonsoft.Json; using Senparc.CO2NET.Extensions; -using ARW.Repository.Business.OrderManage.OrderRefunds; namespace ARW.Service.Api.BusinessService.Custom.Customers { @@ -33,16 +24,12 @@ namespace ARW.Service.Api.BusinessService.Custom.Customers private readonly CustomerRepository _CustomerRepository; private readonly GoodsCollectionRepository _GoodsCollectionRepository; private readonly GoodsBrowsingHistoryRepository _GoodsBrowsingHistoryRepository; - private readonly OrderRepository _OrderRepository; - private readonly OrderRefundRepository _OrderRefundRepository; - public CustomerServiceImplApi(CustomerRepository CustomerRepository, GoodsCollectionRepository goodsCollectionRepository, GoodsBrowsingHistoryRepository goodsBrowsingHistoryRepository, OrderRepository orderRepository, OrderRefundRepository orderRefundRepository) + public CustomerServiceImplApi(CustomerRepository CustomerRepository, GoodsCollectionRepository goodsCollectionRepository, GoodsBrowsingHistoryRepository goodsBrowsingHistoryRepository) { this._CustomerRepository = CustomerRepository; _GoodsCollectionRepository = goodsCollectionRepository; _GoodsBrowsingHistoryRepository = goodsBrowsingHistoryRepository; - _OrderRepository = orderRepository; - _OrderRefundRepository = orderRefundRepository; } #region Api接口代码 @@ -84,21 +71,6 @@ namespace ARW.Service.Api.BusinessService.Custom.Customers data.CollectCount = await _GoodsCollectionRepository.CountAsync(s => s.CustomerGuid == data.CustomerGuid); // 获取历史搜索数量 data.HistoryCount = await _GoodsBrowsingHistoryRepository.CountAsync(s => s.CustomerGuid == data.CustomerGuid); - // 获取待付款数量 - data.WaitPayCount = await _OrderRepository.CountAsync(s => s.CustomerGuid == data.CustomerGuid - && s.PayStatus == 1 && s.OrderStatus == 1); - // 获取待发货数量 - data.DeliverCount = await _OrderRepository.CountAsync(s => s.CustomerGuid == data.CustomerGuid - && s.DeliveryStatus == 1 && s.PayStatus == 2 && s.OrderStatus == 1); - // 获取待收货数量 - data.PackageCount = await _OrderRepository.CountAsync(s => s.CustomerGuid == data.CustomerGuid - && s.ReceiptStatus == 1 && s.DeliveryStatus == 2 - && s.PayStatus == 2 && s.OrderStatus == 1); - // 获取待评价数量 - data.CommentCount = await _OrderRepository.CountAsync(s => s.CustomerGuid == data.CustomerGuid - && s.IsComment == 1 && s.PayStatus == 2 && s.OrderStatus == 4); - // 获取退款/售后数量 - data.ExchangCount = await _OrderRefundRepository.CountAsync(s => s.CustomerGuid == data.CustomerGuid && s.OrderRefundStatus == 1); json = data.ToJson(); } diff --git a/ARW.Service/Api/BusinessService/Custom/GoodsBrowsingHistorys/GoodsBrowsingHistoryServiceApi.cs b/ARW.Service/Api/BusinessService/Custom/GoodsBrowsingHistorys/GoodsBrowsingHistoryServiceApi.cs index 626b121..3ccdb90 100644 --- a/ARW.Service/Api/BusinessService/Custom/GoodsBrowsingHistorys/GoodsBrowsingHistoryServiceApi.cs +++ b/ARW.Service/Api/BusinessService/Custom/GoodsBrowsingHistorys/GoodsBrowsingHistoryServiceApi.cs @@ -1,10 +1,6 @@ using Infrastructure.Attribute; -using Microsoft.AspNetCore.Http; using SqlSugar; -using System; -using System.Collections.Generic; using System.Linq; -using System.Text; using System.Threading.Tasks; using ARW.Model; using ARW.Repository; @@ -13,8 +9,6 @@ using ARW.Service.Api.IBusinessService.Custom.GoodsBrowsingHistorys; using ARW.Model.Dto.Api.Custom.GoodsBrowsingHistorys; using ARW.Model.Models.Business.Custom.GoodsBrowsingHistorys; using ARW.Model.Vo.Api.Custom.GoodsBrowsingHistorys; -using Org.BouncyCastle.Crypto.Prng; -using ARW.Model.Models.Business.GoodsManager.Goodss; namespace ARW.Service.Api.BusinessService.Custom.GoodsBrowsingHistorys { @@ -51,17 +45,10 @@ namespace ARW.Service.Api.BusinessService.Custom.GoodsBrowsingHistorys var query = _GoodsBrowsingHistoryRepository .Queryable() .Where(predicate.ToExpression()) - .LeftJoin((s, c) => s.GoodsGuid == c.GoodsGuid) .OrderBy(s => s.Create_time, OrderByType.Desc) - .Select((s, c) => new GoodsBrowsingHistoryVoApi + .Select(s => new GoodsBrowsingHistoryVoApi { SpuId = s.GoodsGuid, - Title = c.GoodsName, - Thumb = c.GoodsPicture, - Price = c.GoodsPriceLowest, - OriginPrice = c.GoodsDashedPriceLowest, - SpuStockQuantity = c.GoodsTotalInventory, - IsPutOnSale = c.GoodsShelfStatus, CraeteTime = s.Create_time.ToString("yyyy-MM-dd"), }); diff --git a/ARW.Service/Api/BusinessService/Custom/GoodsCollections/GoodsCollectionServiceApi.cs b/ARW.Service/Api/BusinessService/Custom/GoodsCollections/GoodsCollectionServiceApi.cs index 6cb05bb..6fad3d0 100644 --- a/ARW.Service/Api/BusinessService/Custom/GoodsCollections/GoodsCollectionServiceApi.cs +++ b/ARW.Service/Api/BusinessService/Custom/GoodsCollections/GoodsCollectionServiceApi.cs @@ -1,10 +1,6 @@ using Infrastructure.Attribute; -using Microsoft.AspNetCore.Http; using SqlSugar; -using System; -using System.Collections.Generic; using System.Linq; -using System.Text; using System.Threading.Tasks; using ARW.Model; using ARW.Repository; @@ -13,8 +9,6 @@ using ARW.Service.Api.IBusinessService.Custom.GoodsCollections; using ARW.Model.Dto.Api.Custom.GoodsCollections; using ARW.Model.Models.Business.Custom.GoodsCollections; using ARW.Model.Vo.Api.Custom.GoodsCollections; -using ARW.Model.Models.Business.GoodsManager.Goodss; -using Org.BouncyCastle.Crypto.Prng; using Infrastructure; namespace ARW.Service.Api.BusinessService.Custom.GoodsCollections @@ -52,18 +46,11 @@ namespace ARW.Service.Api.BusinessService.Custom.GoodsCollections var query = _GoodsCollectionRepository .Queryable() .Where(predicate.ToExpression()) - .LeftJoin((s, c) => s.GoodsGuid == c.GoodsGuid) .OrderBy(s => s.Create_time, OrderByType.Desc) - .Select((s, c) => new GoodsCollectionVoApi + .Select((s => new GoodsCollectionVoApi { SpuId = s.GoodsGuid, - Title = c.GoodsName, - Thumb = c.GoodsPicture, - Price = c.GoodsPriceLowest, - OriginPrice = c.GoodsDashedPriceLowest, - SpuStockQuantity = c.GoodsTotalInventory, - IsPutOnSale = c.GoodsShelfStatus - }); + })); var list = await query.ToPageAsync(parm); diff --git a/ARW.Service/Api/BusinessService/Custom/HistorySearchs/HistorySearchServiceApi.cs b/ARW.Service/Api/BusinessService/Custom/HistorySearchs/HistorySearchServiceApi.cs index 71d0e1c..cb1dbaf 100644 --- a/ARW.Service/Api/BusinessService/Custom/HistorySearchs/HistorySearchServiceApi.cs +++ b/ARW.Service/Api/BusinessService/Custom/HistorySearchs/HistorySearchServiceApi.cs @@ -1,19 +1,14 @@ using Infrastructure.Attribute; -using Microsoft.AspNetCore.Http; using SqlSugar; using System; using System.Collections.Generic; using System.Linq; -using System.Text; using System.Threading.Tasks; -using ARW.Model; -using ARW.Repository; using ARW.Repository.Business.Custom.HistorySearchs; using ARW.Service.Api.IBusinessService.Custom.HistorySearchs; using ARW.Model.Dto.Api.Custom.HistorySearchs; using ARW.Model.Models.Business.Custom.HistorySearchs; using ARW.Model.Vo.Api.Custom.HistorySearchs; -using ARW.Repository.Business.GoodsManager.Goodss; namespace ARW.Service.Api.BusinessService.Custom.HistorySearchs { @@ -27,12 +22,10 @@ namespace ARW.Service.Api.BusinessService.Custom.HistorySearchs public class HistorySearchServiceImplApi : BaseService, IHistorySearchServiceApi { private readonly HistorySearchRepository _HistorySearchRepository; - private readonly GoodsRepository _GoodsRepository; - public HistorySearchServiceImplApi(HistorySearchRepository HistorySearchRepository, GoodsRepository goodsRepository) + public HistorySearchServiceImplApi(HistorySearchRepository HistorySearchRepository) { this._HistorySearchRepository = HistorySearchRepository; - _GoodsRepository = goodsRepository; } #region Api接口代码 @@ -74,15 +67,17 @@ namespace ARW.Service.Api.BusinessService.Custom.HistorySearchs public async Task> GetSearchRecList() { - var query = _GoodsRepository - .Queryable() - .OrderBy(g => Guid.NewGuid()) - .Select(s => new SearchRecVoApi - { - Title = s.GoodsName, - }).Take(10); + //var query = _GoodsRepository + // .Queryable() + // .OrderBy(g => Guid.NewGuid()) + // .Select(s => new SearchRecVoApi + // { + // Title = s.GoodsName, + // }).Take(10); - return await query.ToListAsync(); + //return await query.ToListAsync(); + + return new List(); } diff --git a/ARW.Service/Api/BusinessService/GoodsManager/GoodsCategorys/GoodsCategoryServiceApi.cs b/ARW.Service/Api/BusinessService/GoodsManager/GoodsCategorys/GoodsCategoryServiceApi.cs deleted file mode 100644 index eeeff00..0000000 --- a/ARW.Service/Api/BusinessService/GoodsManager/GoodsCategorys/GoodsCategoryServiceApi.cs +++ /dev/null @@ -1,122 +0,0 @@ -using Infrastructure.Attribute; -using Microsoft.AspNetCore.Http; -using SqlSugar; -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; -using ARW.Model; -using ARW.Repository; -using ARW.Repository.Business.GoodsManager.GoodsCategorys; -using ARW.Service.Api.IBusinessService.GoodsManager.GoodsCategorys; -using ARW.Model.Dto.Api.GoodsManager.GoodsCategorys; -using ARW.Model.Models.Business.GoodsManager.GoodsCategorys; -using ARW.Model.Vo.Api.GoodsManager.GoodsCategorys; -using ARW.Model.Vo.Api.Home; -using ARW.Repository.Business.GoodsManager.ShopGoodsCategorys; - -namespace ARW.Service.Api.BusinessService.GoodsManager.GoodsCategorys -{ - /// - /// 经营类目接口实现类Api - /// - /// @author lwh - /// @date 2023-07-08 - /// - [AppService(ServiceType = typeof(IGoodsCategoryServiceApi), ServiceLifetime = LifeTime.Transient)] - public class GoodsCategoryServiceImplApi : BaseService, IGoodsCategoryServiceApi - { - private readonly GoodsCategoryRepository _GoodsCategoryRepository; - private readonly ShopGoodsCategoryRepository _ShopGoodsCategoryRepository; - - public GoodsCategoryServiceImplApi(GoodsCategoryRepository GoodsCategoryRepository, ShopGoodsCategoryRepository shopGoodsCategoryRepository) - { - this._GoodsCategoryRepository = GoodsCategoryRepository; - _ShopGoodsCategoryRepository = shopGoodsCategoryRepository; - } - - #region Api接口代码 - - - /// - /// 查询经营类目树形列表(Api) - /// - /// - /// - public async Task> GetGoodsCategoryTreeListApi(GoodsCategoryQueryDtoApi parm) - { - //开始拼装查询条件d - var predicate = Expressionable.Create(); - - predicate = predicate.AndIF(!string.IsNullOrEmpty(parm.GoodsCategoryName), s => s.GoodsCategoryName.Contains(parm.GoodsCategoryName)); - predicate = predicate.AndIF(parm.GoodsCategoryDisplayStatus != null, s => s.GoodsCategoryDisplayStatus == parm.GoodsCategoryDisplayStatus); - predicate = predicate.AndIF(parm.GoodsCategoryIsPopular != null, s => s.GoodsCategoryIsPopular == parm.GoodsCategoryIsPopular); - var query = _GoodsCategoryRepository - .Queryable() - .Where(predicate.ToExpression()) - .OrderBy(s => s.ProductCategorySort, OrderByType.Asc) - .Select((s) => new GoodsCategoryVoApi - { - GroupId = s.GoodsCategoryGuid, - ParentGuid = s.GoodsCategoryParentGuid, - Name = s.GoodsCategoryName, - Thumbnail = s.GoodsCategoryImg, - }); - - return await query.ToTreeAsync(it => it.Children, it => it.ParentGuid, 0); - } - - - /// - /// 获取店铺类目树形列表(Api) - /// - /// - /// - public async Task> GetShopGoodsCategoryTreeListApi(GoodsCategoryQueryDtoApi parm) - { - var query = _ShopGoodsCategoryRepository - .Queryable() - .OrderBy(s => s.ShopGoodsCategorySort, OrderByType.Asc) - .Select((s) => new GoodsCategoryVoApi - { - GroupId = s.ShopGoodsCategoryGuid, - ParentGuid = s.ShopGoodsCategoryParentGuid, - Name = s.ShopGoodsCategoryName, - Thumbnail = s.ShopGoodsCategoryImg, - }); - - return await query.ToTreeAsync(it => it.Children, it => it.ParentGuid, 0); - } - - - /// - /// 获取首页推荐类目列表(Api) - /// - /// - public async Task> GetHomeCategoryListApi() - { - var query = _ShopGoodsCategoryRepository - .Queryable() - .Where(s => s.ShopGoodsCategoryIsPopular == 1) - .OrderBy(s => s.ShopGoodsCategorySort, OrderByType.Asc) - .Select((s) => new HomeCategoryApiVo - { - Key = s.ShopGoodsCategoryGuid, - Text = s.ShopGoodsCategoryName, - }); - - var list = await query.ToListAsync(); - - //for (int i = 0; i < list.Count; i++) - //{ - // list[i].Key = i + 1; - //} - - return list; - } - - #endregion - - } -} diff --git a/ARW.Service/Api/BusinessService/GoodsManager/GoodsComments/GoodsCommentServiceApi.cs b/ARW.Service/Api/BusinessService/GoodsManager/GoodsComments/GoodsCommentServiceApi.cs deleted file mode 100644 index 3a7b66a..0000000 --- a/ARW.Service/Api/BusinessService/GoodsManager/GoodsComments/GoodsCommentServiceApi.cs +++ /dev/null @@ -1,185 +0,0 @@ -using Infrastructure.Attribute; -using Microsoft.AspNetCore.Http; -using SqlSugar; -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; -using ARW.Model; -using ARW.Repository; -using ARW.Repository.Business.GoodsManager.GoodsComments; -using ARW.Service.Api.IBusinessService.GoodsManager.GoodsComments; -using ARW.Model.Dto.Api.GoodsManager.GoodsComments; -using ARW.Model.Models.Business.GoodsManager.GoodsComments; -using ARW.Model.Vo.Api.GoodsManager.GoodsComments; -using ARW.Model.Models.Business.Custom.Customers; -using ARW.Model.Models.Business.GoodsManager.Goodss; -using ARW.Model.Models.Business.ShopManager.Shops; -using System.IO; -using ARW.Model.System; - -namespace ARW.Service.Api.BusinessService.GoodsManager.GoodsComments -{ - /// - /// 商品评价接口实现类Api - /// - /// @author admin - /// @date 2023-07-17 - /// - [AppService(ServiceType = typeof(IGoodsCommentServiceApi), ServiceLifetime = LifeTime.Transient)] - public class GoodsCommentServiceImplApi : BaseService, IGoodsCommentServiceApi - { - private readonly GoodsCommentRepository _GoodsCommentRepository; - - public GoodsCommentServiceImplApi(GoodsCommentRepository GoodsCommentRepository) - { - this._GoodsCommentRepository = GoodsCommentRepository; - } - - #region Api接口代码 - - - /// - /// 查询商品评价列表(Api) - /// - /// - /// - public async Task> GetGoodsCommentListApi(GoodsCommentQueryDtoApi parm) - { - //开始拼装查询条件d - var predicate = Expressionable.Create(); - - predicate = predicate.AndIF(parm.ShopGuid != null, s => s.ShopGuid == parm.ShopGuid); - predicate = predicate.AndIF(parm.SpuId != 0, s => s.GoodsGuid == parm.SpuId); - predicate = predicate.AndIF(parm.CommentLevel != 0, s => s.GoodsCommentRatingType == parm.CommentLevel); - predicate = predicate.AndIF(parm.HasImage == true, s => s.GoodsCommentImages != "" && s.GoodsCommentImages != null); - var query = _GoodsCommentRepository - .Queryable() - .LeftJoin((s, c) => s.ShopGuid == c.ShopGuid) - .LeftJoin((s, c, d) => s.GoodsGuid == d.GoodsGuid) - .LeftJoin((s, c, d, f) => s.CustomerGuid == f.CustomerGuid) - .Where(predicate.ToExpression()) - .OrderBy(s => s.GoodsCommentSort, OrderByType.Asc) - .Select((s, c, d, f) => new GoodsCommentVoApi - { - Uid = s.GoodsCommentId, - SpuId = s.GoodsGuid, - CommentScore = s.GoodsCommentRating, - CommentContent = s.GoodsCommentContent, - GoodsCommentImages = s.GoodsCommentImages, - UserName = f.CustomerNickname, - UserHeadUrl = f.CustomerAvatar, - SellerReply = s.GoodsCommentRecoverContent, - GoodsDetailInfo = "", - CommentTime = s.Create_time.ToString("yyyy/MM/dd HH:mm"), - }); - - - var list = await query.ToPageAsync(parm); - - foreach (var item in list.Result) - { - if (!string.IsNullOrEmpty(item.GoodsCommentImages)) - { - var imagesList = item.GoodsCommentImages.Split(','); - var resourcesList = new List(); - foreach (var image in imagesList) - { - var resourcesItem = new ResourcesItem - { - Src = image, - Type = "", - CoverSrc = "" - }; - - string extension = Path.GetExtension(image).ToLower(); - - if (extension == ".mp4" || extension == ".avi") - { - resourcesItem.Type = "video"; - // 解析视频封面并赋值给 CoverSrc - // 你可以根据具体需求调用相应的方法来获取视频封面 - //resourcesItem.CoverSrc = GetVideoCover(image); - } - else - { - resourcesItem.Type = "image"; - } - - resourcesList.Add(resourcesItem); - } - item.CommentResources = resourcesList; - } - } - - return list; - } - - /// - /// 查询商品评价详情(Api) - /// - /// - /// - public async Task> GetGoodsDetailsComments(GoodsCommentDtoApi parm) - { - - var query = _GoodsCommentRepository - .Queryable() - .LeftJoin((s, c) => s.ShopGuid == c.ShopGuid) - .LeftJoin((s, c, d) => s.GoodsGuid == d.GoodsGuid) - .LeftJoin((s, c, d, f) => s.CustomerGuid == f.CustomerGuid) - .Where(s => s.GoodsGuid == parm.SpuId) - .OrderBy(s => s.GoodsCommentSort) // 按 GoodsCommentSort 升序排序 - .Select((s, c, d, f) => new GoodsCommentVoApi - { - Uid = s.GoodsCommentId, - SpuId = s.GoodsGuid, - CommentScore = s.GoodsCommentRating, - CommentContent = s.GoodsCommentContent, - GoodsCommentImages = s.GoodsCommentImages, - UserName = f.CustomerNickname, - UserHeadUrl = f.CustomerAvatar, - SellerReply = s.GoodsCommentRecoverContent, - GoodsDetailInfo = "", - }).Take(1); - - return await query.ToListAsync(); - } - - - /// - /// 获取商品详情页评论数(Api) - /// - /// - /// - public async Task GetGoodsDetailsCommentsCount(GoodsCommentDtoApi parm) - { - - var query = _GoodsCommentRepository - .Queryable() - .Select((s) => new GoodsCommentCountApiVo - { - CommentCount = SqlFunc.Subqueryable().Where(s => s.GoodsGuid == parm.SpuId).Count(), - BadCount = SqlFunc.Subqueryable().Where(s => s.GoodsCommentRatingType == 3 && s.GoodsGuid == parm.SpuId).Count(), - MiddleCount = SqlFunc.Subqueryable().Where(s => s.GoodsCommentRatingType == 2 && s.GoodsGuid == parm.SpuId).Count(), - GoodCount = SqlFunc.Subqueryable().Where(s => s.GoodsCommentRatingType == 1 && s.GoodsGuid == parm.SpuId).Count(), - HasImageCount = SqlFunc.Subqueryable().Where(s => s.GoodsCommentImages != "" && s.GoodsCommentImages != null && s.GoodsGuid == parm.SpuId).Count() - }); - - var res = await query.FirstAsync(); - if (res != null) - { - if (res.GoodCount > 0) - { - res.GoodRate = Math.Round((decimal)res.GoodCount / res.CommentCount, 4) * 100; - } - } - - return res; - } - - #endregion - - } -} diff --git a/ARW.Service/Api/BusinessService/GoodsManager/Goodss/GoodsServiceApi.cs b/ARW.Service/Api/BusinessService/GoodsManager/Goodss/GoodsServiceApi.cs deleted file mode 100644 index eaa84db..0000000 --- a/ARW.Service/Api/BusinessService/GoodsManager/Goodss/GoodsServiceApi.cs +++ /dev/null @@ -1,501 +0,0 @@ -using Infrastructure.Attribute; -using SqlSugar; -using System.Collections.Generic; -using System.Linq; -using System.Threading.Tasks; -using ARW.Model; -using ARW.Repository; -using ARW.Repository.Business.GoodsManager.Goodss; -using ARW.Service.Api.IBusinessService.GoodsManager.Goodss; -using ARW.Model.Dto.Api.GoodsManager.Goodss; -using ARW.Model.Models.Business.GoodsManager.Goodss; -using ARW.Model.Vo.Api.GoodsManager.Goodss; -using ARW.Model.Models.Business.ShopManager.Shops; -using ARW.Repository.Business.GoodsManager.GoodsSpecs.GoodsSpecRels; -using ARW.Repository.Business.GoodsManager.GoodsSpecs.Specs; -using ARW.Repository.Business.GoodsManager.GoodsSpecs.SpecValues; -using Newtonsoft.Json; -using Senparc.CO2NET.Extensions; -using ARW.Model.Models.Business.GoodsManager.GoodsSpecs.GoodsSkus; -using ARW.Repository.Business.GoodsManager.GoodsSpecs.GoodsSkus; -using ARW.Model.Models.Business.GoodsManager.GoodsCategorys; -using ARW.Repository.Business.GoodsManager.GoodsCategorys; -using System; -using ARW.Common; -using Microsoft.AspNetCore.Components.Forms; -using ARW.Repository.Business.LogisticsManage.Deliverys; -using ARW.Repository.Business.Custom.CustomerAddresses; -using ARW.Repository.Business.LogisticsManage.DeliveryRules; -using Infrastructure; -using ARW.Model.Models.Business.LogisticsManage.DeliveryRules; -using ARW.Model.Vo.Business.GoodsManager.Goodss; -using ARW.Service.Business.IBusinessService.Custom.GoodsCollections; -using ARW.Model.Models.Business.GoodsManager.ShopGoodsCategorys; -using ARW.Repository.Business.GoodsManager.ShopGoodsCategorys; - -namespace ARW.Service.Api.BusinessService.GoodsManager.Goodss -{ - /// - /// 商品接口实现类Api - /// - /// @author lwh - /// @date 2023-07-09 - /// - [AppService(ServiceType = typeof(IGoodsServiceApi), ServiceLifetime = LifeTime.Transient)] - public class GoodsServiceImplApi : BaseService, IGoodsServiceApi - { - private readonly GoodsRepository _GoodsRepository; - private readonly GoodsSpecRelRepository _GoodsSpecRelRepository; - private readonly SpecRepository _SpecRepository; - private readonly SpecValueRepository _SpecValueRepository; - private readonly GoodsSkuRepository _GoodsSkuRepository; - private readonly GoodsCategoryRepository _GoodsCategoryRepository; - private readonly DeliveryRepository _DeliveryRepository; - private readonly DeliveryRuleRepository _DeliveryRuleRepository; - private readonly CustomerAddressRepository _CustomerAddressRepository; - private readonly ShopGoodsCategoryRepository _ShopGoodsCategoryRepository; - private readonly IGoodsCollectionService _GoodsCollectionService; - - - public GoodsServiceImplApi(GoodsRepository GoodsRepository, GoodsSpecRelRepository goodsSpecRelRepository, SpecRepository specRepository, SpecValueRepository specValueRepository, GoodsSkuRepository goodsSkuRepository, GoodsCategoryRepository goodsCategoryRepository, DeliveryRepository deliveryRepository, CustomerAddressRepository customerAddressRepository, DeliveryRuleRepository deliveryRuleRepository, IGoodsCollectionService goodsCollectionService, ShopGoodsCategoryRepository shopGoodsCategoryRepository) - { - this._GoodsRepository = GoodsRepository; - _GoodsSpecRelRepository = goodsSpecRelRepository; - _SpecRepository = specRepository; - _SpecValueRepository = specValueRepository; - _GoodsSkuRepository = goodsSkuRepository; - _GoodsCategoryRepository = goodsCategoryRepository; - _DeliveryRepository = deliveryRepository; - _CustomerAddressRepository = customerAddressRepository; - _DeliveryRuleRepository = deliveryRuleRepository; - _GoodsCollectionService = goodsCollectionService; - _ShopGoodsCategoryRepository = shopGoodsCategoryRepository; - } - - #region Api接口代码 - - - /// - /// 查询商品列表(Api) - /// - /// - /// - public async Task> GetGoodsListApi(GoodsQueryDtoApi parm) - { - //开始拼装查询条件 - var predicate = Expressionable.Create(); - string[] goodsCategoryArr = null; - - // 检索经营类目 - //if (parm.GoodsCategoryGuid != null) - //{ - // var data = await _GoodsCategoryRepository.GetListAsync(); - - // var SewGoodsCategorys = data.FindAll(delegate (GoodsCategory goodsCategory) - // { - // string[] parentGoodsCategoryId = goodsCategory.GoodsCategoryAncestralGuid.Split(",", StringSplitOptions.RemoveEmptyEntries); - // return parentGoodsCategoryId.Contains(parm.GoodsCategoryGuid.ToString()); - // }); - // goodsCategoryArr = SewGoodsCategorys.Select(s => s.GoodsCategoryGuid.ToString()).ToArray(); - //} - - // 检索商品类目 - if (parm.ShopGoodsCategoryGuid != 0) - { - var data = await _ShopGoodsCategoryRepository.GetListAsync(); - - var SewshopGoodsCategorys = data.FindAll(delegate (ShopGoodsCategory shopGoodsCategory) - { - string[] parentShopGoodsCategoryId = shopGoodsCategory.ShopGoodsCategoryAncestralGuid.Split(",", StringSplitOptions.RemoveEmptyEntries); - return parentShopGoodsCategoryId.Contains(parm.ShopGoodsCategoryGuid.ToString()); - }); - string[] shopGoodsCategoryArr = SewshopGoodsCategorys.Select(s => s.ShopGoodsCategoryGuid.ToString()).ToArray(); - predicate = predicate.AndIF(parm.ShopGoodsCategoryGuid != 0, s => s.ShopGoodsCategoryGuid == parm.ShopGoodsCategoryGuid || shopGoodsCategoryArr.Contains(s.ShopGoodsCategoryGuid.ToString())); - } - - predicate = predicate.AndIF(parm.ShopGuid != null, s => s.ShopGuid == parm.ShopGuid); - //predicate = predicate.AndIF(parm.ShopGoodsCategoryGuid != 0, s => s.ShopGoodsCategoryGuid == parm.ShopGoodsCategoryGuid); - predicate = predicate.AndIF(!string.IsNullOrEmpty(parm.GoodsName), s => s.GoodsName.Contains(parm.GoodsName)); - predicate = predicate.AndIF(!string.IsNullOrEmpty(parm.GoodsCoding), s => s.GoodsCoding.Contains(parm.GoodsCoding)); - predicate = predicate.AndIF(parm.MinPrice != 0, s => s.GoodsPriceLowest >= parm.MinPrice); - predicate = predicate.AndIF(parm.MaxPrice != 0, s => s.GoodsPriceLowest <= parm.MaxPrice); - - var sortType = OrderByType.Asc; - if (parm.GoodsSortType == 1) sortType = OrderByType.Desc; - - var query = _GoodsRepository - .Queryable() - .LeftJoin((s, c) => s.ShopGuid == c.ShopGuid) - .Where(predicate.ToExpression()) - //.WhereIF(parm.GoodsCategoryGuid != 0, (s, c) => c.ShopBusinessCategoryGuid == parm.GoodsCategoryGuid) - //.WhereIF(parm.GoodsCategoryGuid != null, (s, c) => c.ShopBusinessCategoryGuid == parm.GoodsCategoryGuid || goodsCategoryArr.Contains(c.ShopBusinessCategoryGuid.ToString())) - .Where(s => s.GoodsShelfStatus == 1) - .OrderByIF(parm.GoodsSort == 0, s => s.GoodsSort, OrderByType.Asc) - .OrderByIF(parm.GoodsSort == 1, s => s.GoodsPriceLowest, sortType) - .OrderByIF(parm.GoodsSort == 2, s => s.GoodsSalesInitial + s.GoodsSalesActual, sortType) - //.OrderBy(s => s.GoodsSort, OrderByType.Desc) - .Select((s, c) => new GoodsVoApi - { - SpuId = s.GoodsGuid, - ShopGuid = s.ShopGuid, - ShopName = c.ShopName, - CategoryIds = s.ShopGoodsCategoryGuid, - Title = s.GoodsName, - GoodsCoding = s.GoodsCoding, - Video = s.GoodsMainImageVideo, - PrimaryImage = s.GoodsVideoCover, - Images = s.GoodsPicture, - Price = s.GoodsPriceLowest, - OriginPrice = s.GoodsDashedPriceLowest, - SpuStockQuantity = s.GoodsTotalInventory, - SoldNum = s.GoodsSalesInitial + s.GoodsSalesActual, - IsPutOnSale = s.GoodsShelfStatus, - }); - - - var list = await query.ToPageAsync(parm); - - foreach (var item in list.Result) - { - item.Thumb = item.Images.Split(",").First(); - } - - return list; - } - - - /// - /// 查询商品列表(Api) - /// - /// - /// - public async Task> GetGoodsApi(GoodsQueryDtoApi parm) - { - //开始拼装查询条件 - var predicate = Expressionable.Create(); - - predicate = predicate.AndIF(parm.ShopGoodsCategoryGuid != 0, s => s.ShopGoodsCategoryGuid == parm.ShopGoodsCategoryGuid); - - var query = _GoodsRepository - .Queryable() - .LeftJoin((s, c) => s.ShopGuid == c.ShopGuid) - .Where(predicate.ToExpression()) - .Where(s => s.GoodsShelfStatus == 1) - .OrderBy(s => s.GoodsSort, OrderByType.Asc) - .Select((s, c) => new GoodsVoApi - { - SpuId = s.GoodsGuid, - ShopGuid = s.ShopGuid, - ShopName = c.ShopName, - CategoryIds = s.ShopGoodsCategoryGuid, - Title = s.GoodsName, - GoodsCoding = s.GoodsCoding, - Video = s.GoodsMainImageVideo, - PrimaryImage = s.GoodsVideoCover, - Images = s.GoodsPicture, - Price = s.GoodsPriceLowest, - OriginPrice = s.GoodsDashedPriceLowest, - SpuStockQuantity = s.GoodsTotalInventory, - SoldNum = s.GoodsSalesInitial + s.GoodsSalesActual, - IsPutOnSale = s.GoodsShelfStatus, - }); - - - var list = await query.ToListAsync(); - - foreach (var item in list) - { - item.Thumb = item.Images.Split(',').First(); - } - - return list; - } - - - /// - /// 获取商品运费(Api) - /// - /// - /// - public async Task GetGoodsFreight(GoodsFreightDto parm) - { - decimal freight = 0; - foreach (var item in parm.GoodsRequestList) - { - var goods = await _GoodsRepository.GetFirstAsync(s => s.GoodsGuid == item.SpuId); - var delivery = await _DeliveryRepository.GetFirstAsync(s => s.DeliveryGuid == goods.DeliveryGuid); - var deliveRule = await _DeliveryRuleRepository.GetFirstAsync(s => s.DeliveryGuid == delivery.DeliveryGuid); - var adress = await _CustomerAddressRepository.GetFirstAsync(s => s.CustomerAddressGuid == parm.CustomerAddressGuid); - - // 判断是否在配送范围 - - var regionIdList = Tools.SpitIntArrary(deliveRule.DeliveryRuleRegion).ToList(); - if (regionIdList.Contains(adress.CustomerAddressCityId)) - { - // 判断是否免运费 - if (deliveRule.DeliveryRuleFirstFee == 0) - return freight; - - // 按件计费 - if (delivery.DeliveryBillingMethod == 1) - { - freight += CalculateFreight(item.Quantity, deliveRule); - } - // 按重量计费 - if (delivery.DeliveryBillingMethod == 2) - { - // 是否有sku - if (item.SkuId != 0) - { - var sku = await _GoodsSkuRepository.GetFirstAsync(s => s.GoodsSkuId == item.SkuId); - if (sku == null) return freight; - var skuWeight = sku.GoodsSkuWeight * item.Quantity; - freight += CalculateFreight(skuWeight, deliveRule); - } - else - { - var allWeight = goods.GoodsWeight * item.Quantity; - freight += CalculateFreight(allWeight, deliveRule); - } - } - - } - else - { - throw new CustomException($"{goods.GoodsName} 不在配送范围内"); - } - } - - return Math.Round(freight, 2); ; - } - - - /// - /// 查询商品详情(Api) - /// - /// - /// - public async Task GetGoodsDetails(GoodsDtoApi parm, long userId) - { - - var query = _GoodsRepository - .Queryable() - .LeftJoin((s, c) => s.ShopGuid == c.ShopGuid) - .Where(s => s.GoodsGuid == parm.SpuId) - .Select((s, c) => new GoodsApiDetailsVo - { - SpuId = s.GoodsGuid, - ShopGuid = s.ShopGuid, - ShopLogo = c.ShopLogo, - ShopName = c.ShopName, - ShopSalesOrderCount = c.ShopSalesOrderCount, - ShopIntro = c.ShopIntro, - CategoryIds = s.ShopGoodsCategoryGuid, - Title = s.GoodsName, - GoodsCoding = s.GoodsCoding, - Video = s.GoodsMainImageVideo, - PrimaryImage = s.GoodsVideoCover, - Images = s.GoodsPicture, - MinSalePrice = s.GoodsPriceLowest, - MaxSalePrice = s.GoodsPriceHighest, - MaxLinePrice = s.GoodsDashedPriceHighest, - SpuStockQuantity = s.GoodsTotalInventory, - SoldNum = s.GoodsSalesInitial + s.GoodsSalesActual, - Desc = s.GoodsDetails, - IsPutOnSale = s.GoodsShelfStatus, - GoodsSellingPoint = s.GoodsSellingPoint - }).Take(1); - - - var json = await query.ToJsonAsync(); - var data = await GetSpecList(json, userId); - return data; - } - - - /// - /// 获取商品的规格组列表 - /// - /// - /// - public async Task GetSpecList(string json, long userId) - { - if (json != "[]") - { - json = json.Remove(0, 1); - json = json.Substring(0, json.Length - 1); - var data = JsonConvert.DeserializeObject(json); - - var goodsSpecListVo = new List(); - - var specIds = (await _GoodsSpecRelRepository.GetListAsync(s => s.GoodsGuid == data.SpuId)) - .Select(item => item.SpecId) - .Distinct() - .ToList(); - - var specs = await _SpecRepository.GetListAsync(s => specIds.Contains(s.SpecId)); - var specValueIds = (await _GoodsSpecRelRepository.GetListAsync(s => s.GoodsGuid == data.SpuId)) - .Where(item => item.SpecValueId != 0) - .Select(item => item.SpecValueId) - .Distinct() - .ToList(); - - var specValues = await GetSpecValuesAsync(specValueIds); - - foreach (var spec in specs) - { - var goodsSpecVo = new GoodsSpecApiVo - { - SpecId = spec.SpecId, - Title = spec.SpecName, - SpecValueList = new List() - }; - goodsSpecVo.SpecValueList.AddRange(specValues.Where(sv => sv.SpecId == spec.SpecId)); - - goodsSpecListVo.Add(goodsSpecVo); - } - - // 获取Sku列表 - var skuList = await _GoodsSkuRepository.GetListAsync(s => s.GoodsGuid == data.SpuId); - data.SkuList = await GetSkuListWithSpecValuesAsync(skuList); - - data.SpecList = goodsSpecListVo; - - if (userId != 0) - { - var isCollect = await _GoodsCollectionService.IsAnyAsync(s => s.CustomerGuid == userId && s.GoodsGuid == data.SpuId); - data.IsCollect = isCollect; - } - - json = data.ToJson(); - } - - return json; - } - - - /// - /// 获取商品规格值列表 - /// - /// - /// - private async Task> GetSpecValuesAsync(List specValueIds) - { - var specValues = await _SpecValueRepository.GetListAsync(sv => specValueIds.Contains(sv.SpecValueId)); - return specValues.Select(sv => new SpecValueApiVo - { - SpecValueId = sv.SpecValueId, - SpecId = sv.SpecId, - SpecValue = sv.SpecValueName, - }).ToList(); - } - - /// - /// 获取商品sku列表 - /// - /// - /// - private async Task> GetSkuListWithSpecValuesAsync(List skuList) - { - var resList = new List(); - var specValueIds = skuList.SelectMany(sku => new[] { sku.SpecValueId, sku.SpecSecondValueId, sku.SpecThirdValueId }) - .Distinct() - .Where(id => id != 0) - .ToList(); - - // sku所属商品规格 - var specValues = await GetSpecValuesAsync(specValueIds); - var addedSpecValueIds = new HashSet(); - - foreach (var item in skuList) - { - var list = new List(); - - await AddSkuSpecInfo(item.SpecValueId); - await AddSkuSpecInfo(item.SpecSecondValueId); - await AddSkuSpecInfo(item.SpecThirdValueId); - - async Task AddSkuSpecInfo(int specValueId) - { - if (specValueId != 0) - { - //addedSpecValueIds.Add(specValueId); - - var sku = specValues.FirstOrDefault(sv => sv.SpecValueId == specValueId); - var spec = await _SpecRepository.GetFirstAsync(s => s.SpecId == sku.SpecId); - var skuSpecInfo = new SkuSpecInfo - { - SpecId = sku.SpecId, - SpecTitle = spec.SpecName, - SpecValueId = sku.SpecValueId, - SpecValue = sku.SpecValue - }; - list.Add(skuSpecInfo); - } - } - - // sku价格 - var skuPriceInfoList = new List(); - var skuPriceInfo1 = new PriceInfo - { - PriceType = 1, - Price = item.GoodsSkuPrice, - PriceTypeName = "销售价格" - }; - skuPriceInfoList.Add(skuPriceInfo1); - if (item.GoodsSkuLinePrice != 0) - { - var skuPriceInfo2 = new PriceInfo - { - PriceType = 2, - Price = item.GoodsSkuLinePrice, - PriceTypeName = "划线价格" - }; - skuPriceInfoList.Add(skuPriceInfo2); - } - - var skuVo = new GoosSkuApiVo - { - SkuId = item.GoodsSkuId, - SkuImage = item.GoodsSkuImg, - SpecInfo = list, - PriceInfo = skuPriceInfoList, - Quantity = item.GoodsSkuStockNum, - Weight = item.GoodsSkuWeight - }; - resList.Add(skuVo); - } - - - - return resList; - } - - - /// - /// 计算运费 - /// - /// - /// - /// - public decimal CalculateFreight(decimal parm, DeliveryRule deliveRule) - { - decimal freight = 0; - // 是否超过首件/首重 - if (parm >= deliveRule.DeliveryRuleFirst) - { - freight += deliveRule.DeliveryRuleFirstFee; - if (parm > deliveRule.DeliveryRuleFirst) - { - var additionalCount = parm - deliveRule.DeliveryRuleFirst; - var additionalFee = additionalCount / deliveRule.DeliveryRuleAdditional * deliveRule.DeliveryRuleAdditionalFee; - freight += additionalFee; - } - } - return freight; - } - - #endregion - - } -} diff --git a/ARW.Service/Api/BusinessService/GoodsManager/ShopGoodsCategorys/ShopGoodsCategoryServiceApi.cs b/ARW.Service/Api/BusinessService/GoodsManager/ShopGoodsCategorys/ShopGoodsCategoryServiceApi.cs deleted file mode 100644 index 0e8b723..0000000 --- a/ARW.Service/Api/BusinessService/GoodsManager/ShopGoodsCategorys/ShopGoodsCategoryServiceApi.cs +++ /dev/null @@ -1,96 +0,0 @@ -using Infrastructure.Attribute; -using Microsoft.AspNetCore.Http; -using SqlSugar; -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; -using ARW.Model; -using ARW.Repository; -using ARW.Repository.Business.GoodsManager.ShopGoodsCategorys; -using ARW.Service.Api.IBusinessService.GoodsManager.ShopGoodsCategorys; -using ARW.Model.Dto.Api.GoodsManager.ShopGoodsCategorys; -using ARW.Model.Models.Business.GoodsManager.ShopGoodsCategorys; -using ARW.Model.Vo.Api.GoodsManager.ShopGoodsCategorys; -using Senparc.CO2NET.Extensions; -using ARW.Service.Api.IBusinessService.GoodsManager.Goodss; -using ARW.Model.Dto.Api.GoodsManager.Goodss; - -namespace ARW.Service.Api.BusinessService.GoodsManager.ShopGoodsCategorys -{ - /// - /// 店铺商品类目接口实现类Api - /// - /// @author lwh - /// @date 2023-07-20 - /// - [AppService(ServiceType = typeof(IShopGoodsCategoryServiceApi), ServiceLifetime = LifeTime.Transient)] - public class ShopGoodsCategoryServiceImplApi : BaseService, IShopGoodsCategoryServiceApi - { - private readonly IGoodsServiceApi _GoodsServiceApi; - - private readonly ShopGoodsCategoryRepository _ShopGoodsCategoryRepository; - - public ShopGoodsCategoryServiceImplApi(ShopGoodsCategoryRepository ShopGoodsCategoryRepository, IGoodsServiceApi goodsServiceApi) - { - this._ShopGoodsCategoryRepository = ShopGoodsCategoryRepository; - _GoodsServiceApi = goodsServiceApi; - } - - #region Api接口代码 - - - /// - /// 查询店铺商品类目树形列表(Api) - /// - /// - /// - public async Task> GetShopGoodsCategoryTreeListApi(ShopGoodsCategoryQueryDtoApi parm) - { - //开始拼装查询条件 - var predicate = Expressionable.Create(); - - predicate = predicate.AndIF(!string.IsNullOrEmpty(parm.ShopGoodsCategoryName), s => s.ShopGoodsCategoryName.Contains(parm.ShopGoodsCategoryName)); - var query = _ShopGoodsCategoryRepository - .Queryable() - .Where(predicate.ToExpression()) - .Where((s) => s.ShopGoodsCategoryDisplayStatus == 1) - .Where((s) => s.ShopGuid == parm.ShopGuid) - .OrderBy(s => s.ShopGoodsCategorySort, OrderByType.Asc) - .Select((s) => new ShopGoodsCategoryVoApi - { - ShopGoodsCategoryGuid = s.ShopGoodsCategoryGuid, - ShopGoodsCategoryParentGuid = s.ShopGoodsCategoryParentGuid, - Label = s.ShopGoodsCategoryName, - }); - - var treeList = await query.ToTreeAsync(it => it.Children, it => it.ShopGoodsCategoryParentGuid, 0); - - treeList = await GetGoodsList(treeList); - - return treeList; - } - - - public async Task> GetGoodsList(List treeList) - { - foreach (var item in treeList) - { - var goodsQueryDtoApi = new GoodsQueryDtoApi - { - ShopGoodsCategoryGuid = item.ShopGoodsCategoryGuid - }; - item.Items = await _GoodsServiceApi.GetGoodsApi(goodsQueryDtoApi); - if (item.Children != null) - { - await GetGoodsList(item.Children); - } - } - return treeList; - } - - #endregion - - } -} diff --git a/ARW.Service/Api/BusinessService/Marketing/CouponManage/Coupons/CouponServiceApi.cs b/ARW.Service/Api/BusinessService/Marketing/CouponManage/Coupons/CouponServiceApi.cs deleted file mode 100644 index b15b6dd..0000000 --- a/ARW.Service/Api/BusinessService/Marketing/CouponManage/Coupons/CouponServiceApi.cs +++ /dev/null @@ -1,132 +0,0 @@ -using Infrastructure.Attribute; -using Microsoft.AspNetCore.Http; -using SqlSugar; -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; -using ARW.Model; -using ARW.Repository; -using ARW.Repository.Business.Marketing.CouponManage.Coupons; -using ARW.Service.Api.IBusinessService.Marketing.CouponManage.Coupons; -using ARW.Model.Dto.Api.Marketing.CouponManage.Coupons; -using ARW.Model.Models.Business.Marketing.CouponManage.Coupons; -using ARW.Model.Vo.Api.Marketing.CouponManage.Coupons; -using Senparc.Weixin.WxOpen.AdvancedAPIs.Tcb; -using ARW.Model.Vo.Api.Marketing.CouponManage.CustomerCoupons; -using ARW.Repository.Business.Marketing.CouponManage.CustomerCoupons; - -namespace ARW.Service.Api.BusinessService.Marketing.CouponManage.Coupons -{ - /// - /// 优惠券接口实现类Api - /// - /// @author lwh - /// @date 2023-08-01 - /// - [AppService(ServiceType = typeof(ICouponServiceApi), ServiceLifetime = LifeTime.Transient)] - public class CouponServiceImplApi : BaseService, ICouponServiceApi - { - private readonly CouponRepository _CouponRepository; - private readonly CustomerCouponRepository _CustomerCouponRepository; - - public CouponServiceImplApi(CouponRepository CouponRepository, CustomerCouponRepository customerCouponRepository) - { - this._CouponRepository = CouponRepository; - _CustomerCouponRepository = customerCouponRepository; - } - - #region Api接口代码 - - - /// - /// 查询优惠券列表(Api) - /// - /// - /// - public async Task> GetCouponListApi(CouponQueryDtoApi parm) - { - //开始拼装查询条件d - var predicate = Expressionable.Create(); - - predicate = predicate.AndIF(parm.ShopGuid != 0, s => s.ShopGuid == parm.ShopGuid); - var query = _CouponRepository - .Queryable() - .Where(predicate.ToExpression()) - .OrderBy(s => s.CouponSort, OrderByType.Desc) - .Select(s => new CustomerCouponVoApi - { - CouponGuid = s.CouponGuid, - ShopGuid = s.ShopGuid, - Type = s.CouponType, - Value = s.CouponDeductionMoney != 0 ? s.CouponDeductionMoney.ToString() : s.CouponDiscountRate.ToString(), - Desc = s.CouponDesc, - Title = s.CouponName, - Base = s.CouponMinConsumeMoney, - CreateTime = s.Create_time - }); - - var list = await query.ToListAsync(); - - - foreach (var item in list) - { - // 处理有效日期 - var coupon = await _CouponRepository.GetFirstAsync(s => s.CouponGuid == item.CouponGuid); - if (coupon.CouponExpireType == 1) - { - var firstTime = item.CreateTime.ToString("yyyy.MM.dd"); - var lastTime = item.CreateTime.AddDays(coupon.CouponEffectiveDays).ToString("yyyy.MM.dd"); - item.TimeLimit = firstTime + "-" + lastTime; - } - else - { - var firstTime = coupon.CouponFixedStartTime.ToString("yyyy.MM.dd"); - var lastTime = coupon.CouponFixedEndTime.ToString("yyyy.MM.dd"); - item.TimeLimit = firstTime + "-" + lastTime; - } - - // 处理领取状态 - var customerCoupon = await _CustomerCouponRepository.GetFirstAsync(s => s.CouponGuid == item.CouponGuid && s.CustomerGuid == parm.CustomerGuid); - if (customerCoupon != null) - item.Status = 5; - else item.Status = 4; - - } - - - return list; - } - - /// - /// 查询优惠券详情(Api) - /// - /// - /// - public async Task GetCouponDetails(CouponDtoApi parm) - { - - var query = _CouponRepository - .Queryable() - .Where(s => s.CouponGuid == parm.CouponGuid) - .Select(s => new CouponApiDetailsVo - { - Key = s.CouponGuid, - Type = s.CouponType, - Value = s.CouponDeductionMoney != 0 ? s.CouponDeductionMoney.ToString() : s.CouponDiscountRate.ToString(), - Desc = s.CouponDesc, - Title = s.CouponName, - Base = s.CouponMinConsumeMoney, - CreateTime = s.Create_time - }).Take(1); - - - return await query.ToJsonAsync(); - } - - - #endregion - - } -} diff --git a/ARW.Service/Api/BusinessService/Marketing/CouponManage/CustomerCoupons/CustomerCouponServiceApi.cs b/ARW.Service/Api/BusinessService/Marketing/CouponManage/CustomerCoupons/CustomerCouponServiceApi.cs deleted file mode 100644 index af069e8..0000000 --- a/ARW.Service/Api/BusinessService/Marketing/CouponManage/CustomerCoupons/CustomerCouponServiceApi.cs +++ /dev/null @@ -1,220 +0,0 @@ -using Infrastructure.Attribute; -using Microsoft.AspNetCore.Http; -using SqlSugar; -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; -using ARW.Model; -using ARW.Repository; -using ARW.Repository.Business.Marketing.CouponManage.CustomerCoupons; -using ARW.Service.Api.IBusinessService.Marketing.CouponManage.CustomerCoupons; -using ARW.Model.Dto.Api.Marketing.CouponManage.CustomerCoupons; -using ARW.Model.Models.Business.Marketing.CouponManage.CustomerCoupons; -using ARW.Model.Vo.Api.Marketing.CouponManage.CustomerCoupons; -using ARW.Model.Models.Business.Marketing.CouponManage.Coupons; -using ARW.Repository.Business.Marketing.CouponManage.Coupons; -using ARW.Model.Vo.Business.Marketing.CouponManage.CustomerCoupons; -using Senparc.Weixin.WxOpen.AdvancedAPIs.WxApp.WxAppJson; -using ARW.Model.Vo.Api.GoodsManager.Goodss; -using Newtonsoft.Json; -using Senparc.CO2NET.Extensions; - -namespace ARW.Service.Api.BusinessService.Marketing.CouponManage.CustomerCoupons -{ - /// - /// 领券记录接口实现类Api - /// - /// @author lwh - /// @date 2023-07-31 - /// - [AppService(ServiceType = typeof(ICustomerCouponServiceApi), ServiceLifetime = LifeTime.Transient)] - public class CustomerCouponServiceImplApi : BaseService, ICustomerCouponServiceApi - { - private readonly CustomerCouponRepository _CustomerCouponRepository; - private readonly CouponRepository _CouponRepository; - - public CustomerCouponServiceImplApi(CustomerCouponRepository CustomerCouponRepository, CouponRepository couponRepository) - { - this._CustomerCouponRepository = CustomerCouponRepository; - _CouponRepository = couponRepository; - } - - #region Api接口代码 - - - /// - /// 查询领券记录列表(Api) - /// - /// - /// - public async Task> GetCustomerCouponListApi(CustomerCouponQueryDtoApi parm) - { - //开始拼装查询条件d - var predicate = Expressionable.Create(); - - var query = _CustomerCouponRepository - .Queryable() - .LeftJoin((s, c) => s.CouponGuid == c.CouponGuid) - .Where(s => s.CustomerGuid == parm.CustomerGuid) - .WhereIF(parm.ShopGuid != 0, (s, c) => c.ShopGuid == parm.ShopGuid) - .WhereIF(parm.Status == 1, s => s.CustomerCouponIsUsed == 1 && s.CustomerCouponIsExpired == 1) - .WhereIF(parm.Status == 2, s => s.CustomerCouponIsUsed == 2) - .WhereIF(parm.Status == 3, s => s.CustomerCouponIsExpired == 2) - .OrderBy(s => s.Create_time, OrderByType.Desc) - .Select((s, c) => new CustomerCouponVoApi - { - CouponGuid = c.CouponGuid, - ShopGuid = c.ShopGuid, - Key = s.CustomerCouponId, - Type = c.CouponType, - Value = c.CouponDeductionMoney != 0 ? c.CouponDeductionMoney.ToString() : c.CouponDiscountRate.ToString(), - Desc = c.CouponDesc, - Title = c.CouponName, - Base = c.CouponMinConsumeMoney, - CreateTime = s.Create_time - }); - - - var list = await query.ToListAsync(); - - - foreach (var item in list) - { - // 处理有效日期 - var coupon = await _CouponRepository.GetFirstAsync(s => s.CouponGuid == item.CouponGuid); - if (coupon.CouponExpireType == 1) - { - var firstTime = item.CreateTime.ToString("yyyy.MM.dd"); - var lastTime = item.CreateTime.AddDays(coupon.CouponEffectiveDays).ToString("yyyy.MM.dd"); - item.TimeLimit = firstTime + "-" + lastTime; - } - else - { - var firstTime = coupon.CouponFixedStartTime.ToString("yyyy.MM.dd"); - var lastTime = coupon.CouponFixedEndTime.ToString("yyyy.MM.dd"); - item.TimeLimit = firstTime + "-" + lastTime; - } - - // 处理优惠券状态 - var customerCoupon = await _CustomerCouponRepository.GetFirstAsync(s => s.CustomerCouponId == item.Key); - - // 可使用 - if (customerCoupon.CustomerCouponIsUsed == 1 && customerCoupon.CustomerCouponIsExpired == 1) - item.Status = 1; - // 已使用 - if (customerCoupon.CustomerCouponIsUsed == 2) - item.Status = 2; - // 已过期 - if (customerCoupon.CustomerCouponIsExpired == 2) - item.Status = 3; - - } - - return list; - } - - - - /// - /// 领取优惠券 - /// - public async Task AddCustomerCoupon(CustomerCoupon model) - { - model.CustomerCouponIsExpired = 1; - model.CustomerCouponIsUsed = 1; - - var response = await _CustomerCouponRepository.InsertReturnSnowflakeIdAsync(model); - if (response != 0) - { - await _CouponRepository.UpdateAsync(f => new Coupon - { - CouponGetNumber = f.CouponGetNumber + 1 - }, s => s.CouponGuid == model.CouponGuid); - } - return "领取成功"; - } - - - /// - /// 查询领券记录详情(Api) - /// - /// - /// - public async Task GetCustomerCouponDetails(CustomerCouponDtoApi parm) - { - - var query = _CustomerCouponRepository - .Queryable() - .LeftJoin((s, c) => s.CouponGuid == c.CouponGuid) - .Where(s => s.CustomerCouponId == parm.CustomerCouponId) - .Select((s, c) => new CustomerCouponApiDetailsVo - { - CouponGuid = c.CouponGuid, - Key = s.CustomerCouponId, - Type = c.CouponType, - Value = c.CouponDeductionMoney != 0 ? c.CouponDeductionMoney.ToString() : c.CouponDiscountRate.ToString(), - Desc = c.CouponDesc, - Title = c.CouponName, - Base = c.CouponMinConsumeMoney, - CreateTime = s.Create_time, - UseNotes = c.CouponUseIntro, - }).Take(1); - - - var json = await query.ToJsonAsync(); - - if (json != "[]") - { - json = json.Remove(0, 1); - json = json.Substring(0, json.Length - 1); - var data = JsonConvert.DeserializeObject(json); - - // 处理有效日期 - var coupon = await _CouponRepository.GetFirstAsync(s => s.CouponGuid == data.CouponGuid); - - // 使用范围 - if (coupon.CouponApplicableScope == 1) - data.StoreAdapt = "全部商品"; - if (coupon.CouponApplicableScope == 2) - data.StoreAdapt = "指定商品"; - - if (coupon.CouponExpireType == 1) - { - var firstTime = data.CreateTime.ToString("yyyy.MM.dd"); - var lastTime = data.CreateTime.AddDays(coupon.CouponEffectiveDays).ToString("yyyy.MM.dd"); - data.TimeLimit = firstTime + "-" + lastTime; - } - else - { - var firstTime = coupon.CouponFixedStartTime.ToString("yyyy.MM.dd"); - var lastTime = coupon.CouponFixedEndTime.ToString("yyyy.MM.dd"); - data.TimeLimit = firstTime + "-" + lastTime; - } - - // 处理优惠券状态 - var customerCoupon = await _CustomerCouponRepository.GetFirstAsync(s => s.CustomerCouponId == data.Key); - - // 可使用 - if (customerCoupon.CustomerCouponIsUsed == 1 && customerCoupon.CustomerCouponIsExpired == 1) - data.Status = 1; - // 已使用 - if (customerCoupon.CustomerCouponIsUsed == 2) - data.Status = 2; - // 已过期 - if (customerCoupon.CustomerCouponIsExpired == 2) - data.Status = 3; - - json = data.ToJson(); - - } - return json; - //return await query.ToJsonAsync(); - } - - - #endregion - - } -} diff --git a/ARW.Service/Api/BusinessService/OrderManage/OrderRefunds/OrderRefundServiceApi.cs b/ARW.Service/Api/BusinessService/OrderManage/OrderRefunds/OrderRefundServiceApi.cs deleted file mode 100644 index c5a47df..0000000 --- a/ARW.Service/Api/BusinessService/OrderManage/OrderRefunds/OrderRefundServiceApi.cs +++ /dev/null @@ -1,481 +0,0 @@ -using Infrastructure.Attribute; -using Microsoft.AspNetCore.Http; -using SqlSugar; -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; -using ARW.Model; -using ARW.Repository; -using ARW.Repository.Business.OrderManage.OrderRefunds; -using ARW.Service.Api.IBusinessService.OrderManage.OrderRefunds; -using ARW.Model.Dto.Api.OrderManage.OrderRefunds; -using ARW.Model.Models.Business.OrderManage.OrderRefunds; -using ARW.Model.Vo.Api.OrderManage.OrderRefunds; -using System.Reflection.Metadata; -using ARW.Model.Models.Business.ShopManager.Shops; -using ARW.Model.Vo.Api.OrderManage.Orders; -using ARW.Repository.Business.OrderManage.Orders; -using ARW.Repository.Business.OrderManage.OrderGoodss; -using ARW.Repository.Business.GoodsManager.Goodss; -using ARW.Repository.Business.GoodsManager.GoodsSpecs.GoodsSkus; -using ARW.Model.Models.Business.GoodsManager.GoodsSpecs.GoodsSkus; -using ARW.Model.Models.Business.GoodsManager.GoodsSpecs.SpecValues; -using ARW.Repository.Business.GoodsManager.GoodsSpecs.SpecValues; -using ARW.Service.Api.IBusinessService.OrderManage.Orders; -using OfficeOpenXml; -using Newtonsoft.Json; -using ARW.Repository.Business.OrderManage.OrderCustomerAddreses; -using ARW.Service.Business.IBusinessService.Custom.Regions; -using Senparc.Weixin.WxOpen.AdvancedAPIs.WxApp.WxAppJson; -using ARW.Repository.Business.ShopManager.ShopAddresss; -using ARW.Service.Api.IBusinessService.Custom.Regions; -using ARW.Model.Models.Business.OrderManage.Orders; -using ARW.Service.System.IService; -using Senparc.CO2NET.Extensions; -using ARW.Model.Models.Business.LogisticsManage.LogisticsCompanys; -using ARW.Repository.Business.LogisticsManage.LogisticsCompanys; - -namespace ARW.Service.Api.BusinessService.OrderManage.OrderRefunds -{ - /// - /// 售后单记录表接口实现类Api - /// - /// @author lwh - /// @date 2023-10-16 - /// - [AppService(ServiceType = typeof(IOrderRefundServiceApi), ServiceLifetime = LifeTime.Transient)] - public class OrderRefundServiceImplApi : BaseService, IOrderRefundServiceApi - { - private readonly OrderRefundRepository _OrderRefundRepository; - private readonly OrderRepository _OrderRepository; - private readonly OrderGoodsRepository _OrderGoodsRepository; - private readonly GoodsRepository _GoodsRepository; - private readonly ShopAddressRepository _ShopAddressRepository; - private readonly LogisticsCompanyRepository _LogisticsCompanyRepository; - private readonly IOrderServiceApi _OrderServiceApi; - private readonly IRegionService _RegionService; - private readonly ISysDictDataService _SysDictDataService; - private readonly GoodsSkuRepository _GoodsSkuRepository; - - - public OrderRefundServiceImplApi(OrderRefundRepository OrderRefundRepository, OrderRepository orderRepository, OrderGoodsRepository orderGoodsRepository, GoodsRepository goodsRepository, IOrderServiceApi orderServiceApi, ShopAddressRepository shopAddressRepository, IRegionService regionService, ISysDictDataService sysDictDataService, LogisticsCompanyRepository logisticsCompanyRepository, GoodsSkuRepository goodsSkuRepository) - { - this._OrderRefundRepository = OrderRefundRepository; - _OrderRepository = orderRepository; - _OrderGoodsRepository = orderGoodsRepository; - _GoodsRepository = goodsRepository; - _OrderServiceApi = orderServiceApi; - _ShopAddressRepository = shopAddressRepository; - _RegionService = regionService; - _SysDictDataService = sysDictDataService; - _LogisticsCompanyRepository = logisticsCompanyRepository; - _GoodsSkuRepository = goodsSkuRepository; - } - - #region Api接口代码 - - - /// - /// 查询售后单记录表列表(Api) - /// - /// - /// - public async Task> GetOrderRefundListApi(OrderRefundQueryDtoApi parm) - { - //开始拼装查询条件d - var predicate = Expressionable.Create(); - - predicate = predicate.AndIF(parm.CustomerGuid != 0, s => s.CustomerGuid == parm.CustomerGuid); - predicate = predicate.AndIF(parm.RefundType != null, s => s.RefundType == parm.RefundType); - predicate = predicate.AndIF(parm.RefundReason != null, s => s.RefundReason == parm.RefundReason); - predicate = predicate.AndIF(parm.GoodsReceiveStatus != null, s => s.GoodsReceiveStatus == parm.GoodsReceiveStatus); - predicate = predicate.AndIF(parm.MerchantAuditStatus != null, s => s.MerchantAuditStatus == parm.MerchantAuditStatus); - predicate = predicate.AndIF(parm.IsCustomerSend != null, s => s.IsCustomerSend == parm.IsCustomerSend); - predicate = predicate.AndIF(parm.OrderRefundStatus != null, s => s.OrderRefundStatus == parm.OrderRefundStatus); - var query = _OrderRefundRepository - .Queryable() - .Where(predicate.ToExpression()) - .LeftJoin((s, c) => s.ShopGuid == c.ShopGuid) - .OrderBy(s => s.Create_time, OrderByType.Desc) - .Select((s, c) => new OrderRefundVoApi - { - OrderRefundId = s.OrderRefundId, - OrderRefundGuid = s.OrderRefundGuid, - ShopGuid = s.ShopGuid, - StoreName = c.ShopName, - OrderGuid = s.OrderGuid, - RefundType = s.RefundType, - MerchantAuditStatus = s.MerchantAuditStatus, - RefundMoney = s.RefundMoney, - IsCustomerSend = s.IsCustomerSend, - OrderRefundStatus = s.OrderRefundStatus, - }); - - - var list = await query.ToPageAsync(parm); - - foreach (var item in list.Result) - { - item.OrderRefundGoodList = await GetOrderGoodsList(item.OrderGuid); - - - /* 处理售后订单状态描述 */ - // 待审核 - if (item.MerchantAuditStatus == 1 && item.OrderRefundStatus == 1) - { - item.Status = 1; - item.EserRightsStatusDesc = "商家将尽快确认您的退款申请"; - var buttonVoList = new List(); - var buttonVo = new ButtonVO() - { - Name = "撤销申请", - Type = 2 - }; - buttonVoList.Add(buttonVo); - item.ButtonVOs = buttonVoList; - } - // 已审核 - if (item.MerchantAuditStatus == 2 && item.OrderRefundStatus == 1 && item.RefundType == 1 && item.IsCustomerSend == 1) - { - item.Status = 2; - item.EserRightsStatusDesc = "商家已审核确认,预计1小时内发起退款"; - if(item.RefundType != 2) - { - var buttonVoList = new List(); - var buttonVo = new ButtonVO() - { - Name = "填写运单号", - Type = 3 - }; - buttonVoList.Add(buttonVo); - item.ButtonVOs = buttonVoList; - } - } - // 已发货 - if (item.IsCustomerSend == 2 && item.OrderRefundStatus == 1) - { - item.Status = 3; - item.EserRightsStatusDesc = "买家已发货,等待商家收货"; - //var buttonVoList = new List(); - //var buttonVo = new ButtonVO() - //{ - // Name = "查看物流", - // Type = 5 - //}; - //buttonVoList.Add(buttonVo); - //item.ButtonVOs = buttonVoList; - } - if (item.OrderRefundStatus == 3) - { - item.Status = 4; - item.EserRightsStatusDesc = "退款/售后己完成,商家已退款,退回资金将原路三个工作日内返回您的账户"; - } - if (item.OrderRefundStatus == 4) - { - item.Status = 5; - item.EserRightsStatusDesc = "退款/售后己取消"; - } - - } - - return list; - } - - - - /// - /// 添加售后单记录表 - /// - public async Task AddOrderRefund(OrderRefund model) - { - model.GoodsReceiveStatus = 1; - model.MerchantAuditStatus = 1; - model.IsCustomerSend = 1; - model.OrderRefundStatus = 1; - model.IsMerchantReceive = 1; - - var response = await _OrderRefundRepository.InsertReturnSnowflakeIdAsync(model); - return response; - } - - - /// - /// 撤销申请 - /// - public async Task RepealOrderRefund(AddOrderRefundApiDto parm) - { - var response = await _OrderRefundRepository.UpdateAsync(f => new OrderRefund - { - OrderRefundStatus = 4 - }, s => s.OrderRefundGuid == parm.OrderRefundGuid); - return "撤销成功!"; - } - - - /// - /// 买家发货(填写运单号) - /// - public async Task BuyerDelivery(BuyerDeliveryApiDto parm) - { - var response = await _OrderRefundRepository.UpdateAsync(f => new OrderRefund - { - LogisticsCompanyGuid = parm.LogisticsCompanyGuid, - ExpressNo = parm.ExpressNo, - CustomerWaybillRemark = parm.CustomerWaybillRemark, - IsCustomerSend = 2, - CustomerSendTime = DateTime.Now, - }, s => s.OrderRefundGuid == parm.OrderRefundGuid); - return "发货成功!"; - } - - - - /// - /// 查询售后单记录表详情(Api) - /// - /// - /// - public async Task GetOrderRefundDetails(OrderRefundDtoApi parm) - { - - var query = _OrderRefundRepository - .Queryable() - .Where(s => s.OrderRefundGuid == parm.OrderRefundGuid) - .LeftJoin((s, c) => s.ShopGuid == c.ShopGuid) - .LeftJoin((s, c, d) => s.OrderGuid == d.OrderGuid) - .Select((s, c, d) => new OrderRefundApiDetailsVo - { - OrderRefundId = s.OrderRefundId, - OrderRefundGuid = s.OrderRefundGuid, - OrderNo = d.OrderNumber, - StoreName = c.ShopName, - OrderGuid = s.OrderGuid, - RefundType = s.RefundType, - MerchantAuditStatus = s.MerchantAuditStatus, - RefundMoney = s.RefundMoney, - IsCustomerSend = s.IsCustomerSend, - OrderRefundStatus = s.OrderRefundStatus, - ShopAddressGuid = s.ShopRefundAddressGuid, - RefundReason = s.RefundReason, - CustomerRefundDesc = s.CustomerRefundDesc, - CustomerRefundImg = s.CustomerRefundImg, - LogisticsCompanyGuid = s.LogisticsCompanyGuid, - ExpressNo = s.ExpressNo, - CreateTime = s.Create_time - }).Take(1); - - - var json = await query.ToJsonAsync(); - - - if (json != "[]") - { - json = json.Remove(0, 1); - json = json.Substring(0, json.Length - 1); - var data = JsonConvert.DeserializeObject(json); - - // 获取订单商品列表 - data.OrderRefundGoodList = await GetOrderGoodsList(data.OrderGuid); - - // 处理退款原因 - var dictList = _SysDictDataService.SelectDictDataByType("refund_reason"); - foreach (var item in dictList) - { - if (Convert.ToInt32(item.DictValue) == data.RefundReason) - { - data.Reason = item.DictLabel; - } - } - - - // 处理快递状态 - if (data.LogisticsCompanyGuid != null) - { - data.TrajectoryVos = new TrajectoryVo(); - var company = await _LogisticsCompanyRepository.GetFirstAsync(s => s.LogisticsCompanyGuid == data.LogisticsCompanyGuid); - data.TrajectoryVos.LogisticsCompanyCode = data.ExpressNo; - data.TrajectoryVos.LogisticsCompanyName = company.LogisticsCompanyName; - } - - - /* 处理售后订单状态描述 */ - // 待审核 - if (data.MerchantAuditStatus == 1 && data.OrderRefundStatus == 1) - { - data.Status = 1; - data.StatusName = "待审核"; - data.EserRightsStatusDesc = "商家将尽快确认您的退款申请"; - } - // 已审核 - if (data.MerchantAuditStatus == 2 && data.OrderRefundStatus == 1) - { - data.Status = 2; - data.StatusName = "已审核"; - data.EserRightsStatusDesc = "商家已审核确认,预计1小时内发起退款"; - } - // 已发货 - if (data.IsCustomerSend == 2 && data.OrderRefundStatus == 1) - { - data.Status = 3; - data.StatusName = "已发货"; - data.EserRightsStatusDesc = "买家已发货,等待商家收货"; - } - // 已完成 - if (data.OrderRefundStatus == 3) - { - data.Status = 4; - data.StatusName = "已完成"; - data.EserRightsStatusDesc = "退款/售后己完成,商家已退款,退回资金将原路三个工作日内返回您的账户"; - } - if (data.OrderRefundStatus == 4) - { - data.Status = 5; - data.StatusName = "已取消"; - data.EserRightsStatusDesc = "退款/售后己取消"; - } - - // 商家地址 - var shopAddress = await _ShopAddressRepository.GetFirstAsync(s => s.ShopAddressGuid == data.ShopAddressGuid); - if (shopAddress != null) - { - var logistics = new Logistics - { - ReceiverAddressId = shopAddress.ShopAddressGuid, - ReceiverName = shopAddress.ShopAddressContactName, - ReceiverPhone = shopAddress.ShopAddressContactNumber, - ReceiverProvince = await _RegionService.GetRegionName(shopAddress.ProvinceId), - ReceiverCity = await _RegionService.GetRegionName(shopAddress.CityId), - receiverCountry = await _RegionService.GetRegionName(shopAddress.DistrictId), - ReceiverAddress = shopAddress.ShopAddressDetailedAddress - }; - data.LogisticsVO = logistics; - } - - json = data.ToJson(); - } - - - - return json; - } - - - - #region 业务方法调用 - - - /// - /// 获取售后订单商品列表 - /// - /// - /// - public async Task> GetOrderGoodsList(long orderGuid) - { - var orderRefundGoodList = new List(); - var orderGoodsList = await _OrderGoodsRepository.GetListAsync(s => s.OrderGuid == orderGuid); - foreach (var _item in orderGoodsList) - { - var good = await _GoodsRepository.GetFirstAsync(s => s.GoodsGuid == _item.GoodsGuid); - var orderGood = new OrderGoodsApiVo - { - GoodsGuId = good.GoodsGuid, - Thumb = good.GoodsPicture.Split(',').First(), - Title = good.GoodsName, - SkuId = _item.GoodsSkuId, - Price = _item.GoodsPrice, - BuyQuantity = _item.GoodsTotalNum - }; - if (_item.GoodsSkuId != 0) - { - var sku = await _GoodsSkuRepository.GetFirstAsync(s => s.GoodsSkuId == _item.GoodsSkuId); - if (!string.IsNullOrEmpty(sku.GoodsSkuImg)) - { - orderGood.Thumb = sku.GoodsSkuImg; - } - orderGood.Specifications = await _OrderServiceApi.GetGoodsSpecList(_item.GoodsSkuId); - } - - orderRefundGoodList.Add(orderGood); - } - return orderRefundGoodList; - } - - - /// - /// 处理物流状态 - /// - /// - /// - //public OrderRefundApiDetailsVo GetTrajectory(Order order, OrderRefundApiDetailsVo data) - //{ - // data.TrajectoryVos = new TrajectoryVo(); - // var trajectoryList = new List(); - - // // 已下单(待发货) - // if (order.OrderStatus == 1) - // { - // var trajectoryNodeList1 = new List { GetTrajectoryNode("订单已提交", order.Create_time) }; - // var trajectory1 = GetTrajectory("", "", trajectoryNodeList1, 3); - // trajectoryList.Add(trajectory1); - - // var trajectoryNodeList2 = new List { GetTrajectoryNode("订单已经支付成功,支付方式为:微信支付", order.PayTime) }; - // var trajectory2 = GetTrajectory("已下单", "https://cdn-we-retail.ym.tencent.com/web/trajectoryIcons/ordered.svg", trajectoryNodeList2, 2); - // trajectoryList.Add(trajectory2); - - // // 运输中(已发货,待收货) - // if (order.DeliveryStatus == 2 && order.ReceiptStatus == 1 && order.PayStatus == 2 && order.OrderStatus == 1) - // { - // data.TrajectoryVos.LogisticsCompanyCode = order.LogisticsTrackingNumber; - // data.TrajectoryVos.LogisticsCompanyName = order.LogisticsCompany; - - // var trajectoryNodeList3 = new List { GetTrajectoryNode($"商家已发货,物流承运商:{order.LogisticsCompany}", order.DeliveryTime) }; - - // // 对接快递100接口 - // //var company = _LogisticsCompanyRepository.GetFirst(s => s.LogisticsCompanyGuid == order.LogisticsCompanyGuid); - // //var trackRes = Kuaidi100.GetQueryTrack(company.LogisticsCompanyCode, order.LogisticsTrackingNumber); - - // var trajectory3 = GetTrajectory("已发货", "deliver", trajectoryNodeList3, 1); - // trajectoryList.Add(trajectory3); - // } - // } - - // //foreach (var item in trajectoryList) - // //{ - // // item.Nodes = item.Nodes.OrderBy(s => s.Sort).ToList(); - // //} - // trajectoryList = trajectoryList.OrderBy(s => s.Sort).ToList(); - // data.TrajectoryVos.Trajectorys = trajectoryList; - // return data; - //} - - - //public Trajectory GetTrajectory(string title, string icon, List trajectoryNodeList, int sort) - //{ - // var trajectory = new Trajectory(); - // trajectory.Title = title; - // trajectory.Icon = icon; - // trajectory.Nodes = trajectoryNodeList; - // trajectory.Sort = sort; - - // return trajectory; - //} - - - //public TrajectoryNode GetTrajectoryNode(string status, DateTime? time) - //{ - // var trajectoryNode = new TrajectoryNode(); - // trajectoryNode.Status = status; - // trajectoryNode.Timestamp = time; - // return trajectoryNode; - //} - - - #endregion - - - #endregion - - } -} diff --git a/ARW.Service/Api/BusinessService/OrderManage/Orders/OrderServiceApi.cs b/ARW.Service/Api/BusinessService/OrderManage/Orders/OrderServiceApi.cs deleted file mode 100644 index 0e8278b..0000000 --- a/ARW.Service/Api/BusinessService/OrderManage/Orders/OrderServiceApi.cs +++ /dev/null @@ -1,719 +0,0 @@ -using Infrastructure.Attribute; -using SqlSugar; -using System; -using System.Collections.Generic; -using System.Linq; -using System.Threading.Tasks; -using ARW.Model; -using ARW.Repository; -using ARW.Repository.Business.OrderManage.Orders; -using ARW.Service.Api.IBusinessService.OrderManage.Orders; -using ARW.Model.Dto.Api.OrderManage.Orders; -using ARW.Model.Models.Business.OrderManage.Orders; -using ARW.Model.Vo.Api.OrderManage.Orders; -using ARW.Repository.Business.OrderManage.OrderGoodss; -using ARW.Repository.Business.GoodsManager.Goodss; -using ARW.Repository.Business.GoodsManager.GoodsSpecs.GoodsSkus; -using ARW.Repository.Business.GoodsManager.GoodsSpecs.Specs; -using ARW.Repository.Business.GoodsManager.GoodsSpecs.SpecValues; -using ARW.Model.Models.Business.GoodsManager.GoodsSpecs.GoodsSkus; -using ARW.Model.Models.Business.GoodsManager.GoodsSpecs.SpecValues; -using ARW.Model.Models.Business.GoodsManager.GoodsComments; -using ARW.Repository.Business.GoodsManager.GoodsComments; -using ARW.Repository.Business.ShopManager.Shops; -using ARW.Model.Models.Business.ShopManager.Shops; -using Newtonsoft.Json; -using Senparc.CO2NET.Extensions; -using ARW.Repository.Business.OrderManage.OrderCustomerAddreses; -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; -using MimeKit.Cryptography; - -namespace ARW.Service.Api.BusinessService.OrderManage.Orders -{ - /// - /// 订单接口实现类Api - /// - /// @author lwh - /// @date 2023-09-01 - /// - [AppService(ServiceType = typeof(IOrderServiceApi), ServiceLifetime = LifeTime.Transient)] - public class OrderServiceImplApi : BaseService, IOrderServiceApi - { - private readonly OrderRepository _OrderRepository; - private readonly OrderGoodsRepository _OrderGoodsRepository; - private readonly OrderCustomerAddressRepository _OrderCustomerAddressRepository; - private readonly GoodsRepository _GoodsRepository; - private readonly GoodsSkuRepository _GoodsSkuRepository; - private readonly GoodsCommentRepository _GoodsCommentRepository; - private readonly SpecRepository _SpecRepository; - 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, OrderRefundRepository orderRefundRepository) - { - this._OrderRepository = OrderRepository; - _OrderGoodsRepository = orderGoodsRepository; - _GoodsRepository = goodsRepository; - _GoodsSkuRepository = goodsSkuRepository; - _SpecRepository = specRepository; - _SpecValueRepository = specValueRepository; - _GoodsCommentRepository = goodsCommentRepository; - _ShopRepository = shopRepository; - _OrderCustomerAddressRepository = orderCustomerAddressRepository; - _RegionService = regionService; - _LogisticsCompanyRepository = logisticsCompanyRepository; - _OrderRefundRepository = orderRefundRepository; - } - - #region Api接口代码 - - - /// - /// 查询订单列表(Api) - /// - /// - /// - public async Task> GetOrderListApi(OrderQueryDtoApi parm) - { - //开始拼装查询条件d - var predicate = Expressionable.Create(); - - predicate = predicate.AndIF(parm.CustomerGuid != 0, s => s.CustomerGuid == parm.CustomerGuid); - predicate = predicate.AndIF(parm.Status == 1, s => s.PayStatus == 1 && s.OrderStatus == 1); - predicate = predicate.AndIF(parm.Status == 2, s => s.DeliveryStatus == 1 && s.PayStatus == 2 && s.OrderStatus == 1); - predicate = predicate.AndIF(parm.Status == 3, s => s.ReceiptStatus == 1 && s.DeliveryStatus == 2 && s.PayStatus == 2 && s.OrderStatus == 1); - predicate = predicate.AndIF(parm.Status == 4, s => s.PayStatus == 2 && s.OrderStatus == 4); - predicate = predicate.AndIF(!string.IsNullOrEmpty(parm.OrderNumber), s => s.OrderNumber.Contains(parm.OrderNumber)); - var query = _OrderRepository - .Queryable() - .Where(predicate.ToExpression()) - .OrderBy(s => s.Create_time, OrderByType.Desc) - .Select(s => new OrderVoApi - { - OrderId = s.OrderId, - OrderGuid = s.OrderGuid, - OrderNo = s.OrderNumber, - GoodsTotalAmoun = s.GoodsTotalAmoun, - OrderAmount = s.OrderAmount, - PayPrice = s.PayPrice, - PayStatus = s.PayStatus, - ExpressPrice = s.ExpressPrice, - DeliveryStatus = s.DeliveryStatus, - ReceiptStatus = s.ReceiptStatus, - OrderStatus = s.OrderStatus, - IsComment = s.IsComment, - }); - - - var list = await query.ToPageAsync(parm); - - foreach (var item in list.Result) - { - var goodsList = new List(); - var orderGoodsList = await _OrderGoodsRepository.GetListAsync(s => s.OrderGuid == item.OrderGuid); - foreach (var _item in orderGoodsList) - { - var good = await _GoodsRepository.GetFirstAsync(s => s.GoodsGuid == _item.GoodsGuid); - var orderGood = new OrderGoodsApiVo - { - GoodsGuId = good.GoodsGuid, - Thumb = good.GoodsPicture.Split(',').First(), - Title = good.GoodsName, - SkuId = _item.GoodsSkuId, - Price = _item.GoodsPrice, - BuyQuantity = _item.GoodsTotalNum - }; - if (_item.GoodsSkuId != 0) - { - var sku = await _GoodsSkuRepository.GetFirstAsync(s => s.GoodsSkuId == _item.GoodsSkuId); - if (!string.IsNullOrEmpty(sku.GoodsSkuImg)) - { - orderGood.Thumb = sku.GoodsSkuImg; - } - orderGood.Specifications = await GetGoodsSpecList(_item.GoodsSkuId); - } - - goodsList.Add(orderGood); - } - item.GoodsList = goodsList; - - - #region 处理订单状态 - /* 处理订单状态 */ - if (item.PayStatus == 1 && item.OrderStatus == 1) - { - item.Status = 1; - item.StatusName = "待付款"; - var buttonVoList = new List(); - var buttonVo = new ButtonVO() - { - Name = "取消订单", - Type = 2 - }; - var buttonVo1 = new ButtonVO() - { - Name = "付款", - Primary = true, - 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(); - var buttonVo = new ButtonVO() - { - Name = "取消订单", - Type = 2 - }; - var buttonVo1 = new ButtonVO() - { - Name = "再次购买", - Primary = true, - 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(); - var buttonVo = new ButtonVO() - { - Name = "确认收货", - Primary = true, - Type = 3 - }; - buttonVoList.Add(buttonVo); - item.ButtonVOs = buttonVoList; - } - if (item.PayStatus == 2 && item.OrderStatus == 4) - { - item.Status = 4; - item.StatusName = "已完成"; - - var buttonVoList = new List(); - 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 == 1) - { - var buttonVo1 = new ButtonVO() - { - Name = "评价", - Primary = true, - Type = 6 - }; - buttonVoList.Add(buttonVo1); - } - item.ButtonVOs = buttonVoList; - } - if (item.OrderStatus == 2) - { - item.Status = 5; - item.StatusName = "已取消"; - - var buttonVoList = new List(); - var buttonVo = new ButtonVO() - { - Name = "删除订单", - Type = 7 - }; - buttonVoList.Add(buttonVo); - item.ButtonVOs = buttonVoList; - } - if (item.OrderStatus == 3) - { - item.Status = 5; - item.StatusName = "待取消"; - } - - #endregion - } - - return list; - } - - - /// - /// 获取售后订单商品列表(Api) - /// - /// - /// - public async Task> GetOrderRefundGoodsList(OrderDtoApi parm) - { - - var order = await _OrderRepository.GetFirstAsync(s => s.OrderGuid == parm.OrderGuid); - - // 订单商品 - var orderItemList = new List(); - var orderGoodsList = await _OrderGoodsRepository.GetListAsync(s => s.OrderGuid == parm.OrderGuid); - foreach (var item in orderGoodsList) - { - var orderItem = new OrderItem(); - - var good = await _GoodsRepository.GetFirstAsync(s => s.GoodsGuid == item.GoodsGuid); - - orderItem.SpuId = item.GoodsGuid; - orderItem.SkuId = item.GoodsSkuId; - orderItem.GoodsName = good.GoodsName; - orderItem.GoodsPictureUrl = good.GoodsPicture.Split(',').First(); - orderItem.BuyQuantity = item.GoodsTotalNum; - - if (item.GoodsSkuId != 0) - { - orderItem.Specifications = await GetGoodsSpecList(orderItem.SkuId); - } - - orderItemList.Add(orderItem); - } - return orderItemList; - } - - - /// - /// 待付款取消订单 - /// - /// - /// - public async Task WaitPayCancelOrder(OrderDtoApi parm) - { - // 找到该订单的商品,如果是下单立减库存,将库存加回来 - var orderGoodsList = await _OrderGoodsRepository.GetListAsync(s => s.OrderGuid == parm.OrderGuid); - foreach (var item in orderGoodsList) - { - var good = await _GoodsRepository.GetFirstAsync(s => s.GoodsGuid == item.GoodsGuid); - if (good.GoodsDeductStockType == 1) - { - if (item.GoodsSkuId != 0) - { - var sku = await _GoodsSkuRepository.GetFirstAsync(s => s.GoodsSkuId == item.GoodsSkuId); - sku.GoodsSkuStockNum += item.GoodsTotalNum; - good.GoodsTotalInventory += item.GoodsTotalNum; - await _GoodsSkuRepository.UpdateAsync(sku); - await _GoodsRepository.UpdateAsync(good); - } - else - { - good.GoodsTotalInventory += item.GoodsTotalNum; - await _GoodsRepository.UpdateAsync(good); - } - } - } - - var res = await _OrderRepository.UpdateAsync(f => new Order - { - OrderStatus = 2, - IsSettled = 2, - }, f => f.OrderGuid == parm.OrderGuid); - if (res) - return "取消订单成功"; - else - return "取消订单失败!"; - } - - - /// - /// 已付款取消订单 - /// - /// - /// - public async Task PayCancelOrder(OrderDtoApi parm) - { - var res = await _OrderRepository.UpdateAsync(f => new Order - { - OrderStatus = 3, - }, f => f.OrderGuid == parm.OrderGuid); - if (res) - return "取消订单成功"; - else - return "取消订单失败!"; - } - - - /// - /// 确认收货 - /// - /// - /// - public async Task ConfirmReceipt(OrderDtoApi parm) - { - // 收货状态 => 已收货 - // 订单状态 => 已完成 - // 订单结算状态 => 已结算 - var res = await _OrderRepository.UpdateAsync(f => new Order - { - ReceiptStatus = 2, - ReceiptTime = DateTime.Now, - OrderStatus = 4, - IsSettled = 2, - }, f => f.OrderGuid == parm.OrderGuid); - if (res) - return "确认收货成功"; - else - return "收货失败!"; - } - - - /// - /// 评价 - /// - /// - /// - public async Task AddComment(GoodsComment model) - { - var good = await _GoodsRepository.GetFirstAsync(s => s.GoodsGuid == model.GoodsGuid); - var shop = await _ShopRepository.GetFirstAsync(s => s.ShopGuid == good.ShopGuid); - - model.ShopGuid = shop.ShopGuid; - - if (model.GoodsCommentRating < 3) - { - model.GoodsCommentRatingType = 3; - } - if (model.GoodsCommentRating < 3.5 && model.GoodsCommentRating >= 2.5) - { - model.GoodsCommentRatingType = 2; - } - if (model.GoodsCommentRating >= 3.5) - { - model.GoodsCommentRatingType = 1; - } - - - model.GoodsCommentRecoverStatus = 1; - model.GoodsCommentSort = 100; - var response = await _GoodsCommentRepository.InsertReturnSnowflakeIdAsync(model); - - var order = await _OrderRepository.UpdateAsync(f => new Order - { - IsComment = 2 - }, f => f.OrderGuid == model.OrderGuid); - - return "添加成功!"; - } - - - /// - /// 查询订单详情(Api) - /// - /// - /// - public async Task GetOrderDetails(OrderDtoApi parm) - { - - var query = _OrderRepository - .Queryable() - .Where(s => s.OrderGuid == parm.OrderGuid) - .LeftJoin((s, c) => s.ShopGuid == c.ShopGuid) - .Select((s, c) => new OrderApiDetailsVo - { - OrderId = s.OrderId, - OrderGuid = s.OrderGuid, - StoreName = c.ShopName, - OrderNo = s.OrderNumber, - TotalAmount = s.OrderAmount, - GoodsAmount = s.GoodsTotalAmoun, - PaymentAmount = s.PayPrice, - FreightFee = s.ExpressPrice, - CouponAmount = s.CouponMoney, - Remark = s.OrderRemark, - CreateTime = s.Create_time - }).Take(1); - - - var json = await query.ToJsonAsync(); - - if (json != "[]") - { - json = json.Remove(0, 1); - json = json.Substring(0, json.Length - 1); - var data = JsonConvert.DeserializeObject(json); - - var order = await _OrderRepository.GetFirstAsync(s => s.OrderGuid == data.OrderGuid); - - // 订单商品 - var orderItemList = new List(); - var orderGoodsList = await _OrderGoodsRepository.GetListAsync(s => s.OrderGuid == data.OrderGuid); - foreach (var item in orderGoodsList) - { - var orderItem = new OrderItem(); - - var good = await _GoodsRepository.GetFirstAsync(s => s.GoodsGuid == item.GoodsGuid); - - orderItem.SpuId = item.GoodsGuid; - orderItem.SkuId = item.GoodsSkuId; - orderItem.GoodsName = good.GoodsName; - orderItem.GoodsPictureUrl = good.GoodsPicture.Split(',').First(); - orderItem.BuyQuantity = item.GoodsTotalNum; - orderItem.Price = item.GoodsPrice; - - if (item.GoodsSkuId != 0) - { - var sku = await _GoodsSkuRepository.GetFirstAsync(s => s.GoodsSkuId == item.GoodsSkuId); - if (!string.IsNullOrEmpty(sku.GoodsSkuImg)) - { - orderItem.GoodsPictureUrl = sku.GoodsSkuImg; - } - orderItem.Specifications = await GetGoodsSpecList(orderItem.SkuId); - } - - orderItemList.Add(orderItem); - } - data.OrderItemVOs = orderItemList; - - // 用户地址 - var customerAddress = await _OrderCustomerAddressRepository.GetFirstAsync(s => s.OrderGuid == data.OrderGuid); - if (customerAddress != null) - { - var logistics = new Logistics - { - ReceiverAddressId = customerAddress.CustomerAddressGuid, - ReceiverName = customerAddress.ConsigneeName, - ReceiverPhone = customerAddress.Phont, - ReceiverProvince = await _RegionService.GetRegionName(customerAddress.ProvinceId), - ReceiverCity = await _RegionService.GetRegionName(customerAddress.CityId), - receiverCountry = await _RegionService.GetRegionName(customerAddress.RegionId), - ReceiverAddress = customerAddress.Detail - }; - data.LogisticsVO = logistics; - } - - /* 处理物流状态 */ - data = GetTrajectory(order, data); - - /* 处理订单状态 */ - data = GetOrderStatus(order, data); - - - - json = data.ToJson(); - } - - return json; - } - - - - /// - /// 处理物流状态 - /// - /// - /// - public OrderApiDetailsVo GetTrajectory(Order order, OrderApiDetailsVo data) - { - data.TrajectoryVos = new TrajectoryVo(); - var trajectoryList = new List(); - - // 已下单(待发货) - if (order.OrderStatus == 1) - { - var trajectoryNodeList1 = new List { GetTrajectoryNode("订单已提交", order.Create_time) }; - var trajectory1 = GetTrajectory("", "", trajectoryNodeList1, 3); - trajectoryList.Add(trajectory1); - - var trajectoryNodeList2 = new List { GetTrajectoryNode("订单已经支付成功,支付方式为:微信支付", order.PayTime) }; - var trajectory2 = GetTrajectory("已下单", "https://cdn-we-retail.ym.tencent.com/web/trajectoryIcons/ordered.svg", trajectoryNodeList2, 2); - trajectoryList.Add(trajectory2); - - // 运输中(已发货,待收货) - if (order.DeliveryStatus == 2 && order.ReceiptStatus == 1 && order.PayStatus == 2 && order.OrderStatus == 1) - { - data.TrajectoryVos.LogisticsCompanyCode = order.LogisticsTrackingNumber; - data.TrajectoryVos.LogisticsCompanyName = order.LogisticsCompany; - - var trajectoryNodeList3 = new List { GetTrajectoryNode($"商家已发货,物流承运商:{order.LogisticsCompany}", order.DeliveryTime) }; - - // 对接快递100接口 - //var company = _LogisticsCompanyRepository.GetFirst(s => s.LogisticsCompanyGuid == order.LogisticsCompanyGuid); - //var trackRes = Kuaidi100.GetQueryTrack(company.LogisticsCompanyCode, order.LogisticsTrackingNumber); - - var trajectory3 = GetTrajectory("已发货", "deliver", trajectoryNodeList3, 1); - trajectoryList.Add(trajectory3); - } - } - - //foreach (var item in trajectoryList) - //{ - // item.Nodes = item.Nodes.OrderBy(s => s.Sort).ToList(); - //} - trajectoryList = trajectoryList.OrderBy(s => s.Sort).ToList(); - data.TrajectoryVos.Trajectorys = trajectoryList; - return data; - } - - - public Trajectory GetTrajectory(string title, string icon, List trajectoryNodeList, int sort) - { - var trajectory = new Trajectory(); - trajectory.Title = title; - trajectory.Icon = icon; - trajectory.Nodes = trajectoryNodeList; - trajectory.Sort = sort; - - return trajectory; - } - - - public TrajectoryNode GetTrajectoryNode(string status, DateTime? time) - { - var trajectoryNode = new TrajectoryNode(); - trajectoryNode.Status = status; - trajectoryNode.Timestamp = time; - return trajectoryNode; - } - - - - /// - /// 处理订单状态 - /// - /// - /// - public OrderApiDetailsVo GetOrderStatus(Order order, OrderApiDetailsVo data) - { - // 待付款 - if (order.PayStatus == 1 && order.OrderStatus == 1) - { - data.AutoCancelTime = order.Create_time.AddMinutes(30); ; - data.OrderStatus = 1; - data.OrderStatusName = "待付款"; - } - // 待发货 - if (order.DeliveryStatus == 1 && order.PayStatus == 2 && order.OrderStatus == 1) - { - data.OrderStatus = 2; - data.OrderStatusName = "待发货"; - } - // 待收货 - if (order.DeliveryStatus == 2 && order.ReceiptStatus == 1 && order.PayStatus == 2 && order.OrderStatus == 1) - { - data.OrderStatus = 2; - data.OrderStatusName = "待收货"; - } - // 已完成 - if (order.PayStatus == 2 && order.OrderStatus == 4) - { - data.OrderStatus = 2; - data.OrderStatusName = "已完成"; - } - // 已取消 - if (order.OrderStatus == 2) - { - data.OrderStatus = 2; - data.OrderStatusName = "已取消"; - } - // 待取消 - if (order.OrderStatus == 3) - { - data.OrderStatus = 5; - data.OrderStatusName = "待取消"; - } - - return data; - } - - - - - #region 业务方法调用 - - - /// - /// 获取商品规格 - /// - /// 规格id - /// - public async Task> GetGoodsSpecList(int? skuId) - { - var list = new List(); - var sku = await _GoodsSkuRepository.GetFirstAsync(s => s.GoodsSkuId == skuId); - if (sku.SpecValueId != 0) - { - var orderGoodsSpecApiVo1 = await GetGoodsSpec(sku, 1); - list.Add(orderGoodsSpecApiVo1); - - if (sku.SpecSecondValueId != 0) - { - var orderGoodsSpecApiVo2 = await GetGoodsSpec(sku, 2); - list.Add(orderGoodsSpecApiVo2); - - if (sku.SpecThirdValueId != 0) - { - var orderGoodsSpecApiVo3 = await GetGoodsSpec(sku, 3); - list.Add(orderGoodsSpecApiVo3); - } - } - } - - return list; - } - - - public async Task GetGoodsSpec(GoodsSku sku, int level) - { - var orderGoodsSpecApiVo = new OrderGoodsSpecApiVo(); - var specValue = new SpecValue(); - switch (level) - { - case 1: - specValue = await _SpecValueRepository.GetFirstAsync(s => s.SpecValueId == sku.SpecValueId); - orderGoodsSpecApiVo = await GetSpecValue(specValue); - break; - case 2: - specValue = await _SpecValueRepository.GetFirstAsync(s => s.SpecValueId == sku.SpecSecondValueId); - orderGoodsSpecApiVo = await GetSpecValue(specValue); - break; - case 3: - specValue = await _SpecValueRepository.GetFirstAsync(s => s.SpecValueId == sku.SpecThirdValueId); - orderGoodsSpecApiVo = await GetSpecValue(specValue); - break; - - default: - break; - } - return orderGoodsSpecApiVo; - } - - - public async Task GetSpecValue(SpecValue specValue) - { - var spec = await _SpecRepository.GetFirstAsync(s => s.SpecId == specValue.SpecId); - OrderGoodsSpecApiVo orderGoodsSpecApiVo = new() - { - SpecTitle = spec.SpecName, - SpecValue = specValue.SpecValueName - }; - return orderGoodsSpecApiVo; - } - - #endregion - - - - - #endregion - - } -} diff --git a/ARW.Service/Api/BusinessService/PayManage/PayServiceApi.cs b/ARW.Service/Api/BusinessService/PayManage/PayServiceApi.cs index a5acbdb..4073036 100644 --- a/ARW.Service/Api/BusinessService/PayManage/PayServiceApi.cs +++ b/ARW.Service/Api/BusinessService/PayManage/PayServiceApi.cs @@ -1,7 +1,5 @@ using Infrastructure.Attribute; using System.Threading.Tasks; -using ARW.Repository.Business.ShopManager.Shops; -using ARW.Repository.Business.GoodsManager.GoodsCategorys; using ARW.Repository.Business.Custom.Customers; using ARW.Model.Models.Business.Payments; using Infrastructure; @@ -10,32 +8,12 @@ using Infrastructure.WeChat.TenPay; using Senparc.CO2NET.HttpUtility; using ARW.Service.Api.IBusinessService.PayManage; using ARW.Repository.Business.Payments; -using ARW.Repository.Business.OrderManage.Orders; -using ARW.Repository.Business.Marketing.CouponManage.Coupons; using ARW.Model.Dto.Api.Pay; -using ARW.Repository.Business.Carts; -using ARW.Repository.Business.GoodsManager.Goodss; -using ARW.Repository.Business.GoodsManager.GoodsSpecs.GoodsSkus; -using ARW.Service.Api.IBusinessService.GoodsManager.Goodss; -using ARW.Model.Dto.Api.GoodsManager.Goodss; -using ARW.Model.Models.Business.OrderManage.OrderGoodss; -using ARW.Repository.Business.OrderManage.OrderGoodss; -using ARW.Repository.Business.OrderManage.OrderCustomerAddreses; -using ARW.Repository.Business.Custom.CustomerAddresses; -using ARW.Model.Models.Business.OrderManage.OrderCustomerAddreses; using Senparc.Weixin.TenPayV3.Apis.BasePay; using System; using System.Collections.Generic; using ARW.Common; -using ARW.Model.Models.Business.Carts; -using ARW.Repository.Business.Marketing.CouponManage.CustomerCoupons; -using ARW.Model.Models.Business.Marketing.CouponManage.CustomerCoupons; -using ARW.Model.Vo.Business.Marketing.CouponManage.CustomerCoupons; using System.Linq; -using ARW.Model.Vo.Api.OrderManage.Orders; -using ARW.Model.Models.Business.OrderTasks; -using ARW.Model.Vo.Business.OrderManage.OrderCustomerAddreses; -using ARW.Repository.Business.OrderTasks; namespace ARW.Service.Api.BusinessService.PaymentManage { @@ -51,43 +29,16 @@ namespace ARW.Service.Api.BusinessService.PaymentManage private readonly SenparcHttpClient _httpClient; private readonly NLog.Logger logger = NLog.LogManager.GetCurrentClassLogger(); - private readonly IGoodsServiceApi _GoodsServiceApi; - - private readonly ShopRepository _ShopRepository; - private readonly GoodsRepository _GoodsRepository; - private readonly GoodsCategoryRepository _GoodsCategoryRepository; private readonly CustomerRepository _CustomerRepository; - private readonly OrderRepository _OrderRepository; private readonly PaymentRepository _PaymentRepository; - private readonly CouponRepository _CouponRepository; - private readonly CartRepository _CartRepository; - private readonly GoodsSkuRepository _GoodsSkuRepository; - private readonly OrderGoodsRepository _OrderGoodsRepository; - private readonly OrderCustomerAddressRepository _OrderCustomerAddressRepository; - private readonly CustomerAddressRepository _CustomerAddressRepository; - private readonly CustomerCouponRepository _CustomerCouponRepository; - private readonly OrderTaskRepository _OrderTaskRepository; - public PayServiceApi(ShopRepository ShopRepository, GoodsCategoryRepository goodsCategoryRepository, CustomerRepository customerRepository, OrderRepository orderRepository, PaymentRepository paymentRepository, CouponRepository couponRepository, SenparcHttpClient httpClient, GoodsRepository goodsRepository, GoodsSkuRepository goodsSkuRepository, IGoodsServiceApi goodsServiceApi, CartRepository cartRepository, OrderGoodsRepository orderGoodsRepository, OrderCustomerAddressRepository orderCustomerAddressRepository, CustomerAddressRepository customerAddressRepository, CustomerCouponRepository customerCouponRepository, OrderTaskRepository orderTaskRepository) + public PayServiceApi(CustomerRepository customerRepository, PaymentRepository paymentRepository, SenparcHttpClient httpClient) { - this._ShopRepository = ShopRepository; - _GoodsCategoryRepository = goodsCategoryRepository; _CustomerRepository = customerRepository; - _OrderRepository = orderRepository; _PaymentRepository = paymentRepository; - _CouponRepository = couponRepository; _httpClient = httpClient; - _GoodsRepository = goodsRepository; - _GoodsSkuRepository = goodsSkuRepository; - _GoodsServiceApi = goodsServiceApi; - _CartRepository = cartRepository; - _OrderGoodsRepository = orderGoodsRepository; - _OrderCustomerAddressRepository = orderCustomerAddressRepository; - _CustomerAddressRepository = customerAddressRepository; - _CustomerCouponRepository = customerCouponRepository; - _OrderTaskRepository = orderTaskRepository; } #region Api接口代码 @@ -101,27 +52,9 @@ namespace ARW.Service.Api.BusinessService.PaymentManage /// public async Task HandelPrePay(CommitPayDtoApi parm) { - /* 计算核销前价格(商品总额) */ - var goodsPrice = await CalculateBeforePrice(parm); - - /* 计算运费 */ - GoodsFreightDto goodsFreightDto = new() - { - GoodsRequestList = parm.GoodsRequestList, - CustomerAddressGuid = parm.CustomerAddressGuid, - }; - var freight = await _GoodsServiceApi.GetGoodsFreight(goodsFreightDto); - var totalPrice = goodsPrice + freight; - - /* 计算核销前后价格(优惠后价格) */ - var afterPriceRes = await CalculateAfterPrice(parm, totalPrice); - if (parm.TotalAmount != afterPriceRes.DiscountPrice) throw new CustomException("前端传递金额不合法!下单失败!"); - parm.TotalAmount = afterPriceRes.DiscountPrice; - // 获取金额 - //var price = 1;//单位:分 - int price = (int)(afterPriceRes.DiscountPrice * 100);//单位:分 + var price = 1;//单位:分 // 生成订单号 @@ -143,9 +76,9 @@ namespace ARW.Service.Api.BusinessService.PaymentManage /* 添加订单流水 */ - var paymentGuid = await AddPayment(parm, orderNo, totalPrice, afterPriceRes.DiscountPrice); + var paymentGuid = await AddPayment(parm, orderNo, price, price); /* 添加业务订单 */ - var orderGuid = await AddOrder(parm, orderNo, paymentGuid, goodsPrice, afterPriceRes, freight); + //var orderGuid = await AddOrder(parm, orderNo, paymentGuid, goodsPrice, afterPriceRes, freight); #endregion @@ -175,8 +108,6 @@ namespace ARW.Service.Api.BusinessService.PaymentManage /* 修改订单流水 */ var paymentGuid = await UpdatePayment(res); - /* 修改业务订单 */ - await UpdateOrder(res, paymentGuid); } @@ -185,109 +116,6 @@ namespace ARW.Service.Api.BusinessService.PaymentManage #region 添加订单 - /// - /// 计算核销前的价格 - /// - /// - /// - public async Task CalculateBeforePrice(CommitPayDtoApi parm) - { - decimal price = 0; - - foreach (var item in parm.GoodsRequestList) - { - var cart = await _CartRepository.GetFirstAsync(s => s.CartId == item.CartId); - long goodsGuid = 0; - var quantity = 0; - var skuId = 0; - if (cart != null) - { - goodsGuid = cart.GoodsGuid; - quantity = cart.CartGoodsNum; - skuId = cart.GoodsSkuId; - } - else - { - goodsGuid = item.SpuId; - quantity = item.Quantity; - skuId = item.SkuId; - } - var goods = await _GoodsRepository.GetFirstAsync(s => s.GoodsGuid == goodsGuid); - - /* 计算商品总价 */ - // 是否有规格 - if (skuId != 0) - { - var sku = await _GoodsSkuRepository.GetFirstAsync(s => s.GoodsSkuId == skuId); - if (sku != null) - { - price += sku.GoodsSkuPrice * quantity; - } - // 下单立减库存 - if (goods.GoodsDeductStockType == 1) - { - sku.GoodsSkuStockNum -= quantity; - await _GoodsSkuRepository.UpdateAsync(sku); - goods.GoodsTotalInventory -= quantity; - await _GoodsRepository.UpdateAsync(goods); - } - } - else - { - price += goods.GoodsPriceHighest * quantity; - // 下单立减库存 - if (goods.GoodsDeductStockType == 1) - { - goods.GoodsTotalInventory -= quantity; - await _GoodsRepository.UpdateAsync(goods); - } - } - - - } - - return price; - } - - - - /// - /// 计算核后的价格 - /// - /// - /// - public async Task CalculateAfterPrice(CommitPayDtoApi parm, decimal totalPrice) - { - var res = new DiscountRes(); - res.DiscountPrice = totalPrice; - // 优惠券减免价格 - if (parm.CouponList.Count > 0) - { - foreach (var item in parm.CouponList) - { - if (item.Key != 0) - { - var customerCoupon = await _CustomerCouponRepository.GetFirstAsync(s => s.CustomerCouponId == item.Key); - var coupon = await _CouponRepository.GetFirstAsync(s => s.CouponGuid == customerCoupon.CouponGuid); - if (coupon != null) - { - res.CouponGuid = coupon.CouponGuid; - res.CouponMoney = coupon.CouponDeductionMoney; - res.DiscountPrice -= coupon.CouponDeductionMoney; - } - else - { - throw new CustomException($"优惠券Id为 {parm.CouponId} 找不到"); - } - } - } - } - - return res; - } - - - /// /// 添加订单流水 @@ -318,247 +146,6 @@ namespace ARW.Service.Api.BusinessService.PaymentManage } - /// - /// 添加业务订单 - /// - /// 下单信息Dto对象 - /// 订单号 - /// 支付订单流水guid - /// 商品总额 - /// 优惠后的结果 - /// 运费 - /// - /// - public async Task AddOrder(CommitPayDtoApi parm, string orderNo, long paymentGuid, decimal beforeMoney, DiscountRes discountRes, decimal freight) - { - - // 找到店铺的Guids - var sameShopGuids = parm.GoodsRequestList - .OrderByDescending(s => s.JoinCartTime) - .Select(item => item.StoreId) - .Distinct() - .ToList(); - - var res = new List(); - - // 循环每个店铺中的待结算订单商品记录 - foreach (var shopGuid in sameShopGuids) - { - var orderShop = new OrderShopApiVo(); - orderShop.ShopGuid = shopGuid; - orderShop.OrderNo = Common.Common.CreateNoQuery(); - var orderShopGoodsRequestList = new List(); - var CartIdsList = new List(); - - foreach (var item in parm.GoodsRequestList) - { - if (item.StoreId == shopGuid) - { - // 获取当前店铺的订单备注 - if (parm.StoreInfoList.Count > 0) - { - foreach (var item1 in parm.StoreInfoList) - { - if (item1.StoreId == shopGuid) - { - orderShop.ReMark = item1.Remark; - } - } - } - - orderShopGoodsRequestList.Add(item); - // 关联购物车ids - CartIdsList.Add(item.CartId); - } - } - - orderShop.OrderShopGoodsRequestList = orderShopGoodsRequestList; - orderShop.CartIdsList = CartIdsList; - - res.Add(orderShop); - } - - - // 循环整理好的各个店铺的订单 - foreach (var item in res) - { - /* 计算商品总价 */ - var commitPayDtoApi = new CommitPayDtoApi() - { - UserId = parm.UserId, - GoodsRequestList = item.OrderShopGoodsRequestList, - CustomerAddressGuid = parm.CustomerAddressGuid - }; - var goodsTotalMoney = await CalculateBeforePrice(commitPayDtoApi); - - /* 计算运费 */ - GoodsFreightDto goodsFreightDto = new() - { - GoodsRequestList = item.OrderShopGoodsRequestList, - CustomerAddressGuid = parm.CustomerAddressGuid, - }; - freight = await _GoodsServiceApi.GetGoodsFreight(goodsFreightDto); - - Model.Models.Business.OrderManage.Orders.Order order = new() - { - PaymentGuid = paymentGuid, - CustomerGuid = parm.UserId, - OrderNumber = item.OrderNo, - OrderRemark = item.ReMark, - ShopGuid = item.ShopGuid, - CouponGuid = discountRes?.CouponGuid, - CouponMoney = discountRes.CouponMoney, - GoodsTotalAmoun = goodsTotalMoney, - OrderAmount = discountRes.DiscountPrice, - PayType = parm.PayType, - PayStatus = 1, - DeliveryStatus = 1, - ReceiptStatus = 1, - IsComment = 1, - IsSettled = 1, - OrderSource = 1, - OrderStatus = 1, - DeliveryType = 1, - ExpressPrice = freight, - CartIds = string.Join(",", item.CartIdsList) - }; - - - var response = await _OrderRepository.InsertReturnSnowflakeIdAsync(order); - if (response == 0) - throw new CustomException("业务订单数据加入失败"); - - /* 添加订单取消任务 */ - await AddOrderTask(commitPayDtoApi, response); - /* 添加订单商品 */ - await AddOrderGoods(commitPayDtoApi, response); - /* 添加订单用户地址 */ - await AddOrderCustomerAddress(commitPayDtoApi, response); - } - - return 0; - } - - - /// - /// 添加订单取消任务 - /// - /// - /// - /// - public async Task AddOrderTask(CommitPayDtoApi parm, long orderGuid) - { - var order = await _OrderRepository.GetFirstAsync(s => s.OrderGuid == orderGuid); - var orderTask = new OrderTask - { - CustomerGuid = parm.UserId, - OrderGuid = orderGuid, - EndTime = order.Create_time.AddMinutes(30), - PayStatus = 1, - CancelStatus = 1, - }; - var response = await _OrderTaskRepository.InsertReturnSnowflakeIdAsync(orderTask); - if (response == 0) - throw new CustomException("订单用户地址数据加入失败"); - } - - - /// - /// 添加OrderGoods(订单商品副表) - /// - /// - /// - /// - - public async Task AddOrderGoods(CommitPayDtoApi parm, long orderGuid) - { - foreach (var item in parm.GoodsRequestList) - { - decimal singlePrice = 0; - decimal toatlPrice = 0; - var cart = await _CartRepository.GetFirstAsync(s => s.CartId == item.CartId); - - long goodsGuid = 0; - var quantity = 0; - var skuId = 0; - if (cart != null) - { - goodsGuid = cart.GoodsGuid; - quantity = cart.CartGoodsNum; - skuId = cart.GoodsSkuId; - } - else - { - goodsGuid = item.SpuId; - quantity = item.Quantity; - skuId = item.SkuId; - } - - var goods = await _GoodsRepository.GetFirstAsync(s => s.GoodsGuid == goodsGuid); - - - /* 计算商品总价 */ - // 是否有规格 - if (skuId != 0) - { - var sku = await _GoodsSkuRepository.GetFirstAsync(s => s.GoodsSkuId == skuId); - if (sku != null) - { - singlePrice = sku.GoodsSkuPrice; - toatlPrice = sku.GoodsSkuPrice * quantity; - } - } - else - { - singlePrice = goods.GoodsPriceHighest; - toatlPrice = goods.GoodsPriceHighest * quantity; - } - - /* 添加OrderGoods(订单商品副表) */ - OrderGoods orderGoods = new() - { - OrderGuid = orderGuid, - GoodsGuid = goodsGuid, - GoodsSkuId = skuId, - GoodsPrice = singlePrice, - GoodsTotalNum = quantity, - GoodsTotalAmoun = toatlPrice, - }; - var response = await _OrderGoodsRepository.InsertReturnSnowflakeIdAsync(orderGoods); - if (response == 0) - throw new CustomException("订单商品数据加入失败"); - } - } - - - /// - /// 添加订单用户地址 - /// - /// - /// - /// - public async Task AddOrderCustomerAddress(CommitPayDtoApi parm, long orderGuid) - { - var customerAddress = await _CustomerAddressRepository.GetFirstAsync(s => s.CustomerAddressGuid == parm.CustomerAddressGuid); - - OrderCustomerAddress orderCustomerAddress = new() - { - OrderGuid = orderGuid, - CustomerGuid = parm.UserId, - CustomerAddressGuid = customerAddress.CustomerAddressGuid, - ConsigneeName = customerAddress.CustomerAddressName, - Phont = customerAddress.CustomerAddressPhone, - ProvinceId = customerAddress.CustomerAddressProvinceId, - CityId = customerAddress.CustomerAddressCityId, - RegionId = customerAddress.CustomerAddressAreaId, - Detail = customerAddress.CustomerAddressDetailed - }; - var response = await _OrderCustomerAddressRepository.InsertReturnSnowflakeIdAsync(orderCustomerAddress); - if (response == 0) - throw new CustomException("订单用户地址数据加入失败"); - } - - #endregion @@ -586,96 +173,6 @@ namespace ARW.Service.Api.BusinessService.PaymentManage } - /// - /// 修改业务订单 - /// - /// - /// - public async Task UpdateOrder(OrderReturnJson res, long paymentGuid) - { - var orderList = await _OrderRepository.GetListAsync(s => s.PaymentGuid == paymentGuid); - - foreach (var item in orderList) - { - await _OrderRepository.UpdateAsync(f => new Model.Models.Business.OrderManage.Orders.Order - { - TransactionId = res.transaction_id, - PayPrice = ((decimal)res.amount.payer_total) / 100, - PayStatus = 2, - PayTime = DateTime.Now, - Update_time = DateTime.Now, - }, f => f.OrderGuid == item.OrderGuid); - - // 修改订单取消列表 - await _OrderTaskRepository.UpdateAsync(f => new OrderTask - { - PayStatus = 2, - }, f => f.OrderGuid == item.OrderGuid); - - - var order = await _OrderRepository.GetFirstAsync(s => s.OrderNumber == item.OrderNumber); - - - /* 删除购物车中对应的商品 */ - var cartIds = Tools.SpitIntArrary(order.CartIds); - foreach (var cartId in cartIds) - { - await _CartRepository.UpdateAsync(s => new Cart - { - IsDelete = true, - }, s => s.CartId == cartId); - } - - /* 对应优惠券修改为已使用 */ - if (order.CouponGuid != 0) - { - var customer = await _CustomerRepository.GetFirstAsync(s => s.CustomerXcxOpenid == res.payer.openid); - var customerCoupon = await _CustomerCouponRepository.GetFirstAsync(s => s.CouponGuid == order.CouponGuid && s.CustomerGuid == customer.CustomerGuid); - await _CustomerCouponRepository.UpdateAsync(s => new CustomerCoupon - { - CustomerCouponIsUsed = 2, - }, s => s.CustomerCouponId == customerCoupon.CustomerCouponId); - } - - - /* 店铺和商品的销售数量增加 对应库存减少*/ - var orderGoodsList = await _OrderGoodsRepository.GetListAsync(s => s.OrderGuid == order.OrderGuid); - foreach (var orderGood in orderGoodsList) - { - var goods = await _GoodsRepository.GetFirstAsync(s => s.GoodsGuid == orderGood.GoodsGuid); - var shop = await _ShopRepository.GetFirstAsync(s => s.ShopGuid == goods.ShopGuid); - - goods.GoodsSalesActual += orderGood.GoodsTotalNum; - await _GoodsRepository.UpdateAsync(goods); - shop.ShopSalesOrderCount += orderGood.GoodsTotalNum; - await _ShopRepository.UpdateAsync(shop); - - if (goods.GoodsDeductStockType == 2) - { - if (orderGood.GoodsSkuId != 0) - { - var sku = await _GoodsSkuRepository.GetFirstAsync(s => s.GoodsSkuId == orderGood.GoodsSkuId); - sku.GoodsSkuStockNum -= orderGood.GoodsTotalNum; - goods.GoodsTotalInventory -= orderGood.GoodsTotalNum; - await _GoodsSkuRepository.UpdateAsync(sku); - await _GoodsRepository.UpdateAsync(goods); - } - else - { - goods.GoodsTotalInventory -= orderGood.GoodsTotalNum; - await _GoodsRepository.UpdateAsync(goods); - } - } - } - - - /* 积分操作*/ - - } - - - - } #endregion diff --git a/ARW.Service/Api/BusinessService/ShopManager/Shops/ShopServiceApi.cs b/ARW.Service/Api/BusinessService/ShopManager/Shops/ShopServiceApi.cs deleted file mode 100644 index 0d87872..0000000 --- a/ARW.Service/Api/BusinessService/ShopManager/Shops/ShopServiceApi.cs +++ /dev/null @@ -1,173 +0,0 @@ -using Infrastructure.Attribute; -using Microsoft.AspNetCore.Http; -using SqlSugar; -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; -using ARW.Model; -using ARW.Repository; -using ARW.Repository.Business.ShopManager.Shops; -using ARW.Service.Api.IBusinessService.ShopManager.Shops; -using ARW.Model.Dto.Api.ShopManager.Shops; -using ARW.Model.Models.Business.ShopManager.Shops; -using ARW.Model.Vo.Api.ShopManager.Shops; -using ARW.Model.Vo.Business.GoodsManager.GoodsCategorys; -using ARW.Repository.Business.GoodsManager.GoodsCategorys; -using ARW.Repository.Business.Custom.Customers; -using ARW.Model.Models.Business.Custom.Customers; -using ARW.Repository.Business.LogisticsManage.Deliverys; -using ARW.Service.Business.IBusinessService.LogisticsManage.Deliverys; -using ARW.Service.Business.IBusinessService.GoodsManager.Goodss; -using ARW.Model.Models.Business.LogisticsManage.Deliverys; -using ARW.Model.Models.Business.LogisticsManage.DeliveryRules; -using ARW.Service.Business.IBusinessService.GoodsManager.GoodsServicess; -using ARW.Model.Models.Business.GoodsManager.GoodsServicess; - -namespace ARW.Service.Api.BusinessService.ShopManager.Shops -{ - /// - /// 店铺接口实现类Api - /// - /// @author lwh - /// @date 2023-06-12 - /// - [AppService(ServiceType = typeof(IShopServiceApi), ServiceLifetime = LifeTime.Transient)] - public class ShopServiceImplApi : BaseService, IShopServiceApi - { - private readonly ShopRepository _ShopRepository; - private readonly GoodsCategoryRepository _GoodsCategoryRepository; - private readonly CustomerRepository _CustomerRepository; - - - public ShopServiceImplApi(ShopRepository ShopRepository, GoodsCategoryRepository goodsCategoryRepository, CustomerRepository customerRepository) - { - this._ShopRepository = ShopRepository; - _GoodsCategoryRepository = goodsCategoryRepository; - _CustomerRepository = customerRepository; - } - - #region Api接口代码 - - - - /// - /// 获取经营类目列表(一级类目) - /// - /// - /// - public async Task> GetFirstGoodsCategoryList() - { - var query = _GoodsCategoryRepository - .Queryable() - .OrderBy(s => s.Update_time, OrderByType.Desc) - .Select((s) => new GoodsCategoryVoApi - { - ParentGuid = s.GoodsCategoryParentGuid, - Label = s.GoodsCategoryName, - Value = s.GoodsCategoryGuid, - }); - - return await query.ToTreeAsync(it => it.Children, it => it.ParentGuid, 0); - } - - - /// - /// 查询店铺列表(Api) - /// - /// - /// - public async Task> GetShopListApi(ShopQueryDtoApi parm) - { - //开始拼装查询条件d - var predicate = Expressionable.Create(); - - predicate = predicate.AndIF(!string.IsNullOrEmpty(parm.ShopName), it => it.ShopName.Contains(parm.ShopName)); - predicate = predicate.AndIF(parm.ShopAuditStatus != null, it => it.ShopAuditStatus == parm.ShopAuditStatus); - var query = _ShopRepository - .Queryable() - .Where(predicate.ToExpression()) - .OrderBy(s => s.ShopSort, OrderByType.Desc) - .Select(s => new ShopVoApi - { - ShopId = s.ShopId, - ShopGuid = s.ShopGuid, - ShopUserId = s.ShopUserId, - ShopCustomerGuid = s.ShopCustomerGuid, - ShopBusinessCategoryGuid = s.ShopBusinessCategoryGuid, - ShopLogo = s.ShopLogo, - ShopBusinessLicense = s.ShopBusinessLicense, - ShopName = s.ShopName, - ShopIntro = s.ShopIntro, - ShopSort = s.ShopSort, - ShopSalesOrderCount = s.ShopSalesOrderCount, - ShopAuditStatus = s.ShopAuditStatus, - ShopAuditUserGuid = s.ShopAuditUserGuid, - }); - - - return await query.ToPageAsync(parm); - } - - /// - /// 查询店铺详情(Api) - /// - /// - /// - public Task GetShopDetails(ShopDtoApi parm) - { - - var query = _ShopRepository - .Queryable() - .Where(s => s.ShopGuid == parm.ShopGuid) - .Select(s => new ShopApiDetailsVo - { - ShopId = s.ShopId, - ShopGuid = s.ShopGuid, - ShopBusinessCategoryGuid = s.ShopBusinessCategoryGuid, - ShopLogo = s.ShopLogo, - ShopBusinessLicense = s.ShopBusinessLicense, - ShopName = s.ShopName, - ShopIntro = s.ShopIntro, - ShopSalesOrderCount = s.ShopSalesOrderCount, - }).Take(1); - - - return query.ToJsonAsync(); - } - - - /// - /// 添加或修改店铺 - /// - public async Task AddOrUpdateShop(Shop model) - { - if (model.ShopId != 0) - { - var response = await _ShopRepository.UpdateAsync(model); - return "修改成功!"; - } - else - { - // 判断客户类型是否为商户 - var customer = await _CustomerRepository.GetFirstAsync(s => s.CustomerGuid == model.ShopCustomerGuid); - if (customer == null) throw new Exception("找不到该客户"); - if (customer.CustomerType == 2) - { - return "您已经是商户"; - } - - model.ShopAuditStatus = 1; - model.ShopSort = 100; - var response = await _ShopRepository.InsertReturnSnowflakeIdAsync(model); - - return "申请成功!"; - } - } - - - #endregion - - } -} diff --git a/ARW.Service/Api/IBusinessService/Carts/ICartServiceApi.cs b/ARW.Service/Api/IBusinessService/Carts/ICartServiceApi.cs deleted file mode 100644 index 5a466a2..0000000 --- a/ARW.Service/Api/IBusinessService/Carts/ICartServiceApi.cs +++ /dev/null @@ -1,52 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; -using ARW.Model; -using ARW.Model.Dto.Api.Carts; -using ARW.Model.Models.Business.Carts; -using ARW.Model.Vo.Api.Carts; - -namespace ARW.Service.Api.IBusinessService.Carts -{ - /// - /// 购物车记录接口类Api - /// - /// @author lwh - /// @date 2023-07-20 - /// - public interface ICartServiceApi : IBaseService - { - /// - /// 获取购物车记录分页列表(Api) - /// - /// - /// - Task GetCartListApi(CartQueryDtoApi parm); - - /// - /// 修改购物车商品数量 - /// - /// - /// - Task UpdateCartGoodsNum(CartGoodsNumDto parm); - - - /// - /// 修改购物车商品选中状态 - /// - /// - /// - Task UpdateCartGoodsSelect(CartGoodsSelectDto parm); - - - /// - /// 全选购物车商品 - /// - /// - /// - Task SelectAllCartGoods(CartGoodsSelectDto parm); - - } -} diff --git a/ARW.Service/Api/IBusinessService/Custom/CustomerAddresses/ICustomerAddressServiceApi.cs b/ARW.Service/Api/IBusinessService/Custom/CustomerAddresses/ICustomerAddressServiceApi.cs deleted file mode 100644 index 8c606af..0000000 --- a/ARW.Service/Api/IBusinessService/Custom/CustomerAddresses/ICustomerAddressServiceApi.cs +++ /dev/null @@ -1,44 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; -using ARW.Model; -using ARW.Model.Dto.Api.Custom.CustomerAddresses; -using ARW.Model.Models.Business.Custom.CustomerAddresses; -using ARW.Model.Vo.Api.Custom.CustomerAddresses; - -namespace ARW.Service.Api.IBusinessService.Custom.CustomerAddresses -{ - /// - /// 客户收货地址接口类Api - /// - /// @author admin - /// @date 2023-06-09 - /// - public interface ICustomerAddressServiceApi : IBaseService - { - /// - /// 获取客户收货地址分页列表(Api) - /// - /// - /// - Task> GetCustomerAddressListApi(CustomerAddressQueryDtoApi parm); - - /// - /// 获取客户收货地址详情(Api) - /// - /// - /// - Task GetCustomerAddressDetails(CustomerAddressDtoApi parm); - - - /// - /// 添加或修改客户收货地址 - /// - /// - /// - Task AddOrUpdateCustomerAddress(CustomerAddress parm, int IsDefault); - - } -} diff --git a/ARW.Service/Api/IBusinessService/GoodsManager/GoodsCategorys/IGoodsCategoryServiceApi.cs b/ARW.Service/Api/IBusinessService/GoodsManager/GoodsCategorys/IGoodsCategoryServiceApi.cs deleted file mode 100644 index aa51aba..0000000 --- a/ARW.Service/Api/IBusinessService/GoodsManager/GoodsCategorys/IGoodsCategoryServiceApi.cs +++ /dev/null @@ -1,45 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; -using ARW.Model; -using ARW.Model.Dto.Api.GoodsManager.GoodsCategorys; -using ARW.Model.Models.Business.GoodsManager.GoodsCategorys; -using ARW.Model.Vo.Api.GoodsManager.GoodsCategorys; -using ARW.Model.Vo.Api.Home; - -namespace ARW.Service.Api.IBusinessService.GoodsManager.GoodsCategorys -{ - /// - /// 经营类目接口类Api - /// - /// @author lwh - /// @date 2023-07-08 - /// - public interface IGoodsCategoryServiceApi : IBaseService - { - /// - /// 获取经营类目树形列表(Api) - /// - /// - /// - Task> GetGoodsCategoryTreeListApi(GoodsCategoryQueryDtoApi parm); - - - /// - /// 获取店铺类目树形列表(Api) - /// - /// - /// - Task> GetShopGoodsCategoryTreeListApi(GoodsCategoryQueryDtoApi parm); - - - /// - /// 获取首页推荐类目列表(Api) - /// - /// - Task> GetHomeCategoryListApi(); - - } -} diff --git a/ARW.Service/Api/IBusinessService/GoodsManager/GoodsComments/IGoodsCommentServiceApi.cs b/ARW.Service/Api/IBusinessService/GoodsManager/GoodsComments/IGoodsCommentServiceApi.cs deleted file mode 100644 index d07651d..0000000 --- a/ARW.Service/Api/IBusinessService/GoodsManager/GoodsComments/IGoodsCommentServiceApi.cs +++ /dev/null @@ -1,44 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; -using ARW.Model; -using ARW.Model.Dto.Api.GoodsManager.GoodsComments; -using ARW.Model.Models.Business.GoodsManager.GoodsComments; -using ARW.Model.Vo.Api.GoodsManager.GoodsComments; - -namespace ARW.Service.Api.IBusinessService.GoodsManager.GoodsComments -{ - /// - /// 商品评价接口类Api - /// - /// @author admin - /// @date 2023-07-17 - /// - public interface IGoodsCommentServiceApi : IBaseService - { - /// - /// 获取商品评价分页列表(Api) - /// - /// - /// - Task> GetGoodsCommentListApi(GoodsCommentQueryDtoApi parm); - - /// - /// 获取商品评价详情(Api) - /// - /// - /// - Task> GetGoodsDetailsComments(GoodsCommentDtoApi parm); - - - /// - /// 获取商品详情页评论数(Api) - /// - /// - /// - Task GetGoodsDetailsCommentsCount(GoodsCommentDtoApi parm); - - } -} diff --git a/ARW.Service/Api/IBusinessService/GoodsManager/Goodss/IGoodsServiceApi.cs b/ARW.Service/Api/IBusinessService/GoodsManager/Goodss/IGoodsServiceApi.cs deleted file mode 100644 index ff84407..0000000 --- a/ARW.Service/Api/IBusinessService/GoodsManager/Goodss/IGoodsServiceApi.cs +++ /dev/null @@ -1,53 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; -using ARW.Model; -using ARW.Model.Dto.Api.GoodsManager.Goodss; -using ARW.Model.Models.Business.GoodsManager.Goodss; -using ARW.Model.Vo.Api.GoodsManager.Goodss; - -namespace ARW.Service.Api.IBusinessService.GoodsManager.Goodss -{ - /// - /// 商品接口类Api - /// - /// @author lwh - /// @date 2023-07-09 - /// - public interface IGoodsServiceApi : IBaseService - { - /// - /// 获取商品分页列表(Api) - /// - /// - /// - Task> GetGoodsListApi(GoodsQueryDtoApi parm); - - - /// - /// 获取商品列表(Api) - /// - /// - /// - Task> GetGoodsApi(GoodsQueryDtoApi parm); - - - /// - /// 获取商品运费(Api) - /// - /// - /// - Task GetGoodsFreight(GoodsFreightDto parm); - - - /// - /// 获取商品详情(Api) - /// - /// - /// - Task GetGoodsDetails(GoodsDtoApi parm,long userId); - - } -} diff --git a/ARW.Service/Api/IBusinessService/GoodsManager/ShopGoodsCategorys/IShopGoodsCategoryServiceApi.cs b/ARW.Service/Api/IBusinessService/GoodsManager/ShopGoodsCategorys/IShopGoodsCategoryServiceApi.cs deleted file mode 100644 index e60eaab..0000000 --- a/ARW.Service/Api/IBusinessService/GoodsManager/ShopGoodsCategorys/IShopGoodsCategoryServiceApi.cs +++ /dev/null @@ -1,30 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; -using ARW.Model; -using ARW.Model.Dto.Api.GoodsManager.ShopGoodsCategorys; -using ARW.Model.Models.Business.GoodsManager.ShopGoodsCategorys; -using ARW.Model.Vo.Api.GoodsManager.ShopGoodsCategorys; - -namespace ARW.Service.Api.IBusinessService.GoodsManager.ShopGoodsCategorys -{ - /// - /// 店铺商品类目接口类Api - /// - /// @author lwh - /// @date 2023-07-20 - /// - public interface IShopGoodsCategoryServiceApi : IBaseService - { - /// - /// 获取店铺商品类目树形列表(Api) - /// - /// - /// - Task> GetShopGoodsCategoryTreeListApi(ShopGoodsCategoryQueryDtoApi parm); - - - } -} diff --git a/ARW.Service/Api/IBusinessService/Marketing/CouponManage/Coupons/ICouponServiceApi.cs b/ARW.Service/Api/IBusinessService/Marketing/CouponManage/Coupons/ICouponServiceApi.cs deleted file mode 100644 index b96585d..0000000 --- a/ARW.Service/Api/IBusinessService/Marketing/CouponManage/Coupons/ICouponServiceApi.cs +++ /dev/null @@ -1,37 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; -using ARW.Model; -using ARW.Model.Dto.Api.Marketing.CouponManage.Coupons; -using ARW.Model.Models.Business.Marketing.CouponManage.Coupons; -using ARW.Model.Vo.Api.Marketing.CouponManage.Coupons; -using ARW.Model.Vo.Api.Marketing.CouponManage.CustomerCoupons; - -namespace ARW.Service.Api.IBusinessService.Marketing.CouponManage.Coupons -{ - /// - /// 优惠券接口类Api - /// - /// @author lwh - /// @date 2023-08-01 - /// - public interface ICouponServiceApi : IBaseService - { - /// - /// 获取优惠券分页列表(Api) - /// - /// - /// - Task> GetCouponListApi(CouponQueryDtoApi parm); - - /// - /// 获取优惠券详情(Api) - /// - /// - /// - Task GetCouponDetails(CouponDtoApi parm); - - } -} diff --git a/ARW.Service/Api/IBusinessService/Marketing/CouponManage/CustomerCoupons/ICustomerCouponServiceApi.cs b/ARW.Service/Api/IBusinessService/Marketing/CouponManage/CustomerCoupons/ICustomerCouponServiceApi.cs deleted file mode 100644 index b7ff98b..0000000 --- a/ARW.Service/Api/IBusinessService/Marketing/CouponManage/CustomerCoupons/ICustomerCouponServiceApi.cs +++ /dev/null @@ -1,46 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; -using ARW.Model; -using ARW.Model.Dto.Api.Marketing.CouponManage.CustomerCoupons; -using ARW.Model.Dto.Business.Marketing.CouponManage.CustomerCoupons; -using ARW.Model.Models.Business.Marketing.CouponManage.CustomerCoupons; -using ARW.Model.Vo.Api.Marketing.CouponManage.CustomerCoupons; - -namespace ARW.Service.Api.IBusinessService.Marketing.CouponManage.CustomerCoupons -{ - /// - /// 领券记录接口类Api - /// - /// @author lwh - /// @date 2023-07-31 - /// - public interface ICustomerCouponServiceApi : IBaseService - { - /// - /// 获取领券记录分页列表(Api) - /// - /// - /// - Task> GetCustomerCouponListApi(CustomerCouponQueryDtoApi parm); - - - /// - /// 领取优惠券 - /// - /// - /// - Task AddCustomerCoupon(CustomerCoupon parm); - - - /// - /// 获取领券记录详情(Api) - /// - /// - /// - Task GetCustomerCouponDetails(CustomerCouponDtoApi parm); - - } -} diff --git a/ARW.Service/Api/IBusinessService/OrderManage/OrderRefunds/IOrderRefundServiceApi.cs b/ARW.Service/Api/IBusinessService/OrderManage/OrderRefunds/IOrderRefundServiceApi.cs deleted file mode 100644 index 557a560..0000000 --- a/ARW.Service/Api/IBusinessService/OrderManage/OrderRefunds/IOrderRefundServiceApi.cs +++ /dev/null @@ -1,64 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; -using ARW.Model; -using ARW.Model.Dto.Api.OrderManage.OrderRefunds; -using ARW.Model.Models.Business.OrderManage.OrderRefunds; -using ARW.Model.Vo.Api.OrderManage.OrderRefunds; - -namespace ARW.Service.Api.IBusinessService.OrderManage.OrderRefunds -{ - /// - /// 售后单记录表接口类Api - /// - /// @author lwh - /// @date 2023-10-16 - /// - public interface IOrderRefundServiceApi : IBaseService - { - /// - /// 获取售后单记录表分页列表(Api) - /// - /// - /// - Task> GetOrderRefundListApi(OrderRefundQueryDtoApi parm); - - - /// - /// 获取售后单记录表详情(Api) - /// - /// - /// - Task GetOrderRefundDetails(OrderRefundDtoApi parm); - - - /// - /// 添加售后单记录表 - /// - /// - /// - Task AddOrderRefund(OrderRefund parm); - - - /// - /// 撤销申请 - /// - /// - /// - Task RepealOrderRefund(AddOrderRefundApiDto parm); - - - - /// - /// 买家发货(填写运单号) - /// - /// - /// - Task BuyerDelivery(BuyerDeliveryApiDto parm); - - - - } -} diff --git a/ARW.Service/Api/IBusinessService/OrderManage/Orders/IOrderServiceApi.cs b/ARW.Service/Api/IBusinessService/OrderManage/Orders/IOrderServiceApi.cs deleted file mode 100644 index 3d84e41..0000000 --- a/ARW.Service/Api/IBusinessService/OrderManage/Orders/IOrderServiceApi.cs +++ /dev/null @@ -1,86 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; -using ARW.Model; -using ARW.Model.Dto.Api.OrderManage.Orders; -using ARW.Model.Models.Business.GoodsManager.GoodsComments; -using ARW.Model.Models.Business.OrderManage.Orders; -using ARW.Model.Vo.Api.OrderManage.Orders; - -namespace ARW.Service.Api.IBusinessService.OrderManage.Orders -{ - /// - /// 订单接口类Api - /// - /// @author lwh - /// @date 2023-09-01 - /// - public interface IOrderServiceApi : IBaseService - { - /// - /// 获取订单分页列表(Api) - /// - /// - /// - Task> GetOrderListApi(OrderQueryDtoApi parm); - - - /// - /// 获取售后订单商品列表 - /// - /// - /// - Task> GetOrderRefundGoodsList(OrderDtoApi parm); - - /// - /// 获取订单详情(Api) - /// - /// - /// - Task GetOrderDetails(OrderDtoApi parm); - - - /// - /// 待付款取消订单 - /// - /// - /// - Task WaitPayCancelOrder(OrderDtoApi parm); - - - /// - /// 已付款取消订单 - /// - /// - /// - Task PayCancelOrder(OrderDtoApi parm); - - - /// - /// 确认收货 - /// - /// - /// - Task ConfirmReceipt(OrderDtoApi parm); - - - /// - /// 评价 - /// - /// - /// - Task AddComment(GoodsComment parm); - - - /// - /// 获取订单商品规格 - /// - /// - /// - Task> GetGoodsSpecList(int? skuId); - - - } -} diff --git a/ARW.Service/Api/IBusinessService/PayManage/IPayServiceApi.cs b/ARW.Service/Api/IBusinessService/PayManage/IPayServiceApi.cs index f97572c..ae9d095 100644 --- a/ARW.Service/Api/IBusinessService/PayManage/IPayServiceApi.cs +++ b/ARW.Service/Api/IBusinessService/PayManage/IPayServiceApi.cs @@ -1,5 +1,4 @@ using System.Threading.Tasks; -using ARW.Model.Dto.Api.Carts; using ARW.Model.Dto.Api.Pay; using ARW.Model.Models.Business.Payments; using Senparc.Weixin.TenPayV3.Apis.BasePay; diff --git a/ARW.Service/Api/IBusinessService/ShopManager/Shops/IShopServiceApi.cs b/ARW.Service/Api/IBusinessService/ShopManager/Shops/IShopServiceApi.cs deleted file mode 100644 index 0b652df..0000000 --- a/ARW.Service/Api/IBusinessService/ShopManager/Shops/IShopServiceApi.cs +++ /dev/null @@ -1,52 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; -using ARW.Model; -using ARW.Model.Dto.Api.ShopManager.Shops; -using ARW.Model.Models.Business.ShopManager.Shops; -using ARW.Model.Vo.Api.ShopManager.Shops; -using ARW.Model.Vo.Business.GoodsManager.GoodsCategorys; - -namespace ARW.Service.Api.IBusinessService.ShopManager.Shops -{ - /// - /// 店铺接口类Api - /// - /// @author lwh - /// @date 2023-06-12 - /// - public interface IShopServiceApi : IBaseService - { - /// - /// 获取经营类目列表(一级类目) - /// - /// - Task> GetFirstGoodsCategoryList(); - - /// - /// 获取店铺分页列表(Api) - /// - /// - /// - Task> GetShopListApi(ShopQueryDtoApi parm); - - /// - /// 获取店铺详情(Api) - /// - /// - /// - Task GetShopDetails(ShopDtoApi parm); - - - /// - /// 添加或修改店铺 - /// - /// - /// - Task AddOrUpdateShop(Shop parm); - - - } -} diff --git a/ARW.Service/Business/BusinessService/Carts/CartService.cs b/ARW.Service/Business/BusinessService/Carts/CartService.cs deleted file mode 100644 index 8aec35d..0000000 --- a/ARW.Service/Business/BusinessService/Carts/CartService.cs +++ /dev/null @@ -1,105 +0,0 @@ -using Infrastructure.Attribute; -using Microsoft.AspNetCore.Http; -using SqlSugar; -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; -using Infrastructure; -using ARW.Model; -using ARW.Repository; -using ARW.Repository.Business.Carts; -using ARW.Service.Business.IBusinessService.Carts; -using ARW.Model.Dto.Business.Carts; -using ARW.Model.Models.Business.Carts; -using ARW.Model.Vo.Business.Carts; -using ARW.Model.Dto.Api.Carts; - -namespace ARW.Service.Business.BusinessService.Carts -{ - /// - /// 购物车记录接口实现类 - /// - /// @author lwh - /// @date 2023-07-20 - /// - [AppService(ServiceType = typeof(ICartService), ServiceLifetime = LifeTime.Transient)] - public class CartServiceImpl : BaseService, ICartService - { - private readonly CartRepository _CartRepository; - - public CartServiceImpl(CartRepository CartRepository) - { - this._CartRepository = CartRepository; - } - - #region 业务逻辑代码 - - - /// - /// 查询购物车记录分页列表 - /// - public async Task> GetCartList(CartQueryDto parm) - { - //开始拼装查询条件d - var predicate = Expressionable.Create(); - - predicate = predicate.AndIF(parm.CustomerGuid != null, s => s.CustomerGuid == parm.CustomerGuid); - predicate = predicate.AndIF(parm.ShopGuid != null, s => s.ShopGuid == parm.ShopGuid); - var query = _CartRepository - .Queryable() - .Where(predicate.ToExpression()) - .OrderBy(s => s.Create_time, OrderByType.Desc) - .Select(s => new CartVo - { - CartId = s.CartId, - CartGuid = s.CartGuid, - CustomerGuid = s.CustomerGuid, - ShopGuid = s.ShopGuid, - //GoodsGud = s.GoodsGud, - GoodsSkuId = s.GoodsSkuId, - CartGoodsNum = s.CartGoodsNum, - }); - - - return await query.ToPageAsync(parm); - } - - /// - /// 添加或修改购物车记录 - /// - public async Task AddOrUpdateCart(Cart model) - { - if (model.CartId != 0) - { - var response = await _CartRepository.UpdateAsync(model); - return "修改成功!"; - } - else - { - var cart = await _CartRepository.GetFirstAsync(s => s.CustomerGuid == model.CustomerGuid && s.GoodsGuid == model.GoodsGuid && s.GoodsSkuId == model.GoodsSkuId && s.IsDelete == false); - if (cart != null) - { - cart.CartGoodsNum += model.CartGoodsNum; - var response = await _CartRepository.UpdateAsync(cart); - } - else - { - var response = await _CartRepository.InsertReturnSnowflakeIdAsync(model); - } - return "添加成功!"; - } - } - - #region Excel处理 - - - #endregion - - - - #endregion - - } -} diff --git a/ARW.Service/Business/BusinessService/Custom/CustomerAddresses/CustomerAddressService.cs b/ARW.Service/Business/BusinessService/Custom/CustomerAddresses/CustomerAddressService.cs deleted file mode 100644 index 4f1e7cf..0000000 --- a/ARW.Service/Business/BusinessService/Custom/CustomerAddresses/CustomerAddressService.cs +++ /dev/null @@ -1,116 +0,0 @@ -using Infrastructure.Attribute; -using Microsoft.AspNetCore.Http; -using SqlSugar; -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; -using Infrastructure; -using ARW.Model; -using ARW.Repository; -using ARW.Repository.Business.Custom.CustomerAddresses; -using ARW.Service.Business.IBusinessService.Custom.CustomerAddresses; -using ARW.Model.Dto.Business.Custom.CustomerAddresses; -using ARW.Model.Vo.Business.Custom.CustomerAddresses; -using ARW.Model.Models.Business.Custom.CustomerAddresses; -using ARW.Model.Models.Business.Custom.Regions; -using ARW.Model.Models.Business.Custom.Customers; -using ARW.Repository.Business.Custom.Customers; - -namespace ARW.Service.Business.BusinessService.Custom.CustomerAddresses -{ - /// - /// 客户收货地址接口实现类 - /// - /// @author admin - /// @date 2023-06-05 - /// - [AppService(ServiceType = typeof(ICustomerAddressService), ServiceLifetime = LifeTime.Transient)] - public class CustomerAddressServiceImpl : BaseService, ICustomerAddressService - { - private readonly CustomerAddressRepository _CustomerAddressRepository; - private readonly CustomerRepository _CustomerRepository; - - public CustomerAddressServiceImpl(CustomerAddressRepository CustomerAddressRepository, CustomerRepository customerRepository) - { - this._CustomerAddressRepository = CustomerAddressRepository; - _CustomerRepository = customerRepository; - } - - #region 业务逻辑代码 - - - /// - /// 查询客户收货地址分页列表 - /// - public async Task> GetCustomerAddressList(CustomerAddressQueryDto parm) - { - //开始拼装查询条件d - var predicate = Expressionable.Create(); - - predicate = predicate.AndIF(!string.IsNullOrEmpty(parm.CustomerAddressName), s => s.CustomerAddressName.Contains(parm.CustomerAddressName)); - predicate = predicate.AndIF(!string.IsNullOrEmpty(parm.CustomerAddressPhone), s => s.CustomerAddressPhone.Contains(parm.CustomerAddressPhone)); - var query = _CustomerAddressRepository - .Queryable() - .LeftJoin((s, c) => s.CustomerAddressCustomerGuid == c.CustomerGuid) - .LeftJoin((s, c, d) => s.CustomerAddressProvinceId == d.RegionId) - .LeftJoin((s, c, d, f) => s.CustomerAddressCityId == f.RegionId) - .LeftJoin((s, c, d, f, g) => s.CustomerAddressAreaId == g.RegionId) - .Where(predicate.ToExpression()) - .OrderBy(s => s.Create_time, OrderByType.Desc) - .Select((s, c, d, f, g) => new CustomerAddressVo - { - CustomerName = c.CustomerNickname, - CustomerAddress = d.RegionName + "/" + f.RegionName + "/" + g.RegionName, - CustomerAddressId = s.CustomerAddressId, - CustomerAddressGuid = s.CustomerAddressGuid, - CustomerAddressCustomerGuid = s.CustomerAddressCustomerGuid, - CustomerAddressProvinceId = s.CustomerAddressProvinceId, - CustomerAddressCityId = s.CustomerAddressCityId, - CustomerAddressAreaId = s.CustomerAddressAreaId, - CustomerAddressName = s.CustomerAddressName, - CustomerAddressPhone = s.CustomerAddressPhone, - CustomerAddressDetailed = s.CustomerAddressDetailed, - }); - - - return await query.ToPageAsync(parm); - } - - /// - /// 添加或修改客户收货地址 - /// - public async Task AddOrUpdateCustomerAddress(CustomerAddress model) - { - if (model.CustomerAddressId != 0) - { - var response = await _CustomerAddressRepository.UpdateAsync(model); - return "修改成功!"; - } - else - { - var response = await _CustomerAddressRepository.InsertReturnSnowflakeIdAsync(model); - return "添加成功!"; - } - } - - #region Excel处理 - - - /// - /// Excel数据导出处理 - /// - public async Task> HandleExportData(List data) - { - return data; - } - - #endregion - - - - #endregion - - } -} diff --git a/ARW.Service/Business/BusinessService/GoodsManager/GoodsCategorys/GoodsCategoryService.cs b/ARW.Service/Business/BusinessService/GoodsManager/GoodsCategorys/GoodsCategoryService.cs deleted file mode 100644 index 3461d89..0000000 --- a/ARW.Service/Business/BusinessService/GoodsManager/GoodsCategorys/GoodsCategoryService.cs +++ /dev/null @@ -1,153 +0,0 @@ -using Infrastructure.Attribute; -using Microsoft.AspNetCore.Http; -using SqlSugar; -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; -using Infrastructure; -using ARW.Model; -using ARW.Repository; -using ARW.Repository.Business.GoodsManager.GoodsCategorys; -using ARW.Service.Business.IBusinessService.GoodsManager.GoodsCategorys; -using ARW.Model.Dto.Business.GoodsManager.GoodsCategorys; -using ARW.Model.Models.Business.GoodsManager.GoodsCategorys; -using ARW.Model.Vo.Business.GoodsManager.GoodsCategorys; - -namespace ARW.Service.Business.BusinessService.GoodsManager.GoodsCategorys -{ - /// - /// 商品类目接口实现类 - /// - /// @author lwh - /// @date 2023-06-12 - /// - [AppService(ServiceType = typeof(IGoodsCategoryService), ServiceLifetime = LifeTime.Transient)] - public class GoodsCategoryServiceImpl : BaseService, IGoodsCategoryService - { - private readonly GoodsCategoryRepository _GoodsCategoryRepository; - - public GoodsCategoryServiceImpl(GoodsCategoryRepository GoodsCategoryRepository) - { - this._GoodsCategoryRepository = GoodsCategoryRepository; - } - - #region 业务逻辑代码 - - - /// - /// 查询商品类目树形列表 - /// - public async Task> GetGoodsCategoryTreeList(GoodsCategoryQueryDto parm) - { - //开始拼装查询条件 - var predicate = Expressionable.Create(); - - predicate = predicate.AndIF(parm.GoodsCategoryDisplayStatus != null, s => s.GoodsCategoryDisplayStatus == parm.GoodsCategoryDisplayStatus); - predicate = predicate.AndIF(parm.GoodsCategoryIsPopular != null, s => s.GoodsCategoryIsPopular == parm.GoodsCategoryIsPopular); - var query = _GoodsCategoryRepository - .Queryable() - .LeftJoin((s, c) => s.GoodsCategoryParentGuid == c.GoodsCategoryGuid) - .Where(predicate.ToExpression()) - .OrderBy(s => s.ProductCategorySort, OrderByType.Asc) - .Select((s, c) => new GoodsCategoryVo - { - GoodsCategoryId = s.GoodsCategoryId, - GoodsCategoryGuid = s.GoodsCategoryGuid, - GoodsCategoryParentGuid = s.GoodsCategoryParentGuid, - GoodsCategoryAncestralGuid = s.GoodsCategoryAncestralGuid, - GoodsCategoryName = s.GoodsCategoryName, - GoodsCategoryImg = s.GoodsCategoryImg, - GoodsCategoryDisplayStatus = s.GoodsCategoryDisplayStatus, - GoodsCategoryIsPopular = s.GoodsCategoryIsPopular, - ProductCategorySort = s.ProductCategorySort, - ParentName = c.GoodsCategoryName, - }); - - return await query.ToTreeAsync(it => it.Children, it => it.GoodsCategoryParentGuid, 0); - } - - - /// - /// 查询商品类目列表 - /// - public Task> GetGoodsCategoryList(GoodsCategoryQueryDto parm) - { - //开始拼装查询条件d - var predicate = Expressionable.Create(); - - predicate = predicate.AndIF(!string.IsNullOrEmpty(parm.GoodsCategoryName), it => it.GoodsCategoryName.Contains(parm.GoodsCategoryName)); - predicate = predicate.AndIF(parm.GoodsCategoryDisplayStatus != null, it => it.GoodsCategoryDisplayStatus == parm.GoodsCategoryDisplayStatus); - predicate = predicate.AndIF(parm.GoodsCategoryIsPopular != null, it => it.GoodsCategoryIsPopular == parm.GoodsCategoryIsPopular); - var query = _GoodsCategoryRepository - .Queryable() - .Where(predicate.ToExpression()) - .OrderBy(s => s.ProductCategorySort, OrderByType.Asc) - .Select(s => new GoodsCategoryVo - { - GoodsCategoryId = s.GoodsCategoryId, - GoodsCategoryGuid = s.GoodsCategoryGuid, - GoodsCategoryParentGuid = s.GoodsCategoryParentGuid, - GoodsCategoryAncestralGuid = s.GoodsCategoryAncestralGuid, - GoodsCategoryName = s.GoodsCategoryName, - GoodsCategoryImg = s.GoodsCategoryImg, - GoodsCategoryDisplayStatus = s.GoodsCategoryDisplayStatus, - GoodsCategoryIsPopular = s.GoodsCategoryIsPopular, - ProductCategorySort = s.ProductCategorySort, - }); - - - return query.ToListAsync(); - } - - /// - /// 添加或修改商品类目 - /// - public async Task AddOrUpdateGoodsCategory(GoodsCategory model) - { - if (model.GoodsCategoryId != 0) - { - var type = await _GoodsCategoryRepository.GetListAsync(s => s.GoodsCategoryParentGuid == model.GoodsCategoryGuid); - if (type != null) - { - foreach (var item in type) - { - if (model.GoodsCategoryParentGuid == item.GoodsCategoryGuid) throw new CustomException("上级菜单不能选择自己的子级!"); - } - } - if (model.GoodsCategoryParentGuid == model.GoodsCategoryGuid) throw new CustomException("上级菜单不能选择与当前菜单一样的!"); - var response = await _GoodsCategoryRepository.UpdateAsync(model); - return "修改成功!"; - } - else - { - //if (model.GoodsCategoryParentGuid != 0) throw new CustomException("不允许添加三级类目!"); - var info = _GoodsCategoryRepository.GetFirst(it => it.GoodsCategoryGuid == model.GoodsCategoryParentGuid); - model.GoodsCategoryAncestralGuid = "0"; - if (info != null) model.GoodsCategoryAncestralGuid = info.GoodsCategoryAncestralGuid + "," + model.GoodsCategoryParentGuid; - - var response = await _GoodsCategoryRepository.InsertReturnSnowflakeIdAsync(model); - return "添加成功!"; - } - } - - #region Excel处理 - - - /// - /// Excel数据导出处理 - /// - public async Task> HandleExportData(List data) - { - return data; - } - - #endregion - - - - #endregion - - } -} diff --git a/ARW.Service/Business/BusinessService/GoodsManager/GoodsComments/GoodsCommentService.cs b/ARW.Service/Business/BusinessService/GoodsManager/GoodsComments/GoodsCommentService.cs deleted file mode 100644 index 3e45cf2..0000000 --- a/ARW.Service/Business/BusinessService/GoodsManager/GoodsComments/GoodsCommentService.cs +++ /dev/null @@ -1,144 +0,0 @@ -using Infrastructure.Attribute; -using Microsoft.AspNetCore.Http; -using SqlSugar; -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; -using Infrastructure; -using ARW.Model; -using ARW.Repository; -using ARW.Repository.Business.GoodsManager.GoodsComments; -using ARW.Service.Business.IBusinessService.GoodsManager.GoodsComments; -using ARW.Model.Dto.Business.GoodsManager.GoodsComments; -using ARW.Model.Models.Business.GoodsManager.GoodsComments; -using ARW.Model.Vo.Business.GoodsManager.GoodsComments; -using ARW.Model.Models.Business.ShopManager.Shops; -using ARW.Model.Models.Business.GoodsManager.Goodss; -using ARW.Model.Models.Business.Custom.Customers; - -namespace ARW.Service.Business.BusinessService.GoodsManager.GoodsComments -{ - /// - /// 商品评价接口实现类 - /// - /// @author admin - /// @date 2023-07-15 - /// - [AppService(ServiceType = typeof(IGoodsCommentService), ServiceLifetime = LifeTime.Transient)] - public class GoodsCommentServiceImpl : BaseService, IGoodsCommentService - { - private readonly GoodsCommentRepository _GoodsCommentRepository; - - public GoodsCommentServiceImpl(GoodsCommentRepository GoodsCommentRepository) - { - this._GoodsCommentRepository = GoodsCommentRepository; - } - - #region 业务逻辑代码 - - - /// - /// 查询商品评价分页列表 - /// - public async Task> GetGoodsCommentList(GoodsCommentQueryDto parm) - { - //开始拼装查询条件d - var predicate = Expressionable.Create(); - - predicate = predicate.AndIF(parm.ShopGuid != null, s => s.ShopGuid == parm.ShopGuid); - predicate = predicate.AndIF(parm.GoodsCommentRecoverStatus != null, s => s.GoodsCommentRecoverStatus == parm.GoodsCommentRecoverStatus); - predicate = predicate.AndIF(parm.GoodsCommentRatingType != null, s => s.GoodsCommentRatingType == parm.GoodsCommentRatingType); - predicate = predicate.AndIF(parm.GoodsCommentStatus != null, s => s.GoodsCommentStatus == parm.GoodsCommentStatus); - var query = _GoodsCommentRepository - .Queryable() - .LeftJoin((s, c) => s.ShopGuid == c.ShopGuid) - .LeftJoin((s, c, d) => s.GoodsGuid == d.GoodsGuid) - .LeftJoin((s, c, d, f) => s.CustomerGuid == f.CustomerGuid) - .WhereIF(!string.IsNullOrEmpty(parm.ShopName), (s, c, d, f) => c.ShopName.Contains(parm.ShopName)) - .WhereIF(!string.IsNullOrEmpty(parm.GoodsName), (s, c, d, f) => d.GoodsName.Contains(parm.GoodsName)) - .Where(predicate.ToExpression()) - .OrderBy(s => s.GoodsCommentSort, OrderByType.Asc) - .Select((s, c, d, f) => new GoodsCommentVo - { - GoodsCommentId = s.GoodsCommentId, - GoodsCommentGuid = s.GoodsCommentGuid, - ShopGuid = s.ShopGuid, - ShopName = c.ShopName, - CustomerGuid = s.CustomerGuid, - CustomerNickname = f.CustomerNickname, - OrderGuid = s.OrderGuid, - GoodsGuid = s.GoodsGuid, - GoodsName = d.GoodsName, - GoodsPicture = d.GoodsPicture, - OrderGoodsGuid = s.OrderGoodsGuid, - GoodsCommentRating = s.GoodsCommentRating, - GoodsCommentRatingType = s.GoodsCommentRatingType, - GoodsCommentContent = s.GoodsCommentContent, - GoodsCommentImages = s.GoodsCommentImages, - GoodsCommentRecoverStatus = s.GoodsCommentRecoverStatus, - GoodsCommentRecoverContent = s.GoodsCommentRecoverContent, - GoodsCommentStatus = s.GoodsCommentStatus, - GoodsCommentSort = s.GoodsCommentSort, - }); - - - return await query.ToPageAsync(parm); - } - - /// - /// 添加或修改商品评价 - /// - public async Task AddOrUpdateGoodsComment(GoodsComment model) - { - if (model.GoodsCommentRating < 3) - { - model.GoodsCommentRatingType = 3; - } - if (model.GoodsCommentRating < 3.5 && model.GoodsCommentRating >= 2.5) - { - model.GoodsCommentRatingType = 2; - } - if (model.GoodsCommentRating >= 3.5) - { - model.GoodsCommentRatingType = 1; - } - - if (model.GoodsCommentId != 0) - { - var response = await _GoodsCommentRepository.UpdateAsync(model); - return "修改成功!"; - } - else - { - model.GoodsCommentRecoverStatus = 1; - var response = await _GoodsCommentRepository.InsertReturnSnowflakeIdAsync(model); - return "添加成功!"; - } - } - - #region Excel处理 - - - #endregion - - - /// - /// 回复 - /// - public async Task Recover(GoodsCommentRecoverDto parm) - { - var response = await _GoodsCommentRepository.UpdateAsync(f => new GoodsComment - { - GoodsCommentRecoverContent = parm.GoodsCommentRecoverContent, - GoodsCommentRecoverStatus = 2 - }, s => s.GoodsCommentId == parm.GoodsCommentId); - if (response) return "回复成功"; - else return "回复失败"; - } - - #endregion - - } -} diff --git a/ARW.Service/Business/BusinessService/GoodsManager/GoodsServicess/GoodsServicesRels/GoodsServicesRelService.cs b/ARW.Service/Business/BusinessService/GoodsManager/GoodsServicess/GoodsServicesRels/GoodsServicesRelService.cs deleted file mode 100644 index 812e41c..0000000 --- a/ARW.Service/Business/BusinessService/GoodsManager/GoodsServicess/GoodsServicesRels/GoodsServicesRelService.cs +++ /dev/null @@ -1,104 +0,0 @@ -using Infrastructure.Attribute; -using Microsoft.AspNetCore.Http; -using SqlSugar; -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; -using Infrastructure; -using ARW.Model; -using ARW.Repository; -using ARW.Model.Dto.Business.GoodsManager.GoodsServicess.GoodsServicesRels; -using ARW.Model.Models.Business.GoodsManager.GoodsServicess.GoodsServicesRels; -using ARW.Model.Vo.Business.GoodsManager.GoodsServicess.GoodsServicesRels; -using ARW.Repository.Business.GoodsManager.GoodsServicess.GoodsServicesRels; -using ARW.Service.Business.IBusinessService.GoodsManager.GoodsServicess.GoodsServicesRels; -using ARW.Model.Models.Business.LogisticsManage.DeliveryRules; -using ARW.Repository.Business.LogisticsManage.DeliveryRules; - -namespace ARW.Service.Business.BusinessService.GoodsManager.GoodsServicess.GoodsServicesRels -{ - /// - /// 商品服务与承诺关系表接口实现类 - /// - /// @author lwh - /// @date 2023-06-18 - /// - [AppService(ServiceType = typeof(IGoodsServicesRelService), ServiceLifetime = LifeTime.Transient)] - public class GoodsServicesRelServiceImpl : BaseService, IGoodsServicesRelService - { - private readonly GoodsServicesRelRepository _GoodsServicesRelRepository; - - public GoodsServicesRelServiceImpl(GoodsServicesRelRepository GoodsServicesRelRepository) - { - _GoodsServicesRelRepository = GoodsServicesRelRepository; - } - - #region 业务逻辑代码 - - - /// - /// 查询商品服务与承诺关系表分页列表 - /// - public async Task> GetGoodsServicesRelList(GoodsServicesRelQueryDto parm) - { - //开始拼装查询条件d - var predicate = Expressionable.Create(); - - var query = _GoodsServicesRelRepository - .Queryable() - .Where(predicate.ToExpression()) - .OrderBy(s => s.Id, OrderByType.Desc) - .Select(s => new GoodsServicesRelVo - { - Id = s.Id, - ShopGuid = s.ShopGuid, - GoodsGuid = s.GoodsGuid, - ServiceId = s.ServiceId, - }); - - - return await query.ToPageAsync(parm); - } - - /// - /// 获取当前商品的服务与承诺Id - /// - /// - /// - public async Task> GetCurrentGoodsServicesRel(GoodsServicesRelQueryDto parm) - { - var idList = new List(); - var goodsServiceList = await _GoodsServicesRelRepository.GetListAsync(s => s.GoodsGuid == parm.GoodsGuid); - if (goodsServiceList.Count > 0) idList = goodsServiceList.Select(s => s.ServiceId).ToList(); - return idList; - } - - /// - /// 新增商品服务与承诺关系 - /// - /// 商品服务与承诺关系列表 - public async Task InsertGoodsServicesRelAsync(List goodsServicesRelList) - { - await _GoodsServicesRelRepository.InsertRangeAsync(goodsServicesRelList); - } - - - /// - /// 更新商品服务与承诺关系 - /// - /// 商品服务与承诺关系列表 - /// 商品guid - /// - public async Task UpdateGoodsServicesRelAsync(List goodsServicesRelList, long goodsGuid) - { - await _GoodsServicesRelRepository.DeleteAsync(s => s.GoodsGuid == goodsGuid); - await _GoodsServicesRelRepository.InsertRangeAsync(goodsServicesRelList); - } - - - #endregion - - } -} diff --git a/ARW.Service/Business/BusinessService/GoodsManager/GoodsServicess/GoodsServicesService.cs b/ARW.Service/Business/BusinessService/GoodsManager/GoodsServicess/GoodsServicesService.cs deleted file mode 100644 index 531db53..0000000 --- a/ARW.Service/Business/BusinessService/GoodsManager/GoodsServicess/GoodsServicesService.cs +++ /dev/null @@ -1,113 +0,0 @@ -using Infrastructure.Attribute; -using Microsoft.AspNetCore.Http; -using SqlSugar; -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; -using Infrastructure; -using ARW.Model; -using ARW.Repository; -using ARW.Repository.Business.GoodsManager.GoodsServicess; -using ARW.Service.Business.IBusinessService.GoodsManager.GoodsServicess; -using ARW.Model.Dto.Business.GoodsManager.GoodsServicess; -using ARW.Model.Models.Business.GoodsManager.GoodsServicess; -using ARW.Model.Vo.Business.GoodsManager.GoodsServicess; -using ARW.Model.Models.Business.ShopManager.Shops; -using ARW.Repository.Business.LogisticsManage.Deliverys; - -namespace ARW.Service.Business.BusinessService.GoodsManager.GoodsServicess -{ - /// - /// 商品服务与承诺接口实现类 - /// - /// @author lwh - /// @date 2023-06-18 - /// - [AppService(ServiceType = typeof(IGoodsServicesService), ServiceLifetime = LifeTime.Transient)] - public class GoodsServicesServiceImpl : BaseService, IGoodsServicesService - { - private readonly GoodsServicesRepository _GoodsServicesRepository; - - public GoodsServicesServiceImpl(GoodsServicesRepository GoodsServicesRepository) - { - this._GoodsServicesRepository = GoodsServicesRepository; - } - - #region 业务逻辑代码 - - - /// - /// 查询商品服务与承诺分页列表 - /// - public async Task> GetGoodsServicesList(GoodsServicesQueryDto parm) - { - //开始拼装查询条件d - var predicate = Expressionable.Create(); - - predicate = predicate.AndIF(parm.ShopGuid != 0, s => s.ShopGuid == parm.ShopGuid); - predicate = predicate.AndIF(!string.IsNullOrEmpty(parm.GoodsServicesName), s => s.GoodsServicesName.Contains(parm.GoodsServicesName)); - predicate = predicate.AndIF(parm.GoodsServicesIsDefault != null, s => s.GoodsServicesIsDefault == parm.GoodsServicesIsDefault); - predicate = predicate.AndIF(parm.GoodsServicesDisplayStatus != null, s => s.GoodsServicesDisplayStatus == parm.GoodsServicesDisplayStatus); - var query = _GoodsServicesRepository - .Queryable() - .LeftJoin((s,c) => s.ShopGuid == c.ShopGuid) - .Where(predicate.ToExpression()) - .WhereIF(!string.IsNullOrEmpty(parm.ShopName), (s,c) => c.ShopName.Contains(parm.ShopName)) - .OrderBy(s => s.GoodsServicesSort, OrderByType.Asc) - .Select((s,c) => new GoodsServicesVo - { - ShopName = c.ShopName, - GoodsServicesId = s.GoodsServicesId, - GoodsServicesGuid = s.GoodsServicesGuid, - ShopGuid = s.ShopGuid, - GoodsServicesName = s.GoodsServicesName, - GoodsServicesSummary = s.GoodsServicesSummary, - GoodsServicesIsDefault = s.GoodsServicesIsDefault, - GoodsServicesDisplayStatus = s.GoodsServicesDisplayStatus, - GoodsServicesSort = s.GoodsServicesSort, - }); - - - return await query.ToPageAsync(parm); - } - - /// - /// 添加或修改商品服务与承诺 - /// - public async Task AddOrUpdateGoodsServices(GoodsServices model) - { - if (model.GoodsServicesId != 0) - { - var response = await _GoodsServicesRepository.UpdateAsync(model); - return "修改成功!"; - } - else - { - var delivery = await _GoodsServicesRepository.GetFirstAsync(s => s.GoodsServicesName == model.GoodsServicesName && s.ShopGuid == model.ShopGuid); - if (delivery != null) { throw new CustomException($"{model.GoodsServicesName} 已存在!"); } - var response = await _GoodsServicesRepository.InsertReturnSnowflakeIdAsync(model); - return "添加成功!"; - } - } - - #region Excel处理 - - - /// - /// Excel数据导出处理 - /// - public async Task> HandleExportData(List data) - { - return data; - } - - #endregion - - - - #endregion - - } -} diff --git a/ARW.Service/Business/BusinessService/GoodsManager/GoodsSpecs/GoodsSkus/GoodsSkuService.cs b/ARW.Service/Business/BusinessService/GoodsManager/GoodsSpecs/GoodsSkus/GoodsSkuService.cs deleted file mode 100644 index a789536..0000000 --- a/ARW.Service/Business/BusinessService/GoodsManager/GoodsSpecs/GoodsSkus/GoodsSkuService.cs +++ /dev/null @@ -1,190 +0,0 @@ -using Infrastructure.Attribute; -using Microsoft.AspNetCore.Http; -using SqlSugar; -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; -using Infrastructure; -using ARW.Model; -using ARW.Repository; -using ARW.Repository.Business.GoodsManager.GoodsSpecs.GoodsSkus; -using ARW.Service.Business.IBusinessService.GoodsManager.GoodsSpecs.GoodsSkus; -using ARW.Model.Dto.Business.GoodsManager.GoodsSpecs.GoodsSkus; -using ARW.Model.Models.Business.GoodsManager.GoodsSpecs.GoodsSkus; -using ARW.Model.Vo.Business.GoodsManager.GoodsSpecs.GoodsSkus; -using ARW.Model.Dto.Business.GoodsManager.Goodss; -using ARW.Model.Vo.Business.GoodsManager.Goodss; -using ARW.Repository.Business.GoodsManager.GoodsSpecs.GoodsSpecRels; -using ARW.Repository.Business.GoodsManager.GoodsSpecs.Specs; -using ARW.Repository.Business.GoodsManager.GoodsSpecs.SpecValues; -using Dapper; - -namespace ARW.Service.Business.BusinessService.GoodsManager.GoodsSpecs.GoodsSkus -{ - /// - /// 商品规格接口实现类 - /// - /// @author lwh - /// @date 2023-06-19 - /// - [AppService(ServiceType = typeof(IGoodsSkuService), ServiceLifetime = LifeTime.Transient)] - public class GoodsSkuServiceImpl : BaseService, IGoodsSkuService - { - private readonly GoodsSkuRepository _GoodsSkuRepository; - private readonly GoodsSpecRelRepository _GoodsSpecRelRepository; - private readonly SpecRepository _SpecRepository; - private readonly SpecValueRepository _SpecValueRepository; - - public GoodsSkuServiceImpl(GoodsSkuRepository GoodsSkuRepository, GoodsSpecRelRepository goodsSpecRelRepository, SpecRepository specRepository, SpecValueRepository specValueRepository) - { - this._GoodsSkuRepository = GoodsSkuRepository; - _GoodsSpecRelRepository = goodsSpecRelRepository; - _SpecRepository = specRepository; - _SpecValueRepository = specValueRepository; - } - - #region 业务逻辑代码 - - /// - /// 获取商品Sku - /// - /// - /// - public async Task GetGoodsSkuList(GoodsSkuQueryDto parm) - { - var goodsSpecSkutVo = new GoodsSpecSkutVo(); - goodsSpecSkutVo.GoodsSpecList = new List(); - - // 获取商品的规格组列表 - var specIds = (await _GoodsSpecRelRepository.GetListAsync(s => s.GoodsGuid == parm.GoodsGuid)) - .Select(item => item.SpecId) - .Distinct() - .ToList(); - - var specs = await _SpecRepository.GetListAsync(s => specIds.Contains(s.SpecId)); - var specValueIds = (await _GoodsSpecRelRepository.GetListAsync(s => s.GoodsGuid == parm.GoodsGuid)) - .Where(item => item.SpecValueId != 0) - .Select(item => item.SpecValueId) - .Distinct() - .ToList(); - - var specValues = await GetSpecValuesAsync(specValueIds); - - foreach (var spec in specs) - { - var goodsSpecListVo = new GoodsSpecListVo - { - SpecId = spec.SpecId, - SpecName = spec.SpecName, - Props = new List() - }; - goodsSpecListVo.Props.AddRange(specValues.Where(sv => sv.SpecId == spec.SpecId)); - - goodsSpecSkutVo.GoodsSpecList.Add(goodsSpecListVo); - } - - // 获取Sku列表 - var skuList = await _GoodsSkuRepository.GetListAsync(s => s.GoodsGuid == parm.GoodsGuid); - goodsSpecSkutVo.SkuList = await GetSkuListWithSpecValuesAsync(skuList); - - return goodsSpecSkutVo; - } - - private async Task> GetSpecValuesAsync(List specValueIds) - { - var specValues = await _SpecValueRepository.GetListAsync(sv => specValueIds.Contains(sv.SpecValueId)); - return specValues.Select(sv => new SpecValueItem - { - SpecId = sv.SpecId, - SpecValueId = sv.SpecValueId, - SpecValueName = sv.SpecValueName - }).ToList(); - } - - private async Task> GetSkuListWithSpecValuesAsync(List skuList) - { - var specValueIds = skuList.SelectMany(sku => new[] { sku.SpecValueId, sku.SpecSecondValueId, sku.SpecThirdValueId }) - .Distinct() - .Where(id => id != 0) - .ToList(); - - var specValues = await GetSpecValuesAsync(specValueIds); - - return skuList.Select(sku => new GoodsSkuVo - { - GoodsSkuId = sku.GoodsSkuId, - GoodsGuid = sku.GoodsGuid, - SpecValue = specValues.FirstOrDefault(sv => sv.SpecValueId == sku.SpecValueId)?.SpecValueName, - SpecSecondValue = specValues.FirstOrDefault(sv => sv.SpecValueId == sku.SpecSecondValueId)?.SpecValueName, - SpecThirdValue = specValues.FirstOrDefault(sv => sv.SpecValueId == sku.SpecThirdValueId)?.SpecValueName, - GoodsSkuImg = sku.GoodsSkuImg, - GoodsSkuSkuCode = sku.GoodsSkuSkuCode, - GoodsSkuPrice = sku.GoodsSkuPrice, - GoodsSkuLinePrice = sku.GoodsSkuLinePrice, - GoodsSkuStockNum = sku.GoodsSkuStockNum, - GoodsSkuWeight = sku.GoodsSkuWeight - }).ToList(); - } - - - - /// - /// 获取规格值名称 - /// - /// - /// - public string GetSpecValueName(int specValueId) - { - // 从数据库中查询规格值名称 - var specValue = _SpecValueRepository.GetById(specValueId); - if (specValue != null) - { - return specValue.SpecValueName; - } - - return string.Empty; - } - - - /// - /// 获取全部规格值名称 - /// - /// - /// - public async Task GetSpecValueFullName(int? skuId) - { - var str = ""; - // 从数据库中查询规格值名称 - var sku = await _GoodsSkuRepository.GetByIdAsync(skuId); - if (sku != null) - { - var specValue = await _SpecValueRepository.GetByIdAsync(sku.SpecValueId); - str += specValue.SpecValueName; - if (sku.SpecSecondValueId != 0) - { - var specSecondValue = await _SpecValueRepository.GetByIdAsync(sku.SpecSecondValueId); - str += " " + specSecondValue.SpecValueName; - } - if (sku.SpecThirdValueId != 0) - { - var specThirdValue = await _SpecValueRepository.GetByIdAsync(sku.SpecThirdValueId); - str += " " + specThirdValue.SpecValueName; - } - } - - return str; - } - - #region Excel处理 - - - #endregion - - - - #endregion - - } -} diff --git a/ARW.Service/Business/BusinessService/GoodsManager/GoodsSpecs/GoodsSpecRels/GoodsSpecRelService.cs b/ARW.Service/Business/BusinessService/GoodsManager/GoodsSpecs/GoodsSpecRels/GoodsSpecRelService.cs deleted file mode 100644 index fbb6dd2..0000000 --- a/ARW.Service/Business/BusinessService/GoodsManager/GoodsSpecs/GoodsSpecRels/GoodsSpecRelService.cs +++ /dev/null @@ -1,92 +0,0 @@ -using Infrastructure.Attribute; -using Microsoft.AspNetCore.Http; -using SqlSugar; -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; -using Infrastructure; -using ARW.Model; -using ARW.Repository; -using ARW.Repository.Business.GoodsManager.GoodsSpecs.GoodsSpecRels; -using ARW.Service.Business.IBusinessService.GoodsManager.GoodsSpecs.GoodsSpecRels; -using ARW.Model.Dto.Business.GoodsManager.GoodsSpecs.GoodsSpecRels; -using ARW.Model.Models.Business.GoodsManager.GoodsSpecs.GoodsSpecRels; -using ARW.Model.Vo.Business.GoodsManager.GoodsSpecs.GoodsSpecRels; -using ARW.Model.Models.Business.GoodsManager.GoodsSpecs.SpecValues; -using ARW.Repository.Business.GoodsManager.GoodsSpecs.SpecValues; -using System.Diagnostics.Eventing.Reader; - -namespace ARW.Service.Business.BusinessService.GoodsManager.GoodsSpecs.GoodsSpecRels -{ - /// - /// 商品与规格值关系记录接口实现类 - /// - /// @author lwh - /// @date 2023-06-19 - /// - [AppService(ServiceType = typeof(IGoodsSpecRelService), ServiceLifetime = LifeTime.Transient)] - public class GoodsSpecRelServiceImpl : BaseService, IGoodsSpecRelService - { - private readonly GoodsSpecRelRepository _GoodsSpecRelRepository; - - public GoodsSpecRelServiceImpl(GoodsSpecRelRepository GoodsSpecRelRepository) - { - this._GoodsSpecRelRepository = GoodsSpecRelRepository; - } - - #region 业务逻辑代码 - - - /// - /// 查询商品与规格值关系记录分页列表 - /// - public async Task> GetGoodsSpecRelList(GoodsSpecRelQueryDto parm) - { - //开始拼装查询条件d - var predicate = Expressionable.Create(); - - var query = _GoodsSpecRelRepository - .Queryable() - .Where(predicate.ToExpression()) - .OrderBy(s => s.Create_time, OrderByType.Desc) - .Select(s => new GoodsSpecRelVo - { - GoodsSpecRelId = s.GoodsSpecRelId, - GoodsGuid = s.GoodsGuid, - SpecId = s.SpecId, - SpecValueId = s.SpecValueId, - }); - - - return await query.ToPageAsync(parm); - } - - - /// - /// 新增商品与规格值关系 - /// - /// 商品与规格值关系列表 - public async Task InsertGoodsSpecRelAsync(List goodsSpecRelList) - { - await _GoodsSpecRelRepository.InsertRangeAsync(goodsSpecRelList); - } - - - /// - /// 更新商品与规格值关系 - /// - /// 商品与规格值关系列表 - /// - public async Task UpdateGoodsSpecRelAsync(List goodsSpecRelList, long goodsGuid) - { - await _GoodsSpecRelRepository.DeleteAsync(s => s.GoodsGuid == goodsGuid); - await _GoodsSpecRelRepository.InsertRangeAsync(goodsSpecRelList); - } - - - #endregion - - } -} diff --git a/ARW.Service/Business/BusinessService/GoodsManager/GoodsSpecs/SpecValues/SpecValueService.cs b/ARW.Service/Business/BusinessService/GoodsManager/GoodsSpecs/SpecValues/SpecValueService.cs deleted file mode 100644 index 5bf105c..0000000 --- a/ARW.Service/Business/BusinessService/GoodsManager/GoodsSpecs/SpecValues/SpecValueService.cs +++ /dev/null @@ -1,89 +0,0 @@ -using Infrastructure.Attribute; -using Microsoft.AspNetCore.Http; -using SqlSugar; -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; -using Infrastructure; -using ARW.Model; -using ARW.Repository; -using ARW.Repository.Business.GoodsManager.GoodsSpecs.SpecValues; -using ARW.Service.Business.IBusinessService.GoodsManager.GoodsSpecs.SpecValues; -using ARW.Model.Dto.Business.GoodsManager.GoodsSpecs.SpecValues; -using ARW.Model.Models.Business.GoodsManager.GoodsSpecs.SpecValues; -using ARW.Model.Vo.Business.GoodsManager.GoodsSpecs.SpecValues; -using ARW.Model.Models.Business.GoodsManager.GoodsSpecs.Specs; -using ARW.Repository.Business.GoodsManager.GoodsSpecs.Specs; - -namespace ARW.Service.Business.BusinessService.GoodsManager.GoodsSpecs.SpecValues -{ - /// - /// 商品规格值接口实现类 - /// - /// @author lwh - /// @date 2023-06-19 - /// - [AppService(ServiceType = typeof(ISpecValueService), ServiceLifetime = LifeTime.Transient)] - public class SpecValueServiceImpl : BaseService, ISpecValueService - { - private readonly SpecValueRepository _SpecValueRepository; - - public SpecValueServiceImpl(SpecValueRepository SpecValueRepository) - { - this._SpecValueRepository = SpecValueRepository; - } - - #region 业务逻辑代码 - - - /// - /// 查询商品规格值分页列表 - /// - public async Task> GetSpecValueList(SpecValueQueryDto parm) - { - //开始拼装查询条件d - var predicate = Expressionable.Create(); - - var query = _SpecValueRepository - .Queryable() - .Where(predicate.ToExpression()) - .OrderBy(s => s.Create_time, OrderByType.Desc) - .Select(s => new SpecValueVo - { - SpecValueId = s.SpecValueId, - SpecId = s.SpecId, - SpecValueName = s.SpecValueName, - }); - - - return await query.ToPageAsync(parm); - } - - - /// - /// 新增规格值 - /// - /// 规格值列表 - public async Task InsertSpecValueAsync(List sepcValueList) - { - await _SpecValueRepository.InsertRangeAsync(sepcValueList); - } - - - /// - /// 更新规格值 - /// - /// 规格值列表 - /// - public async Task UpdateSpecValueAsync(List sepcValueList) - { - await _SpecValueRepository.UpdateRangeAsync(sepcValueList); - } - - - #endregion - - } -} diff --git a/ARW.Service/Business/BusinessService/GoodsManager/GoodsSpecs/Specs/SpecService.cs b/ARW.Service/Business/BusinessService/GoodsManager/GoodsSpecs/Specs/SpecService.cs deleted file mode 100644 index ce73924..0000000 --- a/ARW.Service/Business/BusinessService/GoodsManager/GoodsSpecs/Specs/SpecService.cs +++ /dev/null @@ -1,85 +0,0 @@ -using Infrastructure.Attribute; -using Microsoft.AspNetCore.Http; -using SqlSugar; -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; -using Infrastructure; -using ARW.Model; -using ARW.Repository; -using ARW.Repository.Business.GoodsManager.GoodsSpecs.Specs; -using ARW.Service.Business.IBusinessService.GoodsManager.GoodsSpecs.Specs; -using ARW.Model.Dto.Business.GoodsManager.GoodsSpecs.Specs; -using ARW.Model.Models.Business.GoodsManager.GoodsSpecs.Specs; -using ARW.Model.Vo.Business.GoodsManager.GoodsSpecs.Specs; - -namespace ARW.Service.Business.BusinessService.GoodsManager.GoodsSpecs.Specs -{ - /// - /// 商品规格组接口实现类 - /// - /// @author lwh - /// @date 2023-06-19 - /// - [AppService(ServiceType = typeof(ISpecService), ServiceLifetime = LifeTime.Transient)] - public class SpecServiceImpl : BaseService, ISpecService - { - private readonly SpecRepository _SpecRepository; - - public SpecServiceImpl(SpecRepository SpecRepository) - { - this._SpecRepository = SpecRepository; - } - - #region 业务逻辑代码 - - - /// - /// 查询商品规格组分页列表 - /// - public async Task> GetSpecList(SpecQueryDto parm) - { - //开始拼装查询条件d - var predicate = Expressionable.Create(); - - var query = _SpecRepository - .Queryable() - .Where(predicate.ToExpression()) - .OrderBy(s => s.Create_time, OrderByType.Desc) - .Select(s => new SpecVo - { - SpecId = s.SpecId, - SpecName = s.SpecName, - }); - - - return await query.ToPageAsync(parm); - } - - /// - /// 新增规格组 - /// - /// 规格组列表 - public async Task InsertSpecAsync(List sepcList) - { - await _SpecRepository.InsertRangeAsync(sepcList); - } - - - /// - /// 更新规格组 - /// - /// 规格组列表 - /// - public async Task UpdateSpecAsync(List sepcList) - { - await _SpecRepository.UpdateRangeAsync(sepcList); - } - - - #endregion - - } -} diff --git a/ARW.Service/Business/BusinessService/GoodsManager/Goodss/GoodsService.cs b/ARW.Service/Business/BusinessService/GoodsManager/Goodss/GoodsService.cs deleted file mode 100644 index fdc030c..0000000 --- a/ARW.Service/Business/BusinessService/GoodsManager/Goodss/GoodsService.cs +++ /dev/null @@ -1,855 +0,0 @@ -using Infrastructure.Attribute; -using SqlSugar; -using System; -using System.Collections.Generic; -using System.Linq; -using System.Threading.Tasks; -using Infrastructure; -using ARW.Model; -using ARW.Repository; -using ARW.Repository.Business.GoodsManager.Goodss; -using ARW.Service.Business.IBusinessService.GoodsManager.Goodss; -using ARW.Model.Dto.Business.GoodsManager.Goodss; -using ARW.Model.Models.Business.GoodsManager.Goodss; -using ARW.Model.Vo.Business.GoodsManager.Goodss; -using ARW.Model.Models.Business.ShopManager.Shops; -using ARW.Service.Business.IBusinessService.GoodsManager.GoodsServicess.GoodsServicesRels; -using ARW.Model.Models.Business.GoodsManager.GoodsServicess.GoodsServicesRels; -using ARW.Service.Business.IBusinessService.GoodsManager.GoodsSpecs.Specs; -using ARW.Service.Business.IBusinessService.GoodsManager.GoodsSpecs.SpecValues; -using ARW.Service.Business.IBusinessService.GoodsManager.GoodsSpecs.GoodsSpecRels; -using ARW.Model.Models.Business.GoodsManager.GoodsSpecs.Specs; -using ARW.Model.Models.Business.GoodsManager.GoodsSpecs.SpecValues; -using ARW.Model.Models.Business.GoodsManager.GoodsSpecs.GoodsSpecRels; -using ARW.Model.Models.Business.GoodsManager.GoodsSpecs.GoodsSkus; -using ARW.Service.Business.IBusinessService.GoodsManager.GoodsSpecs.GoodsSkus; -using ARW.Repository.Business.GoodsManager.ShopGoodsCategorys; -using ARW.Model.Models.Business.GoodsManager.ShopGoodsCategorys; -using ARW.Repository.Business.GoodsManager.GoodsCategorys; -using ARW.Model.Models.Business.GoodsManager.GoodsCategorys; -using ARW.Common; -using ARW.Model.System; -using ARW.Repository.Business.ShopManager.Shops; -using ARW.Repository.Business.LogisticsManage.Deliverys; -using ARW.Repository.Business.GoodsManager.GoodsServicess; -using Senparc.CO2NET.Extensions; -using ARW.Repository.Business.Custom.Customers; - -namespace ARW.Service.Business.BusinessService.GoodsManager.Goodss -{ - /// - /// 商品接口实现类 - /// - /// @author lwh - /// @date 2023-06-19 - /// - [AppService(ServiceType = typeof(IGoodsService), ServiceLifetime = LifeTime.Transient)] - public class GoodsServiceImpl : BaseService, IGoodsService - { - private readonly GoodsRepository _GoodsRepository; - private readonly ShopGoodsCategoryRepository _ShopGoodsCategoryRepository; - private readonly GoodsCategoryRepository _GoodsCategoryRepository; - private readonly ShopRepository _ShopRepository; - private readonly DeliveryRepository _DeliveryRepository; - private readonly GoodsServicesRepository _GoodsServicesRepository; - private readonly IGoodsServicesRelService _GoodsServicesRelIService; - private readonly ISpecService _SepcIService; - private readonly ISpecValueService _SpecValueIService; - private readonly IGoodsSpecRelService _GoodsSpecRelService; - private readonly IGoodsSkuService _GoodsSkuService; - - - public GoodsServiceImpl(GoodsRepository GoodsRepository, IGoodsServicesRelService goodsServicesRelIService, ISpecService sepcIService, ISpecValueService specValueIService, IGoodsSpecRelService goodsSpecRelService, IGoodsSkuService goodsSkuService, ShopGoodsCategoryRepository shopGoodsCategoryRepository, GoodsCategoryRepository goodsCategoryRepository, ShopRepository shopRepository, DeliveryRepository deliveryRepository, GoodsServicesRepository goodsServicesRepository) - { - this._GoodsRepository = GoodsRepository; - _GoodsServicesRelIService = goodsServicesRelIService; - _SepcIService = sepcIService; - _SpecValueIService = specValueIService; - _GoodsSpecRelService = goodsSpecRelService; - _GoodsSkuService = goodsSkuService; - _ShopGoodsCategoryRepository = shopGoodsCategoryRepository; - _GoodsCategoryRepository = goodsCategoryRepository; - _ShopRepository = shopRepository; - _DeliveryRepository = deliveryRepository; - _GoodsServicesRepository = goodsServicesRepository; - } - - #region 业务逻辑代码 - - - /// - /// 查询商品分页列表 - /// - public async Task> GetGoodsList(GoodsQueryDto parm) - { - - //开始拼装查询条件d - var predicate = Expressionable.Create(); - string[] goodsCategoryArr = null; - - // 检索商品类目 - if (parm.ShopGoodsCategoryGuid != null) - { - var data = await _ShopGoodsCategoryRepository.GetListAsync(); - - var SewshopGoodsCategorys = data.FindAll(delegate (ShopGoodsCategory shopGoodsCategory) - { - string[] parentShopGoodsCategoryId = shopGoodsCategory.ShopGoodsCategoryAncestralGuid.Split(",", StringSplitOptions.RemoveEmptyEntries); - return parentShopGoodsCategoryId.Contains(parm.ShopGoodsCategoryGuid.ToString()); - }); - string[] shopGoodsCategoryArr = SewshopGoodsCategorys.Select(s => s.ShopGoodsCategoryGuid.ToString()).ToArray(); - predicate = predicate.AndIF(parm.ShopGoodsCategoryGuid != null, s => s.ShopGoodsCategoryGuid == parm.ShopGoodsCategoryGuid || shopGoodsCategoryArr.Contains(s.ShopGoodsCategoryGuid.ToString())); - } - - // 检索经营类目 - if (parm.GoodsCategoryGuid != null) - { - var data = await _GoodsCategoryRepository.GetListAsync(); - - var SewGoodsCategorys = data.FindAll(delegate (GoodsCategory goodsCategory) - { - string[] parentGoodsCategoryId = goodsCategory.GoodsCategoryAncestralGuid.Split(",", StringSplitOptions.RemoveEmptyEntries); - return parentGoodsCategoryId.Contains(parm.GoodsCategoryGuid.ToString()); - }); - goodsCategoryArr = SewGoodsCategorys.Select(s => s.GoodsCategoryGuid.ToString()).ToArray(); - } - - predicate = predicate.AndIF(parm.ShopGuid != 0, s => s.ShopGuid == parm.ShopGuid); - predicate = predicate.AndIF(!string.IsNullOrEmpty(parm.GoodsName), s => s.GoodsName.Contains(parm.GoodsName)); - predicate = predicate.AndIF(!string.IsNullOrEmpty(parm.GoodsCoding), s => s.GoodsCoding.Contains(parm.GoodsCoding)); - var query = _GoodsRepository - .Queryable() - .LeftJoin((s, c) => s.ShopGuid == c.ShopGuid) - .Where(predicate.ToExpression()) - .WhereIF(!string.IsNullOrEmpty(parm.ShopName), (s, c) => c.ShopName.Contains(parm.ShopName)) - .WhereIF(parm.GoodsCategoryGuid != null, (s, c) => c.ShopBusinessCategoryGuid == parm.GoodsCategoryGuid || goodsCategoryArr.Contains(c.ShopBusinessCategoryGuid.ToString())) - .OrderBy(s => s.GoodsSort, OrderByType.Asc) - .Select((s, c) => new GoodsVo - { - GoodsId = s.GoodsId, - GoodsGuid = s.GoodsGuid, - ShopGuid = s.ShopGuid, - ShopName = c.ShopName, - ShopGoodsCategoryGuid = s.ShopGoodsCategoryGuid, - GoodsSkuIds = s.GoodsSkuIds, - DeliveryGuid = s.DeliveryGuid, - GoodsName = s.GoodsName, - GoodsCoding = s.GoodsCoding, - GoodsMainImageVideo = s.GoodsMainImageVideo, - GoodsVideoCover = s.GoodsVideoCover, - GoodsPicture = s.GoodsPicture, - GoodsSellingPoint = s.GoodsSellingPoint, - GoodsSpecType = s.GoodsSpecType, - GoodsPriceLowest = s.GoodsPriceLowest, - GoodsPriceHighest = s.GoodsPriceHighest, - GoodsDashedPriceLowest = s.GoodsDashedPriceLowest, - GoodsTotalInventory = s.GoodsTotalInventory, - GoodsSalesInitial = s.GoodsSalesInitial, - GoodsSalesActual = s.GoodsSalesActual, - GoodsDetails = s.GoodsDetails, - GoodsDeductStockType = s.GoodsDeductStockType, - GoodsIsPointsGift = s.GoodsIsPointsGift, - GoodsIsPointsDiscount = s.GoodsIsPointsDiscount, - GoodsIsAlonePointsDiscount = s.GoodsIsAlonePointsDiscount, - GoodsPointsDiscountConfig = s.GoodsPointsDiscountConfig, - GoodsIsEnableGrade = s.GoodsIsEnableGrade, - GoodsIsAloneGrade = s.GoodsIsAloneGrade, - GoodsAloneGradeEquity = s.GoodsAloneGradeEquity, - GoodsShelfStatus = s.GoodsShelfStatus, - GoodsSort = s.GoodsSort, - GoodsWeight = s.GoodsWeight, - CreateTime = s.Create_time.ToString("yyyy-MM-dd HH:mm") - }); - - - var res = await query.ToPageAsync(parm); - - var shopGoodsCategoryDict = (await _ShopGoodsCategoryRepository.GetListAsync()).ToDictionary(s => s.ShopGoodsCategoryGuid); - foreach (var item in res.Result) - { - if (!shopGoodsCategoryDict.TryGetValue(item.ShopGoodsCategoryGuid, out var category)) - { - throw new Exception("商品类目不存在"); - } - - var categoryNameList = new List(); - var ancestorGuidsArr = Tools.SpitLongArrary(category.ShopGoodsCategoryAncestralGuid); - foreach (var ancestorGuid in ancestorGuidsArr) - { - if (ancestorGuid == 0) continue; - if (shopGoodsCategoryDict.TryGetValue(ancestorGuid, out var ancestor)) - { - categoryNameList.Add(ancestor.ShopGoodsCategoryName); - } - } - - categoryNameList.Add(category.ShopGoodsCategoryName); - - item.GoodsCategoryName = string.Join("/", categoryNameList); - } - - return res; - } - - - /// - /// 查询全部商品列表 - /// - public async Task> GetAllGoodsList(GoodsQueryDto parm) - { - - //开始拼装查询条件d - var predicate = Expressionable.Create(); - - predicate = predicate.AndIF(parm.ShopGuid != 0, s => s.ShopGuid == parm.ShopGuid); - predicate = predicate.AndIF(!string.IsNullOrEmpty(parm.GoodsName), s => s.GoodsName.Contains(parm.GoodsName)); - predicate = predicate.AndIF(!string.IsNullOrEmpty(parm.GoodsCoding), s => s.GoodsCoding.Contains(parm.GoodsCoding)); - var query = _GoodsRepository - .Queryable() - .Where(predicate.ToExpression()) - .OrderBy(s => s.GoodsSort, OrderByType.Asc) - .Select(s => new AllGoodsVo - { - GoodsId = s.GoodsId, - GoodsGuid = s.GoodsGuid, - GoodsName = s.GoodsName, - GoodsPicture = s.GoodsPicture, - GoodsPriceLowest = s.GoodsPriceLowest, - GoodsDashedPriceLowest = s.GoodsDashedPriceLowest, - GoodsShelfStatus = s.GoodsShelfStatus, - GoodsSort = s.GoodsSort, - GoodsTotalInventory = s.GoodsTotalInventory, - }); - - - return await query.ToListAsync(); - - } - - - /// - /// 添加或修改商品 - /// - public async Task AddOrUpdateGoods(Goods model) - { - try - { - if (model.GoodsId != 0) - { - await UseTranAsync(async () => - { - await HandleBeforeUpdate(model); - var response = await _GoodsRepository.UpdateAsync(model); - }); - return "修改成功!"; - } - else - { - await UseTranAsync(async () => - { - await HandleBeforeAdd(model); - var response = await _GoodsRepository.InsertReturnSnowflakeIdAsync(model); - model.GoodsGuid = response; - await HandleAfterAdd(model); - }); - - return "添加成功!"; - } - } - catch (Exception) - { - - throw; - } - } - - - /// - /// 上下架商品 - /// - public async Task ShelfGoods(int id, int status) - { - try - { - var res = await _GoodsRepository.GetFirstAsync(s => s.GoodsId == id); - var shelfStatus = res.GoodsShelfStatus; - - if (shelfStatus == status) - { - var errorRes = $"商品:【{res.GoodsName}】已{(status == 1 ? "上" : "下")}架,请勿重复{(status == 1 ? "上" : "下")}架
"; - return errorRes; - } - - await UseTranAsync(async () => - { - await _GoodsRepository.UpdateAsync(f => new Goods { GoodsShelfStatus = status, Update_time = DateTime.Now }, s => s.GoodsId == id); - }); - - var addStr = $"商品:【{res.GoodsName}】{(status == 1 ? "上" : "下")}架成功!
"; - return addStr; - } - catch (Exception) - { - throw; - } - } - - - - #region Excel处理 - /// - /// 数据导入处理 - /// - public async Task HandleImportData(GoodsVo Goods, long userId, int index) - { - // 非空判断 - if (string.IsNullOrEmpty(Goods.ShopName)) throw new CustomException("店铺名称不能为空"); - if (string.IsNullOrEmpty(Goods.GoodsCategoryName)) throw new CustomException("商品类目不能为空"); - if (string.IsNullOrEmpty(Goods.GoodsName)) throw new CustomException("商品名称不能为空"); - if (string.IsNullOrEmpty(Goods.GoodsPicture)) throw new CustomException("商品图片不能为空"); - if (Goods.GoodsPriceLowest == 0) throw new CustomException("商品价格不能为空"); - if (Goods.GoodsTotalInventory == 0) throw new CustomException("库存总量不能为空"); - - - // 店铺 - var shop = await _ShopRepository.GetFirstAsync(s => s.ShopName == Goods.ShopName); - if (shop == null) throw new CustomException($"店铺【{Goods.ShopName}】不存在"); - if (userId != 1) - { - if (shop.ShopUserId != userId) throw new CustomException($"店铺【{Goods.ShopName}】不是您的店铺"); - } - Goods.ShopGuid = shop.ShopGuid; - - - // 商品类目 - // 拆分上级类目和当前类目(手机/xxxx系列) - var nameArr = Goods.GoodsCategoryName.Split('/'); - if (nameArr.Length == 0 || nameArr.Length >= 3) throw new CustomException($"商品类目【{Goods.GoodsCategoryName}】格式不正确,参考(手机/xxxx系列 或者 手机)"); - - if (nameArr.Length != 1) - { - // 找出上级类目 - var parentGoodsCategory = await _ShopGoodsCategoryRepository.GetFirstAsync( - s => s.ShopGoodsCategoryName == nameArr.First() && - s.ShopGuid == Goods.ShopGuid - ); - if (parentGoodsCategory == null) throw new CustomException($"上级商品类目【{nameArr.First()}】不存在"); - - // 找出当前类目 - var currentGoodsCategory = await _ShopGoodsCategoryRepository.GetFirstAsync( - s => s.ShopGoodsCategoryName == nameArr.Last() && - s.ShopGuid == Goods.ShopGuid && - s.ShopGoodsCategoryParentGuid == parentGoodsCategory.ShopGoodsCategoryGuid - ); - if (currentGoodsCategory == null) throw new CustomException($"当前商品类目【{nameArr.First()}】不存在"); - Goods.ShopGoodsCategoryGuid = currentGoodsCategory.ShopGoodsCategoryGuid; - } - else - { - // 找出当前类目 - var currentGoodsCategory = await _ShopGoodsCategoryRepository.GetFirstAsync( - s => s.ShopGoodsCategoryName == Goods.GoodsCategoryName && - s.ShopGuid == Goods.ShopGuid - ); - if (currentGoodsCategory == null) throw new CustomException($"当前商品类目【{Goods.GoodsCategoryName}】不存在"); - Goods.ShopGoodsCategoryGuid = currentGoodsCategory.ShopGoodsCategoryGuid; - } - - - // 配送模板 - var delivery = await _DeliveryRepository.GetFirstAsync(s => s.DeliveryName == "全国包邮" && s.ShopGuid == Goods.ShopGuid); - Goods.DeliveryGuid = delivery.DeliveryGuid; - - - // 服务与承诺 - var service = await _GoodsServicesRepository.GetFirstAsync(s => s.GoodsServicesName == "七天无理由退货" && s.ShopGuid == Goods.ShopGuid); - Goods.GoodsServicesIds = service.GoodsServicesId.ToString().Select(c => c.ToString()).ToList(); - - - // 状态 - if (!string.IsNullOrEmpty(Goods.GoodsShelfStatusName)) - { - if (Goods.GoodsShelfStatusName == "上架") Goods.GoodsShelfStatus = 1; - if (Goods.GoodsShelfStatusName == "下架") Goods.GoodsShelfStatus = 2; - } - else - { - Goods.GoodsShelfStatus = 1; - } - - // 排序 - if (Goods.GoodsSort == 0) - { - Goods.GoodsSort = 100; - } - - Goods.GoodsSpecType = 1; - Goods.GoodsDeductStockType = 1; - Goods.GoodsIsPointsGift = 0; - Goods.GoodsIsPointsDiscount = 0; - Goods.GoodsIsAlonePointsDiscount = 0; - Goods.GoodsIsEnableGrade = 1; - - return Goods; - } - - - /// - /// Excel导入 - /// - public async Task ImportExcel(GoodsVo GoodsVo, int index, bool isUpdateSupport, LoginUser user) - { - try - { - var goodsVo = await HandleImportData(GoodsVo, user.UserId, index); - var goodsData = new Goods - { - GoodsId = goodsVo.GoodsId, - GoodsGuid = goodsVo.GoodsGuid, - ShopGuid = goodsVo.ShopGuid, - ShopGoodsCategoryGuid = goodsVo.ShopGoodsCategoryGuid, - GoodsSkuIds = goodsVo.GoodsSkuIds, - DeliveryGuid = goodsVo.DeliveryGuid, - GoodsName = goodsVo.GoodsName, - GoodsCoding = goodsVo.GoodsCoding, - GoodsMainImageVideo = goodsVo.GoodsMainImageVideo, - GoodsVideoCover = goodsVo.GoodsVideoCover, - GoodsPicture = goodsVo.GoodsPicture, - GoodsSellingPoint = goodsVo.GoodsSellingPoint, - GoodsSpecType = 1, - GoodsPriceLowest = goodsVo.GoodsPriceLowest, - GoodsPriceHighest = goodsVo.GoodsPriceHighest, - GoodsDashedPriceLowest = goodsVo.GoodsDashedPriceLowest, - GoodsDashedPriceHighest = goodsVo.GoodsDashedPriceHighest, - GoodsTotalInventory = goodsVo.GoodsTotalInventory, - GoodsSalesInitial = goodsVo.GoodsSalesInitial, - GoodsSalesActual = goodsVo.GoodsSalesActual, - GoodsDetails = goodsVo.GoodsDetails, - GoodsDeductStockType = goodsVo.GoodsDeductStockType, - GoodsIsPointsGift = goodsVo.GoodsIsPointsGift, - GoodsIsPointsDiscount = goodsVo.GoodsIsPointsDiscount, - GoodsIsAlonePointsDiscount = goodsVo.GoodsIsAlonePointsDiscount, - GoodsPointsDiscountConfig = goodsVo.GoodsPointsDiscountConfig, - GoodsIsEnableGrade = goodsVo.GoodsIsEnableGrade, - GoodsIsAloneGrade = goodsVo.GoodsIsAloneGrade, - GoodsAloneGradeEquity = goodsVo.GoodsAloneGradeEquity, - GoodsShelfStatus = goodsVo.GoodsShelfStatus, - GoodsSort = goodsVo.GoodsSort, - GoodsServicesIds = string.Join(",", goodsVo.GoodsServicesIds) - }; - - - // 空值判断 - // if (Goods.GoodsId == null) throw new CustomException("商品不能为空"); - - if (isUpdateSupport) - { - // 判断唯一值 - var model = await GetFirstAsync(s => s.GoodsId == goodsData.GoodsId); - - // 如果为空就新增数据 - if (model == null) - { - // 开启事务 - var res = await UseTranAsync(async () => - { - var addRes = await AddOrUpdateGoods(goodsData); - }); - var addStr = $"第 {index} 行 => 商品:【{goodsData.GoodsName}】新增成功!
"; - return addStr; - } - else - { - // 如果有数据就进行修改 - // 开启事务 - await UseTranAsync(async () => - { - goodsData.GoodsId = model.GoodsId; - goodsData.GoodsGuid = model.GoodsGuid; - goodsData.Update_by = user.UserName; - goodsData.Update_time = DateTime.Now; - var editRes = await AddOrUpdateGoods(goodsData); - }); - var editStr = $"第 {index} 行 => 商品:【{goodsData.GoodsName}】更新成功!
"; - return editStr; - } - } - else - { - // 开启事务 - var res = await UseTranAsync(async () => - { - var addRes = await AddOrUpdateGoods(goodsData); - }); - //Console.WriteLine(res.IsSuccess); - var addStr = $"第 {index} 行 => 商品:【{goodsData.GoodsName}】新增成功!
"; - return addStr; - } - } - catch (Exception ex) - { - var errorRes = $"第 {index} 行 => 商品:【{GoodsVo.GoodsName}】导入失败!{ex.Message}
"; - return errorRes; - throw; - } - } - - - - /// - /// Excel数据导出处理 - /// - public async Task> HandleExportData(List data) - { - foreach (var item in data) - { - if (item.GoodsShelfStatus == 1) item.GoodsShelfStatusName = "上架"; - if (item.GoodsShelfStatus == 2) item.GoodsShelfStatusName = "下架"; - } - return data; - } - - #endregion - - - - - #region 商品格式处理 - - - #region 添加处理 - - /// - /// 商品添加前处理处理 - /// - /// 商品Model - /// - public async Task HandleBeforeAdd(Goods model) - { - // 单规格(最高价格 最高划线价格 = 最低价格 最低划线价格) - model = HandleSingleSpec(model); - - // 计算价格和库存总量 - model = HandlMultipleSpecCompute(model); - - return model; - } - - - /// - /// 商品添加后处理 - /// - /// 商品Model - /// - public async Task HandleAfterAdd(Goods model) - { - // 服务与承诺处理 - await HandleAddGoodsService(model); - - // 多规格处理 - await HandleAddMultiSpec(model); - - } - - - - /// - /// 添加服务与承诺处理 - /// - /// 商品Model - /// - public async Task HandleAddGoodsService(Goods model) - { - // 服务与承诺 - if (!string.IsNullOrEmpty(model.GoodsServicesIds)) - { - var servicesIds = model.GoodsServicesIds.Split(','); - var servicesList = new List(); - foreach (var id in servicesIds) - { - var service = new GoodsServicesRel - { - ShopGuid = model.ShopGuid, - GoodsGuid = model.GoodsGuid, - ServiceId = Convert.ToInt32(id) - }; - servicesList.Add(service); - } - await _GoodsServicesRelIService.InsertGoodsServicesRelAsync(servicesList); - } - } - - - - /// - /// 添加商品多规格处理 - /// - /// 商品Model - /// - public async Task HandleAddMultiSpec(Goods model) - { - // 多规格 - if (model.GoodsSpecType == 2) - { - // 添加规格组和规格值 - var index = 1; - foreach (var item in model.GoodsSpecList) - { - var spec = new Spec - { - SpecName = item.SpecName, - Level = index - }; - var specId = await _SepcIService.InsertReturnIdentityAsync(spec); - foreach (var i in item.Props) - { - var specValue = new SpecValue - { - SpecId = specId, - SpecValueName = i.SpecValueName, - }; - var specValueId = await _SpecValueIService.InsertReturnIdentityAsync(specValue); - - // 添加商品与规格值关系 - var rel = new GoodsSpecRel - { - GoodsGuid = model.GoodsGuid, - SpecId = specId, - SpecValueId = specValueId, - }; - await _GoodsSpecRelService.InsertReturnIdentityAsync(rel); - } - index++; - } - - - // Sku处理 - var specList = await _GoodsSpecRelService.GetListAsync(s => s.GoodsGuid == model.GoodsGuid); - var firstSpec = new Spec(); - var secondSpec = new Spec(); - var thirdSpec = new Spec(); - foreach (var item in specList) - { - var spec = await _SepcIService.GetFirstAsync(s => s.SpecId == item.SpecId); - if (spec == null) continue; - - if (spec.Level == 1) - { - firstSpec = spec; - } - if (spec.Level == 2) - { - secondSpec = spec; - } - if (spec.Level == 3) - { - thirdSpec = spec; - } - } - - // 找出改规格组的所有规格值 - foreach (var sku in model.SkuList) - { - var specValueId = await GetSpecValueId(sku, firstSpec, 1); - var specSecondValueId = await GetSpecValueId(sku, secondSpec, 2); - var specThirdValueId = await GetSpecValueId(sku, thirdSpec, 3); - - var skuData = new GoodsSku - { - GoodsGuid = model.GoodsGuid, - SpecValueId = specValueId, - SpecSecondValueId = specSecondValueId, - SpecThirdValueId = specThirdValueId, - GoodsSkuImg = sku.GoodsSkuImg, - GoodsSkuSkuCode = sku.GoodsSkuSkuCode, - GoodsSkuPrice = sku.GoodsSkuPrice, - GoodsSkuLinePrice = sku.GoodsSkuLinePrice, - GoodsSkuStockNum = sku.GoodsSkuStockNum, - GoodsSkuWeight = sku.GoodsSkuWeight, - }; - await _GoodsSkuService.InsertAsync(skuData); - } - - - } - - } - - - #endregion - - - - #region 修改处理 - - /// - /// 商品修改前处理 - /// - /// 商品Model - /// - public async Task HandleBeforeUpdate(Goods model) - { - if (model.GoodsSpecType == 1) - { - // 单规格(最高价格 最高划线价格 = 最低价格 最低划线价格) - model = HandleSingleSpec(model); - } - - if (model.GoodsSpecType == 2) - { - // 如果是下架状态就修改规格 - if (model.GoodsShelfStatus == 2) - { - // 删除所有关于该商品的规格 - var specList = await _GoodsSpecRelService.GetListAsync(s => s.GoodsGuid == model.GoodsGuid); - foreach (var item in specList) - { - await _SepcIService.DeleteAsync(s => s.SpecId == item.SpecId); - await _SpecValueIService.DeleteAsync(s => s.SpecId == item.SpecId); - } - - await _GoodsSpecRelService.DeleteAsync(s => s.GoodsGuid == model.GoodsGuid); - await _GoodsSkuService.DeleteAsync(s => s.GoodsGuid == model.GoodsGuid); - // 再重新添加该商品的规格 - await HandleAddMultiSpec(model); - } - - // 计算价格和库存总量 - model = HandlMultipleSpecCompute(model); - } - - // 删除所有关于该商品的服务与承诺 - await _GoodsServicesRelIService.DeleteAsync(s => s.GoodsGuid == model.GoodsGuid); - // 再重新添加该商品的服务与承诺 - await HandleAddGoodsService(model); - - return model; - } - - - #endregion - - - #region 公共方法 - - /// - /// 商品单规格处理 - /// - /// 商品Model - /// - public Goods HandleSingleSpec(Goods model) - { - // 单规格 - if (model.GoodsSpecType == 1) - { - // 价格 - model.GoodsPriceHighest = model.GoodsPriceLowest; - - // 划线价格 - model.GoodsDashedPriceHighest = model.GoodsDashedPriceLowest; - } - - return model; - } - - - /// - /// 商品计算多规格处理 - /// - /// 商品Model - /// - public Goods HandlMultipleSpecCompute(Goods model) - { - // 单规格 - if (model.GoodsSpecType == 2) - { - decimal lowestPrice = decimal.MaxValue; - decimal highestPrice = decimal.MinValue; - decimal lowestDashedPrice = decimal.MaxValue; - decimal highestDashedPrice = decimal.MinValue; - int totalInventory = 0; - - foreach (var sku in model.SkuList) - { - if (sku.GoodsSkuPrice < lowestPrice) - { - lowestPrice = sku.GoodsSkuPrice; - } - - if (sku.GoodsSkuPrice > highestPrice) - { - highestPrice = sku.GoodsSkuPrice; - } - - if (sku.GoodsSkuLinePrice < lowestDashedPrice) - { - lowestDashedPrice = sku.GoodsSkuLinePrice; - } - - if (sku.GoodsSkuLinePrice > highestDashedPrice) - { - highestDashedPrice = sku.GoodsSkuLinePrice; - } - - totalInventory += sku.GoodsSkuStockNum; - } - - model.GoodsPriceLowest = lowestPrice; - model.GoodsPriceHighest = highestPrice; - model.GoodsDashedPriceLowest = lowestDashedPrice; - model.GoodsDashedPriceHighest = highestDashedPrice; - model.GoodsTotalInventory = totalInventory; - } - - return model; - } - - - /// - /// 找出改规格组的所有规格值 - /// - /// - /// - /// - /// - public async Task GetSpecValueId(SkuDto sku, Spec spec, int level) - { - if (spec == null) - { - return 0; - } - - var specValueName = level switch - { - 1 => sku.SpecValue, - 2 => sku.SpecSecondValue, - 3 => sku.SpecThirdValue, - _ => null - }; - - if (specValueName != null) - { - var specValue = await _SpecValueIService.GetFirstAsync(s => s.SpecId == spec.SpecId && s.SpecValueName == specValueName); - if (specValue != null) - { - return specValue.SpecValueId; - } - } - - return 0; - } - - - - - #endregion - - - #endregion - - - - #endregion - - } -} diff --git a/ARW.Service/Business/BusinessService/GoodsManager/ShopGoodsCategorys/ShopGoodsCategoryService.cs b/ARW.Service/Business/BusinessService/GoodsManager/ShopGoodsCategorys/ShopGoodsCategoryService.cs deleted file mode 100644 index 89e975f..0000000 --- a/ARW.Service/Business/BusinessService/GoodsManager/ShopGoodsCategorys/ShopGoodsCategoryService.cs +++ /dev/null @@ -1,287 +0,0 @@ -using Infrastructure.Attribute; -using Microsoft.AspNetCore.Http; -using SqlSugar; -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; -using Infrastructure; -using ARW.Model; -using ARW.Repository; -using ARW.Repository.Business.GoodsManager.ShopGoodsCategorys; -using ARW.Service.Business.IBusinessService.GoodsManager.ShopGoodsCategorys; -using ARW.Model.Dto.Business.GoodsManager.ShopGoodsCategorys; -using ARW.Model.Models.Business.GoodsManager.ShopGoodsCategorys; -using ARW.Model.Vo.Business.GoodsManager.ShopGoodsCategorys; -using ARW.Model.Models.Business.ShopManager.Shops; -using ARW.Repository.System; -using ARW.Repository.Business.ShopManager.Shops; -using Senparc.CO2NET.Extensions; -using ARW.Model.System; - -namespace ARW.Service.Business.BusinessService.GoodsManager.ShopGoodsCategorys -{ - /// - /// 店铺商品类目接口实现类 - /// - /// @author lwh - /// @date 2023-06-15 - /// - [AppService(ServiceType = typeof(IShopGoodsCategoryService), ServiceLifetime = LifeTime.Transient)] - public class ShopGoodsCategoryServiceImpl : BaseService, IShopGoodsCategoryService - { - private readonly ShopGoodsCategoryRepository _ShopGoodsCategoryRepository; - private readonly ShopRepository _ShopRepository; - private readonly SysDictDataRepository _SysDictDataRepository; - - public ShopGoodsCategoryServiceImpl(ShopGoodsCategoryRepository ShopGoodsCategoryRepository, SysDictDataRepository sysDictDataRepository, ShopRepository shopRepository) - { - this._ShopGoodsCategoryRepository = ShopGoodsCategoryRepository; - _SysDictDataRepository = sysDictDataRepository; - _ShopRepository = shopRepository; - } - - #region 业务逻辑代码 - - - /// - /// 查询店铺商品类目树形列表 - /// - public async Task> GetShopGoodsCategoryTreeList(ShopGoodsCategoryQueryDto parm) - { - //开始拼装查询条件 - var predicate = Expressionable.Create(); - - predicate = predicate.AndIF(parm.ShopGuid != 0, s => s.ShopGuid == parm.ShopGuid); - predicate = predicate.AndIF(parm.ShopGoodsCategoryDisplayStatus != null, s => s.ShopGoodsCategoryDisplayStatus == parm.ShopGoodsCategoryDisplayStatus); - var query = _ShopGoodsCategoryRepository - .Queryable() - .LeftJoin((s, c) => s.ShopGoodsCategoryParentGuid == c.ShopGoodsCategoryGuid) - .LeftJoin((s, c, d) => s.ShopGuid == d.ShopGuid) - .Where(predicate.ToExpression()) - .WhereIF(!string.IsNullOrEmpty(parm.ShopName), (s, c, d) => d.ShopName.Contains(parm.ShopName)) - .OrderBy(s => s.ShopGoodsCategorySort, OrderByType.Asc) - .Select((s, c, d) => new ShopGoodsCategoryVo - { - ShopGoodsCategoryId = s.ShopGoodsCategoryId, - ShopGoodsCategoryGuid = s.ShopGoodsCategoryGuid, - ShopGuid = s.ShopGuid, - ShopName = d.ShopName, - ShopGoodsCategoryParentGuid = s.ShopGoodsCategoryParentGuid, - ShopGoodsCategoryAncestralGuid = s.ShopGoodsCategoryAncestralGuid, - ShopGoodsCategoryName = s.ShopGoodsCategoryName, - ShopGoodsCategoryDisplayStatus = s.ShopGoodsCategoryDisplayStatus, - ShopGoodsCategorySort = s.ShopGoodsCategorySort, - ParentName = c.ShopGoodsCategoryName, - ShopGoodsCategoryImg = s.ShopGoodsCategoryImg, - ShopGoodsCategoryIsPopular = s.ShopGoodsCategoryIsPopular - }); - - return await query.ToTreeAsync(it => it.Children, it => it.ShopGoodsCategoryParentGuid, 0); - } - - - /// - /// 查询店铺商品类目列表 - /// - public async Task> GetShopGoodsCategoryList(ShopGoodsCategoryQueryDto parm) - { - //开始拼装查询条件d - var predicate = Expressionable.Create(); - - predicate = predicate.AndIF(parm.ShopGuid != 0, s => s.ShopGuid == parm.ShopGuid); - predicate = predicate.AndIF(!string.IsNullOrEmpty(parm.ShopGoodsCategoryName), s => s.ShopGoodsCategoryName.Contains(parm.ShopGoodsCategoryName)); - predicate = predicate.AndIF(parm.ShopGoodsCategoryDisplayStatus != null, s => s.ShopGoodsCategoryDisplayStatus == parm.ShopGoodsCategoryDisplayStatus); - var query = _ShopGoodsCategoryRepository - .Queryable() - .LeftJoin((s, c) => s.ShopGoodsCategoryParentGuid == c.ShopGoodsCategoryGuid) - .LeftJoin((s, c, d) => s.ShopGuid == d.ShopGuid) - .Where(predicate.ToExpression()) - .WhereIF(!string.IsNullOrEmpty(parm.ShopName), (s, c, d) => d.ShopName.Contains(parm.ShopName)) - .OrderBy(s => s.ShopGoodsCategorySort, OrderByType.Asc) - .Select((s, c, d) => new ShopGoodsCategoryVo - { - ShopGoodsCategoryId = s.ShopGoodsCategoryId, - ShopGoodsCategoryGuid = s.ShopGoodsCategoryGuid, - ShopGuid = s.ShopGuid, - ShopName = d.ShopName, - ShopGoodsCategoryParentGuid = s.ShopGoodsCategoryParentGuid, - ShopGoodsCategoryAncestralGuid = s.ShopGoodsCategoryAncestralGuid, - ShopGoodsCategoryName = s.ShopGoodsCategoryName, - ShopGoodsCategoryDisplayStatus = s.ShopGoodsCategoryDisplayStatus, - ShopGoodsCategorySort = s.ShopGoodsCategorySort, - ParentName = c.ShopGoodsCategoryName, - ShopGoodsCategoryImg = s.ShopGoodsCategoryImg - }); - - - return await query.ToListAsync(); - } - - /// - /// 添加或修改店铺商品类目 - /// - public async Task AddOrUpdateShopGoodsCategory(ShopGoodsCategory model) - { - if (model.ShopGoodsCategoryId != 0) - { - var type = await _ShopGoodsCategoryRepository.GetListAsync(s => s.ShopGoodsCategoryParentGuid == model.ShopGoodsCategoryGuid); - if (type != null) - { - foreach (var item in type) - { - if (model.ShopGoodsCategoryParentGuid == item.ShopGoodsCategoryGuid) throw new CustomException("上级菜单不能选择自己的子级!"); - } - } - if (model.ShopGoodsCategoryParentGuid == model.ShopGoodsCategoryGuid) throw new CustomException("上级菜单不能选择与当前菜单一样的!"); - var response = await _ShopGoodsCategoryRepository.UpdateAsync(model); - return "修改成功!"; - } - else - { - var info = _ShopGoodsCategoryRepository.GetFirst(it => it.ShopGoodsCategoryGuid == model.ShopGoodsCategoryParentGuid); - model.ShopGoodsCategoryAncestralGuid = "0"; - if (info != null) model.ShopGoodsCategoryAncestralGuid = info.ShopGoodsCategoryAncestralGuid + "," + model.ShopGoodsCategoryParentGuid; - - var response = await _ShopGoodsCategoryRepository.InsertReturnSnowflakeIdAsync(model); - return "添加成功!"; - } - } - - #region Excel处理 - /// - /// 数据导入处理 - /// - public async Task HandleImportData(ShopGoodsCategoryVo ShopGoodsCategory, long userId, int index) - { - try - { - // 店铺名称转Guid - var shoper = await _ShopRepository.GetFirstAsync(s => s.ShopName == ShopGoodsCategory.ShopName); - if (shoper == null) throw new Exception($"找不到店铺【{ShopGoodsCategory.ShopName}】"); - - if (userId != 1) - { - var shop = await _ShopRepository.GetFirstAsync(s => s.ShopUserId == userId); - if (shop == null) throw new Exception("该用户没有店铺"); - // 店铺是否为自己的 - if (shop.ShopName != ShopGoodsCategory.ShopName) throw new Exception("只允许添加自己的店铺数据"); - } - ShopGoodsCategory.ShopGuid = shoper.ShopGuid; - - - // 上级类目名称转guid (本店铺的类目) - if (!string.IsNullOrEmpty(ShopGoodsCategory.ParentName)) - { - var category = await _ShopGoodsCategoryRepository.GetFirstAsync(s => s.ShopGoodsCategoryName == ShopGoodsCategory.ParentName && s.ShopGuid == ShopGoodsCategory.ShopGuid); - ShopGoodsCategory.ShopGoodsCategoryParentGuid = category.ShopGoodsCategoryGuid; - } - - // 显示状态 - var lable = ShopGoodsCategory.ShopGoodsCategoryDisplayStatusName; - ShopGoodsCategory.ShopGoodsCategoryDisplayStatus = Convert.ToInt32(_SysDictDataRepository.GetDictValueByName("display_status", lable)); - - return ShopGoodsCategory; - } - catch (Exception) - { - - throw; - } - } - - - /// - /// Excel导入 - /// - public async Task ImportExcel(ShopGoodsCategoryVo ShopGoodsCategoryVo, int index, bool isUpdateSupport, LoginUser user) - { - try - { - var category = await HandleImportData(ShopGoodsCategoryVo, user.UserId, index); - var ShopGoodsCategory = new ShopGoodsCategory - { - ShopGoodsCategoryId = category.ShopGoodsCategoryId, - ShopGoodsCategoryGuid = category.ShopGoodsCategoryGuid, - ShopGuid = category.ShopGuid, - ShopGoodsCategoryParentGuid = category.ShopGoodsCategoryParentGuid, - ShopGoodsCategoryName = category.ShopGoodsCategoryName, - ShopGoodsCategoryDisplayStatus = category.ShopGoodsCategoryDisplayStatus, - ShopGoodsCategorySort = category.ShopGoodsCategorySort - }; - - if (isUpdateSupport) - { - // 判断唯一值 - var model = await GetFirstAsync(s => s.ShopGoodsCategoryId == ShopGoodsCategory.ShopGoodsCategoryId); - - // 如果为空就新增数据 - if (model == null) - { - // 开启事务 - var res = await UseTranAsync(async () => - { - var addRes = await AddOrUpdateShopGoodsCategory(ShopGoodsCategory); - }); - var addStr = $"第 {index} 行 => 店铺商品类目:【{ShopGoodsCategory.ShopGoodsCategoryName}】新增成功!
"; - return addStr; - } - else - { - // 如果有数据就进行修改 - // 开启事务 - await UseTranAsync(async () => - { - ShopGoodsCategory.ShopGoodsCategoryId = model.ShopGoodsCategoryId; - ShopGoodsCategory.ShopGoodsCategoryGuid = model.ShopGoodsCategoryGuid; - ShopGoodsCategory.Update_by = user.UserName; - ShopGoodsCategory.Update_time = DateTime.Now; - var editRes = await AddOrUpdateShopGoodsCategory(ShopGoodsCategory); - }); - var editStr = $"第 {index} 行 => 店铺商品类目:【{ShopGoodsCategory.ShopGoodsCategoryName}】更新成功!
"; - return editStr; - } - } - else - { - // 开启事务 - var res = await UseTranAsync(async () => - { - var addRes = await AddOrUpdateShopGoodsCategory(ShopGoodsCategory); - }); - //Console.WriteLine(res.IsSuccess); - var addStr = $"第 {index} 行 => 店铺商品类目:【{ShopGoodsCategory.ShopGoodsCategoryName}】新增成功!
"; - return addStr; - } - } - catch (Exception ex) - { - var errorRes = $"第 {index} 行 => 店铺商品类目:【{ShopGoodsCategoryVo.ShopGoodsCategoryName}】导入失败!{ex.Message}
"; - return errorRes; - throw; - } - } - - - - /// - /// Excel数据导出处理 - /// - public async Task> HandleExportData(List data) - { - foreach (var item in data) - { - item.ShopGoodsCategoryDisplayStatusName = _SysDictDataRepository.GetDictNameByName("display_status", item.ShopGoodsCategoryDisplayStatus.ToString()); - } - return data; - } - - #endregion - - - - #endregion - - } -} diff --git a/ARW.Service/Business/BusinessService/LogisticsManage/DeliveryRules/DeliveryRuleService.cs b/ARW.Service/Business/BusinessService/LogisticsManage/DeliveryRules/DeliveryRuleService.cs deleted file mode 100644 index 9b30db6..0000000 --- a/ARW.Service/Business/BusinessService/LogisticsManage/DeliveryRules/DeliveryRuleService.cs +++ /dev/null @@ -1,170 +0,0 @@ -using Infrastructure.Attribute; -using Microsoft.AspNetCore.Http; -using SqlSugar; -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; -using Infrastructure; -using ARW.Model; -using ARW.Repository; -using ARW.Repository.Business.LogisticsManage.DeliveryRules; -using ARW.Service.Business.IBusinessService.LogisticsManage.DeliveryRules; -using ARW.Model.Dto.Business.LogisticsManage.DeliveryRules; -using ARW.Model.Models.Business.LogisticsManage.DeliveryRules; -using ARW.Model.Vo.Business.LogisticsManage.DeliveryRules; -using Newtonsoft.Json; -using Senparc.Weixin.WxOpen.AdvancedAPIs.Tcb; -using System.Text.RegularExpressions; -using ARW.Model.Models.Business.LogisticsManage.Deliverys; -using ARW.Repository.Business.LogisticsManage.Deliverys; -using ARW.Model.Dto.Business.LogisticsManage.Deliverys; -using ARW.Model.Models.Business.ShopManager.Shops; -using ARW.Model.Vo.Business.LogisticsManage.Deliverys; -using ARW.Model.Models.Business.Custom.Regions; -using ARW.Repository.Business.Custom.Regions; -using ARW.Model.Vo.Business.Custom.Regions; -using Org.BouncyCastle.Crypto.Prng; - -namespace ARW.Service.Business.BusinessService.LogisticsManage.DeliveryRules -{ - /// - /// 配送模板区域及运费接口实现类 - /// - /// @author lwh - /// @date 2023-06-16 - /// - [AppService(ServiceType = typeof(IDeliveryRuleService), ServiceLifetime = LifeTime.Transient)] - public class DeliveryRuleServiceImpl : BaseService, IDeliveryRuleService - { - private readonly DeliveryRuleRepository _DeliveryRuleRepository; - private readonly DeliveryRepository _DeliveryRepository; - private readonly RegionRepository _RegionRepository; - - public DeliveryRuleServiceImpl(DeliveryRuleRepository DeliveryRuleRepository, DeliveryRepository deliveryRepository, RegionRepository regionRepository) - { - this._DeliveryRuleRepository = DeliveryRuleRepository; - _DeliveryRepository = deliveryRepository; - _RegionRepository = regionRepository; - } - - #region 业务逻辑代码 - - - /// - /// 通过配送模板guid获取配送模板所关联的配送模板区域及运费列表 - /// - public async Task> GetDeliveryRuleList(long deliveryGuid) - { - var query = _DeliveryRuleRepository - .Queryable() - .Where(s => s.DeliveryGuid == deliveryGuid) - .OrderBy(s => s.Create_time, OrderByType.Asc) - .Select(s => new DeliveryRuleVo - { - DeliveryRuleId = s.DeliveryRuleId, - DeliveryGuid = s.DeliveryGuid, - DeliveryRuleRegionName = s.DeliveryRuleRegion, - DeliveryRuleRegion = new List(), - DeliveryRuleRegionText = s.DeliveryRuleRegionText, - DeliveryRuleFirst = s.DeliveryRuleFirst, - DeliveryRuleFirstFee = s.DeliveryRuleFirstFee, - DeliveryRuleAdditional = s.DeliveryRuleAdditional, - DeliveryRuleAdditionalFee = s.DeliveryRuleAdditionalFee, - }); - - - var list = await query.ToListAsync(); - - //foreach (var item in list) - //{ - // List DeliveryRuleRegionIds = item.DeliveryRuleRegionName.Split(',').Select(int.Parse).ToList(); - // var regionList = new List(); - - // foreach (var id in DeliveryRuleRegionIds) - // { - // var region = await _RegionRepository.GetFirstAsync(s => s.RegionId == id); - // if (region == null) throw new CustomException($"找不到Id:{id}的省市区数据"); - // var data = new SecondRegionVo - // { - // Id = region.RegionId, - // Label = region.RegionName, - // Pid = region.RegionPid, - // Code = region.RegionCode - // }; - // regionList.Add(data); - // } - - // item.DeliveryRuleRegion = regionList; - //} - - return list; - - } - - - /// - /// 通过配送模板guid获取配送模板所关联的配送模板区域及运费guid - /// - /// 配送模板guid - /// - public async Task> GetDeliveryRuleGuidListByDeliveryGuid(long deliveryGuid) - { - var list = await _DeliveryRuleRepository.GetListAsync(f => f.DeliveryGuid == deliveryGuid); - //return list; - return list.Select(x => x.DeliveryRuleGuid).ToList(); - } - - - - /// - /// 通过配送模板guid获取配送模板所关联的配送模板区域及运费名称 - /// - /// 配送模板guid - /// - public async Task GetDeliveryRuleNameByDeliveryGuid(long deliveryGuid) - { - var list = await _DeliveryRuleRepository - .Queryable() - .LeftJoin((s, c) => s.DeliveryRuleGuid == c.DeliveryRuleGuid) - .Where((s, c) => s.DeliveryGuid == deliveryGuid) - .Select() - .ToListAsync(); - - var res = list.Select(x => x.DeliveryRuleRegionText).ToArray(); - return res; - - //return string.Join(',', list.Select(x => x.DeliveryRuleName)); - } - - - - /// - /// 新增配送模板配送模板区域及运费 - /// - /// 配送模板区域及运费列表 - public async Task InsertDeliveryRuleAsync(List deliveryRuleList) - { - await _DeliveryRuleRepository.InsertRangeAsync(deliveryRuleList); - } - - - /// - /// 更新配送模板配送模板区域及运费 - /// - /// 配送模板区域及运费列表 - /// 配送模板guid - /// - public async Task UpdateDeliveryRuleAsync(List deliveryRuleList, long deliveryGuid) - { - await _DeliveryRuleRepository.DeleteAsync(s => s.DeliveryGuid == deliveryGuid); - await _DeliveryRuleRepository.InsertRangeAsync(deliveryRuleList); - } - - - - #endregion - - } -} diff --git a/ARW.Service/Business/BusinessService/LogisticsManage/Deliverys/DeliveryService.cs b/ARW.Service/Business/BusinessService/LogisticsManage/Deliverys/DeliveryService.cs deleted file mode 100644 index 53edf0b..0000000 --- a/ARW.Service/Business/BusinessService/LogisticsManage/Deliverys/DeliveryService.cs +++ /dev/null @@ -1,129 +0,0 @@ -using Infrastructure.Attribute; -using Microsoft.AspNetCore.Http; -using SqlSugar; -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; -using Infrastructure; -using ARW.Model; -using ARW.Repository; -using ARW.Repository.Business.LogisticsManage.Deliverys; -using ARW.Service.Business.IBusinessService.LogisticsManage.Deliverys; -using ARW.Model.Dto.Business.LogisticsManage.Deliverys; -using ARW.Model.Models.Business.LogisticsManage.Deliverys; -using ARW.Model.Vo.Business.LogisticsManage.Deliverys; -using Aliyun.OSS; -using ARW.Repository.Business.LogisticsManage.DeliveryRules; -using ARW.Service.Business.IBusinessService.LogisticsManage.DeliveryRules; -using ARW.Model.Models.Business.ShopManager.Shops; - -namespace ARW.Service.Business.BusinessService.LogisticsManage.Deliverys -{ - /// - /// 配送模板接口实现类 - /// - /// @author lwh - /// @date 2023-06-16 - /// - [AppService(ServiceType = typeof(IDeliveryService), ServiceLifetime = LifeTime.Transient)] - public class DeliveryServiceImpl : BaseService, IDeliveryService - { - private readonly DeliveryRepository _DeliveryRepository; - private readonly IDeliveryRuleService _DeliveryRuleService; - - public DeliveryServiceImpl(DeliveryRepository DeliveryRepository, IDeliveryRuleService deliveryRuleService) - { - this._DeliveryRepository = DeliveryRepository; - _DeliveryRuleService = deliveryRuleService; - } - - #region 业务逻辑代码 - - - /// - /// 查询配送模板分页列表 - /// - public async Task> GetDeliveryList(DeliveryQueryDto parm) - { - //开始拼装查询条件d - var predicate = Expressionable.Create(); - - predicate = predicate.AndIF(parm.ShopGuid != null, s => s.ShopGuid == parm.ShopGuid); - predicate = predicate.AndIF(!string.IsNullOrEmpty(parm.DeliveryName), s => s.DeliveryName.Contains(parm.DeliveryName)); - predicate = predicate.AndIF(parm.DeliveryBillingMethod != null, s => s.DeliveryBillingMethod == parm.DeliveryBillingMethod); - var query = _DeliveryRepository - .Queryable() - .LeftJoin((s, c) => s.ShopGuid == c.ShopGuid) - .Where(predicate.ToExpression()) - .WhereIF(!string.IsNullOrEmpty(parm.ShopName), (s, c) => c.ShopName.Contains(parm.ShopName)) - .OrderBy(s => s.DeliverySort, OrderByType.Asc) - .Select((s,c) => new DeliveryVo - { - DeliveryId = s.DeliveryId, - DeliveryGuid = s.DeliveryGuid, - ShopGuid = s.ShopGuid, - ShopName = c.ShopName, - DeliveryName = s.DeliveryName, - DeliveryBillingMethod = s.DeliveryBillingMethod, - DeliverySort = s.DeliverySort, - }); - - - return await query.ToPageAsync(parm); - } - - /// - /// 添加或修改配送模板 - /// - public async Task AddOrUpdateDelivery(Delivery model) - { - - if (model.DeliveryId != 0) - { - if (model.DeliveryRuleDataList.Count != 0) - { - await _DeliveryRuleService.UpdateDeliveryRuleAsync(model.DeliveryRuleDataList, model.DeliveryGuid); - } - var response = await _DeliveryRepository.UpdateAsync(model); - return "修改成功!"; - } - else - { - // 添加前判断是否有相同的配送模板 - var delivery = await _DeliveryRepository.GetFirstAsync(s => s.DeliveryName == model.DeliveryName && s.ShopGuid == model.ShopGuid); - if (delivery != null) { throw new CustomException($"{model.DeliveryName} 已存在!"); } - - var response = await _DeliveryRepository.InsertReturnSnowflakeIdAsync(model); - if (model.DeliveryRuleDataList.Count != 0 && response > 0) - { - foreach (var item in model.DeliveryRuleDataList) - { - item.DeliveryGuid = response; - } - await _DeliveryRuleService.InsertDeliveryRuleAsync(model.DeliveryRuleDataList); - } - return "添加成功!"; - } - } - - #region Excel处理 - - - /// - /// Excel数据导出处理 - /// - public async Task> HandleExportData(List data) - { - return data; - } - - #endregion - - - - #endregion - - } -} diff --git a/ARW.Service/Business/BusinessService/LogisticsManage/LogisticsCompanys/LogisticsCompanyService.cs b/ARW.Service/Business/BusinessService/LogisticsManage/LogisticsCompanys/LogisticsCompanyService.cs deleted file mode 100644 index 88cd1b8..0000000 --- a/ARW.Service/Business/BusinessService/LogisticsManage/LogisticsCompanys/LogisticsCompanyService.cs +++ /dev/null @@ -1,176 +0,0 @@ -using Infrastructure.Attribute; -using Microsoft.AspNetCore.Http; -using SqlSugar; -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; -using Infrastructure; -using ARW.Model; -using ARW.Repository; -using ARW.Repository.Business.LogisticsManage.LogisticsCompanys; -using ARW.Service.Business.IBusinessService.LogisticsManage.LogisticsCompanys; -using ARW.Model.Dto.Business.LogisticsManage.LogisticsCompanys; -using ARW.Model.Models.Business.LogisticsManage.LogisticsCompanys; -using ARW.Model.Vo.Business.LogisticsManage.LogisticsCompanys; - -namespace ARW.Service.Business.BusinessService.LogisticsManage.LogisticsCompanys -{ - /// - /// 物流公司接口实现类 - /// - /// @author lwh - /// @date 2023-06-18 - /// - [AppService(ServiceType = typeof(ILogisticsCompanyService), ServiceLifetime = LifeTime.Transient)] - public class LogisticsCompanyServiceImpl : BaseService, ILogisticsCompanyService - { - private readonly LogisticsCompanyRepository _LogisticsCompanyRepository; - - public LogisticsCompanyServiceImpl(LogisticsCompanyRepository LogisticsCompanyRepository) - { - this._LogisticsCompanyRepository = LogisticsCompanyRepository; - } - - #region 业务逻辑代码 - - - /// - /// 查询物流公司分页列表 - /// - public async Task> GetLogisticsCompanyList(LogisticsCompanyQueryDto parm) - { - //开始拼装查询条件d - var predicate = Expressionable.Create(); - - predicate = predicate.AndIF(!string.IsNullOrEmpty(parm.LogisticsCompanyName), s => s.LogisticsCompanyName.Contains(parm.LogisticsCompanyName)); - predicate = predicate.AndIF(!string.IsNullOrEmpty(parm.LogisticsCompanyCode), s => s.LogisticsCompanyCode.Contains(parm.LogisticsCompanyCode)); - var query = _LogisticsCompanyRepository - .Queryable() - .Where(predicate.ToExpression()) - .OrderBy(s => s.LogisticsCompanySort, OrderByType.Asc) - .Select(s => new LogisticsCompanyVo - { - LogisticsCompanyId = s.LogisticsCompanyId, - LogisticsCompanyGuid = s.LogisticsCompanyGuid, - LogisticsCompanyName = s.LogisticsCompanyName, - LogisticsCompanyCode = s.LogisticsCompanyCode, - LogisticsCompanySort = s.LogisticsCompanySort, - CreateTime = s.Create_time.ToString("yyyy-MM-dd HH:mm") - }); - - - return await query.ToPageAsync(parm); - } - - /// - /// 添加或修改物流公司 - /// - public async Task AddOrUpdateLogisticsCompany(LogisticsCompany model) - { - if (model.LogisticsCompanyId != 0) - { - var response = await _LogisticsCompanyRepository.UpdateAsync(model); - return "修改成功!"; - } - else - { - - var response = await _LogisticsCompanyRepository.InsertReturnSnowflakeIdAsync(model); - return "添加成功!"; - } - } - - #region Excel处理 - /// - /// 数据导入处理 - /// - public async Task HandleImportData(LogisticsCompanyVo LogisticsCompany) - { - return LogisticsCompany; - } - - - /// - /// Excel导入 - /// - public async Task ImportExcel(LogisticsCompany LogisticsCompany, int index, bool isUpdateSupport, string user) - { - try - { - // 空值判断 - // if (LogisticsCompany.LogisticsCompanyId == null) throw new CustomException("物流公司不能为空"); - var company = await GetFirstAsync(s => s.LogisticsCompanyName == LogisticsCompany.LogisticsCompanyName); - if (company != null) throw new CustomException("已存在!"); - - if (isUpdateSupport) - { - // 判断唯一值 - var model = await GetFirstAsync(s => s.LogisticsCompanyId == LogisticsCompany.LogisticsCompanyId); - - // 如果为空就新增数据 - if (model == null) - { - // 开启事务 - var res = await UseTranAsync(async () => - { - var addRes = await AddOrUpdateLogisticsCompany(LogisticsCompany); - }); - var addStr = $"第 {index} 行 => 物流公司:【{LogisticsCompany.LogisticsCompanyName}】新增成功!
"; - return addStr; - } - else - { - // 如果有数据就进行修改 - // 开启事务 - await UseTranAsync(async () => - { - LogisticsCompany.LogisticsCompanyId = model.LogisticsCompanyId; - LogisticsCompany.LogisticsCompanyGuid = model.LogisticsCompanyGuid; - LogisticsCompany.Update_by = user; - LogisticsCompany.Update_time = DateTime.Now; - var editRes = await AddOrUpdateLogisticsCompany(LogisticsCompany); - }); - var editStr = $"第 {index} 行 => 物流公司:【{LogisticsCompany.LogisticsCompanyName}】更新成功!
"; - return editStr; - } - } - else - { - // 开启事务 - var res = await UseTranAsync(async () => - { - var addRes = await AddOrUpdateLogisticsCompany(LogisticsCompany); - }); - //Console.WriteLine(res.IsSuccess); - var addStr = $"第 {index} 行 => 物流公司:【{LogisticsCompany.LogisticsCompanyName}】新增成功!
"; - return addStr; - } - } - catch (Exception ex) - { - var errorRes = $"第 {index} 行 => 物流公司:【{LogisticsCompany.LogisticsCompanyName}】导入失败!{ex.Message}
"; - return errorRes; - throw; - } - } - - - - /// - /// Excel数据导出处理 - /// - public async Task> HandleExportData(List data) - { - return data; - } - - #endregion - - - - #endregion - - } -} diff --git a/ARW.Service/Business/BusinessService/Marketing/CouponManage/Coupons/CouponService.cs b/ARW.Service/Business/BusinessService/Marketing/CouponManage/Coupons/CouponService.cs deleted file mode 100644 index 32c3321..0000000 --- a/ARW.Service/Business/BusinessService/Marketing/CouponManage/Coupons/CouponService.cs +++ /dev/null @@ -1,201 +0,0 @@ -using Infrastructure.Attribute; -using Microsoft.AspNetCore.Http; -using SqlSugar; -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; -using Infrastructure; -using ARW.Model; -using ARW.Repository; -using ARW.Repository.Business.Marketing.CouponManage.Coupons; -using ARW.Service.Business.IBusinessService.Marketing.CouponManage.Coupons; -using ARW.Model.Dto.Business.Marketing.CouponManage.Coupons; -using ARW.Model.Models.Business.Marketing.CouponManage.Coupons; -using ARW.Model.Vo.Business.Marketing.CouponManage.Coupons; -using ARW.Model.Models.Business.ShopManager.Shops; -using ARW.Common; -using MySqlX.XDevAPI.Relational; - -namespace ARW.Service.Business.BusinessService.Marketing.CouponManage.Coupons -{ - /// - /// 优惠券接口实现类 - /// - /// @author lwh - /// @date 2023-07-24 - /// - [AppService(ServiceType = typeof(ICouponService), ServiceLifetime = LifeTime.Transient)] - public class CouponServiceImpl : BaseService, ICouponService - { - private readonly CouponRepository _CouponRepository; - - public CouponServiceImpl(CouponRepository CouponRepository) - { - this._CouponRepository = CouponRepository; - } - - #region 业务逻辑代码 - - - /// - /// 查询优惠券分页列表 - /// - public async Task> GetCouponList(CouponQueryDto parm) - { - //开始拼装查询条件d - var predicate = Expressionable.Create(); - - predicate = predicate.AndIF(parm.ShopGuid != 0, s => s.ShopGuid == parm.ShopGuid); - predicate = predicate.AndIF(!string.IsNullOrEmpty(parm.CouponName), s => s.CouponName.Contains(parm.CouponName)); - predicate = predicate.AndIF(parm.CouponType != null, s => s.CouponType == parm.CouponType); - predicate = predicate.AndIF(parm.CouponExpireType != null, s => s.CouponExpireType == parm.CouponExpireType); - predicate = predicate.AndIF(parm.CouponApplicableScope != null, s => s.CouponApplicableScope == parm.CouponApplicableScope); - predicate = predicate.AndIF(parm.CouponDisplayStatus != null, s => s.CouponDisplayStatus == parm.CouponDisplayStatus); - var query = _CouponRepository - .Queryable() - .LeftJoin((s,c) => s.ShopGuid == c.ShopGuid) - .Where(predicate.ToExpression()) - .OrderBy(s => s.CouponSort, OrderByType.Asc) - .Select((s, c) => new CouponVo - { - CouponId = s.CouponId, - CouponGuid = s.CouponGuid, - ShopGuid = s.ShopGuid, - ShopName = c.ShopName, - CouponName = s.CouponName, - CouponDesc = s.CouponDesc, - CouponType = s.CouponType, - CouponUseIntro = s.CouponUseIntro, - CouponDeductionMoney = s.CouponDeductionMoney, - CouponDiscountRate = s.CouponDiscountRate, - CouponMinConsumeMoney = s.CouponMinConsumeMoney, - CouponExpireType = s.CouponExpireType, - CouponEffectiveDays = s.CouponEffectiveDays, - CouponFixedStartTime = s.CouponFixedStartTime, - CouponFixedEndTime = s.CouponFixedEndTime, - CouponApplicableScope = s.CouponApplicableScope, - CouponSendNumber = s.CouponSendNumber, - CouponGetNumber = s.CouponGetNumber, - CouponDisplayStatus = s.CouponDisplayStatus, - CouponSort = s.CouponSort, - CouponApplicableScopeConfig = s.CouponApplicableScopeConfig, - CouponGoodsIdsArr = s.CouponGoodsIds, - CouponStatus = s.CouponStatus, - }); - - - var list = await query.ToPageAsync(parm); - - return list; - } - - /// - /// 添加或修改优惠券 - /// - public async Task AddOrUpdateCoupon(Coupon model) - { - if (model.CouponId != 0) - { - var response = await _CouponRepository.UpdateAsync(model); - return "修改成功!"; - } - else - { - - var response = await _CouponRepository.InsertReturnSnowflakeIdAsync(model); - return "添加成功!"; - } - } - - #region Excel处理 - /// - /// 数据导入处理 - /// - public async Task HandleImportData(CouponVo Coupon) - { - return Coupon; - } - - - /// - /// Excel导入 - /// - public async Task ImportExcel(Coupon Coupon, int index, bool isUpdateSupport, string user) - { - try - { - // 空值判断 - // if (Coupon.CouponId == null) throw new CustomException("优惠券不能为空"); - - if (isUpdateSupport) - { - // 判断唯一值 - var model = await GetFirstAsync(s => s.CouponId == Coupon.CouponId); - - // 如果为空就新增数据 - if (model == null) - { - // 开启事务 - var res = await UseTranAsync(async () => - { - var addRes = await AddOrUpdateCoupon(Coupon); - }); - var addStr = $"第 {index} 行 => 优惠券:【{Coupon.CouponId}】新增成功!
"; - return addStr; - } - else - { - // 如果有数据就进行修改 - // 开启事务 - await UseTranAsync(async () => - { - Coupon.CouponId = model.CouponId; - Coupon.CouponGuid = model.CouponGuid; - Coupon.Update_by = user; - Coupon.Update_time = DateTime.Now; - var editRes = await AddOrUpdateCoupon(Coupon); - }); - var editStr = $"第 {index} 行 => 优惠券:【{Coupon.CouponId}】更新成功!
"; - return editStr; - } - } - else - { - // 开启事务 - var res = await UseTranAsync(async () => - { - var addRes = await AddOrUpdateCoupon(Coupon); - }); - //Console.WriteLine(res.IsSuccess); - var addStr = $"第 {index} 行 => 优惠券:【{Coupon.CouponId}】新增成功!
"; - return addStr; - } - } - catch (Exception ex) - { - var errorRes = $"第 {index} 行 => 优惠券:【{Coupon.CouponId}】导入失败!{ex.Message}
"; - return errorRes; - throw; - } - } - - - - /// - /// Excel数据导出处理 - /// - public async Task> HandleExportData(List data) - { - return data; - } - - #endregion - - - - #endregion - - } -} diff --git a/ARW.Service/Business/BusinessService/Marketing/CouponManage/CustomerCoupons/CustomerCouponService.cs b/ARW.Service/Business/BusinessService/Marketing/CouponManage/CustomerCoupons/CustomerCouponService.cs deleted file mode 100644 index 2975b26..0000000 --- a/ARW.Service/Business/BusinessService/Marketing/CouponManage/CustomerCoupons/CustomerCouponService.cs +++ /dev/null @@ -1,110 +0,0 @@ -using Infrastructure.Attribute; -using Microsoft.AspNetCore.Http; -using SqlSugar; -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; -using Infrastructure; -using ARW.Model; -using ARW.Repository; -using ARW.Repository.Business.Marketing.CouponManage.CustomerCoupons; -using ARW.Service.Business.IBusinessService.Marketing.CouponManage.CustomerCoupons; -using ARW.Model.Dto.Business.Marketing.CouponManage.CustomerCoupons; -using ARW.Model.Models.Business.Marketing.CouponManage.CustomerCoupons; -using ARW.Model.Vo.Business.Marketing.CouponManage.CustomerCoupons; -using ARW.Repository.Business.Marketing.CouponManage.Coupons; -using ARW.Model.Models.Business.Marketing.CouponManage.Coupons; -using ARW.Model.Models.Business.Custom.Customers; - -namespace ARW.Service.Business.BusinessService.Marketing.CouponManage.CustomerCoupons -{ - /// - /// 领券记录接口实现类 - /// - /// @author lwh - /// @date 2023-07-31 - /// - [AppService(ServiceType = typeof(ICustomerCouponService), ServiceLifetime = LifeTime.Transient)] - public class CustomerCouponServiceImpl : BaseService, ICustomerCouponService - { - private readonly CustomerCouponRepository _CustomerCouponRepository; - private readonly CouponRepository _CouponRepository; - - public CustomerCouponServiceImpl(CustomerCouponRepository CustomerCouponRepository, CouponRepository couponRepository) - { - this._CustomerCouponRepository = CustomerCouponRepository; - _CouponRepository = couponRepository; - } - - #region 业务逻辑代码 - - - /// - /// 查询领券记录分页列表 - /// - public async Task> GetCustomerCouponList(CustomerCouponQueryDto parm) - { - //开始拼装查询条件d - var predicate = Expressionable.Create(); - - predicate = predicate.AndIF(parm.CustomerCouponIsExpired != null, s => s.CustomerCouponIsExpired == parm.CustomerCouponIsExpired); - predicate = predicate.AndIF(parm.CustomerCouponIsUsed != null, s => s.CustomerCouponIsUsed == parm.CustomerCouponIsUsed); - var query = _CustomerCouponRepository - .Queryable() - .LeftJoin((s, c) => s.CustomerGuid == c.CustomerGuid) - .LeftJoin((s, c, d) => s.CouponGuid == d.CouponGuid) - .Where(predicate.ToExpression()) - .OrderBy(s => s.Create_time, OrderByType.Desc) - .Select((s, c, d) => new CustomerCouponVo - { - CustomerCouponId = s.CustomerCouponId, - CustomerCouponGuid = s.CustomerCouponGuid, - CouponName = d.CouponName, - CustomerName = c.CustomerNickname, - CouponGuid = s.CouponGuid, - CustomerGuid = s.CustomerGuid, - CustomerCouponIsExpired = s.CustomerCouponIsExpired, - CustomerCouponIsUsed = s.CustomerCouponIsUsed, - }); - - - return await query.ToPageAsync(parm); - } - - /// - /// 添加或修改领券记录 - /// - public async Task AddOrUpdateCustomerCoupon(CustomerCoupon model) - { - if (model.CustomerCouponId != 0) - { - var response = await _CustomerCouponRepository.UpdateAsync(model); - return "修改成功!"; - } - else - { - var response = await _CustomerCouponRepository.InsertReturnSnowflakeIdAsync(model); - if (response != 0) - { - await _CouponRepository.UpdateAsync(f => new Coupon - { - CouponGetNumber = f.CouponGetNumber + 1 - }, s => s.CouponGuid == model.CouponGuid); - } - return "添加成功!"; - } - } - - #region Excel处理 - - - #endregion - - - - #endregion - - } -} diff --git a/ARW.Service/Business/BusinessService/OrderManage/OrderCustomerAddreses/OrderCustomerAddressService.cs b/ARW.Service/Business/BusinessService/OrderManage/OrderCustomerAddreses/OrderCustomerAddressService.cs deleted file mode 100644 index 8437c91..0000000 --- a/ARW.Service/Business/BusinessService/OrderManage/OrderCustomerAddreses/OrderCustomerAddressService.cs +++ /dev/null @@ -1,98 +0,0 @@ -using Infrastructure.Attribute; -using Microsoft.AspNetCore.Http; -using SqlSugar; -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; -using Infrastructure; -using ARW.Model; -using ARW.Repository; -using ARW.Repository.Business.OrderManage.OrderCustomerAddreses; -using ARW.Service.Business.IBusinessService.OrderManage.OrderCustomerAddreses; -using ARW.Model.Dto.Business.OrderManage.OrderCustomerAddreses; -using ARW.Model.Models.Business.OrderManage.OrderCustomerAddreses; -using ARW.Model.Vo.Business.OrderManage.OrderCustomerAddreses; - -namespace ARW.Service.Business.BusinessService.OrderManage.OrderCustomerAddreses -{ - /// - /// 订单收货地址记录接口实现类 - /// - /// @author lwh - /// @date 2023-08-29 - /// - [AppService(ServiceType = typeof(IOrderCustomerAddressService), ServiceLifetime = LifeTime.Transient)] - public class OrderCustomerAddressServiceImpl : BaseService, IOrderCustomerAddressService - { - private readonly OrderCustomerAddressRepository _OrderCustomerAddressRepository; - - public OrderCustomerAddressServiceImpl(OrderCustomerAddressRepository OrderCustomerAddressRepository) - { - this._OrderCustomerAddressRepository = OrderCustomerAddressRepository; - } - - #region 业务逻辑代码 - - - /// - /// 查询订单收货地址记录分页列表 - /// - public async Task> GetOrderCustomerAddressList(OrderCustomerAddressQueryDto parm) - { - //开始拼装查询条件d - var predicate = Expressionable.Create(); - - var query = _OrderCustomerAddressRepository - .Queryable() - .Where(predicate.ToExpression()) - .OrderBy(s => s.Update_time,OrderByType.Desc) - .Select(s => new OrderCustomerAddressVo - { - OrderCustomerAddressId = s.OrderCustomerAddressId, - OrderCustomerAddressGuid = s.OrderCustomerAddressGuid, - OrderGuid = s.OrderGuid, - CustomerGuid = s.CustomerGuid, - CustomerAddressGuid = s.CustomerAddressGuid, - ConsigneeName = s.ConsigneeName, - Phont = s.Phont, - ProvinceId = s.ProvinceId, - CityId = s.CityId, - RegionId = s.RegionId, - Detail = s.Detail, - }); - - - return await query.ToPageAsync(parm); - } - - /// - /// 添加或修改订单收货地址记录 - /// - public async Task AddOrUpdateOrderCustomerAddress(OrderCustomerAddress model) - { - if (model.OrderCustomerAddressId != 0) - { - var response = await _OrderCustomerAddressRepository.UpdateAsync(model); - return "修改成功!"; - } - else - { - - var response = await _OrderCustomerAddressRepository.InsertReturnSnowflakeIdAsync(model); - return "添加成功!"; - } - } - - #region Excel处理 - - - #endregion - - - -#endregion - - } -} diff --git a/ARW.Service/Business/BusinessService/OrderManage/OrderGoodss/OrderGoodsService.cs b/ARW.Service/Business/BusinessService/OrderManage/OrderGoodss/OrderGoodsService.cs deleted file mode 100644 index 12020c4..0000000 --- a/ARW.Service/Business/BusinessService/OrderManage/OrderGoodss/OrderGoodsService.cs +++ /dev/null @@ -1,95 +0,0 @@ -using Infrastructure.Attribute; -using Microsoft.AspNetCore.Http; -using SqlSugar; -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; -using Infrastructure; -using ARW.Model; -using ARW.Repository; -using ARW.Repository.Business.OrderManage.OrderGoodss; -using ARW.Service.Business.IBusinessService.OrderManage.OrderGoodss; -using ARW.Model.Dto.Business.OrderManage.OrderGoodss; -using ARW.Model.Models.Business.OrderManage.OrderGoodss; -using ARW.Model.Vo.Business.OrderManage.OrderGoodss; - -namespace ARW.Service.Business.BusinessService.OrderManage.OrderGoodss -{ - /// - /// 订单商品记录接口实现类 - /// - /// @author lwh - /// @date 2023-09-01 - /// - [AppService(ServiceType = typeof(IOrderGoodsService), ServiceLifetime = LifeTime.Transient)] - public class OrderGoodsServiceImpl : BaseService, IOrderGoodsService - { - private readonly OrderGoodsRepository _OrderGoodsRepository; - - public OrderGoodsServiceImpl(OrderGoodsRepository OrderGoodsRepository) - { - this._OrderGoodsRepository = OrderGoodsRepository; - } - - #region 业务逻辑代码 - - - /// - /// 查询订单商品记录分页列表 - /// - public async Task> GetOrderGoodsList(OrderGoodsQueryDto parm) - { - //开始拼装查询条件d - var predicate = Expressionable.Create(); - - var query = _OrderGoodsRepository - .Queryable() - .Where(predicate.ToExpression()) - .OrderBy(s => s.Update_time,OrderByType.Desc) - .Select(s => new OrderGoodsVo - { - OrderGoodsId = s.OrderGoodsId, - OrderGoodsGuid = s.OrderGoodsGuid, - OrderGuid = s.OrderGuid, - GoodsGuid = s.GoodsGuid, - GoodsSkuId = s.GoodsSkuId, - GoodsPrice = s.GoodsPrice, - GoodsTotalNum = s.GoodsTotalNum, - GoodsTotalAmoun = s.GoodsTotalAmoun, - }); - - - return await query.ToPageAsync(parm); - } - - /// - /// 添加或修改订单商品记录 - /// - public async Task AddOrUpdateOrderGoods(OrderGoods model) - { - if (model.OrderGoodsId != 0) - { - var response = await _OrderGoodsRepository.UpdateAsync(model); - return "修改成功!"; - } - else - { - - var response = await _OrderGoodsRepository.InsertReturnSnowflakeIdAsync(model); - return "添加成功!"; - } - } - - #region Excel处理 - - - #endregion - - - -#endregion - - } -} diff --git a/ARW.Service/Business/BusinessService/OrderManage/OrderRefunds/OrderRefundService.cs b/ARW.Service/Business/BusinessService/OrderManage/OrderRefunds/OrderRefundService.cs deleted file mode 100644 index fb513d7..0000000 --- a/ARW.Service/Business/BusinessService/OrderManage/OrderRefunds/OrderRefundService.cs +++ /dev/null @@ -1,296 +0,0 @@ -using Infrastructure.Attribute; -using Microsoft.AspNetCore.Http; -using SqlSugar; -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; -using Infrastructure; -using ARW.Model; -using ARW.Repository; -using ARW.Repository.Business.OrderManage.OrderRefunds; -using ARW.Service.Business.IBusinessService.OrderManage.OrderRefunds; -using ARW.Model.Dto.Business.OrderManage.OrderRefunds; -using ARW.Model.Models.Business.OrderManage.OrderRefunds; -using ARW.Model.Vo.Business.OrderManage.OrderRefunds; -using ARW.Model.Models.Business.Custom.Customers; -using ARW.Service.Business.IBusinessService.GoodsManager.GoodsSpecs.GoodsSkus; -using ARW.Service.Business.IBusinessService.OrderManage.Orders; -using ARW.Model.Models.Business.OrderManage.Orders; -using ARW.Model.Dto.Api.OrderManage.OrderRefunds; -using ARW.Model.Vo.Api.OrderManage.OrderRefunds; -using ARW.Common; -using ARW.Model.Vo.Business.OrderManage.Orders; -using Senparc.CO2NET.Extensions; -using ARW.Model.Models.Business.LogisticsManage.LogisticsCompanys; -using ARW.Model.Models.Business.ShopManager.ShopAddresss; -using ARW.Repository.Business.ShopManager.ShopAddresss; -using ARW.Service.Business.IBusinessService.Custom.Regions; -using ARW.Repository.Business.LogisticsManage.LogisticsCompanys; - -namespace ARW.Service.Business.BusinessService.OrderManage.OrderRefunds -{ - /// - /// 售后单记录表接口实现类 - /// - /// @author lwh - /// @date 2023-08-29 - /// - [AppService(ServiceType = typeof(IOrderRefundService), ServiceLifetime = LifeTime.Transient)] - public class OrderRefundServiceImpl : BaseService, IOrderRefundService - { - private readonly OrderRefundRepository _OrderRefundRepository; - private readonly ShopAddressRepository _ShopAddressRepository; - private readonly LogisticsCompanyRepository _LogisticsCompanyRepository; - private readonly IOrderService _OrderService; - private readonly IRegionService _RegionService; - - - public OrderRefundServiceImpl(OrderRefundRepository OrderRefundRepository, IOrderService orderService, ShopAddressRepository shopAddressRepository, IRegionService regionService, LogisticsCompanyRepository logisticsCompanyRepository) - { - this._OrderRefundRepository = OrderRefundRepository; - _OrderService = orderService; - _ShopAddressRepository = shopAddressRepository; - _RegionService = regionService; - _LogisticsCompanyRepository = logisticsCompanyRepository; - } - - #region 业务逻辑代码 - - - /// - /// 查询售后单记录表分页列表 - /// - public async Task> GetOrderRefundList(OrderRefundQueryDto parm) - { - //开始拼装查询条件d - var predicate = Expressionable.Create(); - - predicate = predicate.AndIF(parm.ShopGuid != 0, s => s.ShopGuid == parm.ShopGuid); - predicate = predicate.AndIF(parm.RefundType != null, s => s.RefundType == parm.RefundType); - predicate = predicate.AndIF(parm.RefundReason != null, s => s.RefundReason == parm.RefundReason); - predicate = predicate.AndIF(parm.GoodsReceiveStatus != null, s => s.GoodsReceiveStatus == parm.GoodsReceiveStatus); - predicate = predicate.AndIF(parm.MerchantAuditStatus != null, s => s.MerchantAuditStatus == parm.MerchantAuditStatus); - predicate = predicate.AndIF(parm.IsCustomerSend != null, s => s.IsCustomerSend == parm.IsCustomerSend); - predicate = predicate.AndIF(parm.OrderRefundStatus != null, s => s.OrderRefundStatus == parm.OrderRefundStatus); - 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 = _OrderRefundRepository - .Queryable() - .LeftJoin((s, c) => s.CustomerGuid == c.CustomerGuid) - .LeftJoin((s, c, d) => s.OrderGuid == d.OrderGuid) - .Where(predicate.ToExpression()) - .OrderBy(s => s.Create_time, OrderByType.Desc) - .Select((s, c, d) => new OrderRefundVo - { - OrderRefundId = s.OrderRefundId, - OrderRefundGuid = s.OrderRefundGuid, - OrderGuid = s.OrderGuid, - ShopGuid = s.ShopGuid, - OrderNumber = d.OrderNumber, - PayPrice = d.PayPrice, - ExpressPrice = d.ExpressPrice, - CustomerGuid = s.CustomerGuid, - CustomerNickName = c.CustomerNickname, - CustomerMobilePhoneNumber = c.CustomerMobilePhoneNumber, - CustomerAvatar = c.CustomerAvatar, - RefundType = s.RefundType, - RefundReason = s.RefundReason, - CustomerRefundDesc = s.CustomerRefundDesc, - CustomerRefundImg = s.CustomerRefundImg, - GoodsReceiveStatus = s.GoodsReceiveStatus, - MerchantAuditStatus = s.MerchantAuditStatus, - MerchantRefuseDesc = s.MerchantRefuseDesc, - RefundMoney = s.RefundMoney, - ShopRefundAddressGuid = s.ShopRefundAddressGuid, - IsCustomerSend = s.IsCustomerSend, - CustomerSendTime = s.CustomerSendTime, - LogisticsCompanyGuid = s.LogisticsCompanyGuid, - ExpressNo = s.ExpressNo, - OrderRefundStatus = s.OrderRefundStatus, - IsMerchantReceive = s.IsMerchantReceive, - CreateTime = s.Create_time.ToString("yyyy-MM-dd hh:mm") - }); - - - var list = await query.ToPageAsync(parm); - - foreach (var item in list.Result) - { - // 获取订单商品信息 - item.GoodsInfoList = await _OrderService.GetOrderGoodsList(item.OrderGuid); - - } - - return list; - } - - - - /// - /// 查询售后单记录表详情 - /// - /// - /// - public async Task GetOrderRefundDetails(OrderRefundDetailsDto parm) - { - - var query = _OrderRefundRepository - .Queryable() - .LeftJoin((s, c) => s.CustomerGuid == c.CustomerGuid) - .LeftJoin((s, c, d) => s.OrderGuid == d.OrderGuid) - .Where(s => s.OrderRefundId == parm.OrderRefundId) - .Select((s, c, d) => new OrderRefundDetailVo - { - OrderRefundId = s.OrderRefundId, - OrderRefundGuid = s.OrderRefundGuid, - ShopGuid = s.ShopGuid, - OrderGuid = s.OrderGuid, - OrderNumber = d.OrderNumber, - CustomerPhone = c.CustomerMobilePhoneNumber, - RefundType = s.RefundType, - RefundReason = s.RefundReason, - CustomerRefundDesc = s.CustomerRefundDesc, - CustomerRefundImg = s.CustomerRefundImg, - GoodsReceiveStatus = s.GoodsReceiveStatus, - MerchantAuditStatus = s.MerchantAuditStatus, - MerchantRefuseDesc = s.MerchantRefuseDesc, - RefundMoney = s.RefundActualMoney, - ShopRefundAddressGuid = s.ShopRefundAddressGuid, - IsCustomerSend = s.IsCustomerSend, - CustomerSendTime = s.CustomerSendTime, - LogisticsCompanyGuid = s.LogisticsCompanyGuid, - ExpressNo = s.ExpressNo, - OrderRefundStatus = s.OrderRefundStatus, - IsMerchantReceive = s.IsMerchantReceive, - CreateTime = s.Create_time.ToString("yyyy-MM-dd hh:mm") - }).Take(1); - - - var json = await query.ToJsonAsync(); - if (json != "[]") - { - var data = Tools.JsonToVo(json); - data.GoodsInfoList = await _OrderService.GetOrderGoodsList(data.OrderGuid); - data.OrderReceive = await GetOrderReceive(data.ShopRefundAddressGuid); - if (data.LogisticsCompanyGuid != null) - { - var company = await _LogisticsCompanyRepository.GetFirstAsync(s => s.LogisticsCompanyGuid == data.LogisticsCompanyGuid); - data.LogisticsCompany = company.LogisticsCompanyName; - } - - json = data.ToJson(); - } - - return json; - } - - - - /// - /// 审核售后订单 - /// - public async Task AuditOrderRefund(OrderRefundAuditDto parm) - { - var str = "审核成功!"; - // 同意 - if (parm.IsAgree == true) - { - var orderRefund = await _OrderRefundRepository.GetFirstAsync(s => s.OrderRefundGuid == parm.OrderRefundGuid); - - if(orderRefund.RefundType == 1) - { - await _OrderRefundRepository.UpdateAsync(f => new OrderRefund - { - MerchantAuditStatus = 2, - ShopRefundAddressGuid = parm.ShopAddressGuid, - }, s => s.OrderRefundGuid == parm.OrderRefundGuid); - } - if(orderRefund.RefundType == 2) - { - await _OrderRefundRepository.UpdateAsync(f => new OrderRefund - { - MerchantAuditStatus = 2, - OrderRefundStatus = 3, - }, s => s.OrderRefundGuid == parm.OrderRefundGuid); - } - - - str = "同意申请!"; - } - // 拒绝 - if (parm.IsAgree == false) - { - await _OrderRefundRepository.UpdateAsync(f => new OrderRefund - { - MerchantAuditStatus = 3, - MerchantRefuseDesc = parm.MerchantRefuseDesc, - OrderRefundStatus = 2 - }, s => s.OrderRefundGuid == parm.OrderRefundGuid); - - str = "拒绝申请!"; - } - - return str; - } - - - /// - /// 商家确认收货 - /// - public async Task ConfirmsReceipt(OrderRefundAuditDto parm) - { - await _OrderRefundRepository.UpdateAsync(f => new OrderRefund - { - IsMerchantReceive = 2, - MerchantReceiveTime = DateTime.Now, - OrderRefundStatus = 3 - }, s => s.OrderRefundGuid == parm.OrderRefundGuid); - - return "确认收货成功"; - } - - - #region Excel处理 - - - /// - /// Excel数据导出处理 - /// - public async Task> HandleExportData(List data) - { - return data; - } - - #endregion - - - - /// - /// 获取商家收货地址 - /// - /// 商家退货地址guid - /// - public async Task GetOrderReceive(long? shopAddressGuid) - { - var orderReceive = new OrderReceiveVo(); - var shopAddress = await _ShopAddressRepository.GetFirstAsync(s => s.ShopAddressGuid == shopAddressGuid); - - if (shopAddress != null) - { - orderReceive.ConsigneeName = shopAddress.ShopAddressContactName; - orderReceive.Phone = shopAddress.ShopAddressContactNumber; - orderReceive.Detail = shopAddress.ShopAddressDetailedAddress; - - // 获取地区名称 - orderReceive.Region = await _RegionService.GetRegionFullName(shopAddress.ProvinceId, shopAddress.CityId, shopAddress.DistrictId); - } - - return orderReceive; - } - - #endregion - - } -} diff --git a/ARW.Service/Business/BusinessService/OrderManage/Orders/OrderService.cs b/ARW.Service/Business/BusinessService/OrderManage/Orders/OrderService.cs deleted file mode 100644 index 94efe6c..0000000 --- a/ARW.Service/Business/BusinessService/OrderManage/Orders/OrderService.cs +++ /dev/null @@ -1,377 +0,0 @@ -using Infrastructure.Attribute; -using Microsoft.AspNetCore.Http; -using SqlSugar; -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; -using Infrastructure; -using ARW.Model; -using ARW.Repository; -using ARW.Repository.Business.OrderManage.Orders; -using ARW.Service.Business.IBusinessService.OrderManage.Orders; -using ARW.Model.Dto.Business.OrderManage.Orders; -using ARW.Model.Models.Business.OrderManage.Orders; -using ARW.Model.Vo.Business.OrderManage.Orders; -using ARW.Repository.Business.GoodsManager.Goodss; -using ARW.Repository.Business.GoodsManager.GoodsSpecs.GoodsSkus; -using ARW.Service.Business.IBusinessService.GoodsManager.GoodsSpecs.GoodsSkus; -using ARW.Model.Models.Business.Custom.Customers; -using ARW.Repository.Business.OrderManage.OrderGoodss; -using ARW.Model.Models.Business.GoodsManager.Goodss; -using ARW.Model.Dto.Api.OrderManage.Orders; -using ARW.Model.Vo.Api.OrderManage.Orders; -using Aliyun.OSS; -using Senparc.Weixin.WxOpen.AdvancedAPIs.WxApp.WxAppJson; -using ARW.Common; -using Org.BouncyCastle.Crypto.Prng; -using Senparc.CO2NET.Extensions; -using ARW.Repository.Business.OrderManage.OrderCustomerAddreses; -using ARW.Service.Business.IBusinessService.Custom.Regions; -using ARW.Repository.Business.Payments; - -namespace ARW.Service.Business.BusinessService.OrderManage.Orders -{ - /// - /// 订单接口实现类 - /// - /// @author lwh - /// @date 2023-08-29 - /// - [AppService(ServiceType = typeof(IOrderService), ServiceLifetime = LifeTime.Transient)] - public class OrderServiceImpl : BaseService, IOrderService - { - private readonly OrderRepository _OrderRepository; - private readonly OrderGoodsRepository _OrderGoodsRepository; - private readonly OrderCustomerAddressRepository _OrderCustomerAddressRepository; - private readonly GoodsRepository _GoodsRepository; - private readonly PaymentRepository _PaymentRepository; - private readonly IGoodsSkuService _GoodsSkuService; - private readonly IRegionService _RegionService; - - public OrderServiceImpl(OrderRepository OrderRepository, GoodsRepository goodsRepository, IGoodsSkuService goodsSkuService, OrderGoodsRepository orderGoodsRepository, OrderCustomerAddressRepository orderCustomerAddressRepository, IRegionService regionService, PaymentRepository paymentRepository) - { - this._OrderRepository = OrderRepository; - _GoodsRepository = goodsRepository; - _GoodsSkuService = goodsSkuService; - _OrderGoodsRepository = orderGoodsRepository; - _OrderCustomerAddressRepository = orderCustomerAddressRepository; - _RegionService = regionService; - _PaymentRepository = paymentRepository; - } - - #region 业务逻辑代码 - - - /// - /// 查询订单分页列表 - /// - public async Task> GetOrderList(OrderQueryDto parm) - { - //开始拼装查询条件d - var predicate = Expressionable.Create(); - - predicate = predicate.AndIF(parm.ShopGuid != 0, s => s.ShopGuid == parm.ShopGuid); - predicate = predicate.AndIF(!string.IsNullOrEmpty(parm.OrderNumber), s => s.OrderNumber.Contains(parm.OrderNumber)); - predicate = predicate.AndIF(!string.IsNullOrEmpty(parm.LogisticsTrackingNumber), s => s.LogisticsTrackingNumber.Contains(parm.LogisticsTrackingNumber)); - predicate = predicate.AndIF(parm.PayType != null, s => s.PayType == parm.PayType); - predicate = predicate.AndIF(parm.PayStatus != null, s => s.PayStatus == parm.PayStatus); - predicate = predicate.AndIF(parm.DeliveryType != null, s => s.DeliveryType == parm.DeliveryType); - 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 - { - OrderId = s.OrderId, - OrderGuid = s.OrderGuid, - CustomerGuid = s.CustomerGuid, - CustomerNickName = c.CustomerNickname, - CustomerMobilePhoneNumber = c.CustomerMobilePhoneNumber, - CustomerAvatar = c.CustomerAvatar, - OrderNumber = s.OrderNumber, - OrderAmount = s.OrderAmount, - PayPrice = s.PayPrice, - PayType = s.PayType, - PayStatus = s.PayStatus, - DeliveryType = s.DeliveryType, - ExpressPrice = s.ExpressPrice, - DeliveryStatus = s.DeliveryStatus, - ReceiptStatus = s.ReceiptStatus, - OrderStatus = s.OrderStatus, - CreateTime = s.Create_time - }); - - var list = await query.ToPageAsync(parm); - - foreach (var item in list.Result) - { - // 获取订单商品信息 - item.GoodsInfoList = await GetOrderGoodsList(item.OrderGuid); - - } - - return list; - } - - - /// - /// 查询订单详情 - /// - /// - /// - public async Task GetOrderDetails(OrderDetailDto parm) - { - - var query = _OrderRepository - .Queryable() - .LeftJoin((s, c) => s.CustomerGuid == c.CustomerGuid) - .Where(s => s.OrderId == parm.OrderId) - .Select((s, c) => new OrderDetailsVo - { - OrderId = s.OrderId, - OrderGuid = s.OrderGuid, - CustomerPhone = c.CustomerMobilePhoneNumber, - OrderNumber = s.OrderNumber, - GoodsTotalAmoun = s.GoodsTotalAmoun, - OrderAmount = s.OrderAmount, - CouponGuid = s.CouponGuid, - CouponMoney = s.CouponMoney, - PointsMoney = s.PointsMoney, - PointsNum = s.PointsNum, - PayPrice = s.PayPrice, - UpdatePrice = s.UpdatePrice, - OrderRemark = s.OrderRemark, - PayType = s.PayType, - PayStatus = s.PayStatus, - PayTime = s.PayTime, - DeliveryType = s.DeliveryType, - ExpressPrice = s.ExpressPrice, - LogisticsCompanyGuid = s.LogisticsCompanyGuid, - LogisticsCompany = s.LogisticsCompany, - LogisticsTrackingNumber = s.LogisticsTrackingNumber, - DeliveryStatus = s.DeliveryStatus, - DeliveryTime = s.DeliveryTime, - ReceiptStatus = s.ReceiptStatus, - ReceiptTime = s.ReceiptTime, - OrderStatus = s.OrderStatus, - PointsBonus = s.PointsBonus, - IsSettled = s.IsSettled, - TransactionId = s.TransactionId, - IsComment = s.IsComment, - OrderSource = s.OrderSource, - CreateTime = s.Create_time, - }).Take(1); - - var json = await query.ToJsonAsync(); - if (json != "[]") - { - var data = Tools.JsonToVo(json); - data.GoodsInfoList = await GetOrderGoodsList(data.OrderGuid); - data.OrderReceive = await GetOrderReceive(data.OrderGuid); - - json = data.ToJson(); - } - - return json; - } - - - - /// - /// 发货 - /// - /// - public async Task Deliver(OrderDeliverDto parm) - { - var isUpdate = await _OrderRepository.UpdateAsync(s => new Order - { - LogisticsCompanyGuid = parm.LogisticsCompanyGuid, - LogisticsCompany = parm.LogisticsCompany, - LogisticsTrackingNumber = parm.LogisticsTrackingNumber, - DeliveryStatus = 2, - DeliveryTime = DateTime.Now, - Update_time = DateTime.Now - }, f => f.OrderGuid == parm.OrderGuid); - - if (isUpdate) - return "发货成功"; - else - throw new CustomException("发货失败"); - - } - - - /// - /// 订单改价 - /// - /// - public async Task ChangePrice(OrderChangePriceDto parm) - { - var isUpdate = await _OrderRepository.UpdateAsync(s => new Order - { - UpdatePrice = parm.ExpressPrice + parm.OrderAmount, - Update_time = DateTime.Now - }, f => f.OrderGuid == parm.OrderGuid); - - if (isUpdate) - return "改价成功"; - else - throw new CustomException("改价失败"); - - } - - - /// - /// 审核取消订单 - /// - /// - public async Task CancelOrder(OrderCancelOrderDto parm) - { - if (parm.IsAgree) - { - var isUpdate = await _OrderRepository.UpdateAsync(s => new Order - { - OrderStatus = 2, - Update_time = DateTime.Now - }, f => f.OrderGuid == parm.OrderGuid); - - if (isUpdate) - return "通过申请成功"; - else - throw new CustomException("通过申请失败"); - } - else - { - var isUpdate = await _OrderRepository.UpdateAsync(s => new Order - { - OrderStatus = 1, - Update_time = DateTime.Now - }, f => f.OrderGuid == parm.OrderGuid); - - if (isUpdate) - return "拒绝申请成功"; - else - throw new CustomException("拒绝申请失败"); - } - - } - - - /// - /// 添加或修改订单 - /// - public async Task AddOrUpdateOrder(Order model) - { - if (model.OrderId != 0) - { - var response = await _OrderRepository.UpdateAsync(model); - return "修改成功!"; - } - else - { - - var response = await _OrderRepository.InsertReturnSnowflakeIdAsync(model); - return "添加成功!"; - } - } - - #region Excel处理 - - - /// - /// Excel数据导出处理 - /// - public async Task> HandleExportData(List data) - { - return data; - } - - #endregion - - - #region 封装方法 - - /// - /// 获取商品订单列表 - /// - /// 订单guid - /// - /// - public async Task> GetOrderGoodsList(long orderGuid) - { - var goodsInfoList = new List(); - - var orderGoodsList = await _OrderGoodsRepository.GetListAsync(s => s.OrderGuid == orderGuid); - if (orderGoodsList.Count >= 0) - { - //throw new CustomException("订单商品不存在"); - foreach (var orderGoods in orderGoodsList) - { - var goods = await _GoodsRepository.GetFirstAsync(s => s.GoodsGuid == orderGoods.GoodsGuid) ?? throw new CustomException("商品不存在"); - var orderGoodsInfo = new OrderGoodsVo(); - orderGoodsInfo.GoodsName = goods.GoodsName; - orderGoodsInfo.GoodsPicture = goods.GoodsPicture; - orderGoodsInfo.GoodsTotalNum = orderGoods.GoodsTotalNum; - orderGoodsInfo.GoodsTotalNum = orderGoods.GoodsTotalNum; - if (orderGoods.GoodsSkuId != 0) - { - var specName = await _GoodsSkuService.GetSpecValueFullName(orderGoods.GoodsSkuId); - var sku = await _GoodsSkuService.GetByIdAsync(orderGoods.GoodsSkuId); - if (sku != null) - orderGoodsInfo.GoodsPrice = sku.GoodsSkuPrice; - orderGoodsInfo.GoodsSpecName = specName; - orderGoodsInfo.GoodsCoding = goods.GoodsCoding; - } - else - { - orderGoodsInfo.GoodsPrice = goods.GoodsPriceHighest; - orderGoodsInfo.GoodsWeight = goods.GoodsWeight; - } - orderGoodsInfo.GoodsTotalPrice = orderGoodsInfo.GoodsPrice * orderGoodsInfo.GoodsTotalNum; - - goodsInfoList.Add(orderGoodsInfo); - } - } - - return goodsInfoList; - } - - - /// - /// 获取收货信息 - /// - /// - /// - public async Task GetOrderReceive(long orderGuid) - { - var orderReceive = new OrderReceiveVo(); - var receive = await _OrderCustomerAddressRepository.GetFirstAsync(s => s.OrderGuid == orderGuid); - if (receive != null) - { - orderReceive.ConsigneeName = receive.ConsigneeName; - orderReceive.Phone = receive.Phont; - orderReceive.Detail = receive.Detail; - - // 获取地区名称 - orderReceive.Region = await _RegionService.GetRegionFullName(receive.ProvinceId, receive.CityId, receive.RegionId); - } - - return orderReceive; - } - - #endregion - - #endregion - - } -} diff --git a/ARW.Service/Business/BusinessService/OrderTasks/OrderTaskService.cs b/ARW.Service/Business/BusinessService/OrderTasks/OrderTaskService.cs deleted file mode 100644 index d8d81d7..0000000 --- a/ARW.Service/Business/BusinessService/OrderTasks/OrderTaskService.cs +++ /dev/null @@ -1,95 +0,0 @@ -using Infrastructure.Attribute; -using Microsoft.AspNetCore.Http; -using SqlSugar; -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; -using Infrastructure; -using ARW.Model; -using ARW.Repository; -using ARW.Repository.Business.OrderTasks; -using ARW.Service.Business.IBusinessService.OrderTasks; -using ARW.Model.Dto.Business.OrderTasks; -using ARW.Model.Models.Business.OrderTasks; -using ARW.Model.Vo.Business.OrderTasks; - -namespace ARW.Service.Business.BusinessService.OrderTasks -{ - /// - /// 订单取消任务接口实现类 - /// - /// @author lwh - /// @date 2023-10-23 - /// - [AppService(ServiceType = typeof(IOrderTaskService), ServiceLifetime = LifeTime.Transient)] - public class OrderTaskServiceImpl : BaseService, IOrderTaskService - { - private readonly OrderTaskRepository _OrderTaskRepository; - - public OrderTaskServiceImpl(OrderTaskRepository OrderTaskRepository) - { - this._OrderTaskRepository = OrderTaskRepository; - } - - #region 业务逻辑代码 - - - /// - /// 查询订单取消任务分页列表 - /// - public async Task> GetOrderTaskList(OrderTaskQueryDto parm) - { - //开始拼装查询条件d - var predicate = Expressionable.Create(); - - var query = _OrderTaskRepository - .Queryable() - .Where(predicate.ToExpression()) - .OrderBy(s => s.Update_time,OrderByType.Desc) - .Select(s => new OrderTaskVo - { - OrderTaskId = s.OrderTaskId, - OrderTaskGuid = s.OrderTaskGuid, - CustomerGuid = s.CustomerGuid, - OrderGuid = s.OrderGuid, - EndTime = s.EndTime, - PayStatus = s.PayStatus, - CancelStatus = s.CancelStatus, - ErrorMsg = s.ErrorMsg, - }); - - - return await query.ToPageAsync(parm); - } - - /// - /// 添加或修改订单取消任务 - /// - public async Task AddOrUpdateOrderTask(OrderTask model) - { - if (model.OrderTaskId != 0) - { - var response = await _OrderTaskRepository.UpdateAsync(model); - return "修改成功!"; - } - else - { - - var response = await _OrderTaskRepository.InsertReturnSnowflakeIdAsync(model); - return "添加成功!"; - } - } - - #region Excel处理 - - - #endregion - - - -#endregion - - } -} diff --git a/ARW.Service/Business/BusinessService/ShopManager/ShopAddresss/ShopAddressService.cs b/ARW.Service/Business/BusinessService/ShopManager/ShopAddresss/ShopAddressService.cs deleted file mode 100644 index 8f8c852..0000000 --- a/ARW.Service/Business/BusinessService/ShopManager/ShopAddresss/ShopAddressService.cs +++ /dev/null @@ -1,125 +0,0 @@ -using Infrastructure.Attribute; -using Microsoft.AspNetCore.Http; -using SqlSugar; -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; -using Infrastructure; -using ARW.Model; -using ARW.Repository; -using ARW.Repository.Business.ShopManager.ShopAddresss; -using ARW.Service.Business.IBusinessService.ShopManager.ShopAddresss; -using ARW.Model.Dto.Business.ShopManager.ShopAddresss; -using ARW.Model.Models.Business.ShopManager.ShopAddresss; -using ARW.Model.Vo.Business.ShopManager.ShopAddresss; -using ARW.Model.Models.Business.Custom.Regions; -using ARW.Repository.System; -using ARW.Model.Models.Business.ShopManager.Shops; - -namespace ARW.Service.Business.BusinessService.ShopManager.ShopAddresss -{ - /// - /// 店铺地址接口实现类 - /// - /// @author lwh - /// @date 2023-06-15 - /// - [AppService(ServiceType = typeof(IShopAddressService), ServiceLifetime = LifeTime.Transient)] - public class ShopAddressServiceImpl : BaseService, IShopAddressService - { - private readonly ShopAddressRepository _ShopAddressRepository; - private readonly SysDictDataRepository _SysDictDataRepository; - - public ShopAddressServiceImpl(ShopAddressRepository ShopAddressRepository, SysDictDataRepository sysDictDataRepository) - { - this._ShopAddressRepository = ShopAddressRepository; - _SysDictDataRepository = sysDictDataRepository; - } - - #region 业务逻辑代码 - - - /// - /// 查询店铺地址分页列表 - /// - public async Task> GetShopAddressList(ShopAddressQueryDto parm) - { - //开始拼装查询条件d - var predicate = Expressionable.Create(); - - predicate = predicate.AndIF(parm.ShopGuid != 0, s => s.ShopGuid == parm.ShopGuid); - predicate = predicate.AndIF(parm.ShopAddressType != null, s => s.ShopAddressType == parm.ShopAddressType); - var query = _ShopAddressRepository - .Queryable() - .LeftJoin((s, d) => s.ProvinceId == d.RegionId) - .LeftJoin((s, d, f) => s.CityId == f.RegionId) - .LeftJoin((s, d, f, g) => s.DistrictId == g.RegionId) - .LeftJoin((s, d, f, g, c) => s.ShopGuid == c.ShopGuid) - .Where(predicate.ToExpression()) - .OrderBy(s => s.ShopAddressSort, OrderByType.Asc) - .Select((s, d, f, g, c) => new ShopAddressVo - { - ShopGuid = s.ShopGuid, - ShopName = c.ShopName, - ShopAddressId = s.ShopAddressId, - ShopAddressGuid = s.ShopAddressGuid, - ShopAddressType = s.ShopAddressType, - AddressName = d.RegionName + "/" + f.RegionName + "/" + g.RegionName, - ProvinceId = s.ProvinceId, - CityId = s.CityId, - DistrictId = s.DistrictId, - ShopAddressContactName = s.ShopAddressContactName, - ShopAddressContactNumber = s.ShopAddressContactNumber, - ShopAddressDetailedAddress = s.ShopAddressDetailedAddress, - ShopAddressSort = s.ShopAddressSort, - CreateTime = s.Create_time.ToString("yyyy-MM-dd HH:mm") - }); - - - return await query.ToPageAsync(parm); - } - - /// - /// 添加或修改店铺地址 - /// - public async Task AddOrUpdateShopAddress(ShopAddress model) - { - if (model.ShopAddressId != 0) - { - var response = await _ShopAddressRepository.UpdateAsync(model); - return "修改成功!"; - } - else - { - - var response = await _ShopAddressRepository.InsertReturnSnowflakeIdAsync(model); - return "添加成功!"; - } - } - - #region Excel处理 - - - /// - /// Excel数据导出处理 - /// - public async Task> HandleExportData(List data) - { - foreach (var item in data) - { - item.ShopAddressTypeName = _SysDictDataRepository.GetDictNameByName("shop_address_type", item.ShopAddressType.ToString()); - } - - return data; - } - - #endregion - - - - #endregion - - } -} diff --git a/ARW.Service/Business/BusinessService/ShopManager/Shops/ShopService.cs b/ARW.Service/Business/BusinessService/ShopManager/Shops/ShopService.cs deleted file mode 100644 index 9eb5506..0000000 --- a/ARW.Service/Business/BusinessService/ShopManager/Shops/ShopService.cs +++ /dev/null @@ -1,402 +0,0 @@ -using Infrastructure.Attribute; -using Microsoft.AspNetCore.Http; -using SqlSugar; -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; -using Infrastructure; -using ARW.Model; -using ARW.Repository; -using ARW.Repository.Business.ShopManager.Shops; -using ARW.Service.Business.IBusinessService.ShopManager.Shops; -using ARW.Model.Dto.Business.ShopManager.Shops; -using ARW.Model.Models.Business.ShopManager.Shops; -using ARW.Model.Vo.Business.ShopManager.Shops; -using MimeKit; -using ARW.Model.Models.Business.Custom.Customers; -using ARW.Repository.Business.Custom.Customers; -using ARW.Model.System; -using ARW.Repository.System; -using ARW.Model.Vo.Business.GoodsManager.GoodsCategorys; -using ARW.Repository.Business.GoodsManager.GoodsCategorys; -using ARW.Model.Models.Business.GoodsManager.GoodsCategorys; -using ARW.Service.System.IService; -using ARW.Service.System; -using MimeKit.Encodings; -using ARW.Model.Dto.Api.ShopManager.Shops; -using ARW.Model.Vo.Api.ShopManager.Shops; -using ARW.Model.Models.Business.GoodsManager.GoodsServicess; -using ARW.Model.Models.Business.LogisticsManage.DeliveryRules; -using ARW.Model.Models.Business.LogisticsManage.Deliverys; -using ARW.Service.Business.IBusinessService.GoodsManager.GoodsServicess; -using ARW.Service.Business.IBusinessService.LogisticsManage.Deliverys; -using Aliyun.OSS; - -namespace ARW.Service.Business.BusinessService.ShopManager.Shops -{ - /// - /// 店铺接口实现类 - /// - /// @author lwh - /// @date 2023-06-09 - /// - [AppService(ServiceType = typeof(IShopService), ServiceLifetime = LifeTime.Transient)] - public class ShopServiceImpl : BaseService, IShopService - { - private readonly ShopRepository _ShopRepository; - private readonly CustomerRepository _CustomerRepository; - private readonly SysUserRepository _SysUserRepository; - private readonly GoodsCategoryRepository _GoodsCategoryRepository; - - private readonly ISysUserService UserService; - private readonly ISysConfigService _SysConfigService; - private readonly IDeliveryService _DeliveryService; - private readonly IGoodsServicesService _GoodsServicesService; - - public ShopServiceImpl(ShopRepository ShopRepository, CustomerRepository customerRepository, SysUserRepository sysUserRepository, GoodsCategoryRepository goodsCategoryRepository, ISysUserService userService, ISysConfigService sysConfigService, IDeliveryService deliveryService, IGoodsServicesService goodsServicesService) - { - this._ShopRepository = ShopRepository; - _CustomerRepository = customerRepository; - _SysUserRepository = sysUserRepository; - _GoodsCategoryRepository = goodsCategoryRepository; - UserService = userService; - _SysConfigService = sysConfigService; - _DeliveryService = deliveryService; - _GoodsServicesService = goodsServicesService; - } - - #region 业务逻辑代码 - - - /// - /// 查询店铺分页列表 - /// - public async Task> GetShopList(ShopQueryDto parm) - { - //开始拼装查询条件d - var predicate = Expressionable.Create(); - - predicate = predicate.AndIF(!string.IsNullOrEmpty(parm.ShopName), s => s.ShopName.Contains(parm.ShopName)); - predicate = predicate.AndIF(parm.ShopAuditStatus != null, s => s.ShopAuditStatus == parm.ShopAuditStatus); - var query = _ShopRepository - .Queryable() - //.LeftJoin((s, c) => s.ShopUserId == c.UserId) - .LeftJoin((s, d) => s.ShopCustomerGuid == d.CustomerGuid) - .LeftJoin((s, d, f) => s.ShopBusinessCategoryGuid == f.GoodsCategoryGuid) - .Where(predicate.ToExpression()) - .OrderBy(s => s.ShopSort, OrderByType.Asc) - .Select((s, d, f) => new ShopVo - { - CustomerNickname = d.CustomerNickname, - ShopBusinessCategoryName = f.GoodsCategoryName, - ShopId = s.ShopId, - ShopGuid = s.ShopGuid, - ShopUserId = s.ShopUserId, - ShopCustomerGuid = s.ShopCustomerGuid, - ShopBusinessCategoryGuid = s.ShopBusinessCategoryGuid, - ShopLogo = s.ShopLogo, - ShopBusinessLicense = s.ShopBusinessLicense, - ShopName = s.ShopName, - ShopIntro = s.ShopIntro, - ShopSort = s.ShopSort, - ShopSalesOrderCount = s.ShopSalesOrderCount, - ShopAuditStatus = s.ShopAuditStatus, - ShopAuditUserGuid = s.ShopAuditUserGuid, - CreateTime = s.Create_time.ToString("yyyy-MM-dd HH:mm") - }); - - - return await query.ToPageAsync(parm); - } - - /// - /// 添加或修改店铺 - /// - public async Task AddOrUpdateShop(Shop model) - { - if (model.ShopId != 0) - { - var response = await _ShopRepository.UpdateAsync(model); - return "修改成功!"; - } - else - { - // 检查是否有重复商店名称 - var isRepeat = await CheckRepeatShopName(model.ShopName); - if (isRepeat) throw new CustomException("商铺名称已存在"); - model.ShopAuditStatus = 2; - model.ShopAuditUserGuid = 1; - var response = await _ShopRepository.InsertReturnSnowflakeIdAsync(model); - return "添加成功!"; - } - } - - #region Excel处理 - - - /// - /// Excel数据导出处理 - /// - public async Task> HandleExportData(List data) - { - return data; - } - - #endregion - - - /// - /// 获取经营类目列表(一级类目) - /// - /// - /// - public async Task> GetFirstGoodsCategoryList() - { - var query = _GoodsCategoryRepository - .Queryable() - .Where(s => s.GoodsCategoryParentGuid == 0) - .OrderBy(s => s.Update_time, OrderByType.Desc) - .Select((s) => new GoodsCategoryVo - { - GoodsCategoryId = s.GoodsCategoryId, - GoodsCategoryGuid = s.GoodsCategoryGuid, - GoodsCategoryParentGuid = s.GoodsCategoryParentGuid, - GoodsCategoryAncestralGuid = s.GoodsCategoryAncestralGuid, - GoodsCategoryName = s.GoodsCategoryName, - GoodsCategoryImg = s.GoodsCategoryImg, - GoodsCategoryDisplayStatus = s.GoodsCategoryDisplayStatus, - GoodsCategoryIsPopular = s.GoodsCategoryIsPopular, - ProductCategorySort = s.ProductCategorySort, - }); - - return await query.ToListAsync(); - } - - - /// - /// 获取未绑定的用户列表 - /// - /// - /// - public async Task> GetUserWithOutBindList(UserWithOutBindQueryDto parm) - { - //开始拼装查询条件d - var predicate = Expressionable.Create(); - - predicate = predicate.AndIF(!string.IsNullOrEmpty(parm.UserName), s => s.UserName.Contains(parm.UserName)); - - var query = _SysUserRepository - .Queryable() - .Where(predicate.ToExpression()) - .Where(s => SqlFunc.Subqueryable().Where(it => it.ShopUserId == s.UserId).NotAny()) - .Where(s => s.UserId != 1) - .OrderBy(s => s.Update_time, OrderByType.Desc) - .Select((s) => new UserWithOutBindVo - { - UserId = s.UserId, - UserName = s.UserName, - }); - - return await query.ToPageAsync(parm); - } - - - /// - /// 获取未绑定的客户列表 - /// - /// - /// - public async Task> GetCustomerWithOutBindList(CustomerWithOutBindQueryDto parm) - { - //开始拼装查询条件d - var predicate = Expressionable.Create(); - - predicate = predicate.AndIF(!string.IsNullOrEmpty(parm.CustomerNickname), s => s.CustomerNickname.Contains(parm.CustomerNickname)); - - var query = _CustomerRepository - .Queryable() - .Where(predicate.ToExpression()) - .Where(s => SqlFunc.Subqueryable().Where(it => it.ShopCustomerGuid == s.CustomerGuid).NotAny()) - .OrderBy(s => s.Update_time, OrderByType.Desc) - .Select((s) => new CustomerWithOutBindVo - { - CustomerGuid = s.CustomerGuid, - CustomerNickname = s.CustomerNickname, - }); - - return await query.ToPageAsync(parm); - } - - - /// - /// 审核 - /// - public async Task Audit(int id, int status, long userGuid) - { - try - { - var res = await _ShopRepository.GetFirstAsync(s => s.ShopId == id); - await UseTranAsync(async () => - { - await _ShopRepository.UpdateAsync(f => new Shop { ShopAuditStatus = status, ShopAuditUserGuid = userGuid, Update_time = DateTime.Now, Update_by = userGuid.ToString() }, s => s.ShopId == id); - }); - if (res.ShopAuditStatus == 2) - { - var errorRes = $"店铺:【{res.ShopName}】已通过审核!
"; - return errorRes; - } - if (res.ShopAuditStatus == 3) - { - var errorRes = $"店铺:【{res.ShopName}】已被驳回!
"; - return errorRes; - } - else if (res.ShopAuditStatus == 1) - { - var addStr = $"店铺:【{res.ShopName}】审核通过!
"; - - // 分发后台用户账户 - var customer = await _CustomerRepository.GetFirstAsync(s => s.CustomerGuid == res.ShopCustomerGuid); - long[] roleId = new long[] { 3 }; - int[] postId = Array.Empty(); - if (UserConstants.NOT_UNIQUE.Equals(UserService.CheckUserNameUnique(customer.CustomerMobilePhoneNumber))) - { - throw new Exception($"新增用户 '{customer.CustomerMobilePhoneNumber}'失败,登录账号已存在"); - } - - var initPassword = _SysConfigService.Queryable().First(f => f.ConfigKey == "sys.user.initPassword"); - var password = NETCore.Encrypt.EncryptProvider.Md5(initPassword.ConfigValue); - var user = new SysUser - { - UserName = customer.CustomerMobilePhoneNumber, - NickName = customer.CustomerNickname, - Password = password, - Avatar = customer.CustomerAvatar, - Phonenumber = customer.CustomerMobilePhoneNumber, - Sex = customer.CustomerGender.ToString(), - Status = "0", - RoleIds = roleId, - PostIds = postId - }; - var userId = UserService.InsertUser(user); - if (userId == 0) throw new Exception($"新增用户 '{customer.CustomerMobilePhoneNumber}'失败"); - await _ShopRepository.UpdateAsync(f => new Shop - { - ShopUserId = (int?)userId, - }, s => s.ShopId == id); - - // 给该用户的店铺添加默认数据 - // 添加配送模板(全国包邮) - await HadnleAddDelivery(res.ShopGuid); - // 添加服务与承诺(七天无理由退货) - await HadnleAddGoodsService(res.ShopGuid); - - // 修改客户类型为 商户(2) - await _CustomerRepository.UpdateAsync(f => new Customer - { - CustomerType = 2 - }, s => s.CustomerGuid == res.ShopCustomerGuid); - - - return addStr; - } - return ""; - } - catch (Exception) - { - throw; - } - } - - - /// - /// 获取商户店铺详情 - /// - /// - /// - public Task GetShopOperatorDetail(ShopOperatorQueryDto parm) - { - - var query = _ShopRepository - .Queryable() - .Where(s => s.ShopGuid == parm.ShopGuid) - .Select(s => new ShopDetailVo - { - ShopId = s.ShopId, - ShopGuid = s.ShopGuid, - ShopBusinessCategoryGuid = s.ShopBusinessCategoryGuid, - ShopLogo = s.ShopLogo, - ShopBusinessLicense = s.ShopBusinessLicense, - ShopName = s.ShopName, - ShopIntro = s.ShopIntro, - ShopSalesOrderCount = s.ShopSalesOrderCount, - }).Take(1); - - - return query.ToJsonAsync(); - } - - - public async Task CheckRepeatShopName(string shopName) - { - var query = await _ShopRepository.GetFirstAsync(s => s.ShopName == shopName); - return query != null; - } - - - /// - /// 添加配送模板(全国包邮) - /// - /// 店铺guid - /// - public async Task HadnleAddDelivery(long shopGuid) - { - var deliveryRuleList = new List(); - var deliveryRule = new DeliveryRule - { - DeliveryRuleRegion = "2,20,38,61,76,84,103,123,148,165,177,194,205,218,229,240,246,259,266,273,285,299,314,332,347,357,367,371,384,393,403,418,426,438,445,458,463,477,488,496,504,511,518,526,533,541,549,554,562,570,578,589,599,606,611,619,626,632,638,648,667,684,694,703,712,722,733,744,749,760,767,778,783,801,813,821,832,839,849,858,865,873,883,890,897,904,911,925,936,949,957,963,970,980,987,992,1002,1013,1023,1032,1040,1048,1055,1060,1065,1076,1084,1093,1102,1108,1116,1121,1126,1135,1149,1156,1162,1175,1188,1200,1211,1219,1230,1240,1245,1251,1265,1268,1272,1291,1305,1316,1328,1342,1355,1366,1375,1382,1388,1401,1414,1426,1433,1438,1443,1456,1468,1477,1485,1496,1509,1519,1535,1546,1556,1562,1575,1586,1593,1600,1606,1613,1627,1637,1648,1659,1672,1686,1693,1702,1716,1726,1730,1736,1744,1753,1764,1771,1775,1789,1799,1809,1815,1828,1841,1851,1861,1866,1873,1885,1897,1910,1916,1926,1938,1949,1959,1963,1971,1977,1985,1995,2001,2010,2016,2025,2030,2037,2042,2051,2052,2053,2057,2063,2070,2083,2094,2112,2120,2125,2130,2135,2141,2149,2162,2168,2180,2187,2196,2201,2206,2207,2224,2264,2285,2292,2298,2306,2313,2323,2331,2337,2343,2355,2365,2372,2383,2390,2398,2407,2413,2417,2431,2450,2469,2480,2485,2500,2507,2516,2527,2536,2553,2567,2582,2592,2602,2608,2620,2626,2637,2646,2657,2671,2680,2684,2697,2703,2708,2713,2722,2741,2753,2761,2774,2786,2795,2809,2814,2827,2842,2854,2868,2880,2893,2904,2913,2922,2923,2926,2932,2940,2945,2952,2960,2968,2977,2985,2995,3004,3014,3022,3029,3034,3039,3045,3052,3059,3067,3074,3078,3084,3090,3095,3104,3109,3113,3117,3125,3130,3140,3150,3155,3168,3177,3189,3197,3216,3229,3268,3306,3336,3350,3358,3362,3365,3395,3408,3422,3436,3455,3482,3501,3522,3556,3573,3587,3595,3615", - DeliveryRuleRegionText = "北京,天津,河北省,山西省,内蒙古自治区,辽宁省,吉林省,黑龙江省,上海,江苏省,浙江省,安徽省,福建省,江西省,山东省,河南省,湖北省,湖南省,广东省,广西壮族自治区,海南省,重庆,四川省,贵州省,云南省,西藏自治区,陕西省,甘肃省,青海省,宁夏回族自治区,新疆维吾尔自治区,台湾省,香港特别行政区,澳门特别行政区", - DeliveryRuleFirst = 0, - DeliveryRuleFirstFee = 0, - DeliveryRuleAdditional = 0, - DeliveryRuleAdditionalFee = 0, - }; - deliveryRuleList.Add(deliveryRule); - var delivery = new Delivery - { - ShopGuid = shopGuid, - DeliveryName = "全国包邮", - DeliveryBillingMethod = 1, - DeliverySort = 100, - DeliveryRuleDataList = deliveryRuleList - }; - await _DeliveryService.AddOrUpdateDelivery(delivery); - } - - - - /// - /// 添加服务与承诺(七天无理由退货) - /// - /// 店铺guid - /// - public async Task HadnleAddGoodsService(long shopGuid) - { - var goodsService = new GoodsServices - { - ShopGuid = shopGuid, - GoodsServicesName = "七天无理由退货", - GoodsServicesSummary = "请确保商品完好,包邮商品买家承担退货运费,非包邮商品买家承担来回运费。", - GoodsServicesIsDefault = 1, - GoodsServicesDisplayStatus = 1, - GoodsServicesSort = 100 - }; - await _GoodsServicesService.AddOrUpdateGoodsServices(goodsService); - } - - - #endregion - - } -} diff --git a/ARW.Service/Business/IBusinessService/Carts/ICartService.cs b/ARW.Service/Business/IBusinessService/Carts/ICartService.cs deleted file mode 100644 index 75641be..0000000 --- a/ARW.Service/Business/IBusinessService/Carts/ICartService.cs +++ /dev/null @@ -1,41 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; -using ARW.Model; -using ARW.Model.Dto.Api.Carts; -using ARW.Model.Dto.Business.Carts; -using ARW.Model.Models.Business.Carts; -using ARW.Model.Vo.Business.Carts; - -namespace ARW.Service.Business.IBusinessService.Carts -{ - /// - /// 购物车记录接口类 - /// - /// @author lwh - /// @date 2023-07-20 - /// - public interface ICartService : IBaseService - { - /// - /// 获取购物车记录分页列表 - /// - /// - /// - Task> GetCartList(CartQueryDto parm); - - - /// - /// 添加或修改购物车记录 - /// - /// - /// - Task AddOrUpdateCart(Cart parm); - - - - - } -} diff --git a/ARW.Service/Business/IBusinessService/Custom/CustomerAddresses/ICustomerAddressService.cs b/ARW.Service/Business/IBusinessService/Custom/CustomerAddresses/ICustomerAddressService.cs deleted file mode 100644 index 4678c59..0000000 --- a/ARW.Service/Business/IBusinessService/Custom/CustomerAddresses/ICustomerAddressService.cs +++ /dev/null @@ -1,45 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; -using ARW.Model; -using ARW.Model.Dto.Business.Custom.CustomerAddresses; -using ARW.Model.Models.Business.Custom.CustomerAddresses; -using ARW.Model.Vo.Business.Custom.CustomerAddresses; - -namespace ARW.Service.Business.IBusinessService.Custom.CustomerAddresses -{ - /// - /// 客户收货地址接口类 - /// - /// @author admin - /// @date 2023-06-05 - /// - public interface ICustomerAddressService : IBaseService - { - /// - /// 获取客户收货地址分页列表 - /// - /// - /// - Task> GetCustomerAddressList(CustomerAddressQueryDto parm); - - - /// - /// 添加或修改客户收货地址 - /// - /// - /// - Task AddOrUpdateCustomerAddress(CustomerAddress parm); - - - - /// - /// Excel导出 - /// - Task> HandleExportData(List data); - - - } -} diff --git a/ARW.Service/Business/IBusinessService/GoodsManager/GoodsCategorys/IGoodsCategoryService.cs b/ARW.Service/Business/IBusinessService/GoodsManager/GoodsCategorys/IGoodsCategoryService.cs deleted file mode 100644 index 40c3e05..0000000 --- a/ARW.Service/Business/IBusinessService/GoodsManager/GoodsCategorys/IGoodsCategoryService.cs +++ /dev/null @@ -1,52 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; -using ARW.Model; -using ARW.Model.Dto.Business.GoodsManager.GoodsCategorys; -using ARW.Model.Models.Business.GoodsManager.GoodsCategorys; -using ARW.Model.Vo.Business.GoodsManager.GoodsCategorys; - -namespace ARW.Service.Business.IBusinessService.GoodsManager.GoodsCategorys -{ - /// - /// 商品类目接口类 - /// - /// @author lwh - /// @date 2023-06-12 - /// - public interface IGoodsCategoryService : IBaseService - { - /// - /// 获取商品类目树形列表 - /// - /// - /// - Task> GetGoodsCategoryTreeList(GoodsCategoryQueryDto parm); - - /// - /// 获取商品类目列表 - /// - /// - /// - Task> GetGoodsCategoryList(GoodsCategoryQueryDto parm); - - - /// - /// 添加或修改商品类目 - /// - /// - /// - Task AddOrUpdateGoodsCategory(GoodsCategory parm); - - - - /// - /// Excel导出 - /// - Task> HandleExportData(List data); - - - } -} diff --git a/ARW.Service/Business/IBusinessService/GoodsManager/GoodsComments/IGoodsCommentService.cs b/ARW.Service/Business/IBusinessService/GoodsManager/GoodsComments/IGoodsCommentService.cs deleted file mode 100644 index 0f80884..0000000 --- a/ARW.Service/Business/IBusinessService/GoodsManager/GoodsComments/IGoodsCommentService.cs +++ /dev/null @@ -1,45 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; -using ARW.Model; -using ARW.Model.Dto.Business.GoodsManager.GoodsComments; -using ARW.Model.Models.Business.GoodsManager.GoodsComments; -using ARW.Model.Vo.Business.GoodsManager.GoodsComments; - -namespace ARW.Service.Business.IBusinessService.GoodsManager.GoodsComments -{ - /// - /// 商品评价接口类 - /// - /// @author admin - /// @date 2023-07-15 - /// - public interface IGoodsCommentService : IBaseService - { - /// - /// 获取商品评价分页列表 - /// - /// - /// - Task> GetGoodsCommentList(GoodsCommentQueryDto parm); - - - /// - /// 添加或修改商品评价 - /// - /// - /// - Task AddOrUpdateGoodsComment(GoodsComment parm); - - - - - /// - /// 回复 - /// - Task Recover(GoodsCommentRecoverDto parm); - - } -} diff --git a/ARW.Service/Business/IBusinessService/GoodsManager/GoodsServicess/GoodsServicesRels/IGoodsServicesRelService.cs b/ARW.Service/Business/IBusinessService/GoodsManager/GoodsServicess/GoodsServicesRels/IGoodsServicesRelService.cs deleted file mode 100644 index 83129ce..0000000 --- a/ARW.Service/Business/IBusinessService/GoodsManager/GoodsServicess/GoodsServicesRels/IGoodsServicesRelService.cs +++ /dev/null @@ -1,52 +0,0 @@ -using System.Collections.Generic; -using System.Threading.Tasks; -using ARW.Model; -using ARW.Model.Dto.Business.GoodsManager.GoodsServicess.GoodsServicesRels; -using ARW.Model.Models.Business.GoodsManager.GoodsServicess.GoodsServicesRels; -using ARW.Model.Vo.Business.GoodsManager.GoodsServicess.GoodsServicesRels; - -namespace ARW.Service.Business.IBusinessService.GoodsManager.GoodsServicess.GoodsServicesRels -{ - /// - /// 商品服务与承诺关系表接口类 - /// - /// @author lwh - /// @date 2023-06-18 - /// - public interface IGoodsServicesRelService : IBaseService - { - /// - /// 获取商品服务与承诺关系表分页列表 - /// - /// - /// - Task> GetGoodsServicesRelList(GoodsServicesRelQueryDto parm); - - - /// - /// 获取当前商品的服务与承诺Id - /// - /// - /// - Task> GetCurrentGoodsServicesRel(GoodsServicesRelQueryDto parm); - - - - /// - /// 新增商品服务与承诺关系 - /// - /// 商品服务与承诺关系列表 - Task InsertGoodsServicesRelAsync(List goodsServicesRelList); - - - /// - /// 更新商品服务与承诺关系 - /// - /// 商品服务与承诺关系列表 - /// 商品guid - /// - Task UpdateGoodsServicesRelAsync(List goodsServicesRelList, long goodsGuid); - - - } -} diff --git a/ARW.Service/Business/IBusinessService/GoodsManager/GoodsServicess/IGoodsServicesService.cs b/ARW.Service/Business/IBusinessService/GoodsManager/GoodsServicess/IGoodsServicesService.cs deleted file mode 100644 index 48ba7f6..0000000 --- a/ARW.Service/Business/IBusinessService/GoodsManager/GoodsServicess/IGoodsServicesService.cs +++ /dev/null @@ -1,45 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; -using ARW.Model; -using ARW.Model.Dto.Business.GoodsManager.GoodsServicess; -using ARW.Model.Models.Business.GoodsManager.GoodsServicess; -using ARW.Model.Vo.Business.GoodsManager.GoodsServicess; - -namespace ARW.Service.Business.IBusinessService.GoodsManager.GoodsServicess -{ - /// - /// 商品服务与承诺接口类 - /// - /// @author lwh - /// @date 2023-06-18 - /// - public interface IGoodsServicesService : IBaseService - { - /// - /// 获取商品服务与承诺分页列表 - /// - /// - /// - Task> GetGoodsServicesList(GoodsServicesQueryDto parm); - - - /// - /// 添加或修改商品服务与承诺 - /// - /// - /// - Task AddOrUpdateGoodsServices(GoodsServices parm); - - - - /// - /// Excel导出 - /// - Task> HandleExportData(List data); - - - } -} diff --git a/ARW.Service/Business/IBusinessService/GoodsManager/GoodsSpecs/GoodsSkus/IGoodsSkuService.cs b/ARW.Service/Business/IBusinessService/GoodsManager/GoodsSpecs/GoodsSkus/IGoodsSkuService.cs deleted file mode 100644 index 46fd241..0000000 --- a/ARW.Service/Business/IBusinessService/GoodsManager/GoodsSpecs/GoodsSkus/IGoodsSkuService.cs +++ /dev/null @@ -1,40 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; -using ARW.Model; -using ARW.Model.Dto.Business.GoodsManager.Goodss; -using ARW.Model.Dto.Business.GoodsManager.GoodsSpecs.GoodsSkus; -using ARW.Model.Models.Business.GoodsManager.GoodsSpecs.GoodsSkus; -using ARW.Model.Vo.Business.GoodsManager.Goodss; -using ARW.Model.Vo.Business.GoodsManager.GoodsSpecs.GoodsSkus; - -namespace ARW.Service.Business.IBusinessService.GoodsManager.GoodsSpecs.GoodsSkus -{ - /// - /// 商品规格接口类 - /// - /// @author lwh - /// @date 2023-06-19 - /// - public interface IGoodsSkuService : IBaseService - { - /// - /// 获取商品Sku - /// - /// - /// - Task GetGoodsSkuList(GoodsSkuQueryDto parm); - - - - /// - /// 获取全部规格值名称 - /// - /// - /// - Task GetSpecValueFullName(int? skuId); - - } -} diff --git a/ARW.Service/Business/IBusinessService/GoodsManager/GoodsSpecs/GoodsSpecRels/IGoodsSpecRelService.cs b/ARW.Service/Business/IBusinessService/GoodsManager/GoodsSpecs/GoodsSpecRels/IGoodsSpecRelService.cs deleted file mode 100644 index c44deef..0000000 --- a/ARW.Service/Business/IBusinessService/GoodsManager/GoodsSpecs/GoodsSpecRels/IGoodsSpecRelService.cs +++ /dev/null @@ -1,47 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; -using ARW.Model; -using ARW.Model.Dto.Business.GoodsManager.GoodsSpecs.GoodsSpecRels; -using ARW.Model.Models.Business.GoodsManager.GoodsSpecs.GoodsSpecRels; -using ARW.Model.Vo.Business.GoodsManager.GoodsSpecs.GoodsSpecRels; -using ARW.Repository.Business.GoodsManager.GoodsSpecs.GoodsSpecRels; - -namespace ARW.Service.Business.IBusinessService.GoodsManager.GoodsSpecs.GoodsSpecRels -{ - /// - /// 商品与规格值关系记录接口类 - /// - /// @author lwh - /// @date 2023-06-19 - /// - public interface IGoodsSpecRelService : IBaseService - { - /// - /// 获取商品与规格值关系记录分页列表 - /// - /// - /// - Task> GetGoodsSpecRelList(GoodsSpecRelQueryDto parm); - - - /// - /// 新增商品与规格值关系 - /// - /// 商品与规格值关系列表 - Task InsertGoodsSpecRelAsync(List goodsSpecRelList); - - - /// - /// 更新商品与规格值关系 - /// - /// 商品与规格值关系列表 - /// - Task UpdateGoodsSpecRelAsync(List goodsSpecRelList, long goodsGuid); - - - - } -} diff --git a/ARW.Service/Business/IBusinessService/GoodsManager/GoodsSpecs/SpecValues/ISpecValueService.cs b/ARW.Service/Business/IBusinessService/GoodsManager/GoodsSpecs/SpecValues/ISpecValueService.cs deleted file mode 100644 index 74ef6ac..0000000 --- a/ARW.Service/Business/IBusinessService/GoodsManager/GoodsSpecs/SpecValues/ISpecValueService.cs +++ /dev/null @@ -1,48 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; -using ARW.Model; -using ARW.Model.Dto.Business.GoodsManager.GoodsSpecs.SpecValues; -using ARW.Model.Models.Business.GoodsManager.GoodsSpecs.Specs; -using ARW.Model.Models.Business.GoodsManager.GoodsSpecs.SpecValues; -using ARW.Model.Vo.Business.GoodsManager.GoodsSpecs.SpecValues; -using ARW.Repository.Business.GoodsManager.GoodsSpecs.SpecValues; - -namespace ARW.Service.Business.IBusinessService.GoodsManager.GoodsSpecs.SpecValues -{ - /// - /// 商品规格值接口类 - /// - /// @author lwh - /// @date 2023-06-19 - /// - public interface ISpecValueService : IBaseService - { - /// - /// 获取商品规格值分页列表 - /// - /// - /// - Task> GetSpecValueList(SpecValueQueryDto parm); - - - /// - /// 新增规格值 - /// - /// 规格值列表 - Task InsertSpecValueAsync(List sepcValueList); - - - /// - /// 更新规格值 - /// - /// 规格值列表 - /// - Task UpdateSpecValueAsync(List sepcValueList); - - - - } -} diff --git a/ARW.Service/Business/IBusinessService/GoodsManager/GoodsSpecs/Specs/ISpecService.cs b/ARW.Service/Business/IBusinessService/GoodsManager/GoodsSpecs/Specs/ISpecService.cs deleted file mode 100644 index 1118212..0000000 --- a/ARW.Service/Business/IBusinessService/GoodsManager/GoodsSpecs/Specs/ISpecService.cs +++ /dev/null @@ -1,46 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; -using ARW.Model; -using ARW.Model.Dto.Business.GoodsManager.GoodsSpecs.Specs; -using ARW.Model.Models.Business.GoodsManager.GoodsSpecs.Specs; -using ARW.Model.Vo.Business.GoodsManager.GoodsSpecs.Specs; -using ARW.Repository.Business.GoodsManager.GoodsSpecs.Specs; - -namespace ARW.Service.Business.IBusinessService.GoodsManager.GoodsSpecs.Specs -{ - /// - /// 商品规格组接口类 - /// - /// @author lwh - /// @date 2023-06-19 - /// - public interface ISpecService : IBaseService - { - /// - /// 获取商品规格组分页列表 - /// - /// - /// - Task> GetSpecList(SpecQueryDto parm); - - - /// - /// 新增规格组 - /// - /// 规格组列表 - Task InsertSpecAsync(List sepcList); - - - /// - /// 更新规格组 - /// - /// 规格组列表 - /// - Task UpdateSpecAsync(List sepcList); - - - } -} diff --git a/ARW.Service/Business/IBusinessService/GoodsManager/Goodss/IGoodsService.cs b/ARW.Service/Business/IBusinessService/GoodsManager/Goodss/IGoodsService.cs deleted file mode 100644 index 721a917..0000000 --- a/ARW.Service/Business/IBusinessService/GoodsManager/Goodss/IGoodsService.cs +++ /dev/null @@ -1,74 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; -using ARW.Model; -using ARW.Model.Dto.Business.GoodsManager.Goodss; -using ARW.Model.Models.Business.GoodsManager.Goodss; -using ARW.Model.System; -using ARW.Model.Vo.Business.GoodsManager.Goodss; - -namespace ARW.Service.Business.IBusinessService.GoodsManager.Goodss -{ - /// - /// 商品接口类 - /// - /// @author lwh - /// @date 2023-06-19 - /// - public interface IGoodsService : IBaseService - { - /// - /// 获取商品分页列表 - /// - /// - /// - Task> GetGoodsList(GoodsQueryDto parm); - - - /// - /// 获取全部商品列表 - /// - /// - /// - Task> GetAllGoodsList(GoodsQueryDto parm); - - - /// - /// 添加或修改商品 - /// - /// - /// - Task AddOrUpdateGoods(Goods parm); - - - /// - /// 数据导入处理 - /// - /// - /// - Task HandleImportData(GoodsVo Goods, long userId, int index); - - - /// - /// Excel导入 - /// - /// - /// - Task ImportExcel(GoodsVo GoodsVo,int index,bool isUpdateSupport, LoginUser user); - - /// - /// Excel导出 - /// - Task> HandleExportData(List data); - - - /// - /// 上下架商品 - /// - Task ShelfGoods(int id, int status); - - - } -} diff --git a/ARW.Service/Business/IBusinessService/GoodsManager/ShopGoodsCategorys/IShopGoodsCategoryService.cs b/ARW.Service/Business/IBusinessService/GoodsManager/ShopGoodsCategorys/IShopGoodsCategoryService.cs deleted file mode 100644 index 6b6a8c0..0000000 --- a/ARW.Service/Business/IBusinessService/GoodsManager/ShopGoodsCategorys/IShopGoodsCategoryService.cs +++ /dev/null @@ -1,67 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; -using ARW.Model; -using ARW.Model.Dto.Business.GoodsManager.ShopGoodsCategorys; -using ARW.Model.Models.Business.GoodsManager.ShopGoodsCategorys; -using ARW.Model.System; -using ARW.Model.Vo.Business.GoodsManager.ShopGoodsCategorys; - -namespace ARW.Service.Business.IBusinessService.GoodsManager.ShopGoodsCategorys -{ - /// - /// 店铺商品类目接口类 - /// - /// @author lwh - /// @date 2023-06-15 - /// - public interface IShopGoodsCategoryService : IBaseService - { - /// - /// 获取店铺商品类目树形列表 - /// - /// - /// - Task> GetShopGoodsCategoryTreeList(ShopGoodsCategoryQueryDto parm); - - /// - /// 获取店铺商品类目列表 - /// - /// - /// - Task> GetShopGoodsCategoryList(ShopGoodsCategoryQueryDto parm); - - - /// - /// 添加或修改店铺商品类目 - /// - /// - /// - Task AddOrUpdateShopGoodsCategory(ShopGoodsCategory parm); - - - /// - /// 数据导入处理 - /// - /// - /// - Task HandleImportData(ShopGoodsCategoryVo ShopGoodsCategoryVo,long userId,int index); - - - /// - /// Excel导入 - /// - /// - /// - Task ImportExcel(ShopGoodsCategoryVo ShopGoodsCategory,int index,bool isUpdateSupport,LoginUser user); - - /// - /// Excel导出 - /// - Task> HandleExportData(List data); - - - } -} diff --git a/ARW.Service/Business/IBusinessService/LogisticsManage/DeliveryRules/IDeliveryRuleService.cs b/ARW.Service/Business/IBusinessService/LogisticsManage/DeliveryRules/IDeliveryRuleService.cs deleted file mode 100644 index e43c236..0000000 --- a/ARW.Service/Business/IBusinessService/LogisticsManage/DeliveryRules/IDeliveryRuleService.cs +++ /dev/null @@ -1,64 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; -using ARW.Model; -using ARW.Model.Dto.Business.LogisticsManage.DeliveryRules; -using ARW.Model.Models.Business.LogisticsManage.DeliveryRules; -using ARW.Model.Vo.Business.LogisticsManage.DeliveryRules; - -namespace ARW.Service.Business.IBusinessService.LogisticsManage.DeliveryRules -{ - /// - /// 配送模板区域及运费接口类 - /// - /// @author lwh - /// @date 2023-06-16 - /// - public interface IDeliveryRuleService : IBaseService - { - - /// - /// 通过配送模板guid获取配送模板所关联的配送模板区域及运费列表 - /// - /// 配送模板guid - /// - Task> GetDeliveryRuleList(long deliveryGuid); - - - - /// - /// 通过配送模板guid获取配送模板所关联的配送模板区域及运费guid - /// - /// 配送模板guid - /// - Task> GetDeliveryRuleGuidListByDeliveryGuid(long deliveryGuid); - - - /// - /// 通过配送模板guid获取配送模板所关联的配送模板区域及运费名称 - /// - /// 配送模板guid - /// - Task GetDeliveryRuleNameByDeliveryGuid(long deliveryGuid); - - - /// - /// 新增配送模板配送模板区域及运费 - /// - /// 配送模板区域及运费列表 - /// - Task InsertDeliveryRuleAsync(List deliveryRuleList); - - - /// - /// 更新配送模板配送模板区域及运费 - /// - /// 配送模板区域及运费列表 - /// 配送模板guid - /// - Task UpdateDeliveryRuleAsync(List deliveryRuleList, long deliveryGuid); - - } -} diff --git a/ARW.Service/Business/IBusinessService/LogisticsManage/Deliverys/IDeliveryService.cs b/ARW.Service/Business/IBusinessService/LogisticsManage/Deliverys/IDeliveryService.cs deleted file mode 100644 index 528d8d8..0000000 --- a/ARW.Service/Business/IBusinessService/LogisticsManage/Deliverys/IDeliveryService.cs +++ /dev/null @@ -1,45 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; -using ARW.Model; -using ARW.Model.Dto.Business.LogisticsManage.Deliverys; -using ARW.Model.Models.Business.LogisticsManage.Deliverys; -using ARW.Model.Vo.Business.LogisticsManage.Deliverys; - -namespace ARW.Service.Business.IBusinessService.LogisticsManage.Deliverys -{ - /// - /// 配送模板接口类 - /// - /// @author lwh - /// @date 2023-06-16 - /// - public interface IDeliveryService : IBaseService - { - /// - /// 获取配送模板分页列表 - /// - /// - /// - Task> GetDeliveryList(DeliveryQueryDto parm); - - - /// - /// 添加或修改配送模板 - /// - /// - /// - Task AddOrUpdateDelivery(Delivery parm); - - - - /// - /// Excel导出 - /// - Task> HandleExportData(List data); - - - } -} diff --git a/ARW.Service/Business/IBusinessService/LogisticsManage/LogisticsCompanys/ILogisticsCompanyService.cs b/ARW.Service/Business/IBusinessService/LogisticsManage/LogisticsCompanys/ILogisticsCompanyService.cs deleted file mode 100644 index 84850e8..0000000 --- a/ARW.Service/Business/IBusinessService/LogisticsManage/LogisticsCompanys/ILogisticsCompanyService.cs +++ /dev/null @@ -1,59 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; -using ARW.Model; -using ARW.Model.Dto.Business.LogisticsManage.LogisticsCompanys; -using ARW.Model.Models.Business.LogisticsManage.LogisticsCompanys; -using ARW.Model.Vo.Business.LogisticsManage.LogisticsCompanys; - -namespace ARW.Service.Business.IBusinessService.LogisticsManage.LogisticsCompanys -{ - /// - /// 物流公司接口类 - /// - /// @author lwh - /// @date 2023-06-18 - /// - public interface ILogisticsCompanyService : IBaseService - { - /// - /// 获取物流公司分页列表 - /// - /// - /// - Task> GetLogisticsCompanyList(LogisticsCompanyQueryDto parm); - - - /// - /// 添加或修改物流公司 - /// - /// - /// - Task AddOrUpdateLogisticsCompany(LogisticsCompany parm); - - - /// - /// 数据导入处理 - /// - /// - /// - Task HandleImportData(LogisticsCompanyVo LogisticsCompanyVo); - - - /// - /// Excel导入 - /// - /// - /// - Task ImportExcel(LogisticsCompany LogisticsCompany,int index,bool isUpdateSupport,string user); - - /// - /// Excel导出 - /// - Task> HandleExportData(List data); - - - } -} diff --git a/ARW.Service/Business/IBusinessService/Marketing/CouponManage/Coupons/ICouponService.cs b/ARW.Service/Business/IBusinessService/Marketing/CouponManage/Coupons/ICouponService.cs deleted file mode 100644 index ff625f3..0000000 --- a/ARW.Service/Business/IBusinessService/Marketing/CouponManage/Coupons/ICouponService.cs +++ /dev/null @@ -1,59 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; -using ARW.Model; -using ARW.Model.Dto.Business.Marketing.CouponManage.Coupons; -using ARW.Model.Models.Business.Marketing.CouponManage.Coupons; -using ARW.Model.Vo.Business.Marketing.CouponManage.Coupons; - -namespace ARW.Service.Business.IBusinessService.Marketing.CouponManage.Coupons -{ - /// - /// 优惠券接口类 - /// - /// @author lwh - /// @date 2023-07-24 - /// - public interface ICouponService : IBaseService - { - /// - /// 获取优惠券分页列表 - /// - /// - /// - Task> GetCouponList(CouponQueryDto parm); - - - /// - /// 添加或修改优惠券 - /// - /// - /// - Task AddOrUpdateCoupon(Coupon parm); - - - /// - /// 数据导入处理 - /// - /// - /// - Task HandleImportData(CouponVo CouponVo); - - - /// - /// Excel导入 - /// - /// - /// - Task ImportExcel(Coupon Coupon,int index,bool isUpdateSupport,string user); - - /// - /// Excel导出 - /// - Task> HandleExportData(List data); - - - } -} diff --git a/ARW.Service/Business/IBusinessService/Marketing/CouponManage/CustomerCoupons/ICustomerCouponService.cs b/ARW.Service/Business/IBusinessService/Marketing/CouponManage/CustomerCoupons/ICustomerCouponService.cs deleted file mode 100644 index 1738b0f..0000000 --- a/ARW.Service/Business/IBusinessService/Marketing/CouponManage/CustomerCoupons/ICustomerCouponService.cs +++ /dev/null @@ -1,41 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; -using ARW.Model; -using ARW.Model.Dto.Business.Marketing.CouponManage.CustomerCoupons; -using ARW.Model.Models.Business.Marketing.CouponManage.CustomerCoupons; -using ARW.Model.Vo.Business.Marketing.CouponManage.CustomerCoupons; - -namespace ARW.Service.Business.IBusinessService.Marketing.CouponManage.CustomerCoupons -{ - /// - /// 领券记录接口类 - /// - /// @author lwh - /// @date 2023-07-31 - /// - public interface ICustomerCouponService : IBaseService - { - /// - /// 获取领券记录分页列表 - /// - /// - /// - Task> GetCustomerCouponList(CustomerCouponQueryDto parm); - - - /// - /// 添加或修改领券记录 - /// - /// - /// - Task AddOrUpdateCustomerCoupon(CustomerCoupon parm); - - - - - - } -} diff --git a/ARW.Service/Business/IBusinessService/OrderManage/OrderCustomerAddreses/IOrderCustomerAddressService.cs b/ARW.Service/Business/IBusinessService/OrderManage/OrderCustomerAddreses/IOrderCustomerAddressService.cs deleted file mode 100644 index 23571f6..0000000 --- a/ARW.Service/Business/IBusinessService/OrderManage/OrderCustomerAddreses/IOrderCustomerAddressService.cs +++ /dev/null @@ -1,41 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; -using ARW.Model; -using ARW.Model.Dto.Business.OrderManage.OrderCustomerAddreses; -using ARW.Model.Models.Business.OrderManage.OrderCustomerAddreses; -using ARW.Model.Vo.Business.OrderManage.OrderCustomerAddreses; - -namespace ARW.Service.Business.IBusinessService.OrderManage.OrderCustomerAddreses -{ - /// - /// 订单收货地址记录接口类 - /// - /// @author lwh - /// @date 2023-08-29 - /// - public interface IOrderCustomerAddressService : IBaseService - { - /// - /// 获取订单收货地址记录分页列表 - /// - /// - /// - Task> GetOrderCustomerAddressList(OrderCustomerAddressQueryDto parm); - - - /// - /// 添加或修改订单收货地址记录 - /// - /// - /// - Task AddOrUpdateOrderCustomerAddress(OrderCustomerAddress parm); - - - - - - } -} diff --git a/ARW.Service/Business/IBusinessService/OrderManage/OrderGoodss/IOrderGoodsService.cs b/ARW.Service/Business/IBusinessService/OrderManage/OrderGoodss/IOrderGoodsService.cs deleted file mode 100644 index 827b45c..0000000 --- a/ARW.Service/Business/IBusinessService/OrderManage/OrderGoodss/IOrderGoodsService.cs +++ /dev/null @@ -1,41 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; -using ARW.Model; -using ARW.Model.Dto.Business.OrderManage.OrderGoodss; -using ARW.Model.Models.Business.OrderManage.OrderGoodss; -using ARW.Model.Vo.Business.OrderManage.OrderGoodss; - -namespace ARW.Service.Business.IBusinessService.OrderManage.OrderGoodss -{ - /// - /// 订单商品记录接口类 - /// - /// @author lwh - /// @date 2023-09-01 - /// - public interface IOrderGoodsService : IBaseService - { - /// - /// 获取订单商品记录分页列表 - /// - /// - /// - Task> GetOrderGoodsList(OrderGoodsQueryDto parm); - - - /// - /// 添加或修改订单商品记录 - /// - /// - /// - Task AddOrUpdateOrderGoods(OrderGoods parm); - - - - - - } -} diff --git a/ARW.Service/Business/IBusinessService/OrderManage/OrderRefunds/IOrderRefundService.cs b/ARW.Service/Business/IBusinessService/OrderManage/OrderRefunds/IOrderRefundService.cs deleted file mode 100644 index 9de8336..0000000 --- a/ARW.Service/Business/IBusinessService/OrderManage/OrderRefunds/IOrderRefundService.cs +++ /dev/null @@ -1,60 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; -using ARW.Model; -using ARW.Model.Dto.Business.OrderManage.OrderRefunds; -using ARW.Model.Models.Business.OrderManage.OrderRefunds; -using ARW.Model.Vo.Business.OrderManage.OrderRefunds; - -namespace ARW.Service.Business.IBusinessService.OrderManage.OrderRefunds -{ - /// - /// 售后单记录表接口类 - /// - /// @author lwh - /// @date 2023-08-29 - /// - public interface IOrderRefundService : IBaseService - { - /// - /// 获取售后单记录表分页列表 - /// - /// - /// - Task> GetOrderRefundList(OrderRefundQueryDto parm); - - - /// - /// 获取售后单详情 - /// - /// - /// - Task GetOrderRefundDetails(OrderRefundDetailsDto parm); - - - /// - /// 审核售后订单 - /// - /// - /// - Task AuditOrderRefund(OrderRefundAuditDto parm); - - - /// - /// 商家确认收货 - /// - /// - /// - Task ConfirmsReceipt(OrderRefundAuditDto parm); - - - /// - /// Excel导出 - /// - Task> HandleExportData(List data); - - - } -} diff --git a/ARW.Service/Business/IBusinessService/OrderManage/Orders/IOrderService.cs b/ARW.Service/Business/IBusinessService/OrderManage/Orders/IOrderService.cs deleted file mode 100644 index ebb05a1..0000000 --- a/ARW.Service/Business/IBusinessService/OrderManage/Orders/IOrderService.cs +++ /dev/null @@ -1,86 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; -using ARW.Model; -using ARW.Model.Dto.Api.OrderManage.Orders; -using ARW.Model.Dto.Business.OrderManage.Orders; -using ARW.Model.Models.Business.OrderManage.Orders; -using ARW.Model.Vo.Business.OrderManage.Orders; - -namespace ARW.Service.Business.IBusinessService.OrderManage.Orders -{ - /// - /// 订单接口类 - /// - /// @author lwh - /// @date 2023-08-29 - /// - public interface IOrderService : IBaseService - { - /// - /// 获取订单分页列表 - /// - /// - /// - Task> GetOrderList(OrderQueryDto parm); - - - /// - /// 获取订单详情(Api) - /// - /// - /// - Task GetOrderDetails(OrderDetailDto parm); - - - /// - /// 添加或修改订单 - /// - /// - /// - Task AddOrUpdateOrder(Order parm); - - - /// - /// 发货 - /// - /// - /// - Task Deliver(OrderDeliverDto parm); - - - /// - /// 订单改价 - /// - /// - /// - Task ChangePrice(OrderChangePriceDto parm); - - - /// - /// 审核取消订单 - /// - /// - /// - Task CancelOrder(OrderCancelOrderDto parm); - - - /// - /// Excel导出 - /// - Task> HandleExportData(List data); - - - /// - /// 获取商品订单列表 - /// - /// - /// - Task> GetOrderGoodsList(long orderGuid); - - - - } -} diff --git a/ARW.Service/Business/IBusinessService/OrderTasks/IOrderTaskService.cs b/ARW.Service/Business/IBusinessService/OrderTasks/IOrderTaskService.cs deleted file mode 100644 index 834636c..0000000 --- a/ARW.Service/Business/IBusinessService/OrderTasks/IOrderTaskService.cs +++ /dev/null @@ -1,41 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; -using ARW.Model; -using ARW.Model.Dto.Business.OrderTasks; -using ARW.Model.Models.Business.OrderTasks; -using ARW.Model.Vo.Business.OrderTasks; - -namespace ARW.Service.Business.IBusinessService.OrderTasks -{ - /// - /// 订单取消任务接口类 - /// - /// @author lwh - /// @date 2023-10-23 - /// - public interface IOrderTaskService : IBaseService - { - /// - /// 获取订单取消任务分页列表 - /// - /// - /// - Task> GetOrderTaskList(OrderTaskQueryDto parm); - - - /// - /// 添加或修改订单取消任务 - /// - /// - /// - Task AddOrUpdateOrderTask(OrderTask parm); - - - - - - } -} diff --git a/ARW.Service/Business/IBusinessService/ShopManager/ShopAddresss/IShopAddressService.cs b/ARW.Service/Business/IBusinessService/ShopManager/ShopAddresss/IShopAddressService.cs deleted file mode 100644 index e024ee9..0000000 --- a/ARW.Service/Business/IBusinessService/ShopManager/ShopAddresss/IShopAddressService.cs +++ /dev/null @@ -1,45 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; -using ARW.Model; -using ARW.Model.Dto.Business.ShopManager.ShopAddresss; -using ARW.Model.Models.Business.ShopManager.ShopAddresss; -using ARW.Model.Vo.Business.ShopManager.ShopAddresss; - -namespace ARW.Service.Business.IBusinessService.ShopManager.ShopAddresss -{ - /// - /// 店铺地址接口类 - /// - /// @author lwh - /// @date 2023-06-15 - /// - public interface IShopAddressService : IBaseService - { - /// - /// 获取店铺地址分页列表 - /// - /// - /// - Task> GetShopAddressList(ShopAddressQueryDto parm); - - - /// - /// 添加或修改店铺地址 - /// - /// - /// - Task AddOrUpdateShopAddress(ShopAddress parm); - - - - /// - /// Excel导出 - /// - Task> HandleExportData(List data); - - - } -} diff --git a/ARW.Service/Business/IBusinessService/ShopManager/Shops/IShopService.cs b/ARW.Service/Business/IBusinessService/ShopManager/Shops/IShopService.cs deleted file mode 100644 index 409ab87..0000000 --- a/ARW.Service/Business/IBusinessService/ShopManager/Shops/IShopService.cs +++ /dev/null @@ -1,90 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; -using ARW.Model; -using ARW.Model.Dto.Api.ShopManager.Shops; -using ARW.Model.Dto.Business.ShopManager.Shops; -using ARW.Model.Models.Business.ShopManager.Shops; -using ARW.Model.Vo.Business.GoodsManager.GoodsCategorys; -using ARW.Model.Vo.Business.ShopManager.Shops; - -namespace ARW.Service.Business.IBusinessService.ShopManager.Shops -{ - /// - /// 店铺接口类 - /// - /// @author lwh - /// @date 2023-06-09 - /// - public interface IShopService : IBaseService - { - /// - /// 获取店铺分页列表 - /// - /// - /// - Task> GetShopList(ShopQueryDto parm); - - - /// - /// 获取未绑定的用户列表 - /// - /// - /// - Task> GetUserWithOutBindList(UserWithOutBindQueryDto parm); - - - /// - /// 获取未绑定的客户列表 - /// - /// - /// - Task> GetCustomerWithOutBindList(CustomerWithOutBindQueryDto parm); - - - /// - /// 获取经营类目列表(一级类目) - /// - /// - Task> GetFirstGoodsCategoryList(); - - - /// - /// 添加或修改店铺 - /// - /// - /// - Task AddOrUpdateShop(Shop parm); - - - - /// - /// Excel导出 - /// - Task> HandleExportData(List data); - - /// - /// 审核 - /// - Task Audit(int idsArr, int status,long userGuid); - - - /// - /// 获取商户店铺详情 - /// - /// - /// - Task GetShopOperatorDetail(ShopOperatorQueryDto parm); - - - /// - /// 检查是否有重复商店名称 - /// - /// - /// - Task CheckRepeatShopName(string shopName); - - } -} diff --git a/ARW.Tasks/TaskScheduler/Business/CouponTask_Job.cs b/ARW.Tasks/TaskScheduler/Business/CouponTask_Job.cs deleted file mode 100644 index a7e4ecc..0000000 --- a/ARW.Tasks/TaskScheduler/Business/CouponTask_Job.cs +++ /dev/null @@ -1,150 +0,0 @@ -using ARW.Common; -using ARW.Model.Models.Business.SubscribeTasks; -using ARW.Model.System; -using ARW.Service.Business.IBusinessService.Marketing.CouponManage.Coupons; -using ARW.Service.Business.IBusinessService.Marketing.CouponManage.CustomerCoupons; -using ARW.Service.Business.IBusinessService.SubscribeTasks; -using ARW.Service.System.IService; -using Infrastructure; -using Infrastructure.Attribute; -using Infrastructure.WeChat.SubScribe; -using Quartz; -using Senparc.CO2NET.Extensions; -using Senparc.Weixin.Entities.TemplateMessage; -using Senparc.Weixin.WxOpen.AdvancedAPIs.WxApp.WxAppJson; -using SqlSugar; -using System; -using System.Collections.Generic; -using System.Threading.Tasks; -using SystemTime = System.SystemTime; - -namespace ARW.Tasks.TaskScheduler.Business -{ - /// - /// 优惠券过期任务 - /// - [AppService(ServiceType = typeof(CouponTask_Job), ServiceLifetime = LifeTime.Scoped)] - public class CouponTask_Job : JobBase, IJob - { - private readonly NLog.Logger logger = NLog.LogManager.GetCurrentClassLogger(); - private readonly ISysTasksLogService SysTasksLogService; - private readonly ISysTasksQzService SysTasksQzService; - - private readonly ISubscribeTaskService _SubscribeTaskService; - private readonly ICouponService _CouponService; - private readonly ICustomerCouponService _CustomerCouponService; - - - public CouponTask_Job(ISysTasksLogService sysTasksLogService, ISysTasksQzService sysTasksQzService, ISubscribeTaskService subscribeTaskService, ICouponService couponService, ICustomerCouponService customerCouponService) - { - SysTasksLogService = sysTasksLogService; - SysTasksQzService = sysTasksQzService; - _SubscribeTaskService = subscribeTaskService; - _CouponService = couponService; - _CustomerCouponService = customerCouponService; - } - - public async Task Execute(IJobExecutionContext context) - { - var message = await Run(); - var logModel = await ExecuteJob(context, async () => await Run(), message); - await RecordTaskLog(context, logModel); - } - - - public async Task Run() - { - await Task.Delay(1); - //TODO 业务逻辑 - - var waiCancelList = await _CustomerCouponService.GetListAsync(s => s.CustomerCouponIsExpired == 1 && s.CustomerCouponIsUsed == 1 && s.IsDelete == false); - if (waiCancelList.Count > 0) - { - var taskList = new List(); - foreach (var item in waiCancelList) - { - try - { - // 判断类型 - var coupon = await _CouponService.GetFirstAsync(s => s.CouponGuid == item.CouponGuid); - if(coupon != null) - { - // 领券后生效 - if (coupon.CouponExpireType == 1) - { - var endTime = item.Create_time.AddDays(coupon.CouponEffectiveDays); - if (endTime < DateTime.Now) - { - item.CustomerCouponIsExpired = 2; - await _CustomerCouponService.UpdateAsync(item); - } - } - // 固定时间 - if (coupon.CouponExpireType == 2) - { - var endTime = coupon.CouponFixedEndTime; - if (endTime < DateTime.Now) - { - item.CustomerCouponIsExpired = 2; - await _CustomerCouponService.UpdateAsync(item); - } - } - } - } - catch (Exception ex) - { - return ex.ToString(); - } - } - return taskList.ToJson().ToString(); - } - else - { - return "没有需要执行的任务"; - } - //return "执行成功!"; - - #region 公众号模板消息信息 -- DPBMARK MP - - //可选参数(需要和公众号模板消息匹配): - //var templateData = new - //{ - // first = new Senparc.Weixin.MP.AdvancedAPIs.TemplateMessage.TemplateDataItem("预约健身开始提醒"), - // keyword1 = new Senparc.Weixin.MP.AdvancedAPIs.TemplateMessage.TemplateDataItem("测试门店"), - // keyword2 = new Senparc.Weixin.MP.AdvancedAPIs.TemplateMessage.TemplateDataItem("佛山市顺德区xxx健身"), - // keyword3 = new Senparc.Weixin.MP.AdvancedAPIs.TemplateMessage.TemplateDataItem(SystemTime.Now.ToString("yyyy年MM月dd日 HH:mm")), - // keyword4 = new Senparc.Weixin.MP.AdvancedAPIs.TemplateMessage.TemplateDataItem("1小时"), - // keyword5 = new Senparc.Weixin.MP.AdvancedAPIs.TemplateMessage.TemplateDataItem("还有1个小时开始健身,请熟知!"), - // remark = new Senparc.Weixin.MP.AdvancedAPIs.TemplateMessage.TemplateDataItem("您的 OpenId:" + openId), - //}; - #endregion DPBMARK_END - //System.Console.WriteLine("job test"); - } - - - /// - /// 记录到日志 - /// - /// - /// - public async Task RecordTaskLog(IJobExecutionContext context, SysTasksLog logModel) - { - - //可以直接获取 JobDetail 的值 - IJobDetail job = context.JobDetail; - - logModel.InvokeTarget = job.JobType.FullName; - logModel = await SysTasksLogService.AddTaskLog(job.Key.Name, logModel); - //成功后执行次数+1 - if (logModel.Status == "0") - { - await SysTasksQzService.UpdateAsync(f => new SysTasksQz() - { - RunTimes = f.RunTimes + 1, - LastRunTime = DateTime.Now - }, f => f.ID.ToString() == job.Key.Name); - } - logger.Info($"执行任务【{job.Key.Name}|{logModel.JobName}】结果={logModel.JobMessage}"); - } - } -} diff --git a/ARW.Tasks/TaskScheduler/Business/OrderTask_Job.cs b/ARW.Tasks/TaskScheduler/Business/OrderTask_Job.cs deleted file mode 100644 index 0bbf2bf..0000000 --- a/ARW.Tasks/TaskScheduler/Business/OrderTask_Job.cs +++ /dev/null @@ -1,173 +0,0 @@ -using Aliyun.OSS; -using ARW.Common; -using ARW.Model.Models.Business.OrderManage.Orders; -using ARW.Model.Models.Business.OrderTasks; -using ARW.Model.Models.Business.Payments; -using ARW.Model.Models.Business.SubscribeTasks; -using ARW.Model.System; -using ARW.Service.Business.IBusinessService.Custom.Customers; -using ARW.Service.Business.IBusinessService.OrderManage.Orders; -using ARW.Service.Business.IBusinessService.OrderTasks; -using ARW.Service.Business.IBusinessService.Payments; -using ARW.Service.Business.IBusinessService.SubscribeTasks; -using ARW.Service.System.IService; -using Infrastructure; -using Infrastructure.Attribute; -using Infrastructure.WeChat.SubScribe; -using Infrastructure.WeChat.TenPay; -using Quartz; -using Senparc.CO2NET.Extensions; -using Senparc.CO2NET.HttpUtility; -using Senparc.Weixin.Entities.TemplateMessage; -using Senparc.Weixin.WxOpen.AdvancedAPIs.WxApp.WxAppJson; -using SqlSugar; -using System; -using System.Collections.Generic; -using System.Net.Http; -using System.Threading.Tasks; -using SystemTime = System.SystemTime; - -namespace ARW.Tasks.TaskScheduler.Business -{ - /// - /// 订单取消任务 - /// - [AppService(ServiceType = typeof(OrderTask_Job), ServiceLifetime = LifeTime.Scoped)] - public class OrderTask_Job : JobBase, IJob - { - private readonly NLog.Logger logger = NLog.LogManager.GetCurrentClassLogger(); - private readonly ISysTasksLogService SysTasksLogService; - private readonly ISysTasksQzService SysTasksQzService; - - private readonly IOrderTaskService _OrderTaskService; - private readonly IOrderService _OrderService; - private readonly ICustomerService _CustomerService; - private readonly IPaymentService _PaymentService; - private readonly SenparcHttpClient _httpClient; - - - public OrderTask_Job(ISysTasksLogService sysTasksLogService, ISysTasksQzService sysTasksQzService, IOrderTaskService orderTaskService, IOrderService orderService, ICustomerService customerService, SenparcHttpClient httpClient, IPaymentService paymentService) - { - SysTasksLogService = sysTasksLogService; - SysTasksQzService = sysTasksQzService; - _OrderTaskService = orderTaskService; - _OrderService = orderService; - _CustomerService = customerService; - _httpClient = httpClient; - _PaymentService = paymentService; - } - - public async Task Execute(IJobExecutionContext context) - { - var message = await Run(); - var logModel = await ExecuteJob(context, async () => await Run(), message); - await RecordTaskLog(context, logModel); - } - - - public async Task Run() - { - await Task.Delay(1); - //TODO 业务逻辑 - - var waitCancelList = await _OrderTaskService.GetListAsync(s => s.PayStatus == 1 && s.CancelStatus == 1); - if (waitCancelList.Count > 0) - { - var taskList = new List(); - foreach (var item in waitCancelList) - { - try - { - if (item.EndTime < DateTime.Now) - { - //logger.Info("推送结果:" + res); - Pay pay = new Pay(_httpClient); - - var customer = await _CustomerService.GetFirstAsync(s => s.CustomerGuid == item.CustomerGuid); - var order = await _OrderService.GetFirstAsync(s => s.OrderGuid == item.OrderGuid); - var payment = await _PaymentService.GetFirstAsync(s => s.PaymentGuid == order.PaymentGuid); - - var res = await pay.CloseOrder(payment.PaymentNumber); - if (res == null) - throw new CustomException("订单关闭失败!"); - else - { - var respones = await _PaymentService.UpdateAsync(f => new Payment - { - PaymentStatus = 3, - Update_time = DateTime.Now - }, f => f.PaymentNumber == payment.PaymentNumber); - } - - // 修改订单状态 - await _OrderService.UpdateAsync(f => new Order - { - OrderStatus = 2 - }, s => s.OrderGuid == item.OrderGuid); - - // 修改订单取消任务状态 - await _OrderTaskService.UpdateAsync(f => new OrderTask - { - CancelStatus = 2 - }, s => s.OrderGuid == item.OrderGuid); - - taskList.Add("订单号:" + order.OrderNumber + " " + customer.CustomerNickname + "用户的订单已取消"); - } - } - catch (Exception ex) - { - return ex.ToString(); - } - } - return taskList.ToJson().ToString(); - } - else - { - return "没有需要执行的任务"; - } - //return "执行成功!"; - - #region 公众号模板消息信息 -- DPBMARK MP - - //可选参数(需要和公众号模板消息匹配): - //var templateData = new - //{ - // first = new Senparc.Weixin.MP.AdvancedAPIs.TemplateMessage.TemplateDataItem("预约健身开始提醒"), - // keyword1 = new Senparc.Weixin.MP.AdvancedAPIs.TemplateMessage.TemplateDataItem("测试门店"), - // keyword2 = new Senparc.Weixin.MP.AdvancedAPIs.TemplateMessage.TemplateDataItem("佛山市顺德区xxx健身"), - // keyword3 = new Senparc.Weixin.MP.AdvancedAPIs.TemplateMessage.TemplateDataItem(SystemTime.Now.ToString("yyyy年MM月dd日 HH:mm")), - // keyword4 = new Senparc.Weixin.MP.AdvancedAPIs.TemplateMessage.TemplateDataItem("1小时"), - // keyword5 = new Senparc.Weixin.MP.AdvancedAPIs.TemplateMessage.TemplateDataItem("还有1个小时开始健身,请熟知!"), - // remark = new Senparc.Weixin.MP.AdvancedAPIs.TemplateMessage.TemplateDataItem("您的 OpenId:" + openId), - //}; - #endregion DPBMARK_END - //System.Console.WriteLine("job test"); - } - - - /// - /// 记录到日志 - /// - /// - /// - public async Task RecordTaskLog(IJobExecutionContext context, SysTasksLog logModel) - { - - //可以直接获取 JobDetail 的值 - IJobDetail job = context.JobDetail; - - logModel.InvokeTarget = job.JobType.FullName; - logModel = await SysTasksLogService.AddTaskLog(job.Key.Name, logModel); - //成功后执行次数+1 - if (logModel.Status == "0") - { - await SysTasksQzService.UpdateAsync(f => new SysTasksQz() - { - RunTimes = f.RunTimes + 1, - LastRunTime = DateTime.Now - }, f => f.ID.ToString() == job.Key.Name); - } - logger.Info($"执行任务【{job.Key.Name}|{logModel.JobName}】结果={logModel.JobMessage}"); - } - } -} diff --git a/ARW.WebApi/Controllers/Api/Carts/CartApiController.cs b/ARW.WebApi/Controllers/Api/Carts/CartApiController.cs deleted file mode 100644 index 03c5c19..0000000 --- a/ARW.WebApi/Controllers/Api/Carts/CartApiController.cs +++ /dev/null @@ -1,155 +0,0 @@ -using Infrastructure; -using Infrastructure.Attribute; -using Infrastructure.Enums; -using Infrastructure.Model; -using Mapster; -using Microsoft.AspNetCore.Http; -using Microsoft.AspNetCore.Mvc; -using ARW.Admin.WebApi.Extensions; -using ARW.Admin.WebApi.Filters; -using ARW.Common; -using ARW.Admin.WebApi.Controllers; -using ARW.Model.Dto.Api.Carts; -using ARW.Service.Api.IBusinessService.Carts; -using ARW.Model.Models.Business.Carts; -using ARW.Model.Vo.Api.Carts; -using Microsoft.AspNetCore.Authorization; -using Geocoding; -using ARW.Service.Business.IBusinessService.Carts; -using ARW.Model.Dto.Business.Carts; -using ARW.Admin.WebApi.Framework; -using System.Reflection; - -namespace ARW.WebApi.Controllers.Api.Carts -{ - /// - /// 购物车记录控制器Api - /// - /// @author lwh - /// @date 2023-07-20 - /// - [Verify] - [Route("api/[controller]")] - public class CartApiController : BaseController - { - private readonly ICartService _CartService; - private readonly ICartServiceApi _CartServiceApi; - - /// - /// 依赖注入 - /// - /// 购物车记录购物车记录Api服务 - /// 购物车记录购物车记录服务 - public CartApiController(ICartServiceApi CartServiceApi, ICartService CartService) - { - _CartServiceApi = CartServiceApi; - _CartService = CartService; - } - - - /// - /// 获取购物车记录列表(Api) - /// - /// 查询参数 - /// - [HttpGet("getCartList")] - public async Task GetCartListApi([FromQuery] CartQueryDtoApi parm) - { - var user = JwtUtil.GetLoginUser(App.HttpContext); - parm.CustomerGuid = user.UserId; - var res = await _CartServiceApi.GetCartListApi(parm); - return SUCCESS(res); - } - - /// - /// 添加或修改购物车记录 - /// - /// - /// - [HttpPost("addOrUpdateCart")] - [Log(Title = "添加或修改购物车记录Api", BusinessType = BusinessType.ADDORUPDATE)] - public async Task AddOrUpdateCart([FromBody] CartDto parm) - { - if (parm == null) { throw new CustomException("请求参数错误"); } - - var modal = new Cart(); - if (parm.CartId != 0) modal = parm.Adapt().ToUpdate(HttpContext); - else modal = parm.Adapt().ToCreate(HttpContext); - - var user = JwtUtil.GetLoginUser(App.HttpContext); - modal.CustomerGuid = user.UserId; - - var res = await _CartService.AddOrUpdateCart(modal); - return SUCCESS(res); - } - - - /// - /// 修改购物车商品数量 - /// - /// - /// - [HttpPost("updateCartGoodsNum")] - [Log(Title = "修改购物车商品数量", BusinessType = BusinessType.UPDATE)] - public async Task UpdateCartGoodsNum([FromBody] CartGoodsNumDto parm) - { - if (parm == null) { throw new CustomException("请求参数错误"); } - - var res = await _CartServiceApi.UpdateCartGoodsNum(parm); - return SUCCESS(res); - } - - - /// - /// 修改购物车商品选中状态 - /// - /// - /// - [HttpPost("updateCartGoodsSelect")] - [Log(Title = "修改购物车选中状态", BusinessType = BusinessType.UPDATE)] - public async Task UpdateCartGoodsSelect([FromBody] CartGoodsSelectDto parm) - { - if (parm == null) { throw new CustomException("请求参数错误"); } - - var res = await _CartServiceApi.UpdateCartGoodsSelect(parm); - return SUCCESS(res); - } - - - /// - /// 全选购物车商品 - /// - /// - /// - [HttpPost("selectAllCartGoods")] - [Log(Title = "全选购物车商品", BusinessType = BusinessType.UPDATE)] - public async Task SelectAllCartGoods([FromBody] CartGoodsSelectDto parm) - { - if (parm == null) { throw new CustomException("请求参数错误"); } - - var user = JwtUtil.GetLoginUser(App.HttpContext); - parm.CustomerGuid = user.UserId; - var res = await _CartServiceApi.SelectAllCartGoods(parm); - return SUCCESS(res); - } - - - /// - /// 删除购物车记录 - /// - /// - [HttpDelete("{ids}")] - [Log(Title = "购物车记录删除", BusinessType = BusinessType.DELETE)] - public async Task Delete(string ids) - { - long[] idsArr = Tools.SpitLongArrary(ids); - if (idsArr.Length <= 0) { return ToResponse(ApiResult.Error($"删除失败Id 不能为空")); } - foreach (var item in idsArr) - { - await _CartService.DeleteAsync(s => s.CartId == item); - } - return SUCCESS("删除成功!"); - } - - } -} diff --git a/ARW.WebApi/Controllers/Api/Custom/CustomerAddresses/CustomerAddressApiController.cs b/ARW.WebApi/Controllers/Api/Custom/CustomerAddresses/CustomerAddressApiController.cs deleted file mode 100644 index d1f23c7..0000000 --- a/ARW.WebApi/Controllers/Api/Custom/CustomerAddresses/CustomerAddressApiController.cs +++ /dev/null @@ -1,135 +0,0 @@ -using Infrastructure; -using Infrastructure.Attribute; -using Infrastructure.Enums; -using Infrastructure.Model; -using Mapster; -using Microsoft.AspNetCore.Http; -using Microsoft.AspNetCore.Mvc; -using ARW.Admin.WebApi.Extensions; -using ARW.Admin.WebApi.Filters; -using ARW.Common; -using ARW.Admin.WebApi.Controllers; -using ARW.Model.Dto.Api.Custom.CustomerAddresses; -using ARW.Service.Api.IBusinessService.Custom.CustomerAddresses; -using ARW.Model.Models.Business.Custom.CustomerAddresses; -using ARW.Model.Vo.Api.Custom.CustomerAddresses; -using Microsoft.AspNetCore.Authorization; -using Geocoding; -using ARW.Admin.WebApi.Framework; -using ARW.Model.Dto.Business.Custom.CustomerAddresses; -using ARW.Service.Business.IBusinessService.Custom.CustomerAddresses; -using Microsoft.AspNetCore.Server.IISIntegration; -using ARW.Service.Business.IBusinessService.Custom.Regions; - -namespace ARW.WebApi.Controllers.Api.Custom.CustomerAddresses -{ - /// - /// 客户收货地址控制器Api - /// - /// @author admin - /// @date 2023-06-09 - /// - [Verify] - [Route("api/[controller]")] - public class CustomerAddressApiController : BaseController - { - private readonly ICustomerAddressServiceApi _CustomerAddressServiceApi; - private readonly IRegionService _RegionService; - - /// - /// 依赖注入 - /// - /// 客户收货地址客户收货地址Api服务 - /// 省市区服务 - public CustomerAddressApiController(ICustomerAddressServiceApi CustomerAddressServiceApi, IRegionService regionService) - { - _CustomerAddressServiceApi = CustomerAddressServiceApi; - _RegionService = regionService; - } - - - /// - /// 获取客户收货地址列表(Api) - /// - /// 查询参数 - /// - [HttpGet("getCustomerAddressList")] - public async Task GetCustomerAddressListApi([FromQuery] CustomerAddressQueryDtoApi parm) - { - var user = JwtUtil.GetLoginUser(App.HttpContext); - parm.CustomerAddressCustomerGuid = user.UserId; - var res = await _CustomerAddressServiceApi.GetCustomerAddressListApi(parm); - return SUCCESS(res); - } - - /// - /// 获取CustomerAddress详情(Api) - /// - /// 查询参数 - /// - [HttpGet("getCustomerAddressDetails")] - public async Task GetCustomerAddressDetails([FromQuery] CustomerAddressDtoApi parm) - { - if (parm == null) throw new CustomException("参数错误!"); - - var res = await _CustomerAddressServiceApi.GetCustomerAddressDetails(parm); - - if (res != "[]") - { - res = res.Remove(0, 1); - res = res.Substring(0, res.Length - 1); - var data = res.FromJSON(); - return SUCCESS(data); - } - else - { - return SUCCESS(res); - } - } - - - /// - /// 添加或修改客户收货地址 - /// - /// - /// - [HttpPost("addOrUpdateCustomerAddress")] - [Log(Title = "添加或修改客户收货地址", BusinessType = BusinessType.ADDORUPDATE)] - public async Task AddOrUpdateCustomerAddress([FromBody] CustomerAddressAddDtoApi parm) - { - if (parm == null) { throw new CustomException("请求参数错误"); } - - var modal = new CustomerAddress(); - if (parm.CustomerAddressId != 0) modal = parm.Adapt().ToUpdate(HttpContext); - else modal = parm.Adapt().ToCreate(HttpContext); - - // 字段转换 - var user = JwtUtil.GetLoginUser(App.HttpContext); - modal.CustomerAddressCustomerGuid = user.UserId; - - modal.CustomerAddressProvinceId = await _RegionService.GetRegionId(parm.ProvinceCode,1); - modal.CustomerAddressCityId = await _RegionService.GetRegionId(parm.CityCode,2); - modal.CustomerAddressAreaId = await _RegionService.GetRegionId(parm.DistrictCode,3); - - - var res = await _CustomerAddressServiceApi.AddOrUpdateCustomerAddress(modal,parm.IsDefault); - return SUCCESS(res); - } - - - /// - /// 删除客户收货地址 - /// - /// - [HttpDelete("{ids}")] - [Log(Title = "客户收货地址删除", BusinessType = BusinessType.DELETE)] - public IActionResult Delete(string ids) - { - long[] idsArr = Tools.SpitLongArrary(ids); - if (idsArr.Length <= 0) { return ToResponse(ApiResult.Error($"删除失败Id 不能为空")); } - var response = _CustomerAddressServiceApi.Delete(idsArr); - return SUCCESS("删除成功!"); - } - - } -} diff --git a/ARW.WebApi/Controllers/Api/GoodsManager/GoodsCategorys/GoodsCategoryApiController.cs b/ARW.WebApi/Controllers/Api/GoodsManager/GoodsCategorys/GoodsCategoryApiController.cs deleted file mode 100644 index e88cd43..0000000 --- a/ARW.WebApi/Controllers/Api/GoodsManager/GoodsCategorys/GoodsCategoryApiController.cs +++ /dev/null @@ -1,75 +0,0 @@ -using Infrastructure; -using Infrastructure.Attribute; -using Infrastructure.Enums; -using Infrastructure.Model; -using Mapster; -using Microsoft.AspNetCore.Http; -using Microsoft.AspNetCore.Mvc; -using ARW.Admin.WebApi.Extensions; -using ARW.Admin.WebApi.Filters; -using ARW.Common; -using ARW.Admin.WebApi.Controllers; -using ARW.Model.Dto.Api.GoodsManager.GoodsCategorys; -using ARW.Service.Api.IBusinessService.GoodsManager.GoodsCategorys; -using ARW.Model.Models.Business.GoodsManager.GoodsCategorys; -using ARW.Model.Vo.Api.GoodsManager.GoodsCategorys; -using Microsoft.AspNetCore.Authorization; -using Geocoding; - -namespace ARW.WebApi.Controllers.Api.GoodsManager.GoodsCategorys -{ - /// - /// 经营类目控制器Api - /// - /// @author lwh - /// @date 2023-07-08 - /// - //[Verify] - [Route("api/[controller]")] - public class GoodsCategoryApiController : BaseController - { - private readonly IGoodsCategoryServiceApi _GoodsCategoryServiceApi; - - /// - /// 依赖注入 - /// - /// 经营类目经营类目Api服务 - public GoodsCategoryApiController(IGoodsCategoryServiceApi GoodsCategoryServiceApi) - { - _GoodsCategoryServiceApi = GoodsCategoryServiceApi; - } - - - /// - /// 获取经营类目树形列表(Api) - /// - /// 查询参数 - /// - [HttpGet("getGoodsCategoryTreeList")] - public async Task GetGoodsCategoryTreeListApi([FromQuery] GoodsCategoryQueryDtoApi parm) - { - var res = await _GoodsCategoryServiceApi.GetGoodsCategoryTreeListApi(parm); - if (res == null) - res = new List(); - - return SUCCESS(res); - } - - - /// - /// 获取店铺类目树形列表(Api) - /// - /// 查询参数 - /// - [HttpGet("getShopGoodsCategoryTreeList")] - public async Task GetShopGoodsCategoryTreeListApi([FromQuery] GoodsCategoryQueryDtoApi parm) - { - var res = await _GoodsCategoryServiceApi.GetShopGoodsCategoryTreeListApi(parm); - if (res == null) - res = new List(); - - return SUCCESS(res); - } - - } -} diff --git a/ARW.WebApi/Controllers/Api/GoodsManager/GoodsComments/GoodsCommentApiController.cs b/ARW.WebApi/Controllers/Api/GoodsManager/GoodsComments/GoodsCommentApiController.cs deleted file mode 100644 index e6ae4c7..0000000 --- a/ARW.WebApi/Controllers/Api/GoodsManager/GoodsComments/GoodsCommentApiController.cs +++ /dev/null @@ -1,83 +0,0 @@ -using Infrastructure; -using Infrastructure.Attribute; -using Infrastructure.Enums; -using Infrastructure.Model; -using Mapster; -using Microsoft.AspNetCore.Http; -using Microsoft.AspNetCore.Mvc; -using ARW.Admin.WebApi.Extensions; -using ARW.Admin.WebApi.Filters; -using ARW.Common; -using ARW.Admin.WebApi.Controllers; -using ARW.Model.Dto.Api.GoodsManager.GoodsComments; -using ARW.Service.Api.IBusinessService.GoodsManager.GoodsComments; -using ARW.Model.Models.Business.GoodsManager.GoodsComments; -using ARW.Model.Vo.Api.GoodsManager.GoodsComments; -using Microsoft.AspNetCore.Authorization; -using Geocoding; - -namespace ARW.WebApi.Controllers.Api.GoodsManager.GoodsComments -{ - /// - /// 商品评价控制器Api - /// - /// @author admin - /// @date 2023-07-17 - /// - //[Verify] - [Route("api/[controller]")] - public class GoodsCommentApiController : BaseController - { - private readonly IGoodsCommentServiceApi _GoodsCommentServiceApi; - - /// - /// 依赖注入 - /// - /// 商品评价商品评价Api服务 - public GoodsCommentApiController(IGoodsCommentServiceApi GoodsCommentServiceApi) - { - _GoodsCommentServiceApi = GoodsCommentServiceApi; - } - - - /// - /// 获取商品评价列表(Api) - /// - /// 查询参数 - /// - [HttpGet("getGoodsCommentList")] - public async Task GetGoodsCommentListApi([FromQuery] GoodsCommentQueryDtoApi parm) - { - var res = await _GoodsCommentServiceApi.GetGoodsCommentListApi(parm); - return SUCCESS(res); - } - - /// - /// 获取商品详情页评论(Api) - /// - /// 查询参数 - /// - [HttpGet("getGoodsDetailsComments")] - public async Task GetGoodsDetailsComments([FromQuery] GoodsCommentDtoApi parm) - { - //if (parm == null) throw new CustomException("参数错误!"); - - var res = await _GoodsCommentServiceApi.GetGoodsDetailsComments(parm); - return SUCCESS(res); - } - - - /// - /// 获取商品详情页评论数(Api) - /// - /// 查询参数 - /// - [HttpGet("getGoodsDetailsCommentsCount")] - public async Task GetGoodsDetailsCommentsCount([FromQuery] GoodsCommentDtoApi parm) - { - var res = await _GoodsCommentServiceApi.GetGoodsDetailsCommentsCount(parm); - return SUCCESS(res); - } - - } -} diff --git a/ARW.WebApi/Controllers/Api/GoodsManager/Goodss/GoodsApiController.cs b/ARW.WebApi/Controllers/Api/GoodsManager/Goodss/GoodsApiController.cs deleted file mode 100644 index b55aef3..0000000 --- a/ARW.WebApi/Controllers/Api/GoodsManager/Goodss/GoodsApiController.cs +++ /dev/null @@ -1,99 +0,0 @@ -using Infrastructure; -using Infrastructure.Attribute; -using Infrastructure.Enums; -using Infrastructure.Model; -using Mapster; -using Microsoft.AspNetCore.Http; -using Microsoft.AspNetCore.Mvc; -using ARW.Admin.WebApi.Extensions; -using ARW.Admin.WebApi.Filters; -using ARW.Common; -using ARW.Admin.WebApi.Controllers; -using ARW.Model.Dto.Api.GoodsManager.Goodss; -using ARW.Service.Api.IBusinessService.GoodsManager.Goodss; -using ARW.Model.Models.Business.GoodsManager.Goodss; -using ARW.Model.Vo.Api.GoodsManager.Goodss; -using Microsoft.AspNetCore.Authorization; -using Geocoding; -using ARW.Service.Api.IBusinessService.GoodsManager.GoodsCategorys; -using ARW.Admin.WebApi.Framework; - -namespace ARW.WebApi.Controllers.Api.GoodsManager.Goodss -{ - /// - /// 商品控制器Api - /// - /// @author lwh - /// @date 2023-07-09 - /// - //[Verify] - [Route("api/[controller]")] - public class GoodsApiController : BaseController - { - private readonly IGoodsServiceApi _GoodsServiceApi; - - - /// - /// 依赖注入 - /// - /// 商品商品Api服务 - public GoodsApiController(IGoodsServiceApi GoodsServiceApi) - { - _GoodsServiceApi = GoodsServiceApi; - } - - - /// - /// 获取商品列表(Api) - /// - /// 查询参数 - /// z - [HttpGet("getGoodsList")] - public async Task GetGoodsListApi([FromQuery] GoodsQueryDtoApi parm) - { - var res = await _GoodsServiceApi.GetGoodsListApi(parm); - return SUCCESS(res); - } - - - /// - /// 获取商品运费(Api) - /// - /// 查询参数 - /// - [HttpPost("getGoodsFreight")] - public async Task GetGoodsFreight([FromBody] GoodsFreightDto parm) - { - var res = await _GoodsServiceApi.GetGoodsFreight(parm); - return SUCCESS(res); - } - - /// - /// 获取Goods详情(Api) - /// - /// 查询参数 - /// - [HttpGet("getGoodsDetails")] - public async Task GetGoodsDetails([FromQuery] GoodsDtoApi parm) - { - //if (parm == null) throw new CustomException("参数错误!"); - long userId = 0; - var user = JwtUtil.GetLoginUser(App.HttpContext); - if (user != null) - userId = user.UserId; - - var res = await _GoodsServiceApi.GetGoodsDetails(parm, userId); - - if (res != "[]") - { - var data = res.FromJSON(); - return SUCCESS(data); - } - else - { - return SUCCESS(res); - } - } - - } -} diff --git a/ARW.WebApi/Controllers/Api/Home/HomeApiController.cs b/ARW.WebApi/Controllers/Api/Home/HomeApiController.cs index 1db61ff..ef4c764 100644 --- a/ARW.WebApi/Controllers/Api/Home/HomeApiController.cs +++ b/ARW.WebApi/Controllers/Api/Home/HomeApiController.cs @@ -1,23 +1,5 @@ -using Infrastructure; -using Infrastructure.Attribute; -using Infrastructure.Enums; -using Infrastructure.Model; -using Mapster; -using Microsoft.AspNetCore.Http; using Microsoft.AspNetCore.Mvc; -using ARW.Admin.WebApi.Extensions; -using ARW.Admin.WebApi.Filters; -using ARW.Common; using ARW.Admin.WebApi.Controllers; -using ARW.Model.Dto.Api.GoodsManager.Goodss; -using ARW.Service.Api.IBusinessService.GoodsManager.Goodss; -using ARW.Model.Models.Business.GoodsManager.Goodss; -using ARW.Model.Vo.Api.GoodsManager.Goodss; -using Microsoft.AspNetCore.Authorization; -using Geocoding; -using ARW.Service.Api.IBusinessService.GoodsManager.GoodsCategorys; -using ARW.Model.Dto.Api.GoodsManager.GoodsCategorys; -using ARW.Model.Vo.Api.GoodsManager.GoodsCategorys; namespace ARW.WebApi.Controllers.Api.GoodsManager.Home { @@ -31,30 +13,15 @@ namespace ARW.WebApi.Controllers.Api.GoodsManager.Home [Route("api/[controller]")] public class HomeApiController : BaseController { - private readonly IGoodsServiceApi _GoodsServiceApi; - private readonly IGoodsCategoryServiceApi _GoodsCategoryServiceApi; /// /// 依赖注入 /// - /// 商品商品Api服务 - public HomeApiController(IGoodsServiceApi GoodsServiceApi, IGoodsCategoryServiceApi goodsCategoryServiceApi) + public HomeApiController() { - _GoodsServiceApi = GoodsServiceApi; - _GoodsCategoryServiceApi = goodsCategoryServiceApi; } - /// - /// 获取首页推荐类目列表(Api) - /// - /// - [HttpGet("getHomeCategoryListApi")] - public async Task GetHomeCategoryListApi() - { - var res = await _GoodsCategoryServiceApi.GetHomeCategoryListApi(); - return SUCCESS(res); - } } } diff --git a/ARW.WebApi/Controllers/Api/Marketing/CouponManage/Coupons/CouponApiController.cs b/ARW.WebApi/Controllers/Api/Marketing/CouponManage/Coupons/CouponApiController.cs deleted file mode 100644 index 2824c4c..0000000 --- a/ARW.WebApi/Controllers/Api/Marketing/CouponManage/Coupons/CouponApiController.cs +++ /dev/null @@ -1,84 +0,0 @@ -using Infrastructure; -using Infrastructure.Attribute; -using Infrastructure.Enums; -using Infrastructure.Model; -using Mapster; -using Microsoft.AspNetCore.Http; -using Microsoft.AspNetCore.Mvc; -using ARW.Admin.WebApi.Extensions; -using ARW.Admin.WebApi.Filters; -using ARW.Common; -using ARW.Admin.WebApi.Controllers; -using ARW.Model.Dto.Api.Marketing.CouponManage.Coupons; -using ARW.Service.Api.IBusinessService.Marketing.CouponManage.Coupons; -using ARW.Model.Models.Business.Marketing.CouponManage.Coupons; -using ARW.Model.Vo.Api.Marketing.CouponManage.Coupons; -using Microsoft.AspNetCore.Authorization; -using Geocoding; -using ARW.Admin.WebApi.Framework; - -namespace ARW.WebApi.Controllers.Api.Marketing.CouponManage.Coupons -{ - /// f - /// 优惠券控制器Api - /// - /// @author lwh - /// @date 2023-08-01 - /// - [Verify] - [Route("api/[controller]")] - public class CouponApiController : BaseController - { - private readonly ICouponServiceApi _CouponServiceApi; - - /// - /// 依赖注入 - /// - /// 优惠券优惠券Api服务 - public CouponApiController(ICouponServiceApi CouponServiceApi) - { - _CouponServiceApi = CouponServiceApi; - } - - - /// - /// 获取优惠券列表(Api) - /// - /// 查询参数 - /// - [HttpGet("getCouponList")] - public async Task GetCouponListApi([FromQuery] CouponQueryDtoApi parm) - { - var user = JwtUtil.GetLoginUser(App.HttpContext); - parm.CustomerGuid = user.UserId; - var res = await _CouponServiceApi.GetCouponListApi(parm); - return SUCCESS(res); - } - - /// - /// 获取Coupon详情(Api) - /// - /// 查询参数 - /// - [HttpGet("getCouponDetails")] - public async Task GetCouponDetails([FromQuery] CouponDtoApi parm) - { - //if (parm == null) throw new CustomException("参数错误!"); - - var res = await _CouponServiceApi.GetCouponDetails(parm); - - if (res != "[]") - { - res = res.Remove(0, 1); - res = res.Substring(0, res.Length - 1); - var data = res.FromJSON(); - return SUCCESS(data); - } - else - { - return SUCCESS(res); - } - } - - } -} diff --git a/ARW.WebApi/Controllers/Api/Marketing/CouponManage/CustomerCoupons/CustomerCouponApiController.cs b/ARW.WebApi/Controllers/Api/Marketing/CouponManage/CustomerCoupons/CustomerCouponApiController.cs deleted file mode 100644 index a498374..0000000 --- a/ARW.WebApi/Controllers/Api/Marketing/CouponManage/CustomerCoupons/CustomerCouponApiController.cs +++ /dev/null @@ -1,105 +0,0 @@ -using Infrastructure; -using Infrastructure.Attribute; -using Infrastructure.Enums; -using Infrastructure.Model; -using Mapster; -using Microsoft.AspNetCore.Http; -using Microsoft.AspNetCore.Mvc; -using ARW.Admin.WebApi.Extensions; -using ARW.Admin.WebApi.Filters; -using ARW.Common; -using ARW.Admin.WebApi.Controllers; -using ARW.Model.Dto.Api.Marketing.CouponManage.CustomerCoupons; -using ARW.Service.Api.IBusinessService.Marketing.CouponManage.CustomerCoupons; -using ARW.Model.Models.Business.Marketing.CouponManage.CustomerCoupons; -using ARW.Model.Vo.Api.Marketing.CouponManage.CustomerCoupons; -using Microsoft.AspNetCore.Authorization; -using Geocoding; -using ARW.Admin.WebApi.Framework; -using ARW.Model.Dto.Business.Marketing.CouponManage.CustomerCoupons; -using ARW.Service.Business.IBusinessService.Marketing.CouponManage.CustomerCoupons; - -namespace ARW.WebApi.Controllers.Api.Marketing.CouponManage.CustomerCoupons -{ - /// - /// 领券记录控制器Api - /// - /// @author lwh - /// @date 2023-07-31 - /// - [Verify] - [Route("api/[controller]")] - public class CustomerCouponApiController : BaseController - { - private readonly ICustomerCouponServiceApi _CustomerCouponServiceApi; - - /// - /// 依赖注入 - /// - /// 领券记录领券记录Api服务 - public CustomerCouponApiController(ICustomerCouponServiceApi CustomerCouponServiceApi) - { - _CustomerCouponServiceApi = CustomerCouponServiceApi; - } - - - /// - /// 获取领券记录列表(Api) - /// - /// 查询参数 - /// - [HttpGet("getCustomerCouponList")] - public async Task GetCustomerCouponListApi([FromQuery] CustomerCouponQueryDtoApi parm) - { - var user = JwtUtil.GetLoginUser(App.HttpContext); - parm.CustomerGuid = user.UserId; - var res = await _CustomerCouponServiceApi.GetCustomerCouponListApi(parm); - return SUCCESS(res); - } - - - /// - /// 领取优惠券 - /// - /// - /// - [HttpPost("addCustomerCoupon")] - [Log(Title = "领取优惠券", BusinessType = BusinessType.ADDORUPDATE)] - public async Task AddCustomerCoupon([FromBody] CustomerCouponDto parm) - { - if (parm == null) { throw new CustomException("请求参数错误"); } - var user = JwtUtil.GetLoginUser(App.HttpContext); - parm.CustomerGuid = user.UserId; - - var modal = parm.Adapt().ToCreate(HttpContext); - - var res = await _CustomerCouponServiceApi.AddCustomerCoupon(modal); - return SUCCESS(res); - } - - - /// - /// 获取CustomerCoupon详情(Api) - /// - /// 查询参数 - /// - [HttpGet("getCustomerCouponDetails")] - public async Task GetCustomerCouponDetails([FromQuery] CustomerCouponDtoApi parm) - { - //if (parm == null) throw new CustomException("参数错误!"); - - var res = await _CustomerCouponServiceApi.GetCustomerCouponDetails(parm); - - if (res != "[]") - { - var data = res.FromJSON(); - return SUCCESS(data); - } - else - { - return SUCCESS(res); - } - } - - } -} diff --git a/ARW.WebApi/Controllers/Api/OrderManage/OrderRefunds/OrderRefundApiController.cs b/ARW.WebApi/Controllers/Api/OrderManage/OrderRefunds/OrderRefundApiController.cs deleted file mode 100644 index c688197..0000000 --- a/ARW.WebApi/Controllers/Api/OrderManage/OrderRefunds/OrderRefundApiController.cs +++ /dev/null @@ -1,174 +0,0 @@ -using Infrastructure; -using Infrastructure.Attribute; -using Infrastructure.Enums; -using Infrastructure.Model; -using Mapster; -using Microsoft.AspNetCore.Http; -using Microsoft.AspNetCore.Mvc; -using ARW.Admin.WebApi.Extensions; -using ARW.Admin.WebApi.Filters; -using ARW.Common; -using ARW.Admin.WebApi.Controllers; -using ARW.Model.Dto.Api.OrderManage.OrderRefunds; -using ARW.Service.Api.IBusinessService.OrderManage.OrderRefunds; -using ARW.Model.Models.Business.OrderManage.OrderRefunds; -using ARW.Model.Vo.Api.OrderManage.OrderRefunds; -using Microsoft.AspNetCore.Authorization; -using Geocoding; -using ARW.Model.Dto.Business.OrderManage.OrderRefunds; -using ARW.Service.Business.IBusinessService.OrderManage.OrderRefunds; -using ARW.Admin.WebApi.Framework; -using ARW.Service.Business.IBusinessService.LogisticsManage.LogisticsCompanys; -using ARW.Service.System.IService; -using ARW.Service.Business.IBusinessService.OrderManage.Orders; - -namespace ARW.WebApi.Controllers.Api.OrderManage.OrderRefunds -{ - /// - /// 售后单记录表控制器Api - /// - /// @author lwh - /// @date 2023-10-16 - /// - [Verify] - [Route("api/[controller]")] - public class OrderRefundApiController : BaseController - { - private readonly IOrderRefundServiceApi _OrderRefundServiceApi; - private readonly ILogisticsCompanyService _LogisticsCompanyService; - private readonly ISysDictDataService _SysDictDataService; - private readonly IOrderService _OrderService; - - /// - /// 依赖注入 - /// - /// 售后单记录表售后单记录表Api服务 - public OrderRefundApiController(IOrderRefundServiceApi OrderRefundServiceApi, ILogisticsCompanyService logisticsCompanyService, ISysDictDataService sysDictDataService, IOrderService orderService) - { - _OrderRefundServiceApi = OrderRefundServiceApi; - _LogisticsCompanyService = logisticsCompanyService; - _SysDictDataService = sysDictDataService; - _OrderService = orderService; - } - - - /// - /// 获取售后单记录表列表(Api) - /// - /// 查询参数 - /// - [HttpGet("getOrderRefundList")] - public async Task GetOrderRefundListApi([FromQuery] OrderRefundQueryDtoApi parm) - { - var user = JwtUtil.GetLoginUser(App.HttpContext); - parm.CustomerGuid = user.UserId; - - var res = await _OrderRefundServiceApi.GetOrderRefundListApi(parm); - return SUCCESS(res); - } - - - /// - /// 获取OrderRefund详情(Api) - /// - /// 查询参数 - /// - [HttpGet("getOrderRefundDetails")] - public async Task GetOrderRefundDetails([FromQuery] OrderRefundDtoApi parm) - { - //if (parm == null) throw new CustomException("参数错误!"); - - var res = await _OrderRefundServiceApi.GetOrderRefundDetails(parm); - - if (res != "[]") - { - var data = res.FromJSON(); - return SUCCESS(data); - } - else - { - return SUCCESS(res); - } - } - - - /// - /// 获取物流公司列表 - /// - /// - [HttpGet("getLogisticsCompanyList")] - public async Task GetLogisticsCompanyList() - { - var res = await _LogisticsCompanyService.GetListAsync(); - return SUCCESS(res); - } - - - /// - /// 获取退款原因 - /// - /// - [HttpGet("getRefundReason")] - public async Task GetRefundReason() - { - var res = _SysDictDataService.SelectDictDataByType("refund_reason"); - return SUCCESS(res); - } - - - /// - /// 添加售后单记录表 - /// - /// - /// - [HttpPost("addOrderRefund")] - [Log(Title = "添加售后单记录表", BusinessType = BusinessType.ADDORUPDATE)] - public async Task AddOrderRefund([FromBody] AddOrderRefundApiDto parm) - { - if (parm == null) { throw new CustomException("请求参数错误"); } - var user = JwtUtil.GetLoginUser(App.HttpContext); - parm.CustomerGuid = user.UserId; - - var order = await _OrderService.GetFirstAsync(s => s.OrderGuid == parm.OrderGuid); - parm.ShopGuid = order.ShopGuid; - - var modal = parm.Adapt().ToCreate(HttpContext); - var res = await _OrderRefundServiceApi.AddOrderRefund(modal); - return SUCCESS(res); - } - - - /// - /// 撤销申请 - /// - /// - /// - [HttpPost("repeal")] - [Log(Title = "撤销申请", BusinessType = BusinessType.ADDORUPDATE)] - public async Task RepealOrderRefund([FromBody] AddOrderRefundApiDto parm) - { - if (parm == null) { throw new CustomException("请求参数错误"); } - - var res = await _OrderRefundServiceApi.RepealOrderRefund(parm); - return SUCCESS(res); - } - - - /// - /// 买家发货(填写运单号) - /// - /// - /// - [HttpPost("buyerDelivery")] - [Log(Title = "买家发货(填写运单号)", BusinessType = BusinessType.ADDORUPDATE)] - public async Task BuyerDelivery([FromBody] BuyerDeliveryApiDto parm) - { - if (parm == null) { throw new CustomException("请求参数错误"); } - - var res = await _OrderRefundServiceApi.BuyerDelivery(parm); - return SUCCESS(res); - } - - - } -} diff --git a/ARW.WebApi/Controllers/Api/OrderManage/Orders/OrderApiController.cs b/ARW.WebApi/Controllers/Api/OrderManage/Orders/OrderApiController.cs deleted file mode 100644 index 91b086c..0000000 --- a/ARW.WebApi/Controllers/Api/OrderManage/Orders/OrderApiController.cs +++ /dev/null @@ -1,192 +0,0 @@ -using Infrastructure; -using Infrastructure.Attribute; -using Infrastructure.Enums; -using Infrastructure.Model; -using Mapster; -using Microsoft.AspNetCore.Http; -using Microsoft.AspNetCore.Mvc; -using ARW.Admin.WebApi.Extensions; -using ARW.Admin.WebApi.Filters; -using ARW.Common; -using ARW.Admin.WebApi.Controllers; -using ARW.Model.Dto.Api.OrderManage.Orders; -using ARW.Service.Api.IBusinessService.OrderManage.Orders; -using ARW.Model.Models.Business.OrderManage.Orders; -using ARW.Model.Vo.Api.OrderManage.Orders; -using Microsoft.AspNetCore.Authorization; -using Geocoding; -using ARW.Model.Dto.Api.Carts; -using ARW.Service.Api.IBusinessService.Carts; -using ARW.Model.Models.Business.GoodsManager.GoodsComments; -using ARW.Admin.WebApi.Framework; -using ARW.Service.Business.IBusinessService.ShopManager.Shops; -using ARW.Model.Vo.Api.GoodsManager.Goodss; -using ARW.Service.Business.IBusinessService.OrderManage.Orders; - -namespace ARW.WebApi.Controllers.Api.OrderManage.Orders -{ - /// - /// 订单控制器Api - /// - /// @author lwh - /// @date 2023-09-01 - /// - [Verify] - [Route("api/[controller]")] - public class OrderApiController : BaseController - { - private readonly IOrderServiceApi _OrderServiceApi; - - /// - /// 依赖注入 - /// - /// 订单订单Api服务 - public OrderApiController(IOrderServiceApi OrderServiceApi) - { - _OrderServiceApi = OrderServiceApi; - } - - - /// - /// 获取订单列表(Api) - /// - /// 查询参数 - /// - [HttpGet("getOrderList")] - public async Task GetOrderListApi([FromQuery] OrderQueryDtoApi parm) - { - var user = JwtUtil.GetLoginUser(App.HttpContext); - parm.CustomerGuid = user.UserId; - - var res = await _OrderServiceApi.GetOrderListApi(parm); - return SUCCESS(res); - } - - - /// - /// 获取售后订单商品列表(Api) - /// - /// 查询参数 - /// - [HttpGet("getOrderRefundGoods")] - public async Task GetOrderRefundGoods([FromQuery] OrderDtoApi parm) - { - var res = await _OrderServiceApi.GetOrderRefundGoodsList(parm); - return SUCCESS(res); - } - - - - /// - /// 获取Order详情(Api) - /// - /// 查询参数 - /// - [HttpGet("getOrderDetails")] - public async Task GetOrderDetails([FromQuery] OrderDtoApi parm) - { - if (parm == null) throw new CustomException("参数错误!"); - - var res = await _OrderServiceApi.GetOrderDetails(parm); - - if (res != "[]") - { - var data = res.FromJSON(); - return SUCCESS(data); - } - else - { - return SUCCESS(res); - } - - } - - - - /// - /// 待付款取消订单 - /// - /// - /// - [HttpPost("waitPayCancelOrder")] - [Log(Title = "待付款取消订单", BusinessType = BusinessType.UPDATE)] - public async Task WaitPayCancelOrder([FromBody] OrderDtoApi parm) - { - if (parm == null) { throw new CustomException("请求参数错误"); } - - var res = await _OrderServiceApi.WaitPayCancelOrder(parm); - return SUCCESS(res); - } - - - /// - /// 已付款取消订单 - /// - /// - /// - [HttpPost("payCancelOrder")] - [Log(Title = "已付款取消订单", BusinessType = BusinessType.UPDATE)] - public async Task PayCancelOrder([FromBody] OrderDtoApi parm) - { - if (parm == null) { throw new CustomException("请求参数错误"); } - - var res = await _OrderServiceApi.PayCancelOrder(parm); - return SUCCESS(res); - } - - - /// - /// 确认收货 - /// - /// - /// - [HttpPost("confirmReceipt")] - [Log(Title = "确认收货", BusinessType = BusinessType.UPDATE)] - public async Task ConfirmReceipt([FromBody] OrderDtoApi parm) - { - if (parm == null) { throw new CustomException("请求参数错误"); } - - var res = await _OrderServiceApi.ConfirmReceipt(parm); - return SUCCESS(res); - } - - - /// - /// 评价 - /// - /// - /// - [HttpPost("addComment")] - [Log(Title = "评价", BusinessType = BusinessType.UPDATE)] - public async Task AddComment([FromBody] AddCommentDto parm) - { - if (parm == null) { throw new CustomException("请求参数错误"); } - var user = JwtUtil.GetLoginUser(App.HttpContext); - parm.CustomerGuid = user.UserId; - - var modal = parm.Adapt().ToCreate(HttpContext); - var res = await _OrderServiceApi.AddComment(modal); - return SUCCESS(res); - } - - - /// - /// 删除订单 - /// - /// - [HttpDelete("{ids}")] - [ActionPermissionFilter(Permission = "business:order:delete")] - [Log(Title = "订单删除", BusinessType = BusinessType.DELETE)] - public async Task Delete(string ids) - { - int[] idsArr = Tools.SpitIntArrary(ids); - if (idsArr.Length <= 0) { return ToResponse(ApiResult.Error($"删除失败Id 不能为空")); } - - var response = _OrderServiceApi.Delete(idsArr); - - return SUCCESS("删除成功!"); - } - - - } -} diff --git a/ARW.WebApi/Controllers/Api/ShopManager/ShopGoodsCategorys/ShopGoodsCategoryApiController.cs b/ARW.WebApi/Controllers/Api/ShopManager/ShopGoodsCategorys/ShopGoodsCategoryApiController.cs deleted file mode 100644 index cb09763..0000000 --- a/ARW.WebApi/Controllers/Api/ShopManager/ShopGoodsCategorys/ShopGoodsCategoryApiController.cs +++ /dev/null @@ -1,59 +0,0 @@ -using Infrastructure; -using Infrastructure.Attribute; -using Infrastructure.Enums; -using Infrastructure.Model; -using Mapster; -using Microsoft.AspNetCore.Http; -using Microsoft.AspNetCore.Mvc; -using ARW.Admin.WebApi.Extensions; -using ARW.Admin.WebApi.Filters; -using ARW.Common; -using ARW.Admin.WebApi.Controllers; -using ARW.Model.Dto.Api.GoodsManager.ShopGoodsCategorys; -using ARW.Service.Api.IBusinessService.GoodsManager.ShopGoodsCategorys; -using ARW.Model.Models.Business.GoodsManager.ShopGoodsCategorys; -using ARW.Model.Vo.Api.GoodsManager.ShopGoodsCategorys; -using Microsoft.AspNetCore.Authorization; -using Geocoding; - -namespace ARW.WebApi.Controllers.Api.ShopManager.ShopGoodsCategorys -{ - /// - /// 店铺商品类目控制器Api - /// - /// @author lwh - /// @date 2023-07-20 - /// - //[Verify] - [Route("api/[controller]")] - public class ShopGoodsCategoryApiController : BaseController - { - private readonly IShopGoodsCategoryServiceApi _ShopGoodsCategoryServiceApi; - - /// - /// 依赖注入 - /// - /// 店铺商品类目店铺商品类目Api服务 - public ShopGoodsCategoryApiController(IShopGoodsCategoryServiceApi ShopGoodsCategoryServiceApi) - { - _ShopGoodsCategoryServiceApi = ShopGoodsCategoryServiceApi; - } - - - /// - /// 获取店铺商品类目树形列表(Api) - /// - /// 查询参数 - /// - [HttpGet("getShopGoodsCategoryTreeList")] - public async Task GetShopGoodsCategoryTreeListApi([FromQuery] ShopGoodsCategoryQueryDtoApi parm) - { - var res = await _ShopGoodsCategoryServiceApi.GetShopGoodsCategoryTreeListApi(parm); - if (res == null) - res = new List(); - - return SUCCESS(res); - } - - } -} diff --git a/ARW.WebApi/Controllers/Api/ShopManager/Shops/ShopApiController.cs b/ARW.WebApi/Controllers/Api/ShopManager/Shops/ShopApiController.cs deleted file mode 100644 index 8716b35..0000000 --- a/ARW.WebApi/Controllers/Api/ShopManager/Shops/ShopApiController.cs +++ /dev/null @@ -1,127 +0,0 @@ -using Infrastructure; -using Infrastructure.Attribute; -using Infrastructure.Enums; -using Infrastructure.Model; -using Mapster; -using Microsoft.AspNetCore.Http; -using Microsoft.AspNetCore.Mvc; -using ARW.Admin.WebApi.Extensions; -using ARW.Admin.WebApi.Filters; -using ARW.Common; -using ARW.Admin.WebApi.Controllers; -using ARW.Model.Dto.Api.ShopManager.Shops; -using ARW.Service.Api.IBusinessService.ShopManager.Shops; -using ARW.Model.Models.Business.ShopManager.Shops; -using ARW.Model.Vo.Api.ShopManager.Shops; -using Microsoft.AspNetCore.Authorization; -using Geocoding; -using ARW.Model.Dto.Business.ShopManager.Shops; -using ARW.Service.Business.IBusinessService.ShopManager.Shops; -using ARW.Model.Vo.Business.GoodsManager.GoodsCategorys; -using ARW.Admin.WebApi.Framework; - -namespace ARW.WebApi.Controllers.Api.ShopManager.Shops -{ - /// - /// 店铺控制器Api - /// - /// @author lwh - /// @date 2023-06-12 - /// - [Verify] - [Route("api/[controller]")] - public class ShopApiController : BaseController - { - private readonly IShopServiceApi _ShopServiceApi; - private readonly IShopService _ShopService; - - /// - /// 依赖注入 - /// - /// 店铺店铺Api服务 - /// 店铺店铺服务 - public ShopApiController(IShopServiceApi ShopServiceApi, IShopService ShopService) - { - _ShopServiceApi = ShopServiceApi; - _ShopService = ShopService; - } - - - /// - /// 获取经营类目列表(一级类目) - /// - /// - [HttpGet("getFirstGoodsCategoryList")] - public async Task GetFirstGoodsCategoryList() - { - var res = await _ShopServiceApi.GetFirstGoodsCategoryList(); - - return SUCCESS(res); - } - - /// - /// 获取经营类目(Api) - /// - /// 查询参数 - /// - [HttpGet("getShopList")] - public async Task GetShopListApi([FromQuery] ShopQueryDtoApi parm) - { - var res = await _ShopServiceApi.GetShopListApi(parm); - return SUCCESS(res); - } - - - /// - /// 添加或修改店铺 - /// - /// - /// - [HttpPost("addOrUpdateShop")] - [Log(Title = "添加或修改店铺", BusinessType = BusinessType.ADDORUPDATE)] - public async Task AddOrUpdateShop([FromBody] ShopDto parm) - { - if (parm == null) { throw new CustomException("请求参数错误"); } - - var isRepeat = await _ShopService.CheckRepeatShopName(parm.ShopName); - if (isRepeat) throw new CustomException("商铺名称已存在"); - - var modal = new Shop(); - if (parm.ShopId != 0) modal = parm.Adapt().ToUpdate(HttpContext); - else modal = parm.Adapt().ToCreate(HttpContext); - - var user = JwtUtil.GetLoginUser(App.HttpContext); - modal.ShopCustomerGuid = user.UserId; - - var res = await _ShopServiceApi.AddOrUpdateShop(modal); - return SUCCESS(res); - } - - - /// - /// 获取Shop详情(Api) - /// - /// 查询参数 - /// - [HttpGet("getShopDetails")] - public async Task GetShopDetails([FromQuery] ShopDtoApi parm) - { - //if (parm == null) throw new CustomException("参数错误!"); - - var res = await _ShopServiceApi.GetShopDetails(parm); - - if (res != "[]") - { - res = res.Remove(0, 1); - res = res.Substring(0, res.Length - 1); - var data = res.FromJSON(); - return SUCCESS(data); - } - else - { - return SUCCESS(res); - } - } - - } -} diff --git a/ARW.WebApi/Controllers/Api/Wechat/WxPay/WxPayController.cs b/ARW.WebApi/Controllers/Api/Wechat/WxPay/WxPayController.cs index d7aec21..ee2b230 100644 --- a/ARW.WebApi/Controllers/Api/Wechat/WxPay/WxPayController.cs +++ b/ARW.WebApi/Controllers/Api/Wechat/WxPay/WxPayController.cs @@ -1,6 +1,5 @@ using ARW.Admin.WebApi.Controllers; using ARW.Model.Models.Business.Payments; -using ARW.Service.Business.IBusinessService.Payments; using Infrastructure.WeChat.TenPay; using Infrastructure; using Microsoft.AspNetCore.Mvc; @@ -8,15 +7,9 @@ using Senparc.CO2NET.HttpUtility; using Senparc.Weixin.TenPayV3.Apis; using static Infrastructure.WeChat.TenPay.Pay; using ARW.Admin.WebApi.Framework; -using Senparc.Weixin.Open.WxOpenAPIs; -using Senparc.Weixin.WxOpen.AdvancedAPIs.WxApp; using ARW.Service.Business.IBusinessService.Custom.Customers; using ARW.Service.Api.IBusinessService.PayManage; -using ARW.Service.Api.BusinessService.PaymentManage; -using ARW.Model.Dto.Api.Carts; using ARW.Model.Dto.Api.Pay; -using ARW.Repository.Business.Payments; -using ARW.Service.Business.IBusinessService.OrderManage.Orders; namespace ARW.WebApi.Controllers.Api.Wechat.WxPay { @@ -30,16 +23,14 @@ namespace ARW.WebApi.Controllers.Api.Wechat.WxPay private readonly ICustomerService _CustomerService; private readonly IPayServiceApi _PayServiceApi; - private readonly IOrderService _OrderServiceApi; private readonly NLog.Logger logger = NLog.LogManager.GetCurrentClassLogger(); private readonly SenparcHttpClient _httpClient; - public WxPayController(ICustomerService customerService, SenparcHttpClient httpClient, IPayServiceApi payServiceApi, IOrderService orderServiceApi) + public WxPayController(ICustomerService customerService, SenparcHttpClient httpClient, IPayServiceApi payServiceApi) { _CustomerService = customerService; _httpClient = httpClient; _PayServiceApi = payServiceApi; - _OrderServiceApi = orderServiceApi; } @@ -76,8 +67,8 @@ namespace ARW.WebApi.Controllers.Api.Wechat.WxPay var user = JwtUtil.GetLoginUser(App.HttpContext); parm.UserId = user.UserId; - var order = await _OrderServiceApi.GetFirstAsync(s => s.OrderNumber == parm.OrderNo); - var payment = await _PayServiceApi.GetFirstAsync(s => s.PaymentGuid == order.PaymentGuid); + //var order = await _OrderServiceApi.GetFirstAsync(s => s.OrderNumber == parm.OrderNo); + var payment = await _PayServiceApi.GetFirstAsync(s => s.PaymentGuid == 1); // 获取金额 //var price = 1;//单位:分 diff --git a/ARW.WebApi/Controllers/Business/Carts/CartController.cs b/ARW.WebApi/Controllers/Business/Carts/CartController.cs deleted file mode 100644 index 7a9b5a8..0000000 --- a/ARW.WebApi/Controllers/Business/Carts/CartController.cs +++ /dev/null @@ -1,98 +0,0 @@ -using Infrastructure; -using Infrastructure.Attribute; -using Infrastructure.Enums; -using Infrastructure.Model; -using Mapster; -using Microsoft.AspNetCore.Http; -using Microsoft.AspNetCore.Mvc; -using ARW.Admin.WebApi.Extensions; -using ARW.Admin.WebApi.Filters; -using ARW.Common; -using ARW.Model.Dto.Business.Carts; -using ARW.Service.Business.IBusinessService.Carts; -using ARW.Admin.WebApi.Controllers; -using ARW.Model.Models.Business.Carts; -using ARW.Model.Vo.Business.Carts; -using Microsoft.AspNetCore.Authorization; -using ARW.Admin.WebApi.Framework; - - -namespace ARW.WebApi.Controllers.Business.Carts -{ - /// - /// 购物车记录控制器 - /// - /// @author lwh - /// @date 2023-07-20 - /// - [Verify] - [Route("business/[controller]")] - public class CartController : BaseController - { - private readonly ICartService _CartService; - - /// - /// 依赖注入 - /// - /// 购物车记录服务 - public CartController(ICartService CartService) - { - _CartService = CartService; - } - - - /// - /// 获取购物车记录列表 - /// - /// 查询参数 - /// - [HttpGet("getCartList")] - [ActionPermissionFilter(Permission = "business:cart:list")] - public async Task GetCartList([FromQuery] CartQueryDto parm) - { - var res = await _CartService.GetCartList(parm); - return SUCCESS(res); - } - - /// - /// 添加或修改购物车记录 - /// - /// - /// - [HttpPost("addOrUpdateCart")] - [ActionPermissionFilter(Permission = "business:cart:addOrUpdate")] - [Log(Title = "添加或修改购物车记录", BusinessType = BusinessType.ADDORUPDATE)] - public async Task AddOrUpdateCart([FromBody] CartDto parm) - { - if (parm == null) { throw new CustomException("请求参数错误"); } - - var modal = new Cart(); - if (parm.CartId != 0) modal = parm.Adapt().ToUpdate(HttpContext); - else modal = parm.Adapt().ToCreate(HttpContext); - - var res = await _CartService.AddOrUpdateCart(modal); - return SUCCESS(res); - } - - /// - /// 删除购物车记录 - /// - /// - [HttpDelete("{ids}")] - [ActionPermissionFilter(Permission = "business:cart:delete")] - [Log(Title = "购物车记录删除", BusinessType = BusinessType.DELETE)] - public IActionResult Delete(string ids) - { - long[] idsArr = Tools.SpitLongArrary(ids); - if (idsArr.Length <= 0) { return ToResponse(ApiResult.Error($"删除失败Id 不能为空")); } - var response = _CartService.Delete(idsArr); - return SUCCESS("删除成功!"); - } - - - - - - - } -} diff --git a/ARW.WebApi/Controllers/Business/Custom/CustomerAddresses/CustomerAddressController.cs b/ARW.WebApi/Controllers/Business/Custom/CustomerAddresses/CustomerAddressController.cs deleted file mode 100644 index 3b77ec8..0000000 --- a/ARW.WebApi/Controllers/Business/Custom/CustomerAddresses/CustomerAddressController.cs +++ /dev/null @@ -1,131 +0,0 @@ -using Infrastructure; -using Infrastructure.Attribute; -using Infrastructure.Enums; -using Infrastructure.Model; -using Mapster; -using Microsoft.AspNetCore.Http; -using Microsoft.AspNetCore.Mvc; -using ARW.Admin.WebApi.Extensions; -using ARW.Admin.WebApi.Filters; -using ARW.Common; -using ARW.Model.Dto.Business.Custom.CustomerAddresses; -using ARW.Service.Business.IBusinessService.Custom.CustomerAddresses; -using ARW.Admin.WebApi.Controllers; -using ARW.Model.Vo.Business.Custom.CustomerAddresses; -using Microsoft.AspNetCore.Authorization; -using ARW.Admin.WebApi.Framework; -using ARW.Model.Models.Business.Custom.CustomerAddresses; - -namespace ARW.WebApi.Controllers.Business.Custom.CustomerAddresses -{ - /// - /// 客户收货地址控制器 - /// - /// @author admin - /// @date 2023-06-05 - /// - [Verify] - [Route("business/[controller]")] - public class CustomerAddressController : BaseController - { - private readonly ICustomerAddressService _CustomerAddressService; - - /// - /// 依赖注入 - /// - /// 客户收货地址服务 - public CustomerAddressController(ICustomerAddressService CustomerAddressService) - { - _CustomerAddressService = CustomerAddressService; - } - - - /// - /// 获取客户收货地址列表 - /// - /// 查询参数 - /// - [HttpGet("getCustomerAddressList")] - [ActionPermissionFilter(Permission = "business:customeraddress:list")] - public async Task GetCustomerAddressList([FromQuery] CustomerAddressQueryDto parm) - { - var res = await _CustomerAddressService.GetCustomerAddressList(parm); - return SUCCESS(res); - } - - /// - /// 添加或修改客户收货地址 - /// - /// - /// - [HttpPost("addOrUpdateCustomerAddress")] - [ActionPermissionFilter(Permission = "business:customeraddress:addOrUpdate")] - [Log(Title = "添加或修改客户收货地址", BusinessType = BusinessType.ADDORUPDATE)] - public async Task AddOrUpdateCustomerAddress([FromBody] CustomerAddressDto parm) - { - if (parm == null) { throw new CustomException("请求参数错误"); } - - var modal = new CustomerAddress(); - if (parm.CustomerAddressId != 0) modal = parm.Adapt().ToUpdate(HttpContext); - else modal = parm.Adapt().ToCreate(HttpContext); - - var res = await _CustomerAddressService.AddOrUpdateCustomerAddress(modal); - return SUCCESS(res); - } - - /// - /// 删除客户收货地址 - /// - /// - [HttpDelete("{ids}")] - [ActionPermissionFilter(Permission = "business:customeraddress:delete")] - [Log(Title = "客户收货地址删除", BusinessType = BusinessType.DELETE)] - public IActionResult Delete(string ids) - { - long[] idsArr = Tools.SpitLongArrary(ids); - if (idsArr.Length <= 0) { return ToResponse(ApiResult.Error($"删除失败Id 不能为空")); } - var response = _CustomerAddressService.Delete(idsArr); - return SUCCESS("删除成功!"); - } - - - /// - /// 导出客户收货地址 - /// - /// - [Log(Title = "客户收货地址导出", BusinessType = BusinessType.EXPORT, IsSaveResponseData = false)] - [HttpGet("exportCustomerAddress")] - [ActionPermissionFilter(Permission = "business:customeraddress:export")] - public async Task ExportExcel([FromQuery] CustomerAddressQueryDto parm) - { - parm.PageSize = 10000; - var list = await _CustomerAddressService.GetCustomerAddressList(parm); - var data = list.Result; - - // 选中数据 - if (!string.IsNullOrEmpty(parm.ids)) - { - int[] idsArr = Tools.SpitIntArrary(parm.ids); - var selectDataList = new List(); - foreach (var item in idsArr) - { - var select_data = data.Where(s => s.CustomerAddressId == item).First(); - selectDataList.Add(select_data); - } - data = selectDataList; - } - - - - // 导出数据处理 - var handleData = await _CustomerAddressService.HandleExportData(data); - - string sFileName = ExportExcel(handleData, "CustomerAddress", "客户收货地址列表"); - return SUCCESS(new { path = "/export/" + sFileName, fileName = sFileName }); - } - - - - - } -} diff --git a/ARW.WebApi/Controllers/Business/GoodsManager/GoodsCategorys/GoodsCategoryController.cs b/ARW.WebApi/Controllers/Business/GoodsManager/GoodsCategorys/GoodsCategoryController.cs deleted file mode 100644 index 962c058..0000000 --- a/ARW.WebApi/Controllers/Business/GoodsManager/GoodsCategorys/GoodsCategoryController.cs +++ /dev/null @@ -1,143 +0,0 @@ -using Infrastructure; -using Infrastructure.Attribute; -using Infrastructure.Enums; -using Infrastructure.Model; -using Mapster; -using Microsoft.AspNetCore.Http; -using Microsoft.AspNetCore.Mvc; -using ARW.Admin.WebApi.Extensions; -using ARW.Admin.WebApi.Filters; -using ARW.Common; -using ARW.Model.Dto.Business.GoodsManager.GoodsCategorys; -using ARW.Service.Business.IBusinessService.GoodsManager.GoodsCategorys; -using ARW.Admin.WebApi.Controllers; -using ARW.Model.Models.Business.GoodsManager.GoodsCategorys; -using ARW.Model.Vo.Business.GoodsManager.GoodsCategorys; -using Microsoft.AspNetCore.Authorization; -using ARW.Admin.WebApi.Framework; - - -namespace ARW.WebApi.Controllers.Business.GoodsManager.GoodsCategorys -{ - /// - /// 商品类目控制器 - /// - /// @author lwh - /// @date 2023-06-12 - /// - [Verify] - [Route("business/[controller]")] - public class GoodsCategoryController : BaseController - { - private readonly IGoodsCategoryService _GoodsCategoryService; - - /// - /// 依赖注入 - /// - /// 商品类目服务 - public GoodsCategoryController(IGoodsCategoryService GoodsCategoryService) - { - _GoodsCategoryService = GoodsCategoryService; - } - - - /// - /// 获取商品类目树形列表 - /// - /// 查询参数 - /// - [HttpGet("getGoodsCategoryTreeList")] - [ActionPermissionFilter(Permission = "business:goodscategory:treelist")] - public async Task GetGoodsCategoryList([FromQuery] GoodsCategoryQueryDto parm) - { - var res = await _GoodsCategoryService.GetGoodsCategoryTreeList(parm); - res ??= new List(); - - return SUCCESS(res); - } - - /// - /// 添加或修改商品类目 - /// - /// - /// - [HttpPost("addOrUpdateGoodsCategory")] - [ActionPermissionFilter(Permission = "business:goodscategory:addOrUpdate")] - [Log(Title = "添加或修改商品类目", BusinessType = BusinessType.ADDORUPDATE)] - public async Task AddOrUpdateGoodsCategory([FromBody] GoodsCategoryDto parm) - { - if (parm == null) { throw new CustomException("请求参数错误"); } - - var modal = new GoodsCategory(); - if (parm.GoodsCategoryId != 0) modal = parm.Adapt().ToUpdate(HttpContext); - else modal = parm.Adapt().ToCreate(HttpContext); - - var res = await _GoodsCategoryService.AddOrUpdateGoodsCategory(modal); - return SUCCESS(res); - } - - /// - /// 删除商品类目 - /// - /// - [HttpDelete("{ids}")] - [ActionPermissionFilter(Permission = "business:goodscategory:delete")] - [Log(Title = "商品类目删除", BusinessType = BusinessType.DELETE)] - public IActionResult Delete(string ids) - { - long[] idsArr = Tools.SpitLongArrary(ids); - if (idsArr.Length <= 0) { return ToResponse(ApiResult.Error($"删除失败Id 不能为空")); } - var response = _GoodsCategoryService.Delete(idsArr); - return SUCCESS("删除成功!"); - } - - - /// - /// 导出商品类目 - /// - /// - [Log(Title = "商品类目导出", BusinessType = BusinessType.EXPORT, IsSaveResponseData = false)] - [HttpGet("exportGoodsCategory")] - [ActionPermissionFilter(Permission = "business:goodscategory:export")] - public async Task ExportExcel([FromQuery] GoodsCategoryQueryDto parm) - { - var list = await _GoodsCategoryService.GetGoodsCategoryList(parm); - var data = list; - - // 选中数据 - if (!string.IsNullOrEmpty(parm.ids)) - { - int[] idsArr = Tools.SpitIntArrary(parm.ids); - var selectDataList = new List(); - foreach (var item in idsArr) - { - var select_data = data.Where(s => s.GoodsCategoryId == item).First(); - selectDataList.Add(select_data); - - // 查看当前数据有没有子级 - var newGoodsCategorys = data.FindAll(delegate (GoodsCategoryVo goodsCategory) - { - string[] parentGoodsCategoryId = goodsCategory.GoodsCategoryAncestralGuid.Split(",", StringSplitOptions.RemoveEmptyEntries); - return parentGoodsCategoryId.Contains(select_data.GoodsCategoryGuid.ToString()); - }); - string[] goodsCategoryArr = newGoodsCategorys.Select(x => x.GoodsCategoryGuid.ToString()).ToArray(); - var ancestorArr = data.Where(s => goodsCategoryArr.Contains(s.GoodsCategoryGuid.ToString())).ToList(); - selectDataList.AddRange(ancestorArr); - } - data = selectDataList; - } - - - - // 导出数据处理 - var handleData = await _GoodsCategoryService.HandleExportData(data); - - string sFileName = ExportExcel(handleData, "GoodsCategory", "商品类目列表"); - return SUCCESS(new { path = "/export/" + sFileName, fileName = sFileName }); - } - - - - - } -} diff --git a/ARW.WebApi/Controllers/Business/GoodsManager/GoodsComments/GoodsCommentController.cs b/ARW.WebApi/Controllers/Business/GoodsManager/GoodsComments/GoodsCommentController.cs deleted file mode 100644 index 2e229ef..0000000 --- a/ARW.WebApi/Controllers/Business/GoodsManager/GoodsComments/GoodsCommentController.cs +++ /dev/null @@ -1,120 +0,0 @@ -using Infrastructure; -using Infrastructure.Attribute; -using Infrastructure.Enums; -using Infrastructure.Model; -using Mapster; -using Microsoft.AspNetCore.Http; -using Microsoft.AspNetCore.Mvc; -using ARW.Admin.WebApi.Extensions; -using ARW.Admin.WebApi.Filters; -using ARW.Common; -using ARW.Model.Dto.Business.GoodsManager.GoodsComments; -using ARW.Service.Business.IBusinessService.GoodsManager.GoodsComments; -using ARW.Admin.WebApi.Controllers; -using ARW.Model.Models.Business.GoodsManager.GoodsComments; -using ARW.Model.Vo.Business.GoodsManager.GoodsComments; -using Microsoft.AspNetCore.Authorization; -using ARW.Admin.WebApi.Framework; -using ARW.Service.Business.IBusinessService.ShopManager.Shops; - - -namespace ARW.WebApi.Controllers.Business.GoodsManager.GoodsComments -{ - /// - /// 商品评价控制器 - /// - /// @author admin - /// @date 2023-07-15 - /// - [Verify] - [Route("business/[controller]")] - public class GoodsCommentController : BaseController - { - private readonly IGoodsCommentService _GoodsCommentService; - private readonly IShopService _ShopService; - - /// - /// 依赖注入 - /// - /// 商品评价服务 - public GoodsCommentController(IGoodsCommentService GoodsCommentService, IShopService shopService) - { - _GoodsCommentService = GoodsCommentService; - _ShopService = shopService; - } - - - /// - /// 获取商品评价列表 - /// - /// 查询参数 - /// - [HttpGet("getGoodsCommentList")] - [ActionPermissionFilter(Permission = "business:goodscomment:list")] - public async Task GetGoodsCommentList([FromQuery] GoodsCommentQueryDto parm) - { - var user = JwtUtil.GetLoginUser(App.HttpContext); - if (user.UserId != 1) - { - var shop = await _ShopService.GetFirstAsync(s => s.ShopUserId == user.UserId); - if (shop == null) throw new Exception("当前用户没有店铺"); - parm.ShopGuid = shop.ShopGuid; - } - - var res = await _GoodsCommentService.GetGoodsCommentList(parm); - return SUCCESS(res); - } - - /// - /// 添加或修改商品评价 - /// - /// - /// - [HttpPost("addOrUpdateGoodsComment")] - [ActionPermissionFilter(Permission = "business:goodscomment:addOrUpdate")] - [Log(Title = "添加或修改商品评价", BusinessType = BusinessType.ADDORUPDATE)] - public async Task AddOrUpdateGoodsComment([FromBody] GoodsCommentDto parm) - { - if (parm == null) { throw new CustomException("请求参数错误"); } - - var modal = new GoodsComment(); - if (parm.GoodsCommentId != 0) modal = parm.Adapt().ToUpdate(HttpContext); - else modal = parm.Adapt().ToCreate(HttpContext); - - var res = await _GoodsCommentService.AddOrUpdateGoodsComment(modal); - return SUCCESS(res); - } - - /// - /// 删除商品评价 - /// - /// - [HttpDelete("{ids}")] - [ActionPermissionFilter(Permission = "business:goodscomment:delete")] - [Log(Title = "商品评价删除", BusinessType = BusinessType.DELETE)] - public IActionResult Delete(string ids) - { - long[] idsArr = Tools.SpitLongArrary(ids); - if (idsArr.Length <= 0) { return ToResponse(ApiResult.Error($"删除失败Id 不能为空")); } - var response = _GoodsCommentService.Delete(idsArr); - return SUCCESS("删除成功!"); - } - - - - /// - /// 回复商品评价 - /// - /// - [HttpPut("recover")] - [ActionPermissionFilter(Permission = "business:goodscomment:recover")] - public async Task RecoverGoodsComment([FromBody] GoodsCommentRecoverDto param) - { - var res = await _GoodsCommentService.Recover(param); - return SUCCESS(res); - } - - - - } -} diff --git a/ARW.WebApi/Controllers/Business/GoodsManager/GoodsServicess/GoodsServicesController.cs b/ARW.WebApi/Controllers/Business/GoodsManager/GoodsServicess/GoodsServicesController.cs deleted file mode 100644 index 8ab60bc..0000000 --- a/ARW.WebApi/Controllers/Business/GoodsManager/GoodsServicess/GoodsServicesController.cs +++ /dev/null @@ -1,151 +0,0 @@ -using Infrastructure; -using Infrastructure.Attribute; -using Infrastructure.Enums; -using Infrastructure.Model; -using Mapster; -using Microsoft.AspNetCore.Http; -using Microsoft.AspNetCore.Mvc; -using ARW.Admin.WebApi.Extensions; -using ARW.Admin.WebApi.Filters; -using ARW.Common; -using ARW.Model.Dto.Business.GoodsManager.GoodsServicess; -using ARW.Service.Business.IBusinessService.GoodsManager.GoodsServicess; -using ARW.Admin.WebApi.Controllers; -using ARW.Model.Models.Business.GoodsManager.GoodsServicess; -using ARW.Model.Vo.Business.GoodsManager.GoodsServicess; -using Microsoft.AspNetCore.Authorization; -using ARW.Admin.WebApi.Framework; -using ARW.Service.Business.IBusinessService.ShopManager.Shops; - - -namespace ARW.WebApi.Controllers.Business.GoodsManager.GoodsServicess -{ - /// - /// 商品服务与承诺控制器 - /// - /// @author lwh - /// @date 2023-06-18 - /// - [Verify] - [Route("business/[controller]")] - public class GoodsServicesController : BaseController - { - private readonly IGoodsServicesService _GoodsServicesService; - private readonly IShopService _ShopService; - - /// - /// 依赖注入 - /// - /// 商品服务与承诺服务 - public GoodsServicesController(IGoodsServicesService GoodsServicesService, IShopService shopService) - { - _GoodsServicesService = GoodsServicesService; - _ShopService = shopService; - } - - - /// - /// 获取商品服务与承诺列表 - /// - /// 查询参数 - /// - [HttpGet("getGoodsServicesList")] - [ActionPermissionFilter(Permission = "business:goodsservices:list")] - public async Task GetGoodsServicesList([FromQuery] GoodsServicesQueryDto parm) - { - var user = JwtUtil.GetLoginUser(App.HttpContext); - if (user.UserId != 1) - { - var shop = await _ShopService.GetFirstAsync(s => s.ShopUserId == user.UserId); - if (shop == null) throw new Exception("当前用户没有店铺"); - parm.ShopGuid = shop.ShopGuid; - } - - var res = await _GoodsServicesService.GetGoodsServicesList(parm); - return SUCCESS(res); - } - - /// - /// 添加或修改商品服务与承诺 - /// - /// - /// - [HttpPost("addOrUpdateGoodsServices")] - [ActionPermissionFilter(Permission = "business:goodsservices:addOrUpdate")] - [Log(Title = "添加或修改商品服务与承诺", BusinessType = BusinessType.ADDORUPDATE)] - public async Task AddOrUpdateGoodsServices([FromBody] GoodsServicesDto parm) - { - if (parm == null) { throw new CustomException("请求参数错误"); } - - var modal = new GoodsServices(); - if (parm.GoodsServicesId != 0) modal = parm.Adapt().ToUpdate(HttpContext); - else modal = parm.Adapt().ToCreate(HttpContext); - - var user = JwtUtil.GetLoginUser(App.HttpContext); - if (user.UserId != 1) - { - var shop = await _ShopService.GetFirstAsync(s => s.ShopUserId == user.UserId); - if (shop == null) throw new Exception("当前用户没有店铺"); - modal.ShopGuid = shop.ShopGuid; - } - - var res = await _GoodsServicesService.AddOrUpdateGoodsServices(modal); - return SUCCESS(res); - } - - /// - /// 删除商品服务与承诺 - /// - /// - [HttpDelete("{ids}")] - [ActionPermissionFilter(Permission = "business:goodsservices:delete")] - [Log(Title = "商品服务与承诺删除", BusinessType = BusinessType.DELETE)] - public IActionResult Delete(string ids) - { - long[] idsArr = Tools.SpitLongArrary(ids); - if (idsArr.Length <= 0) { return ToResponse(ApiResult.Error($"删除失败Id 不能为空")); } - var response = _GoodsServicesService.Delete(idsArr); - return SUCCESS("删除成功!"); - } - - - /// - /// 导出商品服务与承诺 - /// - /// - [Log(Title = "商品服务与承诺导出", BusinessType = BusinessType.EXPORT, IsSaveResponseData = false)] - [HttpGet("exportGoodsServices")] - [ActionPermissionFilter(Permission = "business:goodsservices:export")] - public async Task ExportExcel([FromQuery] GoodsServicesQueryDto parm) - { - parm.PageSize = 10000; - var list = await _GoodsServicesService.GetGoodsServicesList(parm); - var data = list.Result; - - // 选中数据 - if (!string.IsNullOrEmpty(parm.ids)) - { - int[] idsArr = Tools.SpitIntArrary(parm.ids); - var selectDataList = new List(); - foreach (var item in idsArr) - { - var select_data = data.Where(s => s.GoodsServicesId == item).First(); - selectDataList.Add(select_data); - } - data = selectDataList; - } - - - - // 导出数据处理 - var handleData = await _GoodsServicesService.HandleExportData(data); - - string sFileName = ExportExcel(handleData, "GoodsServices", "商品服务与承诺列表"); - return SUCCESS(new { path = "/export/" + sFileName, fileName = sFileName }); - } - - - - - } -} diff --git a/ARW.WebApi/Controllers/Business/GoodsManager/Goodss/GoodsController.cs b/ARW.WebApi/Controllers/Business/GoodsManager/Goodss/GoodsController.cs deleted file mode 100644 index bfc525c..0000000 --- a/ARW.WebApi/Controllers/Business/GoodsManager/Goodss/GoodsController.cs +++ /dev/null @@ -1,308 +0,0 @@ -using Infrastructure; -using Infrastructure.Attribute; -using Infrastructure.Enums; -using Infrastructure.Model; -using Mapster; -using Microsoft.AspNetCore.Http; -using Microsoft.AspNetCore.Mvc; -using ARW.Admin.WebApi.Extensions; -using ARW.Admin.WebApi.Filters; -using ARW.Common; -using ARW.Model.Dto.Business.GoodsManager.Goodss; -using ARW.Service.Business.IBusinessService.GoodsManager.Goodss; -using ARW.Admin.WebApi.Controllers; -using ARW.Model.Models.Business.GoodsManager.Goodss; -using ARW.Model.Vo.Business.GoodsManager.Goodss; -using Microsoft.AspNetCore.Authorization; -using ARW.Admin.WebApi.Framework; -using ARW.Service.Business.IBusinessService.GoodsManager.GoodsSpecs.GoodsSkus; -using ARW.Model.Dto.Business.GoodsManager.GoodsSpecs.GoodsSkus; -using ARW.Service.Business.IBusinessService.GoodsManager.GoodsServicess.GoodsServicesRels; -using ARW.Model.Dto.Business.GoodsManager.GoodsServicess.GoodsServicesRels; -using ARW.Service.Business.IBusinessService.GoodsManager.GoodsSpecs.GoodsSpecRels; -using ARW.Service.Business.IBusinessService.GoodsManager.GoodsSpecs.Specs; -using ARW.Service.Business.IBusinessService.GoodsManager.GoodsSpecs.SpecValues; -using ARW.Service.Business.IBusinessService.ShopManager.Shops; -using ARW.Model.Dto.Business.ShopManager.Shops; - -namespace ARW.WebApi.Controllers.Business.GoodsManager.Goodss -{ - /// - /// 商品控制器 - /// - /// @author lwh - /// @date 2023-06-19 - /// - [Verify] - [Route("business/[controller]")] - public class GoodsController : BaseController - { - private readonly IGoodsService _GoodsService; - private readonly IGoodsSkuService _GoodsSkuService; - private readonly IGoodsServicesRelService _GoodsServicesRelService; - private readonly ISpecService _SepcIService; - private readonly ISpecValueService _SpecValueIService; - private readonly IGoodsSpecRelService _GoodsSpecRelService; - private readonly IShopService _ShopService; - - - /// - /// 依赖注入 - /// - /// 商品服务 - /// 商品Sku服务 - /// 商品服务与承诺服务 - /// 规格组服务 - /// 规格值服务 - /// 商品规格关系服务 - public GoodsController(IGoodsService GoodsService, IGoodsSkuService goodsSkuService, IGoodsServicesRelService goodsServicesRelService, ISpecService sepcIService, ISpecValueService specValueIService, IGoodsSpecRelService goodsSpecRelService, IShopService shopService) - { - _GoodsService = GoodsService; - _GoodsSkuService = goodsSkuService; - _GoodsServicesRelService = goodsServicesRelService; - _SepcIService = sepcIService; - _SpecValueIService = specValueIService; - _GoodsSpecRelService = goodsSpecRelService; - _ShopService = shopService; - } - - - /// - /// 获取商品列表 - /// - /// 查询参数 - /// - [HttpGet("getGoodsList")] - [ActionPermissionFilter(Permission = "business:goods:list")] - public async Task GetGoodsList([FromQuery] GoodsQueryDto parm) - { - var user = JwtUtil.GetLoginUser(App.HttpContext); - if (user.UserId != 1) - { - var shop = await _ShopService.GetFirstAsync(s => s.ShopUserId == user.UserId); - if (shop == null) throw new Exception("当前用户没有店铺"); - parm.ShopGuid = shop.ShopGuid; - } - - var res = await _GoodsService.GetGoodsList(parm); - return SUCCESS(res); - } - - - /// - /// 获取全部商品列表 - /// - /// 查询参数 - /// - [HttpGet("getAllGoodsList")] - public async Task GetAllGoodsList([FromQuery] GoodsQueryDto parm) - { - var res = await _GoodsService.GetAllGoodsList(parm); - return SUCCESS(res); - } - - - /// - /// 获取商品Sku - /// - /// 查询参数 - /// - [HttpGet("getGoodsSkuList")] - public async Task GetGoodsSkuList([FromQuery] GoodsSkuQueryDto parm) - { - var res = await _GoodsSkuService.GetGoodsSkuList(parm); - return SUCCESS(res); - } - - /// - /// 获取商品服务与承诺 - /// - /// 查询参数 - /// - [HttpGet("getCurrentGoodsServiceList")] - public async Task GetCurrentGoodsServiceList([FromQuery] GoodsServicesRelQueryDto parm) - { - var res = await _GoodsServicesRelService.GetCurrentGoodsServicesRel(parm); - return SUCCESS(res); - } - - /// - /// 添加或修改商品 - /// - /// - /// - [HttpPost("addOrUpdateGoods")] - [ActionPermissionFilter(Permission = "business:goods:addOrUpdate")] - [Log(Title = "添加或修改商品", BusinessType = BusinessType.ADDORUPDATE)] - public async Task AddOrUpdateGoods([FromBody] GoodsDto parm) - { - if (parm == null) { throw new CustomException("请求参数错误"); } - - var modal = new Goods(); - if (parm.GoodsId != 0) modal = parm.Adapt().ToUpdate(HttpContext); - else modal = parm.Adapt().ToCreate(HttpContext); - - var user = JwtUtil.GetLoginUser(App.HttpContext); - if (user.UserId != 1) - { - var shop = await _ShopService.GetFirstAsync(s => s.ShopUserId == user.UserId); - if (shop == null) throw new Exception("当前用户没有店铺"); - modal.ShopGuid = shop.ShopGuid; - } - - var res = await _GoodsService.AddOrUpdateGoods(modal); - return SUCCESS(res); - } - - /// - /// 删除商品 - /// - /// - [HttpDelete("{ids}")] - [ActionPermissionFilter(Permission = "business:goods:delete")] - [Log(Title = "商品删除", BusinessType = BusinessType.DELETE)] - public async Task Delete(string ids) - { - int[] idsArr = Tools.SpitIntArrary(ids); - if (idsArr.Length <= 0) { return ToResponse(ApiResult.Error($"删除失败Id 不能为空")); } - - // 删除关于该商品的关联 - //var goodsList = await _GoodsService.GetListAsync(s => idsArr.Contains(s.GoodsId)); - //var goodsGuids = goodsList.Select(s => s.GoodsGuid).ToList(); - - //var specList = await _GoodsSpecRelService.GetListAsync(s => goodsGuids.Contains(s.GoodsGuid)); - //var specIds = specList.Select(s => s.SpecId).ToList(); - - //await _SepcIService.DeleteAsync(s => specIds.Contains(s.SpecId)); - //await _SpecValueIService.DeleteAsync(s => specIds.Contains(s.SpecId)); - - //await _GoodsSpecRelService.DeleteAsync(s => goodsGuids.Contains(s.GoodsGuid)); - //await _GoodsSkuService.DeleteAsync(s => goodsGuids.Contains(s.GoodsGuid)); - //await _GoodsServicesRelService.DeleteAsync(s => goodsGuids.Contains(s.GoodsGuid)); - - var response = _GoodsService.Delete(idsArr); - return SUCCESS("删除成功!"); - } - - - /// - /// 导入商品 - /// - /// 使用IFromFile必须使用name属性否则获取不到文件 - /// 是否需要更新 - /// - [HttpPost("importData")] - [Log(Title = "商品导入", BusinessType = BusinessType.IMPORT, IsSaveRequestData = false, IsSaveResponseData = false)] - [ActionPermissionFilter(Permission = "business:goods:import")] - public async Task ImportExcel([FromForm(Name = "file")] IFormFile formFile, bool updateSupport) - { - var isUpdateSupport = updateSupport; - IEnumerable parm = ExcelHelper.ImportData(formFile.OpenReadStream()); - - var i = 0; - var msgList = new List(); - foreach (GoodsVo item in parm) - { - i++; - var user = JwtUtil.GetLoginUser(App.HttpContext); - var msg = await _GoodsService.ImportExcel(item, i, isUpdateSupport, user); - msgList.Add(msg); - } - - return SUCCESS(msgList.ToArray()); - } - - - /// - /// 商品导入模板下载 - /// - /// - [HttpGet("importTemplate")] - [Log(Title = "商品模板", BusinessType = BusinessType.EXPORT, IsSaveRequestData = false, IsSaveResponseData = false)] - [AllowAnonymous] - public IActionResult ImportTemplateExcel() - { - List Goods = new List(); - MemoryStream stream = new MemoryStream(); - - // 示例数据 - var values = new List() { - "三星官方旗舰店", - "手机/Galaxy S23系列", - "三星 Galaxy S21 5G(SM-G9910)双模5G 骁龙888 超高清专业摄像 120Hz护目屏 游戏手机 8G+128G", - "R301", - "此款商品美观大方 性价比较高 不容错过", - "http://localhost:8888/Uploads/Goods/20230627/67232B8C22C2A8DD.jpg,http://localhost:8888/Uploads/Goods/20230627/19693DB03E8D2355.jpg", - "4969.00", - "5000", - "100", - "0", - "0", - "

\"\"

", - "上架", - "100" - }; - string sFileName = DownloadImportTemplate(Goods, stream, "商品导入模板", values); - - return File(stream.ToArray(), "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet", $"{sFileName}"); - } - - /// - /// 导出商品 - /// - /// - [Log(Title = "商品导出", BusinessType = BusinessType.EXPORT, IsSaveResponseData = false)] - [HttpGet("exportGoods")] - [ActionPermissionFilter(Permission = "business:goods:export")] - public async Task ExportExcel([FromQuery] GoodsQueryDto parm) - { - parm.PageSize = 10000; - var list = await _GoodsService.GetGoodsList(parm); - var data = list.Result; - - // 选中数据 - if (!string.IsNullOrEmpty(parm.ids)) - { - int[] idsArr = Tools.SpitIntArrary(parm.ids); - var selectDataList = new List(); - foreach (var item in idsArr) - { - var select_data = data.Where(s => s.GoodsId == item).First(); - selectDataList.Add(select_data); - } - data = selectDataList; - } - - - - // 导出数据处理 - var handleData = await _GoodsService.HandleExportData(data); - - string sFileName = ExportExcel(handleData, "Goods", "商品列表"); - return SUCCESS(new { path = "/export/" + sFileName, fileName = sFileName }); - } - - - /// - /// 上下架商品 - /// - /// - [HttpPut("shelfGoods")] - public async Task ShelfGoods([FromBody] GoodsShelfDto param) - { - int[] idsArr = Tools.SpitIntArrary(param.ids); - if (idsArr.Length <= 0) { return ToResponse(ApiResult.Error($"操作失败 Id 不能为空")); } - - var msgList = new List(); - foreach (var item in idsArr) - { - var msg = await _GoodsService.ShelfGoods(item, param.GoodsShelfStatus); - msgList.Add(msg); - } - - return SUCCESS(msgList.ToArray()); - } - - - } -} diff --git a/ARW.WebApi/Controllers/Business/GoodsManager/ShopGoodsCategorys/ShopGoodsCategoryController.cs b/ARW.WebApi/Controllers/Business/GoodsManager/ShopGoodsCategorys/ShopGoodsCategoryController.cs deleted file mode 100644 index e7be781..0000000 --- a/ARW.WebApi/Controllers/Business/GoodsManager/ShopGoodsCategorys/ShopGoodsCategoryController.cs +++ /dev/null @@ -1,228 +0,0 @@ -using Infrastructure; -using Infrastructure.Attribute; -using Infrastructure.Enums; -using Infrastructure.Model; -using Mapster; -using Microsoft.AspNetCore.Http; -using Microsoft.AspNetCore.Mvc; -using ARW.Admin.WebApi.Extensions; -using ARW.Admin.WebApi.Filters; -using ARW.Common; -using ARW.Model.Dto.Business.GoodsManager.ShopGoodsCategorys; -using ARW.Service.Business.IBusinessService.GoodsManager.ShopGoodsCategorys; -using ARW.Admin.WebApi.Controllers; -using ARW.Model.Models.Business.GoodsManager.ShopGoodsCategorys; -using ARW.Model.Vo.Business.GoodsManager.ShopGoodsCategorys; -using Microsoft.AspNetCore.Authorization; -using ARW.Admin.WebApi.Framework; -using ARW.Service.Business.IBusinessService.ShopManager.Shops; - - -namespace ARW.WebApi.Controllers.Business.GoodsManager.ShopGoodsCategorys -{ - /// - /// 店铺商品类目控制器 - /// - /// @author lwh - /// @date 2023-06-15 - /// - [Verify] - [Route("business/[controller]")] - public class ShopGoodsCategoryController : BaseController - { - private readonly IShopGoodsCategoryService _ShopGoodsCategoryService; - private readonly IShopService _ShopService; - - /// - /// 依赖注入 - /// - /// 店铺商品类目服务 - public ShopGoodsCategoryController(IShopGoodsCategoryService ShopGoodsCategoryService, IShopService shopService) - { - _ShopGoodsCategoryService = ShopGoodsCategoryService; - _ShopService = shopService; - } - - - /// - /// 获取店铺商品类目树形列表 - /// - /// 查询参数 - /// - [HttpGet("getShopGoodsCategoryTreeList")] - [ActionPermissionFilter(Permission = "business:shopgoodscategory:treelist")] - public async Task GetShopGoodsCategoryList([FromQuery] ShopGoodsCategoryQueryDto parm) - { - var user = JwtUtil.GetLoginUser(App.HttpContext); - if (user.UserId != 1) - { - var shop = await _ShopService.GetFirstAsync(s => s.ShopUserId == user.UserId); - if (shop == null) throw new Exception("当前用户没有店铺"); - parm.ShopGuid = shop.ShopGuid; - } - - var res = await _ShopGoodsCategoryService.GetShopGoodsCategoryTreeList(parm); - res ??= new List(); - - return SUCCESS(res); - } - - /// - /// 添加或修改店铺商品类目 - /// - /// - /// - [HttpPost("addOrUpdateShopGoodsCategory")] - [ActionPermissionFilter(Permission = "business:shopgoodscategory:addOrUpdate")] - [Log(Title = "添加或修改店铺商品类目", BusinessType = BusinessType.ADDORUPDATE)] - public async Task AddOrUpdateShopGoodsCategory([FromBody] ShopGoodsCategoryDto parm) - { - if (parm == null) { throw new CustomException("请求参数错误"); } - - var modal = new ShopGoodsCategory(); - if (parm.ShopGoodsCategoryId != 0) modal = parm.Adapt().ToUpdate(HttpContext); - else modal = parm.Adapt().ToCreate(HttpContext); - - var user = JwtUtil.GetLoginUser(App.HttpContext); - if (user.UserId != 1) - { - var shop = await _ShopService.GetFirstAsync(s => s.ShopUserId == user.UserId); - if (shop == null) throw new Exception("当前用户没有店铺"); - modal.ShopGuid = shop.ShopGuid; - } - - var res = await _ShopGoodsCategoryService.AddOrUpdateShopGoodsCategory(modal); - return SUCCESS(res); - } - - /// - /// 删除店铺商品类目 - /// - /// - [HttpDelete("{ids}")] - [ActionPermissionFilter(Permission = "business:shopgoodscategory:delete")] - [Log(Title = "店铺商品类目删除", BusinessType = BusinessType.DELETE)] - public IActionResult Delete(string ids) - { - long[] idsArr = Tools.SpitLongArrary(ids); - if (idsArr.Length <= 0) { return ToResponse(ApiResult.Error($"删除失败Id 不能为空")); } - var response = _ShopGoodsCategoryService.Delete(idsArr); - return SUCCESS("删除成功!"); - } - - /// - /// 导入店铺商品类目 - /// - /// 使用IFromFile必须使用name属性否则获取不到文件 - /// 是否需要更新 - /// - [HttpPost("importData")] - [Log(Title = "店铺商品类目导入", BusinessType = BusinessType.IMPORT, IsSaveRequestData = false, IsSaveResponseData = false)] - [ActionPermissionFilter(Permission = "business:shopgoodscategory:import")] - public async Task ImportExcel([FromForm(Name = "file")] IFormFile formFile, bool updateSupport) - { - - var isUpdateSupport = updateSupport; - IEnumerable parm = ExcelHelper.ImportData(formFile.OpenReadStream()); - - var i = 0; - var msgList = new List(); - foreach (ShopGoodsCategoryVo item in parm) - { - i++; - var user = JwtUtil.GetLoginUser(App.HttpContext); - //var ShopGoodsCategory = await _ShopGoodsCategoryService.HandleImportData(item,user.UserId,i); - //var modal = ShopGoodsCategory.Adapt().ToCreate(HttpContext); - var msg = await _ShopGoodsCategoryService.ImportExcel(item, i, isUpdateSupport, user); - msgList.Add(msg); - } - - return SUCCESS(msgList.ToArray()); - } - - - /// - /// 店铺商品类目导入模板下载 - /// - /// - [HttpGet("importTemplate")] - [Log(Title = "店铺商品类目模板", BusinessType = BusinessType.EXPORT, IsSaveRequestData = false, IsSaveResponseData = false)] - [AllowAnonymous] - public IActionResult ImportTemplateExcel() - { - List ShopGoodsCategory = new List(); - MemoryStream stream = new MemoryStream(); - - // 示例数据 - var allValues = new List>(); - var values = new List() { "我的店铺", "", "电脑", "显示", "1" }; - var values2 = new List() { "我的店铺", "电脑", "商业笔记本", "显示", "1" }; - var values3 = new List() { "我的店铺", "电脑", "游戏本", "显示", "2" }; - var values4 = new List() { "我的店铺", "", "外设", "显示", "2" }; - var values5 = new List() { "我的店铺", "外设", "鼠标", "显示", "1" }; - allValues.Add(values); - allValues.Add(values2); - allValues.Add(values3); - allValues.Add(values4); - allValues.Add(values5); - string sFileName = DownloadImportTemplate(ShopGoodsCategory, stream, "店铺商品类目导入模板", allValues); - - return File(stream.ToArray(), "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet", $"{sFileName}"); - } - - /// - /// 导出店铺商品类目 - /// - /// - [Log(Title = "店铺商品类目导出", BusinessType = BusinessType.EXPORT, IsSaveResponseData = false)] - [HttpGet("exportShopGoodsCategory")] - [ActionPermissionFilter(Permission = "business:shopgoodscategory:export")] - public async Task ExportExcel([FromQuery] ShopGoodsCategoryQueryDto parm) - { - var user = JwtUtil.GetLoginUser(App.HttpContext); - if (user.UserId != 1) - { - var shop = await _ShopService.GetFirstAsync(s => s.ShopUserId == user.UserId); - if (shop == null) throw new Exception("当前用户没有店铺"); - parm.ShopGuid = shop.ShopGuid; - } - var list = await _ShopGoodsCategoryService.GetShopGoodsCategoryList(parm); - var data = list; - - // 选中数据 - if (!string.IsNullOrEmpty(parm.ids)) - { - int[] idsArr = Tools.SpitIntArrary(parm.ids); - var selectDataList = new List(); - foreach (var item in idsArr) - { - var select_data = data.Where(s => s.ShopGoodsCategoryId == item).First(); - selectDataList.Add(select_data); - - // 查看当前数据有没有子级 - var newShopGoodsCategorys = data.FindAll(delegate (ShopGoodsCategoryVo shopGoodsCategory) - { - string[] parentShopGoodsCategoryId = shopGoodsCategory.ShopGoodsCategoryAncestralGuid.Split(",", StringSplitOptions.RemoveEmptyEntries); - return parentShopGoodsCategoryId.Contains(select_data.ShopGoodsCategoryGuid.ToString()); - }); - string[] shopGoodsCategoryArr = newShopGoodsCategorys.Select(x => x.ShopGoodsCategoryGuid.ToString()).ToArray(); - var ancestorArr = data.Where(s => shopGoodsCategoryArr.Contains(s.ShopGoodsCategoryGuid.ToString())).ToList(); - selectDataList.AddRange(ancestorArr); - } - data = selectDataList; - } - - - - // 导出数据处理 - var handleData = await _ShopGoodsCategoryService.HandleExportData(data); - - string sFileName = ExportExcel(handleData, "ShopGoodsCategory", "店铺商品类目列表"); - return SUCCESS(new { path = "/export/" + sFileName, fileName = sFileName }); - } - - - - - } -} diff --git a/ARW.WebApi/Controllers/Business/LogisticsManage/Deliverys/DeliveryController.cs b/ARW.WebApi/Controllers/Business/LogisticsManage/Deliverys/DeliveryController.cs deleted file mode 100644 index 48ffc69..0000000 --- a/ARW.WebApi/Controllers/Business/LogisticsManage/Deliverys/DeliveryController.cs +++ /dev/null @@ -1,167 +0,0 @@ -using Infrastructure; -using Infrastructure.Attribute; -using Infrastructure.Enums; -using Infrastructure.Model; -using Mapster; -using Microsoft.AspNetCore.Http; -using Microsoft.AspNetCore.Mvc; -using ARW.Admin.WebApi.Extensions; -using ARW.Admin.WebApi.Filters; -using ARW.Common; -using ARW.Model.Dto.Business.LogisticsManage.Deliverys; -using ARW.Service.Business.IBusinessService.LogisticsManage.Deliverys; -using ARW.Admin.WebApi.Controllers; -using ARW.Model.Models.Business.LogisticsManage.Deliverys; -using ARW.Model.Vo.Business.LogisticsManage.Deliverys; -using Microsoft.AspNetCore.Authorization; -using ARW.Admin.WebApi.Framework; -using ARW.Service.Business.IBusinessService.LogisticsManage.DeliveryRules; -using ARW.Service.Business.IBusinessService.ShopManager.Shops; - -namespace ARW.WebApi.Controllers.Business.LogisticsManage.Deliverys -{ - /// - /// 配送模板控制器 - /// - /// @author lwh - /// @date 2023-06-16 - /// - [Verify] - [Route("business/[controller]")] - public class DeliveryController : BaseController - { - private readonly IDeliveryService _DeliveryService; - private readonly IDeliveryRuleService _DeliveryRuleService; - private readonly IShopService _ShopService; - - /// - /// 依赖注入 - /// - /// 配送模板服务 - public DeliveryController(IDeliveryService DeliveryService, IDeliveryRuleService deliveryRuleService, IShopService shopService) - { - _DeliveryService = DeliveryService; - _DeliveryRuleService = deliveryRuleService; - _ShopService = shopService; - } - - - /// - /// 获取配送模板列表 - /// - /// 查询参数 - /// - [HttpGet("getDeliveryList")] - [ActionPermissionFilter(Permission = "business:delivery:list")] - public async Task GetDeliveryList([FromQuery] DeliveryQueryDto parm) - { - var user = JwtUtil.GetLoginUser(App.HttpContext); - - if (user.UserId != 1) - { - var shop = await _ShopService.GetFirstAsync(s => s.ShopUserId == user.UserId); - if (shop == null) throw new Exception("当前用户没有店铺"); - parm.ShopGuid = shop.ShopGuid; - } - var res = await _DeliveryService.GetDeliveryList(parm); - return SUCCESS(res); - } - - - /// - /// 获取配送模板的配送区域和运费列表 - /// - /// 查询参数 - /// - [HttpGet("getDeliveryRuleList")] - public async Task GetDeliveryRuleList([FromQuery] DeliveryRuleEditDto parm) - { - var res = await _DeliveryRuleService.GetDeliveryRuleList(parm.DeliveryGuid); - return SUCCESS(res); - } - - - /// - /// 添加或修改配送模板 - /// - /// - /// - [HttpPost("addOrUpdateDelivery")] - [ActionPermissionFilter(Permission = "business:delivery:addOrUpdate")] - [Log(Title = "添加或修改配送模板", BusinessType = BusinessType.ADDORUPDATE)] - public async Task AddOrUpdateDelivery([FromBody] DeliveryDto parm) - { - if (parm == null) { throw new CustomException("请求参数错误"); } - - var modal = new Delivery(); - if (parm.DeliveryId != 0) modal = parm.Adapt().ToUpdate(HttpContext); - else modal = parm.Adapt().ToCreate(HttpContext); - - var user = JwtUtil.GetLoginUser(App.HttpContext); - if (user.UserId != 1) - { - var shop = await _ShopService.GetFirstAsync(s => s.ShopUserId == user.UserId); - if (shop == null) throw new Exception("当前用户没有店铺"); - modal.ShopGuid = shop.ShopGuid; - } - - var res = await _DeliveryService.AddOrUpdateDelivery(modal); - return SUCCESS(res); - } - - /// - /// 删除配送模板 - /// - /// - [HttpDelete("{ids}")] - [ActionPermissionFilter(Permission = "business:delivery:delete")] - [Log(Title = "配送模板删除", BusinessType = BusinessType.DELETE)] - public IActionResult Delete(string ids) - { - long[] idsArr = Tools.SpitLongArrary(ids); - if (idsArr.Length <= 0) { return ToResponse(ApiResult.Error($"删除失败Id 不能为空")); } - var response = _DeliveryService.Delete(idsArr); - return SUCCESS("删除成功!"); - } - - - /// - /// 导出配送模板 - /// - /// - [Log(Title = "配送模板导出", BusinessType = BusinessType.EXPORT, IsSaveResponseData = false)] - [HttpGet("exportDelivery")] - [ActionPermissionFilter(Permission = "business:delivery:export")] - public async Task ExportExcel([FromQuery] DeliveryQueryDto parm) - { - parm.PageSize = 10000; - var list = await _DeliveryService.GetDeliveryList(parm); - var data = list.Result; - - // 选中数据 - if (!string.IsNullOrEmpty(parm.ids)) - { - int[] idsArr = Tools.SpitIntArrary(parm.ids); - var selectDataList = new List(); - foreach (var item in idsArr) - { - var select_data = data.Where(s => s.DeliveryId == item).First(); - selectDataList.Add(select_data); - } - data = selectDataList; - } - - - - // 导出数据处理 - var handleData = await _DeliveryService.HandleExportData(data); - - string sFileName = ExportExcel(handleData, "Delivery", "配送模板列表"); - return SUCCESS(new { path = "/export/" + sFileName, fileName = sFileName }); - } - - - - - } -} diff --git a/ARW.WebApi/Controllers/Business/LogisticsManage/LogisticsCompanys/LogisticsCompanyController.cs b/ARW.WebApi/Controllers/Business/LogisticsManage/LogisticsCompanys/LogisticsCompanyController.cs deleted file mode 100644 index 2d4094e..0000000 --- a/ARW.WebApi/Controllers/Business/LogisticsManage/LogisticsCompanys/LogisticsCompanyController.cs +++ /dev/null @@ -1,180 +0,0 @@ -using Infrastructure; -using Infrastructure.Attribute; -using Infrastructure.Enums; -using Infrastructure.Model; -using Mapster; -using Microsoft.AspNetCore.Http; -using Microsoft.AspNetCore.Mvc; -using ARW.Admin.WebApi.Extensions; -using ARW.Admin.WebApi.Filters; -using ARW.Common; -using ARW.Model.Dto.Business.LogisticsManage.LogisticsCompanys; -using ARW.Service.Business.IBusinessService.LogisticsManage.LogisticsCompanys; -using ARW.Admin.WebApi.Controllers; -using ARW.Model.Models.Business.LogisticsManage.LogisticsCompanys; -using ARW.Model.Vo.Business.LogisticsManage.LogisticsCompanys; -using Microsoft.AspNetCore.Authorization; -using ARW.Admin.WebApi.Framework; - - -namespace ARW.WebApi.Controllers.Business.LogisticsManage.LogisticsCompanys -{ - /// - /// 物流公司控制器 - /// - /// @author lwh - /// @date 2023-06-18 - /// - [Verify] - [Route("business/[controller]")] - public class LogisticsCompanyController : BaseController - { - private readonly ILogisticsCompanyService _LogisticsCompanyService; - - /// - /// 依赖注入 - /// - /// 物流公司服务 - public LogisticsCompanyController(ILogisticsCompanyService LogisticsCompanyService) - { - _LogisticsCompanyService = LogisticsCompanyService; - } - - - /// - /// 获取物流公司列表 - /// - /// 查询参数 - /// - [HttpGet("getLogisticsCompanyList")] - [ActionPermissionFilter(Permission = "business:logisticscompany:list")] - public async Task GetLogisticsCompanyList([FromQuery] LogisticsCompanyQueryDto parm) - { - var res = await _LogisticsCompanyService.GetLogisticsCompanyList(parm); - return SUCCESS(res); - } - - /// - /// 添加或修改物流公司 - /// - /// - /// - [HttpPost("addOrUpdateLogisticsCompany")] - [ActionPermissionFilter(Permission = "business:logisticscompany:addOrUpdate")] - [Log(Title = "添加或修改物流公司", BusinessType = BusinessType.ADDORUPDATE)] - public async Task AddOrUpdateLogisticsCompany([FromBody] LogisticsCompanyDto parm) - { - if (parm == null) { throw new CustomException("请求参数错误"); } - - var modal = new LogisticsCompany(); - if (parm.LogisticsCompanyId != 0) modal = parm.Adapt().ToUpdate(HttpContext); - else modal = parm.Adapt().ToCreate(HttpContext); - - var res = await _LogisticsCompanyService.AddOrUpdateLogisticsCompany(modal); - return SUCCESS(res); - } - - /// - /// 删除物流公司 - /// - /// - [HttpDelete("{ids}")] - [ActionPermissionFilter(Permission = "business:logisticscompany:delete")] - [Log(Title = "物流公司删除", BusinessType = BusinessType.DELETE)] - public IActionResult Delete(string ids) - { - long[] idsArr = Tools.SpitLongArrary(ids); - if (idsArr.Length <= 0) { return ToResponse(ApiResult.Error($"删除失败Id 不能为空")); } - var response = _LogisticsCompanyService.Delete(idsArr); - return SUCCESS("删除成功!"); - } - - /// - /// 导入物流公司 - /// - /// 使用IFromFile必须使用name属性否则获取不到文件 - /// 是否需要更新 - /// - [HttpPost("importData")] - [Log(Title = "物流公司导入", BusinessType = BusinessType.IMPORT, IsSaveRequestData = false, IsSaveResponseData = false)] - [ActionPermissionFilter(Permission = "business:logisticscompany:import")] - public async Task ImportExcel([FromForm(Name = "file")] IFormFile formFile, bool updateSupport) - { - var isUpdateSupport = updateSupport; - IEnumerable parm = ExcelHelper.ImportData(formFile.OpenReadStream()); - - var i = 0; - var msgList = new List(); - foreach (LogisticsCompanyVo item in parm) - { - i++; - var LogisticsCompany = await _LogisticsCompanyService.HandleImportData(item); - var modal = LogisticsCompany.Adapt().ToCreate(HttpContext); - var user = JwtUtil.GetLoginUser(App.HttpContext).UserName; - var msg = await _LogisticsCompanyService.ImportExcel(modal, i, isUpdateSupport, user); - msgList.Add(msg); - } - - return SUCCESS(msgList.ToArray()); - } - - - /// - /// 物流公司导入模板下载 - /// - /// - [HttpGet("importTemplate")] - [Log(Title = "物流公司模板", BusinessType = BusinessType.EXPORT, IsSaveRequestData = false, IsSaveResponseData = false)] - [AllowAnonymous] - public IActionResult ImportTemplateExcel() - { - List LogisticsCompany = new List(); - MemoryStream stream = new MemoryStream(); - - // 示例数据 - var values = new List() { "顺丰速运", "shunfeng", "100" }; - string sFileName = DownloadImportTemplate(LogisticsCompany, stream, "物流公司导入模板", values); - - return File(stream.ToArray(), "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet", $"{sFileName}"); - } - - /// - /// 导出物流公司 - /// - /// - [Log(Title = "物流公司导出", BusinessType = BusinessType.EXPORT, IsSaveResponseData = false)] - [HttpGet("exportLogisticsCompany")] - [ActionPermissionFilter(Permission = "business:logisticscompany:export")] - public async Task ExportExcel([FromQuery] LogisticsCompanyQueryDto parm) - { - parm.PageSize = 10000; - var list = await _LogisticsCompanyService.GetLogisticsCompanyList(parm); - var data = list.Result; - - // 选中数据 - if (!string.IsNullOrEmpty(parm.ids)) - { - int[] idsArr = Tools.SpitIntArrary(parm.ids); - var selectDataList = new List(); - foreach (var item in idsArr) - { - var select_data = data.Where(s => s.LogisticsCompanyId == item).First(); - selectDataList.Add(select_data); - } - data = selectDataList; - } - - - - // 导出数据处理 - var handleData = await _LogisticsCompanyService.HandleExportData(data); - - string sFileName = ExportExcel(handleData, "LogisticsCompany", "物流公司列表"); - return SUCCESS(new { path = "/export/" + sFileName, fileName = sFileName }); - } - - - - - } -} diff --git a/ARW.WebApi/Controllers/Business/Marketing/CouponManage/Coupons/CouponController.cs b/ARW.WebApi/Controllers/Business/Marketing/CouponManage/Coupons/CouponController.cs deleted file mode 100644 index c9cbb0b..0000000 --- a/ARW.WebApi/Controllers/Business/Marketing/CouponManage/Coupons/CouponController.cs +++ /dev/null @@ -1,199 +0,0 @@ -using Infrastructure; -using Infrastructure.Attribute; -using Infrastructure.Enums; -using Infrastructure.Model; -using Mapster; -using Microsoft.AspNetCore.Http; -using Microsoft.AspNetCore.Mvc; -using ARW.Admin.WebApi.Extensions; -using ARW.Admin.WebApi.Filters; -using ARW.Common; -using ARW.Model.Dto.Business.Marketing.CouponManage.Coupons; -using ARW.Service.Business.IBusinessService.Marketing.CouponManage.Coupons; -using ARW.Admin.WebApi.Controllers; -using ARW.Model.Models.Business.Marketing.CouponManage.Coupons; -using ARW.Model.Vo.Business.Marketing.CouponManage.Coupons; -using Microsoft.AspNetCore.Authorization; -using ARW.Admin.WebApi.Framework; -using ARW.Service.Business.IBusinessService.ShopManager.Shops; - - -namespace ARW.WebApi.Controllers.Business.Marketing.CouponManage.Coupons -{ - /// - /// 优惠券控制器 - /// - /// @author lwh - /// @date 2023-07-24 - /// - [Verify] - [Route("business/[controller]")] - public class CouponController : BaseController - { - private readonly ICouponService _CouponService; - private readonly IShopService _ShopService; - - /// - /// 依赖注入 - /// - /// 优惠券服务 - public CouponController(ICouponService CouponService, IShopService shopService) - { - _CouponService = CouponService; - _ShopService = shopService; - } - - - /// - /// 获取优惠券列表 - /// - /// 查询参数 - /// - [HttpGet("getCouponList")] - [ActionPermissionFilter(Permission = "business:coupon:list")] - public async Task GetCouponList([FromQuery] CouponQueryDto parm) - { - var user = JwtUtil.GetLoginUser(App.HttpContext); - if (user.UserId != 1) - { - var shop = await _ShopService.GetFirstAsync(s => s.ShopUserId == user.UserId); - if (shop == null) throw new Exception("当前用户没有店铺"); - parm.ShopGuid = shop.ShopGuid; - } - - var res = await _CouponService.GetCouponList(parm); - return SUCCESS(res); - } - - /// - /// 添加或修改优惠券 - /// - /// - /// - [HttpPost("addOrUpdateCoupon")] - [ActionPermissionFilter(Permission = "business:coupon:addOrUpdate")] - [Log(Title = "添加或修改优惠券", BusinessType = BusinessType.ADDORUPDATE)] - public async Task AddOrUpdateCoupon([FromBody] CouponDto parm) - { - if (parm == null) { throw new CustomException("请求参数错误"); } - - var user = JwtUtil.GetLoginUser(App.HttpContext); - if (user.UserId != 1) - { - var shop = await _ShopService.GetFirstAsync(s => s.ShopUserId == user.UserId); - if (shop == null) throw new Exception("当前用户没有店铺"); - parm.ShopGuid = shop.ShopGuid; - } - - var modal = new Coupon(); - if (parm.CouponId != 0) modal = parm.Adapt().ToUpdate(HttpContext); - else modal = parm.Adapt().ToCreate(HttpContext); - - var res = await _CouponService.AddOrUpdateCoupon(modal); - return SUCCESS(res); - } - - /// - /// 删除优惠券 - /// - /// - [HttpDelete("{ids}")] - [ActionPermissionFilter(Permission = "business:coupon:delete")] - [Log(Title = "优惠券删除", BusinessType = BusinessType.DELETE)] - public IActionResult Delete(string ids) - { - long[] idsArr = Tools.SpitLongArrary(ids); - if (idsArr.Length <= 0) { return ToResponse(ApiResult.Error($"删除失败Id 不能为空")); } - var response = _CouponService.Delete(idsArr); - return SUCCESS("删除成功!"); - } - - /// - /// 导入优惠券 - /// - /// 使用IFromFile必须使用name属性否则获取不到文件 - /// 是否需要更新 - /// - [HttpPost("importData")] - [Log(Title = "优惠券导入", BusinessType = BusinessType.IMPORT, IsSaveRequestData = false, IsSaveResponseData = false)] - [ActionPermissionFilter(Permission = "business:coupon:import")] - public async Task ImportExcel([FromForm(Name = "file")] IFormFile formFile, bool updateSupport) - { - var isUpdateSupport = updateSupport; - IEnumerable parm = ExcelHelper.ImportData(formFile.OpenReadStream()); - - var i = 0; - var msgList = new List(); - foreach (CouponVo item in parm) - { - i++; - var Coupon = await _CouponService.HandleImportData(item); - var modal = Coupon.Adapt().ToCreate(HttpContext); - var user = JwtUtil.GetLoginUser(App.HttpContext).UserName; - var msg = await _CouponService.ImportExcel(modal, i, isUpdateSupport, user); - msgList.Add(msg); - } - - return SUCCESS(msgList.ToArray()); - } - - - /// - /// 优惠券导入模板下载 - /// - /// - [HttpGet("importTemplate")] - [Log(Title = "优惠券模板", BusinessType = BusinessType.EXPORT, IsSaveRequestData = false, IsSaveResponseData = false)] - [AllowAnonymous] - public IActionResult ImportTemplateExcel() - { - List Coupon = new List(); - MemoryStream stream = new MemoryStream(); - - // 示例数据 - var values = new List() { "111", "222", "333" }; - string sFileName = DownloadImportTemplate(Coupon, stream, "优惠券导入模板", values); - - return File(stream.ToArray(), "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet", $"{sFileName}"); - } - - /// - /// 导出优惠券 - /// - /// - [Log(Title = "优惠券导出", BusinessType = BusinessType.EXPORT, IsSaveResponseData = false)] - [HttpGet("exportCoupon")] - [ActionPermissionFilter(Permission = "business:coupon:export")] - public async Task ExportExcel([FromQuery] CouponQueryDto parm) - { - parm.PageSize = 10000; - var list = await _CouponService.GetCouponList(parm); - var data = list.Result; - - // 选中数据 - if (!string.IsNullOrEmpty(parm.ids)) - { - int[] idsArr = Tools.SpitIntArrary(parm.ids); - var selectDataList = new List(); - foreach (var item in idsArr) - { - var select_data = data.Where(s => s.CouponId == item).First(); - selectDataList.Add(select_data); - } - data = selectDataList; - } - - - - // 导出数据处理 - var handleData = await _CouponService.HandleExportData(data); - - string sFileName = ExportExcel(handleData, "Coupon", "优惠券列表"); - return SUCCESS(new { path = "/export/" + sFileName, fileName = sFileName }); - } - - - - - } -} diff --git a/ARW.WebApi/Controllers/Business/Marketing/CouponManage/CustomerCoupons/CustomerCouponController.cs b/ARW.WebApi/Controllers/Business/Marketing/CouponManage/CustomerCoupons/CustomerCouponController.cs deleted file mode 100644 index 00bf8b2..0000000 --- a/ARW.WebApi/Controllers/Business/Marketing/CouponManage/CustomerCoupons/CustomerCouponController.cs +++ /dev/null @@ -1,98 +0,0 @@ -using Infrastructure; -using Infrastructure.Attribute; -using Infrastructure.Enums; -using Infrastructure.Model; -using Mapster; -using Microsoft.AspNetCore.Http; -using Microsoft.AspNetCore.Mvc; -using ARW.Admin.WebApi.Extensions; -using ARW.Admin.WebApi.Filters; -using ARW.Common; -using ARW.Model.Dto.Business.Marketing.CouponManage.CustomerCoupons; -using ARW.Service.Business.IBusinessService.Marketing.CouponManage.CustomerCoupons; -using ARW.Admin.WebApi.Controllers; -using ARW.Model.Models.Business.Marketing.CouponManage.CustomerCoupons; -using ARW.Model.Vo.Business.Marketing.CouponManage.CustomerCoupons; -using Microsoft.AspNetCore.Authorization; -using ARW.Admin.WebApi.Framework; - - -namespace ARW.WebApi.Controllers.Business.Marketing.CouponManage.CustomerCoupons -{ - /// - /// 领券记录控制器 - /// - /// @author lwh - /// @date 2023-07-31 - /// - [Verify] - [Route("business/[controller]")] - public class CustomerCouponController : BaseController - { - private readonly ICustomerCouponService _CustomerCouponService; - - /// - /// 依赖注入 - /// - /// 领券记录服务 - public CustomerCouponController(ICustomerCouponService CustomerCouponService) - { - _CustomerCouponService = CustomerCouponService; - } - - - /// - /// 获取领券记录列表 - /// - /// 查询参数 - /// - [HttpGet("getCustomerCouponList")] - [ActionPermissionFilter(Permission = "business:customercoupon:list")] - public async Task GetCustomerCouponList([FromQuery] CustomerCouponQueryDto parm) - { - var res = await _CustomerCouponService.GetCustomerCouponList(parm); - return SUCCESS(res); - } - - /// - /// 添加或修改领券记录 - /// - /// - /// - [HttpPost("addOrUpdateCustomerCoupon")] - [ActionPermissionFilter(Permission = "business:customercoupon:addOrUpdate")] - [Log(Title = "添加或修改领券记录", BusinessType = BusinessType.ADDORUPDATE)] - public async Task AddOrUpdateCustomerCoupon([FromBody] CustomerCouponDto parm) - { - if (parm == null) { throw new CustomException("请求参数错误"); } - - var modal = new CustomerCoupon(); - if (parm.CustomerCouponId != 0) modal = parm.Adapt().ToUpdate(HttpContext); - else modal = parm.Adapt().ToCreate(HttpContext); - - var res = await _CustomerCouponService.AddOrUpdateCustomerCoupon(modal); - return SUCCESS(res); - } - - /// - /// 删除领券记录 - /// - /// - [HttpDelete("{ids}")] - [ActionPermissionFilter(Permission = "business:customercoupon:delete")] - [Log(Title = "领券记录删除", BusinessType = BusinessType.DELETE)] - public IActionResult Delete(string ids) - { - long[] idsArr = Tools.SpitLongArrary(ids); - if (idsArr.Length <= 0) { return ToResponse(ApiResult.Error($"删除失败Id 不能为空")); } - var response = _CustomerCouponService.Delete(idsArr); - return SUCCESS("删除成功!"); - } - - - - - - - } -} diff --git a/ARW.WebApi/Controllers/Business/OrderManage/OrderRefunds/OrderRefundController.cs b/ARW.WebApi/Controllers/Business/OrderManage/OrderRefunds/OrderRefundController.cs deleted file mode 100644 index 7194699..0000000 --- a/ARW.WebApi/Controllers/Business/OrderManage/OrderRefunds/OrderRefundController.cs +++ /dev/null @@ -1,326 +0,0 @@ -using Infrastructure; -using Infrastructure.Attribute; -using Infrastructure.Enums; -using Infrastructure.Model; -using Mapster; -using Microsoft.AspNetCore.Http; -using Microsoft.AspNetCore.Mvc; -using ARW.Admin.WebApi.Extensions; -using ARW.Admin.WebApi.Filters; -using ARW.Common; -using ARW.Model.Dto.Business.OrderManage.OrderRefunds; -using ARW.Service.Business.IBusinessService.OrderManage.OrderRefunds; -using ARW.Admin.WebApi.Controllers; -using ARW.Model.Models.Business.OrderManage.OrderRefunds; -using ARW.Model.Vo.Business.OrderManage.OrderRefunds; -using Microsoft.AspNetCore.Authorization; -using ARW.Admin.WebApi.Framework; -using ARW.Service.Business.IBusinessService.OrderManage.Orders; -using Geocoding; -using ARW.Service.Business.IBusinessService.ShopManager.Shops; -using ARW.Service.Business.IBusinessService.GoodsManager.GoodsSpecs.GoodsSkus; -using ARW.Service.Business.IBusinessService.OrderManage.OrderGoodss; -using ARW.Service.Business.IBusinessService.Payments; -using Infrastructure.WeChat.TenPay; -using System.Net.Http; -using ARW.Service.Business.IBusinessService.GoodsManager.Goodss; -using Senparc.CO2NET.HttpUtility; -using ARW.Model.Models.Business.Payments; - -namespace ARW.WebApi.Controllers.Business.OrderManage.OrderRefunds -{ - /// - /// 售后单记录表控制器 - /// - /// @author lwh - /// @date 2023-08-29 - /// - [Verify] - [Route("business/[controller]")] - public class OrderRefundController : BaseController - { - private readonly IOrderRefundService _OrderRefundService; - private readonly IShopService _ShopService; - private readonly IPaymentService _PaymentService; - private readonly SenparcHttpClient _httpClient; - private readonly IGoodsService _GoodsService; - private readonly IGoodsSkuService _GoodsSkuService; - private readonly IOrderService _OrderService; - private readonly IOrderGoodsService _OrderGoodsService; - /// - /// 依赖注入 - /// - /// 售后单记录表服务 - public OrderRefundController(IOrderRefundService OrderRefundService, IShopService shopService, IPaymentService paymentService, SenparcHttpClient httpClient, IGoodsService goodsService, IGoodsSkuService goodsSkuService, IOrderService orderService, IOrderGoodsService orderGoodsService) - { - _OrderRefundService = OrderRefundService; - _ShopService = shopService; - _PaymentService = paymentService; - _httpClient = httpClient; - _GoodsService = goodsService; - _GoodsSkuService = goodsSkuService; - _OrderService = orderService; - _OrderGoodsService = orderGoodsService; - } - - - /// - /// 获取售后单记录表列表 - /// - /// 查询参数 - /// - [HttpGet("getOrderRefundList")] - [ActionPermissionFilter(Permission = "business:orderrefund:list")] - public async Task GetOrderRefundList([FromQuery] OrderRefundQueryDto parm) - { - var user = JwtUtil.GetLoginUser(App.HttpContext); - if (user.UserId != 1) - { - var shop = await _ShopService.GetFirstAsync(s => s.ShopUserId == user.UserId); - if (shop == null) throw new Exception("当前用户没有店铺"); - parm.ShopGuid = shop.ShopGuid; - } - - var res = await _OrderRefundService.GetOrderRefundList(parm); - return SUCCESS(res); - } - - - /// - /// 获取售后单详情 - /// - /// 查询参数 - /// - [HttpGet("getOrderRefundDetails")] - public async Task GetOrderDetails([FromQuery] OrderRefundDetailsDto parm) - { - if (parm == null) throw new CustomException("参数错误!"); - - var res = await _OrderRefundService.GetOrderRefundDetails(parm); - - if (res != "[]") - { - var data = res.FromJSON(); - return SUCCESS(data); - } - else - { - return SUCCESS(res); - } - } - - - - /// - /// 审核售后订单 - /// - /// - /// - [HttpPost("auditOrderRefund")] - [Log(Title = "审核售后订单", BusinessType = BusinessType.ADDORUPDATE)] - public async Task AuditOrderRefund([FromBody] OrderRefundAuditDto parm) - { - if (parm == null) { throw new CustomException("请求参数错误"); } - - if (parm.IsAgree == true) - { - var orderRefund = await _OrderRefundService.GetFirstAsync(s => s.OrderRefundGuid == parm.OrderRefundGuid); - var order = await _OrderService.GetFirstAsync(s => s.OrderGuid == orderRefund.OrderGuid); - var payment = await _PaymentService.GetFirstAsync(s => s.PaymentGuid == order.PaymentGuid); - - if (orderRefund.RefundType == 2) - { - Pay pay = new Pay(_httpClient); - var transactionId = payment.PaymentWeixinNumber; - string paymentRefundNumber = ""; - if (!string.IsNullOrEmpty(payment.PaymentRefundNumber)) - { - paymentRefundNumber = payment.PaymentRefundNumber; - } - - var totalFee = payment.PaymentMoney * 100; - var canleRes = await pay.Refund(transactionId, totalFee, paymentRefundNumber, "商品退款"); - if (canleRes.ResultCode.Success == false) - throw new CustomException("订单退款失败!"); - else - { - await _OrderRefundService.UpdateAsync(f => new OrderRefund - { - RefundActualMoney = totalFee, - }, f => f.OrderRefundGuid == orderRefund.OrderRefundGuid); - - await _PaymentService.UpdateAsync(f => new Payment - { - PaymentRefundNumber = canleRes.out_refund_no, - }, f => f.PaymentNumber == canleRes.out_trade_no); - - var orderGoodsList = await _OrderGoodsService.GetListAsync(s => s.OrderGuid == orderRefund.OrderGuid); - // 库存加回来 - foreach (var orderGood in orderGoodsList) - { - var goods = await _GoodsService.GetFirstAsync(s => s.GoodsGuid == orderGood.GoodsGuid); - var shop = await _ShopService.GetFirstAsync(s => s.ShopGuid == goods.ShopGuid); - - goods.GoodsSalesActual += orderGood.GoodsTotalNum; - await _GoodsService.UpdateAsync(goods); - shop.ShopSalesOrderCount += orderGood.GoodsTotalNum; - await _ShopService.UpdateAsync(shop); - - if (goods.GoodsDeductStockType == 2) - { - if (orderGood.GoodsSkuId != 0) - { - var sku = await _GoodsSkuService.GetFirstAsync(s => s.GoodsSkuId == orderGood.GoodsSkuId); - sku.GoodsSkuStockNum += orderGood.GoodsTotalNum; - goods.GoodsTotalInventory += orderGood.GoodsTotalNum; - await _GoodsSkuService.UpdateAsync(sku); - await _GoodsService.UpdateAsync(goods); - } - else - { - goods.GoodsTotalInventory += orderGood.GoodsTotalNum; - await _GoodsService.UpdateAsync(goods); - } - } - } - } - } - } - - var res = await _OrderRefundService.AuditOrderRefund(parm); - return SUCCESS(res); - } - - - /// - /// 商家确认收货 - /// - /// - /// - [HttpPost("confirmsReceipt")] - [Log(Title = "商家确认收货", BusinessType = BusinessType.ADDORUPDATE)] - public async Task ConfirmsReceipt([FromBody] OrderRefundAuditDto parm) - { - if (parm == null) { throw new CustomException("请求参数错误"); } - - var orderRefund = await _OrderRefundService.GetFirstAsync(s => s.OrderRefundGuid == parm.OrderRefundGuid); - var order = await _OrderService.GetFirstAsync(s => s.OrderGuid == orderRefund.OrderGuid); - var payment = await _PaymentService.GetFirstAsync(s => s.PaymentGuid == order.PaymentGuid); - - Pay pay = new Pay(_httpClient); - var transactionId = payment.PaymentWeixinNumber; - string paymentRefundNumber = ""; - if (!string.IsNullOrEmpty(payment.PaymentRefundNumber)) - { - paymentRefundNumber = payment.PaymentRefundNumber; - } - - var totalFee = payment.PaymentMoney * 100; - var canleRes = await pay.Refund(transactionId, totalFee, paymentRefundNumber, "商品退款"); - if (canleRes.ResultCode.Success == false) - throw new CustomException("订单退款失败!"); - else - { - await _OrderRefundService.UpdateAsync(f => new OrderRefund - { - RefundActualMoney = totalFee, - }, f => f.OrderRefundGuid == orderRefund.OrderRefundGuid); - - var respones = await _PaymentService.UpdateAsync(f => new Payment - { - PaymentRefundNumber = canleRes.out_refund_no, - }, f => f.PaymentNumber == canleRes.out_trade_no); - - var orderGoodsList = await _OrderGoodsService.GetListAsync(s => s.OrderGuid == orderRefund.OrderGuid); - // 库存加回来 - foreach (var orderGood in orderGoodsList) - { - var goods = await _GoodsService.GetFirstAsync(s => s.GoodsGuid == orderGood.GoodsGuid); - var shop = await _ShopService.GetFirstAsync(s => s.ShopGuid == goods.ShopGuid); - - goods.GoodsSalesActual += orderGood.GoodsTotalNum; - await _GoodsService.UpdateAsync(goods); - shop.ShopSalesOrderCount += orderGood.GoodsTotalNum; - await _ShopService.UpdateAsync(shop); - - if (goods.GoodsDeductStockType == 2) - { - if (orderGood.GoodsSkuId != 0) - { - var sku = await _GoodsSkuService.GetFirstAsync(s => s.GoodsSkuId == orderGood.GoodsSkuId); - sku.GoodsSkuStockNum += orderGood.GoodsTotalNum; - goods.GoodsTotalInventory += orderGood.GoodsTotalNum; - await _GoodsSkuService.UpdateAsync(sku); - await _GoodsService.UpdateAsync(goods); - } - else - { - goods.GoodsTotalInventory += orderGood.GoodsTotalNum; - await _GoodsService.UpdateAsync(goods); - } - } - } - - } - - var res = await _OrderRefundService.ConfirmsReceipt(parm); - return SUCCESS(res); - } - - - /// - /// 删除售后单记录表 - /// - /// - [HttpDelete("{ids}")] - [ActionPermissionFilter(Permission = "business:orderrefund:delete")] - [Log(Title = "售后单记录表删除", BusinessType = BusinessType.DELETE)] - public IActionResult Delete(string ids) - { - long[] idsArr = Tools.SpitLongArrary(ids); - if (idsArr.Length <= 0) { return ToResponse(ApiResult.Error($"删除失败Id 不能为空")); } - var response = _OrderRefundService.Delete(idsArr); - return SUCCESS("删除成功!"); - } - - - /// - /// 导出售后单记录表 - /// - /// - [Log(Title = "售后单记录表导出", BusinessType = BusinessType.EXPORT, IsSaveResponseData = false)] - [HttpGet("exportOrderRefund")] - [ActionPermissionFilter(Permission = "business:orderrefund:export")] - public async Task ExportExcel([FromQuery] OrderRefundQueryDto parm) - { - parm.PageSize = 10000; - var list = await _OrderRefundService.GetOrderRefundList(parm); - var data = list.Result; - - // 选中数据 - if (!string.IsNullOrEmpty(parm.ids)) - { - int[] idsArr = Tools.SpitIntArrary(parm.ids); - var selectDataList = new List(); - foreach (var item in idsArr) - { - var select_data = data.Where(s => s.OrderRefundId == item).First(); - selectDataList.Add(select_data); - } - data = selectDataList; - } - - - - // 导出数据处理 - var handleData = await _OrderRefundService.HandleExportData(data); - - string sFileName = ExportExcel(handleData, "OrderRefund", "售后单记录表列表"); - return SUCCESS(new { path = "/export/" + sFileName, fileName = sFileName }); - } - - - - - } -} diff --git a/ARW.WebApi/Controllers/Business/OrderManage/Orders/OrderController.cs b/ARW.WebApi/Controllers/Business/OrderManage/Orders/OrderController.cs deleted file mode 100644 index 450fdd6..0000000 --- a/ARW.WebApi/Controllers/Business/OrderManage/Orders/OrderController.cs +++ /dev/null @@ -1,311 +0,0 @@ -using Infrastructure; -using Infrastructure.Attribute; -using Infrastructure.Enums; -using Infrastructure.Model; -using Mapster; -using Microsoft.AspNetCore.Http; -using Microsoft.AspNetCore.Mvc; -using ARW.Admin.WebApi.Extensions; -using ARW.Admin.WebApi.Filters; -using ARW.Common; -using ARW.Model.Dto.Business.OrderManage.Orders; -using ARW.Service.Business.IBusinessService.OrderManage.Orders; -using ARW.Admin.WebApi.Controllers; -using ARW.Model.Models.Business.OrderManage.Orders; -using ARW.Model.Vo.Business.OrderManage.Orders; -using Microsoft.AspNetCore.Authorization; -using ARW.Admin.WebApi.Framework; -using ARW.Service.Api.IBusinessService.OrderManage.Orders; -using Geocoding; -using ARW.Service.Business.IBusinessService.OrderManage.OrderGoodss; -using ARW.Service.Business.IBusinessService.OrderManage.OrderCustomerAddreses; -using ARW.Service.Business.IBusinessService.ShopManager.Shops; -using ARW.Repository.Business.OrderManage.Orders; -using ARW.Repository.Business.Payments; -using Infrastructure.WeChat.TenPay; -using System.Net.Http; -using Senparc.CO2NET.HttpUtility; -using ARW.Service.Business.IBusinessService.Payments; -using ARW.Model.Models.Business.Payments; -using ARW.Repository.Business.GoodsManager.Goodss; -using ARW.Repository.Business.GoodsManager.GoodsSpecs.GoodsSkus; -using ARW.Repository.Business.ShopManager.Shops; -using ARW.Service.Business.IBusinessService.GoodsManager.Goodss; -using ARW.Service.Business.IBusinessService.GoodsManager.GoodsSpecs.GoodsSkus; - -namespace ARW.WebApi.Controllers.Business.OrderManage.Orders -{ - /// - /// 订单控制器 - /// - /// @author lwh - /// @date 2023-08-29 - /// - [Verify] - [Route("business/[controller]")] - public class OrderController : BaseController - { - private readonly IShopService _ShopService; - private readonly IOrderService _OrderService; - private readonly IOrderGoodsService _OrderGoodsService; - private readonly IOrderCustomerAddressService _OrderCustomerAddressService; - private readonly IPaymentService _PaymentService; - private readonly SenparcHttpClient _httpClient; - private readonly IGoodsService _GoodsService; - private readonly IGoodsSkuService _GoodsSkuService; - - - /// - /// 依赖注入 - /// - /// 订单服务 - public OrderController(IOrderService OrderService, IOrderGoodsService orderGoodsService, IOrderCustomerAddressService orderCustomerAddressService, IShopService shopService, SenparcHttpClient httpClient, IPaymentService paymentService, IGoodsService goodsService, IGoodsSkuService goodsSkuService) - { - _OrderService = OrderService; - _OrderGoodsService = orderGoodsService; - _OrderCustomerAddressService = orderCustomerAddressService; - _ShopService = shopService; - _httpClient = httpClient; - _PaymentService = paymentService; - _GoodsService = goodsService; - _GoodsSkuService = goodsSkuService; - } - - - /// - /// 获取订单列表 - /// - /// 查询参数 - /// - [HttpGet("getOrderList")] - [ActionPermissionFilter(Permission = "business:order:list")] - public async Task GetOrderList([FromQuery] OrderQueryDto parm) - { - var user = JwtUtil.GetLoginUser(App.HttpContext); - if (user.UserId != 1) - { - var shop = await _ShopService.GetFirstAsync(s => s.ShopUserId == user.UserId); - if (shop == null) throw new Exception("当前用户没有店铺"); - parm.ShopGuid = shop.ShopGuid; - } - - var res = await _OrderService.GetOrderList(parm); - return SUCCESS(res); - } - - - /// - /// 获取订单详情 - /// - /// 查询参数 - /// - [HttpGet("getOrderDetails")] - public async Task GetOrderDetails([FromQuery] OrderDetailDto parm) - { - //if (parm == null) throw new CustomException("参数错误!"); - - var res = await _OrderService.GetOrderDetails(parm); - - if (res != "[]") - { - var data = res.FromJSON(); - return SUCCESS(data); - } - else - { - return SUCCESS(res); - } - } - - - /// - /// 发货 - /// - /// - /// - [HttpPost("deliver")] - [Log(Title = "发货", BusinessType = BusinessType.ADDORUPDATE)] - public async Task Deliver([FromBody] OrderDeliverDto parm) - { - if (parm == null) { throw new CustomException("请求参数错误"); } - - var res = await _OrderService.Deliver(parm); - return SUCCESS(res); - } - - - /// - /// 订单改价 - /// - /// - /// - [HttpPost("changePrice")] - [Log(Title = "订单改价", BusinessType = BusinessType.ADDORUPDATE)] - public async Task ChangePrice([FromBody] OrderChangePriceDto parm) - { - if (parm == null) { throw new CustomException("请求参数错误"); } - - var res = await _OrderService.ChangePrice(parm); - return SUCCESS(res); - } - - - /// - /// 审核取消订单 - /// - /// - /// - [HttpPost("cancelOrder")] - [Log(Title = "审核取消订单", BusinessType = BusinessType.ADDORUPDATE)] - public async Task CancelOrder([FromBody] OrderCancelOrderDto parm) - { - if (parm == null) { throw new CustomException("请求参数错误"); } - - var order = await _OrderService.GetFirstAsync(s => s.OrderGuid == parm.OrderGuid); - var payment = await _PaymentService.GetFirstAsync(s => s.PaymentGuid == order.PaymentGuid); - - if (parm.IsAgree) - { - Pay pay = new Pay(_httpClient); - var transactionId = payment.PaymentWeixinNumber; - string paymentRefundNumber = ""; - if (!string.IsNullOrEmpty(payment.PaymentRefundNumber)) - { - paymentRefundNumber = payment.PaymentRefundNumber; - } - - var totalFee = payment.PaymentMoney * 100; - var canleRes = await pay.Refund(transactionId, totalFee, paymentRefundNumber, "商品退款"); - if (canleRes.ResultCode.Success == false) - throw new CustomException("订单退款失败!"); - else - { - var respones = await _PaymentService.UpdateAsync(f => new Payment - { - PaymentRefundNumber = canleRes.out_refund_no, - }, f => f.PaymentNumber == canleRes.out_trade_no); - - var orderGoodsList = await _OrderGoodsService.GetListAsync(s => s.OrderGuid == parm.OrderGuid); - // 库存加回来 - foreach (var orderGood in orderGoodsList) - { - var goods = await _GoodsService.GetFirstAsync(s => s.GoodsGuid == orderGood.GoodsGuid); - var shop = await _ShopService.GetFirstAsync(s => s.ShopGuid == goods.ShopGuid); - - goods.GoodsSalesActual += orderGood.GoodsTotalNum; - await _GoodsService.UpdateAsync(goods); - shop.ShopSalesOrderCount += orderGood.GoodsTotalNum; - await _ShopService.UpdateAsync(shop); - - if (goods.GoodsDeductStockType == 2) - { - if (orderGood.GoodsSkuId != 0) - { - var sku = await _GoodsSkuService.GetFirstAsync(s => s.GoodsSkuId == orderGood.GoodsSkuId); - sku.GoodsSkuStockNum += orderGood.GoodsTotalNum; - goods.GoodsTotalInventory += orderGood.GoodsTotalNum; - await _GoodsSkuService.UpdateAsync(sku); - await _GoodsService.UpdateAsync(goods); - } - else - { - goods.GoodsTotalInventory += orderGood.GoodsTotalNum; - await _GoodsService.UpdateAsync(goods); - } - } - } - - } - } - - - var res = await _OrderService.CancelOrder(parm); - return SUCCESS(res); - } - - - /// - /// 添加或修改订单 - /// - /// - /// - [HttpPost("addOrUpdateOrder")] - [ActionPermissionFilter(Permission = "business:order:addOrUpdate")] - [Log(Title = "添加或修改订单", BusinessType = BusinessType.ADDORUPDATE)] - public async Task AddOrUpdateOrder([FromBody] OrderDto parm) - { - if (parm == null) { throw new CustomException("请求参数错误"); } - - var modal = new Order(); - if (parm.OrderId != 0) modal = parm.Adapt().ToUpdate(HttpContext); - else modal = parm.Adapt().ToCreate(HttpContext); - - var res = await _OrderService.AddOrUpdateOrder(modal); - return SUCCESS(res); - } - - /// - /// 删除订单 - /// - /// - [HttpDelete("{ids}")] - [ActionPermissionFilter(Permission = "business:order:delete")] - [Log(Title = "订单删除", BusinessType = BusinessType.DELETE)] - public async Task Delete(string ids) - { - int[] idsArr = Tools.SpitIntArrary(ids); - if (idsArr.Length <= 0) { return ToResponse(ApiResult.Error($"删除失败Id 不能为空")); } - - //foreach (var item in idsArr) - //{ - // var order = await _OrderService.GetFirstAsync(s => s.OrderId == item); - // await _OrderCustomerAddressService.DeleteAsync(s => s.OrderGuid == order.OrderGuid); - // await _OrderGoodsService.DeleteAsync(s => s.OrderGuid == order.OrderGuid); - //} - - var response = _OrderService.Delete(idsArr); - - return SUCCESS("删除成功!"); - } - - - /// - /// 导出订单 - /// - /// - [Log(Title = "订单导出", BusinessType = BusinessType.EXPORT, IsSaveResponseData = false)] - [HttpGet("exportOrder")] - [ActionPermissionFilter(Permission = "business:order:export")] - public async Task ExportExcel([FromQuery] OrderQueryDto parm) - { - parm.PageSize = 10000; - var list = await _OrderService.GetOrderList(parm); - var data = list.Result; - - // 选中数据 - if (!string.IsNullOrEmpty(parm.ids)) - { - int[] idsArr = Tools.SpitIntArrary(parm.ids); - var selectDataList = new List(); - foreach (var item in idsArr) - { - var select_data = data.Where(s => s.OrderId == item).First(); - selectDataList.Add(select_data); - } - data = selectDataList; - } - - - - // 导出数据处理 - var handleData = await _OrderService.HandleExportData(data); - - string sFileName = ExportExcel(handleData, "Order", "订单列表"); - return SUCCESS(new { path = "/export/" + sFileName, fileName = sFileName }); - } - - - - - } -} diff --git a/ARW.WebApi/Controllers/Business/OrderTasks/OrderTaskController.cs b/ARW.WebApi/Controllers/Business/OrderTasks/OrderTaskController.cs deleted file mode 100644 index 5413a49..0000000 --- a/ARW.WebApi/Controllers/Business/OrderTasks/OrderTaskController.cs +++ /dev/null @@ -1,98 +0,0 @@ -using Infrastructure; -using Infrastructure.Attribute; -using Infrastructure.Enums; -using Infrastructure.Model; -using Mapster; -using Microsoft.AspNetCore.Http; -using Microsoft.AspNetCore.Mvc; -using ARW.Admin.WebApi.Extensions; -using ARW.Admin.WebApi.Filters; -using ARW.Common; -using ARW.Model.Dto.Business.OrderTasks; -using ARW.Service.Business.IBusinessService.OrderTasks; -using ARW.Admin.WebApi.Controllers; -using ARW.Model.Models.Business.OrderTasks; -using ARW.Model.Vo.Business.OrderTasks; -using Microsoft.AspNetCore.Authorization; -using ARW.Admin.WebApi.Framework; - - -namespace ARW.WebApi.Controllers.Business.OrderTasks -{ - /// - /// 订单取消任务控制器 - /// - /// @author lwh - /// @date 2023-10-23 - /// - [Verify] - [Route("business/[controller]")] - public class OrderTaskController : BaseController - { - private readonly IOrderTaskService _OrderTaskService; - - /// - /// 依赖注入 - /// - /// 订单取消任务服务 - public OrderTaskController(IOrderTaskService OrderTaskService) - { - _OrderTaskService = OrderTaskService; - } - - - /// - /// 获取订单取消任务列表 - /// - /// 查询参数 - /// - [HttpGet("getOrderTaskList")] - [ActionPermissionFilter(Permission = "business:ordertask:list")] - public async Task GetOrderTaskList([FromQuery] OrderTaskQueryDto parm) - { - var res = await _OrderTaskService.GetOrderTaskList(parm); - return SUCCESS(res); - } - - /// - /// 添加或修改订单取消任务 - /// - /// - /// - [HttpPost("addOrUpdateOrderTask")] - [ActionPermissionFilter(Permission = "business:ordertask:addOrUpdate")] - [Log(Title = "添加或修改订单取消任务", BusinessType = BusinessType.ADDORUPDATE)] - public async Task AddOrUpdateOrderTask([FromBody] OrderTaskDto parm) - { - if (parm == null) { throw new CustomException("请求参数错误"); } - - var modal = new OrderTask(); - if (parm.OrderTaskId != 0) modal = parm.Adapt().ToUpdate(HttpContext); - else modal = parm.Adapt().ToCreate(HttpContext); - - var res = await _OrderTaskService.AddOrUpdateOrderTask(modal); - return SUCCESS(res); - } - - /// - /// 删除订单取消任务 - /// - /// - [HttpDelete("{ids}")] - [ActionPermissionFilter(Permission = "business:ordertask:delete")] - [Log(Title = "订单取消任务删除", BusinessType = BusinessType.DELETE)] - public IActionResult Delete(string ids) - { - long[] idsArr = Tools.SpitLongArrary(ids); - if (idsArr.Length <= 0) { return ToResponse(ApiResult.Error($"删除失败Id 不能为空")); } - var response = _OrderTaskService.Delete(idsArr); - return SUCCESS("删除成功!"); - } - - - - - - - } -} diff --git a/ARW.WebApi/Controllers/Business/ShopManager/ShopAddresss/ShopAddressController.cs b/ARW.WebApi/Controllers/Business/ShopManager/ShopAddresss/ShopAddressController.cs deleted file mode 100644 index f8a0b44..0000000 --- a/ARW.WebApi/Controllers/Business/ShopManager/ShopAddresss/ShopAddressController.cs +++ /dev/null @@ -1,150 +0,0 @@ -using Infrastructure; -using Infrastructure.Attribute; -using Infrastructure.Enums; -using Infrastructure.Model; -using Mapster; -using Microsoft.AspNetCore.Http; -using Microsoft.AspNetCore.Mvc; -using ARW.Admin.WebApi.Extensions; -using ARW.Admin.WebApi.Filters; -using ARW.Common; -using ARW.Model.Dto.Business.ShopManager.ShopAddresss; -using ARW.Service.Business.IBusinessService.ShopManager.ShopAddresss; -using ARW.Admin.WebApi.Controllers; -using ARW.Model.Models.Business.ShopManager.ShopAddresss; -using ARW.Model.Vo.Business.ShopManager.ShopAddresss; -using Microsoft.AspNetCore.Authorization; -using ARW.Admin.WebApi.Framework; -using ARW.Service.Business.IBusinessService.ShopManager.Shops; - -namespace ARW.WebApi.Controllers.Business.ShopManager.ShopAddresss -{ - /// - /// 店铺地址控制器 - /// - /// @author lwh - /// @date 2023-06-15 - /// - [Verify] - [Route("business/[controller]")] - public class ShopAddressController : BaseController - { - private readonly IShopAddressService _ShopAddressService; - private readonly IShopService _ShopService; - - /// - /// 依赖注入 - /// - /// 店铺地址服务 - public ShopAddressController(IShopAddressService ShopAddressService, IShopService shopService) - { - _ShopAddressService = ShopAddressService; - _ShopService = shopService; - } - - - /// - /// 获取店铺地址列表 - /// - /// 查询参数 - /// - [HttpGet("getShopAddressList")] - [ActionPermissionFilter(Permission = "business:shopaddress:list")] - public async Task GetShopAddressList([FromQuery] ShopAddressQueryDto parm) - { - var user = JwtUtil.GetLoginUser(App.HttpContext); - if (user.UserId != 1) - { - var shop = await _ShopService.GetFirstAsync(s => s.ShopUserId == user.UserId); - if (shop == null) throw new Exception("当前用户没有店铺"); - parm.ShopGuid= shop.ShopGuid; - } - - var res = await _ShopAddressService.GetShopAddressList(parm); - return SUCCESS(res); - } - - /// - /// 添加或修改店铺地址 - /// - /// - /// - [HttpPost("addOrUpdateShopAddress")] - [ActionPermissionFilter(Permission = "business:shopaddress:addOrUpdate")] - [Log(Title = "添加或修改店铺地址", BusinessType = BusinessType.ADDORUPDATE)] - public async Task AddOrUpdateShopAddress([FromBody] ShopAddressDto parm) - { - if (parm == null) { throw new CustomException("请求参数错误"); } - - var modal = new ShopAddress(); - if (parm.ShopAddressId != 0) modal = parm.Adapt().ToUpdate(HttpContext); - else modal = parm.Adapt().ToCreate(HttpContext); - - var user = JwtUtil.GetLoginUser(App.HttpContext); - if (user.UserId != 1) - { - var shop = await _ShopService.GetFirstAsync(s => s.ShopUserId == user.UserId); - if (shop == null) throw new Exception("当前用户没有店铺"); - modal.ShopGuid = shop.ShopGuid; - } - - var res = await _ShopAddressService.AddOrUpdateShopAddress(modal); - return SUCCESS(res); - } - - /// - /// 删除店铺地址 - /// - /// - [HttpDelete("{ids}")] - [ActionPermissionFilter(Permission = "business:shopaddress:delete")] - [Log(Title = "店铺地址删除", BusinessType = BusinessType.DELETE)] - public IActionResult Delete(string ids) - { - long[] idsArr = Tools.SpitLongArrary(ids); - if (idsArr.Length <= 0) { return ToResponse(ApiResult.Error($"删除失败Id 不能为空")); } - var response = _ShopAddressService.Delete(idsArr); - return SUCCESS("删除成功!"); - } - - - /// - /// 导出店铺地址 - /// - /// - [Log(Title = "店铺地址导出", BusinessType = BusinessType.EXPORT, IsSaveResponseData = false)] - [HttpGet("exportShopAddress")] - [ActionPermissionFilter(Permission = "business:shopaddress:export")] - public async Task ExportExcel([FromQuery] ShopAddressQueryDto parm) - { - parm.PageSize = 10000; - var list = await _ShopAddressService.GetShopAddressList(parm); - var data = list.Result; - - // 选中数据 - if (!string.IsNullOrEmpty(parm.ids)) - { - int[] idsArr = Tools.SpitIntArrary(parm.ids); - var selectDataList = new List(); - foreach (var item in idsArr) - { - var select_data = data.Where(s => s.ShopAddressId == item).First(); - selectDataList.Add(select_data); - } - data = selectDataList; - } - - - - // 导出数据处理 - var handleData = await _ShopAddressService.HandleExportData(data); - - string sFileName = ExportExcel(handleData, "ShopAddress", "店铺地址列表"); - return SUCCESS(new { path = "/export/" + sFileName, fileName = sFileName }); - } - - - - - } -} diff --git a/ARW.WebApi/Controllers/Business/ShopManager/Shops/ShopController.cs b/ARW.WebApi/Controllers/Business/ShopManager/Shops/ShopController.cs deleted file mode 100644 index 524ecd1..0000000 --- a/ARW.WebApi/Controllers/Business/ShopManager/Shops/ShopController.cs +++ /dev/null @@ -1,263 +0,0 @@ -using Infrastructure; -using Infrastructure.Attribute; -using Infrastructure.Enums; -using Infrastructure.Model; -using Mapster; -using Microsoft.AspNetCore.Http; -using Microsoft.AspNetCore.Mvc; -using ARW.Admin.WebApi.Extensions; -using ARW.Admin.WebApi.Filters; -using ARW.Common; -using ARW.Model.Dto.Business.ShopManager.Shops; -using ARW.Service.Business.IBusinessService.ShopManager.Shops; -using ARW.Admin.WebApi.Controllers; -using ARW.Model.Models.Business.ShopManager.Shops; -using ARW.Model.Vo.Business.ShopManager.Shops; -using Microsoft.AspNetCore.Authorization; -using ARW.Admin.WebApi.Framework; -using ARW.Model.Vo.Business.GoodsManager.GoodsCategorys; -using ARW.Model.Vo.Api.ShopManager.Shops; -using Geocoding; - -namespace ARW.WebApi.Controllers.Business.ShopManager.Shops -{ - /// - /// 店铺控制器 - /// - /// @author lwh - /// @date 2023-06-09 - /// - [Verify] - [Route("business/[controller]")] - public class ShopController : BaseController - { - private readonly IShopService _ShopService; - - /// - /// 依赖注入 - /// - /// 店铺服务 - public ShopController(IShopService ShopService) - { - _ShopService = ShopService; - } - - - /// - /// 获取店铺列表 - /// - /// 查询参数 - /// - [HttpGet("getShopList")] - [ActionPermissionFilter(Permission = "business:shop:list")] - public async Task GetShopList([FromQuery] ShopQueryDto parm) - { - var res = await _ShopService.GetShopList(parm); - return SUCCESS(res); - } - - - /// - /// 获取未绑定的用户列表 - /// - /// 查询参数 - /// - [HttpGet("getUserWithOutBindList")] - public async Task GetUserWithOutBindList([FromQuery] UserWithOutBindQueryDto parm) - { - var res = await _ShopService.GetUserWithOutBindList(parm); - return SUCCESS(res); - } - - - /// - /// 获取经营类目列表(一级类目) - /// - /// - [HttpGet("getFirstGoodsCategoryList")] - public async Task GetFirstGoodsCategoryList() - { - var res = await _ShopService.GetFirstGoodsCategoryList(); - res ??= new List(); - - return SUCCESS(res); - } - - - /// - /// 获取未绑定的客户列表 - /// - /// 查询参数 - /// - [HttpGet("getCustomerWithOutBindList")] - public async Task GetCustomerWithOutBindList([FromQuery] CustomerWithOutBindQueryDto parm) - { - var res = await _ShopService.GetCustomerWithOutBindList(parm); - return SUCCESS(res); - } - - /// - /// 添加或修改店铺 - /// - /// - /// - [HttpPost("addOrUpdateShop")] - [ActionPermissionFilter(Permission = "business:shop:addOrUpdate")] - [Log(Title = "添加或修改店铺", BusinessType = BusinessType.ADDORUPDATE)] - public async Task AddOrUpdateShop([FromBody] ShopDto parm) - { - if (parm == null) { throw new CustomException("请求参数错误"); } - - var modal = new Shop(); - if (parm.ShopId != 0) modal = parm.Adapt().ToUpdate(HttpContext); - else modal = parm.Adapt().ToCreate(HttpContext); - - - var res = await _ShopService.AddOrUpdateShop(modal); - return SUCCESS(res); - } - - /// - /// 删除店铺 - /// - /// - [HttpDelete("{ids}")] - [ActionPermissionFilter(Permission = "business:shop:delete")] - [Log(Title = "店铺删除", BusinessType = BusinessType.DELETE)] - public async Task Delete(string ids) - { - long[] idsArr = Tools.SpitLongArrary(ids); - if (idsArr.Length <= 0) { return ToResponse(ApiResult.Error($"删除失败Id 不能为空")); } - var response = _ShopService.Delete(idsArr); - foreach (var item in ids) - { - await _ShopService.UpdateAsync(f => new Shop - { - ShopUserId = null, - ShopCustomerGuid = null - }, s => s.ShopUserId == item); - } - return SUCCESS("删除成功!"); - } - - - /// - /// 导出店铺 - /// - /// - [Log(Title = "店铺导出", BusinessType = BusinessType.EXPORT, IsSaveResponseData = false)] - [HttpGet("exportShop")] - [ActionPermissionFilter(Permission = "business:shop:export")] - public async Task ExportExcel([FromQuery] ShopQueryDto parm) - { - parm.PageSize = 10000; - var list = await _ShopService.GetShopList(parm); - var data = list.Result; - - // 选中数据 - if (!string.IsNullOrEmpty(parm.ids)) - { - int[] idsArr = Tools.SpitIntArrary(parm.ids); - var selectDataList = new List(); - foreach (var item in idsArr) - { - var select_data = data.Where(s => s.ShopId == item).First(); - selectDataList.Add(select_data); - } - data = selectDataList; - } - - - - // 导出数据处理 - var handleData = await _ShopService.HandleExportData(data); - - string sFileName = ExportExcel(handleData, "Shop", "店铺列表"); - return SUCCESS(new { path = "/export/" + sFileName, fileName = sFileName }); - } - - /// - /// 审核店铺 - /// - /// - [HttpPut("audit")] - [ActionPermissionFilter(Permission = "business:shop:audit")] - [Log(Title = "审核店铺", BusinessType = BusinessType.AUDIT)] - public async Task AuditShop([FromBody] ShopAuditDto param) - { - var user = JwtUtil.GetLoginUser(App.HttpContext); - int[] idsArr = Tools.SpitIntArrary(param.ids); - if (idsArr.Length <= 0) { return ToResponse(ApiResult.Error($"审核失败 Id 不能为空")); } - - var msgList = new List(); - foreach (var item in idsArr) - { - var msg = await _ShopService.Audit(item, param.ShopAuditStatus, user.UserId); - msgList.Add(msg); - } - - return SUCCESS(msgList.ToArray()); - } - - - - #region 商户管理 - - /// - /// 获取商户店铺详情 - /// - /// 查询参数 - /// - [HttpGet("getShopOperatorDetail")] - [ActionPermissionFilter(Permission = "business:shopOperator:detail")] - public async Task GetShopOperatorDetail([FromQuery] ShopOperatorQueryDto parm) - { - var user = JwtUtil.GetLoginUser(App.HttpContext); - var shop = await _ShopService.GetFirstAsync(s => s.ShopUserId == user.UserId); - if (shop == null) throw new Exception("当前用户没有店铺!"); - parm.ShopGuid = shop.ShopGuid; - - var res = await _ShopService.GetShopOperatorDetail(parm); - - if (res != "[]") - { - res = res.Remove(0, 1); - res = res.Substring(0, res.Length - 1); - var data = res.FromJSON(); - return SUCCESS(data); - } - else - { - return SUCCESS(res); - } - } - - - /// - /// 获取商户店铺详情 - /// - /// 查询参数 - /// - [HttpPost("editShopOperatorDetail")] - public async Task EditShopOperatorDetail([FromBody] ShopOperatorEditDto parm) - { - var user = JwtUtil.GetLoginUser(App.HttpContext); - var shop = await _ShopService.GetFirstAsync(s => s.ShopUserId == user.UserId); - - var res = await _ShopService.UpdateAsync(f => new Shop - { - ShopName = parm.ShopName, - ShopIntro = parm.ShopIntro, - ShopLogo = parm.ShopLogo - },s => s.ShopGuid == shop.ShopGuid); - - return SUCCESS(res); - } - - - #endregion - - - - } -} diff --git a/ARW.WebApi/appsettings.json b/ARW.WebApi/appsettings.json index 7b7d233..93c3acf 100644 --- a/ARW.WebApi/appsettings.json +++ b/ARW.WebApi/appsettings.json @@ -7,7 +7,7 @@ } }, "ConnectionStrings": { - "conn_db": "server=47.242.159.172;Database=micro_mall_demo;Uid=micro_mall_demo;Pwd=MC6brabBGEWrTDZZ;SslMode=none;CharSet=utf8mb4;AllowLoadLocalInfile=true;AllowUserVariables=true;", + "conn_db": "server=47.242.159.172;Database=xcx_temp;Uid=xcx_temp;Pwd=Wp8rNAKeKW3k4c3r;SslMode=none;CharSet=utf8mb4;AllowLoadLocalInfile=true;AllowUserVariables=true;", //"conn_db": "server=127.0.0.1;Database=shop;Uid=root;Pwd=root;SslMode=none;CharSet=utf8mb4;AllowLoadLocalInfile=true;AllowUserVariables=true;", "conn_db_type": "8" //数据库类型 MySql = 0, SqlServer = 1 }, @@ -41,13 +41,12 @@ "templateCode": "SMS_154950909" }, "gen": { - "conn": "server=47.242.159.172;Database=micro_mall_demo;Uid=micro_mall_demo;Pwd=MC6brabBGEWrTDZZ;SslMode=none;CharSet=utf8mb4;AllowLoadLocalInfile=true;AllowUserVariables=true;", - //"conn": "server=127.0.0.1;Database= micro_mall_demo;Uid=root;Pwd=root;SslMode=none;CharSet=utf8mb4;AllowLoadLocalInfile=true;AllowUserVariables=true;", + "conn": "server=47.242.159.172;Database=xcx_temp;Uid=xcx_temp;Pwd=Wp8rNAKeKW3k4c3r;SslMode=none;CharSet=utf8mb4;AllowLoadLocalInfile=true;AllowUserVariables=true;", "dbType": 8, //MySql = 0, SqlServer = 1 "autoPre": true, //自动去除表前缀 "author": "admin", "tablePrefix": "tb_", //"表前缀(生成类名不会包含表前缀,多个用逗号分隔)", - "vuePath": "D:\\.Net\\Aerwen\\micro_mall\\micro_mall_back" //前端代码存储路径eg:D:\Work\ARWAdmin-Vue3 + "vuePath": "D:\\.Net\\Aerwen\\xcx_temp\\xcx_temp_back" //前端代码存储路径eg:D:\Work\ARWAdmin-Vue3 }, //邮箱配置信息 "MailOptions": {