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());