记得上下班打卡 | git大法好,push需谨慎

Commit 419556dd authored by 胡佳晨's avatar 胡佳晨

演出停售支持

parent 0a968ba5
......@@ -4,6 +4,7 @@ import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import javax.validation.constraints.NotNull;
import java.time.LocalDateTime;
@Data
public class PerformanceAdminListParam {
......@@ -17,8 +18,10 @@ public class PerformanceAdminListParam {
@ApiModelProperty(value = "-2全部,0审核中,2审核拒绝", example = "0")
@NotNull(message = "不能为空")
private int auditStatus;
@ApiModelProperty(value = "停售时间", example = "2000-01-01 12:00:00")
private String stopSellTime;
@ApiModelProperty(value = "停售时间(天)-1全部", example = "-1")
private Long stopSellDay;
@ApiModelProperty(value = "停售时间", example = "2000-01-01 12:00:00",hidden = true)
private LocalDateTime stopSellTime;
@ApiModelProperty(value = "页数", example = "0")
@NotNull(message = "不能为空")
private int page;
......@@ -29,4 +32,9 @@ public class PerformanceAdminListParam {
private String orderItem;
@ApiModelProperty(value = "排序方式", hidden = true)
private String orderSc;
public void setStopSellDay(Long stopSellDay) {
LocalDateTime now = LocalDateTime.now();
this.stopSellTime = now.plusDays(-stopSellDay);
}
}
......@@ -24,7 +24,9 @@ public class PerformancePartnerListParam {
@NotNull(message = "不能为空")
private int orderType;
@ApiModelProperty(value = "停售时间(单位天)", example = "-1全部")
private String stopSellTime;
private Long stopSellDay;
@ApiModelProperty(value = "停售时间(单位天 -1全部", example = "-1", hidden = true)
private LocalDateTime stopSellTime;
@ApiModelProperty(value = "页数", example = "0")
@NotNull(message = "不能为空")
private int page;
......@@ -58,4 +60,9 @@ public class PerformancePartnerListParam {
}
}
public void setStopSellDay(Long stopSellDay) {
LocalDateTime now = LocalDateTime.now();
this.stopSellTime = now.plusDays(-stopSellDay);
}
}
......@@ -124,8 +124,8 @@
<if test="timeStart!=''">
AND p.time_start BETWEEN #{timeStart} AND #{timeEnd}
</if>
<if test="stopSellTime!=''">
AND p.time_end LIKE concat('%', #{stopSellTime}, '%')
<if test="stopSellTime!=-1'">
AND p.time_end BETWEEN #{stopSellTime} AND NOW()
</if>
</where>
ORDER BY #{orderItem} #{orderSc}
......@@ -200,7 +200,7 @@
AND (ps.audit_status = 0 or ps.audit_status = 2)
</if>
<if test="stopSellTime!=-1'">
AND p.time_end LIKE concat('%', #{stopSellTime}, '%')
AND p.time_end BETWEEN #{stopSellTime} AND NOW()
</if>
</where>
ORDER BY #{orderItem} #{orderSc}
......
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