From af978f560f693fa5514e09b889685f05ce6c740a Mon Sep 17 00:00:00 2001 From: wangshuai Date: Tue, 23 Jul 2024 23:03:33 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E9=85=8D=E7=BD=AE=E4=B8=AD?= =?UTF-8?q?=E7=9A=84=E6=B8=A0=E9=81=93=EF=BC=8C=E5=8E=BB=E9=99=A4=E9=85=8D?= =?UTF-8?q?=E7=BD=AE=E5=BD=92=E5=B1=9E=E4=BA=BA=E7=9A=84=E5=89=8D=E6=8F=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ruoyi/business/controller/AiController.java | 14 +++++++------- .../com/ruoyi/framework/config/SecurityConfig.java | 1 + .../service/impl/BusStoreInfoServiceImpl.java | 14 +++++++------- 3 files changed, 15 insertions(+), 14 deletions(-) diff --git a/ruoyi-admin/src/main/java/com/ruoyi/business/controller/AiController.java b/ruoyi-admin/src/main/java/com/ruoyi/business/controller/AiController.java index 7c67836..ee285c4 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/business/controller/AiController.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/business/controller/AiController.java @@ -4,6 +4,7 @@ import com.ruoyi.business.service.IAiService; import com.ruoyi.business.service.IBusFifteenInfoService; import com.ruoyi.business.service.IBusOrderInfoService; import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RestController; @@ -21,11 +22,10 @@ public class AiController { private IBusOrderInfoService orderInfoService; @Autowired private IBusFifteenInfoService fifteenInfoService; -// @GetMapping("/sendAi") -// public void sendAi() { -// Long id = 15968736020037585L; -// BusOrderInfo orderInfo = orderInfoService.selectBusOrderInfoById(id); -//// orderInfo.setPrivcyPhone("13049773624,6244"); -// aiService.sendAiTask("projects|00dd4cb88fc5f777d5c578c0fdb6b3a0",orderInfo); -// } + + @GetMapping("/sendAi") + public void sendAi(){ + + aiService.sms(); + } } diff --git a/ruoyi-framework/src/main/java/com/ruoyi/framework/config/SecurityConfig.java b/ruoyi-framework/src/main/java/com/ruoyi/framework/config/SecurityConfig.java index 50bd6ab..daa7ff0 100644 --- a/ruoyi-framework/src/main/java/com/ruoyi/framework/config/SecurityConfig.java +++ b/ruoyi-framework/src/main/java/com/ruoyi/framework/config/SecurityConfig.java @@ -138,6 +138,7 @@ public class SecurityConfig .antMatchers("/test/**").permitAll() .antMatchers("/eleme/message_receive").permitAll() // .antMatchers("/mt/**").permitAll() +// .antMatchers("/ai/**").permitAll() // 除上面外的所有请求全部需要鉴权认证 .anyRequest().authenticated(); diff --git a/ruoyi-system/src/main/java/com/ruoyi/business/service/impl/BusStoreInfoServiceImpl.java b/ruoyi-system/src/main/java/com/ruoyi/business/service/impl/BusStoreInfoServiceImpl.java index b972473..9e1e08d 100644 --- a/ruoyi-system/src/main/java/com/ruoyi/business/service/impl/BusStoreInfoServiceImpl.java +++ b/ruoyi-system/src/main/java/com/ruoyi/business/service/impl/BusStoreInfoServiceImpl.java @@ -178,21 +178,19 @@ public class BusStoreInfoServiceImpl implements IBusStoreInfoService }else{ throw new ServiceException("店铺配置信息异常!"); } + // 同步店铺主表SaleBind + BusStoreInfo busStoreInfo = new BusStoreInfo(); + busStoreInfo.setStoreCode(busStoreConfigInfo.getStoreCode()); + List list = busStoreInfoMapper.selectBusStoreInfoList(busStoreInfo); + busStoreInfo.setId(list.get(0).getId()); if(busStoreConfigInfo.getSaleBindId() != null){ // 归属人信息 BusSaleInfo busSaleInfo = busSaleInfoMapper.selectBusSaleInfoById(busStoreConfigInfo.getSaleBindId()); if(busSaleInfo != null){ - // 同步店铺主表SaleBind - BusStoreInfo busStoreInfo = new BusStoreInfo(); - busStoreInfo.setStoreCode(busStoreConfigInfo.getStoreCode()); - List list = busStoreInfoMapper.selectBusStoreInfoList(busStoreInfo); if(list.size() == 1){ - busStoreInfo.setId(list.get(0).getId()); busStoreInfo.setSaleBindId(busSaleInfo.getId()); busStoreInfo.setSaleBindName(busSaleInfo.getSaleName()); busStoreInfo.setSaleBindTime(new Date()); - busStoreInfo.setMarketingChannels(busStoreConfigInfo.getMarketingChannels()); - busStoreInfoMapper.updateBusStoreInfo(busStoreInfo); }else{ throw new ServiceException("店铺信息异常!"); } @@ -200,6 +198,8 @@ public class BusStoreInfoServiceImpl implements IBusStoreInfoService throw new ServiceException("销售人员信息异常!"); } } + busStoreInfo.setMarketingChannels(busStoreConfigInfo.getMarketingChannels()); + busStoreInfoMapper.updateBusStoreInfo(busStoreInfo); return count; }catch (Exception e){ throw new ServiceException(e.getMessage());