From bce3b9f28c0dce04357f039038d8d5e4b4481a99 Mon Sep 17 00:00:00 2001 From: "yunhao.wang" Date: Thu, 25 Oct 2018 09:41:19 +0800 Subject: [PATCH] =?UTF-8?q?=E9=83=A8=E9=97=A8=EF=BC=8C=E5=B2=97=E4=BD=8D?= =?UTF-8?q?=E5=AE=9E=E4=BD=93NAME=E5=B1=9E=E6=80=A7=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../cn/estsh/i3plus/pojo/platform/bean/Department.java | 14 ++++++-------- .../cn/estsh/i3plus/pojo/platform/bean/Position.java | 16 +++++++--------- 2 files changed, 13 insertions(+), 17 deletions(-) diff --git a/modules/i3plus-pojo-platform/src/main/java/cn/estsh/i3plus/pojo/platform/bean/Department.java b/modules/i3plus-pojo-platform/src/main/java/cn/estsh/i3plus/pojo/platform/bean/Department.java index e245dfc..516fbee 100644 --- a/modules/i3plus-pojo-platform/src/main/java/cn/estsh/i3plus/pojo/platform/bean/Department.java +++ b/modules/i3plus-pojo-platform/src/main/java/cn/estsh/i3plus/pojo/platform/bean/Department.java @@ -1,6 +1,8 @@ package cn.estsh.i3plus.pojo.platform.bean; import cn.estsh.i3plus.pojo.base.bean.BaseBean; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import com.fasterxml.jackson.databind.ser.std.ToStringSerializer; import io.swagger.annotations.Api; import io.swagger.annotations.ApiParam; import lombok.Data; @@ -10,7 +12,6 @@ import org.hibernate.annotations.DynamicUpdate; import javax.persistence.Column; import javax.persistence.Entity; import javax.persistence.Table; -import java.text.DecimalFormat; import java.util.List; /** @@ -29,9 +30,9 @@ import java.util.List; public class Department extends BaseBean { - @Column(name="NAME") + @Column(name="DEPARTMENT_NAME") @ApiParam(value ="名称") - private String name; + private String departmentName; @Column(name="DEPARTMENT_CODE") @ApiParam(value ="部门代码") @@ -43,15 +44,12 @@ public class Department extends BaseBean { @Column(name="PARENT_ID") @ApiParam(value ="父节点ID" , example = "0") - private String parentId; + @JsonSerialize(using = ToStringSerializer.class) + private Long parentId; @ApiParam(value ="子部门列表") private transient List childList; - @Column(name="DEPARTMENT_STATUS") - @ApiParam(value ="部门状态(1.正常,2.禁用)" , example ="1" , access ="部门状态(1.正常,2.禁用)") - private Integer departmentStatus; - @Column(name="RED_ORGANIZATION_NAME") @ApiParam(value ="所属组织名称" , access ="所属组织名称") private String redOrganizationName; diff --git a/modules/i3plus-pojo-platform/src/main/java/cn/estsh/i3plus/pojo/platform/bean/Position.java b/modules/i3plus-pojo-platform/src/main/java/cn/estsh/i3plus/pojo/platform/bean/Position.java index bceb7e0..674fa04 100644 --- a/modules/i3plus-pojo-platform/src/main/java/cn/estsh/i3plus/pojo/platform/bean/Position.java +++ b/modules/i3plus-pojo-platform/src/main/java/cn/estsh/i3plus/pojo/platform/bean/Position.java @@ -1,6 +1,8 @@ package cn.estsh.i3plus.pojo.platform.bean; import cn.estsh.i3plus.pojo.base.bean.BaseBean; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import com.fasterxml.jackson.databind.ser.std.ToStringSerializer; import io.swagger.annotations.Api; import io.swagger.annotations.ApiParam; import lombok.Data; @@ -10,7 +12,6 @@ import org.hibernate.annotations.DynamicUpdate; import javax.persistence.Column; import javax.persistence.Entity; import javax.persistence.Table; -import java.text.DecimalFormat; /** * @Description : 岗位 @@ -28,26 +29,23 @@ import java.text.DecimalFormat; public class Position extends BaseBean { - @Column(name="NAME") + @Column(name="POSITION_NAME") @ApiParam(value ="名称" , access ="名称") - private String name; + private String positionName; @Column(name="POSITION_CODE") @ApiParam(value ="岗位代码" , access ="岗位代码") private String positionCode; @Column(name="PARENT_ID") - @ApiParam(value ="上级岗位" , access ="上级岗位") - private String parentId; + @ApiParam(value ="上级岗位" , example ="0" , access ="上级岗位") + @JsonSerialize(using = ToStringSerializer.class) + private Long parentId; @Column(name="RED_PARENT_NAME") @ApiParam(value ="上级岗位名称" , access ="上级岗位名称") private String redParentName; - @Column(name="POSITION_STATUS") - @ApiParam(value ="状态(1.正常,2.禁用)" , example ="1" , access ="状态(1.正常,2.禁用)") - private Integer positionStatus; - @Column(name="POSITION_DESCRIPTION") @ApiParam(value ="描述" , access ="描述") private String positionDescription;