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> <scope>import</scope>
</dependency> </dependency>
<!-- SpringBoot 监控客户端 -->
<dependency>
<groupId>de.codecentric</groupId>
<artifactId>spring-boot-admin-starter-client</artifactId>
<version>${spring-boot-admin.version}</version>
</dependency>
<!-- FastDFS 分布式文件系统 --> <!-- FastDFS 分布式文件系统 -->
<dependency> <dependency>
<groupId>com.github.tobato</groupId> <groupId>com.github.tobato</groupId>

View File

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

View File

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

View File

@ -10,7 +10,6 @@ import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty; import io.swagger.annotations.ApiModelProperty;
import lombok.Data; import lombok.Data;
import lombok.EqualsAndHashCode; import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import javax.validation.constraints.NotBlank; import javax.validation.constraints.NotBlank;
import javax.validation.constraints.Size; import javax.validation.constraints.Size;
@ -23,7 +22,6 @@ import javax.validation.constraints.Size;
@Data @Data
@EqualsAndHashCode(callSuper = true) @EqualsAndHashCode(callSuper = true)
@Accessors(chain = true)
@ExcelIgnoreUnannotated @ExcelIgnoreUnannotated
@ApiModel("字典数据业务对象") @ApiModel("字典数据业务对象")
public class SysDictData extends BaseEntity { public class SysDictData extends BaseEntity {

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -17,18 +17,6 @@
<dependencies> <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 --> <!-- Spring Context Support -->
<dependency> <dependency>
<groupId>org.springframework</groupId> <groupId>org.springframework</groupId>

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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