From 8d761fa60c744bf7ffeefbf260714c2ed4fe24f2 Mon Sep 17 00:00:00 2001
From: 疯狂的狮子li <15040126243@163.com>
Date: 星期六, 29 五月 2021 18:54:35 +0800
Subject: [PATCH] update 优化数据权限sql 解决MP apply注入附带 AND 语法问题
---
ruoyi-common/src/main/java/com/ruoyi/common/core/domain/entity/SysDictData.java | 283 +++++++++++++++++++++-----------------------------------
1 files changed, 107 insertions(+), 176 deletions(-)
diff --git a/ruoyi-common/src/main/java/com/ruoyi/common/core/domain/entity/SysDictData.java b/ruoyi-common/src/main/java/com/ruoyi/common/core/domain/entity/SysDictData.java
index 4fa5f0b..c98f9fc 100644
--- a/ruoyi-common/src/main/java/com/ruoyi/common/core/domain/entity/SysDictData.java
+++ b/ruoyi-common/src/main/java/com/ruoyi/common/core/domain/entity/SysDictData.java
@@ -1,176 +1,107 @@
-package com.ruoyi.common.core.domain.entity;
-
-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.annotation.Excel;
-import com.ruoyi.common.annotation.Excel.ColumnType;
-import com.ruoyi.common.constant.UserConstants;
-import com.ruoyi.common.core.domain.BaseEntity;
-
-/**
- * 瀛楀吀鏁版嵁琛� sys_dict_data
- *
- * @author ruoyi
- */
-public class SysDictData extends BaseEntity
-{
- private static final long serialVersionUID = 1L;
-
- /** 瀛楀吀缂栫爜 */
- @Excel(name = "瀛楀吀缂栫爜", cellType = ColumnType.NUMERIC)
- private Long dictCode;
-
- /** 瀛楀吀鎺掑簭 */
- @Excel(name = "瀛楀吀鎺掑簭", cellType = ColumnType.NUMERIC)
- private Long dictSort;
-
- /** 瀛楀吀鏍囩 */
- @Excel(name = "瀛楀吀鏍囩")
- private String dictLabel;
-
- /** 瀛楀吀閿�� */
- @Excel(name = "瀛楀吀閿��")
- private String dictValue;
-
- /** 瀛楀吀绫诲瀷 */
- @Excel(name = "瀛楀吀绫诲瀷")
- private String dictType;
-
- /** 鏍峰紡灞炴�э紙鍏朵粬鏍峰紡鎵╁睍锛� */
- private String cssClass;
-
- /** 琛ㄦ牸瀛楀吀鏍峰紡 */
- private String listClass;
-
- /** 鏄惁榛樿锛圷鏄� N鍚︼級 */
- @Excel(name = "鏄惁榛樿", readConverterExp = "Y=鏄�,N=鍚�")
- private String isDefault;
-
- /** 鐘舵�侊紙0姝e父 1鍋滅敤锛� */
- @Excel(name = "鐘舵��", readConverterExp = "0=姝e父,1=鍋滅敤")
- private String status;
-
- public Long getDictCode()
- {
- return dictCode;
- }
-
- public void setDictCode(Long dictCode)
- {
- this.dictCode = dictCode;
- }
-
- public Long getDictSort()
- {
- return dictSort;
- }
-
- public void setDictSort(Long dictSort)
- {
- this.dictSort = dictSort;
- }
-
- @NotBlank(message = "瀛楀吀鏍囩涓嶈兘涓虹┖")
- @Size(min = 0, max = 100, message = "瀛楀吀鏍囩闀垮害涓嶈兘瓒呰繃100涓瓧绗�")
- public String getDictLabel()
- {
- return dictLabel;
- }
-
- public void setDictLabel(String dictLabel)
- {
- this.dictLabel = dictLabel;
- }
-
- @NotBlank(message = "瀛楀吀閿�间笉鑳戒负绌�")
- @Size(min = 0, max = 100, message = "瀛楀吀閿�奸暱搴︿笉鑳借秴杩�100涓瓧绗�")
- public String getDictValue()
- {
- return dictValue;
- }
-
- public void setDictValue(String dictValue)
- {
- this.dictValue = dictValue;
- }
-
- @NotBlank(message = "瀛楀吀绫诲瀷涓嶈兘涓虹┖")
- @Size(min = 0, max = 100, message = "瀛楀吀绫诲瀷闀垮害涓嶈兘瓒呰繃100涓瓧绗�")
- public String getDictType()
- {
- return dictType;
- }
-
- public void setDictType(String dictType)
- {
- this.dictType = dictType;
- }
-
- @Size(min = 0, max = 100, message = "鏍峰紡灞炴�ч暱搴︿笉鑳借秴杩�100涓瓧绗�")
- public String getCssClass()
- {
- return cssClass;
- }
-
- public void setCssClass(String cssClass)
- {
- this.cssClass = cssClass;
- }
-
- public String getListClass()
- {
- return listClass;
- }
-
- public void setListClass(String listClass)
- {
- this.listClass = listClass;
- }
-
- public boolean getDefault()
- {
- return UserConstants.YES.equals(this.isDefault) ? true : false;
- }
-
- public String getIsDefault()
- {
- return isDefault;
- }
-
- public void setIsDefault(String isDefault)
- {
- this.isDefault = isDefault;
- }
-
- public String getStatus()
- {
- return status;
- }
-
- public void setStatus(String status)
- {
- this.status = status;
- }
-
- @Override
- public String toString() {
- return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
- .append("dictCode", getDictCode())
- .append("dictSort", getDictSort())
- .append("dictLabel", getDictLabel())
- .append("dictValue", getDictValue())
- .append("dictType", getDictType())
- .append("cssClass", getCssClass())
- .append("listClass", getListClass())
- .append("isDefault", getIsDefault())
- .append("status", getStatus())
- .append("createBy", getCreateBy())
- .append("createTime", getCreateTime())
- .append("updateBy", getUpdateBy())
- .append("updateTime", getUpdateTime())
- .append("remark", getRemark())
- .toString();
- }
-}
+package com.ruoyi.common.core.domain.entity;
+
+import com.baomidou.mybatisplus.annotation.*;
+import com.fasterxml.jackson.annotation.JsonFormat;
+import com.ruoyi.common.annotation.Excel;
+import com.ruoyi.common.annotation.Excel.ColumnType;
+import com.ruoyi.common.constant.UserConstants;
+import lombok.Data;
+import lombok.NoArgsConstructor;
+import lombok.experimental.Accessors;
+
+import javax.validation.constraints.NotBlank;
+import javax.validation.constraints.Size;
+import java.io.Serializable;
+import java.util.Date;
+import java.util.HashMap;
+import java.util.Map;
+
+/**
+ * 瀛楀吀鏁版嵁琛� sys_dict_data
+ *
+ * @author ruoyi
+ */
+
+@Data
+@NoArgsConstructor
+@Accessors(chain = true)
+@TableName("sys_dict_data")
+public class SysDictData implements Serializable
+{
+ private static final long serialVersionUID = 1L;
+
+ /** 瀛楀吀缂栫爜 */
+ @Excel(name = "瀛楀吀缂栫爜", cellType = ColumnType.NUMERIC)
+ @TableId(value = "dict_code",type = IdType.AUTO)
+ private Long dictCode;
+
+ /** 瀛楀吀鎺掑簭 */
+ @Excel(name = "瀛楀吀鎺掑簭", cellType = ColumnType.NUMERIC)
+ private Long dictSort;
+
+ /** 瀛楀吀鏍囩 */
+ @Excel(name = "瀛楀吀鏍囩")
+ @NotBlank(message = "瀛楀吀鏍囩涓嶈兘涓虹┖")
+ @Size(min = 0, max = 100, message = "瀛楀吀鏍囩闀垮害涓嶈兘瓒呰繃100涓瓧绗�")
+ private String dictLabel;
+
+ /** 瀛楀吀閿�� */
+ @Excel(name = "瀛楀吀閿��")
+ @NotBlank(message = "瀛楀吀閿�间笉鑳戒负绌�")
+ @Size(min = 0, max = 100, message = "瀛楀吀閿�奸暱搴︿笉鑳借秴杩�100涓瓧绗�")
+ private String dictValue;
+
+ /** 瀛楀吀绫诲瀷 */
+ @Excel(name = "瀛楀吀绫诲瀷")
+ @NotBlank(message = "瀛楀吀绫诲瀷涓嶈兘涓虹┖")
+ @Size(min = 0, max = 100, message = "瀛楀吀绫诲瀷闀垮害涓嶈兘瓒呰繃100涓瓧绗�")
+ private String dictType;
+
+ /** 鏍峰紡灞炴�э紙鍏朵粬鏍峰紡鎵╁睍锛� */
+ @Size(min = 0, max = 100, message = "鏍峰紡灞炴�ч暱搴︿笉鑳借秴杩�100涓瓧绗�")
+ private String cssClass;
+
+ /** 琛ㄦ牸瀛楀吀鏍峰紡 */
+ private String listClass;
+
+ /** 鏄惁榛樿锛圷鏄� N鍚︼級 */
+ @Excel(name = "鏄惁榛樿", readConverterExp = "Y=鏄�,N=鍚�")
+ private String isDefault;
+
+ /** 鐘舵�侊紙0姝e父 1鍋滅敤锛� */
+ @Excel(name = "鐘舵��", readConverterExp = "0=姝e父,1=鍋滅敤")
+ private String status;
+
+ /** 鍒涘缓鑰� */
+ @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;
+
+ /** 澶囨敞 */
+ private String remark;
+
+ /**
+ * 璇锋眰鍙傛暟
+ */
+ @TableField(exist = false)
+ private Map<String, Object> params = new HashMap<>();
+
+ public boolean getDefault()
+ {
+ return UserConstants.YES.equals(this.isDefault) ? true : false;
+ }
+
+}
--
Gitblit v1.9.3