| | |
| | | import org.springframework.context.annotation.Bean; |
| | | import org.springframework.context.annotation.Import; |
| | | import org.springframework.context.support.PropertySourcesPlaceholderConfigurer; |
| | | import org.springframework.scheduling.annotation.EnableScheduling; |
| | | import springfox.documentation.swagger2.annotations.EnableSwagger2; |
| | | |
| | | import javax.annotation.PostConstruct; |
| | |
| | | * @author jason |
| | | */ |
| | | @EnableSwagger2 |
| | | @EnableScheduling |
| | | @EnableFeignClients |
| | | @MBCloudApplication |
| | | @Import({WebConfig.class}) |
| | |
| | | @ApiModelProperty("状态(0=待支付,1=待核销,2=已到店,3=已完成,4=已过期,5=已取消)") |
| | | private Integer status; |
| | | @ApiModelProperty("创建时间") |
| | | private String insertTime; |
| | | private Long insertTime; |
| | | } |
New file |
| | |
| | | package com.dsh.other.util; |
| | | |
| | | import org.springframework.scheduling.annotation.Scheduled; |
| | | import org.springframework.stereotype.Component; |
| | | |
| | | /** |
| | | * @author zhibing.pu |
| | | * @Date 2023/7/19 14:19 |
| | | */ |
| | | @Component |
| | | public class TaskUtil { |
| | | |
| | | |
| | | /** |
| | | * 每隔一分钟去处理的定时任务 |
| | | */ |
| | | @Scheduled(fixedRate = 60000) |
| | | public void taskMinute(){ |
| | | try { |
| | | //定时修改赛事状态 |
| | | } catch (Exception e) { |
| | | e.printStackTrace(); |
| | | } |
| | | } |
| | | } |
| | |
| | | a.payMoney as payMoney, |
| | | CONCAT(DATE_FORMAT(a.startTime, '%Y-%m-%d %H:%i'), '-', DATE_FORMAT(a.endTime, '%H:%i')) as appointment, |
| | | a.`status`, |
| | | DATE_FORMAT(a.insertTime, '%Y-%m-%d %H:%i:%s') as insertTime |
| | | UNIX_TIMESTAMP(a.insertTime) * 1000 as insertTime |
| | | from t_site_booking a |
| | | left join t_site b on (a.siteId = b.id) |
| | | left join t_store c on (b.storeId = c.id) |