From 557c2711a3e103ebc3d0492344eca9730d5e92b2 Mon Sep 17 00:00:00 2001 From: 移动系统liao <liaoxujun@qq.com> Date: 星期一, 17 二月 2025 10:47:47 +0800 Subject: [PATCH] 增加司机配送单超时处理任务,防止一直不停手机定位信息, --- CoreCms.Net.Services/User/CoreCmsUserPointLogServices.cs | 27 ++++++++++++++++++--------- 1 files changed, 18 insertions(+), 9 deletions(-) diff --git a/CoreCms.Net.Services/User/CoreCmsUserPointLogServices.cs b/CoreCms.Net.Services/User/CoreCmsUserPointLogServices.cs index c8f9904..dff1bc2 100644 --- a/CoreCms.Net.Services/User/CoreCmsUserPointLogServices.cs +++ b/CoreCms.Net.Services/User/CoreCmsUserPointLogServices.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: 鏆傛棤 ***********************************************************************/ @@ -23,6 +23,7 @@ using CoreCms.Net.Utility.Helper; using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.Hosting; +using NPOI.SS.Formula.Functions; using SqlSugar; @@ -109,6 +110,7 @@ var settingServices = container.ServiceProvider.GetService<ICoreCmsSettingServices>(); var orderItemServices = container.ServiceProvider.GetService<ICoreCmsOrderItemServices>(); var productsServices = container.ServiceProvider.GetService<ICoreCmsProductsServices>(); + var distributionServices = container.ServiceProvider.GetService<ICoreCmsDistributionServices>(); var allConfigs = await settingServices.GetConfigDictionaries(); //鑾峰彇绉垎鑾峰彇妯″紡 var pointGetModel = CommonHelper.GetConfigDictionary(allConfigs, SystemSettingConstVars.PointGetModel).ObjectToInt(); @@ -118,9 +120,16 @@ var ordersRewardProportion = CommonHelper.GetConfigDictionary(allConfigs, SystemSettingConstVars.OrdersRewardProportion).ObjectToInt(); if (ordersRewardProportion > 0) { - var point = Convert.ToInt32(money / ordersRewardProportion); - await SetPoint(userId, point, (int)GlobalEnumVars.UserPointSourceTypes.PointTypeRebate, - "璁㈠崟锛�" + orderId + " 濂栧姳"); + //濡傛灉鏄粡閿�鍟嗗氨涓嶈兘鑾峰緱绉垎 + var user = await distributionServices.QueryListByClauseAsync(x => x.userId == userId && x.verifyStatus == 1 && x.isDelete == false );//(int)GlobalEnumVars.DistributionVerifyStatus.VerifyYes + + if (user == null || user.Count == 0) + { + //濡傛灉鏄櫘閫氱敤鎴峰垯璐у緱绉垎 + var point = Convert.ToInt32(money / ordersRewardProportion); + await SetPoint(userId, point, (int)GlobalEnumVars.UserPointSourceTypes.PointTypeRebate, + "璁㈠崟锛�" + orderId + " 濂栧姳"); + } } } else if (pointGetModel == 2) -- Gitblit v1.9.1