| | |
| | | import org.springframework.scheduling.annotation.EnableScheduling; |
| | | import org.springframework.scheduling.annotation.Scheduled; |
| | | import org.springframework.stereotype.Component; |
| | | 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); |
| | | } |
| | | |
| | | |
| | | } |