From a6fb88d74c20cc28043d75e8a5097fce49cf9a78 Mon Sep 17 00:00:00 2001
From: 疯狂的狮子li <15040126243@163.com>
Date: 星期五, 15 十月 2021 15:19:42 +0800
Subject: [PATCH] update [重大更新]全业务 增加 接口文档注解 格式化代码

---
 ruoyi-system/src/main/java/com/ruoyi/system/domain/SysConfig.java |  147 +++++++++++++++++++-----------------------------
 1 files changed, 59 insertions(+), 88 deletions(-)

diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/domain/SysConfig.java b/ruoyi-system/src/main/java/com/ruoyi/system/domain/SysConfig.java
index c54678c..3b9fce0 100644
--- a/ruoyi-system/src/main/java/com/ruoyi/system/domain/SysConfig.java
+++ b/ruoyi-system/src/main/java/com/ruoyi/system/domain/SysConfig.java
@@ -1,111 +1,82 @@
 package com.ruoyi.system.domain;
 
+import com.alibaba.excel.annotation.ExcelIgnoreUnannotated;
+import com.alibaba.excel.annotation.ExcelProperty;
+import com.baomidou.mybatisplus.annotation.TableId;
+import com.baomidou.mybatisplus.annotation.TableName;
+import com.ruoyi.common.annotation.ExcelDictFormat;
+import com.ruoyi.common.convert.ExcelDictConvert;
+import com.ruoyi.common.core.domain.BaseEntity;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import lombok.experimental.Accessors;
+
 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.core.domain.BaseEntity;
 
 /**
  * 鍙傛暟閰嶇疆琛� sys_config
- * 
- * @author ruoyi
+ *
+ * @author Lion Li
  */
-public class SysConfig extends BaseEntity
-{
-    private static final long serialVersionUID = 1L;
 
-    /** 鍙傛暟涓婚敭 */
-    @Excel(name = "鍙傛暟涓婚敭", cellType = ColumnType.NUMERIC)
+@Data
+@EqualsAndHashCode(callSuper = true)
+@Accessors(chain = true)
+@TableName("sys_config")
+@ExcelIgnoreUnannotated
+@ApiModel("鍙傛暟閰嶇疆涓氬姟瀵硅薄")
+public class SysConfig extends BaseEntity {
+
+    /**
+     * 鍙傛暟涓婚敭
+     */
+    @ApiModelProperty(value = "鍙傛暟涓婚敭")
+    @ExcelProperty(value = "鍙傛暟涓婚敭")
+    @TableId(value = "config_id")
     private Long configId;
 
-    /** 鍙傛暟鍚嶇О */
-    @Excel(name = "鍙傛暟鍚嶇О")
-    private String configName;
-
-    /** 鍙傛暟閿悕 */
-    @Excel(name = "鍙傛暟閿悕")
-    private String configKey;
-
-    /** 鍙傛暟閿�� */
-    @Excel(name = "鍙傛暟閿��")
-    private String configValue;
-
-    /** 绯荤粺鍐呯疆锛圷鏄� N鍚︼級 */
-    @Excel(name = "绯荤粺鍐呯疆", readConverterExp = "Y=鏄�,N=鍚�")
-    private String configType;
-
-    public Long getConfigId()
-    {
-        return configId;
-    }
-
-    public void setConfigId(Long configId)
-    {
-        this.configId = configId;
-    }
-
+    /**
+     * 鍙傛暟鍚嶇О
+     */
+    @ApiModelProperty(value = "鍙傛暟鍚嶇О")
+    @ExcelProperty(value = "鍙傛暟鍚嶇О")
     @NotBlank(message = "鍙傛暟鍚嶇О涓嶈兘涓虹┖")
     @Size(min = 0, max = 100, message = "鍙傛暟鍚嶇О涓嶈兘瓒呰繃100涓瓧绗�")
-    public String getConfigName()
-    {
-        return configName;
-    }
+    private String configName;
 
-    public void setConfigName(String configName)
-    {
-        this.configName = configName;
-    }
-
+    /**
+     * 鍙傛暟閿悕
+     */
+    @ApiModelProperty(value = "鍙傛暟閿悕")
+    @ExcelProperty(value = "鍙傛暟閿悕")
     @NotBlank(message = "鍙傛暟閿悕闀垮害涓嶈兘涓虹┖")
     @Size(min = 0, max = 100, message = "鍙傛暟閿悕闀垮害涓嶈兘瓒呰繃100涓瓧绗�")
-    public String getConfigKey()
-    {
-        return configKey;
-    }
+    private String configKey;
 
-    public void setConfigKey(String configKey)
-    {
-        this.configKey = configKey;
-    }
-
+    /**
+     * 鍙傛暟閿��
+     */
+    @ApiModelProperty(value = "鍙傛暟閿��")
+    @ExcelProperty(value = "鍙傛暟閿��")
     @NotBlank(message = "鍙傛暟閿�间笉鑳戒负绌�")
     @Size(min = 0, max = 500, message = "鍙傛暟閿�奸暱搴︿笉鑳借秴杩�500涓瓧绗�")
-    public String getConfigValue()
-    {
-        return configValue;
-    }
+    private String configValue;
 
-    public void setConfigValue(String configValue)
-    {
-        this.configValue = configValue;
-    }
+    /**
+     * 绯荤粺鍐呯疆锛圷鏄� N鍚︼級
+     */
+    @ApiModelProperty(value = "绯荤粺鍐呯疆锛圷鏄� N鍚︼級")
+    @ExcelProperty(value = "绯荤粺鍐呯疆", converter = ExcelDictConvert.class)
+	@ExcelDictFormat(dictType = "sys_yes_no")
+    private String configType;
 
-    public String getConfigType()
-    {
-        return configType;
-    }
+    /**
+     * 澶囨敞
+     */
+    @ApiModelProperty(value = "澶囨敞")
+    private String remark;
 
-    public void setConfigType(String configType)
-    {
-        this.configType = configType;
-    }
-    
-    @Override
-    public String toString() {
-        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
-            .append("configId", getConfigId())
-            .append("configName", getConfigName())
-            .append("configKey", getConfigKey())
-            .append("configValue", getConfigValue())
-            .append("configType", getConfigType())
-            .append("createBy", getCreateBy())
-            .append("createTime", getCreateTime())
-            .append("updateBy", getUpdateBy())
-            .append("updateTime", getUpdateTime())
-            .append("remark", getRemark())
-            .toString();
-    }
 }

--
Gitblit v1.9.3