mirror of
http://git.coreshop.cn/jianweie/coreshoppro.git
synced 2025-12-06 22:43:25 +08:00
【新增】增加DTO类库,将逐步完善dto层。 【修复】修复【分类】切换后,切换回来未清零原始数据,导致更新数据重复的问题。 【调整】移除模板库功能,防止出现审核因为模板库页面存在而导致的审核失败。暂将模板库的代码存放到会员QQ群内,方便下载使用。 【调整】代码生成器【Repository.tpl】移除Cache手动增删改,【SqlSugarSetup】增加sqlsugar自动检测增删改后清理二级缓存。 【调整】后端新增秒杀独立组件,用于区分团购及秒杀的差异,首页新增秒杀组件。 【优化】重写首页所有组件样式及接口数据获取效率。 【优化】优化拼团,秒杀,团购,接龙数据获取逻辑,提升列表及详情页面数据获取效率。 【优化】调整拼团,秒杀,团购,服务商品推广海报为新式海报效果。增加服务商品推广海报。 【优化】清理h5相关代码判断,移除h5支付组件,提高响应速度。 【优化】移除小程序前端冗余代码。加快代码执行效率。
666 lines
23 KiB
C#
666 lines
23 KiB
C#
/***********************************************************************
|
|
* Project: CoreCms
|
|
* ProjectName: 核心内容管理系统
|
|
* Web: https://www.corecms.net
|
|
* Author: 大灰灰
|
|
* Email: jianweie@163.com
|
|
* CreateTime: 2021/1/31 21:45:10
|
|
* Description: 暂无
|
|
***********************************************************************/
|
|
|
|
|
|
using System;
|
|
using System.Linq;
|
|
using System.Threading.Tasks;
|
|
using CoreCms.Net.Auth.HttpContextUser;
|
|
using CoreCms.Net.Caching.AutoMate.RedisCache;
|
|
using CoreCms.Net.Configuration;
|
|
using CoreCms.Net.IServices;
|
|
using CoreCms.Net.Loging;
|
|
using CoreCms.Net.Model.Entities;
|
|
using CoreCms.Net.Model.Entities.Expression;
|
|
using CoreCms.Net.Model.FromBody;
|
|
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;
|
|
using Microsoft.AspNetCore.Mvc;
|
|
using Newtonsoft.Json;
|
|
using SqlSugar;
|
|
|
|
namespace CoreCms.Net.Web.WebApi.Controllers
|
|
{
|
|
/// <summary>
|
|
/// 订单调用接口数据
|
|
/// </summary>
|
|
[Route("api/[controller]/[action]")]
|
|
[ApiController]
|
|
public class OrderController : ControllerBase
|
|
{
|
|
private readonly IHttpContextUser _user;
|
|
private readonly ICoreCmsOrderServices _orderServices;
|
|
private readonly ICoreCmsBillAftersalesServices _aftersalesServices;
|
|
private readonly ICoreCmsSettingServices _settingServices;
|
|
private readonly ICoreCmsAreaServices _areaServices;
|
|
private readonly ICoreCmsBillReshipServices _reshipServices;
|
|
private readonly ICoreCmsShipServices _shipServices;
|
|
private readonly ICoreCmsBillDeliveryServices _billDeliveryServices;
|
|
private readonly ICoreCmsLogisticsServices _logisticsServices;
|
|
private readonly ICoreCmsGoodsServices _goodsServices;
|
|
private readonly ICoreCmsStoreServices _storeServices;
|
|
private readonly ICoreCmsOrderDistributionModelServices _orderDistributionModelServices;
|
|
private readonly ICoreCmsBillPaymentsServices _billPaymentsServices;
|
|
private readonly IRedisOperationRepository _redisOperationRepository;
|
|
|
|
|
|
|
|
/// <summary>
|
|
/// 构造函数
|
|
/// </summary>
|
|
public OrderController(IHttpContextUser user
|
|
, ICoreCmsOrderServices orderServices
|
|
, ICoreCmsBillAftersalesServices aftersalesServices
|
|
, ICoreCmsSettingServices settingServices
|
|
, ICoreCmsAreaServices areaServices
|
|
, ICoreCmsBillReshipServices reshipServices, ICoreCmsShipServices shipServices
|
|
, ICoreCmsBillDeliveryServices billDeliveryServices, ICoreCmsLogisticsServices logisticsServices, ICoreCmsGoodsServices goodsServices, ICoreCmsStoreServices storeServices, ICoreCmsOrderDistributionModelServices orderDistributionModelServices, IRedisOperationRepository redisOperationRepository, ICoreCmsBillPaymentsServices billPaymentsServices)
|
|
{
|
|
_user = user;
|
|
_orderServices = orderServices;
|
|
_aftersalesServices = aftersalesServices;
|
|
_settingServices = settingServices;
|
|
_areaServices = areaServices;
|
|
_reshipServices = reshipServices;
|
|
_shipServices = shipServices;
|
|
_billDeliveryServices = billDeliveryServices;
|
|
_logisticsServices = logisticsServices;
|
|
_goodsServices = goodsServices;
|
|
_storeServices = storeServices;
|
|
_orderDistributionModelServices = orderDistributionModelServices;
|
|
_redisOperationRepository = redisOperationRepository;
|
|
_billPaymentsServices = billPaymentsServices;
|
|
}
|
|
|
|
|
|
//公共接口====================================================================================================
|
|
|
|
#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>
|
|
/// 获取不同类型营销下单支持的配送方式
|
|
/// </summary>
|
|
/// <returns></returns>
|
|
[HttpPost]
|
|
[Authorize]
|
|
public async Task<WebApiCallBack> GetOrderDistributionModel([FromBody] FMIntId entity)
|
|
{
|
|
var jm = new WebApiCallBack() { status = true };
|
|
|
|
var cache = await _orderDistributionModelServices.GetCaChe();
|
|
var model = cache.Find(p => p.orderType == entity.id);
|
|
if (model == null)
|
|
{
|
|
jm.data = new
|
|
{
|
|
isOpenMailing = true,
|
|
isOpenHomeDelivery = true,
|
|
isOpenSelfDelivery = true
|
|
};
|
|
}
|
|
else
|
|
{
|
|
jm.data = new
|
|
{
|
|
model.isOpenMailing,
|
|
model.isOpenHomeDelivery,
|
|
model.isOpenSelfDelivery
|
|
};
|
|
}
|
|
|
|
return jm;
|
|
}
|
|
#endregion
|
|
|
|
//验证接口====================================================================================================
|
|
|
|
#region 发票模糊查询==================================================
|
|
/// <summary>
|
|
/// 发票模糊查询
|
|
/// </summary>
|
|
/// <returns></returns>
|
|
[HttpPost]
|
|
[Authorize]
|
|
public async Task<WebApiCallBack> GetTaxCode([FromBody] GetTaxCodePost entity)
|
|
{
|
|
var jm = await _orderServices.GetTaxCode(entity.name);
|
|
return jm;
|
|
}
|
|
#endregion
|
|
|
|
#region 创建订单==================================================
|
|
/// <summary>
|
|
/// 创建订单
|
|
/// </summary>
|
|
/// <returns></returns>
|
|
[HttpPost]
|
|
[Authorize]
|
|
public async Task<WebApiCallBack> CreateOrder([FromBody] CreateOrder entity)
|
|
{
|
|
var jm = new WebApiCallBack();
|
|
|
|
var lockKey = "LOCK_CreateOrder:user_" + _user.ID;
|
|
var lockHolder = Guid.NewGuid().ToString("N"); //锁持有者
|
|
var redisUserLock = await _redisOperationRepository.LockTakeAsync(lockKey, lockHolder, TimeSpan.FromSeconds(10));
|
|
if (redisUserLock)
|
|
{
|
|
try
|
|
{
|
|
var type = entity.receiptType;
|
|
switch (type)
|
|
{
|
|
case (int)GlobalEnumVars.OrderReceiptType.Logistics:
|
|
case (int)GlobalEnumVars.OrderReceiptType.IntraCityService:
|
|
{
|
|
//收货地址id
|
|
if (entity.ushipId == 0)
|
|
{
|
|
jm.data = 13001;
|
|
jm.msg = GlobalErrorCodeVars.Code13001;
|
|
}
|
|
break;
|
|
}
|
|
case (int)GlobalEnumVars.OrderReceiptType.SelfDelivery:
|
|
{
|
|
//提货门店
|
|
if (entity.storeId == 0)
|
|
{
|
|
jm.data = 13001;
|
|
jm.msg = GlobalErrorCodeVars.Code13001;
|
|
}
|
|
|
|
//提货人姓名 提货人电话
|
|
if (string.IsNullOrEmpty(entity.ladingName))
|
|
{
|
|
jm.data = 13001;
|
|
jm.msg = "请输入姓名";
|
|
}
|
|
|
|
if (string.IsNullOrEmpty(entity.ladingMobile))
|
|
{
|
|
jm.data = 13001;
|
|
jm.msg = "请输入电话";
|
|
}
|
|
break;
|
|
}
|
|
default:
|
|
jm.data = 13001;
|
|
jm.msg = "未查询到配送方式";
|
|
break;
|
|
}
|
|
|
|
if (string.IsNullOrEmpty(entity.cartIds))
|
|
{
|
|
jm.data = 10000;
|
|
jm.msg = GlobalErrorCodeVars.Code10000;
|
|
}
|
|
|
|
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, entity.requireOrder, entity.requiredFundType,
|
|
entity.traceId);
|
|
}
|
|
catch (Exception e)
|
|
{
|
|
jm.msg = "数据处理异常";
|
|
jm.otherData = e;
|
|
}
|
|
finally
|
|
{
|
|
await _redisOperationRepository.LockReleaseAsync(lockKey, lockHolder);
|
|
}
|
|
}
|
|
else
|
|
{
|
|
jm.msg = "当前请求太频繁_请稍后再试";
|
|
}
|
|
return jm;
|
|
}
|
|
#endregion
|
|
|
|
#region 订单预览==================================================
|
|
/// <summary>
|
|
/// 订单预览
|
|
/// </summary>
|
|
/// <returns></returns>
|
|
[HttpPost]
|
|
[Authorize]
|
|
public async Task<WebApiCallBack> OrderDetails([FromBody] FMStringId entity)
|
|
{
|
|
var jm = new WebApiCallBack();
|
|
|
|
var userId = _user.ID;
|
|
if ((string)entity.data == "merchant")
|
|
{
|
|
var store = await _storeServices.GetStoreByUserId(_user.ID);
|
|
if (store == null)
|
|
{
|
|
jm.status = false;
|
|
jm.msg = "你不是店员";
|
|
return jm;
|
|
}
|
|
else
|
|
{
|
|
userId = 0;
|
|
}
|
|
}
|
|
jm = await _orderServices.GetOrderInfoByOrderId(entity.id, userId);
|
|
return jm;
|
|
}
|
|
#endregion
|
|
|
|
#region 订单是否支付状态查询==================================================
|
|
/// <summary>
|
|
/// 订单预览
|
|
/// </summary>
|
|
/// <returns></returns>
|
|
[HttpPost]
|
|
[Authorize]
|
|
public async Task<WebApiCallBack> CheckOrderIsPaid([FromBody] FMStringId entity)
|
|
{
|
|
var jm = new WebApiCallBack();
|
|
|
|
var lockKey = "LOCK_CheckOrderIsPaid:user_" + _user.ID;
|
|
var lockHolder = Guid.NewGuid().ToString("N"); //锁持有者
|
|
var redisUserLock = await _redisOperationRepository.LockTakeAsync(lockKey, lockHolder, TimeSpan.FromSeconds(5));
|
|
if (redisUserLock)
|
|
{
|
|
try
|
|
{
|
|
if (string.IsNullOrEmpty(entity.id))
|
|
{
|
|
jm.msg = "支付单编号不能为空";
|
|
return jm;
|
|
}
|
|
var bl = await _orderServices.ExistsAsync(p => p.orderId == entity.id && (p.payStatus == (int)GlobalEnumVars.OrderPayStatus.Yes || p.payStatus == (int)GlobalEnumVars.OrderPayStatus.PartialYes), true);
|
|
jm.status = true;
|
|
jm.data = bl;
|
|
}
|
|
catch (Exception e)
|
|
{
|
|
jm.msg = "数据处理异常";
|
|
jm.otherData = e;
|
|
NLogUtil.WriteFileLog(NLog.LogLevel.Error, LogType.ApiRequest, "用户支付支付", JsonConvert.SerializeObject(jm));
|
|
}
|
|
finally
|
|
{
|
|
await _redisOperationRepository.LockReleaseAsync(lockKey, lockHolder);
|
|
}
|
|
}
|
|
else
|
|
{
|
|
jm.msg = "当前请求太频繁_请稍后再试";
|
|
}
|
|
return jm;
|
|
}
|
|
#endregion
|
|
|
|
#region 获取订单不同状态的数量==================================================
|
|
/// <summary>
|
|
/// 获取订单不同状态的数量
|
|
/// </summary>
|
|
/// <returns></returns>
|
|
[HttpPost]
|
|
[Authorize]
|
|
public async Task<WebApiCallBack> GetOrderStatusNum([FromBody] GetOrderStatusNumPost entity)
|
|
{
|
|
var jm = new WebApiCallBack();
|
|
|
|
if (string.IsNullOrEmpty(entity.ids))
|
|
{
|
|
jm.msg = "请提交要查询的订单统计类型";
|
|
}
|
|
var ids = CommonHelper.StringToIntArray(entity.ids);
|
|
jm = await _orderServices.GetOrderStatusNum(_user.ID, ids, entity.isAfterSale);
|
|
return jm;
|
|
|
|
}
|
|
#endregion
|
|
|
|
#region 获取个人订单列表=======================================================
|
|
|
|
/// <summary>
|
|
/// 获取个人订单列表
|
|
/// </summary>
|
|
/// <returns></returns>
|
|
[HttpPost]
|
|
[Authorize]
|
|
public async Task<WebApiCallBack> GetOrderList([FromBody] GetOrderListPost entity)
|
|
{
|
|
var jm = await _orderServices.GetOrderList(entity.status, _user.ID, entity.page, entity.limit);
|
|
return jm;
|
|
}
|
|
|
|
#endregion
|
|
|
|
#region 取消订单====================================================
|
|
|
|
/// <summary>
|
|
/// 取消订单
|
|
/// </summary>
|
|
/// <returns></returns>
|
|
[HttpPost]
|
|
[Authorize]
|
|
public async Task<WebApiCallBack> CancelOrder([FromBody] FMStringId entity)
|
|
{
|
|
var jm = new WebApiCallBack();
|
|
|
|
if (string.IsNullOrEmpty(entity.id))
|
|
{
|
|
jm.msg = "请提交要取消的订单号";
|
|
return jm;
|
|
}
|
|
var ids = entity.id.Split(",");
|
|
jm = await _orderServices.CancelOrder(ids, _user.ID);
|
|
return jm;
|
|
|
|
}
|
|
#endregion
|
|
|
|
#region 删除订单====================================================
|
|
|
|
/// <summary>
|
|
/// 删除订单
|
|
/// </summary>
|
|
/// <returns></returns>
|
|
[HttpPost]
|
|
[Authorize]
|
|
public async Task<WebApiCallBack> DeleteOrder([FromBody] FMStringId entity)
|
|
{
|
|
var jm = new WebApiCallBack();
|
|
|
|
if (string.IsNullOrEmpty(entity.id))
|
|
{
|
|
jm.msg = "请提交要取消的订单号";
|
|
return jm;
|
|
}
|
|
var ids = entity.id.Split(",");
|
|
jm.status = await _orderServices.DeleteAsync(p => ids.Contains(p.orderId) && p.userId == _user.ID);
|
|
jm.msg = jm.status ? "删除成功" : "删除失败";
|
|
return jm;
|
|
|
|
}
|
|
#endregion
|
|
|
|
#region 确认签收订单====================================================
|
|
/// <summary>
|
|
/// 确认签收订单
|
|
/// </summary>
|
|
/// <returns></returns>
|
|
[HttpPost]
|
|
[Authorize]
|
|
public async Task<WebApiCallBack> OrderConfirm([FromBody] FMStringId entity)
|
|
{
|
|
var jm = new WebApiCallBack();
|
|
|
|
if (string.IsNullOrEmpty(entity.id))
|
|
{
|
|
jm.msg = "请提交要确认签收的订单号";
|
|
return jm;
|
|
}
|
|
jm = await _orderServices.ConfirmOrder(entity.id, Convert.ToInt32(entity.data));
|
|
return jm;
|
|
|
|
}
|
|
#endregion
|
|
|
|
#region 添加售后单=======================================================
|
|
|
|
/// <summary>
|
|
/// 添加售后单
|
|
/// </summary>
|
|
/// <returns></returns>
|
|
[HttpPost]
|
|
[Authorize]
|
|
public async Task<WebApiCallBack> AddAftersales([FromBody] ToAddBillAfterSalesPost entity)
|
|
{
|
|
var jm = new WebApiCallBack();
|
|
|
|
jm.otherData = entity;
|
|
if (string.IsNullOrEmpty(entity.orderId))
|
|
{
|
|
jm.msg = GlobalErrorCodeVars.Code13100;
|
|
jm.code = 13100;
|
|
return jm;
|
|
}
|
|
if (entity.type == 0)
|
|
{
|
|
jm.msg = GlobalErrorCodeVars.Code10051;
|
|
jm.code = 10051;
|
|
return jm;
|
|
}
|
|
jm = await _aftersalesServices.ToAdd(_user.ID, entity.orderId, entity.type, entity.items, entity.images,
|
|
entity.reason, entity.refund);
|
|
jm.otherData = entity;
|
|
return jm;
|
|
|
|
}
|
|
|
|
#endregion
|
|
|
|
#region 获取售后单列表=======================================================
|
|
|
|
/// <summary>
|
|
/// 获取售后单列表
|
|
/// </summary>
|
|
/// <returns></returns>
|
|
[HttpPost]
|
|
[Authorize]
|
|
public async Task<WebApiCallBack> AftersalesList([FromBody] FMPageByStringId entity)
|
|
{
|
|
var jm = new WebApiCallBack();
|
|
|
|
jm.status = true;
|
|
jm.msg = "数据获取成功";
|
|
|
|
var where = PredicateBuilder.True<CoreCmsBillAftersales>();
|
|
where = where.And(p => p.userId == _user.ID);
|
|
if (!string.IsNullOrEmpty(entity.id))
|
|
{
|
|
where = where.And(p => p.orderId == entity.id);
|
|
}
|
|
var data = await _aftersalesServices.QueryPageAsync(where, p => p.createTime, OrderByType.Desc, entity.page, entity.limit);
|
|
|
|
jm.data = new
|
|
{
|
|
list = data,
|
|
page = data.PageIndex,
|
|
totalPage = data.TotalPages,
|
|
hasNextPage = data.HasNextPage
|
|
};
|
|
|
|
return jm;
|
|
|
|
}
|
|
|
|
#endregion
|
|
|
|
#region 获取单个售后单详情
|
|
|
|
/// <summary>
|
|
/// 获取售后单列表
|
|
/// </summary>
|
|
/// <returns></returns>
|
|
[HttpPost]
|
|
[Authorize]
|
|
public async Task<WebApiCallBack> Aftersalesinfo([FromBody] FMStringId entity)
|
|
{
|
|
var jm = new WebApiCallBack { status = true, msg = "数据获取成功" };
|
|
|
|
var info = await _aftersalesServices.GetInfo(entity.id, _user.ID);
|
|
|
|
var allConfigs = await _settingServices.GetConfigDictionaries();
|
|
|
|
var reshipAddress = CommonHelper.GetConfigDictionary(allConfigs, SystemSettingConstVars.ReshipAddress);
|
|
var reshipArea = string.Empty;
|
|
var reshipId = CommonHelper.GetConfigDictionary(allConfigs, SystemSettingConstVars.ReshipAreaId).ObjectToInt(0);
|
|
if (reshipId > 0)
|
|
{
|
|
var result = await _areaServices.GetAreaFullName(reshipId);
|
|
if (result.status)
|
|
{
|
|
reshipArea = result.data.ToString();
|
|
}
|
|
}
|
|
var reshipMobile = CommonHelper.GetConfigDictionary(allConfigs, SystemSettingConstVars.ReshipMobile);
|
|
var reshipName = CommonHelper.GetConfigDictionary(allConfigs, SystemSettingConstVars.ReshipName);
|
|
var reship = new
|
|
{
|
|
reshipAddress,
|
|
reshipArea,
|
|
reshipMobile,
|
|
reshipName
|
|
};
|
|
|
|
jm.data = new
|
|
{
|
|
info,
|
|
reship
|
|
};
|
|
return jm;
|
|
|
|
}
|
|
|
|
#endregion
|
|
|
|
#region 提交售后发货快递信息
|
|
|
|
/// <summary>
|
|
/// 提交售后发货快递信息
|
|
/// </summary>
|
|
/// <returns></returns>
|
|
[HttpPost]
|
|
[Authorize]
|
|
public async Task<WebApiCallBack> SendReship([FromBody] FMBillReshipForSendReshipPost entity)
|
|
{
|
|
var jm = new WebApiCallBack();
|
|
|
|
if (string.IsNullOrEmpty(entity.reshipId))
|
|
{
|
|
jm.data = jm.msg = GlobalErrorCodeVars.Code13212;
|
|
return jm;
|
|
}
|
|
else if (string.IsNullOrEmpty(entity.logiCode))
|
|
{
|
|
jm.data = jm.msg = GlobalErrorCodeVars.Code13213;
|
|
return jm;
|
|
}
|
|
else if (string.IsNullOrEmpty(entity.logiNo))
|
|
{
|
|
jm.data = jm.msg = GlobalErrorCodeVars.Code13214;
|
|
return jm;
|
|
}
|
|
|
|
|
|
var model = await _reshipServices.QueryByIdAsync(entity.reshipId);
|
|
if (model == null)
|
|
{
|
|
jm.data = jm.msg = GlobalErrorCodeVars.Code13211;
|
|
return jm;
|
|
}
|
|
|
|
var up = await _reshipServices.UpdateAsync(
|
|
p => new CoreCmsBillReship()
|
|
{
|
|
logiCode = entity.logiCode,
|
|
logiNo = entity.logiNo,
|
|
status = (int)GlobalEnumVars.BillReshipStatus.运输中
|
|
}, p => p.reshipId == entity.reshipId);
|
|
|
|
jm.status = true;
|
|
jm.msg = "数据保存成功";
|
|
|
|
return jm;
|
|
}
|
|
|
|
#endregion
|
|
|
|
#region 获取配送方式列表=======================================================
|
|
|
|
/// <summary>
|
|
/// 获取配送方式列表
|
|
/// </summary>
|
|
/// <returns></returns>
|
|
[HttpPost]
|
|
[Authorize]
|
|
public WebApiCallBack GetShip([FromBody] FMIntId entity)
|
|
{
|
|
var jm = new WebApiCallBack();
|
|
|
|
jm.msg = "暂未设置配送方式";
|
|
|
|
var ship = _shipServices.GetShip(entity.id);
|
|
if (ship != null)
|
|
{
|
|
jm.status = true;
|
|
jm.data = ship;
|
|
jm.msg = "获取成功";
|
|
}
|
|
return jm;
|
|
|
|
}
|
|
|
|
#endregion
|
|
|
|
#region 前台物流查询接口=======================================================
|
|
|
|
/// <summary>
|
|
/// 前台物流查询接口
|
|
/// </summary>
|
|
/// <returns></returns>
|
|
[HttpPost]
|
|
[Authorize]
|
|
public async Task<WebApiCallBack> LogisticsByApi([FromBody] FMApiLogisticsByApiPost entity)
|
|
{
|
|
var jm = new WebApiCallBack();
|
|
|
|
if (string.IsNullOrEmpty(entity.code) || string.IsNullOrEmpty(entity.no))
|
|
{
|
|
jm.msg = GlobalErrorCodeVars.Code13225;
|
|
return jm;
|
|
}
|
|
|
|
var systemLogistics = SystemSettingDictionary.GetSystemLogistics();
|
|
foreach (var p in systemLogistics)
|
|
{
|
|
if (entity.code == p.sKey)
|
|
{
|
|
jm.msg = p.sDescription + "不支持轨迹查询";
|
|
return jm;
|
|
}
|
|
}
|
|
|
|
jm = await _logisticsServices.ExpressPoll(entity.code, entity.no, entity.mobile);
|
|
return jm;
|
|
}
|
|
|
|
#endregion
|
|
|
|
|
|
|
|
}
|
|
} |