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 | 15 ++++++++++++---
1 files changed, 12 insertions(+), 3 deletions(-)
diff --git a/CoreCms.Net.Services/User/CoreCmsUserPointLogServices.cs b/CoreCms.Net.Services/User/CoreCmsUserPointLogServices.cs
index 23218bd..dff1bc2 100644
--- a/CoreCms.Net.Services/User/CoreCmsUserPointLogServices.cs
+++ b/CoreCms.Net.Services/User/CoreCmsUserPointLogServices.cs
@@ -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