2021与蓝度共同重构项目,服务端
liuhaonan
2021-12-27 9f4e1eecb5c104052b53f04fb8b25c8664859389
ximon-admin/src/main/java/com/sandu/ximon/admin/security/CountSet.java
@@ -7,6 +7,7 @@
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;
@@ -16,8 +17,10 @@
@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);
@@ -47,10 +50,12 @@
    }
    @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);
    }
}