|
@@ -1,198 +0,0 @@
|
|
|
-package com.xy.dto;
|
|
|
-
|
|
|
-import com.fasterxml.jackson.annotation.JsonFormat;
|
|
|
-import com.xy.utils.Emptys;
|
|
|
-import com.xy.utils.PageBean;
|
|
|
-import io.swagger.annotations.ApiModel;
|
|
|
-import io.swagger.annotations.ApiModelProperty;
|
|
|
-import lombok.Data;
|
|
|
-import lombok.experimental.Accessors;
|
|
|
-
|
|
|
-import javax.validation.constraints.NotBlank;
|
|
|
-import javax.validation.constraints.NotEmpty;
|
|
|
-import javax.validation.constraints.NotNull;
|
|
|
-import java.time.LocalDate;
|
|
|
-import java.time.LocalDateTime;
|
|
|
-import java.util.ArrayList;
|
|
|
-import java.util.List;
|
|
|
-
|
|
|
-@Data
|
|
|
-@Accessors(chain = true)
|
|
|
-public class SysDictDto {
|
|
|
-
|
|
|
- @Data
|
|
|
- @Accessors(chain = true)
|
|
|
- public static class Save {
|
|
|
-
|
|
|
- @ApiModelProperty("父编码")
|
|
|
- private String paterCode;
|
|
|
-
|
|
|
- @NotBlank(message = "code不能为空")
|
|
|
- @ApiModelProperty("编码")
|
|
|
- private String code;
|
|
|
-
|
|
|
- @NotBlank(message = "value不能为空")
|
|
|
- @ApiModelProperty("编码值")
|
|
|
- private String value;
|
|
|
-
|
|
|
- @NotBlank(message = "msg不能为空")
|
|
|
- @ApiModelProperty("编码说明")
|
|
|
- private String msg;
|
|
|
-
|
|
|
- @ApiModelProperty("排序 正序")
|
|
|
- private Integer orders;
|
|
|
-
|
|
|
- @ApiModelProperty("回显样式")
|
|
|
- private String listClass;
|
|
|
-
|
|
|
- @ApiModelProperty("回显class")
|
|
|
- private String cssClass;
|
|
|
- }
|
|
|
-
|
|
|
- @Data
|
|
|
- @Accessors(chain = true)
|
|
|
- public static class Update extends Save {
|
|
|
-
|
|
|
- @NotNull(message = "id不能为空")
|
|
|
- @ApiModelProperty("唯一标识")
|
|
|
- private Integer id;
|
|
|
-
|
|
|
- @ApiModelProperty("状态")
|
|
|
- private Boolean status;
|
|
|
-
|
|
|
- @ApiModelProperty("排序 正序")
|
|
|
- private Integer orders;
|
|
|
-
|
|
|
- @ApiModelProperty("回显样式")
|
|
|
- private String listClass;
|
|
|
-
|
|
|
- @ApiModelProperty("回显class")
|
|
|
- private String cssClass;
|
|
|
- }
|
|
|
-
|
|
|
- @Data
|
|
|
- @Accessors(chain = true)
|
|
|
- public static class Del {
|
|
|
-
|
|
|
- @NotEmpty(message = "id不能为空")
|
|
|
- @ApiModelProperty("唯一标识")
|
|
|
- private List<Integer> id;
|
|
|
- }
|
|
|
-
|
|
|
- @Data
|
|
|
- @Accessors(chain = true)
|
|
|
- public static class Page extends Vo {
|
|
|
-
|
|
|
- private PageBean page;
|
|
|
-
|
|
|
- @JsonFormat(pattern = "yyyy-MM-dd")
|
|
|
- @ApiModelProperty(value = "创建时间-起")
|
|
|
- private LocalDate beginCreateTime;
|
|
|
-
|
|
|
- @JsonFormat(pattern = "yyyy-MM-dd")
|
|
|
- @ApiModelProperty(value = "创建时间-始")
|
|
|
- private LocalDate endCreateTime;
|
|
|
-
|
|
|
- public LocalDateTime getBeginCreateTime() {
|
|
|
- return beginCreateTime == null ? null : beginCreateTime.atTime(0, 0, 0);
|
|
|
- }
|
|
|
-
|
|
|
- public LocalDateTime getEndCreateTime() {
|
|
|
- return endCreateTime == null ? null : endCreateTime.atTime(23, 59, 59);
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
- @Data
|
|
|
- @Accessors(chain = true)
|
|
|
- public static class SelectList extends Vo {
|
|
|
-
|
|
|
- @ApiModelProperty("id集合")
|
|
|
- private List<Integer> ids;
|
|
|
-
|
|
|
- @ApiModelProperty("父编码集合")
|
|
|
- private List<String> paterCodes;
|
|
|
-
|
|
|
- @ApiModelProperty("编码集合")
|
|
|
- private List<String> codes;
|
|
|
-
|
|
|
- public List<Integer> getIds() {
|
|
|
- Integer id = getId();
|
|
|
- if (Emptys.check(id)) {
|
|
|
- if (ids == null) {
|
|
|
- ids = new ArrayList<>();
|
|
|
- }
|
|
|
- ids.add(id);
|
|
|
- }
|
|
|
- return ids;
|
|
|
- }
|
|
|
-
|
|
|
- public List<String> getPaterCodes() {
|
|
|
- String paterCode = getPaterCode();
|
|
|
- if (Emptys.check(paterCode)) {
|
|
|
- if (paterCodes == null) {
|
|
|
- paterCodes = new ArrayList<>();
|
|
|
- }
|
|
|
- paterCodes.add(paterCode);
|
|
|
- }
|
|
|
- return paterCodes;
|
|
|
- }
|
|
|
-
|
|
|
- public List<String> getCodes() {
|
|
|
- String code = getCode();
|
|
|
- if (Emptys.check(code)) {
|
|
|
- if (codes == null) {
|
|
|
- codes = new ArrayList<>();
|
|
|
- }
|
|
|
- codes.add(code);
|
|
|
- }
|
|
|
- return codes;
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
- @Data
|
|
|
- @Accessors(chain = true)
|
|
|
- public static class Vo {
|
|
|
-
|
|
|
- @ApiModelProperty("id")
|
|
|
- private Integer id;
|
|
|
-
|
|
|
- @ApiModelProperty("父编码")
|
|
|
- private String paterCode;
|
|
|
-
|
|
|
- @ApiModelProperty("编码")
|
|
|
- private String code;
|
|
|
-
|
|
|
- @ApiModelProperty("编码值")
|
|
|
- private String value;
|
|
|
-
|
|
|
- @ApiModelProperty("编码说明")
|
|
|
- private String msg;
|
|
|
-
|
|
|
- @ApiModelProperty("状态")
|
|
|
- private Boolean status;
|
|
|
-
|
|
|
- @ApiModelProperty("创建时间")
|
|
|
- @JsonFormat(pattern = "yyyy-MM-dd")
|
|
|
- private LocalDateTime createTime;
|
|
|
-
|
|
|
- @ApiModelProperty("更新时间")
|
|
|
- @JsonFormat(pattern = "yyyy-MM-dd")
|
|
|
- private LocalDateTime updateTime;
|
|
|
-
|
|
|
- @ApiModelProperty("创建人")
|
|
|
- private Long createUser;
|
|
|
-
|
|
|
- @ApiModelProperty("更新人")
|
|
|
- private Long updateUser;
|
|
|
-
|
|
|
- @ApiModelProperty("排序 正序")
|
|
|
- private Integer orders;
|
|
|
-
|
|
|
- @ApiModelProperty("回显样式")
|
|
|
- private String listClass;
|
|
|
-
|
|
|
- @ApiModelProperty("回显class")
|
|
|
- private String cssClass;
|
|
|
- }
|
|
|
-
|
|
|
-}
|