diff --git a/ARW.Model/Dto/Api/OrderManage/Orders/OrderApiDto.cs b/ARW.Model/Dto/Api/OrderManage/Orders/OrderApiDto.cs deleted file mode 100644 index d272212..0000000 --- a/ARW.Model/Dto/Api/OrderManage/Orders/OrderApiDto.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/OrderCoupon.cs b/ARW.Model/Dto/Api/OrderManage/Orders/OrderCoupon.cs index cad0b43..d272212 100644 --- a/ARW.Model/Dto/Api/OrderManage/Orders/OrderCoupon.cs +++ b/ARW.Model/Dto/Api/OrderManage/Orders/OrderCoupon.cs @@ -7,36 +7,16 @@ namespace ARW.Model.Dto.Api.OrderManage.Orders { /// - /// 订单查询对象Api + /// 订单优惠券对象Api /// /// @author lwh /// @date 2023-09-01 /// - public class OrderQueryDtoApi : PagerInfo + public class OrderCoupon { - public long CustomerGuid { get; set; } - public string OrderNumber { get; set; } - public int Status { 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 long ShopGuid { get; set; } + public int Key { 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/OrderDtoApi.cs b/ARW.Model/Dto/Api/OrderManage/Orders/OrderDtoApi.cs new file mode 100644 index 0000000..f1ddc26 --- /dev/null +++ b/ARW.Model/Dto/Api/OrderManage/Orders/OrderDtoApi.cs @@ -0,0 +1,36 @@ +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/Settings/PlatformSpecs/PlatformSpecApiDto.cs b/ARW.Model/Dto/Api/Settings/PlatformSpecs/PlatformSpecApiDto.cs new file mode 100644 index 0000000..babc627 --- /dev/null +++ b/ARW.Model/Dto/Api/Settings/PlatformSpecs/PlatformSpecApiDto.cs @@ -0,0 +1,33 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel.DataAnnotations; +using ARW.Model.Models.Business.Settings.PlatformSpecs; + +namespace ARW.Model.Dto.Api.Settings.PlatformSpecs +{ + + /// + /// 平台资质与规范查询对象Api + /// + /// @author lwh + /// @date 2023-10-22 + /// + public class PlatformSpecQueryDtoApi : PagerInfo + { + public string PlatformSpecTitle { get; set; } + } + + + /// + /// 平台资质与规范详情输入对象Api + /// + /// @author lwh + /// @date 2023-10-22 + /// + public class PlatformSpecDtoApi + { + [Required(ErrorMessage = "PlatformSpecGuid不能为空")] + public long PlatformSpecGuid { get; set; } + } + +} diff --git a/ARW.Model/Dto/Business/Settings/PlatformSpecs/PlatformSpecDto.cs b/ARW.Model/Dto/Business/Settings/PlatformSpecs/PlatformSpecDto.cs new file mode 100644 index 0000000..772250b --- /dev/null +++ b/ARW.Model/Dto/Business/Settings/PlatformSpecs/PlatformSpecDto.cs @@ -0,0 +1,54 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel.DataAnnotations; +using ARW.Model.Models.Business.Settings.PlatformSpecs; + +namespace ARW.Model.Dto.Business.Settings.PlatformSpecs +{ + /// + /// 平台资质与规范输入对象 + /// + /// @author lwh + /// @date 2023-10-22 + /// + public class PlatformSpecDto + { + + public int PlatformSpecId { get; set; } + + public long PlatformSpecGuid { get; set; } + + [Required(ErrorMessage = "标题不能为空")] + public string PlatformSpecTitle { get; set; } + + [Required(ErrorMessage = "内容不能为空")] + public string PlatformSpecContent { get; set; } + + [Required(ErrorMessage = "排序不能为空")] + public int PlatformSpecSort { get; set; } + + + + + + } + + + /// + /// 平台资质与规范查询对象 + /// + /// @author lwh + /// @date 2023-10-22 + /// + public class PlatformSpecQueryDto : PagerInfo + { + + public string PlatformSpecTitle { get; set; } + + public string ids { get; set; } + } + + + + +} diff --git a/ARW.Model/Models/Business/OrderManage/Orders/Order.cs b/ARW.Model/Models/Business/OrderManage/Orders/Order.cs index cdf4de6..5011d78 100644 --- a/ARW.Model/Models/Business/OrderManage/Orders/Order.cs +++ b/ARW.Model/Models/Business/OrderManage/Orders/Order.cs @@ -327,15 +327,5 @@ namespace ARW.Model.Models.Business.OrderManage.Orders [SugarColumn(ColumnName = "order_source")] public int OrderSource { get; set; } - - /// - /// 描述 :客户发货备注 - /// 空值 : false - /// - [EpplusTableColumn(Header = "客户发货备注")] - [SugarColumn(ColumnName = "customer_waybill_remark")] - public string CustomerWaybillRemark { get; set; } - - } } \ No newline at end of file diff --git a/ARW.Model/Models/Business/Settings/PlatformSpecs/PlatformSpec.cs b/ARW.Model/Models/Business/Settings/PlatformSpecs/PlatformSpec.cs new file mode 100644 index 0000000..e08ea5d --- /dev/null +++ b/ARW.Model/Models/Business/Settings/PlatformSpecs/PlatformSpec.cs @@ -0,0 +1,65 @@ +using System; +using System.Collections.Generic; +using SqlSugar; +using OfficeOpenXml.Attributes; +using Newtonsoft.Json; + +namespace ARW.Model.Models.Business.Settings.PlatformSpecs +{ + /// + /// 平台资质与规范,数据实体对象 + /// + /// @author lwh + /// @date 2023-10-22 + /// + [SugarTable("tb_platform_spec")] + public class PlatformSpec : BusinessBase + { + + /// + /// 描述 : + /// 空值 : false + /// + [SugarColumn(IsPrimaryKey = true, IsIdentity = true, ColumnName = "platform_spec_id")] + public int PlatformSpecId { get; set; } + + + /// + /// 描述 : + /// 空值 : false + /// + [JsonConverter(typeof(ValueToStringConverter))] + [SugarColumn(IsPrimaryKey = true, IsIdentity = false, ColumnName = "platform_spec_guid")] + public long PlatformSpecGuid { get; set; } + + + /// + /// 描述 :标题 + /// 空值 : false + /// + [SugarColumn(ColumnName = "platform_spec_title")] + public string PlatformSpecTitle { get; set; } + + + /// + /// 描述 :内容 + /// 空值 : false + /// + [SugarColumn(ColumnName = "platform_spec_content")] + public string PlatformSpecContent { get; set; } + + + /// + /// 描述 :排序 + /// 空值 : false + /// + [SugarColumn(ColumnName = "platform_spec_sort")] + public int PlatformSpecSort { 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 index 95414be..df49953 100644 --- a/ARW.Model/Vo/Api/Carts/CartApiVo.cs +++ b/ARW.Model/Vo/Api/Carts/CartApiVo.cs @@ -127,6 +127,12 @@ namespace ARW.Model.Vo.Api.Carts /// public int StockQuantity { get; set; } + + /// + /// Sku库存总数 + /// + public int SkuStockQuantity { get; set; } + /// /// 价格 /// diff --git a/ARW.Model/Vo/Api/OrderManage/OrderRefunds/OrderRefundApiDetailsVo.cs b/ARW.Model/Vo/Api/OrderManage/OrderRefunds/OrderRefundApiDetailsVo.cs index 8950470..01be983 100644 --- a/ARW.Model/Vo/Api/OrderManage/OrderRefunds/OrderRefundApiDetailsVo.cs +++ b/ARW.Model/Vo/Api/OrderManage/OrderRefunds/OrderRefundApiDetailsVo.cs @@ -100,6 +100,8 @@ namespace ARW.Model.Vo.Api.OrderManage.OrderRefunds public int Status { get; set; } + public string StatusName { get; set; } + /// /// 描述 :用户是否发货(1未发货 2已发货) @@ -157,6 +159,11 @@ namespace ARW.Model.Vo.Api.OrderManage.OrderRefunds /// 订单号 /// public string ExpressNo { get; set; } + + /// + /// 申请时间 + /// + public DateTime CreateTime { get; set; } } } diff --git a/ARW.Model/Vo/Api/Settings/PlatformSpecs/PlatformSpecApiVo.cs b/ARW.Model/Vo/Api/Settings/PlatformSpecs/PlatformSpecApiVo.cs new file mode 100644 index 0000000..18bc4d1 --- /dev/null +++ b/ARW.Model/Vo/Api/Settings/PlatformSpecs/PlatformSpecApiVo.cs @@ -0,0 +1,65 @@ +using Newtonsoft.Json; +using OfficeOpenXml.Attributes; +using SqlSugar; +using System; + +namespace ARW.Model.Vo.Api.Settings.PlatformSpecs +{ + /// + /// 平台资质与规范展示对象Api + /// + /// @author lwh + /// @date 2023-10-22 + /// + public class PlatformSpecVoApi + { + + + /// + /// 描述 : + /// + public int PlatformSpecId { get; set; } + + + /// + /// 描述 : + /// + [JsonConverter(typeof(ValueToStringConverter))] + public long PlatformSpecGuid { get; set; } + + + /// + /// 描述 :标题 + /// + public string PlatformSpecTitle { get; set; } + + + /// + /// 描述 :内容 + /// + public string PlatformSpecContent { get; set; } + + + /// + /// 描述 :排序 + /// + public int PlatformSpecSort { get; set; } + + } + + + /// + /// 平台资质与规范详情展示对象Api + /// + public class PlatformSpecApiDetailsVo + { + public int PlatformSpecId { get; set; } + [JsonConverter(typeof(ValueToStringConverter))] + public long PlatformSpecGuid { get; set; } + public string PlatformSpecTitle { get; set; } + public string PlatformSpecContent { get; set; } + public int PlatformSpecSort { get; set; } + + } + +} diff --git a/ARW.Model/Vo/Business/OrderManage/Orders/OrderDetailVo.cs b/ARW.Model/Vo/Business/OrderManage/Orders/OrderDetailVo.cs index bf9768f..c6b2b78 100644 --- a/ARW.Model/Vo/Business/OrderManage/Orders/OrderDetailVo.cs +++ b/ARW.Model/Vo/Business/OrderManage/Orders/OrderDetailVo.cs @@ -135,11 +135,6 @@ namespace ARW.Model.Vo.Business.OrderManage.Orders /// public OrderReceiveVo OrderReceive { get; set; } - - /// - /// 客户发货备注 - /// - public string CustomerWaybillRemark { get; set; } } } diff --git a/ARW.Model/Vo/Business/Settings/PlatformSpecs/PlatformSpecVo.cs b/ARW.Model/Vo/Business/Settings/PlatformSpecs/PlatformSpecVo.cs new file mode 100644 index 0000000..407ada0 --- /dev/null +++ b/ARW.Model/Vo/Business/Settings/PlatformSpecs/PlatformSpecVo.cs @@ -0,0 +1,49 @@ +using Newtonsoft.Json; +using OfficeOpenXml.Attributes; +using SqlSugar; +using System; + +namespace ARW.Model.Vo.Business.Settings.PlatformSpecs +{ + /// + /// 平台资质与规范展示对象 + /// + /// @author lwh + /// @date 2023-10-22 + /// + public class PlatformSpecVo + { + + + /// + /// 描述 : + /// + public int PlatformSpecId { get; set; } + + + /// + /// 描述 : + /// + [JsonConverter(typeof(ValueToStringConverter))] + public long PlatformSpecGuid { get; set; } + + + /// + /// 描述 :标题 + /// + public string PlatformSpecTitle { get; set; } + + + /// + /// 描述 :内容 + /// + public string PlatformSpecContent { get; set; } + + + /// + /// 描述 :排序 + /// + public int PlatformSpecSort { get; set; } + + } +} diff --git a/ARW.Repository/Business/Settings/PlatformSpecs/PlatformSpecRepository.cs b/ARW.Repository/Business/Settings/PlatformSpecs/PlatformSpecRepository.cs new file mode 100644 index 0000000..3802b5f --- /dev/null +++ b/ARW.Repository/Business/Settings/PlatformSpecs/PlatformSpecRepository.cs @@ -0,0 +1,20 @@ +using System; +using Infrastructure.Attribute; +using ARW.Repository.System; +using ARW.Model.Models.Business.Settings.PlatformSpecs; + +namespace ARW.Repository.Business.Settings.PlatformSpecs +{ + /// + /// 平台资质与规范仓储 + /// + /// @author lwh + /// @date 2023-10-22 + /// + [AppService(ServiceLifetime = LifeTime.Transient)] + public class PlatformSpecRepository : 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 index d166265..e2e5cf7 100644 --- a/ARW.Service/Api/BusinessService/Carts/CartServiceApi.cs +++ b/ARW.Service/Api/BusinessService/Carts/CartServiceApi.cs @@ -265,6 +265,7 @@ namespace ARW.Service.Api.BusinessService.Carts { goodsPromotion.Price = sku.GoodsSkuPrice; goodsPromotion.OriginPrice = sku.GoodsSkuLinePrice; + goodsPromotion.SkuStockQuantity = sku.GoodsSkuStockNum; if (!string.IsNullOrEmpty(sku.GoodsSkuImg)) goodsPromotion.Thumb = sku.GoodsSkuImg; diff --git a/ARW.Service/Api/BusinessService/OrderManage/OrderRefunds/OrderRefundServiceApi.cs b/ARW.Service/Api/BusinessService/OrderManage/OrderRefunds/OrderRefundServiceApi.cs index 08901e7..f3713db 100644 --- a/ARW.Service/Api/BusinessService/OrderManage/OrderRefunds/OrderRefundServiceApi.cs +++ b/ARW.Service/Api/BusinessService/OrderManage/OrderRefunds/OrderRefundServiceApi.cs @@ -257,7 +257,8 @@ namespace ARW.Service.Api.BusinessService.OrderManage.OrderRefunds CustomerRefundDesc = s.CustomerRefundDesc, CustomerRefundImg = s.CustomerRefundImg, LogisticsCompanyGuid = s.LogisticsCompanyGuid, - ExpressNo = s.ExpressNo + ExpressNo = s.ExpressNo, + CreateTime = s.Create_time }).Take(1); @@ -299,23 +300,28 @@ namespace ARW.Service.Api.BusinessService.OrderManage.OrderRefunds if (data.MerchantAuditStatus == 1) { data.Status = 1; + data.StatusName = "待审核"; data.EserRightsStatusDesc = "商家将尽快确认您的退款申请"; } // 已审核 if (data.MerchantAuditStatus == 2) { data.Status = 2; + data.StatusName = "已审核"; data.EserRightsStatusDesc = "商家已审核确认,预计1小时内发起退款"; } // 已发货 if (data.IsCustomerSend == 2) { data.Status = 3; + data.StatusName = "已发货"; data.EserRightsStatusDesc = "商家已退款,退回资金将原路三个工作日内返回您的账户"; } + // 已完成 if (data.OrderRefundStatus == 3) { data.Status = 4; + data.StatusName = "已完成"; data.EserRightsStatusDesc = "退款/售后己完成"; } diff --git a/ARW.Service/Api/BusinessService/Settings/PlatformSpecs/PlatformSpecServiceApi.cs b/ARW.Service/Api/BusinessService/Settings/PlatformSpecs/PlatformSpecServiceApi.cs new file mode 100644 index 0000000..b0427f0 --- /dev/null +++ b/ARW.Service/Api/BusinessService/Settings/PlatformSpecs/PlatformSpecServiceApi.cs @@ -0,0 +1,94 @@ +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.Settings.PlatformSpecs; +using ARW.Service.Api.IBusinessService.Settings.PlatformSpecs; +using ARW.Model.Dto.Api.Settings.PlatformSpecs; +using ARW.Model.Models.Business.Settings.PlatformSpecs; +using ARW.Model.Vo.Api.Settings.PlatformSpecs; + +namespace ARW.Service.Api.BusinessService.Settings.PlatformSpecs +{ + /// + /// 平台资质与规范接口实现类Api + /// + /// @author lwh + /// @date 2023-10-22 + /// + [AppService(ServiceType = typeof(IPlatformSpecServiceApi), ServiceLifetime = LifeTime.Transient)] + public class PlatformSpecServiceImplApi : BaseService, IPlatformSpecServiceApi + { + private readonly PlatformSpecRepository _PlatformSpecRepository; + + public PlatformSpecServiceImplApi(PlatformSpecRepository PlatformSpecRepository) + { + this._PlatformSpecRepository = PlatformSpecRepository; + } + + #region Api接口代码 + + + /// + /// 查询平台资质与规范列表(Api) + /// + /// + /// + public async Task> GetPlatformSpecListApi(PlatformSpecQueryDtoApi parm) + { + //开始拼装查询条件d + var predicate = Expressionable.Create(); + + predicate = predicate.AndIF(!string.IsNullOrEmpty(parm.PlatformSpecTitle), s => s.PlatformSpecTitle.Contains(parm.PlatformSpecTitle)); + var query = _PlatformSpecRepository + .Queryable() + .Where(predicate.ToExpression()) + .OrderBy(s => s.PlatformSpecSort, OrderByType.Asc) + .Select(s => new PlatformSpecVoApi + { + PlatformSpecId = s.PlatformSpecId, + PlatformSpecGuid = s.PlatformSpecGuid, + PlatformSpecTitle = s.PlatformSpecTitle, + PlatformSpecContent = s.PlatformSpecContent, + PlatformSpecSort = s.PlatformSpecSort, + }); + + + return await query.ToListAsync(); + } + + /// + /// 查询平台资质与规范详情(Api) + /// + /// + /// + public async Task GetPlatformSpecDetails(PlatformSpecDtoApi parm) + { + + var query = _PlatformSpecRepository + .Queryable() + .Where(s => s.PlatformSpecGuid == parm.PlatformSpecGuid) + .Select(s => new PlatformSpecApiDetailsVo + { + PlatformSpecId = s.PlatformSpecId, + PlatformSpecGuid = s.PlatformSpecGuid, + PlatformSpecTitle = s.PlatformSpecTitle, + PlatformSpecContent = s.PlatformSpecContent, + PlatformSpecSort = s.PlatformSpecSort, + }).Take(1); + + + return await query.ToJsonAsync(); + } + + + #endregion + + } +} diff --git a/ARW.Service/Api/IBusinessService/Settings/PlatformSpecs/IPlatformSpecServiceApi.cs b/ARW.Service/Api/IBusinessService/Settings/PlatformSpecs/IPlatformSpecServiceApi.cs new file mode 100644 index 0000000..31bea3d --- /dev/null +++ b/ARW.Service/Api/IBusinessService/Settings/PlatformSpecs/IPlatformSpecServiceApi.cs @@ -0,0 +1,36 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using ARW.Model; +using ARW.Model.Dto.Api.Settings.PlatformSpecs; +using ARW.Model.Models.Business.Settings.PlatformSpecs; +using ARW.Model.Vo.Api.Settings.PlatformSpecs; + +namespace ARW.Service.Api.IBusinessService.Settings.PlatformSpecs +{ + /// + /// 平台资质与规范接口类Api + /// + /// @author lwh + /// @date 2023-10-22 + /// + public interface IPlatformSpecServiceApi : IBaseService + { + /// + /// 获取平台资质与规范分页列表(Api) + /// + /// + /// + Task> GetPlatformSpecListApi(PlatformSpecQueryDtoApi parm); + + /// + /// 获取平台资质与规范详情(Api) + /// + /// + /// + Task GetPlatformSpecDetails(PlatformSpecDtoApi parm); + + } +} diff --git a/ARW.Service/Business/BusinessService/OrderManage/Orders/OrderService.cs b/ARW.Service/Business/BusinessService/OrderManage/Orders/OrderService.cs index f57ea51..94efe6c 100644 --- a/ARW.Service/Business/BusinessService/OrderManage/Orders/OrderService.cs +++ b/ARW.Service/Business/BusinessService/OrderManage/Orders/OrderService.cs @@ -170,7 +170,6 @@ namespace ARW.Service.Business.BusinessService.OrderManage.Orders IsComment = s.IsComment, OrderSource = s.OrderSource, CreateTime = s.Create_time, - CustomerWaybillRemark = s.CustomerWaybillRemark }).Take(1); var json = await query.ToJsonAsync(); diff --git a/ARW.Service/Business/BusinessService/Settings/PlatformSpecs/PlatformSpecService.cs b/ARW.Service/Business/BusinessService/Settings/PlatformSpecs/PlatformSpecService.cs new file mode 100644 index 0000000..7c1946f --- /dev/null +++ b/ARW.Service/Business/BusinessService/Settings/PlatformSpecs/PlatformSpecService.cs @@ -0,0 +1,93 @@ +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.Settings.PlatformSpecs; +using ARW.Service.Business.IBusinessService.Settings.PlatformSpecs; +using ARW.Model.Dto.Business.Settings.PlatformSpecs; +using ARW.Model.Models.Business.Settings.PlatformSpecs; +using ARW.Model.Vo.Business.Settings.PlatformSpecs; + +namespace ARW.Service.Business.BusinessService.Settings.PlatformSpecs +{ + /// + /// 平台资质与规范接口实现类 + /// + /// @author lwh + /// @date 2023-10-22 + /// + [AppService(ServiceType = typeof(IPlatformSpecService), ServiceLifetime = LifeTime.Transient)] + public class PlatformSpecServiceImpl : BaseService, IPlatformSpecService + { + private readonly PlatformSpecRepository _PlatformSpecRepository; + + public PlatformSpecServiceImpl(PlatformSpecRepository PlatformSpecRepository) + { + this._PlatformSpecRepository = PlatformSpecRepository; + } + + #region 业务逻辑代码 + + + /// + /// 查询平台资质与规范分页列表 + /// + public async Task> GetPlatformSpecList(PlatformSpecQueryDto parm) + { + //开始拼装查询条件d + var predicate = Expressionable.Create(); + + predicate = predicate.AndIF(!string.IsNullOrEmpty(parm.PlatformSpecTitle), s => s.PlatformSpecTitle.Contains(parm.PlatformSpecTitle)); + var query = _PlatformSpecRepository + .Queryable() + .Where(predicate.ToExpression()) + .OrderBy(s => s.PlatformSpecSort,OrderByType.Asc) + .Select(s => new PlatformSpecVo + { + PlatformSpecId = s.PlatformSpecId, + PlatformSpecGuid = s.PlatformSpecGuid, + PlatformSpecTitle = s.PlatformSpecTitle, + PlatformSpecContent = s.PlatformSpecContent, + PlatformSpecSort = s.PlatformSpecSort, + }); + + + return await query.ToPageAsync(parm); + } + + /// + /// 添加或修改平台资质与规范 + /// + public async Task AddOrUpdatePlatformSpec(PlatformSpec model) + { + if (model.PlatformSpecId != 0) + { + var response = await _PlatformSpecRepository.UpdateAsync(model); + return "修改成功!"; + } + else + { + + var response = await _PlatformSpecRepository.InsertReturnSnowflakeIdAsync(model); + return "添加成功!"; + } + } + + #region Excel处理 + + + #endregion + + + +#endregion + + } +} diff --git a/ARW.Service/Business/IBusinessService/Settings/PlatformSpecs/IPlatformSpecService.cs b/ARW.Service/Business/IBusinessService/Settings/PlatformSpecs/IPlatformSpecService.cs new file mode 100644 index 0000000..7c1162f --- /dev/null +++ b/ARW.Service/Business/IBusinessService/Settings/PlatformSpecs/IPlatformSpecService.cs @@ -0,0 +1,41 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using ARW.Model; +using ARW.Model.Dto.Business.Settings.PlatformSpecs; +using ARW.Model.Models.Business.Settings.PlatformSpecs; +using ARW.Model.Vo.Business.Settings.PlatformSpecs; + +namespace ARW.Service.Business.IBusinessService.Settings.PlatformSpecs +{ + /// + /// 平台资质与规范接口类 + /// + /// @author lwh + /// @date 2023-10-22 + /// + public interface IPlatformSpecService : IBaseService + { + /// + /// 获取平台资质与规范分页列表 + /// + /// + /// + Task> GetPlatformSpecList(PlatformSpecQueryDto parm); + + + /// + /// 添加或修改平台资质与规范 + /// + /// + /// + Task AddOrUpdatePlatformSpec(PlatformSpec parm); + + + + + + } +} diff --git a/ARW.WebApi/Controllers/Api/Settings/PlatformSpecs/PlatformSpecApiController.cs b/ARW.WebApi/Controllers/Api/Settings/PlatformSpecs/PlatformSpecApiController.cs new file mode 100644 index 0000000..9d5c24f --- /dev/null +++ b/ARW.WebApi/Controllers/Api/Settings/PlatformSpecs/PlatformSpecApiController.cs @@ -0,0 +1,81 @@ +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.Settings.PlatformSpecs; +using ARW.Service.Api.IBusinessService.Settings.PlatformSpecs; +using ARW.Model.Models.Business.Settings.PlatformSpecs; +using ARW.Model.Vo.Api.Settings.PlatformSpecs; +using Microsoft.AspNetCore.Authorization; +using Geocoding; + +namespace ARW.WebApi.Controllers.Api.Settings.PlatformSpecs +{ + /// + /// 平台资质与规范控制器Api + /// + /// @author lwh + /// @date 2023-10-22 + /// + //[Verify] + [Route("api/[controller]")] + public class PlatformSpecApiController : BaseController + { + private readonly IPlatformSpecServiceApi _PlatformSpecServiceApi; + + /// + /// 依赖注入 + /// + /// 平台资质与规范平台资质与规范Api服务 + public PlatformSpecApiController(IPlatformSpecServiceApi PlatformSpecServiceApi) + { + _PlatformSpecServiceApi = PlatformSpecServiceApi; + } + + + /// + /// 获取平台资质与规范列表(Api) + /// + /// 查询参数 + /// + [HttpGet("getPlatformSpecList")] + public async Task GetPlatformSpecListApi([FromQuery] PlatformSpecQueryDtoApi parm) + { + var res = await _PlatformSpecServiceApi.GetPlatformSpecListApi(parm); + return SUCCESS(res); + } + + /// + /// 获取PlatformSpec详情(Api) + /// + /// 查询参数 + /// + [HttpGet("getPlatformSpecDetails")] + public async Task GetPlatformSpecDetails([FromQuery] PlatformSpecDtoApi parm) + { + //if (parm == null) throw new CustomException("参数错误!"); + + var res = await _PlatformSpecServiceApi.GetPlatformSpecDetails(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/WeChatLoginController.cs b/ARW.WebApi/Controllers/Api/Wechat/WeChatLoginController.cs index 7f917e7..ac2305b 100644 --- a/ARW.WebApi/Controllers/Api/Wechat/WeChatLoginController.cs +++ b/ARW.WebApi/Controllers/Api/Wechat/WeChatLoginController.cs @@ -62,7 +62,7 @@ namespace ARW.WebApi.Controllers.Api.Wechat { string appId = AppSettings.GetConfig("SenparcWeixinSetting:TenPayV3_AppId"); string appSecret = AppSettings.GetConfig("SenparcWeixinSetting:TenPayV3_AppSecret"); - string openid = await GetOpenIDAsync(parm.CustomerXcxOpenidCode, appId, appSecret); + //string openid = await GetOpenIDAsync(parm.CustomerXcxOpenidCode, appId, appSecret); // 客户默认头像 addModal.CustomerAvatar = "https://cdn-we-retail.ym.tencent.com/miniapp/usercenter/icon-user-center-avatar@2x.png"; @@ -70,7 +70,7 @@ namespace ARW.WebApi.Controllers.Api.Wechat addModal.CustomerGender = 1; addModal.CustomerType = 1; addModal.CustomerLastLoginTime = DateTime.Now; - addModal.CustomerXcxOpenid = openid; + addModal.CustomerXcxOpenid = parm.CustomerXcxOpenidCode; var response = await _customerService.InsertReturnSnowflakeIdAsync(addModal); if (response == 0) { diff --git a/ARW.WebApi/Controllers/Business/Settings/PlatformSpecs/PlatformSpecController.cs b/ARW.WebApi/Controllers/Business/Settings/PlatformSpecs/PlatformSpecController.cs new file mode 100644 index 0000000..463b5da --- /dev/null +++ b/ARW.WebApi/Controllers/Business/Settings/PlatformSpecs/PlatformSpecController.cs @@ -0,0 +1,98 @@ +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.Settings.PlatformSpecs; +using ARW.Service.Business.IBusinessService.Settings.PlatformSpecs; +using ARW.Admin.WebApi.Controllers; +using ARW.Model.Models.Business.Settings.PlatformSpecs; +using ARW.Model.Vo.Business.Settings.PlatformSpecs; +using Microsoft.AspNetCore.Authorization; +using ARW.Admin.WebApi.Framework; + + +namespace ARW.WebApi.Controllers.Business.Settings.PlatformSpecs +{ + /// + /// 平台资质与规范控制器 + /// + /// @author lwh + /// @date 2023-10-22 + /// + [Verify] + [Route("business/[controller]")] + public class PlatformSpecController : BaseController + { + private readonly IPlatformSpecService _PlatformSpecService; + + /// + /// 依赖注入 + /// + /// 平台资质与规范服务 + public PlatformSpecController(IPlatformSpecService PlatformSpecService) + { + _PlatformSpecService = PlatformSpecService; + } + + + /// + /// 获取平台资质与规范列表 + /// + /// 查询参数 + /// + [HttpGet("getPlatformSpecList")] + [ActionPermissionFilter(Permission = "business:platformspec:list")] + public async Task GetPlatformSpecList([FromQuery] PlatformSpecQueryDto parm) + { + var res = await _PlatformSpecService.GetPlatformSpecList(parm); + return SUCCESS(res); + } + + /// + /// 添加或修改平台资质与规范 + /// + /// + /// + [HttpPost("addOrUpdatePlatformSpec")] + [ActionPermissionFilter(Permission = "business:platformspec:addOrUpdate")] + [Log(Title = "添加或修改平台资质与规范", BusinessType = BusinessType.ADDORUPDATE)] + public async Task AddOrUpdatePlatformSpec([FromBody] PlatformSpecDto parm) + { + if (parm == null) { throw new CustomException("请求参数错误"); } + + var modal = new PlatformSpec(); + if (parm.PlatformSpecId != 0) modal = parm.Adapt().ToUpdate(HttpContext); + else modal = parm.Adapt().ToCreate(HttpContext); + + var res = await _PlatformSpecService.AddOrUpdatePlatformSpec(modal); + return SUCCESS(res); + } + + /// + /// 删除平台资质与规范 + /// + /// + [HttpDelete("{ids}")] + [ActionPermissionFilter(Permission = "business:platformspec: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 = _PlatformSpecService.Delete(idsArr); + return SUCCESS("删除成功!"); + } + + + + + + + } +}