From 9586707b288c9f31fdf45a06a7e0b793b85a54ca Mon Sep 17 00:00:00 2001 From: wangshuai Date: Fri, 12 Jul 2024 13:24:55 +0800 Subject: [PATCH] =?UTF-8?q?=E5=BA=97=E9=93=BA=E9=85=8D=E7=BD=AE=20quota?= =?UTF-8?q?=E4=B8=BA0=20=E8=B7=B3=E8=BF=87=E9=AA=8C=E8=AF=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ruoyi/business/service/impl/AiServiceImpl.java | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/ruoyi-system/src/main/java/com/ruoyi/business/service/impl/AiServiceImpl.java b/ruoyi-system/src/main/java/com/ruoyi/business/service/impl/AiServiceImpl.java index d440344..78f614e 100644 --- a/ruoyi-system/src/main/java/com/ruoyi/business/service/impl/AiServiceImpl.java +++ b/ruoyi-system/src/main/java/com/ruoyi/business/service/impl/AiServiceImpl.java @@ -47,8 +47,6 @@ public class AiServiceImpl implements IAiService { private IBusStoreConfigInfoService iBusStoreConfigInfoService; @Autowired private IBusBanOperateInfoService iBusBanOperateInfoService; - @Autowired - private IBusReturnVisitInfoService iBusReturnVisitInfoService; private String userSn = "SYSUSER|8398f13f3feccef770ee4d465fe22fbf"; private String aiUserSn = "SYSUSER|2665bcca63a2b5c724095fa01dce0470"; @@ -339,11 +337,13 @@ public class AiServiceImpl implements IAiService { continue; } // 当日此店铺营销限额 - int quota = iBusReturnVisitInfoService.countByToday(storeInfo.getStoreCode()); - if (quota >= busStoreConfigInfo.getQuota()) { - break; + if (busStoreConfigInfo.getQuota() != 0){ + int quota = returnVisitInfoService.countByToday(storeInfo.getStoreCode()); + if (quota >= busStoreConfigInfo.getQuota()) { + break; + } } - redisTemplate.opsForValue().set(busStoreConfigInfo.getStoreCode() + now.format(dateTimeFormatterNow), quota + ""); +// redisTemplate.opsForValue().set(busStoreConfigInfo.getStoreCode() + now.format(dateTimeFormatterNow), quota + ""); BusFifteenInfo fifteenInfo = new BusFifteenInfo(); fifteenInfo.setCustomId(busOrderInfo.getCustomId()); List listInfo = fifteenInfoService.selectBusFifteenInfoList(fifteenInfo);