修改配置中的渠道,去除配置归属人的前提
This commit is contained in:
parent
c9f6a5a41a
commit
af978f560f
|
@ -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();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -138,6 +138,7 @@ public class SecurityConfig
|
|||
.antMatchers("/test/**").permitAll()
|
||||
.antMatchers("/eleme/message_receive").permitAll()
|
||||
// .antMatchers("/mt/**").permitAll()
|
||||
// .antMatchers("/ai/**").permitAll()
|
||||
|
||||
// 除上面外的所有请求全部需要鉴权认证
|
||||
.anyRequest().authenticated();
|
||||
|
|
|
@ -178,21 +178,19 @@ public class BusStoreInfoServiceImpl implements IBusStoreInfoService
|
|||
}else{
|
||||
throw new ServiceException("店铺配置信息异常!");
|
||||
}
|
||||
if(busStoreConfigInfo.getSaleBindId() != null){
|
||||
// 归属人信息
|
||||
BusSaleInfo busSaleInfo = busSaleInfoMapper.selectBusSaleInfoById(busStoreConfigInfo.getSaleBindId());
|
||||
if(busSaleInfo != null){
|
||||
// 同步店铺主表SaleBind
|
||||
BusStoreInfo busStoreInfo = new BusStoreInfo();
|
||||
busStoreInfo.setStoreCode(busStoreConfigInfo.getStoreCode());
|
||||
List<BusStoreInfo> list = busStoreInfoMapper.selectBusStoreInfoList(busStoreInfo);
|
||||
if(list.size() == 1){
|
||||
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.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());
|
||||
|
|
Loading…
Reference in New Issue