update 去除链式调用注解 不符合规范导致很多奇葩问题 例如: copy为空问题

2.X
疯狂的狮子li 2022-01-26 15:29:31 +08:00
parent d71e1e1c96
commit 65fd3dcef6
33 changed files with 804 additions and 857 deletions

View File

@ -170,13 +170,6 @@
<scope>import</scope>
</dependency>
<!-- SpringBoot 监控客户端 -->
<dependency>
<groupId>de.codecentric</groupId>
<artifactId>spring-boot-admin-starter-client</artifactId>
<version>${spring-boot-admin.version}</version>
</dependency>
<!-- FastDFS 分布式文件系统 -->
<dependency>
<groupId>com.github.tobato</groupId>

View File

@ -1,8 +1,6 @@
package com.ruoyi.file.api.domain;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;
import java.io.Serializable;
@ -12,8 +10,6 @@ import java.io.Serializable;
* @author ruoyi
*/
@Data
@NoArgsConstructor
@Accessors(chain = true)
public class SysFile implements Serializable {
private static final long serialVersionUID = 1L;

View File

@ -20,7 +20,6 @@ import javax.validation.constraints.Size;
@Data
@EqualsAndHashCode(callSuper = true)
@Accessors(chain = true)
@ApiModel("部门业务对象")
public class SysDept extends TreeEntity {
private static final long serialVersionUID = 1L;

View File

@ -10,7 +10,6 @@ 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;
@ -23,7 +22,6 @@ import javax.validation.constraints.Size;
@Data
@EqualsAndHashCode(callSuper = true)
@Accessors(chain = true)
@ExcelIgnoreUnannotated
@ApiModel("字典数据业务对象")
public class SysDictData extends BaseEntity {

View File

@ -22,7 +22,6 @@ import javax.validation.constraints.Size;
@Data
@EqualsAndHashCode(callSuper = true)
@Accessors(chain = true)
@ExcelIgnoreUnannotated
@ApiModel("字典类型业务对象")
public class SysDictType extends BaseEntity {

View File

@ -21,7 +21,6 @@ import java.util.Map;
*/
@Data
@Accessors(chain = true)
@ExcelIgnoreUnannotated
@ApiModel("系统访问记录业务对象")
public class SysLogininfor implements Serializable {

View File

@ -21,7 +21,6 @@ import java.util.Map;
*/
@Data
@Accessors(chain = true)
@ExcelIgnoreUnannotated
@ApiModel("操作日志记录业务对象")
public class SysOperLog implements Serializable {

View File

@ -23,7 +23,6 @@ import javax.validation.constraints.Size;
@Data
@NoArgsConstructor
@EqualsAndHashCode(callSuper = true)
@Accessors(chain = true)
@ExcelIgnoreUnannotated
public class SysRole extends BaseEntity {

View File

@ -26,7 +26,6 @@ import java.util.List;
@Data
@NoArgsConstructor
@EqualsAndHashCode(callSuper = true)
@Accessors(chain = true)
@ApiModel("用户信息业务对象")
public class SysUser extends BaseEntity {

View File

@ -1,67 +1,66 @@
package com.ruoyi.system.api.model;
import com.ruoyi.system.api.domain.SysUser;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;
import java.io.Serializable;
import java.util.Set;
/**
*
*
* @author ruoyi
*/
@Data
@NoArgsConstructor
@Accessors(chain = true)
public class LoginUser implements Serializable {
private static final long serialVersionUID = 1L;
/**
*
*/
private String token;
/**
* id
*/
private Long userid;
/**
*
*/
private String username;
/**
*
*/
private Long loginTime;
/**
*
*/
private Long expireTime;
/**
* IP
*/
private String ipaddr;
/**
*
*/
private Set<String> permissions;
/**
*
*/
private Set<String> roles;
/**
*
*/
private SysUser sysUser;
}
package com.ruoyi.system.api.model;
import com.ruoyi.system.api.domain.SysUser;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;
import java.io.Serializable;
import java.util.Set;
/**
*
*
* @author ruoyi
*/
@Data
@NoArgsConstructor
public class LoginUser implements Serializable {
private static final long serialVersionUID = 1L;
/**
*
*/
private String token;
/**
* id
*/
private Long userid;
/**
*
*/
private String username;
/**
*
*/
private Long loginTime;
/**
*
*/
private Long expireTime;
/**
* IP
*/
private String ipaddr;
/**
*
*/
private Set<String> permissions;
/**
*
*/
private Set<String> roles;
/**
*
*/
private SysUser sysUser;
}

View File

@ -11,7 +11,6 @@ import lombok.experimental.Accessors;
*/
@Data
@NoArgsConstructor
@Accessors(chain = true)
public class LoginBody {
/**

View File

@ -17,18 +17,6 @@
<dependencies>
<!-- &lt;!&ndash; SpringCloud Openfeign &ndash;&gt;-->
<!-- <dependency>-->
<!-- <groupId>org.springframework.cloud</groupId>-->
<!-- <artifactId>spring-cloud-starter-openfeign</artifactId>-->
<!-- </dependency>-->
<!-- SpringCloud Loadbalancer -->
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-starter-loadbalancer</artifactId>
</dependency>
<!-- Spring Context Support -->
<dependency>
<groupId>org.springframework</groupId>

View File

@ -1,73 +1,75 @@
package com.ruoyi.common.core.domain;
import com.ruoyi.common.core.constant.Constants;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;
import java.io.Serializable;
/**
*
*
* @author ruoyi
*/
@Data
@NoArgsConstructor
@Accessors(chain = true)
public class R<T> implements Serializable {
private static final long serialVersionUID = 1L;
/**
*
*/
public static final int SUCCESS = Constants.SUCCESS;
/**
*
*/
public static final int FAIL = Constants.FAIL;
private int code;
private String msg;
private T data;
public static <T> R<T> ok() {
return restResult(null, SUCCESS, null);
}
public static <T> R<T> ok(T data) {
return restResult(data, SUCCESS, null);
}
public static <T> R<T> ok(T data, String msg) {
return restResult(data, SUCCESS, msg);
}
public static <T> R<T> fail() {
return restResult(null, FAIL, null);
}
public static <T> R<T> fail(String msg) {
return restResult(null, FAIL, msg);
}
public static <T> R<T> fail(T data) {
return restResult(data, FAIL, null);
}
public static <T> R<T> fail(T data, String msg) {
return restResult(data, FAIL, msg);
}
public static <T> R<T> fail(int code, String msg) {
return restResult(null, code, msg);
}
private static <T> R<T> restResult(T data, int code, String msg) {
return new R<T>().setCode(code).setData(data).setMsg(msg);
}
}
package com.ruoyi.common.core.domain;
import com.ruoyi.common.core.constant.Constants;
import lombok.Data;
import lombok.NoArgsConstructor;
import java.io.Serializable;
/**
*
*
* @author ruoyi
*/
@Data
@NoArgsConstructor
public class R<T> implements Serializable {
private static final long serialVersionUID = 1L;
/**
*
*/
public static final int SUCCESS = Constants.SUCCESS;
/**
*
*/
public static final int FAIL = Constants.FAIL;
private int code;
private String msg;
private T data;
public static <T> R<T> ok() {
return restResult(null, SUCCESS, null);
}
public static <T> R<T> ok(T data) {
return restResult(data, SUCCESS, null);
}
public static <T> R<T> ok(T data, String msg) {
return restResult(data, SUCCESS, msg);
}
public static <T> R<T> fail() {
return restResult(null, FAIL, null);
}
public static <T> R<T> fail(String msg) {
return restResult(null, FAIL, msg);
}
public static <T> R<T> fail(T data) {
return restResult(data, FAIL, null);
}
public static <T> R<T> fail(T data, String msg) {
return restResult(data, FAIL, msg);
}
public static <T> R<T> fail(int code, String msg) {
return restResult(null, code, msg);
}
private static <T> R<T> restResult(T data, int code, String msg) {
R<T> r = new R<>();
r.setCode(code);
r.setData(data);
r.setMsg(msg);
return r;
}
}

View File

@ -16,7 +16,6 @@ import java.util.Map;
*/
@Data
@Accessors(chain = true)
public class BaseEntity implements Serializable {
private static final long serialVersionUID = 1L;

View File

@ -16,7 +16,6 @@ import java.util.List;
@Data
@EqualsAndHashCode(callSuper = true)
@Accessors(chain = true)
public class TreeEntity extends BaseEntity {
private static final long serialVersionUID = 1L;

View File

@ -84,7 +84,6 @@ public class SwaggerProperties {
@Data
@NoArgsConstructor
@Accessors(chain = true)
public static class Contact {
/**
@ -104,7 +103,6 @@ public class SwaggerProperties {
@Data
@NoArgsConstructor
@Accessors(chain = true)
public static class Authorization {
/**
@ -128,7 +126,6 @@ public class SwaggerProperties {
@Data
@NoArgsConstructor
@Accessors(chain = true)
public static class AuthorizationScope {
/**

View File

@ -1,30 +1,29 @@
package com.ruoyi.gateway.config.properties;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.cloud.context.config.annotation.RefreshScope;
import org.springframework.context.annotation.Configuration;
import java.util.ArrayList;
import java.util.List;
/**
*
*
* @author ruoyi
*/
@Data
@NoArgsConstructor
@Accessors(chain = true)
@Configuration
@RefreshScope
@ConfigurationProperties(prefix = "security.ignore")
public class IgnoreWhiteProperties {
/**
*
*/
private List<String> whites = new ArrayList<>();
}
package com.ruoyi.gateway.config.properties;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.cloud.context.config.annotation.RefreshScope;
import org.springframework.context.annotation.Configuration;
import java.util.ArrayList;
import java.util.List;
/**
*
*
* @author ruoyi
*/
@Data
@NoArgsConstructor
@Configuration
@RefreshScope
@ConfigurationProperties(prefix = "security.ignore")
public class IgnoreWhiteProperties {
/**
*
*/
private List<String> whites = new ArrayList<>();
}

View File

@ -1,47 +1,46 @@
package com.ruoyi.file.config;
import io.minio.MinioClient;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
/**
* Minio
*
* @author ruoyi
*/
@Data
@NoArgsConstructor
@Accessors(chain = true)
@Configuration
@ConfigurationProperties(prefix = "minio")
public class MinioConfig {
/**
*
*/
private String url;
/**
*
*/
private String accessKey;
/**
*
*/
private String secretKey;
/**
*
*/
private String bucketName;
@Bean
public MinioClient getMinioClient() {
return MinioClient.builder().endpoint(url).credentials(accessKey, secretKey).build();
}
}
package com.ruoyi.file.config;
import io.minio.MinioClient;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
/**
* Minio
*
* @author ruoyi
*/
@Data
@NoArgsConstructor
@Configuration
@ConfigurationProperties(prefix = "minio")
public class MinioConfig {
/**
*
*/
private String url;
/**
*
*/
private String accessKey;
/**
*
*/
private String secretKey;
/**
*
*/
private String bucketName;
@Bean
public MinioClient getMinioClient() {
return MinioClient.builder().endpoint(url).credentials(accessKey, secretKey).build();
}
}

View File

@ -1,186 +1,185 @@
package com.ruoyi.gen.domain;
import com.ruoyi.common.core.constant.GenConstants;
import com.ruoyi.common.core.utils.StringUtils;
import com.ruoyi.common.core.web.domain.BaseEntity;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;
import org.apache.commons.lang3.ArrayUtils;
import javax.validation.Valid;
import javax.validation.constraints.NotBlank;
import java.util.List;
/**
* gen_table
*
* @author ruoyi
*/
@Data
@EqualsAndHashCode(callSuper = true)
@NoArgsConstructor
@Accessors(chain = true)
public class GenTable extends BaseEntity {
/**
*
*/
private Long tableId;
/**
*
*/
@NotBlank(message = "表名称不能为空")
private String tableName;
/**
*
*/
@NotBlank(message = "表描述不能为空")
private String tableComment;
/**
*
*/
private String subTableName;
/**
*
*/
private String subTableFkName;
/**
* ()
*/
@NotBlank(message = "实体类名称不能为空")
private String className;
/**
* 使crud tree sub
*/
private String tplCategory;
/**
*
*/
@NotBlank(message = "生成包路径不能为空")
private String packageName;
/**
*
*/
@NotBlank(message = "生成模块名不能为空")
private String moduleName;
/**
*
*/
@NotBlank(message = "生成业务名不能为空")
private String businessName;
/**
*
*/
@NotBlank(message = "生成功能名不能为空")
private String functionName;
/**
*
*/
@NotBlank(message = "作者不能为空")
private String functionAuthor;
/**
* 0zip 1
*/
private String genType;
/**
*
*/
private String genPath;
/**
*
*/
private GenTableColumn pkColumn;
/**
*
*/
private GenTable subTable;
/**
*
*/
@Valid
private List<GenTableColumn> columns;
/**
*
*/
private String options;
/**
*
*/
private String treeCode;
/**
*
*/
private String treeParentCode;
/**
*
*/
private String treeName;
/**
* ID
*/
private String parentMenuId;
/**
*
*/
private String parentMenuName;
public boolean isSub() {
return isSub(this.tplCategory);
}
public static boolean isSub(String tplCategory) {
return tplCategory != null && StringUtils.equals(GenConstants.TPL_SUB, tplCategory);
}
public boolean isTree() {
return isTree(this.tplCategory);
}
public static boolean isTree(String tplCategory) {
return tplCategory != null && StringUtils.equals(GenConstants.TPL_TREE, tplCategory);
}
public boolean isCrud() {
return isCrud(this.tplCategory);
}
public static boolean isCrud(String tplCategory) {
return tplCategory != null && StringUtils.equals(GenConstants.TPL_CRUD, tplCategory);
}
public boolean isSuperColumn(String javaField) {
return isSuperColumn(this.tplCategory, javaField);
}
public static boolean isSuperColumn(String tplCategory, String javaField) {
if (isTree(tplCategory)) {
return StringUtils.equalsAnyIgnoreCase(javaField,
ArrayUtils.addAll(GenConstants.TREE_ENTITY, GenConstants.BASE_ENTITY));
}
return StringUtils.equalsAnyIgnoreCase(javaField, GenConstants.BASE_ENTITY);
}
}
package com.ruoyi.gen.domain;
import com.ruoyi.common.core.constant.GenConstants;
import com.ruoyi.common.core.utils.StringUtils;
import com.ruoyi.common.core.web.domain.BaseEntity;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;
import org.apache.commons.lang3.ArrayUtils;
import javax.validation.Valid;
import javax.validation.constraints.NotBlank;
import java.util.List;
/**
* gen_table
*
* @author ruoyi
*/
@Data
@EqualsAndHashCode(callSuper = true)
@NoArgsConstructor
public class GenTable extends BaseEntity {
/**
*
*/
private Long tableId;
/**
*
*/
@NotBlank(message = "表名称不能为空")
private String tableName;
/**
*
*/
@NotBlank(message = "表描述不能为空")
private String tableComment;
/**
*
*/
private String subTableName;
/**
*
*/
private String subTableFkName;
/**
* ()
*/
@NotBlank(message = "实体类名称不能为空")
private String className;
/**
* 使crud tree sub
*/
private String tplCategory;
/**
*
*/
@NotBlank(message = "生成包路径不能为空")
private String packageName;
/**
*
*/
@NotBlank(message = "生成模块名不能为空")
private String moduleName;
/**
*
*/
@NotBlank(message = "生成业务名不能为空")
private String businessName;
/**
*
*/
@NotBlank(message = "生成功能名不能为空")
private String functionName;
/**
*
*/
@NotBlank(message = "作者不能为空")
private String functionAuthor;
/**
* 0zip 1
*/
private String genType;
/**
*
*/
private String genPath;
/**
*
*/
private GenTableColumn pkColumn;
/**
*
*/
private GenTable subTable;
/**
*
*/
@Valid
private List<GenTableColumn> columns;
/**
*
*/
private String options;
/**
*
*/
private String treeCode;
/**
*
*/
private String treeParentCode;
/**
*
*/
private String treeName;
/**
* ID
*/
private String parentMenuId;
/**
*
*/
private String parentMenuName;
public boolean isSub() {
return isSub(this.tplCategory);
}
public static boolean isSub(String tplCategory) {
return tplCategory != null && StringUtils.equals(GenConstants.TPL_SUB, tplCategory);
}
public boolean isTree() {
return isTree(this.tplCategory);
}
public static boolean isTree(String tplCategory) {
return tplCategory != null && StringUtils.equals(GenConstants.TPL_TREE, tplCategory);
}
public boolean isCrud() {
return isCrud(this.tplCategory);
}
public static boolean isCrud(String tplCategory) {
return tplCategory != null && StringUtils.equals(GenConstants.TPL_CRUD, tplCategory);
}
public boolean isSuperColumn(String javaField) {
return isSuperColumn(this.tplCategory, javaField);
}
public static boolean isSuperColumn(String tplCategory, String javaField) {
if (isTree(tplCategory)) {
return StringUtils.equalsAnyIgnoreCase(javaField,
ArrayUtils.addAll(GenConstants.TREE_ENTITY, GenConstants.BASE_ENTITY));
}
return StringUtils.equalsAnyIgnoreCase(javaField, GenConstants.BASE_ENTITY);
}
}

View File

@ -1,211 +1,210 @@
package com.ruoyi.gen.domain;
import com.ruoyi.common.core.utils.StringUtils;
import com.ruoyi.common.core.web.domain.BaseEntity;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;
import javax.validation.constraints.NotBlank;
/**
* gen_table_column
*
* @author ruoyi
*/
@Data
@EqualsAndHashCode(callSuper = true)
@NoArgsConstructor
@Accessors(chain = true)
public class GenTableColumn extends BaseEntity {
/**
*
*/
private Long columnId;
/**
*
*/
private Long tableId;
/**
*
*/
private String columnName;
/**
*
*/
private String columnComment;
/**
*
*/
private String columnType;
/**
* JAVA
*/
private String javaType;
/**
* JAVA
*/
@NotBlank(message = "Java属性不能为空")
private String javaField;
/**
* 1
*/
private String isPk;
/**
* 1
*/
private String isIncrement;
/**
* 1
*/
private String isRequired;
/**
* 1
*/
private String isInsert;
/**
* 1
*/
private String isEdit;
/**
* 1
*/
private String isList;
/**
* 1
*/
private String isQuery;
/**
* EQNEGTLTLIKEBETWEEN
*/
private String queryType;
/**
* inputtextareaselectcheckboxradiodatetimeimageuploadeditor
*/
private String htmlType;
/**
*
*/
private String dictType;
/**
*
*/
private Integer sort;
public String getCapJavaField() {
return StringUtils.capitalize(javaField);
}
public boolean isPk() {
return isPk(this.isPk);
}
public boolean isPk(String isPk) {
return isPk != null && StringUtils.equals("1", isPk);
}
public boolean isIncrement() {
return isIncrement(this.isIncrement);
}
public boolean isIncrement(String isIncrement) {
return isIncrement != null && StringUtils.equals("1", isIncrement);
}
public boolean isRequired() {
return isRequired(this.isRequired);
}
public boolean isRequired(String isRequired) {
return isRequired != null && StringUtils.equals("1", isRequired);
}
public boolean isInsert() {
return isInsert(this.isInsert);
}
public boolean isInsert(String isInsert) {
return isInsert != null && StringUtils.equals("1", isInsert);
}
public boolean isEdit() {
return isInsert(this.isEdit);
}
public boolean isEdit(String isEdit) {
return isEdit != null && StringUtils.equals("1", isEdit);
}
public boolean isList() {
return isList(this.isList);
}
public boolean isList(String isList) {
return isList != null && StringUtils.equals("1", isList);
}
public boolean isQuery() {
return isQuery(this.isQuery);
}
public boolean isQuery(String isQuery) {
return isQuery != null && StringUtils.equals("1", isQuery);
}
public boolean isSuperColumn() {
return isSuperColumn(this.javaField);
}
public static boolean isSuperColumn(String javaField) {
return StringUtils.equalsAnyIgnoreCase(javaField,
// BaseEntity
"createBy", "createTime", "updateBy", "updateTime", "remark",
// TreeEntity
"parentName", "parentId", "orderNum", "ancestors");
}
public boolean isUsableColumn() {
return isUsableColumn(javaField);
}
public static boolean isUsableColumn(String javaField) {
// isSuperColumn()中的名单用于避免生成多余Domain属性若某些属性在生成页面时需要用到不能忽略则放在此处白名单
return StringUtils.equalsAnyIgnoreCase(javaField, "parentId", "orderNum", "remark");
}
public String readConverterExp() {
String remarks = StringUtils.substringBetween(this.columnComment, "", "");
StringBuffer sb = new StringBuffer();
if (StringUtils.isNotEmpty(remarks)) {
for (String value : remarks.split(" ")) {
if (StringUtils.isNotEmpty(value)) {
Object startStr = value.subSequence(0, 1);
String endStr = value.substring(1);
sb.append("").append(startStr).append("=").append(endStr).append(",");
}
}
return sb.deleteCharAt(sb.length() - 1).toString();
} else {
return this.columnComment;
}
}
}
package com.ruoyi.gen.domain;
import com.ruoyi.common.core.utils.StringUtils;
import com.ruoyi.common.core.web.domain.BaseEntity;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;
import javax.validation.constraints.NotBlank;
/**
* gen_table_column
*
* @author ruoyi
*/
@Data
@EqualsAndHashCode(callSuper = true)
@NoArgsConstructor
public class GenTableColumn extends BaseEntity {
/**
*
*/
private Long columnId;
/**
*
*/
private Long tableId;
/**
*
*/
private String columnName;
/**
*
*/
private String columnComment;
/**
*
*/
private String columnType;
/**
* JAVA
*/
private String javaType;
/**
* JAVA
*/
@NotBlank(message = "Java属性不能为空")
private String javaField;
/**
* 1
*/
private String isPk;
/**
* 1
*/
private String isIncrement;
/**
* 1
*/
private String isRequired;
/**
* 1
*/
private String isInsert;
/**
* 1
*/
private String isEdit;
/**
* 1
*/
private String isList;
/**
* 1
*/
private String isQuery;
/**
* EQNEGTLTLIKEBETWEEN
*/
private String queryType;
/**
* inputtextareaselectcheckboxradiodatetimeimageuploadeditor
*/
private String htmlType;
/**
*
*/
private String dictType;
/**
*
*/
private Integer sort;
public String getCapJavaField() {
return StringUtils.capitalize(javaField);
}
public boolean isPk() {
return isPk(this.isPk);
}
public boolean isPk(String isPk) {
return isPk != null && StringUtils.equals("1", isPk);
}
public boolean isIncrement() {
return isIncrement(this.isIncrement);
}
public boolean isIncrement(String isIncrement) {
return isIncrement != null && StringUtils.equals("1", isIncrement);
}
public boolean isRequired() {
return isRequired(this.isRequired);
}
public boolean isRequired(String isRequired) {
return isRequired != null && StringUtils.equals("1", isRequired);
}
public boolean isInsert() {
return isInsert(this.isInsert);
}
public boolean isInsert(String isInsert) {
return isInsert != null && StringUtils.equals("1", isInsert);
}
public boolean isEdit() {
return isInsert(this.isEdit);
}
public boolean isEdit(String isEdit) {
return isEdit != null && StringUtils.equals("1", isEdit);
}
public boolean isList() {
return isList(this.isList);
}
public boolean isList(String isList) {
return isList != null && StringUtils.equals("1", isList);
}
public boolean isQuery() {
return isQuery(this.isQuery);
}
public boolean isQuery(String isQuery) {
return isQuery != null && StringUtils.equals("1", isQuery);
}
public boolean isSuperColumn() {
return isSuperColumn(this.javaField);
}
public static boolean isSuperColumn(String javaField) {
return StringUtils.equalsAnyIgnoreCase(javaField,
// BaseEntity
"createBy", "createTime", "updateBy", "updateTime", "remark",
// TreeEntity
"parentName", "parentId", "orderNum", "ancestors");
}
public boolean isUsableColumn() {
return isUsableColumn(javaField);
}
public static boolean isUsableColumn(String javaField) {
// isSuperColumn()中的名单用于避免生成多余Domain属性若某些属性在生成页面时需要用到不能忽略则放在此处白名单
return StringUtils.equalsAnyIgnoreCase(javaField, "parentId", "orderNum", "remark");
}
public String readConverterExp() {
String remarks = StringUtils.substringBetween(this.columnComment, "", "");
StringBuffer sb = new StringBuffer();
if (StringUtils.isNotEmpty(remarks)) {
for (String value : remarks.split(" ")) {
if (StringUtils.isNotEmpty(value)) {
Object startStr = value.subSequence(0, 1);
String endStr = value.substring(1);
sb.append("").append(startStr).append("=").append(endStr).append(",");
}
}
return sb.deleteCharAt(sb.length() - 1).toString();
} else {
return this.columnComment;
}
}
}

View File

@ -22,7 +22,6 @@ import javax.validation.constraints.Size;
@Data
@EqualsAndHashCode(callSuper = true)
@Accessors(chain = true)
@ExcelIgnoreUnannotated
@ApiModel("参数配置业务对象")
public class SysConfig extends BaseEntity {

View File

@ -19,7 +19,6 @@ import javax.validation.constraints.Size;
@Data
@EqualsAndHashCode(callSuper = true)
@Accessors(chain = true)
@ApiModel("菜单权限业务对象")
public class SysMenu extends TreeEntity {

View File

@ -18,7 +18,6 @@ import javax.validation.constraints.Size;
*/
@Data
@EqualsAndHashCode(callSuper = true)
@Accessors(chain = true)
public class SysNotice extends BaseEntity {
/**

View File

@ -22,7 +22,6 @@ import javax.validation.constraints.Size;
@Data
@EqualsAndHashCode(callSuper = true)
@Accessors(chain = true)
@ExcelIgnoreUnannotated
@ApiModel("岗位信息业务对象")
public class SysPost extends BaseEntity {

View File

@ -12,7 +12,6 @@ import lombok.experimental.Accessors;
*/
@Data
@Accessors(chain = true)
@ApiModel("角色和部门关联")
public class SysRoleDept {

View File

@ -12,7 +12,6 @@ import lombok.experimental.Accessors;
*/
@Data
@Accessors(chain = true)
@ApiModel("角色和菜单关联")
public class SysRoleMenu {

View File

@ -1,67 +1,66 @@
package com.ruoyi.system.domain;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.experimental.Accessors;
/**
* 线
*
* @author Lion Li
*/
@Data
@Accessors(chain = true)
@ApiModel("当前在线会话业务对象")
public class SysUserOnline {
/**
*
*/
@ApiModelProperty(value = "会话编号")
private String tokenId;
/**
*
*/
@ApiModelProperty(value = "部门名称")
private String deptName;
/**
*
*/
@ApiModelProperty(value = "用户名称")
private String userName;
/**
* IP
*/
@ApiModelProperty(value = "登录IP地址")
private String ipaddr;
/**
*
*/
@ApiModelProperty(value = "登录地址")
private String loginLocation;
/**
*
*/
@ApiModelProperty(value = "浏览器类型")
private String browser;
/**
*
*/
@ApiModelProperty(value = "操作系统")
private String os;
/**
*
*/
@ApiModelProperty(value = "登录时间")
private Long loginTime;
}
package com.ruoyi.system.domain;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.experimental.Accessors;
/**
* 线
*
* @author Lion Li
*/
@Data
@ApiModel("当前在线会话业务对象")
public class SysUserOnline {
/**
*
*/
@ApiModelProperty(value = "会话编号")
private String tokenId;
/**
*
*/
@ApiModelProperty(value = "部门名称")
private String deptName;
/**
*
*/
@ApiModelProperty(value = "用户名称")
private String userName;
/**
* IP
*/
@ApiModelProperty(value = "登录IP地址")
private String ipaddr;
/**
*
*/
@ApiModelProperty(value = "登录地址")
private String loginLocation;
/**
*
*/
@ApiModelProperty(value = "浏览器类型")
private String browser;
/**
*
*/
@ApiModelProperty(value = "操作系统")
private String os;
/**
*
*/
@ApiModelProperty(value = "登录时间")
private Long loginTime;
}

View File

@ -12,7 +12,6 @@ import lombok.experimental.Accessors;
*/
@Data
@Accessors(chain = true)
@ApiModel("用户和岗位关联")
public class SysUserPost {

View File

@ -12,7 +12,6 @@ import lombok.experimental.Accessors;
*/
@Data
@Accessors(chain = true)
@ApiModel("用户和角色关联")
public class SysUserRole {

View File

@ -1,63 +1,62 @@
package com.ruoyi.system.domain.vo;
import com.ruoyi.common.core.utils.StringUtils;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;
/**
*
*
* @author ruoyi
*/
@Data
@NoArgsConstructor
@Accessors(chain = true)
public class MetaVo {
/**
*
*/
private String title;
/**
* src/assets/icons/svg
*/
private String icon;
/**
* true <keep-alive>
*/
private boolean noCache;
/**
* http(s)://开头)
*/
private String link;
public MetaVo(String title, String icon) {
this.title = title;
this.icon = icon;
}
public MetaVo(String title, String icon, boolean noCache) {
this.title = title;
this.icon = icon;
this.noCache = noCache;
}
public MetaVo(String title, String icon, String link) {
this.title = title;
this.icon = icon;
this.link = link;
}
public MetaVo(String title, String icon, boolean noCache, String link) {
this.title = title;
this.icon = icon;
this.noCache = noCache;
if (StringUtils.ishttp(link)) {
this.link = link;
}
}
}
package com.ruoyi.system.domain.vo;
import com.ruoyi.common.core.utils.StringUtils;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;
/**
*
*
* @author ruoyi
*/
@Data
@NoArgsConstructor
public class MetaVo {
/**
*
*/
private String title;
/**
* src/assets/icons/svg
*/
private String icon;
/**
* true <keep-alive>
*/
private boolean noCache;
/**
* http(s)://开头)
*/
private String link;
public MetaVo(String title, String icon) {
this.title = title;
this.icon = icon;
}
public MetaVo(String title, String icon, boolean noCache) {
this.title = title;
this.icon = icon;
this.noCache = noCache;
}
public MetaVo(String title, String icon, String link) {
this.title = title;
this.icon = icon;
this.link = link;
}
public MetaVo(String title, String icon, boolean noCache, String link) {
this.title = title;
this.icon = icon;
this.noCache = noCache;
if (StringUtils.ishttp(link)) {
this.link = link;
}
}
}

View File

@ -1,66 +1,65 @@
package com.ruoyi.system.domain.vo;
import com.fasterxml.jackson.annotation.JsonInclude;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;
import java.util.List;
/**
*
*
* @author ruoyi
*/
@Data
@NoArgsConstructor
@Accessors(chain = true)
@JsonInclude(JsonInclude.Include.NON_EMPTY)
public class RouterVo {
/**
*
*/
private String name;
/**
*
*/
private String path;
/**
* true
*/
private boolean hidden;
/**
* noRedirect
*/
private String redirect;
/**
*
*/
private String component;
/**
* {"id": 1, "name": "ry"}
*/
private String query;
/**
* children 1--
*/
private Boolean alwaysShow;
/**
*
*/
private MetaVo meta;
/**
*
*/
private List<RouterVo> children;
}
package com.ruoyi.system.domain.vo;
import com.fasterxml.jackson.annotation.JsonInclude;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;
import java.util.List;
/**
*
*
* @author ruoyi
*/
@Data
@NoArgsConstructor
@JsonInclude(JsonInclude.Include.NON_EMPTY)
public class RouterVo {
/**
*
*/
private String name;
/**
*
*/
private String path;
/**
* true
*/
private boolean hidden;
/**
* noRedirect
*/
private String redirect;
/**
*
*/
private String component;
/**
* {"id": 1, "name": "ry"}
*/
private String query;
/**
* children 1--
*/
private Boolean alwaysShow;
/**
*
*/
private MetaVo meta;
/**
*
*/
private List<RouterVo> children;
}

View File

@ -18,7 +18,6 @@ import java.util.Date;
@Data
@NoArgsConstructor
@Accessors(chain = true)
public class SysUserExportVo implements Serializable {
private static final long serialVersionUID = 1L;

View File

@ -16,7 +16,6 @@ import java.io.Serializable;
@Data
@NoArgsConstructor
// @Accessors(chain = true) // 导入不允许使用 会找不到set方法
public class SysUserImportVo implements Serializable {
private static final long serialVersionUID = 1L;