From f43970a061d3c90520b4e8f48caa17a204d9a085 Mon Sep 17 00:00:00 2001 From: 移动系统liao <liaoxujun@qq.com> Date: 星期四, 15 八月 2024 10:19:38 +0800 Subject: [PATCH] 完供应商自主维护商品api和后台基础管理页面 --- 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