- ${log.path}/sys-info.log
+
+
+
+ ${log.pattern}
+
+
+
+
+
+ ${log.path}/sys-info.log
-
+
- ${log.path}/sys-info.%d{yyyy-MM-dd}.log
-
- 60
-
-
- ${log.pattern}
-
-
+ ${log.path}/sys-info.%d{yyyy-MM-dd}.log
+
+ 60
+
+
+ ${log.pattern}
+
+
INFO
@@ -33,16 +33,16 @@
DENY
-
-
-
- ${log.path}/sys-error.log
+
+
+
+ ${log.path}/sys-error.log
${log.path}/sys-error.%d{yyyy-MM-dd}.log
-
- 60
+
+ 60
${log.pattern}
@@ -50,16 +50,16 @@
ERROR
-
+
ACCEPT
-
+
DENY
-
-
+
+
- ${log.path}/sys-user.log
+ ${log.path}/sys-user.log
${log.path}/sys-user.%d{yyyy-MM-dd}.log
@@ -70,23 +70,23 @@
${log.pattern}
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
-
-
+
-
-
+
+
+
+
+
+
+
+
diff --git a/spring-boot/ruoyi-admin/src/main/resources/mybatis/mybatis-config.xml b/spring-boot/ruoyi-admin/src/main/resources/mybatis/mybatis-config.xml
index e8b52be8..55005995 100644
--- a/spring-boot/ruoyi-admin/src/main/resources/mybatis/mybatis-config.xml
+++ b/spring-boot/ruoyi-admin/src/main/resources/mybatis/mybatis-config.xml
@@ -1,15 +1,15 @@
+ PUBLIC "-//mybatis.org//DTD Config 3.0//EN"
+ "http://mybatis.org/dtd/mybatis-3-config.dtd">
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
diff --git a/spring-boot/ruoyi-common/pom.xml b/spring-boot/ruoyi-common/pom.xml
index bc2327cb..e6d5e8e0 100644
--- a/spring-boot/ruoyi-common/pom.xml
+++ b/spring-boot/ruoyi-common/pom.xml
@@ -52,7 +52,7 @@
org.apache.commons
commons-lang3
-
+
com.fasterxml.jackson.core
@@ -118,6 +118,31 @@
javax.servlet
javax.servlet-api
+
+ org.projectlombok
+ lombok
+
+
+ org.projectlombok
+ lombok
+ 1.18.20
+
+
+ com.github.binarywang
+ weixin-java-miniapp
+ 4.1.5.B
+ compile
+
+
+ com.github.binarywang
+ weixin-java-miniapp
+ 4.1.5.B
+
+
+ com.github.binarywang
+ weixin-java-mp
+ 4.1.5.B
+
diff --git a/spring-boot/ruoyi-common/src/main/java/com/ruoyi/common/annotation/DataScope.java b/spring-boot/ruoyi-common/src/main/java/com/ruoyi/common/annotation/DataScope.java
index 176878e9..b0d4b7ff 100644
--- a/spring-boot/ruoyi-common/src/main/java/com/ruoyi/common/annotation/DataScope.java
+++ b/spring-boot/ruoyi-common/src/main/java/com/ruoyi/common/annotation/DataScope.java
@@ -8,14 +8,13 @@ import java.lang.annotation.Target;
/**
* 数据权限过滤注解
- *
+ *
* @author ruoyi
*/
@Target(ElementType.METHOD)
@Retention(RetentionPolicy.RUNTIME)
@Documented
-public @interface DataScope
-{
+public @interface DataScope {
/**
* 部门表的别名
*/
diff --git a/spring-boot/ruoyi-common/src/main/java/com/ruoyi/common/annotation/DataSource.java b/spring-boot/ruoyi-common/src/main/java/com/ruoyi/common/annotation/DataSource.java
index 79cd191f..48f6ffdb 100644
--- a/spring-boot/ruoyi-common/src/main/java/com/ruoyi/common/annotation/DataSource.java
+++ b/spring-boot/ruoyi-common/src/main/java/com/ruoyi/common/annotation/DataSource.java
@@ -6,21 +6,21 @@ import java.lang.annotation.Inherited;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
+
import com.ruoyi.common.enums.DataSourceType;
/**
* 自定义多数据源切换注解
- *
+ *
* 优先级:先方法,后类,如果方法覆盖了类上的数据源类型,以方法的为准,否则以类上的为准
*
* @author ruoyi
*/
-@Target({ ElementType.METHOD, ElementType.TYPE })
+@Target({ElementType.METHOD, ElementType.TYPE})
@Retention(RetentionPolicy.RUNTIME)
@Documented
@Inherited
-public @interface DataSource
-{
+public @interface DataSource {
/**
* 切换数据源名称
*/
diff --git a/spring-boot/ruoyi-common/src/main/java/com/ruoyi/common/annotation/Excel.java b/spring-boot/ruoyi-common/src/main/java/com/ruoyi/common/annotation/Excel.java
index b09f4cec..c21655e8 100644
--- a/spring-boot/ruoyi-common/src/main/java/com/ruoyi/common/annotation/Excel.java
+++ b/spring-boot/ruoyi-common/src/main/java/com/ruoyi/common/annotation/Excel.java
@@ -8,13 +8,12 @@ import java.math.BigDecimal;
/**
* 自定义导出Excel数据注解
- *
+ *
* @author ruoyi
*/
@Retention(RetentionPolicy.RUNTIME)
@Target(ElementType.FIELD)
-public @interface Excel
-{
+public @interface Excel {
/**
* 导出时在excel中排序
*/
@@ -110,18 +109,15 @@ public @interface Excel
*/
Align align() default Align.AUTO;
- public enum Align
- {
+ public enum Align {
AUTO(0), LEFT(1), CENTER(2), RIGHT(3);
private final int value;
- Align(int value)
- {
+ Align(int value) {
this.value = value;
}
- public int value()
- {
+ public int value() {
return this.value;
}
}
@@ -131,34 +127,28 @@ public @interface Excel
*/
Type type() default Type.ALL;
- public enum Type
- {
+ public enum Type {
ALL(0), EXPORT(1), IMPORT(2);
private final int value;
- Type(int value)
- {
+ Type(int value) {
this.value = value;
}
- public int value()
- {
+ public int value() {
return this.value;
}
}
- public enum ColumnType
- {
+ public enum ColumnType {
NUMERIC(0), STRING(1), IMAGE(2);
private final int value;
- ColumnType(int value)
- {
+ ColumnType(int value) {
this.value = value;
}
- public int value()
- {
+ public int value() {
return this.value;
}
}
diff --git a/spring-boot/ruoyi-common/src/main/java/com/ruoyi/common/annotation/Excels.java b/spring-boot/ruoyi-common/src/main/java/com/ruoyi/common/annotation/Excels.java
index d33004f5..271210ef 100644
--- a/spring-boot/ruoyi-common/src/main/java/com/ruoyi/common/annotation/Excels.java
+++ b/spring-boot/ruoyi-common/src/main/java/com/ruoyi/common/annotation/Excels.java
@@ -7,12 +7,11 @@ import java.lang.annotation.Target;
/**
* Excel注解集
- *
+ *
* @author ruoyi
*/
@Target(ElementType.FIELD)
@Retention(RetentionPolicy.RUNTIME)
-public @interface Excels
-{
+public @interface Excels {
Excel[] value();
}
diff --git a/spring-boot/ruoyi-common/src/main/java/com/ruoyi/common/annotation/Log.java b/spring-boot/ruoyi-common/src/main/java/com/ruoyi/common/annotation/Log.java
index eb05dc7c..a8683c8a 100644
--- a/spring-boot/ruoyi-common/src/main/java/com/ruoyi/common/annotation/Log.java
+++ b/spring-boot/ruoyi-common/src/main/java/com/ruoyi/common/annotation/Log.java
@@ -5,22 +5,21 @@ import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
+
import com.ruoyi.common.enums.BusinessType;
import com.ruoyi.common.enums.OperatorType;
/**
* 自定义操作日志记录注解
- *
- * @author ruoyi
*
+ * @author ruoyi
*/
-@Target({ ElementType.PARAMETER, ElementType.METHOD })
+@Target({ElementType.PARAMETER, ElementType.METHOD})
@Retention(RetentionPolicy.RUNTIME)
@Documented
-public @interface Log
-{
+public @interface Log {
/**
- * 模块
+ * 模块
*/
public String title() default "";
diff --git a/spring-boot/ruoyi-common/src/main/java/com/ruoyi/common/annotation/RepeatSubmit.java b/spring-boot/ruoyi-common/src/main/java/com/ruoyi/common/annotation/RepeatSubmit.java
index 9e350f17..29c667f8 100644
--- a/spring-boot/ruoyi-common/src/main/java/com/ruoyi/common/annotation/RepeatSubmit.java
+++ b/spring-boot/ruoyi-common/src/main/java/com/ruoyi/common/annotation/RepeatSubmit.java
@@ -9,15 +9,13 @@ import java.lang.annotation.Target;
/**
* 自定义注解防止表单重复提交
- *
- * @author ruoyi
*
+ * @author ruoyi
*/
@Inherited
@Target(ElementType.METHOD)
@Retention(RetentionPolicy.RUNTIME)
@Documented
-public @interface RepeatSubmit
-{
+public @interface RepeatSubmit {
}
diff --git a/spring-boot/ruoyi-common/src/main/java/com/ruoyi/common/config/RuoYiConfig.java b/spring-boot/ruoyi-common/src/main/java/com/ruoyi/common/config/RuoYiConfig.java
index d5d8723f..efc85bdb 100644
--- a/spring-boot/ruoyi-common/src/main/java/com/ruoyi/common/config/RuoYiConfig.java
+++ b/spring-boot/ruoyi-common/src/main/java/com/ruoyi/common/config/RuoYiConfig.java
@@ -5,112 +5,108 @@ import org.springframework.stereotype.Component;
/**
* 读取项目相关配置
- *
+ *
* @author ruoyi
*/
@Component
@ConfigurationProperties(prefix = "ruoyi")
-public class RuoYiConfig
-{
- /** 项目名称 */
+public class RuoYiConfig {
+ /**
+ * 项目名称
+ */
private String name;
- /** 版本 */
+ /**
+ * 版本
+ */
private String version;
- /** 版权年份 */
+ /**
+ * 版权年份
+ */
private String copyrightYear;
- /** 实例演示开关 */
+ /**
+ * 实例演示开关
+ */
private boolean demoEnabled;
- /** 上传路径 */
+ /**
+ * 上传路径
+ */
private static String profile;
- /** 获取地址开关 */
+ /**
+ * 获取地址开关
+ */
private static boolean addressEnabled;
- public String getName()
- {
+ public String getName() {
return name;
}
- public void setName(String name)
- {
+ public void setName(String name) {
this.name = name;
}
- public String getVersion()
- {
+ public String getVersion() {
return version;
}
- public void setVersion(String version)
- {
+ public void setVersion(String version) {
this.version = version;
}
- public String getCopyrightYear()
- {
+ public String getCopyrightYear() {
return copyrightYear;
}
- public void setCopyrightYear(String copyrightYear)
- {
+ public void setCopyrightYear(String copyrightYear) {
this.copyrightYear = copyrightYear;
}
- public boolean isDemoEnabled()
- {
+ public boolean isDemoEnabled() {
return demoEnabled;
}
- public void setDemoEnabled(boolean demoEnabled)
- {
+ public void setDemoEnabled(boolean demoEnabled) {
this.demoEnabled = demoEnabled;
}
- public static String getProfile()
- {
+ public static String getProfile() {
return profile;
}
- public void setProfile(String profile)
- {
+ public void setProfile(String profile) {
RuoYiConfig.profile = profile;
}
- public static boolean isAddressEnabled()
- {
+ public static boolean isAddressEnabled() {
return addressEnabled;
}
- public void setAddressEnabled(boolean addressEnabled)
- {
+ public void setAddressEnabled(boolean addressEnabled) {
RuoYiConfig.addressEnabled = addressEnabled;
}
/**
* 获取头像上传路径
*/
- public static String getAvatarPath()
- {
+ public static String getAvatarPath() {
return getProfile() + "/avatar";
}
/**
* 获取下载路径
*/
- public static String getDownloadPath()
- {
+ public static String getDownloadPath() {
return getProfile() + "/download/";
}
/**
* 获取上传路径
*/
- public static String getUploadPath()
- {
+ public static String getUploadPath() {
return getProfile() + "/upload";
}
}
diff --git a/spring-boot/ruoyi-common/src/main/java/com/ruoyi/common/config/WxConfig.java b/spring-boot/ruoyi-common/src/main/java/com/ruoyi/common/config/WxConfig.java
new file mode 100644
index 00000000..b07732cc
--- /dev/null
+++ b/spring-boot/ruoyi-common/src/main/java/com/ruoyi/common/config/WxConfig.java
@@ -0,0 +1,36 @@
+package com.ruoyi.common.config;
+
+import cn.binarywang.wx.miniapp.api.WxMaService;
+import cn.binarywang.wx.miniapp.api.impl.WxMaServiceImpl;
+import cn.binarywang.wx.miniapp.config.WxMaConfig;
+import cn.binarywang.wx.miniapp.config.impl.WxMaDefaultConfigImpl;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.context.annotation.Bean;
+import org.springframework.context.annotation.Configuration;
+
+@Configuration
+public class WxConfig {
+
+ @Autowired
+ private WxProperties properties;
+
+ @Bean
+ public WxMaConfig wxMaConfig() {
+ WxMaDefaultConfigImpl config = new WxMaDefaultConfigImpl();
+
+ config.setAppid(properties.getAppId());
+ config.setSecret(properties.getAppSecret());
+ return config;
+ }
+
+ @Bean
+ public WxMaService wxMaService(WxMaConfig maConfig) {
+ WxMaService service = new WxMaServiceImpl();
+ service.setWxMaConfig(maConfig);
+ return service;
+ }
+
+}
+
+
+
diff --git a/spring-boot/ruoyi-common/src/main/java/com/ruoyi/common/config/WxMpConfig.java b/spring-boot/ruoyi-common/src/main/java/com/ruoyi/common/config/WxMpConfig.java
new file mode 100644
index 00000000..71531c32
--- /dev/null
+++ b/spring-boot/ruoyi-common/src/main/java/com/ruoyi/common/config/WxMpConfig.java
@@ -0,0 +1,50 @@
+package com.ruoyi.common.config;
+
+import com.ruoyi.common.constant.Constants;
+import me.chanjar.weixin.mp.api.WxMpQrcodeService;
+import me.chanjar.weixin.mp.api.WxMpService;
+import me.chanjar.weixin.mp.api.impl.WxMpQrcodeServiceImpl;
+import me.chanjar.weixin.mp.api.impl.WxMpServiceImpl;
+import me.chanjar.weixin.mp.config.WxMpConfigStorage;
+import me.chanjar.weixin.mp.config.impl.WxMpDefaultConfigImpl;
+import org.springframework.context.annotation.Bean;
+import org.springframework.context.annotation.Configuration;
+
+/**
+ * 类名: WxConfig
+ * 描述: TODO
+ * 时间: 2021/1/10 13:08
+ * 开发人: admin
+ */
+@Configuration
+public class WxMpConfig {
+
+ @Bean
+ public WxMpConfigStorage wxMpConfigStorage() {
+
+ WxMpDefaultConfigImpl wxMpInMemoryConfigStorage = new WxMpDefaultConfigImpl();
+ //设置appid 这个在项目中肯定是通过配置来实现
+ wxMpInMemoryConfigStorage.setAppId(Constants.wxAppId);
+ //设置密码
+ wxMpInMemoryConfigStorage.setSecret(Constants.wxAppSecret);
+ return wxMpInMemoryConfigStorage;
+
+ }
+
+ @Bean//文档中需要用到这个对象
+ public WxMpService wxMpService() {
+ WxMpServiceImpl wxMpService = new WxMpServiceImpl();
+ //设置微信配置的存储
+ wxMpService.setWxMpConfigStorage(wxMpConfigStorage());
+ return wxMpService;
+
+ }
+
+ @Bean//文档中需要用到这个对象
+ public WxMpQrcodeService wxMpQrcodeService() {
+ WxMpQrcodeService wxMpQrcodeService = new WxMpQrcodeServiceImpl(wxMpService());
+ //设置微信配置的存储
+ return wxMpQrcodeService;
+
+ }
+}
diff --git a/spring-boot/ruoyi-common/src/main/java/com/ruoyi/common/config/WxProperties.java b/spring-boot/ruoyi-common/src/main/java/com/ruoyi/common/config/WxProperties.java
new file mode 100644
index 00000000..05fb732c
--- /dev/null
+++ b/spring-boot/ruoyi-common/src/main/java/com/ruoyi/common/config/WxProperties.java
@@ -0,0 +1,69 @@
+package com.ruoyi.common.config;
+
+import org.springframework.boot.context.properties.ConfigurationProperties;
+import org.springframework.context.annotation.Configuration;
+
+@Configuration
+@ConfigurationProperties(prefix = "wx.miniapp")
+public class WxProperties {
+
+ private String appId;
+
+ private String appSecret;
+
+ private String mchId;
+
+ private String mchKey;
+
+ private String notifyUrl;
+
+ private String keyPath;
+
+ public String getNotifyUrl() {
+ return notifyUrl;
+ }
+
+ public void setNotifyUrl(String notifyUrl) {
+ this.notifyUrl = notifyUrl;
+ }
+
+ public String getMchKey() {
+ return mchKey;
+ }
+
+ public void setMchKey(String mchKey) {
+ this.mchKey = mchKey;
+ }
+
+ public String getAppId() {
+ return this.appId;
+ }
+
+ public void setAppId(String appId) {
+ this.appId = appId;
+ }
+
+ public String getAppSecret() {
+ return appSecret;
+ }
+
+ public void setAppSecret(String appSecret) {
+ this.appSecret = appSecret;
+ }
+
+ public String getMchId() {
+ return mchId;
+ }
+
+ public void setMchId(String mchId) {
+ this.mchId = mchId;
+ }
+
+ public String getKeyPath() {
+ return keyPath;
+ }
+
+ public void setKeyPath(String keyPath) {
+ this.keyPath = keyPath;
+ }
+}
\ No newline at end of file
diff --git a/spring-boot/ruoyi-common/src/main/java/com/ruoyi/common/constant/Constants.java b/spring-boot/ruoyi-common/src/main/java/com/ruoyi/common/constant/Constants.java
index 6e13ac15..9cb56056 100644
--- a/spring-boot/ruoyi-common/src/main/java/com/ruoyi/common/constant/Constants.java
+++ b/spring-boot/ruoyi-common/src/main/java/com/ruoyi/common/constant/Constants.java
@@ -2,11 +2,10 @@ package com.ruoyi.common.constant;
/**
* 通用常量信息
- *
+ *
* @author ruoyi
*/
-public class Constants
-{
+public class Constants {
/**
* UTF-8 字符集
*/
@@ -61,7 +60,7 @@ public class Constants
* 登录用户 redis key
*/
public static final String LOGIN_TOKEN_KEY = "login_tokens:";
-
+
/**
* 防重提交 redis key
*/
@@ -126,4 +125,8 @@ public class Constants
* 资源映射路径 前缀
*/
public static final String RESOURCE_PREFIX = "/profile";
+ public static final String DEFAULT_AVATAR = "https://c-ssl.duitang.com/uploads/item/201912/27/20191227145714_rtHRc.thumb.1000_0.jpeg";
+
+ public static String wxAppId = "wx00e680cbf69d159c";
+ public static String wxAppSecret = "4902e0e4470663112f505f498b036c55";
}
diff --git a/spring-boot/ruoyi-common/src/main/java/com/ruoyi/common/constant/GenConstants.java b/spring-boot/ruoyi-common/src/main/java/com/ruoyi/common/constant/GenConstants.java
index 1fa328e4..c831bd7f 100644
--- a/spring-boot/ruoyi-common/src/main/java/com/ruoyi/common/constant/GenConstants.java
+++ b/spring-boot/ruoyi-common/src/main/java/com/ruoyi/common/constant/GenConstants.java
@@ -2,113 +2,180 @@ package com.ruoyi.common.constant;
/**
* 代码生成通用常量
- *
+ *
* @author ruoyi
*/
-public class GenConstants
-{
- /** 单表(增删改查) */
+public class GenConstants {
+ /**
+ * 单表(增删改查)
+ */
public static final String TPL_CRUD = "crud";
- /** 树表(增删改查) */
+ /**
+ * 树表(增删改查)
+ */
public static final String TPL_TREE = "tree";
- /** 主子表(增删改查) */
+ /**
+ * 主子表(增删改查)
+ */
public static final String TPL_SUB = "sub";
- /** 树编码字段 */
+ /**
+ * 树编码字段
+ */
public static final String TREE_CODE = "treeCode";
- /** 树父编码字段 */
+ /**
+ * 树父编码字段
+ */
public static final String TREE_PARENT_CODE = "treeParentCode";
- /** 树名称字段 */
+ /**
+ * 树名称字段
+ */
public static final String TREE_NAME = "treeName";
- /** 上级菜单ID字段 */
+ /**
+ * 上级菜单ID字段
+ */
public static final String PARENT_MENU_ID = "parentMenuId";
- /** 上级菜单名称字段 */
+ /**
+ * 上级菜单名称字段
+ */
public static final String PARENT_MENU_NAME = "parentMenuName";
- /** 数据库字符串类型 */
- public static final String[] COLUMNTYPE_STR = { "char", "varchar", "nvarchar", "varchar2" };
+ /**
+ * 数据库字符串类型
+ */
+ public static final String[] COLUMNTYPE_STR = {"char", "varchar", "nvarchar", "varchar2"};
- /** 数据库文本类型 */
- public static final String[] COLUMNTYPE_TEXT = { "tinytext", "text", "mediumtext", "longtext" };
+ /**
+ * 数据库文本类型
+ */
+ public static final String[] COLUMNTYPE_TEXT = {"tinytext", "text", "mediumtext", "longtext"};
- /** 数据库时间类型 */
- public static final String[] COLUMNTYPE_TIME = { "datetime", "time", "date", "timestamp" };
+ /**
+ * 数据库时间类型
+ */
+ public static final String[] COLUMNTYPE_TIME = {"datetime", "time", "date", "timestamp"};
- /** 数据库数字类型 */
- public static final String[] COLUMNTYPE_NUMBER = { "tinyint", "smallint", "mediumint", "int", "number", "integer",
- "bit", "bigint", "float", "double", "decimal" };
+ /**
+ * 数据库数字类型
+ */
+ public static final String[] COLUMNTYPE_NUMBER = {"tinyint", "smallint", "mediumint", "int", "number", "integer",
+ "bit", "bigint", "float", "double", "decimal"};
- /** 页面不需要编辑字段 */
- public static final String[] COLUMNNAME_NOT_EDIT = { "id", "create_by", "create_time", "del_flag" };
+ /**
+ * 页面不需要编辑字段
+ */
+ public static final String[] COLUMNNAME_NOT_EDIT = {"id", "create_by", "create_time", "del_flag"};
- /** 页面不需要显示的列表字段 */
- public static final String[] COLUMNNAME_NOT_LIST = { "id", "create_by", "create_time", "del_flag", "update_by",
- "update_time" };
+ /**
+ * 页面不需要显示的列表字段
+ */
+ public static final String[] COLUMNNAME_NOT_LIST = {"id", "create_by", "create_time", "del_flag", "update_by",
+ "update_time"};
- /** 页面不需要查询字段 */
- public static final String[] COLUMNNAME_NOT_QUERY = { "id", "create_by", "create_time", "del_flag", "update_by",
- "update_time", "remark" };
+ /**
+ * 页面不需要查询字段
+ */
+ public static final String[] COLUMNNAME_NOT_QUERY = {"id", "create_by", "create_time", "del_flag", "update_by",
+ "update_time", "remark"};
- /** Entity基类字段 */
- public static final String[] BASE_ENTITY = { "createBy", "createTime", "updateBy", "updateTime", "remark" };
+ /**
+ * Entity基类字段
+ */
+ public static final String[] BASE_ENTITY = {"createBy", "createTime", "updateBy", "updateTime", "remark"};
- /** Tree基类字段 */
- public static final String[] TREE_ENTITY = { "parentName", "parentId", "orderNum", "ancestors", "children" };
+ /**
+ * Tree基类字段
+ */
+ public static final String[] TREE_ENTITY = {"parentName", "parentId", "orderNum", "ancestors", "children"};
- /** 文本框 */
+ /**
+ * 文本框
+ */
public static final String HTML_INPUT = "input";
- /** 文本域 */
+ /**
+ * 文本域
+ */
public static final String HTML_TEXTAREA = "textarea";
- /** 下拉框 */
+ /**
+ * 下拉框
+ */
public static final String HTML_SELECT = "select";
- /** 单选框 */
+ /**
+ * 单选框
+ */
public static final String HTML_RADIO = "radio";
- /** 复选框 */
+ /**
+ * 复选框
+ */
public static final String HTML_CHECKBOX = "checkbox";
- /** 日期控件 */
+ /**
+ * 日期控件
+ */
public static final String HTML_DATETIME = "datetime";
- /** 图片上传控件 */
+ /**
+ * 图片上传控件
+ */
public static final String HTML_IMAGE_UPLOAD = "imageUpload";
- /** 文件上传控件 */
+ /**
+ * 文件上传控件
+ */
public static final String HTML_FILE_UPLOAD = "fileUpload";
- /** 富文本控件 */
+ /**
+ * 富文本控件
+ */
public static final String HTML_EDITOR = "editor";
- /** 字符串类型 */
+ /**
+ * 字符串类型
+ */
public static final String TYPE_STRING = "String";
- /** 整型 */
+ /**
+ * 整型
+ */
public static final String TYPE_INTEGER = "Integer";
- /** 长整型 */
+ /**
+ * 长整型
+ */
public static final String TYPE_LONG = "Long";
- /** 浮点型 */
+ /**
+ * 浮点型
+ */
public static final String TYPE_DOUBLE = "Double";
- /** 高精度计算类型 */
+ /**
+ * 高精度计算类型
+ */
public static final String TYPE_BIGDECIMAL = "BigDecimal";
- /** 时间类型 */
+ /**
+ * 时间类型
+ */
public static final String TYPE_DATE = "Date";
- /** 模糊查询 */
+ /**
+ * 模糊查询
+ */
public static final String QUERY_LIKE = "LIKE";
- /** 需要 */
+ /**
+ * 需要
+ */
public static final String REQUIRE = "1";
}
diff --git a/spring-boot/ruoyi-common/src/main/java/com/ruoyi/common/constant/HttpStatus.java b/spring-boot/ruoyi-common/src/main/java/com/ruoyi/common/constant/HttpStatus.java
index d60afee2..4ce8f31a 100644
--- a/spring-boot/ruoyi-common/src/main/java/com/ruoyi/common/constant/HttpStatus.java
+++ b/spring-boot/ruoyi-common/src/main/java/com/ruoyi/common/constant/HttpStatus.java
@@ -2,11 +2,10 @@ package com.ruoyi.common.constant;
/**
* 返回状态码
- *
+ *
* @author ruoyi
*/
-public class HttpStatus
-{
+public class HttpStatus {
/**
* 操作成功
*/
diff --git a/spring-boot/ruoyi-common/src/main/java/com/ruoyi/common/constant/ScheduleConstants.java b/spring-boot/ruoyi-common/src/main/java/com/ruoyi/common/constant/ScheduleConstants.java
index 62ad8154..0af14ad2 100644
--- a/spring-boot/ruoyi-common/src/main/java/com/ruoyi/common/constant/ScheduleConstants.java
+++ b/spring-boot/ruoyi-common/src/main/java/com/ruoyi/common/constant/ScheduleConstants.java
@@ -2,30 +2,38 @@ package com.ruoyi.common.constant;
/**
* 任务调度通用常量
- *
+ *
* @author ruoyi
*/
-public class ScheduleConstants
-{
+public class ScheduleConstants {
public static final String TASK_CLASS_NAME = "TASK_CLASS_NAME";
- /** 执行目标key */
+ /**
+ * 执行目标key
+ */
public static final String TASK_PROPERTIES = "TASK_PROPERTIES";
- /** 默认 */
+ /**
+ * 默认
+ */
public static final String MISFIRE_DEFAULT = "0";
- /** 立即触发执行 */
+ /**
+ * 立即触发执行
+ */
public static final String MISFIRE_IGNORE_MISFIRES = "1";
- /** 触发一次执行 */
+ /**
+ * 触发一次执行
+ */
public static final String MISFIRE_FIRE_AND_PROCEED = "2";
- /** 不触发立即执行 */
+ /**
+ * 不触发立即执行
+ */
public static final String MISFIRE_DO_NOTHING = "3";
- public enum Status
- {
+ public enum Status {
/**
* 正常
*/
@@ -37,13 +45,11 @@ public class ScheduleConstants
private String value;
- private Status(String value)
- {
+ private Status(String value) {
this.value = value;
}
- public String getValue()
- {
+ public String getValue() {
return value;
}
}
diff --git a/spring-boot/ruoyi-common/src/main/java/com/ruoyi/common/constant/UserConstants.java b/spring-boot/ruoyi-common/src/main/java/com/ruoyi/common/constant/UserConstants.java
index 56b46ba8..67bc9baf 100644
--- a/spring-boot/ruoyi-common/src/main/java/com/ruoyi/common/constant/UserConstants.java
+++ b/spring-boot/ruoyi-common/src/main/java/com/ruoyi/common/constant/UserConstants.java
@@ -2,62 +2,93 @@ package com.ruoyi.common.constant;
/**
* 用户常量信息
- *
+ *
* @author ruoyi
*/
-public class UserConstants
-{
+public class UserConstants {
/**
* 平台内系统用户的唯一标志
*/
public static final String SYS_USER = "SYS_USER";
- /** 正常状态 */
+ /**
+ * 正常状态
+ */
public static final String NORMAL = "0";
- /** 异常状态 */
+ /**
+ * 异常状态
+ */
public static final String EXCEPTION = "1";
- /** 用户封禁状态 */
+ /**
+ * 用户封禁状态
+ */
public static final String USER_DISABLE = "1";
- /** 角色封禁状态 */
+ /**
+ * 角色封禁状态
+ */
public static final String ROLE_DISABLE = "1";
- /** 部门正常状态 */
+ /**
+ * 部门正常状态
+ */
public static final String DEPT_NORMAL = "0";
- /** 部门停用状态 */
+ /**
+ * 部门停用状态
+ */
public static final String DEPT_DISABLE = "1";
- /** 字典正常状态 */
+ /**
+ * 字典正常状态
+ */
public static final String DICT_NORMAL = "0";
- /** 是否为系统默认(是) */
+ /**
+ * 是否为系统默认(是)
+ */
public static final String YES = "Y";
- /** 是否菜单外链(是) */
+ /**
+ * 是否菜单外链(是)
+ */
public static final String YES_FRAME = "0";
- /** 是否菜单外链(否) */
+ /**
+ * 是否菜单外链(否)
+ */
public static final String NO_FRAME = "1";
- /** 菜单类型(目录) */
+ /**
+ * 菜单类型(目录)
+ */
public static final String TYPE_DIR = "M";
- /** 菜单类型(菜单) */
+ /**
+ * 菜单类型(菜单)
+ */
public static final String TYPE_MENU = "C";
- /** 菜单类型(按钮) */
+ /**
+ * 菜单类型(按钮)
+ */
public static final String TYPE_BUTTON = "F";
- /** Layout组件标识 */
+ /**
+ * Layout组件标识
+ */
public final static String LAYOUT = "Layout";
- /** ParentView组件标识 */
+ /**
+ * ParentView组件标识
+ */
public final static String PARENT_VIEW = "ParentView";
- /** 校验返回结果码 */
+ /**
+ * 校验返回结果码
+ */
public final static String UNIQUE = "0";
public final static String NOT_UNIQUE = "1";
}
diff --git a/spring-boot/ruoyi-common/src/main/java/com/ruoyi/common/core/controller/BaseController.java b/spring-boot/ruoyi-common/src/main/java/com/ruoyi/common/core/controller/BaseController.java
index 2a31e70f..2eae5289 100644
--- a/spring-boot/ruoyi-common/src/main/java/com/ruoyi/common/core/controller/BaseController.java
+++ b/spring-boot/ruoyi-common/src/main/java/com/ruoyi/common/core/controller/BaseController.java
@@ -3,6 +3,7 @@ package com.ruoyi.common.core.controller;
import java.beans.PropertyEditorSupport;
import java.util.Date;
import java.util.List;
+
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.web.bind.WebDataBinder;
@@ -20,25 +21,21 @@ import com.ruoyi.common.utils.sql.SqlUtil;
/**
* web层通用数据处理
- *
+ *
* @author ruoyi
*/
-public class BaseController
-{
+public class BaseController {
protected final Logger logger = LoggerFactory.getLogger(BaseController.class);
/**
* 将前台传递过来的日期格式的字符串,自动转化为Date类型
*/
@InitBinder
- public void initBinder(WebDataBinder binder)
- {
+ public void initBinder(WebDataBinder binder) {
// Date 类型转换
- binder.registerCustomEditor(Date.class, new PropertyEditorSupport()
- {
+ binder.registerCustomEditor(Date.class, new PropertyEditorSupport() {
@Override
- public void setAsText(String text)
- {
+ public void setAsText(String text) {
setValue(DateUtils.parseDate(text));
}
});
@@ -47,13 +44,11 @@ public class BaseController
/**
* 设置请求分页数据
*/
- protected void startPage()
- {
+ protected void startPage() {
PageDomain pageDomain = TableSupport.buildPageRequest();
Integer pageNum = pageDomain.getPageNum();
Integer pageSize = pageDomain.getPageSize();
- if (StringUtils.isNotNull(pageNum) && StringUtils.isNotNull(pageSize))
- {
+ if (StringUtils.isNotNull(pageNum) && StringUtils.isNotNull(pageSize)) {
String orderBy = SqlUtil.escapeOrderBySql(pageDomain.getOrderBy());
PageHelper.startPage(pageNum, pageSize, orderBy);
}
@@ -62,9 +57,8 @@ public class BaseController
/**
* 响应请求分页数据
*/
- @SuppressWarnings({ "rawtypes", "unchecked" })
- protected TableDataInfo getDataTable(List> list)
- {
+ @SuppressWarnings({"rawtypes", "unchecked"})
+ protected TableDataInfo getDataTable(List> list) {
TableDataInfo rspData = new TableDataInfo();
rspData.setCode(HttpStatus.SUCCESS);
rspData.setMsg("查询成功");
@@ -75,20 +69,18 @@ public class BaseController
/**
* 响应返回结果
- *
+ *
* @param rows 影响行数
* @return 操作结果
*/
- protected AjaxResult toAjax(int rows)
- {
+ protected AjaxResult toAjax(int rows) {
return rows > 0 ? AjaxResult.success() : AjaxResult.error();
}
/**
* 页面跳转
*/
- public String redirect(String url)
- {
+ public String redirect(String url) {
return StringUtils.format("redirect:{}", url);
}
}
diff --git a/spring-boot/ruoyi-common/src/main/java/com/ruoyi/common/core/domain/AjaxResult.java b/spring-boot/ruoyi-common/src/main/java/com/ruoyi/common/core/domain/AjaxResult.java
index 28e5a688..f6db15df 100644
--- a/spring-boot/ruoyi-common/src/main/java/com/ruoyi/common/core/domain/AjaxResult.java
+++ b/spring-boot/ruoyi-common/src/main/java/com/ruoyi/common/core/domain/AjaxResult.java
@@ -1,148 +1,142 @@
package com.ruoyi.common.core.domain;
import java.util.HashMap;
+
import com.ruoyi.common.constant.HttpStatus;
import com.ruoyi.common.utils.StringUtils;
/**
* 操作消息提醒
- *
+ *
* @author ruoyi
*/
-public class AjaxResult extends HashMap
-{
+public class AjaxResult extends HashMap {
private static final long serialVersionUID = 1L;
- /** 状态码 */
+ /**
+ * 状态码
+ */
public static final String CODE_TAG = "code";
- /** 返回内容 */
+ /**
+ * 返回内容
+ */
public static final String MSG_TAG = "msg";
- /** 数据对象 */
+ /**
+ * 数据对象
+ */
public static final String DATA_TAG = "data";
/**
* 初始化一个新创建的 AjaxResult 对象,使其表示一个空消息。
*/
- public AjaxResult()
- {
+ public AjaxResult() {
}
/**
* 初始化一个新创建的 AjaxResult 对象
- *
+ *
* @param code 状态码
- * @param msg 返回内容
+ * @param msg 返回内容
*/
- public AjaxResult(int code, String msg)
- {
+ public AjaxResult(int code, String msg) {
super.put(CODE_TAG, code);
super.put(MSG_TAG, msg);
}
/**
* 初始化一个新创建的 AjaxResult 对象
- *
+ *
* @param code 状态码
- * @param msg 返回内容
+ * @param msg 返回内容
* @param data 数据对象
*/
- public AjaxResult(int code, String msg, Object data)
- {
+ public AjaxResult(int code, String msg, Object data) {
super.put(CODE_TAG, code);
super.put(MSG_TAG, msg);
- if (StringUtils.isNotNull(data))
- {
+ if (StringUtils.isNotNull(data)) {
super.put(DATA_TAG, data);
}
}
/**
* 返回成功消息
- *
+ *
* @return 成功消息
*/
- public static AjaxResult success()
- {
+ public static AjaxResult success() {
return AjaxResult.success("操作成功");
}
/**
* 返回成功数据
- *
+ *
* @return 成功消息
*/
- public static AjaxResult success(Object data)
- {
+ public static AjaxResult success(Object data) {
return AjaxResult.success("操作成功", data);
}
/**
* 返回成功消息
- *
+ *
* @param msg 返回内容
* @return 成功消息
*/
- public static AjaxResult success(String msg)
- {
+ public static AjaxResult success(String msg) {
return AjaxResult.success(msg, null);
}
/**
* 返回成功消息
- *
- * @param msg 返回内容
+ *
+ * @param msg 返回内容
* @param data 数据对象
* @return 成功消息
*/
- public static AjaxResult success(String msg, Object data)
- {
+ public static AjaxResult success(String msg, Object data) {
return new AjaxResult(HttpStatus.SUCCESS, msg, data);
}
/**
* 返回错误消息
- *
+ *
* @return
*/
- public static AjaxResult error()
- {
+ public static AjaxResult error() {
return AjaxResult.error("操作失败");
}
/**
* 返回错误消息
- *
+ *
* @param msg 返回内容
* @return 警告消息
*/
- public static AjaxResult error(String msg)
- {
+ public static AjaxResult error(String msg) {
return AjaxResult.error(msg, null);
}
/**
* 返回错误消息
- *
- * @param msg 返回内容
+ *
+ * @param msg 返回内容
* @param data 数据对象
* @return 警告消息
*/
- public static AjaxResult error(String msg, Object data)
- {
+ public static AjaxResult error(String msg, Object data) {
return new AjaxResult(HttpStatus.ERROR, msg, data);
}
/**
* 返回错误消息
- *
+ *
* @param code 状态码
- * @param msg 返回内容
+ * @param msg 返回内容
* @return 警告消息
*/
- public static AjaxResult error(int code, String msg)
- {
+ public static AjaxResult error(int code, String msg) {
return new AjaxResult(code, msg, null);
}
}
diff --git a/spring-boot/ruoyi-common/src/main/java/com/ruoyi/common/core/domain/BaseEntity.java b/spring-boot/ruoyi-common/src/main/java/com/ruoyi/common/core/domain/BaseEntity.java
index f7d5bf46..093fee41 100644
--- a/spring-boot/ruoyi-common/src/main/java/com/ruoyi/common/core/domain/BaseEntity.java
+++ b/spring-boot/ruoyi-common/src/main/java/com/ruoyi/common/core/domain/BaseEntity.java
@@ -4,111 +4,110 @@ import java.io.Serializable;
import java.util.Date;
import java.util.HashMap;
import java.util.Map;
+
import com.fasterxml.jackson.annotation.JsonFormat;
/**
* Entity基类
- *
+ *
* @author ruoyi
*/
-public class BaseEntity implements Serializable
-{
+public class BaseEntity implements Serializable {
private static final long serialVersionUID = 1L;
- /** 搜索值 */
+ /**
+ * 搜索值
+ */
private String searchValue;
- /** 创建者 */
+ /**
+ * 创建者
+ */
private String createBy;
- /** 创建时间 */
+ /**
+ * 创建时间
+ */
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private Date createTime;
- /** 更新者 */
+ /**
+ * 更新者
+ */
private String updateBy;
- /** 更新时间 */
+ /**
+ * 更新时间
+ */
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private Date updateTime;
- /** 备注 */
+ /**
+ * 备注
+ */
private String remark;
- /** 请求参数 */
+ /**
+ * 请求参数
+ */
private Map params;
- public String getSearchValue()
- {
+ public String getSearchValue() {
return searchValue;
}
- public void setSearchValue(String searchValue)
- {
+ public void setSearchValue(String searchValue) {
this.searchValue = searchValue;
}
- public String getCreateBy()
- {
+ public String getCreateBy() {
return createBy;
}
- public void setCreateBy(String createBy)
- {
+ public void setCreateBy(String createBy) {
this.createBy = createBy;
}
- public Date getCreateTime()
- {
+ public Date getCreateTime() {
return createTime;
}
- public void setCreateTime(Date createTime)
- {
+ public void setCreateTime(Date createTime) {
this.createTime = createTime;
}
- public String getUpdateBy()
- {
+ public String getUpdateBy() {
return updateBy;
}
- public void setUpdateBy(String updateBy)
- {
+ public void setUpdateBy(String updateBy) {
this.updateBy = updateBy;
}
- public Date getUpdateTime()
- {
+ public Date getUpdateTime() {
return updateTime;
}
- public void setUpdateTime(Date updateTime)
- {
+ public void setUpdateTime(Date updateTime) {
this.updateTime = updateTime;
}
- public String getRemark()
- {
+ public String getRemark() {
return remark;
}
- public void setRemark(String remark)
- {
+ public void setRemark(String remark) {
this.remark = remark;
}
- public Map getParams()
- {
- if (params == null)
- {
+ public Map getParams() {
+ if (params == null) {
params = new HashMap<>();
}
return params;
}
- public void setParams(Map params)
- {
+ public void setParams(Map params) {
this.params = params;
}
}
diff --git a/spring-boot/ruoyi-common/src/main/java/com/ruoyi/common/core/domain/TreeEntity.java b/spring-boot/ruoyi-common/src/main/java/com/ruoyi/common/core/domain/TreeEntity.java
index a180a18c..265c7385 100644
--- a/spring-boot/ruoyi-common/src/main/java/com/ruoyi/common/core/domain/TreeEntity.java
+++ b/spring-boot/ruoyi-common/src/main/java/com/ruoyi/common/core/domain/TreeEntity.java
@@ -5,75 +5,74 @@ import java.util.List;
/**
* Tree基类
- *
+ *
* @author ruoyi
*/
-public class TreeEntity extends BaseEntity
-{
+public class TreeEntity extends BaseEntity {
private static final long serialVersionUID = 1L;
- /** 父菜单名称 */
+ /**
+ * 父菜单名称
+ */
private String parentName;
- /** 父菜单ID */
+ /**
+ * 父菜单ID
+ */
private Long parentId;
- /** 显示顺序 */
+ /**
+ * 显示顺序
+ */
private Integer orderNum;
- /** 祖级列表 */
+ /**
+ * 祖级列表
+ */
private String ancestors;
- /** 子部门 */
+ /**
+ * 子部门
+ */
private List> children = new ArrayList<>();
- public String getParentName()
- {
+ public String getParentName() {
return parentName;
}
- public void setParentName(String parentName)
- {
+ public void setParentName(String parentName) {
this.parentName = parentName;
}
- public Long getParentId()
- {
+ public Long getParentId() {
return parentId;
}
- public void setParentId(Long parentId)
- {
+ public void setParentId(Long parentId) {
this.parentId = parentId;
}
- public Integer getOrderNum()
- {
+ public Integer getOrderNum() {
return orderNum;
}
- public void setOrderNum(Integer orderNum)
- {
+ public void setOrderNum(Integer orderNum) {
this.orderNum = orderNum;
}
- public String getAncestors()
- {
+ public String getAncestors() {
return ancestors;
}
- public void setAncestors(String ancestors)
- {
+ public void setAncestors(String ancestors) {
this.ancestors = ancestors;
}
- public List> getChildren()
- {
+ public List> getChildren() {
return children;
}
- public void setChildren(List> children)
- {
+ public void setChildren(List> children) {
this.children = children;
}
}
diff --git a/spring-boot/ruoyi-common/src/main/java/com/ruoyi/common/core/domain/TreeSelect.java b/spring-boot/ruoyi-common/src/main/java/com/ruoyi/common/core/domain/TreeSelect.java
index bd835db9..8649ccec 100644
--- a/spring-boot/ruoyi-common/src/main/java/com/ruoyi/common/core/domain/TreeSelect.java
+++ b/spring-boot/ruoyi-common/src/main/java/com/ruoyi/common/core/domain/TreeSelect.java
@@ -3,75 +3,72 @@ package com.ruoyi.common.core.domain;
import java.io.Serializable;
import java.util.List;
import java.util.stream.Collectors;
+
import com.fasterxml.jackson.annotation.JsonInclude;
import com.ruoyi.common.core.domain.entity.SysDept;
import com.ruoyi.common.core.domain.entity.SysMenu;
/**
* Treeselect树结构实体类
- *
+ *
* @author ruoyi
*/
-public class TreeSelect implements Serializable
-{
+public class TreeSelect implements Serializable {
private static final long serialVersionUID = 1L;
- /** 节点ID */
+ /**
+ * 节点ID
+ */
private Long id;
- /** 节点名称 */
+ /**
+ * 节点名称
+ */
private String label;
- /** 子节点 */
+ /**
+ * 子节点
+ */
@JsonInclude(JsonInclude.Include.NON_EMPTY)
private List children;
- public TreeSelect()
- {
+ public TreeSelect() {
}
- public TreeSelect(SysDept dept)
- {
+ public TreeSelect(SysDept dept) {
this.id = dept.getDeptId();
this.label = dept.getDeptName();
this.children = dept.getChildren().stream().map(TreeSelect::new).collect(Collectors.toList());
}
- public TreeSelect(SysMenu menu)
- {
+ public TreeSelect(SysMenu menu) {
this.id = menu.getMenuId();
this.label = menu.getMenuName();
this.children = menu.getChildren().stream().map(TreeSelect::new).collect(Collectors.toList());
}
- public Long getId()
- {
+ public Long getId() {
return id;
}
- public void setId(Long id)
- {
+ public void setId(Long id) {
this.id = id;
}
- public String getLabel()
- {
+ public String getLabel() {
return label;
}
- public void setLabel(String label)
- {
+ public void setLabel(String label) {
this.label = label;
}
- public List getChildren()
- {
+ public List getChildren() {
return children;
}
- public void setChildren(List children)
- {
+ public void setChildren(List children) {
this.children = children;
}
}
diff --git a/spring-boot/ruoyi-common/src/main/java/com/ruoyi/common/core/domain/entity/SysDept.java b/spring-boot/ruoyi-common/src/main/java/com/ruoyi/common/core/domain/entity/SysDept.java
index c9238e23..df48444f 100644
--- a/spring-boot/ruoyi-common/src/main/java/com/ruoyi/common/core/domain/entity/SysDept.java
+++ b/spring-boot/ruoyi-common/src/main/java/com/ruoyi/common/core/domain/entity/SysDept.java
@@ -5,198 +5,198 @@ import java.util.List;
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;
/**
* 部门表 sys_dept
- *
+ *
* @author ruoyi
*/
-public class SysDept extends BaseEntity
-{
+public class SysDept extends BaseEntity {
private static final long serialVersionUID = 1L;
- /** 部门ID */
+ /**
+ * 部门ID
+ */
private Long deptId;
- /** 父部门ID */
+ /**
+ * 父部门ID
+ */
private Long parentId;
- /** 祖级列表 */
+ /**
+ * 祖级列表
+ */
private String ancestors;
- /** 部门名称 */
+ /**
+ * 部门名称
+ */
private String deptName;
- /** 显示顺序 */
+ /**
+ * 显示顺序
+ */
private String orderNum;
- /** 负责人 */
+ /**
+ * 负责人
+ */
private String leader;
- /** 联系电话 */
+ /**
+ * 联系电话
+ */
private String phone;
- /** 邮箱 */
+ /**
+ * 邮箱
+ */
private String email;
- /** 部门状态:0正常,1停用 */
+ /**
+ * 部门状态:0正常,1停用
+ */
private String status;
- /** 删除标志(0代表存在 2代表删除) */
+ /**
+ * 删除标志(0代表存在 2代表删除)
+ */
private String delFlag;
- /** 父部门名称 */
+ /**
+ * 父部门名称
+ */
private String parentName;
-
- /** 子部门 */
+
+ /**
+ * 子部门
+ */
private List children = new ArrayList();
- public Long getDeptId()
- {
+ public Long getDeptId() {
return deptId;
}
- public void setDeptId(Long deptId)
- {
+ public void setDeptId(Long deptId) {
this.deptId = deptId;
}
- public Long getParentId()
- {
+ public Long getParentId() {
return parentId;
}
- public void setParentId(Long parentId)
- {
+ public void setParentId(Long parentId) {
this.parentId = parentId;
}
- public String getAncestors()
- {
+ public String getAncestors() {
return ancestors;
}
- public void setAncestors(String ancestors)
- {
+ public void setAncestors(String ancestors) {
this.ancestors = ancestors;
}
@NotBlank(message = "部门名称不能为空")
@Size(min = 0, max = 30, message = "部门名称长度不能超过30个字符")
- public String getDeptName()
- {
+ public String getDeptName() {
return deptName;
}
- public void setDeptName(String deptName)
- {
+ public void setDeptName(String deptName) {
this.deptName = deptName;
}
@NotBlank(message = "显示顺序不能为空")
- public String getOrderNum()
- {
+ public String getOrderNum() {
return orderNum;
}
- public void setOrderNum(String orderNum)
- {
+ public void setOrderNum(String orderNum) {
this.orderNum = orderNum;
}
- public String getLeader()
- {
+ public String getLeader() {
return leader;
}
- public void setLeader(String leader)
- {
+ public void setLeader(String leader) {
this.leader = leader;
}
@Size(min = 0, max = 11, message = "联系电话长度不能超过11个字符")
- public String getPhone()
- {
+ public String getPhone() {
return phone;
}
- public void setPhone(String phone)
- {
+ public void setPhone(String phone) {
this.phone = phone;
}
@Email(message = "邮箱格式不正确")
@Size(min = 0, max = 50, message = "邮箱长度不能超过50个字符")
- public String getEmail()
- {
+ public String getEmail() {
return email;
}
- public void setEmail(String email)
- {
+ public void setEmail(String email) {
this.email = email;
}
- public String getStatus()
- {
+ public String getStatus() {
return status;
}
- public void setStatus(String status)
- {
+ public void setStatus(String status) {
this.status = status;
}
- public String getDelFlag()
- {
+ public String getDelFlag() {
return delFlag;
}
- public void setDelFlag(String delFlag)
- {
+ public void setDelFlag(String delFlag) {
this.delFlag = delFlag;
}
- public String getParentName()
- {
+ public String getParentName() {
return parentName;
}
- public void setParentName(String parentName)
- {
+ public void setParentName(String parentName) {
this.parentName = parentName;
}
- public List getChildren()
- {
+ public List getChildren() {
return children;
}
- public void setChildren(List children)
- {
+ public void setChildren(List 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();
+ 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();
}
}
diff --git a/spring-boot/ruoyi-common/src/main/java/com/ruoyi/common/core/domain/entity/SysDictData.java b/spring-boot/ruoyi-common/src/main/java/com/ruoyi/common/core/domain/entity/SysDictData.java
index 3f152b34..709c6c7a 100644
--- a/spring-boot/ruoyi-common/src/main/java/com/ruoyi/common/core/domain/entity/SysDictData.java
+++ b/spring-boot/ruoyi-common/src/main/java/com/ruoyi/common/core/domain/entity/SysDictData.java
@@ -2,6 +2,7 @@ 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;
@@ -11,166 +12,164 @@ import com.ruoyi.common.core.domain.BaseEntity;
/**
* 字典数据表 sys_dict_data
- *
+ *
* @author ruoyi
*/
-public class SysDictData extends BaseEntity
-{
+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;
- /** 是否默认(Y是 N否) */
+ /**
+ * 是否默认(Y是 N否)
+ */
@Excel(name = "是否默认", readConverterExp = "Y=是,N=否")
private String isDefault;
- /** 状态(0正常 1停用) */
+ /**
+ * 状态(0正常 1停用)
+ */
@Excel(name = "状态", readConverterExp = "0=正常,1=停用")
private String status;
- public Long getDictCode()
- {
+ public Long getDictCode() {
return dictCode;
}
- public void setDictCode(Long dictCode)
- {
+ public void setDictCode(Long dictCode) {
this.dictCode = dictCode;
}
- public Long getDictSort()
- {
+ public Long getDictSort() {
return dictSort;
}
- public void setDictSort(Long dictSort)
- {
+ public void setDictSort(Long dictSort) {
this.dictSort = dictSort;
}
@NotBlank(message = "字典标签不能为空")
@Size(min = 0, max = 100, message = "字典标签长度不能超过100个字符")
- public String getDictLabel()
- {
+ public String getDictLabel() {
return dictLabel;
}
- public void setDictLabel(String dictLabel)
- {
+ public void setDictLabel(String dictLabel) {
this.dictLabel = dictLabel;
}
@NotBlank(message = "字典键值不能为空")
@Size(min = 0, max = 100, message = "字典键值长度不能超过100个字符")
- public String getDictValue()
- {
+ public String getDictValue() {
return dictValue;
}
- public void setDictValue(String dictValue)
- {
+ public void setDictValue(String dictValue) {
this.dictValue = dictValue;
}
@NotBlank(message = "字典类型不能为空")
@Size(min = 0, max = 100, message = "字典类型长度不能超过100个字符")
- public String getDictType()
- {
+ public String getDictType() {
return dictType;
}
- public void setDictType(String dictType)
- {
+ public void setDictType(String dictType) {
this.dictType = dictType;
}
@Size(min = 0, max = 100, message = "样式属性长度不能超过100个字符")
- public String getCssClass()
- {
+ public String getCssClass() {
return cssClass;
}
- public void setCssClass(String cssClass)
- {
+ public void setCssClass(String cssClass) {
this.cssClass = cssClass;
}
- public String getListClass()
- {
+ public String getListClass() {
return listClass;
}
- public void setListClass(String listClass)
- {
+ public void setListClass(String listClass) {
this.listClass = listClass;
}
- public boolean getDefault()
- {
+ public boolean getDefault() {
return UserConstants.YES.equals(this.isDefault) ? true : false;
}
- public String getIsDefault()
- {
+ public String getIsDefault() {
return isDefault;
}
- public void setIsDefault(String isDefault)
- {
+ public void setIsDefault(String isDefault) {
this.isDefault = isDefault;
}
- public String getStatus()
- {
+ public String getStatus() {
return status;
}
- public void setStatus(String 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();
+ 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();
}
}
diff --git a/spring-boot/ruoyi-common/src/main/java/com/ruoyi/common/core/domain/entity/SysDictType.java b/spring-boot/ruoyi-common/src/main/java/com/ruoyi/common/core/domain/entity/SysDictType.java
index d2c42498..8627553c 100644
--- a/spring-boot/ruoyi-common/src/main/java/com/ruoyi/common/core/domain/entity/SysDictType.java
+++ b/spring-boot/ruoyi-common/src/main/java/com/ruoyi/common/core/domain/entity/SysDictType.java
@@ -2,6 +2,7 @@ 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;
@@ -10,85 +11,84 @@ import com.ruoyi.common.core.domain.BaseEntity;
/**
* 字典类型表 sys_dict_type
- *
+ *
* @author ruoyi
*/
-public class SysDictType extends BaseEntity
-{
+public class SysDictType extends BaseEntity {
private static final long serialVersionUID = 1L;
- /** 字典主键 */
+ /**
+ * 字典主键
+ */
@Excel(name = "字典主键", cellType = ColumnType.NUMERIC)
private Long dictId;
- /** 字典名称 */
+ /**
+ * 字典名称
+ */
@Excel(name = "字典名称")
private String dictName;
- /** 字典类型 */
+ /**
+ * 字典类型
+ */
@Excel(name = "字典类型")
private String dictType;
- /** 状态(0正常 1停用) */
+ /**
+ * 状态(0正常 1停用)
+ */
@Excel(name = "状态", readConverterExp = "0=正常,1=停用")
private String status;
- public Long getDictId()
- {
+ public Long getDictId() {
return dictId;
}
- public void setDictId(Long dictId)
- {
+ public void setDictId(Long dictId) {
this.dictId = dictId;
}
@NotBlank(message = "字典名称不能为空")
@Size(min = 0, max = 100, message = "字典类型名称长度不能超过100个字符")
- public String getDictName()
- {
+ public String getDictName() {
return dictName;
}
- public void setDictName(String dictName)
- {
+ public void setDictName(String dictName) {
this.dictName = dictName;
}
@NotBlank(message = "字典类型不能为空")
@Size(min = 0, max = 100, message = "字典类型类型长度不能超过100个字符")
- public String getDictType()
- {
+ public String getDictType() {
return dictType;
}
- public void setDictType(String dictType)
- {
+ public void setDictType(String dictType) {
this.dictType = dictType;
}
- public String getStatus()
- {
+ public String getStatus() {
return status;
}
- public void setStatus(String status)
- {
+ public void setStatus(String status) {
this.status = status;
}
-
+
@Override
public String toString() {
- return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
- .append("dictId", getDictId())
- .append("dictName", getDictName())
- .append("dictType", getDictType())
- .append("status", getStatus())
- .append("createBy", getCreateBy())
- .append("createTime", getCreateTime())
- .append("updateBy", getUpdateBy())
- .append("updateTime", getUpdateTime())
- .append("remark", getRemark())
- .toString();
+ return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
+ .append("dictId", getDictId())
+ .append("dictName", getDictName())
+ .append("dictType", getDictType())
+ .append("status", getStatus())
+ .append("createBy", getCreateBy())
+ .append("createTime", getCreateTime())
+ .append("updateBy", getUpdateBy())
+ .append("updateTime", getUpdateTime())
+ .append("remark", getRemark())
+ .toString();
}
}
diff --git a/spring-boot/ruoyi-common/src/main/java/com/ruoyi/common/core/domain/entity/SysMenu.java b/spring-boot/ruoyi-common/src/main/java/com/ruoyi/common/core/domain/entity/SysMenu.java
index 94d654ae..59f6ae96 100644
--- a/spring-boot/ruoyi-common/src/main/java/com/ruoyi/common/core/domain/entity/SysMenu.java
+++ b/spring-boot/ruoyi-common/src/main/java/com/ruoyi/common/core/domain/entity/SysMenu.java
@@ -4,242 +4,242 @@ import java.util.ArrayList;
import java.util.List;
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;
/**
* 菜单权限表 sys_menu
- *
+ *
* @author ruoyi
*/
-public class SysMenu extends BaseEntity
-{
+public class SysMenu extends BaseEntity {
private static final long serialVersionUID = 1L;
- /** 菜单ID */
+ /**
+ * 菜单ID
+ */
private Long menuId;
- /** 菜单名称 */
+ /**
+ * 菜单名称
+ */
private String menuName;
- /** 父菜单名称 */
+ /**
+ * 父菜单名称
+ */
private String parentName;
- /** 父菜单ID */
+ /**
+ * 父菜单ID
+ */
private Long parentId;
- /** 显示顺序 */
+ /**
+ * 显示顺序
+ */
private String orderNum;
- /** 路由地址 */
+ /**
+ * 路由地址
+ */
private String path;
- /** 组件路径 */
+ /**
+ * 组件路径
+ */
private String component;
- /** 是否为外链(0是 1否) */
+ /**
+ * 是否为外链(0是 1否)
+ */
private String isFrame;
- /** 是否缓存(0缓存 1不缓存) */
+ /**
+ * 是否缓存(0缓存 1不缓存)
+ */
private String isCache;
- /** 类型(M目录 C菜单 F按钮) */
+ /**
+ * 类型(M目录 C菜单 F按钮)
+ */
private String menuType;
- /** 显示状态(0显示 1隐藏) */
+ /**
+ * 显示状态(0显示 1隐藏)
+ */
private String visible;
-
- /** 菜单状态(0显示 1隐藏) */
+
+ /**
+ * 菜单状态(0显示 1隐藏)
+ */
private String status;
- /** 权限字符串 */
+ /**
+ * 权限字符串
+ */
private String perms;
- /** 菜单图标 */
+ /**
+ * 菜单图标
+ */
private String icon;
- /** 子菜单 */
+ /**
+ * 子菜单
+ */
private List children = new ArrayList();
- public Long getMenuId()
- {
+ public Long getMenuId() {
return menuId;
}
- public void setMenuId(Long menuId)
- {
+ public void setMenuId(Long menuId) {
this.menuId = menuId;
}
@NotBlank(message = "菜单名称不能为空")
@Size(min = 0, max = 50, message = "菜单名称长度不能超过50个字符")
- public String getMenuName()
- {
+ public String getMenuName() {
return menuName;
}
- public void setMenuName(String menuName)
- {
+ public void setMenuName(String menuName) {
this.menuName = menuName;
}
- public String getParentName()
- {
+ public String getParentName() {
return parentName;
}
- public void setParentName(String parentName)
- {
+ public void setParentName(String parentName) {
this.parentName = parentName;
}
- public Long getParentId()
- {
+ public Long getParentId() {
return parentId;
}
- public void setParentId(Long parentId)
- {
+ public void setParentId(Long parentId) {
this.parentId = parentId;
}
@NotBlank(message = "显示顺序不能为空")
- public String getOrderNum()
- {
+ public String getOrderNum() {
return orderNum;
}
- public void setOrderNum(String orderNum)
- {
+ public void setOrderNum(String orderNum) {
this.orderNum = orderNum;
}
@Size(min = 0, max = 200, message = "路由地址不能超过200个字符")
- public String getPath()
- {
+ public String getPath() {
return path;
}
- public void setPath(String path)
- {
+ public void setPath(String path) {
this.path = path;
}
@Size(min = 0, max = 200, message = "组件路径不能超过255个字符")
- public String getComponent()
- {
+ public String getComponent() {
return component;
}
- public void setComponent(String component)
- {
+ public void setComponent(String component) {
this.component = component;
}
- public String getIsFrame()
- {
+ public String getIsFrame() {
return isFrame;
}
- public void setIsFrame(String isFrame)
- {
+ public void setIsFrame(String isFrame) {
this.isFrame = isFrame;
}
- public String getIsCache()
- {
+ public String getIsCache() {
return isCache;
}
- public void setIsCache(String isCache)
- {
+ public void setIsCache(String isCache) {
this.isCache = isCache;
}
@NotBlank(message = "菜单类型不能为空")
- public String getMenuType()
- {
+ public String getMenuType() {
return menuType;
}
- public void setMenuType(String menuType)
- {
+ public void setMenuType(String menuType) {
this.menuType = menuType;
}
- public String getVisible()
- {
+ public String getVisible() {
return visible;
}
- public void setVisible(String visible)
- {
+ public void setVisible(String visible) {
this.visible = visible;
}
- public String getStatus()
- {
+ public String getStatus() {
return status;
}
- public void setStatus(String status)
- {
+ public void setStatus(String status) {
this.status = status;
}
@Size(min = 0, max = 100, message = "权限标识长度不能超过100个字符")
- public String getPerms()
- {
+ public String getPerms() {
return perms;
}
- public void setPerms(String perms)
- {
+ public void setPerms(String perms) {
this.perms = perms;
}
- public String getIcon()
- {
+ public String getIcon() {
return icon;
}
- public void setIcon(String icon)
- {
+ public void setIcon(String icon) {
this.icon = icon;
}
- public List getChildren()
- {
+ public List getChildren() {
return children;
}
- public void setChildren(List children)
- {
+ public void setChildren(List children) {
this.children = children;
}
-
+
@Override
public String toString() {
- return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
- .append("menuId", getMenuId())
- .append("menuName", getMenuName())
- .append("parentId", getParentId())
- .append("orderNum", getOrderNum())
- .append("path", getPath())
- .append("component", getComponent())
- .append("isFrame", getIsFrame())
- .append("IsCache", getIsCache())
- .append("menuType", getMenuType())
- .append("visible", getVisible())
- .append("status ", getStatus())
- .append("perms", getPerms())
- .append("icon", getIcon())
- .append("createBy", getCreateBy())
- .append("createTime", getCreateTime())
- .append("updateBy", getUpdateBy())
- .append("updateTime", getUpdateTime())
- .append("remark", getRemark())
- .toString();
+ return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
+ .append("menuId", getMenuId())
+ .append("menuName", getMenuName())
+ .append("parentId", getParentId())
+ .append("orderNum", getOrderNum())
+ .append("path", getPath())
+ .append("component", getComponent())
+ .append("isFrame", getIsFrame())
+ .append("IsCache", getIsCache())
+ .append("menuType", getMenuType())
+ .append("visible", getVisible())
+ .append("status ", getStatus())
+ .append("perms", getPerms())
+ .append("icon", getIcon())
+ .append("createBy", getCreateBy())
+ .append("createTime", getCreateTime())
+ .append("updateBy", getUpdateBy())
+ .append("updateTime", getUpdateTime())
+ .append("remark", getRemark())
+ .toString();
}
}
diff --git a/spring-boot/ruoyi-common/src/main/java/com/ruoyi/common/core/domain/entity/SysRole.java b/spring-boot/ruoyi-common/src/main/java/com/ruoyi/common/core/domain/entity/SysRole.java
index 2991595a..43b6b89f 100644
--- a/spring-boot/ruoyi-common/src/main/java/com/ruoyi/common/core/domain/entity/SysRole.java
+++ b/spring-boot/ruoyi-common/src/main/java/com/ruoyi/common/core/domain/entity/SysRole.java
@@ -2,6 +2,7 @@ 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;
@@ -10,217 +11,212 @@ import com.ruoyi.common.core.domain.BaseEntity;
/**
* 角色表 sys_role
- *
+ *
* @author ruoyi
*/
-public class SysRole extends BaseEntity
-{
+public class SysRole extends BaseEntity {
private static final long serialVersionUID = 1L;
- /** 角色ID */
+ /**
+ * 角色ID
+ */
@Excel(name = "角色序号", cellType = ColumnType.NUMERIC)
private Long roleId;
- /** 角色名称 */
+ /**
+ * 角色名称
+ */
@Excel(name = "角色名称")
private String roleName;
- /** 角色权限 */
+ /**
+ * 角色权限
+ */
@Excel(name = "角色权限")
private String roleKey;
- /** 角色排序 */
+ /**
+ * 角色排序
+ */
@Excel(name = "角色排序")
private String roleSort;
- /** 数据范围(1:所有数据权限;2:自定义数据权限;3:本部门数据权限;4:本部门及以下数据权限) */
+ /**
+ * 数据范围(1:所有数据权限;2:自定义数据权限;3:本部门数据权限;4:本部门及以下数据权限)
+ */
@Excel(name = "数据范围", readConverterExp = "1=所有数据权限,2=自定义数据权限,3=本部门数据权限,4=本部门及以下数据权限")
private String dataScope;
- /** 菜单树选择项是否关联显示( 0:父子不互相关联显示 1:父子互相关联显示) */
+ /**
+ * 菜单树选择项是否关联显示( 0:父子不互相关联显示 1:父子互相关联显示)
+ */
private boolean menuCheckStrictly;
- /** 部门树选择项是否关联显示(0:父子不互相关联显示 1:父子互相关联显示 ) */
+ /**
+ * 部门树选择项是否关联显示(0:父子不互相关联显示 1:父子互相关联显示 )
+ */
private boolean deptCheckStrictly;
- /** 角色状态(0正常 1停用) */
+ /**
+ * 角色状态(0正常 1停用)
+ */
@Excel(name = "角色状态", readConverterExp = "0=正常,1=停用")
private String status;
- /** 删除标志(0代表存在 2代表删除) */
+ /**
+ * 删除标志(0代表存在 2代表删除)
+ */
private String delFlag;
- /** 用户是否存在此角色标识 默认不存在 */
+ /**
+ * 用户是否存在此角色标识 默认不存在
+ */
private boolean flag = false;
- /** 菜单组 */
+ /**
+ * 菜单组
+ */
private Long[] menuIds;
- /** 部门组(数据权限) */
+ /**
+ * 部门组(数据权限)
+ */
private Long[] deptIds;
- public SysRole()
- {
+ public SysRole() {
}
- public SysRole(Long roleId)
- {
+ public SysRole(Long roleId) {
this.roleId = roleId;
}
- public Long getRoleId()
- {
+ public Long getRoleId() {
return roleId;
}
- public void setRoleId(Long roleId)
- {
+ public void setRoleId(Long roleId) {
this.roleId = roleId;
}
- public boolean isAdmin()
- {
+ public boolean isAdmin() {
return isAdmin(this.roleId);
}
- public static boolean isAdmin(Long roleId)
- {
+ public static boolean isAdmin(Long roleId) {
return roleId != null && 1L == roleId;
}
@NotBlank(message = "角色名称不能为空")
@Size(min = 0, max = 30, message = "角色名称长度不能超过30个字符")
- public String getRoleName()
- {
+ public String getRoleName() {
return roleName;
}
- public void setRoleName(String roleName)
- {
+ public void setRoleName(String roleName) {
this.roleName = roleName;
}
@NotBlank(message = "权限字符不能为空")
@Size(min = 0, max = 100, message = "权限字符长度不能超过100个字符")
- public String getRoleKey()
- {
+ public String getRoleKey() {
return roleKey;
}
- public void setRoleKey(String roleKey)
- {
+ public void setRoleKey(String roleKey) {
this.roleKey = roleKey;
}
@NotBlank(message = "显示顺序不能为空")
- public String getRoleSort()
- {
+ public String getRoleSort() {
return roleSort;
}
- public void setRoleSort(String roleSort)
- {
+ public void setRoleSort(String roleSort) {
this.roleSort = roleSort;
}
- public String getDataScope()
- {
+ public String getDataScope() {
return dataScope;
}
- public void setDataScope(String dataScope)
- {
+ public void setDataScope(String dataScope) {
this.dataScope = dataScope;
}
- public boolean isMenuCheckStrictly()
- {
+ public boolean isMenuCheckStrictly() {
return menuCheckStrictly;
}
- public void setMenuCheckStrictly(boolean menuCheckStrictly)
- {
+ public void setMenuCheckStrictly(boolean menuCheckStrictly) {
this.menuCheckStrictly = menuCheckStrictly;
}
- public boolean isDeptCheckStrictly()
- {
+ public boolean isDeptCheckStrictly() {
return deptCheckStrictly;
}
- public void setDeptCheckStrictly(boolean deptCheckStrictly)
- {
+ public void setDeptCheckStrictly(boolean deptCheckStrictly) {
this.deptCheckStrictly = deptCheckStrictly;
}
- public String getStatus()
- {
+ public String getStatus() {
return status;
}
- public void setStatus(String status)
- {
+ public void setStatus(String status) {
this.status = status;
}
- public String getDelFlag()
- {
+ public String getDelFlag() {
return delFlag;
}
- public void setDelFlag(String delFlag)
- {
+ public void setDelFlag(String delFlag) {
this.delFlag = delFlag;
}
- public boolean isFlag()
- {
+ public boolean isFlag() {
return flag;
}
- public void setFlag(boolean flag)
- {
+ public void setFlag(boolean flag) {
this.flag = flag;
}
- public Long[] getMenuIds()
- {
+ public Long[] getMenuIds() {
return menuIds;
}
- public void setMenuIds(Long[] menuIds)
- {
+ public void setMenuIds(Long[] menuIds) {
this.menuIds = menuIds;
}
- public Long[] getDeptIds()
- {
+ public Long[] getDeptIds() {
return deptIds;
}
- public void setDeptIds(Long[] deptIds)
- {
+ public void setDeptIds(Long[] deptIds) {
this.deptIds = deptIds;
}
-
+
@Override
public String toString() {
- return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
- .append("roleId", getRoleId())
- .append("roleName", getRoleName())
- .append("roleKey", getRoleKey())
- .append("roleSort", getRoleSort())
- .append("dataScope", getDataScope())
- .append("menuCheckStrictly", isMenuCheckStrictly())
- .append("deptCheckStrictly", isDeptCheckStrictly())
- .append("status", getStatus())
- .append("delFlag", getDelFlag())
- .append("createBy", getCreateBy())
- .append("createTime", getCreateTime())
- .append("updateBy", getUpdateBy())
- .append("updateTime", getUpdateTime())
- .append("remark", getRemark())
- .toString();
+ return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
+ .append("roleId", getRoleId())
+ .append("roleName", getRoleName())
+ .append("roleKey", getRoleKey())
+ .append("roleSort", getRoleSort())
+ .append("dataScope", getDataScope())
+ .append("menuCheckStrictly", isMenuCheckStrictly())
+ .append("deptCheckStrictly", isDeptCheckStrictly())
+ .append("status", getStatus())
+ .append("delFlag", getDelFlag())
+ .append("createBy", getCreateBy())
+ .append("createTime", getCreateTime())
+ .append("updateBy", getUpdateBy())
+ .append("updateTime", getUpdateTime())
+ .append("remark", getRemark())
+ .toString();
}
}
diff --git a/spring-boot/ruoyi-common/src/main/java/com/ruoyi/common/core/domain/entity/SysUser.java b/spring-boot/ruoyi-common/src/main/java/com/ruoyi/common/core/domain/entity/SysUser.java
index d08668ab..0c21b684 100644
--- a/spring-boot/ruoyi-common/src/main/java/com/ruoyi/common/core/domain/entity/SysUser.java
+++ b/spring-boot/ruoyi-common/src/main/java/com/ruoyi/common/core/domain/entity/SysUser.java
@@ -5,6 +5,7 @@ import java.util.List;
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.fasterxml.jackson.annotation.JsonIgnore;
@@ -17,312 +18,318 @@ import com.ruoyi.common.core.domain.BaseEntity;
/**
* 用户对象 sys_user
- *
+ *
* @author ruoyi
*/
-public class SysUser extends BaseEntity
-{
+public class SysUser extends BaseEntity {
private static final long serialVersionUID = 1L;
- /** 用户ID */
+ /**
+ * 用户ID
+ */
@Excel(name = "用户序号", cellType = ColumnType.NUMERIC, prompt = "用户编号")
private Long userId;
- /** 部门ID */
+ /**
+ * 部门ID
+ */
@Excel(name = "部门编号", type = Type.IMPORT)
private Long deptId;
- /** 用户账号 */
+ /**
+ * 用户账号
+ */
@Excel(name = "登录名称")
private String userName;
- /** 用户昵称 */
+ /**
+ * 用户昵称
+ */
@Excel(name = "用户名称")
private String nickName;
- /** 用户邮箱 */
+ @Excel(name = "用户OpenId")
+ private String openId;
+
+ /**
+ * 用户邮箱
+ */
@Excel(name = "用户邮箱")
private String email;
- /** 手机号码 */
+ /**
+ * 手机号码
+ */
@Excel(name = "手机号码")
private String phonenumber;
- /** 用户性别 */
+ /**
+ * 用户性别
+ */
@Excel(name = "用户性别", readConverterExp = "0=男,1=女,2=未知")
private String sex;
- /** 用户头像 */
+ /**
+ * 用户头像
+ */
private String avatar;
- /** 密码 */
+ /**
+ * 密码
+ */
private String password;
- /** 盐加密 */
+ /**
+ * 盐加密
+ */
private String salt;
- /** 帐号状态(0正常 1停用) */
+ /**
+ * 帐号状态(0正常 1停用)
+ */
@Excel(name = "帐号状态", readConverterExp = "0=正常,1=停用")
private String status;
- /** 删除标志(0代表存在 2代表删除) */
+ /**
+ * 删除标志(0代表存在 2代表删除)
+ */
private String delFlag;
- /** 最后登录IP */
+ /**
+ * 最后登录IP
+ */
@Excel(name = "最后登录IP", type = Type.EXPORT)
private String loginIp;
- /** 最后登录时间 */
+ /**
+ * 最后登录时间
+ */
@Excel(name = "最后登录时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss", type = Type.EXPORT)
private Date loginDate;
- /** 部门对象 */
+ /**
+ * 部门对象
+ */
@Excels({
- @Excel(name = "部门名称", targetAttr = "deptName", type = Type.EXPORT),
- @Excel(name = "部门负责人", targetAttr = "leader", type = Type.EXPORT)
+ @Excel(name = "部门名称", targetAttr = "deptName", type = Type.EXPORT),
+ @Excel(name = "部门负责人", targetAttr = "leader", type = Type.EXPORT)
})
private SysDept dept;
- /** 角色对象 */
+ /**
+ * 角色对象
+ */
private List roles;
- /** 角色组 */
+ /**
+ * 角色组
+ */
private Long[] roleIds;
- /** 岗位组 */
+ /**
+ * 岗位组
+ */
private Long[] postIds;
- public SysUser()
- {
+ public SysUser() {
}
- public SysUser(Long userId)
- {
+ public String getOpenId() {
+ return openId;
+ }
+
+ public void setOpenId(String openId) {
+ this.openId = openId;
+ }
+
+ public SysUser(Long userId) {
this.userId = userId;
}
- public Long getUserId()
- {
+ public Long getUserId() {
return userId;
}
- public void setUserId(Long userId)
- {
+ public void setUserId(Long userId) {
this.userId = userId;
}
- public boolean isAdmin()
- {
+ public boolean isAdmin() {
return isAdmin(this.userId);
}
- public static boolean isAdmin(Long userId)
- {
+ public static boolean isAdmin(Long userId) {
return userId != null && 1L == userId;
}
- public Long getDeptId()
- {
+ public Long getDeptId() {
return deptId;
}
- public void setDeptId(Long deptId)
- {
+ public void setDeptId(Long deptId) {
this.deptId = deptId;
}
@Size(min = 0, max = 30, message = "用户昵称长度不能超过30个字符")
- public String getNickName()
- {
+ public String getNickName() {
return nickName;
}
- public void setNickName(String nickName)
- {
+ public void setNickName(String nickName) {
this.nickName = nickName;
}
@NotBlank(message = "用户账号不能为空")
@Size(min = 0, max = 30, message = "用户账号长度不能超过30个字符")
- public String getUserName()
- {
+ public String getUserName() {
return userName;
}
- public void setUserName(String userName)
- {
+ public void setUserName(String userName) {
this.userName = userName;
}
@Email(message = "邮箱格式不正确")
@Size(min = 0, max = 50, message = "邮箱长度不能超过50个字符")
- public String getEmail()
- {
+ public String getEmail() {
return email;
}
- public void setEmail(String email)
- {
+ public void setEmail(String email) {
this.email = email;
}
@Size(min = 0, max = 11, message = "手机号码长度不能超过11个字符")
- public String getPhonenumber()
- {
+ public String getPhonenumber() {
return phonenumber;
}
- public void setPhonenumber(String phonenumber)
- {
+ public void setPhonenumber(String phonenumber) {
this.phonenumber = phonenumber;
}
- public String getSex()
- {
+ public String getSex() {
return sex;
}
- public void setSex(String sex)
- {
+ public void setSex(String sex) {
this.sex = sex;
}
- public String getAvatar()
- {
+ public String getAvatar() {
return avatar;
}
- public void setAvatar(String avatar)
- {
+ public void setAvatar(String avatar) {
this.avatar = avatar;
}
- @JsonIgnore
+ @JsonIgnore
@JsonProperty
- public String getPassword()
- {
+ public String getPassword() {
return password;
}
- public void setPassword(String password)
- {
+ public void setPassword(String password) {
this.password = password;
}
- public String getSalt()
- {
+ public String getSalt() {
return salt;
}
- public void setSalt(String salt)
- {
+ public void setSalt(String salt) {
this.salt = salt;
}
- public String getStatus()
- {
+ public String getStatus() {
return status;
}
- public void setStatus(String status)
- {
+ public void setStatus(String status) {
this.status = status;
}
- public String getDelFlag()
- {
+ public String getDelFlag() {
return delFlag;
}
- public void setDelFlag(String delFlag)
- {
+ public void setDelFlag(String delFlag) {
this.delFlag = delFlag;
}
- public String getLoginIp()
- {
+ public String getLoginIp() {
return loginIp;
}
- public void setLoginIp(String loginIp)
- {
+ public void setLoginIp(String loginIp) {
this.loginIp = loginIp;
}
- public Date getLoginDate()
- {
+ public Date getLoginDate() {
return loginDate;
}
- public void setLoginDate(Date loginDate)
- {
+ public void setLoginDate(Date loginDate) {
this.loginDate = loginDate;
}
- public SysDept getDept()
- {
+ public SysDept getDept() {
return dept;
}
- public void setDept(SysDept dept)
- {
+ public void setDept(SysDept dept) {
this.dept = dept;
}
- public List getRoles()
- {
+ public List getRoles() {
return roles;
}
- public void setRoles(List roles)
- {
+ public void setRoles(List roles) {
this.roles = roles;
}
- public Long[] getRoleIds()
- {
+ public Long[] getRoleIds() {
return roleIds;
}
- public void setRoleIds(Long[] roleIds)
- {
+ public void setRoleIds(Long[] roleIds) {
this.roleIds = roleIds;
}
- public Long[] getPostIds()
- {
+ public Long[] getPostIds() {
return postIds;
}
- public void setPostIds(Long[] postIds)
- {
+ public void setPostIds(Long[] postIds) {
this.postIds = postIds;
}
@Override
public String toString() {
- return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
- .append("userId", getUserId())
- .append("deptId", getDeptId())
- .append("userName", getUserName())
- .append("nickName", getNickName())
- .append("email", getEmail())
- .append("phonenumber", getPhonenumber())
- .append("sex", getSex())
- .append("avatar", getAvatar())
- .append("password", getPassword())
- .append("salt", getSalt())
- .append("status", getStatus())
- .append("delFlag", getDelFlag())
- .append("loginIp", getLoginIp())
- .append("loginDate", getLoginDate())
- .append("createBy", getCreateBy())
- .append("createTime", getCreateTime())
- .append("updateBy", getUpdateBy())
- .append("updateTime", getUpdateTime())
- .append("remark", getRemark())
- .append("dept", getDept())
- .toString();
+ return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
+ .append("userId", getUserId())
+ .append("deptId", getDeptId())
+ .append("userName", getUserName())
+ .append("nickName", getNickName())
+ .append("email", getEmail())
+ .append("phonenumber", getPhonenumber())
+ .append("sex", getSex())
+ .append("avatar", getAvatar())
+ .append("password", getPassword())
+ .append("salt", getSalt())
+ .append("status", getStatus())
+ .append("delFlag", getDelFlag())
+ .append("loginIp", getLoginIp())
+ .append("loginDate", getLoginDate())
+ .append("createBy", getCreateBy())
+ .append("createTime", getCreateTime())
+ .append("updateBy", getUpdateBy())
+ .append("updateTime", getUpdateTime())
+ .append("remark", getRemark())
+ .append("dept", getDept())
+ .toString();
}
}
diff --git a/spring-boot/ruoyi-common/src/main/java/com/ruoyi/common/core/domain/model/LoginBody.java b/spring-boot/ruoyi-common/src/main/java/com/ruoyi/common/core/domain/model/LoginBody.java
index 03948b43..2d2fe112 100644
--- a/spring-boot/ruoyi-common/src/main/java/com/ruoyi/common/core/domain/model/LoginBody.java
+++ b/spring-boot/ruoyi-common/src/main/java/com/ruoyi/common/core/domain/model/LoginBody.java
@@ -2,11 +2,10 @@ package com.ruoyi.common.core.domain.model;
/**
* 用户登录对象
- *
+ *
* @author ruoyi
*/
-public class LoginBody
-{
+public class LoginBody {
/**
* 用户名
*/
@@ -27,43 +26,35 @@ public class LoginBody
*/
private String uuid = "";
- public String getUsername()
- {
+ public String getUsername() {
return username;
}
- public void setUsername(String username)
- {
+ public void setUsername(String username) {
this.username = username;
}
- public String getPassword()
- {
+ public String getPassword() {
return password;
}
- public void setPassword(String password)
- {
+ public void setPassword(String password) {
this.password = password;
}
- public String getCode()
- {
+ public String getCode() {
return code;
}
- public void setCode(String code)
- {
+ public void setCode(String code) {
this.code = code;
}
- public String getUuid()
- {
+ public String getUuid() {
return uuid;
}
- public void setUuid(String uuid)
- {
+ public void setUuid(String uuid) {
this.uuid = uuid;
}
}
diff --git a/spring-boot/ruoyi-common/src/main/java/com/ruoyi/common/core/domain/model/LoginUser.java b/spring-boot/ruoyi-common/src/main/java/com/ruoyi/common/core/domain/model/LoginUser.java
index 6e3f1c6b..f9867ba9 100644
--- a/spring-boot/ruoyi-common/src/main/java/com/ruoyi/common/core/domain/model/LoginUser.java
+++ b/spring-boot/ruoyi-common/src/main/java/com/ruoyi/common/core/domain/model/LoginUser.java
@@ -1,7 +1,9 @@
package com.ruoyi.common.core.domain.model;
import java.util.Collection;
+import java.util.HashSet;
import java.util.Set;
+
import org.springframework.security.core.GrantedAuthority;
import org.springframework.security.core.userdetails.UserDetails;
import com.fasterxml.jackson.annotation.JsonIgnore;
@@ -9,11 +11,10 @@ import com.ruoyi.common.core.domain.entity.SysUser;
/**
* 登录用户身份权限
- *
+ *
* @author ruoyi
*/
-public class LoginUser implements UserDetails
-{
+public class LoginUser implements UserDetails {
private static final long serialVersionUID = 1L;
/**
@@ -61,36 +62,32 @@ public class LoginUser implements UserDetails
*/
private SysUser user;
- public String getToken()
- {
+ public String getToken() {
return token;
}
- public void setToken(String token)
- {
+ public void setToken(String token) {
this.token = token;
}
- public LoginUser()
- {
+ public LoginUser() {
}
- public LoginUser(SysUser user, Set permissions)
- {
+ public LoginUser(SysUser user, Set permissions) {
this.user = user;
this.permissions = permissions;
}
+
+
@JsonIgnore
@Override
- public String getPassword()
- {
+ public String getPassword() {
return user.getPassword();
}
@Override
- public String getUsername()
- {
+ public String getUsername() {
return user.getUserName();
}
@@ -99,130 +96,110 @@ public class LoginUser implements UserDetails
*/
@JsonIgnore
@Override
- public boolean isAccountNonExpired()
- {
+ public boolean isAccountNonExpired() {
return true;
}
/**
* 指定用户是否解锁,锁定的用户无法进行身份验证
- *
+ *
* @return
*/
@JsonIgnore
@Override
- public boolean isAccountNonLocked()
- {
+ public boolean isAccountNonLocked() {
return true;
}
/**
* 指示是否已过期的用户的凭据(密码),过期的凭据防止认证
- *
+ *
* @return
*/
@JsonIgnore
@Override
- public boolean isCredentialsNonExpired()
- {
+ public boolean isCredentialsNonExpired() {
return true;
}
/**
* 是否可用 ,禁用的用户不能身份验证
- *
+ *
* @return
*/
@JsonIgnore
@Override
- public boolean isEnabled()
- {
+ public boolean isEnabled() {
return true;
}
- public Long getLoginTime()
- {
+ public Long getLoginTime() {
return loginTime;
}
- public void setLoginTime(Long loginTime)
- {
+ public void setLoginTime(Long loginTime) {
this.loginTime = loginTime;
}
- public String getIpaddr()
- {
+ public String getIpaddr() {
return ipaddr;
}
- public void setIpaddr(String ipaddr)
- {
+ public void setIpaddr(String ipaddr) {
this.ipaddr = ipaddr;
}
- public String getLoginLocation()
- {
+ public String getLoginLocation() {
return loginLocation;
}
- public void setLoginLocation(String loginLocation)
- {
+ public void setLoginLocation(String loginLocation) {
this.loginLocation = loginLocation;
}
- public String getBrowser()
- {
+ public String getBrowser() {
return browser;
}
- public void setBrowser(String browser)
- {
+ public void setBrowser(String browser) {
this.browser = browser;
}
- public String getOs()
- {
+ public String getOs() {
return os;
}
- public void setOs(String os)
- {
+ public void setOs(String os) {
this.os = os;
}
- public Long getExpireTime()
- {
+ public Long getExpireTime() {
return expireTime;
}
- public void setExpireTime(Long expireTime)
- {
+ public void setExpireTime(Long expireTime) {
this.expireTime = expireTime;
}
- public Set getPermissions()
- {
+ public Set getPermissions() {
+ System.out.println("用户权限:"+permissions);
return permissions;
}
- public void setPermissions(Set permissions)
- {
+ public void setPermissions(Set permissions) {
this.permissions = permissions;
}
- public SysUser getUser()
- {
+ public SysUser getUser() {
return user;
}
- public void setUser(SysUser user)
- {
+ public void setUser(SysUser user) {
this.user = user;
}
@Override
- public Collection extends GrantedAuthority> getAuthorities()
- {
+ public Collection extends GrantedAuthority> getAuthorities() {
return null;
}
}
diff --git a/spring-boot/ruoyi-common/src/main/java/com/ruoyi/common/core/domain/model/MpLoginBody.java b/spring-boot/ruoyi-common/src/main/java/com/ruoyi/common/core/domain/model/MpLoginBody.java
new file mode 100644
index 00000000..161fba39
--- /dev/null
+++ b/spring-boot/ruoyi-common/src/main/java/com/ruoyi/common/core/domain/model/MpLoginBody.java
@@ -0,0 +1,17 @@
+package com.ruoyi.common.core.domain.model;
+
+import com.alibaba.fastjson.JSONObject;
+import lombok.Data;
+
+/**
+ * 微信小程序用户登录对象
+ *
+ * @author ruoyi
+ */
+@Data
+public class MpLoginBody {
+ private String code;
+
+ private JSONObject options; //{"path":"pages/mine/help/index","query":{},"scene":1001,"referrerInfo":{}}
+
+}
diff --git a/spring-boot/ruoyi-common/src/main/java/com/ruoyi/common/core/page/PageDomain.java b/spring-boot/ruoyi-common/src/main/java/com/ruoyi/common/core/page/PageDomain.java
index 6fba8837..b63c3feb 100644
--- a/spring-boot/ruoyi-common/src/main/java/com/ruoyi/common/core/page/PageDomain.java
+++ b/spring-boot/ruoyi-common/src/main/java/com/ruoyi/common/core/page/PageDomain.java
@@ -4,69 +4,66 @@ import com.ruoyi.common.utils.StringUtils;
/**
* 分页数据
- *
+ *
* @author ruoyi
*/
-public class PageDomain
-{
- /** 当前记录起始索引 */
+public class PageDomain {
+ /**
+ * 当前记录起始索引
+ */
private Integer pageNum;
- /** 每页显示记录数 */
+ /**
+ * 每页显示记录数
+ */
private Integer pageSize;
- /** 排序列 */
+ /**
+ * 排序列
+ */
private String orderByColumn;
- /** 排序的方向desc或者asc */
+ /**
+ * 排序的方向desc或者asc
+ */
private String isAsc = "asc";
- public String getOrderBy()
- {
- if (StringUtils.isEmpty(orderByColumn))
- {
+ public String getOrderBy() {
+ if (StringUtils.isEmpty(orderByColumn)) {
return "";
}
return StringUtils.toUnderScoreCase(orderByColumn) + " " + isAsc;
}
- public Integer getPageNum()
- {
+ public Integer getPageNum() {
return pageNum;
}
- public void setPageNum(Integer pageNum)
- {
+ public void setPageNum(Integer pageNum) {
this.pageNum = pageNum;
}
- public Integer getPageSize()
- {
+ public Integer getPageSize() {
return pageSize;
}
- public void setPageSize(Integer pageSize)
- {
+ public void setPageSize(Integer pageSize) {
this.pageSize = pageSize;
}
- public String getOrderByColumn()
- {
+ public String getOrderByColumn() {
return orderByColumn;
}
- public void setOrderByColumn(String orderByColumn)
- {
+ public void setOrderByColumn(String orderByColumn) {
this.orderByColumn = orderByColumn;
}
- public String getIsAsc()
- {
+ public String getIsAsc() {
return isAsc;
}
- public void setIsAsc(String isAsc)
- {
+ public void setIsAsc(String isAsc) {
this.isAsc = isAsc;
}
}
diff --git a/spring-boot/ruoyi-common/src/main/java/com/ruoyi/common/core/page/TableDataInfo.java b/spring-boot/ruoyi-common/src/main/java/com/ruoyi/common/core/page/TableDataInfo.java
index 847685ba..d223e860 100644
--- a/spring-boot/ruoyi-common/src/main/java/com/ruoyi/common/core/page/TableDataInfo.java
+++ b/spring-boot/ruoyi-common/src/main/java/com/ruoyi/common/core/page/TableDataInfo.java
@@ -5,81 +5,78 @@ import java.util.List;
/**
* 表格分页数据对象
- *
+ *
* @author ruoyi
*/
-public class TableDataInfo implements Serializable
-{
+public class TableDataInfo implements Serializable {
private static final long serialVersionUID = 1L;
- /** 总记录数 */
+ /**
+ * 总记录数
+ */
private long total;
- /** 列表数据 */
+ /**
+ * 列表数据
+ */
private List> rows;
- /** 消息状态码 */
+ /**
+ * 消息状态码
+ */
private int code;
- /** 消息内容 */
+ /**
+ * 消息内容
+ */
private String msg;
/**
* 表格数据对象
*/
- public TableDataInfo()
- {
+ public TableDataInfo() {
}
/**
* 分页
- *
- * @param list 列表数据
+ *
+ * @param list 列表数据
* @param total 总记录数
*/
- public TableDataInfo(List> list, int total)
- {
+ public TableDataInfo(List> list, int total) {
this.rows = list;
this.total = total;
}
- public long getTotal()
- {
+ public long getTotal() {
return total;
}
- public void setTotal(long total)
- {
+ public void setTotal(long total) {
this.total = total;
}
- public List> getRows()
- {
+ public List> getRows() {
return rows;
}
- public void setRows(List> rows)
- {
+ public void setRows(List> rows) {
this.rows = rows;
}
- public int getCode()
- {
+ public int getCode() {
return code;
}
- public void setCode(int code)
- {
+ public void setCode(int code) {
this.code = code;
}
- public String getMsg()
- {
+ public String getMsg() {
return msg;
}
- public void setMsg(String msg)
- {
+ public void setMsg(String msg) {
this.msg = msg;
}
}
diff --git a/spring-boot/ruoyi-common/src/main/java/com/ruoyi/common/core/page/TableSupport.java b/spring-boot/ruoyi-common/src/main/java/com/ruoyi/common/core/page/TableSupport.java
index 14eb1e11..812bee2b 100644
--- a/spring-boot/ruoyi-common/src/main/java/com/ruoyi/common/core/page/TableSupport.java
+++ b/spring-boot/ruoyi-common/src/main/java/com/ruoyi/common/core/page/TableSupport.java
@@ -4,11 +4,10 @@ import com.ruoyi.common.utils.ServletUtils;
/**
* 表格数据处理
- *
+ *
* @author ruoyi
*/
-public class TableSupport
-{
+public class TableSupport {
/**
* 当前记录起始索引
*/
@@ -32,8 +31,7 @@ public class TableSupport
/**
* 封装分页对象
*/
- public static PageDomain getPageDomain()
- {
+ public static PageDomain getPageDomain() {
PageDomain pageDomain = new PageDomain();
pageDomain.setPageNum(ServletUtils.getParameterToInt(PAGE_NUM));
pageDomain.setPageSize(ServletUtils.getParameterToInt(PAGE_SIZE));
@@ -42,8 +40,7 @@ public class TableSupport
return pageDomain;
}
- public static PageDomain buildPageRequest()
- {
+ public static PageDomain buildPageRequest() {
return getPageDomain();
}
}
diff --git a/spring-boot/ruoyi-common/src/main/java/com/ruoyi/common/core/redis/RedisCache.java b/spring-boot/ruoyi-common/src/main/java/com/ruoyi/common/core/redis/RedisCache.java
index 22a610db..d354cf4f 100644
--- a/spring-boot/ruoyi-common/src/main/java/com/ruoyi/common/core/redis/RedisCache.java
+++ b/spring-boot/ruoyi-common/src/main/java/com/ruoyi/common/core/redis/RedisCache.java
@@ -6,6 +6,7 @@ import java.util.List;
import java.util.Map;
import java.util.Set;
import java.util.concurrent.TimeUnit;
+
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.redis.core.BoundSetOperations;
import org.springframework.data.redis.core.HashOperations;
@@ -18,59 +19,54 @@ import org.springframework.stereotype.Component;
*
* @author ruoyi
**/
-@SuppressWarnings(value = { "unchecked", "rawtypes" })
+@SuppressWarnings(value = {"unchecked", "rawtypes"})
@Component
-public class RedisCache
-{
+public class RedisCache {
@Autowired
public RedisTemplate redisTemplate;
/**
* 缓存基本的对象,Integer、String、实体类等
*
- * @param key 缓存的键值
+ * @param key 缓存的键值
* @param value 缓存的值
*/
- public void setCacheObject(final String key, final T value)
- {
+ public void setCacheObject(final String key, final T value) {
redisTemplate.opsForValue().set(key, value);
}
/**
* 缓存基本的对象,Integer、String、实体类等
*
- * @param key 缓存的键值
- * @param value 缓存的值
- * @param timeout 时间
+ * @param key 缓存的键值
+ * @param value 缓存的值
+ * @param timeout 时间
* @param timeUnit 时间颗粒度
*/
- public void setCacheObject(final String key, final T value, final Integer timeout, final TimeUnit timeUnit)
- {
+ public void setCacheObject(final String key, final T value, final Integer timeout, final TimeUnit timeUnit) {
redisTemplate.opsForValue().set(key, value, timeout, timeUnit);
}
/**
* 设置有效时间
*
- * @param key Redis键
+ * @param key Redis键
* @param timeout 超时时间
* @return true=设置成功;false=设置失败
*/
- public boolean expire(final String key, final long timeout)
- {
+ public boolean expire(final String key, final long timeout) {
return expire(key, timeout, TimeUnit.SECONDS);
}
/**
* 设置有效时间
*
- * @param key Redis键
+ * @param key Redis键
* @param timeout 超时时间
- * @param unit 时间单位
+ * @param unit 时间单位
* @return true=设置成功;false=设置失败
*/
- public boolean expire(final String key, final long timeout, final TimeUnit unit)
- {
+ public boolean expire(final String key, final long timeout, final TimeUnit unit) {
return redisTemplate.expire(key, timeout, unit);
}
@@ -80,8 +76,7 @@ public class RedisCache
* @param key 缓存键值
* @return 缓存键值对应的数据
*/
- public T getCacheObject(final String key)
- {
+ public T getCacheObject(final String key) {
ValueOperations operation = redisTemplate.opsForValue();
return operation.get(key);
}
@@ -91,8 +86,7 @@ public class RedisCache
*
* @param key
*/
- public boolean deleteObject(final String key)
- {
+ public boolean deleteObject(final String key) {
return redisTemplate.delete(key);
}
@@ -102,20 +96,18 @@ public class RedisCache
* @param collection 多个对象
* @return
*/
- public long deleteObject(final Collection collection)
- {
+ public long deleteObject(final Collection collection) {
return redisTemplate.delete(collection);
}
/**
* 缓存List数据
*
- * @param key 缓存的键值
+ * @param key 缓存的键值
* @param dataList 待缓存的List数据
* @return 缓存的对象
*/
- public long setCacheList(final String key, final List dataList)
- {
+ public long setCacheList(final String key, final List dataList) {
Long count = redisTemplate.opsForList().rightPushAll(key, dataList);
return count == null ? 0 : count;
}
@@ -126,24 +118,21 @@ public class RedisCache
* @param key 缓存的键值
* @return 缓存键值对应的数据
*/
- public List getCacheList(final String key)
- {
+ public List getCacheList(final String key) {
return redisTemplate.opsForList().range(key, 0, -1);
}
/**
* 缓存Set
*
- * @param key 缓存键值
+ * @param key 缓存键值
* @param dataSet 缓存的数据
* @return 缓存数据的对象
*/
- public BoundSetOperations setCacheSet(final String key, final Set dataSet)
- {
+ public BoundSetOperations setCacheSet(final String key, final Set dataSet) {
BoundSetOperations setOperation = redisTemplate.boundSetOps(key);
Iterator it = dataSet.iterator();
- while (it.hasNext())
- {
+ while (it.hasNext()) {
setOperation.add(it.next());
}
return setOperation;
@@ -155,8 +144,7 @@ public class RedisCache
* @param key
* @return
*/
- public Set getCacheSet(final String key)
- {
+ public Set getCacheSet(final String key) {
return redisTemplate.opsForSet().members(key);
}
@@ -166,8 +154,7 @@ public class RedisCache
* @param key
* @param dataMap
*/
- public void setCacheMap(final String key, final Map dataMap)
- {
+ public void setCacheMap(final String key, final Map dataMap) {
if (dataMap != null) {
redisTemplate.opsForHash().putAll(key, dataMap);
}
@@ -179,32 +166,29 @@ public class RedisCache
* @param key
* @return
*/
- public Map getCacheMap(final String key)
- {
+ public Map getCacheMap(final String key) {
return redisTemplate.opsForHash().entries(key);
}
/**
* 往Hash中存入数据
*
- * @param key Redis键
- * @param hKey Hash键
+ * @param key Redis键
+ * @param hKey Hash键
* @param value 值
*/
- public void setCacheMapValue(final String key, final String hKey, final T value)
- {
+ public void setCacheMapValue(final String key, final String hKey, final T value) {
redisTemplate.opsForHash().put(key, hKey, value);
}
/**
* 获取Hash中的数据
*
- * @param key Redis键
+ * @param key Redis键
* @param hKey Hash键
* @return Hash中的对象
*/
- public T getCacheMapValue(final String key, final String hKey)
- {
+ public T getCacheMapValue(final String key, final String hKey) {
HashOperations opsForHash = redisTemplate.opsForHash();
return opsForHash.get(key, hKey);
}
@@ -212,12 +196,11 @@ public class RedisCache
/**
* 获取多个Hash中的数据
*
- * @param key Redis键
+ * @param key Redis键
* @param hKeys Hash键集合
* @return Hash对象集合
*/
- public List getMultiCacheMapValue(final String key, final Collection