From 5dbf39beeec75b2539c4636cf50e96d44b56fd3e Mon Sep 17 00:00:00 2001
From: 疯狂的狮子li <15040126243@163.com>
Date: 星期三, 28 七月 2021 14:22:58 +0800
Subject: [PATCH] update service 统一使用 ServicePlusImpl
---
ruoyi-common/src/main/java/com/ruoyi/common/core/domain/entity/SysDept.java | 197 +++++++++++-------------------------------------
1 files changed, 47 insertions(+), 150 deletions(-)
diff --git a/ruoyi-common/src/main/java/com/ruoyi/common/core/domain/entity/SysDept.java b/ruoyi-common/src/main/java/com/ruoyi/common/core/domain/entity/SysDept.java
index c9238e2..72240bc 100644
--- a/ruoyi-common/src/main/java/com/ruoyi/common/core/domain/entity/SysDept.java
+++ b/ruoyi-common/src/main/java/com/ruoyi/common/core/domain/entity/SysDept.java
@@ -1,24 +1,33 @@
package com.ruoyi.common.core.domain.entity;
-import java.util.ArrayList;
-import java.util.List;
+import com.baomidou.mybatisplus.annotation.*;
+import com.fasterxml.jackson.annotation.JsonFormat;
+import lombok.Data;
+import lombok.NoArgsConstructor;
+import lombok.experimental.Accessors;
+
import javax.validation.constraints.Email;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.Size;
-import org.apache.commons.lang3.builder.ToStringBuilder;
-import org.apache.commons.lang3.builder.ToStringStyle;
-import com.ruoyi.common.core.domain.BaseEntity;
+import java.io.Serializable;
+import java.util.*;
/**
* 閮ㄩ棬琛� sys_dept
*
* @author ruoyi
*/
-public class SysDept extends BaseEntity
+
+@Data
+@NoArgsConstructor
+@Accessors(chain = true)
+@TableName("sys_dept")
+public class SysDept implements Serializable
{
private static final long serialVersionUID = 1L;
/** 閮ㄩ棬ID */
+ @TableId(value = "dept_id",type = IdType.AUTO)
private Long deptId;
/** 鐖堕儴闂↖D */
@@ -28,175 +37,63 @@
private String ancestors;
/** 閮ㄩ棬鍚嶇О */
+ @NotBlank(message = "閮ㄩ棬鍚嶇О涓嶈兘涓虹┖")
+ @Size(min = 0, max = 30, message = "閮ㄩ棬鍚嶇О闀垮害涓嶈兘瓒呰繃30涓瓧绗�")
private String deptName;
/** 鏄剧ず椤哄簭 */
+ @NotBlank(message = "鏄剧ず椤哄簭涓嶈兘涓虹┖")
private String orderNum;
/** 璐熻矗浜� */
private String leader;
/** 鑱旂郴鐢佃瘽 */
+ @Size(min = 0, max = 11, message = "鑱旂郴鐢佃瘽闀垮害涓嶈兘瓒呰繃11涓瓧绗�")
private String phone;
/** 閭 */
+ @Email(message = "閭鏍煎紡涓嶆纭�")
+ @Size(min = 0, max = 50, message = "閭闀垮害涓嶈兘瓒呰繃50涓瓧绗�")
private String email;
/** 閮ㄩ棬鐘舵��:0姝e父,1鍋滅敤 */
private String status;
/** 鍒犻櫎鏍囧織锛�0浠h〃瀛樺湪 2浠h〃鍒犻櫎锛� */
+ @TableLogic
private String delFlag;
/** 鐖堕儴闂ㄥ悕绉� */
+ @TableField(exist = false)
private String parentName;
+
+ /** 鍒涘缓鑰� */
+ @TableField(fill = FieldFill.INSERT)
+ private String createBy;
+
+ /** 鍒涘缓鏃堕棿 */
+ @TableField(fill = FieldFill.INSERT)
+ @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+ private Date createTime;
+
+ /** 鏇存柊鑰� */
+ @TableField(fill = FieldFill.INSERT_UPDATE)
+ private String updateBy;
+
+ /** 鏇存柊鏃堕棿 */
+ @TableField(fill = FieldFill.INSERT_UPDATE)
+ @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+ private Date updateTime;
/** 瀛愰儴闂� */
+ @TableField(exist = false)
private List<SysDept> children = new ArrayList<SysDept>();
- public Long getDeptId()
- {
- return deptId;
- }
+ /**
+ * 璇锋眰鍙傛暟
+ */
+ @TableField(exist = false)
+ private Map<String, Object> params = new HashMap<>();
- public void setDeptId(Long deptId)
- {
- this.deptId = deptId;
- }
-
- public Long getParentId()
- {
- return parentId;
- }
-
- public void setParentId(Long parentId)
- {
- this.parentId = parentId;
- }
-
- public String getAncestors()
- {
- return ancestors;
- }
-
- public void setAncestors(String ancestors)
- {
- this.ancestors = ancestors;
- }
-
- @NotBlank(message = "閮ㄩ棬鍚嶇О涓嶈兘涓虹┖")
- @Size(min = 0, max = 30, message = "閮ㄩ棬鍚嶇О闀垮害涓嶈兘瓒呰繃30涓瓧绗�")
- public String getDeptName()
- {
- return deptName;
- }
-
- public void setDeptName(String deptName)
- {
- this.deptName = deptName;
- }
-
- @NotBlank(message = "鏄剧ず椤哄簭涓嶈兘涓虹┖")
- public String getOrderNum()
- {
- return orderNum;
- }
-
- public void setOrderNum(String orderNum)
- {
- this.orderNum = orderNum;
- }
-
- public String getLeader()
- {
- return leader;
- }
-
- public void setLeader(String leader)
- {
- this.leader = leader;
- }
-
- @Size(min = 0, max = 11, message = "鑱旂郴鐢佃瘽闀垮害涓嶈兘瓒呰繃11涓瓧绗�")
- public String getPhone()
- {
- return phone;
- }
-
- public void setPhone(String phone)
- {
- this.phone = phone;
- }
-
- @Email(message = "閭鏍煎紡涓嶆纭�")
- @Size(min = 0, max = 50, message = "閭闀垮害涓嶈兘瓒呰繃50涓瓧绗�")
- public String getEmail()
- {
- return email;
- }
-
- public void setEmail(String email)
- {
- this.email = email;
- }
-
- public String getStatus()
- {
- return status;
- }
-
- public void setStatus(String status)
- {
- this.status = status;
- }
-
- public String getDelFlag()
- {
- return delFlag;
- }
-
- public void setDelFlag(String delFlag)
- {
- this.delFlag = delFlag;
- }
-
- public String getParentName()
- {
- return parentName;
- }
-
- public void setParentName(String parentName)
- {
- this.parentName = parentName;
- }
-
- public List<SysDept> getChildren()
- {
- return children;
- }
-
- public void setChildren(List<SysDept> children)
- {
- this.children = children;
- }
-
- @Override
- public String toString() {
- return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
- .append("deptId", getDeptId())
- .append("parentId", getParentId())
- .append("ancestors", getAncestors())
- .append("deptName", getDeptName())
- .append("orderNum", getOrderNum())
- .append("leader", getLeader())
- .append("phone", getPhone())
- .append("email", getEmail())
- .append("status", getStatus())
- .append("delFlag", getDelFlag())
- .append("createBy", getCreateBy())
- .append("createTime", getCreateTime())
- .append("updateBy", getUpdateBy())
- .append("updateTime", getUpdateTime())
- .toString();
- }
}
--
Gitblit v1.9.3