修改配置中的渠道,去除配置归属人的前提

This commit is contained in:
wangshuai 2024-07-23 23:03:33 +08:00
parent c9f6a5a41a
commit af978f560f
3 changed files with 15 additions and 14 deletions

View File

@ -4,6 +4,7 @@ import com.ruoyi.business.service.IAiService;
import com.ruoyi.business.service.IBusFifteenInfoService; import com.ruoyi.business.service.IBusFifteenInfoService;
import com.ruoyi.business.service.IBusOrderInfoService; import com.ruoyi.business.service.IBusOrderInfoService;
import org.springframework.beans.factory.annotation.Autowired; 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.RequestMapping;
import org.springframework.web.bind.annotation.RestController; import org.springframework.web.bind.annotation.RestController;
@ -21,11 +22,10 @@ public class AiController {
private IBusOrderInfoService orderInfoService; private IBusOrderInfoService orderInfoService;
@Autowired @Autowired
private IBusFifteenInfoService fifteenInfoService; private IBusFifteenInfoService fifteenInfoService;
// @GetMapping("/sendAi")
// public void sendAi() { @GetMapping("/sendAi")
// Long id = 15968736020037585L; public void sendAi(){
// BusOrderInfo orderInfo = orderInfoService.selectBusOrderInfoById(id);
//// orderInfo.setPrivcyPhone("13049773624,6244"); aiService.sms();
// aiService.sendAiTask("projects|00dd4cb88fc5f777d5c578c0fdb6b3a0",orderInfo); }
// }
} }

View File

@ -138,6 +138,7 @@ public class SecurityConfig
.antMatchers("/test/**").permitAll() .antMatchers("/test/**").permitAll()
.antMatchers("/eleme/message_receive").permitAll() .antMatchers("/eleme/message_receive").permitAll()
// .antMatchers("/mt/**").permitAll() // .antMatchers("/mt/**").permitAll()
// .antMatchers("/ai/**").permitAll()
// 除上面外的所有请求全部需要鉴权认证 // 除上面外的所有请求全部需要鉴权认证
.anyRequest().authenticated(); .anyRequest().authenticated();

View File

@ -178,21 +178,19 @@ public class BusStoreInfoServiceImpl implements IBusStoreInfoService
}else{ }else{
throw new ServiceException("店铺配置信息异常!"); throw new ServiceException("店铺配置信息异常!");
} }
if(busStoreConfigInfo.getSaleBindId() != null){
// 归属人信息
BusSaleInfo busSaleInfo = busSaleInfoMapper.selectBusSaleInfoById(busStoreConfigInfo.getSaleBindId());
if(busSaleInfo != null){
// 同步店铺主表SaleBind // 同步店铺主表SaleBind
BusStoreInfo busStoreInfo = new BusStoreInfo(); BusStoreInfo busStoreInfo = new BusStoreInfo();
busStoreInfo.setStoreCode(busStoreConfigInfo.getStoreCode()); busStoreInfo.setStoreCode(busStoreConfigInfo.getStoreCode());
List<BusStoreInfo> list = busStoreInfoMapper.selectBusStoreInfoList(busStoreInfo); List<BusStoreInfo> list = busStoreInfoMapper.selectBusStoreInfoList(busStoreInfo);
if(list.size() == 1){
busStoreInfo.setId(list.get(0).getId()); busStoreInfo.setId(list.get(0).getId());
if(busStoreConfigInfo.getSaleBindId() != null){
// 归属人信息
BusSaleInfo busSaleInfo = busSaleInfoMapper.selectBusSaleInfoById(busStoreConfigInfo.getSaleBindId());
if(busSaleInfo != null){
if(list.size() == 1){
busStoreInfo.setSaleBindId(busSaleInfo.getId()); busStoreInfo.setSaleBindId(busSaleInfo.getId());
busStoreInfo.setSaleBindName(busSaleInfo.getSaleName()); busStoreInfo.setSaleBindName(busSaleInfo.getSaleName());
busStoreInfo.setSaleBindTime(new Date()); busStoreInfo.setSaleBindTime(new Date());
busStoreInfo.setMarketingChannels(busStoreConfigInfo.getMarketingChannels());
busStoreInfoMapper.updateBusStoreInfo(busStoreInfo);
}else{ }else{
throw new ServiceException("店铺信息异常!"); throw new ServiceException("店铺信息异常!");
} }
@ -200,6 +198,8 @@ public class BusStoreInfoServiceImpl implements IBusStoreInfoService
throw new ServiceException("销售人员信息异常!"); throw new ServiceException("销售人员信息异常!");
} }
} }
busStoreInfo.setMarketingChannels(busStoreConfigInfo.getMarketingChannels());
busStoreInfoMapper.updateBusStoreInfo(busStoreInfo);
return count; return count;
}catch (Exception e){ }catch (Exception e){
throw new ServiceException(e.getMessage()); throw new ServiceException(e.getMessage());