liaoxujun@qq.com
2024-03-22 d856b2d3c85f39a2908de47ad1934e34805591e4
CoreCms.Net.Services/Order/CoreCmsOrderServices.cs
@@ -1,10 +1,10 @@
/***********************************************************************
 *            Project: CoreCms
 *        ProjectName: 核心内容管理系统
 *                Web: https://www.corecms.net
 *             Author: 大灰灰
 *              Email: jianweie@163.com
 *         CreateTime: 2021/1/31 21:45:10
 *            Project: baifenBinfa
 *        ProjectName: 百分兵法管理系统
 *                Web: http://chuanyin.com
 *             Author:
 *              Email:
 *         CreateTime: 202403/02
 *        Description: 暂无
 ***********************************************************************/
@@ -38,6 +38,7 @@
using SKIT.FlurlHttpClient.Wechat.Api.Models;
using SqlSugar;
using Yitter.IdGenerator;
using static SKIT.FlurlHttpClient.Wechat.Api.Models.ChannelsECLeagueHeadSupplierOrderGetResponse.Types.CommssionOrder.Types.OrderDetail.Types;
namespace CoreCms.Net.Services
@@ -2121,7 +2122,29 @@
                    createTime = DateTime.Now
                };
                await _orderLogServices.InsertAsync(orderLog);
                //百分兵法特殊奖励
                var allConfigs = await _settingServices.GetConfigDictionaries();
                var pointExchangeModel = CommonHelper.GetConfigDictionary(allConfigs, SystemSettingConstVars.DictionaryAchievementOnOff).ObjectToInt();
                if (pointExchangeModel == 1)
                {
                    //开启业绩奖励模式
                    var user = await _userServices.QueryByIdAsync(orderInfo.userId, isDataCache: true, cacheTimes: 1);
                    if (user.parentId != 0)
                    {
                        //如果是
                        CreateDAOrderInParam data = new CreateDAOrderInParam
                        {
                            Money = money,
                            OderId = orderInfo.orderId,
                            SourceTypes = GlobalEnumVars.UserBalanceSourceTypes.GoodsOder,
                            UserID = user.parentId,
                        };
                        //经销商业务订单结算
                        await _redisOperationRepository.ListLeftPushAsync(RedisMessageQueueKey.DistributionAchievementOder, JsonConvert.SerializeObject(data));
                    }
                }
                //订单完成结算订单
                await _redisOperationRepository.ListLeftPushAsync(RedisMessageQueueKey.OrderFinishCommand, orderInfo.orderId);