From 13610a7bb6d524e4208114ddbbc1df1f691a14cf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=B0=8F=E4=B9=85=E5=93=A5?= <787952492@qq.com> Date: Thu, 16 Jun 2022 16:23:07 +0800 Subject: [PATCH] =?UTF-8?q?=E9=A1=B9=E7=9B=AE=E7=8A=B6=E6=80=81=E6=9E=9A?= =?UTF-8?q?=E4=B8=BE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../module/farm/enums/ProjectStateEnum.java | 26 +++++++++++++++++++ .../admin/project/vo/ProjectBaseVO.java | 3 ++- .../admin/project/vo/ProjectExcelVO.java | 3 ++- .../admin/project/vo/ProjectExportReqVO.java | 3 ++- .../admin/project/vo/ProjectPageReqVO.java | 3 ++- .../project/vo/ProjectSearchPageReqVO.java | 3 ++- .../dal/dataobject/project/ProjectDO.java | 4 ++- 7 files changed, 39 insertions(+), 6 deletions(-) create mode 100644 zsw-farm/zsw-farm-api/src/main/java/cn/iocoder/yudao/module/farm/enums/ProjectStateEnum.java diff --git a/zsw-farm/zsw-farm-api/src/main/java/cn/iocoder/yudao/module/farm/enums/ProjectStateEnum.java b/zsw-farm/zsw-farm-api/src/main/java/cn/iocoder/yudao/module/farm/enums/ProjectStateEnum.java new file mode 100644 index 00000000..00609295 --- /dev/null +++ b/zsw-farm/zsw-farm-api/src/main/java/cn/iocoder/yudao/module/farm/enums/ProjectStateEnum.java @@ -0,0 +1,26 @@ +package cn.iocoder.yudao.module.farm.enums; + +import com.baomidou.mybatisplus.annotation.EnumValue; +import com.fasterxml.jackson.annotation.JsonValue; +import lombok.Getter; + +@Getter +public enum ProjectStateEnum { + + PLAN(0,"计划中"), + READY(1,"进行中"), + STARTED(2,"已完成"); + + @JsonValue + @EnumValue + private final Integer code; + + private final String desc; + + ProjectStateEnum(Integer code, String desc) { + this.code = code; + this.desc = desc; + } + + +} diff --git a/zsw-farm/zsw-farm-impl/src/main/java/cn/iocoder/yudao/module/farm/controller/admin/project/vo/ProjectBaseVO.java b/zsw-farm/zsw-farm-impl/src/main/java/cn/iocoder/yudao/module/farm/controller/admin/project/vo/ProjectBaseVO.java index bbda235c..a1e8b55f 100644 --- a/zsw-farm/zsw-farm-impl/src/main/java/cn/iocoder/yudao/module/farm/controller/admin/project/vo/ProjectBaseVO.java +++ b/zsw-farm/zsw-farm-impl/src/main/java/cn/iocoder/yudao/module/farm/controller/admin/project/vo/ProjectBaseVO.java @@ -1,6 +1,7 @@ package cn.iocoder.yudao.module.farm.controller.admin.project.vo; import cn.hutool.json.JSON; +import cn.iocoder.yudao.module.farm.enums.ProjectStateEnum; import com.alibaba.fastjson.JSONArray; import lombok.*; import java.util.*; @@ -24,7 +25,7 @@ public class ProjectBaseVO { private String content; @ApiModelProperty(value = "") - private Integer state; + private ProjectStateEnum state; @ApiModelProperty("父级区域") private JSONArray areas; diff --git a/zsw-farm/zsw-farm-impl/src/main/java/cn/iocoder/yudao/module/farm/controller/admin/project/vo/ProjectExcelVO.java b/zsw-farm/zsw-farm-impl/src/main/java/cn/iocoder/yudao/module/farm/controller/admin/project/vo/ProjectExcelVO.java index c03445b0..bb086581 100644 --- a/zsw-farm/zsw-farm-impl/src/main/java/cn/iocoder/yudao/module/farm/controller/admin/project/vo/ProjectExcelVO.java +++ b/zsw-farm/zsw-farm-impl/src/main/java/cn/iocoder/yudao/module/farm/controller/admin/project/vo/ProjectExcelVO.java @@ -1,6 +1,7 @@ package cn.iocoder.yudao.module.farm.controller.admin.project.vo; import cn.hutool.json.JSON; +import cn.iocoder.yudao.module.farm.enums.ProjectStateEnum; import com.alibaba.fastjson.JSONArray; import lombok.*; import java.util.*; @@ -26,7 +27,7 @@ public class ProjectExcelVO { private String content; @ExcelProperty("") - private Integer state; + private ProjectStateEnum state; private JSONArray areas; private JSONArray members; diff --git a/zsw-farm/zsw-farm-impl/src/main/java/cn/iocoder/yudao/module/farm/controller/admin/project/vo/ProjectExportReqVO.java b/zsw-farm/zsw-farm-impl/src/main/java/cn/iocoder/yudao/module/farm/controller/admin/project/vo/ProjectExportReqVO.java index 185dd493..a1fbd77c 100644 --- a/zsw-farm/zsw-farm-impl/src/main/java/cn/iocoder/yudao/module/farm/controller/admin/project/vo/ProjectExportReqVO.java +++ b/zsw-farm/zsw-farm-impl/src/main/java/cn/iocoder/yudao/module/farm/controller/admin/project/vo/ProjectExportReqVO.java @@ -1,6 +1,7 @@ package cn.iocoder.yudao.module.farm.controller.admin.project.vo; import cn.hutool.json.JSON; +import cn.iocoder.yudao.module.farm.enums.ProjectStateEnum; import com.alibaba.fastjson.JSONArray; import lombok.*; import java.util.*; @@ -20,7 +21,7 @@ public class ProjectExportReqVO { @ApiModelProperty(value = "") private String content; - private Integer state; + private ProjectStateEnum state; private JSONArray areas; diff --git a/zsw-farm/zsw-farm-impl/src/main/java/cn/iocoder/yudao/module/farm/controller/admin/project/vo/ProjectPageReqVO.java b/zsw-farm/zsw-farm-impl/src/main/java/cn/iocoder/yudao/module/farm/controller/admin/project/vo/ProjectPageReqVO.java index 0fed6b10..7be824ad 100644 --- a/zsw-farm/zsw-farm-impl/src/main/java/cn/iocoder/yudao/module/farm/controller/admin/project/vo/ProjectPageReqVO.java +++ b/zsw-farm/zsw-farm-impl/src/main/java/cn/iocoder/yudao/module/farm/controller/admin/project/vo/ProjectPageReqVO.java @@ -1,6 +1,7 @@ package cn.iocoder.yudao.module.farm.controller.admin.project.vo; import cn.hutool.json.JSON; +import cn.iocoder.yudao.module.farm.enums.ProjectStateEnum; import com.alibaba.fastjson.JSONArray; import lombok.*; import java.util.*; @@ -22,7 +23,7 @@ public class ProjectPageReqVO extends PageParam { @ApiModelProperty(value = "") private String content; - private Integer state; + private ProjectStateEnum state; private JSONArray areas; private JSONArray members; diff --git a/zsw-farm/zsw-farm-impl/src/main/java/cn/iocoder/yudao/module/farm/controller/admin/project/vo/ProjectSearchPageReqVO.java b/zsw-farm/zsw-farm-impl/src/main/java/cn/iocoder/yudao/module/farm/controller/admin/project/vo/ProjectSearchPageReqVO.java index 8eaadf34..63ba8bda 100644 --- a/zsw-farm/zsw-farm-impl/src/main/java/cn/iocoder/yudao/module/farm/controller/admin/project/vo/ProjectSearchPageReqVO.java +++ b/zsw-farm/zsw-farm-impl/src/main/java/cn/iocoder/yudao/module/farm/controller/admin/project/vo/ProjectSearchPageReqVO.java @@ -2,6 +2,7 @@ package cn.iocoder.yudao.module.farm.controller.admin.project.vo; import cn.hutool.json.JSON; import cn.iocoder.yudao.framework.common.pojo.PageParam; +import cn.iocoder.yudao.module.farm.enums.ProjectStateEnum; import com.alibaba.fastjson.JSONArray; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; @@ -27,7 +28,7 @@ public class ProjectSearchPageReqVO extends PageParam { @ApiModelProperty(value = "") private String content; - private Integer state; + private ProjectStateEnum state; private JSONArray areas; diff --git a/zsw-farm/zsw-farm-impl/src/main/java/cn/iocoder/yudao/module/farm/dal/dataobject/project/ProjectDO.java b/zsw-farm/zsw-farm-impl/src/main/java/cn/iocoder/yudao/module/farm/dal/dataobject/project/ProjectDO.java index e825cb40..1668dabf 100644 --- a/zsw-farm/zsw-farm-impl/src/main/java/cn/iocoder/yudao/module/farm/dal/dataobject/project/ProjectDO.java +++ b/zsw-farm/zsw-farm-impl/src/main/java/cn/iocoder/yudao/module/farm/dal/dataobject/project/ProjectDO.java @@ -1,5 +1,6 @@ package cn.iocoder.yudao.module.farm.dal.dataobject.project; +import cn.iocoder.yudao.module.farm.enums.ProjectStateEnum; import com.alibaba.fastjson.JSONArray; import com.baomidou.mybatisplus.extension.handlers.JacksonTypeHandler; import com.fasterxml.jackson.annotation.JsonFormat; @@ -36,7 +37,8 @@ public class ProjectDO extends BaseDO { * */ private String content; - private Integer state; + + private ProjectStateEnum state; @ApiModelProperty("父级区域") @TableField(typeHandler = JacksonTypeHandler.class)