mirror of
http://git.coreshop.cn/jianweie/coreshoppro.git
synced 2025-12-06 18:03:27 +08:00
【新增】新增【微信发货信息管理】功能对接。实现微信小程序二次发货功能平移到后台业务,减少繁琐的二次发货操作。
This commit is contained in:
@@ -13,6 +13,7 @@ using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Linq.Expressions;
|
||||
using System.Threading.Tasks;
|
||||
using CoreCms.Net.Caching.AutoMate.RedisCache;
|
||||
using CoreCms.Net.Configuration;
|
||||
using CoreCms.Net.IRepository;
|
||||
using CoreCms.Net.IRepository.UnitOfWork;
|
||||
@@ -61,6 +62,7 @@ namespace CoreCms.Net.Services
|
||||
private readonly ICoreCmsTopUpTypeServices _topUpTypeServices;
|
||||
private readonly ICoreCmsUserPointLogServices _userPointLogServices;
|
||||
private readonly WeChatOptions _weChatOptions;
|
||||
private readonly IRedisOperationRepository _redisOperationRepository;
|
||||
|
||||
|
||||
|
||||
@@ -77,7 +79,7 @@ namespace CoreCms.Net.Services
|
||||
, IServiceProvider serviceProvider, ICoreCmsServicesServices servicesServices
|
||||
, ICoreCmsUserServicesOrderServices userServicesOrderServices
|
||||
, ICoreCmsUserWeChatInfoServices userWeChatInfoServices
|
||||
, IOptions<WeChatOptions> weChatOptions, ICoreCmsTopUpTypeServices topUpTypeServices, ICoreCmsUserPointLogServices userPointLogServices)
|
||||
, IOptions<WeChatOptions> weChatOptions, ICoreCmsTopUpTypeServices topUpTypeServices, ICoreCmsUserPointLogServices userPointLogServices, IRedisOperationRepository redisOperationRepository)
|
||||
{
|
||||
this._dal = dal;
|
||||
base.BaseDal = dal;
|
||||
@@ -97,6 +99,7 @@ namespace CoreCms.Net.Services
|
||||
_userWeChatInfoServices = userWeChatInfoServices;
|
||||
_topUpTypeServices = topUpTypeServices;
|
||||
_userPointLogServices = userPointLogServices;
|
||||
_redisOperationRepository = redisOperationRepository;
|
||||
_weChatOptions = weChatOptions.Value;
|
||||
}
|
||||
|
||||
@@ -126,7 +129,6 @@ namespace CoreCms.Net.Services
|
||||
|| type == (int)GlobalEnumVars.BillPaymentsType.Bargain
|
||||
|| type == (int)GlobalEnumVars.BillPaymentsType.Giveaway
|
||||
|| type == (int)GlobalEnumVars.BillPaymentsType.Solitaire
|
||||
|| type == (int)GlobalEnumVars.BillPaymentsType.TransactionComponent
|
||||
)
|
||||
{
|
||||
//如果是订单生成支付单的话,取第一条订单的店铺id,后面的所有订单都要保证是此店铺的id
|
||||
@@ -286,7 +288,6 @@ namespace CoreCms.Net.Services
|
||||
|| type == (int)GlobalEnumVars.BillPaymentsType.Bargain
|
||||
|| type == (int)GlobalEnumVars.BillPaymentsType.Giveaway
|
||||
|| type == (int)GlobalEnumVars.BillPaymentsType.Solitaire
|
||||
|| type == (int)GlobalEnumVars.BillPaymentsType.TransactionComponent
|
||||
)
|
||||
{
|
||||
//如果是订单生成支付单的话,取第一条订单的店铺id,后面的所有订单都要保证是此店铺的id
|
||||
@@ -694,7 +695,6 @@ namespace CoreCms.Net.Services
|
||||
|| billPaymentInfo.type == (int)GlobalEnumVars.BillPaymentsType.Bargain
|
||||
|| billPaymentInfo.type == (int)GlobalEnumVars.BillPaymentsType.Giveaway
|
||||
|| billPaymentInfo.type == (int)GlobalEnumVars.BillPaymentsType.Solitaire
|
||||
|| billPaymentInfo.type == (int)GlobalEnumVars.BillPaymentsType.TransactionComponent
|
||||
)
|
||||
{
|
||||
//如果是订单类型,做支付后处理
|
||||
@@ -733,6 +733,10 @@ namespace CoreCms.Net.Services
|
||||
{
|
||||
//::todo 其他业务逻辑
|
||||
}
|
||||
|
||||
//微信发货信息管理API发货
|
||||
await _redisOperationRepository.ListLeftPushAsync(RedisMessageQueueKey.WeChatPayShipping, billPaymentInfo.paymentId);
|
||||
|
||||
}
|
||||
jm.status = true;
|
||||
jm.data = paymentId;
|
||||
@@ -792,7 +796,7 @@ namespace CoreCms.Net.Services
|
||||
|| entity.type == (int)GlobalEnumVars.BillPaymentsType.Bargain
|
||||
|| entity.type == (int)GlobalEnumVars.BillPaymentsType.Giveaway
|
||||
|| entity.type == (int)GlobalEnumVars.BillPaymentsType.Solitaire
|
||||
|| entity.type == (int)GlobalEnumVars.BillPaymentsType.TransactionComponent)
|
||||
)
|
||||
{
|
||||
var orderItem = await _orderItemServices.QueryByClauseAsync(p => p.orderId == entity.sourceId);
|
||||
if (orderItem != null)
|
||||
@@ -852,7 +856,6 @@ namespace CoreCms.Net.Services
|
||||
|| type == (int)GlobalEnumVars.BillPaymentsType.Bargain
|
||||
|| type == (int)GlobalEnumVars.BillPaymentsType.Giveaway
|
||||
|| type == (int)GlobalEnumVars.BillPaymentsType.Solitaire
|
||||
|| type == (int)GlobalEnumVars.BillPaymentsType.TransactionComponent
|
||||
)
|
||||
{
|
||||
var orderInfo = await orderServices.QueryByIdAsync(orderId);
|
||||
|
||||
Reference in New Issue
Block a user