| | |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.http.ResponseEntity; |
| | | import org.springframework.scheduling.annotation.Scheduled; |
| | | import org.springframework.stereotype.Component; |
| | | import org.springframework.web.client.RestTemplate; |
| | | |
| | |
| | | |
| | | Boolean taskFlag = false; |
| | | |
| | | //@Scheduled(cron = "0/2 * * * * ?") |
| | | @Scheduled(cron = "0/2 * * * * ?") |
| | | public void execute() throws Exception { |
| | | if(taskFlag == true){ |
| | | System.out.println("正在运行,强制退出-------》"); |
| | |
| | | taskFlag = true; |
| | | QueryWrapper<Ticket> wrapper = new QueryWrapper<>(); |
| | | wrapper.lambda() |
| | | .eq(Ticket::getStatus,0) |
| | | .eq(Ticket::getPayStatus,0) |
| | | .ne(Ticket::getMoney,0) |
| | | .isNotNull(Ticket::getPayCode) |
| | | .orderByDesc(Ticket::getCreateTime); |