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

Commit 53d1247b authored by jiangxiulong's avatar jiangxiulong

Merge remote-tracking branch 'origin/dev' into dev

parents ac1167bf 01320557
......@@ -5,6 +5,7 @@ import lombok.Data;
import javax.validation.constraints.NotNull;
import java.time.LocalDateTime;
import java.time.format.DateTimeFormatter;
@Data
public class PerformanceAdminListParam {
......@@ -18,10 +19,10 @@ public class PerformanceAdminListParam {
@ApiModelProperty(value = "-2全部,0审核中,2审核拒绝", example = "0")
@NotNull(message = "不能为空")
private int auditStatus;
@ApiModelProperty(value = "停售时间(天)-1全部", example = "-1")
private Long stopSellDay;
@ApiModelProperty(value = "停售时间(天)-2全部", example = "-2")
private long stopSellDay;
@ApiModelProperty(value = "停售时间", example = "2000-01-01 12:00:00",hidden = true)
private LocalDateTime stopSellTime;
private String stopSellTime;
@ApiModelProperty(value = "页数", example = "0")
@NotNull(message = "不能为空")
private int page;
......@@ -34,7 +35,8 @@ public class PerformanceAdminListParam {
private String orderSc;
public void setStopSellDay(Long stopSellDay) {
this.stopSellDay=stopSellDay;
LocalDateTime now = LocalDateTime.now();
this.stopSellTime = now.plusDays(-stopSellDay);
this.stopSellTime = DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss").format(now.plusDays(-stopSellDay));
}
}
......@@ -5,6 +5,7 @@ import lombok.Data;
import javax.validation.constraints.NotNull;
import java.time.LocalDateTime;
import java.time.format.DateTimeFormatter;
@Data
public class PerformancePartnerListParam {
......@@ -23,10 +24,10 @@ public class PerformancePartnerListParam {
@ApiModelProperty(value = "排序类型 1创建时间倒序 2创建时间正序 3演出时间倒序 4演出时间正序", example = "0")
@NotNull(message = "不能为空")
private int orderType;
@ApiModelProperty(value = "停售时间(单位天)", example = "-1全部")
private Long stopSellDay;
@ApiModelProperty(value = "停售时间(单位天 -1全部", example = "-1", hidden = true)
private LocalDateTime stopSellTime;
@ApiModelProperty(value = "停售时间(单位天 -2全部)", example = "-2")
private long stopSellDay;
@ApiModelProperty(value = "停售时间(单位天 -2全部)", example = "-2", hidden = true)
private String stopSellTime;
@ApiModelProperty(value = "页数", example = "0")
@NotNull(message = "不能为空")
private int page;
......@@ -62,7 +63,8 @@ public class PerformancePartnerListParam {
}
public void setStopSellDay(Long stopSellDay) {
this.stopSellDay=stopSellDay;
LocalDateTime now = LocalDateTime.now();
this.stopSellTime = now.plusDays(-stopSellDay);
this.stopSellTime = DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss").format(now.plusDays(-stopSellDay));
}
}
......@@ -116,7 +116,6 @@
AND title LIKE concat('%', #{title}, '%')
</if>
<if test="status !='0'">
AND ps.STATUS = #{status}
<if test="status!='-2'">
AND ps.STATUS = #{status}
</if>
......@@ -126,14 +125,13 @@
<if test="timeStart!=''">
AND p.time_start BETWEEN #{timeStart} AND #{timeEnd}
</if>
<if test="stopSellTime!=-1'">
<if test="stopSellDay!='-2'">
AND p.time_end BETWEEN #{stopSellTime} AND NOW()
</if>
</if>
<if test="status=='0'">
AND ps.STATUS = #{status}
</if>
</where>
ORDER BY #{orderItem} #{orderSc}
</select>
......@@ -206,7 +204,7 @@
<if test="auditStatus=='-2'">
AND (ps.audit_status = 0 or ps.audit_status = 2)
</if>
<if test="stopSellTime!=-1'">
<if test="stopSellDay!=-2">
AND p.time_end BETWEEN #{stopSellTime} AND NOW()
</if>
</where>
......
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