|
@@ -11,6 +11,7 @@ import lombok.AllArgsConstructor;
|
|
|
import lombok.Data;
|
|
|
import lombok.EqualsAndHashCode;
|
|
|
import lombok.NoArgsConstructor;
|
|
|
+import org.apache.commons.lang3.StringUtils;
|
|
|
|
|
|
import java.io.Serializable;
|
|
|
import java.util.Date;
|
|
@@ -44,6 +45,22 @@ public class MusicCompareVo implements Serializable {
|
|
|
@ApiModelProperty("排序方式 升序(ASC) 降序(DESC)")
|
|
|
private String sortType;
|
|
|
|
|
|
+ @ApiModelProperty("曲目编号/名称")
|
|
|
+ private String keyword;
|
|
|
+
|
|
|
+ @ApiModelProperty("开始时间")
|
|
|
+ @JsonFormat(pattern = MK.TIME_PATTERN, timezone = MK.TIME_ZONE)
|
|
|
+ private Long startTime;
|
|
|
+
|
|
|
+ @ApiModelProperty("结束时间")
|
|
|
+ @JsonFormat(pattern = MK.TIME_PATTERN, timezone = MK.TIME_ZONE)
|
|
|
+ private Long endTime;
|
|
|
+
|
|
|
+ @ApiModelProperty(value = "曲目ID", hidden = true)
|
|
|
+ private Long musicId;
|
|
|
+ @ApiModelProperty(value = "曲目名称", hidden = true)
|
|
|
+ private String musicName;
|
|
|
+
|
|
|
public boolean invalidParam() {
|
|
|
|
|
|
return Objects.isNull(getClientType())
|
|
@@ -64,6 +81,19 @@ public class MusicCompareVo implements Serializable {
|
|
|
return Optional.ofNullable(sortType).orElse("DESC");
|
|
|
}
|
|
|
|
|
|
+ public void setKeyword(String keyword) {
|
|
|
+ if (StringUtils.isNotEmpty(keyword)) {
|
|
|
+
|
|
|
+ if (keyword.matches(MK.EXP_INT)) {
|
|
|
+
|
|
|
+ setMusicId(Long.parseLong(keyword));
|
|
|
+ } else {
|
|
|
+ setMusicName(keyword);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ this.keyword = keyword;
|
|
|
+ }
|
|
|
+
|
|
|
public StatQueryRequest userId(Long userId) {
|
|
|
this.userId = userId;
|
|
|
return this;
|