| | |
| | | package com.sandu.ximon.admin.security; |
| | | |
| | | import com.baomidou.mybatisplus.core.toolkit.Wrappers; |
| | | import com.sandu.common.service.impl.BaseServiceImpl; |
| | | import com.sandu.ximon.admin.service.LampCountService; |
| | | import com.sandu.ximon.dao.domain.LampCount; |
| | | import com.sandu.ximon.dao.mapper.LampCountMapper; |
| | | import lombok.AllArgsConstructor; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.scheduling.annotation.EnableScheduling; |
| | | import org.springframework.scheduling.annotation.Scheduled; |
| | | import org.springframework.stereotype.Component; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import java.text.DateFormat; |
| | | import java.text.SimpleDateFormat; |
| | |
| | | @Slf4j |
| | | @AllArgsConstructor |
| | | @EnableScheduling |
| | | @Service |
| | | public class CountSet { |
| | | private final LampCountService lampCountService; |
| | | |
| | | public String aVoid() { |
| | | //LampCount one = getOne(Wrappers.lambdaQuery(LampCount.class));// |
| | | LampCount one= lampCountService.list().get(0); |
| | |
| | | |
| | | } |
| | | @Scheduled(cron = "0 0 0 * * ?") |
| | | public void reset(){ |
| | | public void reSetCount(){ |
| | | //LampCount one = getOne(Wrappers.lambdaQuery(LampCount.class)); |
| | | LampCount one= lampCountService.list().get(0); |
| | | one.setCount(4); |
| | | lampCountService.updateById(one); |
| | | } |
| | | |
| | | |
| | | } |