feat 添加平台资质与规范管理接口
This commit is contained in:
parent
cc5600c6f7
commit
b604980938
@ -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
|
|
||||||
{
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// 订单优惠券对象Api
|
|
||||||
///
|
|
||||||
/// @author lwh
|
|
||||||
/// @date 2023-09-01
|
|
||||||
/// </summary>
|
|
||||||
public class OrderCoupon
|
|
||||||
{
|
|
||||||
public long ShopGuid { get; set; }
|
|
||||||
public int Key { get; set; }
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
@ -7,36 +7,16 @@ namespace ARW.Model.Dto.Api.OrderManage.Orders
|
|||||||
{
|
{
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 订单查询对象Api
|
/// 订单优惠券对象Api
|
||||||
///
|
///
|
||||||
/// @author lwh
|
/// @author lwh
|
||||||
/// @date 2023-09-01
|
/// @date 2023-09-01
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public class OrderQueryDtoApi : PagerInfo
|
public class OrderCoupon
|
||||||
{
|
{
|
||||||
public long CustomerGuid { get; set; }
|
public long ShopGuid { get; set; }
|
||||||
public string OrderNumber { get; set; }
|
public int Key { 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; }
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// 订单详情输入对象Api
|
|
||||||
///
|
|
||||||
/// @author lwh
|
|
||||||
/// @date 2023-09-01
|
|
||||||
/// </summary>
|
|
||||||
public class OrderDtoApi
|
|
||||||
{
|
|
||||||
[Required(ErrorMessage = "OrderGuid不能为空")]
|
|
||||||
public long OrderGuid { get; set; }
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
36
ARW.Model/Dto/Api/OrderManage/Orders/OrderDtoApi.cs
Normal file
36
ARW.Model/Dto/Api/OrderManage/Orders/OrderDtoApi.cs
Normal file
@ -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
|
||||||
|
{
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 订单查询对象Api
|
||||||
|
///
|
||||||
|
/// @author lwh
|
||||||
|
/// @date 2023-09-01
|
||||||
|
/// </summary>
|
||||||
|
public class OrderQueryDtoApi : PagerInfo
|
||||||
|
{
|
||||||
|
public long CustomerGuid { get; set; }
|
||||||
|
public string OrderNumber { get; set; }
|
||||||
|
public int Status { get; set; }
|
||||||
|
public string LogisticsTrackingNumber { get; set; }
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 订单详情输入对象Api
|
||||||
|
///
|
||||||
|
/// @author lwh
|
||||||
|
/// @date 2023-09-01
|
||||||
|
/// </summary>
|
||||||
|
public class OrderDtoApi
|
||||||
|
{
|
||||||
|
[Required(ErrorMessage = "OrderGuid不能为空")]
|
||||||
|
public long OrderGuid { get; set; }
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
@ -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
|
||||||
|
{
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 平台资质与规范查询对象Api
|
||||||
|
///
|
||||||
|
/// @author lwh
|
||||||
|
/// @date 2023-10-22
|
||||||
|
/// </summary>
|
||||||
|
public class PlatformSpecQueryDtoApi : PagerInfo
|
||||||
|
{
|
||||||
|
public string PlatformSpecTitle { get; set; }
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 平台资质与规范详情输入对象Api
|
||||||
|
///
|
||||||
|
/// @author lwh
|
||||||
|
/// @date 2023-10-22
|
||||||
|
/// </summary>
|
||||||
|
public class PlatformSpecDtoApi
|
||||||
|
{
|
||||||
|
[Required(ErrorMessage = "PlatformSpecGuid不能为空")]
|
||||||
|
public long PlatformSpecGuid { get; set; }
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
@ -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
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// 平台资质与规范输入对象
|
||||||
|
///
|
||||||
|
/// @author lwh
|
||||||
|
/// @date 2023-10-22
|
||||||
|
/// </summary>
|
||||||
|
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; }
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 平台资质与规范查询对象
|
||||||
|
///
|
||||||
|
/// @author lwh
|
||||||
|
/// @date 2023-10-22
|
||||||
|
/// </summary>
|
||||||
|
public class PlatformSpecQueryDto : PagerInfo
|
||||||
|
{
|
||||||
|
|
||||||
|
public string PlatformSpecTitle { get; set; }
|
||||||
|
|
||||||
|
public string ids { get; set; }
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
@ -327,15 +327,5 @@ namespace ARW.Model.Models.Business.OrderManage.Orders
|
|||||||
[SugarColumn(ColumnName = "order_source")]
|
[SugarColumn(ColumnName = "order_source")]
|
||||||
public int OrderSource { get; set; }
|
public int OrderSource { get; set; }
|
||||||
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// 描述 :客户发货备注
|
|
||||||
/// 空值 : false
|
|
||||||
/// </summary>
|
|
||||||
[EpplusTableColumn(Header = "客户发货备注")]
|
|
||||||
[SugarColumn(ColumnName = "customer_waybill_remark")]
|
|
||||||
public string CustomerWaybillRemark { get; set; }
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -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
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// 平台资质与规范,数据实体对象
|
||||||
|
///
|
||||||
|
/// @author lwh
|
||||||
|
/// @date 2023-10-22
|
||||||
|
/// </summary>
|
||||||
|
[SugarTable("tb_platform_spec")]
|
||||||
|
public class PlatformSpec : BusinessBase
|
||||||
|
{
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 描述 :
|
||||||
|
/// 空值 : false
|
||||||
|
/// </summary>
|
||||||
|
[SugarColumn(IsPrimaryKey = true, IsIdentity = true, ColumnName = "platform_spec_id")]
|
||||||
|
public int PlatformSpecId { get; set; }
|
||||||
|
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 描述 :
|
||||||
|
/// 空值 : false
|
||||||
|
/// </summary>
|
||||||
|
[JsonConverter(typeof(ValueToStringConverter))]
|
||||||
|
[SugarColumn(IsPrimaryKey = true, IsIdentity = false, ColumnName = "platform_spec_guid")]
|
||||||
|
public long PlatformSpecGuid { get; set; }
|
||||||
|
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 描述 :标题
|
||||||
|
/// 空值 : false
|
||||||
|
/// </summary>
|
||||||
|
[SugarColumn(ColumnName = "platform_spec_title")]
|
||||||
|
public string PlatformSpecTitle { get; set; }
|
||||||
|
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 描述 :内容
|
||||||
|
/// 空值 : false
|
||||||
|
/// </summary>
|
||||||
|
[SugarColumn(ColumnName = "platform_spec_content")]
|
||||||
|
public string PlatformSpecContent { get; set; }
|
||||||
|
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 描述 :排序
|
||||||
|
/// 空值 : false
|
||||||
|
/// </summary>
|
||||||
|
[SugarColumn(ColumnName = "platform_spec_sort")]
|
||||||
|
public int PlatformSpecSort { get; set; }
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
@ -127,6 +127,12 @@ namespace ARW.Model.Vo.Api.Carts
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public int StockQuantity { get; set; }
|
public int StockQuantity { get; set; }
|
||||||
|
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Sku库存总数
|
||||||
|
/// </summary>
|
||||||
|
public int SkuStockQuantity { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 价格
|
/// 价格
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
@ -100,6 +100,8 @@ namespace ARW.Model.Vo.Api.OrderManage.OrderRefunds
|
|||||||
public int Status { get; set; }
|
public int Status { get; set; }
|
||||||
|
|
||||||
|
|
||||||
|
public string StatusName { get; set; }
|
||||||
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 描述 :用户是否发货(1未发货 2已发货)
|
/// 描述 :用户是否发货(1未发货 2已发货)
|
||||||
@ -157,6 +159,11 @@ namespace ARW.Model.Vo.Api.OrderManage.OrderRefunds
|
|||||||
/// 订单号
|
/// 订单号
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public string ExpressNo { get; set; }
|
public string ExpressNo { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 申请时间
|
||||||
|
/// </summary>
|
||||||
|
public DateTime CreateTime { get; set; }
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
65
ARW.Model/Vo/Api/Settings/PlatformSpecs/PlatformSpecApiVo.cs
Normal file
65
ARW.Model/Vo/Api/Settings/PlatformSpecs/PlatformSpecApiVo.cs
Normal file
@ -0,0 +1,65 @@
|
|||||||
|
using Newtonsoft.Json;
|
||||||
|
using OfficeOpenXml.Attributes;
|
||||||
|
using SqlSugar;
|
||||||
|
using System;
|
||||||
|
|
||||||
|
namespace ARW.Model.Vo.Api.Settings.PlatformSpecs
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// 平台资质与规范展示对象Api
|
||||||
|
///
|
||||||
|
/// @author lwh
|
||||||
|
/// @date 2023-10-22
|
||||||
|
/// </summary>
|
||||||
|
public class PlatformSpecVoApi
|
||||||
|
{
|
||||||
|
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 描述 :
|
||||||
|
/// </summary>
|
||||||
|
public int PlatformSpecId { get; set; }
|
||||||
|
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 描述 :
|
||||||
|
/// </summary>
|
||||||
|
[JsonConverter(typeof(ValueToStringConverter))]
|
||||||
|
public long PlatformSpecGuid { get; set; }
|
||||||
|
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 描述 :标题
|
||||||
|
/// </summary>
|
||||||
|
public string PlatformSpecTitle { get; set; }
|
||||||
|
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 描述 :内容
|
||||||
|
/// </summary>
|
||||||
|
public string PlatformSpecContent { get; set; }
|
||||||
|
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 描述 :排序
|
||||||
|
/// </summary>
|
||||||
|
public int PlatformSpecSort { get; set; }
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 平台资质与规范详情展示对象Api
|
||||||
|
/// </summary>
|
||||||
|
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; }
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
@ -135,11 +135,6 @@ namespace ARW.Model.Vo.Business.OrderManage.Orders
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public OrderReceiveVo OrderReceive { get; set; }
|
public OrderReceiveVo OrderReceive { get; set; }
|
||||||
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// 客户发货备注
|
|
||||||
/// </summary>
|
|
||||||
public string CustomerWaybillRemark { get; set; }
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -0,0 +1,49 @@
|
|||||||
|
using Newtonsoft.Json;
|
||||||
|
using OfficeOpenXml.Attributes;
|
||||||
|
using SqlSugar;
|
||||||
|
using System;
|
||||||
|
|
||||||
|
namespace ARW.Model.Vo.Business.Settings.PlatformSpecs
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// 平台资质与规范展示对象
|
||||||
|
///
|
||||||
|
/// @author lwh
|
||||||
|
/// @date 2023-10-22
|
||||||
|
/// </summary>
|
||||||
|
public class PlatformSpecVo
|
||||||
|
{
|
||||||
|
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 描述 :
|
||||||
|
/// </summary>
|
||||||
|
public int PlatformSpecId { get; set; }
|
||||||
|
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 描述 :
|
||||||
|
/// </summary>
|
||||||
|
[JsonConverter(typeof(ValueToStringConverter))]
|
||||||
|
public long PlatformSpecGuid { get; set; }
|
||||||
|
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 描述 :标题
|
||||||
|
/// </summary>
|
||||||
|
public string PlatformSpecTitle { get; set; }
|
||||||
|
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 描述 :内容
|
||||||
|
/// </summary>
|
||||||
|
public string PlatformSpecContent { get; set; }
|
||||||
|
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 描述 :排序
|
||||||
|
/// </summary>
|
||||||
|
public int PlatformSpecSort { get; set; }
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
@ -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
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// 平台资质与规范仓储
|
||||||
|
///
|
||||||
|
/// @author lwh
|
||||||
|
/// @date 2023-10-22
|
||||||
|
/// </summary>
|
||||||
|
[AppService(ServiceLifetime = LifeTime.Transient)]
|
||||||
|
public class PlatformSpecRepository : BaseRepository<PlatformSpec>
|
||||||
|
{
|
||||||
|
#region 业务逻辑代码
|
||||||
|
#endregion
|
||||||
|
}
|
||||||
|
}
|
@ -265,6 +265,7 @@ namespace ARW.Service.Api.BusinessService.Carts
|
|||||||
{
|
{
|
||||||
goodsPromotion.Price = sku.GoodsSkuPrice;
|
goodsPromotion.Price = sku.GoodsSkuPrice;
|
||||||
goodsPromotion.OriginPrice = sku.GoodsSkuLinePrice;
|
goodsPromotion.OriginPrice = sku.GoodsSkuLinePrice;
|
||||||
|
goodsPromotion.SkuStockQuantity = sku.GoodsSkuStockNum;
|
||||||
if (!string.IsNullOrEmpty(sku.GoodsSkuImg))
|
if (!string.IsNullOrEmpty(sku.GoodsSkuImg))
|
||||||
goodsPromotion.Thumb = sku.GoodsSkuImg;
|
goodsPromotion.Thumb = sku.GoodsSkuImg;
|
||||||
|
|
||||||
|
@ -257,7 +257,8 @@ namespace ARW.Service.Api.BusinessService.OrderManage.OrderRefunds
|
|||||||
CustomerRefundDesc = s.CustomerRefundDesc,
|
CustomerRefundDesc = s.CustomerRefundDesc,
|
||||||
CustomerRefundImg = s.CustomerRefundImg,
|
CustomerRefundImg = s.CustomerRefundImg,
|
||||||
LogisticsCompanyGuid = s.LogisticsCompanyGuid,
|
LogisticsCompanyGuid = s.LogisticsCompanyGuid,
|
||||||
ExpressNo = s.ExpressNo
|
ExpressNo = s.ExpressNo,
|
||||||
|
CreateTime = s.Create_time
|
||||||
}).Take(1);
|
}).Take(1);
|
||||||
|
|
||||||
|
|
||||||
@ -299,23 +300,28 @@ namespace ARW.Service.Api.BusinessService.OrderManage.OrderRefunds
|
|||||||
if (data.MerchantAuditStatus == 1)
|
if (data.MerchantAuditStatus == 1)
|
||||||
{
|
{
|
||||||
data.Status = 1;
|
data.Status = 1;
|
||||||
|
data.StatusName = "待审核";
|
||||||
data.EserRightsStatusDesc = "商家将尽快确认您的退款申请";
|
data.EserRightsStatusDesc = "商家将尽快确认您的退款申请";
|
||||||
}
|
}
|
||||||
// 已审核
|
// 已审核
|
||||||
if (data.MerchantAuditStatus == 2)
|
if (data.MerchantAuditStatus == 2)
|
||||||
{
|
{
|
||||||
data.Status = 2;
|
data.Status = 2;
|
||||||
|
data.StatusName = "已审核";
|
||||||
data.EserRightsStatusDesc = "商家已审核确认,预计1小时内发起退款";
|
data.EserRightsStatusDesc = "商家已审核确认,预计1小时内发起退款";
|
||||||
}
|
}
|
||||||
// 已发货
|
// 已发货
|
||||||
if (data.IsCustomerSend == 2)
|
if (data.IsCustomerSend == 2)
|
||||||
{
|
{
|
||||||
data.Status = 3;
|
data.Status = 3;
|
||||||
|
data.StatusName = "已发货";
|
||||||
data.EserRightsStatusDesc = "商家已退款,退回资金将原路三个工作日内返回您的账户";
|
data.EserRightsStatusDesc = "商家已退款,退回资金将原路三个工作日内返回您的账户";
|
||||||
}
|
}
|
||||||
|
// 已完成
|
||||||
if (data.OrderRefundStatus == 3)
|
if (data.OrderRefundStatus == 3)
|
||||||
{
|
{
|
||||||
data.Status = 4;
|
data.Status = 4;
|
||||||
|
data.StatusName = "已完成";
|
||||||
data.EserRightsStatusDesc = "退款/售后己完成";
|
data.EserRightsStatusDesc = "退款/售后己完成";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -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
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// 平台资质与规范接口实现类Api
|
||||||
|
///
|
||||||
|
/// @author lwh
|
||||||
|
/// @date 2023-10-22
|
||||||
|
/// </summary>
|
||||||
|
[AppService(ServiceType = typeof(IPlatformSpecServiceApi), ServiceLifetime = LifeTime.Transient)]
|
||||||
|
public class PlatformSpecServiceImplApi : BaseService<PlatformSpec>, IPlatformSpecServiceApi
|
||||||
|
{
|
||||||
|
private readonly PlatformSpecRepository _PlatformSpecRepository;
|
||||||
|
|
||||||
|
public PlatformSpecServiceImplApi(PlatformSpecRepository PlatformSpecRepository)
|
||||||
|
{
|
||||||
|
this._PlatformSpecRepository = PlatformSpecRepository;
|
||||||
|
}
|
||||||
|
|
||||||
|
#region Api接口代码
|
||||||
|
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 查询平台资质与规范列表(Api)
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="parm"></param>
|
||||||
|
/// <returns></returns>
|
||||||
|
public async Task<List<PlatformSpecVoApi>> GetPlatformSpecListApi(PlatformSpecQueryDtoApi parm)
|
||||||
|
{
|
||||||
|
//开始拼装查询条件d
|
||||||
|
var predicate = Expressionable.Create<PlatformSpec>();
|
||||||
|
|
||||||
|
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();
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 查询平台资质与规范详情(Api)
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="parm"></param>
|
||||||
|
/// <returns></returns>
|
||||||
|
public async Task<string> 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
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
@ -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
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// 平台资质与规范接口类Api
|
||||||
|
///
|
||||||
|
/// @author lwh
|
||||||
|
/// @date 2023-10-22
|
||||||
|
/// </summary>
|
||||||
|
public interface IPlatformSpecServiceApi : IBaseService<PlatformSpec>
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// 获取平台资质与规范分页列表(Api)
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="parm"></param>
|
||||||
|
/// <returns></returns>
|
||||||
|
Task<List<PlatformSpecVoApi>> GetPlatformSpecListApi(PlatformSpecQueryDtoApi parm);
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 获取平台资质与规范详情(Api)
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="parm"></param>
|
||||||
|
/// <returns></returns>
|
||||||
|
Task<string> GetPlatformSpecDetails(PlatformSpecDtoApi parm);
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
@ -170,7 +170,6 @@ namespace ARW.Service.Business.BusinessService.OrderManage.Orders
|
|||||||
IsComment = s.IsComment,
|
IsComment = s.IsComment,
|
||||||
OrderSource = s.OrderSource,
|
OrderSource = s.OrderSource,
|
||||||
CreateTime = s.Create_time,
|
CreateTime = s.Create_time,
|
||||||
CustomerWaybillRemark = s.CustomerWaybillRemark
|
|
||||||
}).Take(1);
|
}).Take(1);
|
||||||
|
|
||||||
var json = await query.ToJsonAsync();
|
var json = await query.ToJsonAsync();
|
||||||
|
@ -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
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// 平台资质与规范接口实现类
|
||||||
|
///
|
||||||
|
/// @author lwh
|
||||||
|
/// @date 2023-10-22
|
||||||
|
/// </summary>
|
||||||
|
[AppService(ServiceType = typeof(IPlatformSpecService), ServiceLifetime = LifeTime.Transient)]
|
||||||
|
public class PlatformSpecServiceImpl : BaseService<PlatformSpec>, IPlatformSpecService
|
||||||
|
{
|
||||||
|
private readonly PlatformSpecRepository _PlatformSpecRepository;
|
||||||
|
|
||||||
|
public PlatformSpecServiceImpl(PlatformSpecRepository PlatformSpecRepository)
|
||||||
|
{
|
||||||
|
this._PlatformSpecRepository = PlatformSpecRepository;
|
||||||
|
}
|
||||||
|
|
||||||
|
#region 业务逻辑代码
|
||||||
|
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 查询平台资质与规范分页列表
|
||||||
|
/// </summary>
|
||||||
|
public async Task<PagedInfo<PlatformSpecVo>> GetPlatformSpecList(PlatformSpecQueryDto parm)
|
||||||
|
{
|
||||||
|
//开始拼装查询条件d
|
||||||
|
var predicate = Expressionable.Create<PlatformSpec>();
|
||||||
|
|
||||||
|
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);
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 添加或修改平台资质与规范
|
||||||
|
/// </summary>
|
||||||
|
public async Task<string> 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
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
@ -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
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// 平台资质与规范接口类
|
||||||
|
///
|
||||||
|
/// @author lwh
|
||||||
|
/// @date 2023-10-22
|
||||||
|
/// </summary>
|
||||||
|
public interface IPlatformSpecService : IBaseService<PlatformSpec>
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// 获取平台资质与规范分页列表
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="parm"></param>
|
||||||
|
/// <returns></returns>
|
||||||
|
Task<PagedInfo<PlatformSpecVo>> GetPlatformSpecList(PlatformSpecQueryDto parm);
|
||||||
|
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 添加或修改平台资质与规范
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="parm"></param>
|
||||||
|
/// <returns></returns>
|
||||||
|
Task<string> AddOrUpdatePlatformSpec(PlatformSpec parm);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
@ -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
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// 平台资质与规范控制器Api
|
||||||
|
///
|
||||||
|
/// @author lwh
|
||||||
|
/// @date 2023-10-22
|
||||||
|
/// </summary>
|
||||||
|
//[Verify]
|
||||||
|
[Route("api/[controller]")]
|
||||||
|
public class PlatformSpecApiController : BaseController
|
||||||
|
{
|
||||||
|
private readonly IPlatformSpecServiceApi _PlatformSpecServiceApi;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 依赖注入
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="PlatformSpecServiceApi">平台资质与规范平台资质与规范Api服务</param>
|
||||||
|
public PlatformSpecApiController(IPlatformSpecServiceApi PlatformSpecServiceApi)
|
||||||
|
{
|
||||||
|
_PlatformSpecServiceApi = PlatformSpecServiceApi;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 获取平台资质与规范列表(Api)
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="parm">查询参数</param>
|
||||||
|
/// <returns></returns>
|
||||||
|
[HttpGet("getPlatformSpecList")]
|
||||||
|
public async Task<IActionResult> GetPlatformSpecListApi([FromQuery] PlatformSpecQueryDtoApi parm)
|
||||||
|
{
|
||||||
|
var res = await _PlatformSpecServiceApi.GetPlatformSpecListApi(parm);
|
||||||
|
return SUCCESS(res);
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 获取PlatformSpec详情(Api)
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="parm">查询参数</param>
|
||||||
|
/// <returns></returns>
|
||||||
|
[HttpGet("getPlatformSpecDetails")]
|
||||||
|
public async Task<IActionResult> 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<PlatformSpecApiDetailsVo>();
|
||||||
|
return SUCCESS(data);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
return SUCCESS(res);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
@ -62,7 +62,7 @@ namespace ARW.WebApi.Controllers.Api.Wechat
|
|||||||
{
|
{
|
||||||
string appId = AppSettings.GetConfig("SenparcWeixinSetting:TenPayV3_AppId");
|
string appId = AppSettings.GetConfig("SenparcWeixinSetting:TenPayV3_AppId");
|
||||||
string appSecret = AppSettings.GetConfig("SenparcWeixinSetting:TenPayV3_AppSecret");
|
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";
|
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.CustomerGender = 1;
|
||||||
addModal.CustomerType = 1;
|
addModal.CustomerType = 1;
|
||||||
addModal.CustomerLastLoginTime = DateTime.Now;
|
addModal.CustomerLastLoginTime = DateTime.Now;
|
||||||
addModal.CustomerXcxOpenid = openid;
|
addModal.CustomerXcxOpenid = parm.CustomerXcxOpenidCode;
|
||||||
var response = await _customerService.InsertReturnSnowflakeIdAsync(addModal);
|
var response = await _customerService.InsertReturnSnowflakeIdAsync(addModal);
|
||||||
if (response == 0)
|
if (response == 0)
|
||||||
{
|
{
|
||||||
|
@ -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
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// 平台资质与规范控制器
|
||||||
|
///
|
||||||
|
/// @author lwh
|
||||||
|
/// @date 2023-10-22
|
||||||
|
/// </summary>
|
||||||
|
[Verify]
|
||||||
|
[Route("business/[controller]")]
|
||||||
|
public class PlatformSpecController : BaseController
|
||||||
|
{
|
||||||
|
private readonly IPlatformSpecService _PlatformSpecService;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 依赖注入
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="PlatformSpecService">平台资质与规范服务</param>
|
||||||
|
public PlatformSpecController(IPlatformSpecService PlatformSpecService)
|
||||||
|
{
|
||||||
|
_PlatformSpecService = PlatformSpecService;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 获取平台资质与规范列表
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="parm">查询参数</param>
|
||||||
|
/// <returns></returns>
|
||||||
|
[HttpGet("getPlatformSpecList")]
|
||||||
|
[ActionPermissionFilter(Permission = "business:platformspec:list")]
|
||||||
|
public async Task<IActionResult> GetPlatformSpecList([FromQuery] PlatformSpecQueryDto parm)
|
||||||
|
{
|
||||||
|
var res = await _PlatformSpecService.GetPlatformSpecList(parm);
|
||||||
|
return SUCCESS(res);
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 添加或修改平台资质与规范
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="parm"></param>
|
||||||
|
/// <returns></returns>
|
||||||
|
[HttpPost("addOrUpdatePlatformSpec")]
|
||||||
|
[ActionPermissionFilter(Permission = "business:platformspec:addOrUpdate")]
|
||||||
|
[Log(Title = "添加或修改平台资质与规范", BusinessType = BusinessType.ADDORUPDATE)]
|
||||||
|
public async Task<IActionResult> AddOrUpdatePlatformSpec([FromBody] PlatformSpecDto parm)
|
||||||
|
{
|
||||||
|
if (parm == null) { throw new CustomException("请求参数错误"); }
|
||||||
|
|
||||||
|
var modal = new PlatformSpec();
|
||||||
|
if (parm.PlatformSpecId != 0) modal = parm.Adapt<PlatformSpec>().ToUpdate(HttpContext);
|
||||||
|
else modal = parm.Adapt<PlatformSpec>().ToCreate(HttpContext);
|
||||||
|
|
||||||
|
var res = await _PlatformSpecService.AddOrUpdatePlatformSpec(modal);
|
||||||
|
return SUCCESS(res);
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 删除平台资质与规范
|
||||||
|
/// </summary>
|
||||||
|
/// <returns></returns>
|
||||||
|
[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("删除成功!");
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user