定时任务history时间

开启营销(余额不足)提示充值
This commit is contained in:
wangshuai 2024-07-21 15:04:57 +08:00
parent cd05cd4cd8
commit 4678f4624e
3 changed files with 7 additions and 1 deletions

View File

@ -171,6 +171,10 @@ public class BusStoreInfoController extends BaseController {
@Log(title = "修改营销状态", businessType = BusinessType.UPDATE) @Log(title = "修改营销状态", businessType = BusinessType.UPDATE)
@PutMapping("changeReturnVisitStatus") @PutMapping("changeReturnVisitStatus")
public AjaxResult changeReturnVisitStatus(@RequestBody BusStoreInfo busStoreInfo1) { public AjaxResult changeReturnVisitStatus(@RequestBody BusStoreInfo busStoreInfo1) {
int ai = agentInfoService.getIntegralByAccount(SecurityUtils.getUsername());
if(ai <= 0){
throw new ServiceException("账户积分不足,请联系上级代理充值!");
}
BusStoreInfo busStoreInfo = new BusStoreInfo(); BusStoreInfo busStoreInfo = new BusStoreInfo();
busStoreInfo.setId(busStoreInfo1.getId()); busStoreInfo.setId(busStoreInfo1.getId());
busStoreInfo.setReturnVisitStatus(busStoreInfo1.getReturnVisitStatus()); busStoreInfo.setReturnVisitStatus(busStoreInfo1.getReturnVisitStatus());

View File

@ -40,6 +40,7 @@ import java.text.ParseException;
import java.text.SimpleDateFormat; import java.text.SimpleDateFormat;
import java.time.LocalDate; import java.time.LocalDate;
import java.time.LocalDateTime; import java.time.LocalDateTime;
import java.time.ZoneId;
import java.time.format.DateTimeFormatter; import java.time.format.DateTimeFormatter;
import java.util.*; import java.util.*;
import java.util.stream.Collectors; import java.util.stream.Collectors;
@ -719,6 +720,7 @@ public class MeituanServiceImpl implements IMeituanService {
BusStoreDayHistoryInfo target = new BusStoreDayHistoryInfo(); BusStoreDayHistoryInfo target = new BusStoreDayHistoryInfo();
BeanUtils.copyProperties(busStoreDayInfo, target); BeanUtils.copyProperties(busStoreDayInfo, target);
target.setId(null); target.setId(null);
target.setCreateTime(Date.from(date.atZone(ZoneId.systemDefault()).toInstant()));
busStoreDayHistoryInfoMapper.insertBusStoreDayHistoryInfo(target); busStoreDayHistoryInfoMapper.insertBusStoreDayHistoryInfo(target);
} }
} }

View File

@ -54,7 +54,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
where id = #{id} where id = #{id}
</select> </select>
<select id="getIntegralByAccount" resultType="java.lang.Integer" > <select id="getIntegralByAccount" resultType="java.lang.Integer" >
select integral select ai_duration_balance
from bus_agent_info from bus_agent_info
where id = #{account} where id = #{account}
</select> </select>