ai 回访 对应账户账分验证(<=0不能进行回访)
This commit is contained in:
parent
3a411dd1f3
commit
88ae473bbc
|
@ -106,10 +106,10 @@ public class BusAgentIntegralController extends BaseController
|
|||
record.setCreateTime(new Date());
|
||||
|
||||
BusAgentInfo temp = busAgentInfoService.selectBusAgentInfoById(busAgentInfo.getId());
|
||||
int oldValue = Integer.valueOf(temp.getIntegral());
|
||||
int oldValue = temp.getIntegral();
|
||||
int newValue = Integer.valueOf(busAgentInfo.getIntegral1());
|
||||
busAgentInfo.setIntegral(String.valueOf(oldValue+newValue));
|
||||
record.setIntegralBalance(Integer.valueOf(oldValue+newValue));
|
||||
busAgentInfo.setIntegral(oldValue+newValue);
|
||||
record.setIntegralBalance(oldValue+newValue);
|
||||
|
||||
recordService.insertBusIntegralRecord(record);
|
||||
return toAjax(busAgentInfoService.updateBusAgentInfo(busAgentInfo));
|
||||
|
|
|
@ -60,8 +60,8 @@ public class BusIntegralConsumeController extends BaseController
|
|||
List<BusAgentInfo> list = agentInfoService.selectBusAgentInfoList(agentInfo);
|
||||
if (list.size() > 0){
|
||||
BusAgentInfo info = list.get(0);
|
||||
String integral = String.valueOf(Integer.valueOf(info.getIntegral()) - busIntegralRecord.getIntegralUpdateNum());
|
||||
Integer integral1 = Integer.valueOf(Integer.valueOf(info.getIntegral()) - busIntegralRecord.getIntegralUpdateNum());
|
||||
int integral = info.getIntegral() - busIntegralRecord.getIntegralUpdateNum();
|
||||
Integer integral1 = info.getIntegral() - busIntegralRecord.getIntegralUpdateNum();
|
||||
busIntegralRecord.setIntegralBalance(integral1);
|
||||
info.setIntegral(integral);
|
||||
agentInfoService.updateBusAgentInfo(info);
|
||||
|
|
|
@ -1,11 +1,10 @@
|
|||
package com.ruoyi.quartz.task;
|
||||
|
||||
import com.ruoyi.business.domain.BusAgentInfo;
|
||||
import com.ruoyi.business.domain.BusFifteenInfo;
|
||||
import com.ruoyi.business.domain.BusOrderInfo;
|
||||
import com.ruoyi.business.service.IAiService;
|
||||
import com.ruoyi.business.service.IBusFifteenInfoService;
|
||||
import com.ruoyi.business.service.IBusOrderInfoService;
|
||||
import com.ruoyi.business.service.IMeituanService;
|
||||
import com.ruoyi.business.domain.BusStoreInfo;
|
||||
import com.ruoyi.business.service.*;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
|
@ -23,6 +22,10 @@ public class RyTask {
|
|||
@Autowired
|
||||
private IBusOrderInfoService orderInfoService;
|
||||
@Autowired
|
||||
private IBusStoreInfoService storeInfoService;
|
||||
@Autowired
|
||||
private IBusAgentInfoService agentInfoService;
|
||||
@Autowired
|
||||
private IAiService aiService;
|
||||
@Autowired
|
||||
private IMeituanService iMeituanService;
|
||||
|
@ -62,6 +65,19 @@ public class RyTask {
|
|||
BusOrderInfo orderInfo = new BusOrderInfo();
|
||||
List<BusOrderInfo> list = orderInfoService.selectBusOrderInfoList(orderInfo);
|
||||
for (BusOrderInfo busOrderInfo : list) {
|
||||
|
||||
BusStoreInfo storeInfo = new BusStoreInfo();
|
||||
storeInfo.setStoreCode(busOrderInfo.getStoreCode());
|
||||
List<BusStoreInfo> tempStore = storeInfoService.selectBusStoreInfoList(storeInfo);
|
||||
if (tempStore.size() > 0){
|
||||
BusAgentInfo agentInfo = new BusAgentInfo();
|
||||
agentInfo.setAgentAccount(tempStore.get(0).getBindUser());
|
||||
List<BusAgentInfo> agentInfoL = agentInfoService.selectBusAgentInfoList(agentInfo);
|
||||
if (agentInfoL.size() > 0) {
|
||||
if(agentInfoL.get(0).getIntegral()<=0){continue;}
|
||||
}else continue;
|
||||
}else continue;
|
||||
|
||||
BusOrderInfo temp = new BusOrderInfo();
|
||||
temp.setPrivcyPhone(busOrderInfo.getPrivcyPhone());
|
||||
BusOrderInfo tempInfo = orderInfoService.selectBusOrderInfoList(temp).get(0);
|
||||
|
|
|
@ -77,7 +77,7 @@ public class BusAgentInfo extends BaseEntity
|
|||
/** 登录次数 */
|
||||
@Excel(name = "登录次数")
|
||||
private int loginNum;
|
||||
private String integral;
|
||||
private int integral;
|
||||
private String integral1;
|
||||
|
||||
public String getIntegral1() {
|
||||
|
@ -90,11 +90,11 @@ public class BusAgentInfo extends BaseEntity
|
|||
|
||||
private Date createTime;
|
||||
|
||||
public String getIntegral() {
|
||||
public int getIntegral() {
|
||||
return integral;
|
||||
}
|
||||
|
||||
public void setIntegral(String integral) {
|
||||
public void setIntegral(int integral) {
|
||||
this.integral = integral;
|
||||
}
|
||||
|
||||
|
|
|
@ -133,7 +133,7 @@ public class AiServiceImpl implements IAiService
|
|||
|
||||
System.out.println("追加任务返回: ============taskMainId,taskMainSn===========" + taskMainId + "," + taskMainSn);
|
||||
|
||||
//定时任务15天后删除记录 todo
|
||||
//定时任务15天之前的删除记录 todo
|
||||
BusFifteenInfo fifteenInfo = new BusFifteenInfo();
|
||||
fifteenInfo.setCustomId(busOrderInfo.getCustomId());
|
||||
fifteenInfo.setLastVisitTime(LocalDateTime.now().toString());
|
||||
|
@ -244,7 +244,7 @@ public class AiServiceImpl implements IAiService
|
|||
|
||||
redisTemplate.opsForValue().set("dialTaskMainSn", taskMainSn);
|
||||
|
||||
//定时任务15天后删除记录 todo
|
||||
//定时任务15天之前的删除记录 todo
|
||||
BusFifteenInfo fifteenInfo = new BusFifteenInfo();
|
||||
fifteenInfo.setCustomId(busOrderInfo.getCustomId());
|
||||
fifteenInfo.setLastVisitTime(LocalDateTime.now().toString());
|
||||
|
@ -282,8 +282,8 @@ public class AiServiceImpl implements IAiService
|
|||
if (agentInfoL.size() > 0) {
|
||||
BusAgentInfo busAgentInfo = agentInfoL.get(0);
|
||||
int a = (Integer.valueOf(aiInfo.getTalktimes()) / 60) + 1;
|
||||
int reduce = Integer.valueOf(busAgentInfo.getIntegral()) - a;
|
||||
busAgentInfo.setIntegral(String.valueOf(reduce));
|
||||
int reduce = busAgentInfo.getIntegral() - a;
|
||||
busAgentInfo.setIntegral(reduce);
|
||||
agentInfoService.updateBusAgentInfo(busAgentInfo);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -284,7 +284,7 @@ public class SysUserServiceImpl implements ISysUserService
|
|||
busAgentInfo.setSuperiorAgentCode(loginUser.getUserId());
|
||||
busAgentInfo.setSuperiorAgentAccount(loginUser.getUsername());
|
||||
busAgentInfo.setDelStatus("1");
|
||||
busAgentInfo.setIntegral("0");
|
||||
busAgentInfo.setIntegral(0);
|
||||
busAgentInfo.setCreateTime(new Date());
|
||||
busAgentInfoMapper.insertBusAgentInfo(busAgentInfo);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue