Commit 78af6900 authored by liming's avatar liming

日常赛列表

parent 49ca7c02
package com.antai.sport.http.server.management.api.business.simplematch.dto; package com.antai.sport.http.server.management.api.business.simplematch.dto;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty; import io.swagger.annotations.ApiModelProperty;
import lombok.Data; import lombok.Data;
import java.time.LocalDate;
import java.time.LocalDateTime; import java.time.LocalDateTime;
@Data @Data
...@@ -16,7 +18,9 @@ public class SimpleMatchListRequestDTO { ...@@ -16,7 +18,9 @@ public class SimpleMatchListRequestDTO {
@ApiModelProperty("比赛名称") @ApiModelProperty("比赛名称")
private String name; private String name;
@ApiModelProperty("比赛开始时间查询:开始时间") @ApiModelProperty("比赛开始时间查询:开始时间")
private LocalDateTime beginDate; @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
private LocalDate beginDate;
@ApiModelProperty("比赛开始时间查询:结束时间") @ApiModelProperty("比赛开始时间查询:结束时间")
private LocalDateTime endDate; @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
private LocalDate endDate;
} }
...@@ -7,5 +7,14 @@ ...@@ -7,5 +7,14 @@
left join map t2 on t1.map = t2.map_key left join map t2 on t1.map = t2.map_key
left join map_path t3 on t1.path = t3.path_key left join map_path t3 on t1.path = t3.path_key
where t1.deleted = 0 where t1.deleted = 0
<if test="param.name != null and param.name != ''">
and t1.name like concat('%',#{param.name},'%')
</if>
<if test="param.beginDate != null">
and t1.start_time &gt;= #{param.beginDate}
</if>
<if test="param.endDate != null">
and t1.start_time &lt; date_add(#{param.endDate}, interval 1 day)
</if>
</select> </select>
</mapper> </mapper>
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment