update 补全 lombok 注解

2.X
疯狂的狮子li 3 years ago
parent 5a18beaefa
commit 9dd3fca1c8

@ -18,6 +18,7 @@ import com.ruoyi.common.core.web.domain.BaseEntity;
* @author ruoyi
*/
@Data
@EqualsAndHashCode(callSuper = true)
@NoArgsConstructor
@Accessors(chain = true)
public class SysDept extends BaseEntity {

@ -18,6 +18,7 @@ import com.ruoyi.common.core.web.domain.BaseEntity;
* @author ruoyi
*/
@Data
@EqualsAndHashCode(callSuper = true)
@NoArgsConstructor
@Accessors(chain = true)
public class SysDictData extends BaseEntity {

@ -17,6 +17,7 @@ import com.ruoyi.common.core.web.domain.BaseEntity;
* @author ruoyi
*/
@Data
@EqualsAndHashCode(callSuper = true)
@NoArgsConstructor
@Accessors(chain = true)
public class SysDictType extends BaseEntity {

@ -15,6 +15,7 @@ import lombok.experimental.Accessors;
* @author ruoyi
*/
@Data
@EqualsAndHashCode(callSuper = true)
@NoArgsConstructor
@Accessors(chain = true)
public class SysLogininfor extends BaseEntity {

@ -15,6 +15,7 @@ import lombok.experimental.Accessors;
* @author ruoyi
*/
@Data
@EqualsAndHashCode(callSuper = true)
@NoArgsConstructor
@Accessors(chain = true)
public class SysOperLog extends BaseEntity {

@ -17,6 +17,7 @@ import com.ruoyi.common.core.web.domain.BaseEntity;
* @author ruoyi
*/
@Data
@EqualsAndHashCode(callSuper = true)
@NoArgsConstructor
@Accessors(chain = true)
public class SysRole extends BaseEntity {

@ -23,6 +23,7 @@ import com.ruoyi.common.core.web.domain.BaseEntity;
* @author ruoyi
*/
@Data
@EqualsAndHashCode(callSuper = true)
@NoArgsConstructor
@Accessors(chain = true)
public class SysUser extends BaseEntity {

@ -1,10 +1,15 @@
package com.ruoyi.common.core.enums;
import lombok.AllArgsConstructor;
import lombok.Getter;
/**
*
*
* @author ruoyi
*/
@Getter
@AllArgsConstructor
public enum UserStatus
{
OK("0", "正常"), DISABLE("1", "停用"), DELETED("2", "删除");
@ -12,19 +17,4 @@ public enum UserStatus
private final String code;
private final String info;
UserStatus(String code, String info)
{
this.code = code;
this.info = info;
}
public String getCode()
{
return code;
}
public String getInfo()
{
return info;
}
}

@ -17,8 +17,6 @@ public class GlobalException extends RuntimeException
/**
*
*
* {@link CommonResult#getDetailMessage()}
*/
private String detailMessage;
@ -45,6 +43,7 @@ public class GlobalException extends RuntimeException
return this;
}
@Override
public String getMessage()
{
return message;

@ -21,8 +21,6 @@ public final class ServiceException extends RuntimeException
/**
*
*
* {@link CommonResult#getDetailMessage()}
*/
private String detailMessage;

@ -1,10 +1,15 @@
package com.ruoyi.common.core.exception.base;
import lombok.AllArgsConstructor;
import lombok.Getter;
/**
*
*
* @author ruoyi
*/
@Getter
@AllArgsConstructor
public class BaseException extends RuntimeException
{
private static final long serialVersionUID = 1L;
@ -29,14 +34,6 @@ public class BaseException extends RuntimeException
*/
private String defaultMessage;
public BaseException(String module, String code, Object[] args, String defaultMessage)
{
this.module = module;
this.code = code;
this.args = args;
this.defaultMessage = defaultMessage;
}
public BaseException(String module, String code, Object[] args)
{
this(module, code, args, null);
@ -57,23 +54,4 @@ public class BaseException extends RuntimeException
this(null, null, null, defaultMessage);
}
public String getModule()
{
return module;
}
public String getCode()
{
return code;
}
public Object[] getArgs()
{
return args;
}
public String getDefaultMessage()
{
return defaultMessage;
}
}

@ -3,6 +3,8 @@ package com.ruoyi.common.core.web.controller;
import java.beans.PropertyEditorSupport;
import java.util.Date;
import java.util.List;
import lombok.extern.slf4j.Slf4j;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.web.bind.WebDataBinder;
@ -23,9 +25,9 @@ import com.ruoyi.common.core.web.page.TableSupport;
*
* @author ruoyi
*/
@Slf4j
public class BaseController
{
protected final Logger logger = LoggerFactory.getLogger(this.getClass());
/**
* Date

@ -5,12 +5,14 @@ import java.util.Date;
import java.util.HashMap;
import java.util.Map;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
/**
* Entity
*
* @author ruoyi
*/
@Data
public class BaseEntity implements Serializable
{
private static final long serialVersionUID = 1L;
@ -38,66 +40,6 @@ public class BaseEntity implements Serializable
/** 请求参数 */
private Map<String, Object> params;
public String getSearchValue()
{
return searchValue;
}
public void setSearchValue(String searchValue)
{
this.searchValue = searchValue;
}
public String getCreateBy()
{
return createBy;
}
public void setCreateBy(String createBy)
{
this.createBy = createBy;
}
public Date getCreateTime()
{
return createTime;
}
public void setCreateTime(Date createTime)
{
this.createTime = createTime;
}
public String getUpdateBy()
{
return updateBy;
}
public void setUpdateBy(String updateBy)
{
this.updateBy = updateBy;
}
public Date getUpdateTime()
{
return updateTime;
}
public void setUpdateTime(Date updateTime)
{
this.updateTime = updateTime;
}
public String getRemark()
{
return remark;
}
public void setRemark(String remark)
{
this.remark = remark;
}
public Map<String, Object> getParams()
{
if (params == null)
@ -107,8 +49,4 @@ public class BaseEntity implements Serializable
return params;
}
public void setParams(Map<String, Object> params)
{
this.params = params;
}
}

@ -1,5 +1,7 @@
package com.ruoyi.common.core.web.domain;
import lombok.*;
import java.util.ArrayList;
import java.util.List;
@ -8,6 +10,8 @@ import java.util.List;
*
* @author ruoyi
*/
@Data
@EqualsAndHashCode(callSuper = true)
public class TreeEntity extends BaseEntity
{
private static final long serialVersionUID = 1L;
@ -27,53 +31,4 @@ public class TreeEntity extends BaseEntity
/** 子部门 */
private List<?> children = new ArrayList<>();
public String getParentName()
{
return parentName;
}
public void setParentName(String parentName)
{
this.parentName = parentName;
}
public Long getParentId()
{
return parentId;
}
public void setParentId(Long parentId)
{
this.parentId = parentId;
}
public Integer getOrderNum()
{
return orderNum;
}
public void setOrderNum(Integer orderNum)
{
this.orderNum = orderNum;
}
public String getAncestors()
{
return ancestors;
}
public void setAncestors(String ancestors)
{
this.ancestors = ancestors;
}
public List<?> getChildren()
{
return children;
}
public void setChildren(List<?> children)
{
this.children = children;
}
}

@ -1,12 +1,14 @@
package com.ruoyi.common.core.web.page;
import com.ruoyi.common.core.utils.StringUtils;
import lombok.Data;
/**
*
*
* @author ruoyi
*/
@Data
public class PageDomain
{
/** 当前记录起始索引 */
@ -33,41 +35,6 @@ public class PageDomain
return StringUtils.toUnderScoreCase(orderByColumn) + " " + isAsc;
}
public Integer getPageNum()
{
return pageNum;
}
public void setPageNum(Integer pageNum)
{
this.pageNum = pageNum;
}
public Integer getPageSize()
{
return pageSize;
}
public void setPageSize(Integer pageSize)
{
this.pageSize = pageSize;
}
public String getOrderByColumn()
{
return orderByColumn;
}
public void setOrderByColumn(String orderByColumn)
{
this.orderByColumn = orderByColumn;
}
public String getIsAsc()
{
return isAsc;
}
public void setIsAsc(String isAsc)
{
if (StringUtils.isNotEmpty(isAsc))
@ -94,8 +61,4 @@ public class PageDomain
return reasonable;
}
public void setReasonable(Boolean reasonable)
{
this.reasonable = reasonable;
}
}

@ -1,5 +1,8 @@
package com.ruoyi.common.core.web.page;
import lombok.Data;
import lombok.NoArgsConstructor;
import java.io.Serializable;
import java.util.List;
@ -8,6 +11,8 @@ import java.util.List;
*
* @author ruoyi
*/
@Data
@NoArgsConstructor
public class TableDataInfo implements Serializable
{
private static final long serialVersionUID = 1L;
@ -24,13 +29,6 @@ public class TableDataInfo implements Serializable
/** 消息内容 */
private String msg;
/**
*
*/
public TableDataInfo()
{
}
/**
*
*
@ -43,43 +41,4 @@ public class TableDataInfo implements Serializable
this.total = total;
}
public long getTotal()
{
return total;
}
public void setTotal(long total)
{
this.total = total;
}
public List<?> getRows()
{
return rows;
}
public void setRows(List<?> rows)
{
this.rows = rows;
}
public int getCode()
{
return code;
}
public void setCode(int code)
{
this.code = code;
}
public String getMsg()
{
return msg;
}
public void setMsg(String msg)
{
this.msg = msg;
}
}

@ -4,6 +4,8 @@ import java.util.Collection;
import java.util.Map;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import lombok.extern.slf4j.Slf4j;
import org.aspectj.lang.JoinPoint;
import org.aspectj.lang.annotation.AfterReturning;
import org.aspectj.lang.annotation.AfterThrowing;
@ -30,12 +32,12 @@ import com.ruoyi.system.api.domain.SysOperLog;
*
* @author ruoyi
*/
@Slf4j
@Aspect
@Component
public class LogAspect
{
private static final Logger log = LoggerFactory.getLogger(LogAspect.class);
@Autowired
private AsyncLogService asyncLogService;

@ -1,5 +1,6 @@
package com.ruoyi.gateway.config.properties;
import lombok.Data;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.cloud.context.config.annotation.RefreshScope;
import org.springframework.context.annotation.Configuration;
@ -9,6 +10,7 @@ import org.springframework.context.annotation.Configuration;
*
* @author ruoyi
*/
@Data
@Configuration
@RefreshScope
@ConfigurationProperties(prefix = "security.captcha")
@ -24,23 +26,4 @@ public class CaptchaProperties
*/
private String type;
public Boolean getEnabled()
{
return enabled;
}
public void setEnabled(Boolean enabled)
{
this.enabled = enabled;
}
public String getType()
{
return type;
}
public void setType(String type)
{
this.type = type;
}
}

@ -2,6 +2,8 @@ package com.ruoyi.gateway.config.properties;
import java.util.ArrayList;
import java.util.List;
import lombok.Data;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.cloud.context.config.annotation.RefreshScope;
import org.springframework.context.annotation.Configuration;
@ -11,6 +13,7 @@ import org.springframework.context.annotation.Configuration;
*
* @author ruoyi
*/
@Data
@Configuration
@RefreshScope
@ConfigurationProperties(prefix = "security.xss")
@ -26,23 +29,4 @@ public class XssProperties
*/
private List<String> excludeUrls = new ArrayList<>();
public Boolean getEnabled()
{
return enabled;
}
public void setEnabled(Boolean enabled)
{
this.enabled = enabled;
}
public List<String> getExcludeUrls()
{
return excludeUrls;
}
public void setExcludeUrls(List<String> excludeUrls)
{
this.excludeUrls = excludeUrls;
}
}

@ -1,5 +1,6 @@
package com.ruoyi.gateway.handler;
import lombok.extern.slf4j.Slf4j;
import org.springframework.cloud.gateway.support.NotFoundException;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@ -17,11 +18,11 @@ import reactor.core.publisher.Mono;
*
* @author ruoyi
*/
@Slf4j
@Order(-1)
@Configuration
public class GatewayExceptionHandler implements ErrorWebExceptionHandler
{
private static final Logger log = LoggerFactory.getLogger(GatewayExceptionHandler.class);
@Override
public Mono<Void> handle(ServerWebExchange exchange, Throwable ex)

@ -17,6 +17,7 @@ import com.ruoyi.common.core.web.domain.BaseEntity;
* @author ruoyi
*/
@Data
@EqualsAndHashCode(callSuper = true)
@NoArgsConstructor
@Accessors(chain = true)
public class GenTable extends BaseEntity {

@ -13,6 +13,7 @@ import lombok.experimental.Accessors;
* @author ruoyi
*/
@Data
@EqualsAndHashCode(callSuper = true)
@NoArgsConstructor
@Accessors(chain = true)
public class GenTableColumn extends BaseEntity {

@ -22,6 +22,7 @@ import com.ruoyi.job.util.CronUtils;
* @author ruoyi
*/
@Data
@EqualsAndHashCode(callSuper = true)
@NoArgsConstructor
@Accessors(chain = true)
public class SysJob extends BaseEntity {

@ -15,6 +15,7 @@ import com.ruoyi.common.core.web.domain.BaseEntity;
* @author ruoyi
*/
@Data
@EqualsAndHashCode(callSuper = true)
@NoArgsConstructor
@Accessors(chain = true)
public class SysJobLog extends BaseEntity {

@ -17,6 +17,7 @@ import com.ruoyi.common.core.web.domain.BaseEntity;
* @author ruoyi
*/
@Data
@EqualsAndHashCode(callSuper = true)
@NoArgsConstructor
@Accessors(chain = true)
public class SysConfig extends BaseEntity {

@ -17,6 +17,7 @@ import com.ruoyi.common.core.web.domain.BaseEntity;
* @author ruoyi
*/
@Data
@EqualsAndHashCode(callSuper = true)
@NoArgsConstructor
@Accessors(chain = true)
public class SysMenu extends BaseEntity {

@ -16,6 +16,7 @@ import com.ruoyi.common.core.web.domain.BaseEntity;
* @author ruoyi
*/
@Data
@EqualsAndHashCode(callSuper = true)
@NoArgsConstructor
@Accessors(chain = true)
public class SysNotice extends BaseEntity {

@ -17,6 +17,7 @@ import com.ruoyi.common.core.web.domain.BaseEntity;
* @author ruoyi
*/
@Data
@EqualsAndHashCode(callSuper = true)
@NoArgsConstructor
@Accessors(chain = true)
public class SysPost extends BaseEntity {

Loading…
Cancel
Save