feat(user): 支持组件时间标识集合字段
This commit is contained in:
@@ -9,7 +9,6 @@ import lombok.EqualsAndHashCode;
|
||||
import org.hibernate.validator.constraints.Range;
|
||||
|
||||
import javax.validation.constraints.NotBlank;
|
||||
import javax.validation.constraints.NotEmpty;
|
||||
import javax.validation.constraints.NotNull;
|
||||
import javax.validation.constraints.Pattern;
|
||||
import java.util.List;
|
||||
@@ -60,9 +59,7 @@ public class ComponentParam {
|
||||
private String image;
|
||||
|
||||
@ApiModelProperty("时间标识")
|
||||
private String timeKey;
|
||||
|
||||
|
||||
private List<String> timeKeys;
|
||||
|
||||
@ApiModelProperty("系统类型")
|
||||
@NotBlank(message = "系统类型不为空")
|
||||
@@ -84,6 +81,4 @@ public class ComponentParam {
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -1,14 +1,15 @@
|
||||
package com.njcn.user.pojo.po;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.njcn.db.bo.BaseEntity;
|
||||
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
|
||||
/**
|
||||
*
|
||||
* @author xuyang
|
||||
* @since 2021-12-13
|
||||
*/
|
||||
@@ -80,5 +81,13 @@ public class Component extends BaseEntity {
|
||||
|
||||
private String timeKey;
|
||||
|
||||
@TableField(exist = false)
|
||||
private List<String> timeKeys;
|
||||
|
||||
public String getTimeKey() {
|
||||
if (timeKeys != null) {
|
||||
timeKey = String.join(",", timeKeys);
|
||||
}
|
||||
return timeKey;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -52,6 +52,9 @@ public class ComponentVO implements Serializable {
|
||||
@ApiModelProperty("时间标识")
|
||||
private String timeKey;
|
||||
|
||||
@ApiModelProperty("时间标识集合")
|
||||
private List<String> timeKeys;
|
||||
|
||||
@ApiModelProperty("子级")
|
||||
List<ComponentVO> children;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user