升级自定义交易组件常用商品接口,spu接口,品牌接口,订单接口,物流接口。

This commit is contained in:
大灰灰
2022-06-30 22:42:19 +08:00
parent 43a691d1be
commit dc408b8596
27 changed files with 1070 additions and 667 deletions

View File

@@ -18,8 +18,8 @@ using CoreCms.Net.IServices;
using CoreCms.Net.Model.Entities;
using CoreCms.Net.Model.Entities.Expression;
using CoreCms.Net.Model.FromBody;
using CoreCms.Net.Model.ViewModels.UI;
using CoreCms.Net.Model.ViewModels.DTO;
using CoreCms.Net.Model.ViewModels.UI;
using CoreCms.Net.Utility.Extensions;
using CoreCms.Net.Utility.Helper;
using Microsoft.AspNetCore.Authorization;
@@ -48,6 +48,8 @@ namespace CoreCms.Net.Web.WebApi.Controllers
private readonly ICoreCmsStoreServices _storeServices;
private readonly ICoreCmsOrderDistributionModelServices _orderDistributionModelServices;
/// <summary>
/// 构造函数
/// </summary>
@@ -76,8 +78,19 @@ namespace CoreCms.Net.Web.WebApi.Controllers
//公共接口====================================================================================================
//验证接口====================================================================================================
#region ==================================================
/// <summary>
/// 发票模糊查询
/// </summary>
/// <returns></returns>
[HttpPost]
[Authorize]
public async Task<WebApiCallBack> GetOrderTypeModel([FromBody] GetTaxCodePost entity)
{
var jm = await _orderServices.GetTaxCode(entity.name);
return jm;
}
#endregion
#region ==================================================
/// <summary>
@@ -115,6 +128,8 @@ namespace CoreCms.Net.Web.WebApi.Controllers
}
#endregion
//验证接口====================================================================================================
#region ==================================================
/// <summary>
/// 发票模糊查询
@@ -184,8 +199,8 @@ namespace CoreCms.Net.Web.WebApi.Controllers
jm = await _orderServices.ToAdd(_user.ID, entity.orderType, entity.cartIds, entity.receiptType,
entity.ushipId, entity.storeId, entity.ladingName, entity.ladingMobile, entity.memo,
entity.point, entity.couponCode, entity.source, entity.scene, entity.taxType, entity.taxName,
entity.taxCode, entity.objectId, entity.teamId);
jm.otherData = entity;
entity.taxCode, entity.objectId, entity.teamId, entity.requireOrder, entity.requiredFundType, entity.traceId);
//jm.otherData = entity;
return jm;
}
@@ -358,6 +373,7 @@ namespace CoreCms.Net.Web.WebApi.Controllers
}
jm = await _aftersalesServices.ToAdd(_user.ID, entity.orderId, entity.type, entity.items, entity.images,
entity.reason, entity.refund);
jm.otherData = entity;
return jm;
}
@@ -381,7 +397,7 @@ namespace CoreCms.Net.Web.WebApi.Controllers
var where = PredicateBuilder.True<CoreCmsBillAftersales>();
where = where.And(p => p.userId == _user.ID);
if (!string.IsNullOrEmpty(entity.order))
if (!string.IsNullOrEmpty(entity.id))
{
where = where.And(p => p.orderId == entity.id);
}