diff --git a/.gitignore b/.gitignore index a1c2a238a965f004ff76978ac1086aa6fe95caea..60bbad77acbad5c80239673b724988175d4237ef 100644 --- a/.gitignore +++ b/.gitignore @@ -1,23 +1,24 @@ -# Compiled class file +**/nb-* +/target/ +bin +bak +.pmd +.project +.settings +.classpath +.idea.xml +.idea *.class - -# Log file +*.bak +*.iml +*.ipr +*.iws +.DS_Store +nb-configuration.xml +coverage-report +logs *.log +/.metadata/ -# BlueJ files -*.ctxt - -# Mobile Tools for Java (J2ME) -.mtj.tmp/ - -# Package Files # -*.jar -*.war -*.nar -*.ear -*.zip -*.tar.gz -*.rar - -# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml -hs_err_pid* +/.metadata/ +/.idea/ diff --git a/itools-core/itools-common/pom.xml b/itools-core/itools-common/pom.xml new file mode 100644 index 0000000000000000000000000000000000000000..491744663f30783d0908384e50d2662cb71786da --- /dev/null +++ b/itools-core/itools-common/pom.xml @@ -0,0 +1,79 @@ + + + + itools-core + com.itools.core + 1.0-SNAPSHOT + + 4.0.0 + + itools-common + + + com.itools.core + itools-model + 1.0-SNAPSHOT + + + com.itools.core + itools-utils + 1.0-SNAPSHOT + + + org.mybatis.spring.boot + mybatis-spring-boot-starter + + + org.apache.commons + commons-lang3 + + + org.aspectj + aspectjweaver + + + io.github.openfeign + feign-core + + + org.hibernate.validator + hibernate-validator + + + org.springframework.boot + spring-boot-starter-web + + + org.projectlombok + lombok + + + io.springfox + springfox-swagger2 + + + com.google.guava + guava + + + org.springframework + spring-web + + + org.springframework.boot + spring-boot-starter-data-redis + + + com.alibaba + fastjson + + + com.fasterxml.jackson.core + jackson-databind + 2.8.3 + + + + \ No newline at end of file diff --git a/itools-core/itools-common/src/main/java/com/itools/core/annotation/RateLimit.java b/itools-core/itools-common/src/main/java/com/itools/core/annotation/RateLimit.java new file mode 100644 index 0000000000000000000000000000000000000000..701033ddb77e0af7bb0b58e64d8e9dc3b2cd4d5b --- /dev/null +++ b/itools-core/itools-common/src/main/java/com/itools/core/annotation/RateLimit.java @@ -0,0 +1,34 @@ +package com.itools.core.annotation; + +import java.lang.annotation.*; +import java.util.concurrent.TimeUnit; + +/** + * @Author XUCHANG + * @description: + * @Date 2020/9/10 15:33 + */ +@Inherited +@Documented +@Target({ElementType.TYPE,ElementType.METHOD}) +@Retention(RetentionPolicy.RUNTIME) +public @interface RateLimit { + /** + * 每秒发放许可数 + * @return + */ + double permitsPerSecond() default 100.0; + + /** + * 超时时间,即能否在指定内得到令牌,如果不能则立即返回,不进入目标方法/类 + * 默认为0,即不等待,获取不到令牌立即返回 + * @return + */ + long timeout() default 0; + + /** + * 超时时间单位,默认取毫秒 + * @return + */ + TimeUnit timeUnit() default TimeUnit.MILLISECONDS; +} diff --git a/itools-core/itools-common/src/main/java/com/itools/core/annotation/RateLimitAspect.java b/itools-core/itools-common/src/main/java/com/itools/core/annotation/RateLimitAspect.java new file mode 100644 index 0000000000000000000000000000000000000000..ed06f7ea37bd2f348a214b0e9244c288fad81422 --- /dev/null +++ b/itools-core/itools-common/src/main/java/com/itools/core/annotation/RateLimitAspect.java @@ -0,0 +1,97 @@ +package com.itools.core.annotation; + +import com.google.common.collect.Maps; +import com.google.common.util.concurrent.RateLimiter; +import com.itools.core.em.SystemCodeBean; +import com.itools.core.exception.AppException; +import org.aspectj.lang.ProceedingJoinPoint; +import org.aspectj.lang.annotation.Around; +import org.aspectj.lang.annotation.Aspect; +import org.aspectj.lang.annotation.Pointcut; +import org.aspectj.lang.reflect.MethodSignature; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.core.env.Environment; +import org.springframework.stereotype.Component; +import org.springframework.web.context.request.RequestContextHolder; +import org.springframework.web.context.request.ServletRequestAttributes; + +import javax.servlet.http.HttpServletRequest; +import java.util.Map; +import java.util.concurrent.TimeUnit; + +/** + * 使用Guava的RateLimiter实现限流,设置每秒最大的请求数,仅适用于单体 + * 不保证公平访问 + * 允许先消费,后付款,就是它可以来一个请求的时候一次性取走几个或者是剩下所有的令牌甚至多取 + * 但是后面的请求就得为上一次请求买单,它需要等待桶中的令牌补齐之后才能继续获取令牌 + * 所以实际上每秒能够通过的数量会比设置的permitsPerSecond大 + * 在设置permitsPerSecond的时候应比实际估计的流量要小 + * 限制能处理的总数 + * @author xuchang + */ +@Aspect +@Component +public class RateLimitAspect { + /** + * com.google.common.collect.Maps 别导错包了 + * 存放RateLimiter,一个url对应一个令牌桶 + */ + private Map limitMap = Maps.newConcurrentMap(); + @Autowired + private Environment environment; + + private static final Logger logger = LoggerFactory.getLogger(RateLimitAspect.class); + + @Pointcut("@annotation(com.itools.core.annotation.RateLimit)") + private void pointcut() { + } + + @Around(value = "pointcut()") + public Object around(ProceedingJoinPoint joinPoint) { + Object obj = null; + // 获取注解 + RateLimit rateLimit = ((MethodSignature) joinPoint.getSignature()).getMethod().getAnnotation(RateLimit.class); + // 获取request,然后获取请求的url,存入map中 + HttpServletRequest request = ((ServletRequestAttributes) RequestContextHolder.getRequestAttributes()).getRequest(); + String url = request.getRequestURI(); + // 若获取注解不为空 + if (rateLimit != null) { + // 获取注解的permitsPerSecond与timeout + double permitsPerSecond = rateLimit.permitsPerSecond(); + if (environment.containsProperty("permitsPerSecond")){ + permitsPerSecond = environment.getProperty("permitsPerSecond",Double.class); + } + long timeout = rateLimit.timeout(); + TimeUnit timeUnit = rateLimit.timeUnit(); + RateLimiter rateLimiter = null; + // 判断map集合中是否有创建有创建好的令牌桶 + // 若是第一次请求该url,则创建新的令牌桶 + if (!limitMap.containsKey(url)) { + // 创建令牌桶 + rateLimiter = RateLimiter.create(permitsPerSecond); + limitMap.put(url, rateLimiter); + logger.info("请求URL为{},创建令牌桶,容量为:{}",url,permitsPerSecond); + }else { + // 否则从已经保存的map中取 + rateLimiter = limitMap.get(url); + } + // 若得到令牌 + if (rateLimiter.tryAcquire(timeout, timeUnit)) { + // 开始执行目标controller + try { + obj = joinPoint.proceed(); + } catch (Throwable throwable) { + throwable.printStackTrace(); + } + } else { + // 否则直接返回错误信息 + logger.error("请求URL为{},请求频繁,请稍后重试!",url); + throw new AppException(SystemCodeBean.SystemCode.RETE_EXCEPTION.getCode()); + } + } + return obj; + } + +} diff --git a/itools-core/itools-common/src/main/java/com/itools/core/base/CommonPageInfo.java b/itools-core/itools-common/src/main/java/com/itools/core/base/CommonPageInfo.java new file mode 100644 index 0000000000000000000000000000000000000000..2c32dc79b3d9bb431d61562320be0fe5cc27490f --- /dev/null +++ b/itools-core/itools-common/src/main/java/com/itools/core/base/CommonPageInfo.java @@ -0,0 +1,51 @@ +package com.itools.core.base; + +/** + * @description: 分页参数 + * @author: XUCHANG + * @time: 2019/12/4 10:51 + */ +public class CommonPageInfo { + + public CommonPageInfo(int currentPage, int pageSize) { + if (currentPage < 1 || pageSize < 1) { + throw new IllegalArgumentException("currentPage and pageSize must more than 0."); + } + + this.pageNum = currentPage; + this.pageSize = pageSize; + } + + /** + * 当前页号 + */ + private int pageNum; + /** + * 页面大小 + */ + private int pageSize; + + public int getPageNum() { + return pageNum; + } + + public void setPageNum(int pageNum) { + this.pageNum = pageNum; + } + + public int getPageSize() { + return pageSize; + } + + public void setPageSize(int pageSize) { + this.pageSize = pageSize; + } + + /** + * 计算查询的开始行数 + * @return + */ + public int getStartRow(){ + return (pageNum - 1) * pageSize; + } +} diff --git a/itools-core/itools-common/src/main/java/com/itools/core/base/CommonPageResult.java b/itools-core/itools-common/src/main/java/com/itools/core/base/CommonPageResult.java new file mode 100644 index 0000000000000000000000000000000000000000..2196ae7fd8268b1671962df2399b2755ec05d26e --- /dev/null +++ b/itools-core/itools-common/src/main/java/com/itools/core/base/CommonPageResult.java @@ -0,0 +1,130 @@ +package com.itools.core.base; + +import java.util.List; +import java.util.stream.Collectors; + +/** + * @description: + * @author: XUCHANG + * @time: 2019/12/4 10:51 + */ +public class CommonPageResult implements java.io.Serializable { + private static final long serialVersionUID = -3628865867907230918L; + + /** + * 总记录数 + */ + private long total; + + /** + * 总页数 + */ + private long pageCount; + /** + * 当前页号 + */ + private long pageNum; + /** + * 页面大小 + */ + private long pageSize; + + /** + * 数据列表 + */ + private List datas; + + private CommonPageResult(){} + + public CommonPageResult(List list, CommonPageInfo pageQueryRequest, long total){ + CommonPageResult result = build(list, pageQueryRequest, total); + this.total = result.getTotal(); + this.pageCount = result.getPageCount(); + this.pageNum = result.getPageNum(); + this.pageSize = result.getPageSize(); + this.datas = list; + } + + /** + * 构建分页返回的结果集 + * @param list 分页的数据 + * @param pageQueryRequest 分页参数 + * @param total 总数 + * @param + * @return + */ + public static CommonPageResult build(List list, CommonPageInfo pageQueryRequest, long total) { + + int pageSize = pageQueryRequest.getPageSize(); + int pageNum = pageQueryRequest.getPageNum(); + if (total < 0 || pageSize <= 0 || pageNum < 0) { + throw new IllegalArgumentException("total must more than 0"); + } + + CommonPageResult result = new CommonPageResult<>(); + //判断结果集是否分页的数据,是的话,重新构建分页 + if(list.size() == total || list.size() > pageSize){ + List temp = list.stream().skip((pageNum-1) * pageSize).limit(pageSize).collect(Collectors.toList()); + result.setDatas(temp); + }else { + result.setDatas(list); + } + result.setTotal(total); + + result.setPageSize(pageSize); + result.setPageNum(pageNum); + //判断分页的页数 + if (total == 0) { + result.setPageCount(0); + } else { + if (total % pageSize > 0) { + result.setPageCount(total / pageSize + 1); + } else { + result.setPageCount(total / pageSize); + } + } + + return result; + } + + + public long getTotal() { + return total; + } + + public void setTotal(long total) { + this.total = total; + } + + public List getDatas() { + return datas; + } + + public void setDatas(List datas) { + this.datas = datas; + } + + public long getPageCount() { + return pageCount; + } + + public void setPageCount(long pageCount) { + this.pageCount = pageCount; + } + + public long getPageNum() { + return pageNum; + } + + public void setPageNum(long pageNum) { + this.pageNum = pageNum; + } + + public long getPageSize() { + return pageSize; + } + + public void setPageSize(long pageSize) { + this.pageSize = pageSize; + } +} diff --git a/itools-core/itools-common/src/main/java/com/itools/core/base/CommonResult.java b/itools-core/itools-common/src/main/java/com/itools/core/base/CommonResult.java new file mode 100644 index 0000000000000000000000000000000000000000..40044972d1a9bd7980d54e1467d20ab9c9c787ee --- /dev/null +++ b/itools-core/itools-common/src/main/java/com/itools/core/base/CommonResult.java @@ -0,0 +1,131 @@ +package com.itools.core.base; + +import com.alibaba.fastjson.JSON; + +import java.io.Serializable; +import java.util.UUID; + +/** + * @description: 返回的结果集 + * @author: XUCHANG + * @time: 2019/12/4 10:51 + */ +public class CommonResult implements Serializable { + + private static final long serialVersionUID = 9191892693219217387L; + + private static final String RESP_CODE_SUCCESS = "0000"; + private static final String RESP_MSG_SUCCESS = "Success"; + + /** + * 0000表示成功,其他表示失败 + */ + private String returnCode = RESP_CODE_SUCCESS; + + /** + * 如果result非0000,则 errorMsg 为错误信息, result为0000,errorMsg为空 + */ + private String returnMsg = RESP_MSG_SUCCESS; + + private String nonceStr = UUID.randomUUID().toString().replaceAll("-", ""); + + private boolean success; + + private T data; + + @Override + public String toString() { + return JSON.toJSONString(this); + } + + public String getReturnCode() { + return returnCode; + } + + + public void setReturnCode(String returnCode) { + this.returnCode = returnCode; + } + + + public String getReturnMsg() { + return returnMsg; + } + + + public void setReturnMsg(String returnMsg) { + this.returnMsg = returnMsg; + } + + + public String getNonceStr() { + return nonceStr; + } + + + public void setNonceStr(String nonceStr) { + this.nonceStr = nonceStr; + } + + public boolean isSuccess() + { + return success; + } + + public void setSuccess(boolean success){ + this.success = success; + } + + public T getData() { + return data; + } + + public void setData(T data) { + this.data = data; + } + + private CommonResult(){} + + /** + * 构造返回成功对象结果 + * @param data 结果参数 + * @return result + */ + public static CommonResult success(T data) { + CommonResult result = new CommonResult<>(); + result.setSuccess(true); + result.setData(data); + return result; + } + + /** + * 构造失败对象 + * @param code 编码 + * @param message 消息 + * @return result + */ + public static CommonResult fail(String code, String message, T data) { + CommonResult result = new CommonResult<>(); + result.setReturnCode(code); + result.setData(data); + result.setReturnMsg(message); + result.setSuccess(false); + return result; + } + + /** + * 构造失败对象 + * @param code 编码 + * @param message 消息 + * @return result + */ + public static CommonResult fail(String code, String message) { + + CommonResult result = new CommonResult<>(); + result.setReturnCode(code); + result.setReturnMsg(message); + result.setSuccess(false); + result.setData(null); + return result; + } +} diff --git a/itools-core/itools-common/src/main/java/com/itools/core/base/package-info.java b/itools-core/itools-common/src/main/java/com/itools/core/base/package-info.java new file mode 100644 index 0000000000000000000000000000000000000000..7ef7f3209a4692cb474cfcfa8d03fca0fb1f40f5 --- /dev/null +++ b/itools-core/itools-common/src/main/java/com/itools/core/base/package-info.java @@ -0,0 +1,4 @@ +/** + * 集成请求返回的结果集 + */ +package com.itools.core.base; \ No newline at end of file diff --git a/itools-core/itools-common/src/main/java/com/itools/core/bean/BeanCopyUtils.java b/itools-core/itools-common/src/main/java/com/itools/core/bean/BeanCopyUtils.java new file mode 100644 index 0000000000000000000000000000000000000000..bf69bfef9450e9d1974b49d164298a0f6dd3b010 --- /dev/null +++ b/itools-core/itools-common/src/main/java/com/itools/core/bean/BeanCopyUtils.java @@ -0,0 +1,109 @@ +package com.itools.core.bean; + +import com.itools.core.context.CommonCallContext; +import org.springframework.beans.BeanUtils; +import org.springframework.util.CollectionUtils; + +import java.util.ArrayList; +import java.util.Collection; +import java.util.List; + +/** + * @description: + * @author: XUCHANG + * @time: 2019/12/4 10:51 + */ + +public class BeanCopyUtils { + + /** + * 将对象属性拷贝到目标类型的同名属性字段中 + * @param + * @param source + * @param targetClazz + * @return + */ + public static T copyProperties(Object source, Class targetClazz) { + + T target = null; + try { + target = targetClazz.newInstance(); + BeanUtils.copyProperties(source, target); + } catch (Exception e) { + throw new RuntimeException(e); + } + + return target; + } + + /** + * 将对象属性拷贝到目标类型的同名属性字段中 + * @param source + * @param target + * @return + */ + public static T copyProperties(Object source, T target) { + BeanUtils.copyProperties(source, target); + return target; + } + + /** + * 将对象属性拷贝给目标对象 + * @param source + * @param context + * @param target + * @return + */ + public static T copyProperties(Object source, CommonCallContext context, T target) { + + BeanUtils.copyProperties(source, target); + if (CommonBaseTimes.class.isAssignableFrom(target.getClass())) { + BeanCopyUtils.copyProperties((CommonBaseTimes) target, context); + } + + return target; + } + + /** + * 拷贝通用属性 + * @param dto + * @param context + */ + public static void copyProperties(CommonBaseTimes dto, CommonCallContext context) { + if (context == null || dto == null) { + return; + } + + dto.setCreateTime(context.getCallTime().getTime()); + dto.setCreateUserId(context.getUser().getCaller()); + + dto.setLastUpdateTime(context.getCallTime().getTime()); + dto.setLastUpdateUserId(context.getUser().getCaller()); + } + + /** + * 将list的对象拷贝到目标类型对象中 + * @param list + * @param clazz + * @return + */ + public static List copy(Collection list, Class clazz) { + List result = new ArrayList<>(12); + + if (!CollectionUtils.isEmpty(list)) { + for (V source : list) { + E target = null; + try { + target = (E) clazz.newInstance(); + BeanUtils.copyProperties(source, target); + } catch (Exception e) { + throw new RuntimeException(e); + } + + result.add(target); + } + } + + return result; + } +} diff --git a/itools-core/itools-common/src/main/java/com/itools/core/bean/CommonBaseIdentify.java b/itools-core/itools-common/src/main/java/com/itools/core/bean/CommonBaseIdentify.java new file mode 100644 index 0000000000000000000000000000000000000000..dde2b652febc9cd0496fd9f143e4251f2907e528 --- /dev/null +++ b/itools-core/itools-common/src/main/java/com/itools/core/bean/CommonBaseIdentify.java @@ -0,0 +1,52 @@ +package com.itools.core.bean; + +import java.io.Serializable; + +/** + * 公用id + * @author xuchang + */ +public class CommonBaseIdentify implements Serializable { + + private static final long serialVersionUID = -2923446725609856732L; + + /** + * 主键编号 + */ + private String id; + + /** + * 创建用户ID + */ + private String createUserId; + + /** + * 最后更新用户ID + */ + private String lastUpdateUserId; + + public String getId() { + return id; + } + + public String getCreateUserId() { + return createUserId; + } + + public String getLastUpdateUserId() { + return lastUpdateUserId; + } + + public void setId(String id) { + this.id = id; + } + + public void setCreateUserId(String createUserId) { + this.createUserId = createUserId; + } + + public void setLastUpdateUserId(String lastUpdateUserId) { + this.lastUpdateUserId = lastUpdateUserId; + } +} + diff --git a/itools-core/itools-common/src/main/java/com/itools/core/bean/CommonBaseTimes.java b/itools-core/itools-common/src/main/java/com/itools/core/bean/CommonBaseTimes.java new file mode 100644 index 0000000000000000000000000000000000000000..ffbd7dc9b1d6ce5754f793994dd1d994f31de7dd --- /dev/null +++ b/itools-core/itools-common/src/main/java/com/itools/core/bean/CommonBaseTimes.java @@ -0,0 +1,34 @@ +package com.itools.core.bean; + +/** + * 时间 + */ +public class CommonBaseTimes extends CommonBaseIdentify { + private static final long serialVersionUID = -1915432938815132522L; + + /** + * 创建时间 + */ + private Long createTime; + + /** + * 最后更新用户时间 + */ + private Long lastUpdateTime; + + public Long getCreateTime() { + return createTime; + } + + public Long getLastUpdateTime() { + return lastUpdateTime; + } + + public void setCreateTime(Long createTime) { + this.createTime = createTime; + } + + public void setLastUpdateTime(Long lastUpdateTime) { + this.lastUpdateTime = lastUpdateTime; + } +} diff --git a/itools-core/itools-common/src/main/java/com/itools/core/bean/package-info.java b/itools-core/itools-common/src/main/java/com/itools/core/bean/package-info.java new file mode 100644 index 0000000000000000000000000000000000000000..a3910232337ce144dd6c993eeec1e9286ff3fe8a --- /dev/null +++ b/itools-core/itools-common/src/main/java/com/itools/core/bean/package-info.java @@ -0,0 +1,4 @@ +/** + * bean属性拷贝 + */ +package com.itools.core.bean; \ No newline at end of file diff --git a/itools-core/itools-common/src/main/java/com/itools/core/code/SystemCode.java b/itools-core/itools-common/src/main/java/com/itools/core/code/SystemCode.java new file mode 100644 index 0000000000000000000000000000000000000000..f6f658257ef463a72fcf3d4558dd1c60eefbfb61 --- /dev/null +++ b/itools-core/itools-common/src/main/java/com/itools/core/code/SystemCode.java @@ -0,0 +1,23 @@ +package com.itools.core.code; + +import org.springframework.stereotype.Component; + +import java.lang.annotation.ElementType; +import java.lang.annotation.Retention; +import java.lang.annotation.RetentionPolicy; +import java.lang.annotation.Target; + +/** + * 该注解用于将系统返回码加载到redis中 + * @author xuchang + */ +@Target(ElementType.TYPE) +@Retention(RetentionPolicy.RUNTIME) +@Component +public @interface SystemCode { + /** + * 这个参数填写的是枚举的全限定名 + * @return + */ + /*public String qualifiedName();*/ +} diff --git a/itools-core/itools-common/src/main/java/com/itools/core/code/SystemCodeController.java b/itools-core/itools-common/src/main/java/com/itools/core/code/SystemCodeController.java new file mode 100644 index 0000000000000000000000000000000000000000..de8784d87a1015c3cf984692ee2ebcc8cb144b2f --- /dev/null +++ b/itools-core/itools-common/src/main/java/com/itools/core/code/SystemCodeController.java @@ -0,0 +1,36 @@ +package com.itools.core.code; + +import com.itools.core.base.CommonResult; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.PathVariable; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RequestMethod; +import org.springframework.web.bind.annotation.RestController; + +import java.util.HashMap; +import java.util.Map; + + +@RestController +@RequestMapping("system") +public class SystemCodeController { + + private final SystemCodeService systemCodeService; + + public SystemCodeController(@Autowired SystemCodeService systemCodeService) { + this.systemCodeService = systemCodeService; + } + + @RequestMapping(value = "translate/{code}", method = RequestMethod.GET) + public CommonResult> translate(@PathVariable(value = "code") String code){ + Map result = new HashMap<>(2); + result.put("code", code); + result.put("msg", systemCodeService.getMessageOptional(code).orElse("")); + return CommonResult.success(result); + } + + @RequestMapping(value = "translate/codes", method = RequestMethod.GET) + public CommonResult> codes(){ + return CommonResult.success(systemCodeService.getSystemCodeMap()); + } +} diff --git a/itools-core/itools-common/src/main/java/com/itools/core/code/SystemCodeService.java b/itools-core/itools-common/src/main/java/com/itools/core/code/SystemCodeService.java new file mode 100644 index 0000000000000000000000000000000000000000..6b66e41b4563bd279c6f14d347c05779c82dd9ad --- /dev/null +++ b/itools-core/itools-common/src/main/java/com/itools/core/code/SystemCodeService.java @@ -0,0 +1,82 @@ +package com.itools.core.code; + +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.springframework.beans.BeansException; +import org.springframework.beans.factory.config.BeanPostProcessor; +import org.springframework.stereotype.Component; +import org.springframework.util.StringUtils; + +import java.lang.annotation.Annotation; +import java.lang.reflect.Method; +import java.util.Collections; +import java.util.HashMap; +import java.util.Map; +import java.util.Optional; + +@Component +public class SystemCodeService implements BeanPostProcessor { + + private static final Logger log = LoggerFactory.getLogger(SystemCodeService.class); + + private static final Map SYSTEM_CODE_MAP = new HashMap<>(); + +// @Deprecated + public String getMessage(String code) { + return SYSTEM_CODE_MAP.get(code); + } + + public Optional getMessageOptional(String code) { + return Optional.ofNullable(getMessage(code)); + } + + public String getMessage(String code, Map params){ + String message = getMessage(code); + if(params != null){ + StringBuilder key; + for(String param : params.keySet()){ + key = new StringBuilder("{" + param + "}"); + message = StringUtils.replace(message, key.toString(), (String) params.get(param)); + } + } + return message; + } + + public Map getSystemCodeMap(){ + return Collections.unmodifiableMap(SYSTEM_CODE_MAP); + } + + @Override + public Object postProcessBeforeInitialization(Object bean, String beanName) throws BeansException { + try { + Class clazz = bean.getClass(); + Annotation systemCode = clazz.getAnnotation(SystemCode.class); + if (systemCode != null) { + Class[] classes = clazz.getClasses(); + if(null != classes) { + for (Class clazz0 : classes) { + Method getCode = clazz0.getMethod("getCode"); + Method getMessage = clazz0.getMethod("getMessage"); + Object[] objects = clazz0.getEnumConstants(); + if (getCode != null && getMessage != null && objects != null) { + for (Object object : objects) { + String code = (String) getCode.invoke(object); + String message = (String) getMessage.invoke(object); + log.info("将" + clazz0.getCanonicalName() + "的枚举放入内存,code:" + code + ",message:" + message); + SYSTEM_CODE_MAP.put(code, message); + } + } + } + } + } + }catch (Exception e){ + log.error("将Exception编码缓存至内存处理异常", e); + } + return bean; + } + + @Override + public Object postProcessAfterInitialization(Object bean, String beanName) throws BeansException { + return bean; + } +} diff --git a/itools-core/itools-common/src/main/java/com/itools/core/config/Swagger2Config.java b/itools-core/itools-common/src/main/java/com/itools/core/config/Swagger2Config.java new file mode 100644 index 0000000000000000000000000000000000000000..a74eefb01d11aff07c537dd1cfee157d5a90739c --- /dev/null +++ b/itools-core/itools-common/src/main/java/com/itools/core/config/Swagger2Config.java @@ -0,0 +1,33 @@ +package com.itools.core.config; + +import org.springframework.context.annotation.Bean; +import org.springframework.context.annotation.Configuration; +import springfox.documentation.builders.ApiInfoBuilder; +import springfox.documentation.builders.PathSelectors; +import springfox.documentation.builders.RequestHandlerSelectors; +import springfox.documentation.service.ApiInfo; +import springfox.documentation.spi.DocumentationType; +import springfox.documentation.spring.web.plugins.Docket; +import springfox.documentation.swagger2.annotations.EnableSwagger2; + + +@EnableSwagger2 +@Configuration +public class Swagger2Config { + @Bean + public Docket api() { + return new Docket(DocumentationType.SWAGGER_2) + .apiInfo(apiInfo()) + .select() + .apis(RequestHandlerSelectors.basePackage("com.xuchang.itools")) + .paths(PathSelectors.any()) + .build(); + } + + private ApiInfo apiInfo() { + return new ApiInfoBuilder() + .title("iTools") + .version("1.0") + .build(); + } +} \ No newline at end of file diff --git a/itools-core/itools-common/src/main/java/com/itools/core/context/CommonCallContext.java b/itools-core/itools-common/src/main/java/com/itools/core/context/CommonCallContext.java new file mode 100644 index 0000000000000000000000000000000000000000..7fe063a254c4cd2a0decb234eb28a62af3148436 --- /dev/null +++ b/itools-core/itools-common/src/main/java/com/itools/core/context/CommonCallContext.java @@ -0,0 +1,86 @@ +package com.itools.core.context; + +import java.util.Date; + + +public final class CommonCallContext implements java.io.Serializable { + private static final long serialVersionUID = -6192221637110412715L; + + /** + * 应用编码 + */ + private String applicationId; + + /** + * 设备编号 + */ + private String deviceId; + + /** + * logId + */ + private String logId; + + /** + * 调用时间 + */ + private Date callTime; + + /** + * 用户信息 + */ + private UserContext user; + + /** + * 企业信息 + */ + private CompanyContext company; + + public String getApplicationId() { + return applicationId; + } + + public void setApplicationId(String applicationId) { + this.applicationId = applicationId; + } + + public String getDeviceId() { + return deviceId; + } + + public void setDeviceId(String deviceId) { + this.deviceId = deviceId; + } + + public String getLogId() { + return logId; + } + + public void setLogId(String logId) { + this.logId = logId; + } + + public Date getCallTime() { + return callTime; + } + + public void setCallTime(Date callTime) { + this.callTime = callTime; + } + + public UserContext getUser() { + return user; + } + + public void setUser(UserContext user) { + this.user = user; + } + + public CompanyContext getCompany() { + return company; + } + + public void setCompany(CompanyContext company) { + this.company = company; + } +} diff --git a/itools-core/itools-common/src/main/java/com/itools/core/context/CommonCallContextBuilder.java b/itools-core/itools-common/src/main/java/com/itools/core/context/CommonCallContextBuilder.java new file mode 100644 index 0000000000000000000000000000000000000000..2531c9e529cebceaba8b0866cd14b1bf1ef67918 --- /dev/null +++ b/itools-core/itools-common/src/main/java/com/itools/core/context/CommonCallContextBuilder.java @@ -0,0 +1,36 @@ +package com.itools.core.context; + + +import com.itools.core.session.BusinessSessionObject; +import com.itools.core.session.BusinessSessionContextHolder; + + +public final class CommonCallContextBuilder { + /** + * 构造请求上下文 + * + * @param sessionContextHolder session会话信息 + * @return 会话信息 + */ + public static CommonCallContext buildContext(BusinessSessionContextHolder sessionContextHolder) { + + BusinessSessionObject session = sessionContextHolder.getSession(); + CommonCallContext context = new CommonCallContext(); + + context.setUser(session.getUser()); + context.setCompany(session.getCompany()); + + context.setCallTime(session.getCallTime()); + context.setApplicationId(session.getApplicationId()); + + return context; + } + + /** + * 清除 session会话信息 + * @param sessionContextHolder session会话信息 + */ + public static void cleanContext(BusinessSessionContextHolder sessionContextHolder) { + sessionContextHolder.clearSession(); + } +} diff --git a/itools-core/itools-common/src/main/java/com/itools/core/context/CompanyContext.java b/itools-core/itools-common/src/main/java/com/itools/core/context/CompanyContext.java new file mode 100644 index 0000000000000000000000000000000000000000..559b88512de2dc3ce045bf5524226636951859ba --- /dev/null +++ b/itools-core/itools-common/src/main/java/com/itools/core/context/CompanyContext.java @@ -0,0 +1,58 @@ +package com.itools.core.context; + +import java.io.Serializable; + + +public class CompanyContext implements Serializable { + + /** + * serialVersionUID + */ + private static final long serialVersionUID = 7852895769123192530L; + + /** + * 企业编号 + */ + private String companyId; + + /** + * 企业名称 + */ + private String companyName; + + /** + * 获取 企业编号 + * + * @return 企业编号 + */ + public String getCompanyId() { + return companyId; + } + + /** + * 设置 企业编号 + * + * @param companyId 企业编号 + */ + public void setCompanyId(String companyId) { + this.companyId = companyId; + } + + /** + * 企业名称 + * + * @return 企业名称 + */ + public String getCompanyName() { + return companyName; + } + + /** + * 企业名称 + * + * @param companyName 企业名称 + */ + public void setCompanyName(String companyName) { + this.companyName = companyName; + } +} diff --git a/itools-core/itools-common/src/main/java/com/itools/core/context/UserContext.java b/itools-core/itools-common/src/main/java/com/itools/core/context/UserContext.java new file mode 100644 index 0000000000000000000000000000000000000000..6119f9e4fb756ed3772784a061dc314b5da98143 --- /dev/null +++ b/itools-core/itools-common/src/main/java/com/itools/core/context/UserContext.java @@ -0,0 +1,54 @@ +package com.itools.core.context; + + +import javax.validation.constraints.NotNull; +import java.io.Serializable; +import java.util.Set; + +public class UserContext implements Serializable { + + /** + * serialVersionUID + */ + private static final long serialVersionUID = 1937298343860044405L; + + /** + * 调用者信息 + */ + @NotNull(message = "10000013") + private String caller; + + /** + * 姓名 + */ + private String callerName; + + /** + * 用户角色 + */ + private Set roles; + + public String getCaller() { + return caller; + } + + public void setCaller(String caller) { + this.caller = caller; + } + + public String getCallerName() { + return callerName; + } + + public void setCallerName(String callerName) { + this.callerName = callerName; + } + + public Set getRoles() { + return roles; + } + + public void setRoles(Set roles) { + this.roles = roles; + } +} diff --git a/itools-core/itools-common/src/main/java/com/itools/core/em/SystemCodeBean.java b/itools-core/itools-common/src/main/java/com/itools/core/em/SystemCodeBean.java new file mode 100644 index 0000000000000000000000000000000000000000..1340c65cfabc6583d0e326f5c0f4a53e3603eda7 --- /dev/null +++ b/itools-core/itools-common/src/main/java/com/itools/core/em/SystemCodeBean.java @@ -0,0 +1,37 @@ +package com.itools.core.em; + + +import com.itools.core.code.SystemCode; + +@SystemCode +public class SystemCodeBean { + + public enum SystemCode { + /** + * 需要在配置文件指定 + * system: + * errorCode: Code001 + */ + SYSTEM_EXCEPTION("Code001" , "系统内部错误"), + RETE_EXCEPTION("Code002" , "接口请求频繁,请稍后重试!"), + + + ; + private final String code; + private final String message; + + SystemCode(String code, String message) { + this.code = code; + this.message = message; + } + + public String getCode() { + return code; + } + + public String getMessage() { + return message; + } + + } +} diff --git a/itools-core/itools-common/src/main/java/com/itools/core/exception/AppException.java b/itools-core/itools-common/src/main/java/com/itools/core/exception/AppException.java new file mode 100644 index 0000000000000000000000000000000000000000..a8e9074b96dd60096db0d784568211adda6a07c2 --- /dev/null +++ b/itools-core/itools-common/src/main/java/com/itools/core/exception/AppException.java @@ -0,0 +1,86 @@ +package com.itools.core.exception; + + +import java.util.HashMap; +import java.util.Map; + +public class AppException extends RuntimeException { + private static final long serialVersionUID = -8610734771461037783L; + + private final String errorCode; + + private String errorMsg; + + private ExceptionParamBuilder builder; + + public AppException(ISystemCode sysCode) + { + super(sysCode.getCode());//这里不可以修改,因为依赖FeignException来传输错误码 + this.errorCode=sysCode.getCode(); + this.errorMsg = sysCode.getMessage(); + if(errorMsg.length()>256) { + errorMsg=errorMsg.substring(0, 255); + } + } + + public AppException(String errorCode) { + super(errorCode); + this.errorCode = errorCode; + } + + public AppException(Throwable cause) { + super(cause); + this.errorCode = ""; + } + + public AppException(String errorCode, String errorMsg) { + super(errorCode); + this.errorCode = errorCode; + if(errorMsg.length()>256) { + errorMsg=errorMsg.substring(0, 255); + } + this.errorMsg = errorMsg; + } + + public AppException(String errorCode, ExceptionParamBuilder builder) { + super(errorCode); + this.errorCode = errorCode; + if(builder == null){ + throw new IllegalArgumentException("builder must not be null"); + } + this.builder = builder; + } + + public AppException(String errorCode, Throwable cause) { + super(errorCode, cause); + this.errorCode = errorCode; + } + + public AppException(String errorCode, String errorMsg, Throwable cause) { + super(errorCode, cause); + this.errorCode = errorCode; + if(errorMsg.length()>256) { + errorMsg=errorMsg.substring(0, 255); + } + this.errorMsg = errorMsg; + } + + public Map getAll(){ + if(builder == null) { + return new HashMap<>(); + } + return builder.getAll(); + } + + public String getErrorCode() { + return errorCode; + } + + public String getErrorMsg() { + return errorMsg; + } + + public void setErrorMsg(String errorMsg) { + this.errorMsg = errorMsg; + } +} diff --git a/itools-core/itools-common/src/main/java/com/itools/core/exception/DataAccessException.java b/itools-core/itools-common/src/main/java/com/itools/core/exception/DataAccessException.java new file mode 100644 index 0000000000000000000000000000000000000000..ee74f3dfa1951db69148b4ae5fcd759cfb6f2822 --- /dev/null +++ b/itools-core/itools-common/src/main/java/com/itools/core/exception/DataAccessException.java @@ -0,0 +1,32 @@ +package com.itools.core.exception; + + +public class DataAccessException extends Exception { + private static final long serialVersionUID = -1219262335729891920L; + + /** + * 构造方法 + * @param message + */ + public DataAccessException(final String message) { + super(message); + } + + /** + * 构造方法 + * @param cause + */ + public DataAccessException(final Throwable cause) { + super(cause); + } + + /** + * 构造方法 + * @param message + * @param cause + */ + public DataAccessException(final String message, final Throwable cause) { + super(message, cause); + } +} + diff --git a/itools-core/itools-common/src/main/java/com/itools/core/exception/ExceptionParamBuilder.java b/itools-core/itools-common/src/main/java/com/itools/core/exception/ExceptionParamBuilder.java new file mode 100644 index 0000000000000000000000000000000000000000..7f9e6305e73680f3a6b85e0dbe1df7d73731d2f6 --- /dev/null +++ b/itools-core/itools-common/src/main/java/com/itools/core/exception/ExceptionParamBuilder.java @@ -0,0 +1,88 @@ +package com.itools.core.exception; + +import java.util.LinkedHashMap; +import java.util.LinkedList; +import java.util.Map; + + +public final class ExceptionParamBuilder { + + private static ExceptionParamBuilder builder; + private ThreadLocal> keys = new ThreadLocal<>(); + private ThreadLocal> values = new ThreadLocal<>(); + + private ExceptionParamBuilder() { + } + + public static ExceptionParamBuilder getInstance() { + if (builder == null) { + builder = new ExceptionParamBuilder(); + } + + return builder; + } + + + public ExceptionParamBuilder put(String key, Object value) { + if (this.keys.get() == null) { + this.keys.set(new LinkedList<>()); + } + + if (this.values.get() == null) { + this.values.set(new LinkedList<>()); + } + + if ((this.keys.get()).contains(key)) { + throw new IllegalArgumentException("param redefine:" + key); + } + + (this.keys.get()).add(key); + (this.values.get()).add(value); + + return this; + } + + private String[] getKeys() { + LinkedList keys = this.keys.get(); + String[] result; + if (keys != null && keys.size() > 0) { + result = keys.toArray(new String[0]); + } else { + result = new String[0]; + } + + this.keys.remove(); + return result; + } + + private Object[] getValues() { + LinkedList values = this.values.get(); + Object[] result; + if (values != null && values.size() > 0) { + result = values.toArray(); + } else { + result = new Object[0]; + } + + this.values.remove(); + return result; + } + + public Map getAll() { + Map all = new LinkedHashMap<>(); + String[] keys = this.getKeys(); + Object[] values = this.getValues(); + + for (int i = 0; i < keys.length; ++i) { + all.put(keys[i], values[i]); + } + + return all; + } + + public ExceptionParamBuilder empty() { + this.keys.set(new LinkedList<>()); + this.values.set(new LinkedList<>()); + return this; + } +} diff --git a/itools-core/itools-common/src/main/java/com/itools/core/exception/FeignExceptionDTO.java b/itools-core/itools-common/src/main/java/com/itools/core/exception/FeignExceptionDTO.java new file mode 100644 index 0000000000000000000000000000000000000000..470c0a13d544de6364c6552232680c1d8edc9940 --- /dev/null +++ b/itools-core/itools-common/src/main/java/com/itools/core/exception/FeignExceptionDTO.java @@ -0,0 +1,29 @@ +package com.itools.core.exception; + +/** + * 描述 : + * + * @author lidab + * @date 2018/3/27. + */ +public class FeignExceptionDTO { + + private String code; + private String cause; + + public String getCode() { + return code; + } + + public void setCode(String code) { + this.code = code; + } + + public String getCause() { + return cause; + } + + public void setCause(String cause) { + this.cause = cause; + } +} diff --git a/itools-core/itools-common/src/main/java/com/itools/core/exception/FeignExceptionUtils.java b/itools-core/itools-common/src/main/java/com/itools/core/exception/FeignExceptionUtils.java new file mode 100644 index 0000000000000000000000000000000000000000..68eb9427901579be250b4a44d5a119174b1e3368 --- /dev/null +++ b/itools-core/itools-common/src/main/java/com/itools/core/exception/FeignExceptionUtils.java @@ -0,0 +1,71 @@ +package com.itools.core.exception; + +import com.alibaba.fastjson.JSONObject; +import feign.FeignException; +import org.apache.commons.lang3.StringUtils; + +/** + * 描述 :解析FeignException工具类 + * + * @author lidab + * @date 2018/3/27. + */ +public class FeignExceptionUtils { + + /** + * 解析FeignException异常信息 + * + * @param e + * @return + */ + public static FeignExceptionDTO parseFeignException(Throwable e) { + if (!(e instanceof FeignException)) { + return null; + } + // 如果是 FeignExceptionDTO 异常,则是有上游服务返回的异常,需要解析该异常内容 + String subStr = StringUtils.substringBetween(e.getMessage(), "", ""); + if (StringUtils.isBlank(subStr)) { + return null; + } + + JSONObject jsonObject = JSONObject.parseObject(subStr.replaceAll(""", "\""), JSONObject.class); + if (jsonObject == null) { + return null; + } + + FeignExceptionDTO feignExceptionDTO = new FeignExceptionDTO(); + feignExceptionDTO.setCode(jsonObject.get("code").toString()); + if (jsonObject.get("cause") != null) { + feignExceptionDTO.setCause(jsonObject.get("cause").toString()); + } + return feignExceptionDTO; + } + + + /** + * 解析Exception: + * 如果是AppException,则返回其错误码; + * 如果是FeignException,则试图从其中解析出AppException的错误码,成功则返回该错误码 + * 否则返回入参指定的默认错误码 + * 此处添加@Logable便于记录异常信息 + * @param e + * @return + */ +// @Logable(businessTag="parseException") + public static String parseException(Exception e, String defaultErrorCode) { + if(e instanceof AppException) + { + return ((AppException)e).getErrorCode(); + } + FeignExceptionDTO dto = FeignExceptionUtils.parseFeignException(e); + if (dto == null) { + return defaultErrorCode; + } else { + if(dto.getCode().length()>5) { + return defaultErrorCode; + } else { + return dto.getCode(); + } + } + } +} \ No newline at end of file diff --git a/itools-core/itools-common/src/main/java/com/itools/core/exception/GlobleException.java b/itools-core/itools-common/src/main/java/com/itools/core/exception/GlobleException.java new file mode 100644 index 0000000000000000000000000000000000000000..41ea30503d73e531b93a51341a8c11742a073b52 --- /dev/null +++ b/itools-core/itools-common/src/main/java/com/itools/core/exception/GlobleException.java @@ -0,0 +1,43 @@ +package com.itools.core.exception; + +import com.alibaba.fastjson.JSONObject; +import org.springframework.context.annotation.Configuration; +import org.springframework.ui.Model; +import org.springframework.web.bind.annotation.ControllerAdvice; +import org.springframework.web.bind.annotation.ExceptionHandler; + +import javax.servlet.http.HttpServletResponse; + + +@Configuration +@ControllerAdvice +public class GlobleException { + + /** + * 跳转自定义异常页面 + * + * @param response + * @param e + * @param model + * @return + * @throws Exception + */ + @ExceptionHandler(value = Throwable.class) + public String gbExceptionHandler(HttpServletResponse response, Throwable e, Model model) throws Exception { + // response错误码 + response.setStatus(400); + JSONObject jsonObject = new JSONObject(); + // 错误编码 + jsonObject.put("code", e.getMessage()); + // 错误原因 + Throwable cause = e.getCause(); + if (cause != null) { + // 错误信息 + jsonObject.put("cause", cause.getMessage()); + } + // 异常信息 + model.addAttribute("errorMsg", jsonObject.toJSONString()); + // 自定义错误页面 + return "400"; + } +} diff --git a/itools-core/itools-common/src/main/java/com/itools/core/exception/ISystemCode.java b/itools-core/itools-common/src/main/java/com/itools/core/exception/ISystemCode.java new file mode 100644 index 0000000000000000000000000000000000000000..2c2c4a9150f7323d24f8e24df0e90d7446df9ba8 --- /dev/null +++ b/itools-core/itools-common/src/main/java/com/itools/core/exception/ISystemCode.java @@ -0,0 +1,12 @@ +package com.itools.core.exception; +/** + * 所有AppException使用的各种异常枚举定义均应该实现此接口 + * + */ +public interface ISystemCode { + + String getCode(); + + String getMessage(); + +} diff --git a/itools-core/itools-common/src/main/java/com/itools/core/exception/ParamException.java b/itools-core/itools-common/src/main/java/com/itools/core/exception/ParamException.java new file mode 100644 index 0000000000000000000000000000000000000000..d304b28aa6344a79a27bec33d48dfcac5b9238e7 --- /dev/null +++ b/itools-core/itools-common/src/main/java/com/itools/core/exception/ParamException.java @@ -0,0 +1,29 @@ +package com.itools.core.exception; + + +public class ParamException extends RuntimeException { + private static final long serialVersionUID = -1L; + + private String errorCode; + + private String errorMsg; + + public ParamException(String errorCode, String errorMsg) { + super(errorCode); + this.errorCode = errorCode; + if (errorMsg.length() > 256) { + errorMsg = errorMsg.substring(0, 255); + } + this.errorMsg = errorMsg; + } + + public String getErrorCode() { + return errorCode; + } + + public String getErrorMsg() { + return errorMsg; + } + +} + diff --git a/itools-core/itools-common/src/main/java/com/itools/core/init/InitDbService.java b/itools-core/itools-common/src/main/java/com/itools/core/init/InitDbService.java new file mode 100644 index 0000000000000000000000000000000000000000..d9850b09b26012e0094096e48cc5cf1eba976dac --- /dev/null +++ b/itools-core/itools-common/src/main/java/com/itools/core/init/InitDbService.java @@ -0,0 +1,20 @@ +package com.itools.core.init; + + +import com.itools.core.rbac.param.initDB.InitDBInsertParam; +import com.itools.core.rbac.param.initDB.InitDBQueryParam; +import com.itools.core.rbac.param.initDB.InitDBResult; + +import java.util.List; + +/** + * @Author XUCHANG + * @description: + * @Date 2020/9/11 9:56 + */ +public interface InitDbService { + + List query(InitDBQueryParam dbQuery); + + Integer multipartInsert(List dbInsertParams); +} diff --git a/itools-core/itools-common/src/main/java/com/itools/core/init/InitDbServiceAware.java b/itools-core/itools-common/src/main/java/com/itools/core/init/InitDbServiceAware.java new file mode 100644 index 0000000000000000000000000000000000000000..5ffc23b7954b0af87191d93f188bc7cf9fcb3f6e --- /dev/null +++ b/itools-core/itools-common/src/main/java/com/itools/core/init/InitDbServiceAware.java @@ -0,0 +1,30 @@ +package com.itools.core.init; + +import com.itools.core.rbac.param.initDB.InitDBInsertParam; +import com.itools.core.rbac.param.initDB.InitDBQueryParam; +import com.itools.core.rbac.param.initDB.InitDBResult; +import com.itools.core.system.AbstractService; +import org.springframework.stereotype.Service; + +import java.util.ArrayList; +import java.util.List; + +/** + * @project: iTools + * @description: + * @author: XUCHANG + * @create: 2020-09-28 22:52 + */ +@Service +public class InitDbServiceAware extends AbstractService implements InitDbService { + + @Override + public List query(InitDBQueryParam dbQuery) { + return new ArrayList<>(); + } + + @Override + public Integer multipartInsert(List dbInsertParams) { + return null; + } +} diff --git a/itools-core/itools-common/src/main/java/com/itools/core/init/MyDdlApplicationRunner.java b/itools-core/itools-common/src/main/java/com/itools/core/init/MyDdlApplicationRunner.java new file mode 100644 index 0000000000000000000000000000000000000000..8676dfb2b786450774dcd0d81c8eedad25f2b343 --- /dev/null +++ b/itools-core/itools-common/src/main/java/com/itools/core/init/MyDdlApplicationRunner.java @@ -0,0 +1,116 @@ +package com.itools.core.init; + +import com.itools.core.rbac.param.initDB.InitDBInsertParam; +import com.itools.core.rbac.param.initDB.InitDBQueryParam; +import com.itools.core.rbac.param.initDB.InitDBResult; +import com.itools.core.utils.StringUtils; +import org.apache.ibatis.io.Resources; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.boot.ApplicationArguments; +import org.springframework.boot.ApplicationRunner; +import org.springframework.context.ApplicationContext; +import org.springframework.core.annotation.Order; +import org.springframework.core.env.Environment; +import org.springframework.stereotype.Component; + +import javax.sql.DataSource; +import java.io.Reader; +import java.sql.Connection; +import java.sql.SQLException; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.regex.Matcher; +import java.util.regex.Pattern; + + +/** + * @Author XUCHANG + * @description: + * @Date 2020/9/10 15:33 + */ +@Component +@Order(value = 0) +public class MyDdlApplicationRunner implements ApplicationRunner { + protected final Logger logger = LoggerFactory.getLogger(this.getClass()); + @Autowired + private ApplicationContext applicationContext; + @Autowired + private Environment environment; + @Override + public void run(ApplicationArguments args) throws Exception { + + if (!environment.containsProperty("initDB.is-use")){ + return; + } + Boolean isUse = environment.getProperty("initDB.is-use",Boolean.class); + if (!isUse){ + return; + } + + DataSource dataSource = applicationContext.getBean(DataSource.class); + Connection connection = null; + InitDbService initDBService = applicationContext.getBean(InitDbService.class); + String ddlProperty = environment.getProperty("initDB.ddl"); + String[] files = ddlProperty.split(","); + try { + connection = dataSource.getConnection(); + } catch (SQLException e) { + logger.info("数据源连接失败",e); + } + MyScriptRunner runner = new MyScriptRunner(connection,getInitDBMap(initDBService)); + try { + List dbInsertParams = new ArrayList<>(); + for (String file : files){ + logger.info("开始执行{}脚本文件",file); + Reader ddlResourceAsReader = Resources.getResourceAsReader(file); + runner.setDelimiter(environment.getProperty("initDB.delimiter")); + runner.setImplemented(true); + runner.setThrowWarning(true); + List result = runner.runLineScript(ddlResourceAsReader); + + for (String sql : result){ + if (StringUtils.isEmpty(sql)){ + continue; + } + InitDBInsertParam initDBInsertParam = new InitDBInsertParam(); + initDBInsertParam.setType("ddl"); + initDBInsertParam.setContent(sql); + logger.info("DDL:执行了"+sql); + initDBInsertParam.setEnv(environment.getProperty("initDB.env")); + initDBInsertParam.setVersion(environment.getProperty("initDB.version")); + dbInsertParams.add(initDBInsertParam); + } + logger.info("脚本{}执行成功",file); + } + initDBService.multipartInsert(dbInsertParams); + } catch (Exception e) { + logger.error("Resources获取失败",e); + } + logger.info("DDL脚本执行完成"); + } + private Map getInitDBMap(InitDbService initDBService){ + Map result = new HashMap<>(); + InitDBQueryParam initDBQueryParam = new InitDBQueryParam(); + initDBQueryParam.setEnv(environment.getProperty("initDB.env")); + initDBQueryParam.setType("ddl"); +// initDBQueryParam.setVersion(environment.getProperty("initDB.version")); + List resultList = initDBService.query(initDBQueryParam); + for (InitDBResult initDBResult : resultList){ + result.put(initDBResult.getId(),replaceBlank(initDBResult.getContent())); + } + return result; + } + private static String replaceBlank(String str) { + String dest = ""; + if (str!=null) { + Pattern p = Pattern.compile("\\s*|\t|\r|\n"); + Matcher m = p.matcher(str); + dest = m.replaceAll(""); + } + return dest; + } +} diff --git a/itools-core/itools-common/src/main/java/com/itools/core/init/MyDmlApplicationRunner.java b/itools-core/itools-common/src/main/java/com/itools/core/init/MyDmlApplicationRunner.java new file mode 100644 index 0000000000000000000000000000000000000000..bd2374e3b32d0ab138335e7e4abea2fd481e4ac6 --- /dev/null +++ b/itools-core/itools-common/src/main/java/com/itools/core/init/MyDmlApplicationRunner.java @@ -0,0 +1,115 @@ +package com.itools.core.init; + +import com.itools.core.rbac.param.initDB.InitDBInsertParam; +import com.itools.core.rbac.param.initDB.InitDBQueryParam; +import com.itools.core.rbac.param.initDB.InitDBResult; +import com.itools.core.utils.StringUtils; +import org.apache.ibatis.io.Resources; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.boot.ApplicationArguments; +import org.springframework.boot.ApplicationRunner; +import org.springframework.context.ApplicationContext; +import org.springframework.core.annotation.Order; +import org.springframework.core.env.Environment; +import org.springframework.stereotype.Component; + +import javax.sql.DataSource; +import java.io.IOException; +import java.io.Reader; +import java.sql.Connection; +import java.sql.SQLException; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.regex.Matcher; +import java.util.regex.Pattern; + + +/** + * @Author XUCHANG + * @description: + * @Date 2020/9/10 15:33 + */ +@Component +@Order(value = 1) +public class MyDmlApplicationRunner implements ApplicationRunner { + protected final Logger logger = LoggerFactory.getLogger(this.getClass()); + @Autowired + private ApplicationContext applicationContext; + @Autowired + private Environment environment; + @Override + public void run(ApplicationArguments args) throws Exception { + if (!environment.containsProperty("initDB.is-use")){ + return; + } + Boolean isUse = environment.getProperty("initDB.is-use",Boolean.class); + if (!isUse){ + return; + } + DataSource dataSource = applicationContext.getBean(DataSource.class); + Connection connection = null; + try { + connection = dataSource.getConnection(); + } catch (SQLException e) { + logger.info("数据源连接失败",e); + } + String dmlProperty = environment.getProperty("initDB.dml"); + String[] files = dmlProperty.split(","); + InitDbService initDBService = applicationContext.getBean(InitDbService.class); + MyScriptRunner runner = new MyScriptRunner(connection,getInitDBMap(initDBService)); + try { + List dbInsertParams = new ArrayList<>(); + for (String file : files){ + logger.info("开始执行{}脚本文件",file); + Reader dmlResourceAsReader = Resources.getResourceAsReader(file); + runner.setImplemented(true); + runner.setDelimiter(environment.getProperty("initDB.delimiter")); + runner.setThrowWarning(true); + List result = runner.runLineScript(dmlResourceAsReader); + + for (String sql : result){ + if (StringUtils.isEmpty(sql)){ + continue; + } + InitDBInsertParam initDBInsertParam = new InitDBInsertParam(); + initDBInsertParam.setContent(sql); + initDBInsertParam.setEnv(environment.getProperty("initDB.env")); + initDBInsertParam.setType("dml"); + logger.info("DML:执行了"+sql); + initDBInsertParam.setVersion(environment.getProperty("initDB.version")); + dbInsertParams.add(initDBInsertParam); + } + logger.info("脚本{}执行成功",file); + } + initDBService.multipartInsert(dbInsertParams); + } catch (IOException e) { + logger.error("Resources获取失败",e); + } + logger.info("DML脚本执行完成"); + } + private Map getInitDBMap(InitDbService initDBService){ + Map result = new HashMap<>(); + InitDBQueryParam initDBQueryParam = new InitDBQueryParam(); + initDBQueryParam.setEnv(environment.getProperty("initDB.env")); +// initDBQueryParam.setVersion(environment.getProperty("initDB.version")); + initDBQueryParam.setType("dml"); + List resultList = initDBService.query(initDBQueryParam); + for (InitDBResult initDBResult : resultList){ + result.put(initDBResult.getId(),replaceBlank(initDBResult.getContent())); + } + return result; + } + private static String replaceBlank(String str) { + String dest = ""; + if (str!=null) { + Pattern p = Pattern.compile("\\s*|\t|\r|\n"); + Matcher m = p.matcher(str); + dest = m.replaceAll(""); + } + return dest; + } +} diff --git a/itools-core/itools-common/src/main/java/com/itools/core/init/MyFunctionApplicationRunner.java b/itools-core/itools-common/src/main/java/com/itools/core/init/MyFunctionApplicationRunner.java new file mode 100644 index 0000000000000000000000000000000000000000..82b233f61d39aa7e3dea69e617a45e84e1e66764 --- /dev/null +++ b/itools-core/itools-common/src/main/java/com/itools/core/init/MyFunctionApplicationRunner.java @@ -0,0 +1,115 @@ +package com.itools.core.init; + +import com.itools.core.rbac.param.initDB.InitDBInsertParam; +import com.itools.core.rbac.param.initDB.InitDBQueryParam; +import com.itools.core.rbac.param.initDB.InitDBResult; +import com.itools.core.utils.StringUtils; +import org.apache.ibatis.io.Resources; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.boot.ApplicationArguments; +import org.springframework.boot.ApplicationRunner; +import org.springframework.context.ApplicationContext; +import org.springframework.core.annotation.Order; +import org.springframework.core.env.Environment; +import org.springframework.stereotype.Component; + +import javax.sql.DataSource; +import java.io.IOException; +import java.io.Reader; +import java.sql.Connection; +import java.sql.SQLException; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.regex.Matcher; +import java.util.regex.Pattern; + + +/** + * @Author XUCHANG + * @description: + * @Date 2020/9/10 15:33 + */ +@Component +@Order(value = 0) +public class MyFunctionApplicationRunner implements ApplicationRunner { + protected final Logger logger = LoggerFactory.getLogger(this.getClass()); + @Autowired + private ApplicationContext applicationContext; + @Autowired + private Environment environment; + @Override + public void run(ApplicationArguments args) throws Exception { + if (!environment.containsProperty("initDB.is-use")){ + return; + } + Boolean isUse = environment.getProperty("initDB.is-use",Boolean.class); + if (!isUse){ + return; + } + DataSource dataSource = applicationContext.getBean(DataSource.class); + Connection connection = null; + try { + connection = dataSource.getConnection(); + } catch (SQLException e) { + logger.info("数据源连接失败",e); + } + InitDbService initDBService = applicationContext.getBean(InitDbService.class); + String functionProperty = environment.getProperty("initDB.function"); + String[] files = functionProperty.split(","); + MyScriptRunner runner = new MyScriptRunner(connection,getInitDBMap(initDBService)); + try { + List dbInsertParams = new ArrayList<>(); + for (String file : files){ + logger.info("开始执行{}脚本文件",file); + Reader functionResourceAsReader = Resources.getResourceAsReader(file); + runner.setDelimiter(environment.getProperty("initDB.delimiter")); + runner.setImplemented(true); + runner.setThrowWarning(true); + List result = runner.runLineScript(functionResourceAsReader); + + for (String sql : result){ + if (StringUtils.isEmpty(sql)){ + continue; + } + InitDBInsertParam initDBInsertParam = new InitDBInsertParam(); + initDBInsertParam.setContent(sql); + initDBInsertParam.setType("function"); + logger.info("function:执行了"+sql); + initDBInsertParam.setEnv(environment.getProperty("initDB.env")); + initDBInsertParam.setVersion(environment.getProperty("initDB.version")); + dbInsertParams.add(initDBInsertParam); + } + logger.info("脚本{}执行成功",file); + } + initDBService.multipartInsert(dbInsertParams); + } catch (IOException e) { + logger.info("Resources获取失败",e); + } + logger.info("FUNCTION脚本执行完成"); + } + private Map getInitDBMap(InitDbService initDBService){ + Map result = new HashMap<>(); + InitDBQueryParam initDBQueryParam = new InitDBQueryParam(); + initDBQueryParam.setEnv(environment.getProperty("initDB.env")); +// initDBQueryParam.setVersion(environment.getProperty("initDB.version")); + initDBQueryParam.setType("function"); + List resultList = initDBService.query(initDBQueryParam); + for (InitDBResult initDBResult : resultList){ + result.put(initDBResult.getId(),replaceBlank(initDBResult.getContent())); + } + return result; + } + private static String replaceBlank(String str) { + String dest = ""; + if (str!=null) { + Pattern p = Pattern.compile("\\s*|\t|\r|\n"); + Matcher m = p.matcher(str); + dest = m.replaceAll(""); + } + return dest; + } +} diff --git a/itools-core/itools-common/src/main/java/com/itools/core/init/MyScriptRunner.java b/itools-core/itools-common/src/main/java/com/itools/core/init/MyScriptRunner.java new file mode 100644 index 0000000000000000000000000000000000000000..5c5130acf30d648f5c4c8a919076c2a381774549 --- /dev/null +++ b/itools-core/itools-common/src/main/java/com/itools/core/init/MyScriptRunner.java @@ -0,0 +1,361 @@ +package com.itools.core.init; + +import org.apache.ibatis.jdbc.RuntimeSqlException; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +import java.io.BufferedReader; +import java.io.PrintWriter; +import java.io.Reader; +import java.io.UnsupportedEncodingException; +import java.sql.*; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; +import java.util.regex.Matcher; +import java.util.regex.Pattern; + +/** + * @Author XUCHANG + * @description: + * @Date 2020/9/10 16:36 + */ +public class MyScriptRunner { + protected final Logger logger = LoggerFactory.getLogger(this.getClass()); + private static final String LINE_SEPARATOR = System.getProperty("line.separator", "\n"); + private static final String DEFAULT_DELIMITER = ";"; + private final Connection connection; + private boolean stopOnError; + private boolean throwWarning; + private boolean autoCommit; + private boolean sendFullScript; + private boolean removeCRs; + private boolean escapeProcessing = true; + private PrintWriter logWriter; + private PrintWriter errorLogWriter; + private String delimiter; + private boolean fullLineDelimiter; + private boolean isImplemented; + private Map sqlMap; + + public MyScriptRunner(Connection connection,Map sqlMap) { + this.logWriter = new PrintWriter(System.out); + this.errorLogWriter = new PrintWriter(System.err); + this.delimiter = ";"; + this.connection = connection; + this.sqlMap = sqlMap; + } + + public boolean isImplemented() { + return isImplemented; + } + + public void setImplemented(boolean implemented) { + isImplemented = implemented; + } + + public void setStopOnError(boolean stopOnError) { + this.stopOnError = stopOnError; + } + + public void setThrowWarning(boolean throwWarning) { + this.throwWarning = throwWarning; + } + + public void setAutoCommit(boolean autoCommit) { + this.autoCommit = autoCommit; + } + + public void setSendFullScript(boolean sendFullScript) { + this.sendFullScript = sendFullScript; + } + + public void setRemoveCRs(boolean removeCRs) { + this.removeCRs = removeCRs; + } + + public void setEscapeProcessing(boolean escapeProcessing) { + this.escapeProcessing = escapeProcessing; + } + + public void setLogWriter(PrintWriter logWriter) { + this.logWriter = logWriter; + } + + public void setErrorLogWriter(PrintWriter errorLogWriter) { + this.errorLogWriter = errorLogWriter; + } + + public void setDelimiter(String delimiter) { + this.delimiter = delimiter; + } + + public void setFullLineDelimiter(boolean fullLineDelimiter) { + this.fullLineDelimiter = fullLineDelimiter; + } + + public void runScript(Reader reader) { + this.setAutoCommit(); + + try { + if (this.sendFullScript) { + this.executeFullScript(reader); + } else { + this.executeLineByLine(reader); + } + } finally { + this.rollbackConnection(); + } + + } + public List runLineScript(Reader reader) { + this.setAutoCommit(); + + try { + return this.executeLineByLine(reader); + } finally { + this.rollbackConnection(); + } + + } + + private void executeFullScript(Reader reader) { + StringBuilder script = new StringBuilder(); + + String line; + try { + BufferedReader lineReader = new BufferedReader(reader); + + while((line = lineReader.readLine()) != null) { + script.append(line); + script.append(LINE_SEPARATOR); + } + + String command = script.toString(); + this.println(command); + this.executeStatement(command); + this.commitConnection(); + } catch (Exception var6) { + line = "Error executing: " + script + ". Cause: " + var6; + this.printlnError(line); + throw new RuntimeSqlException(line, var6); + } + } + + private List executeLineByLine(Reader reader) { + StringBuilder command = new StringBuilder(); + List sql = new ArrayList<>(); + String line; + try { +// for(BufferedReader lineReader = new BufferedReader(reader); (line = lineReader.readLine()) != null; command = this.handleLine(command, line,sql)) { +// } + BufferedReader lineReader = new BufferedReader(reader); + while ((line = lineReader.readLine()) != null){ + command = this.handleLine(command, line,sql); + } + this.commitConnection(); + this.checkForMissingLineTerminator(command); + return sql; + } catch (Exception var5) { + line = "Error executing: " + command + ". Cause: " + var5; + this.printlnError(line); + throw new RuntimeSqlException(line, var5); + } + } + + private boolean isRun(String s) { + + if (sqlMap.containsValue(s) && isImplemented){ + return true; + } + return false; + } + + public void closeConnection() { + try { + this.connection.close(); + } catch (Exception var2) { + } + + } + + private void setAutoCommit() { + try { + if (this.autoCommit != this.connection.getAutoCommit()) { + this.connection.setAutoCommit(this.autoCommit); + } + + } catch (Throwable var2) { + throw new RuntimeSqlException("Could not set AutoCommit to " + this.autoCommit + ". Cause: " + var2, var2); + } + } + + private void commitConnection() { + try { + if (!this.connection.getAutoCommit()) { + this.connection.commit(); + } + + } catch (Throwable var2) { + throw new RuntimeSqlException("Could not commit transaction. Cause: " + var2, var2); + } + } + + private void rollbackConnection() { + try { + if (!this.connection.getAutoCommit()) { + this.connection.rollback(); + } + } catch (Throwable var2) { + } + + } + + private void checkForMissingLineTerminator(StringBuilder command) { + if (command != null && command.toString().trim().length() > 0) { + throw new RuntimeSqlException("Line missing end-of-line terminator (" + this.delimiter + ") => " + command); + } + } + + private StringBuilder handleLine(StringBuilder command, String line, List sql) throws SQLException, UnsupportedEncodingException { + String trimmedLine = line.trim(); + + if (this.lineIsComment(trimmedLine)) { + String cleanedString = trimmedLine.substring(2).trim().replaceFirst("//", ""); + if (cleanedString.toUpperCase().startsWith("@DELIMITER")) { + this.delimiter = cleanedString.substring(11, 12); + return command; + } + + this.println(trimmedLine); + } else if (this.commandReadyToExecute(trimmedLine)) { + command.append(line.substring(0, line.lastIndexOf(this.delimiter))); + command.append(LINE_SEPARATOR); + this.println(command); + String sqlLine = replaceBlank(command.toString()); + if (this.isRun(sqlLine)){ + command.setLength(0); + return command; + } + if (!sql.contains(sqlLine) && !this.isRun(sqlLine)){ + sql.add(command.toString()); + sqlMap.put(String.valueOf(System.currentTimeMillis()),sqlLine); + } + this.executeStatement(command.toString()); + command.setLength(0); + } else if (trimmedLine.length() > 0) { + command.append(line); + command.append(LINE_SEPARATOR); + } + + return command; + } + private String replaceBlank(String str) { + String dest = ""; + if (str!=null) { + Pattern p = Pattern.compile("\\s*|\t|\r|\n"); + Matcher m = p.matcher(str); + dest = m.replaceAll(""); + } + return dest; + } + private boolean lineIsComment(String trimmedLine) { + return trimmedLine.startsWith("//") || trimmedLine.startsWith("--"); + } + + private boolean commandReadyToExecute(String trimmedLine) { + return !this.fullLineDelimiter && trimmedLine.contains(this.delimiter) || this.fullLineDelimiter && trimmedLine.equals(this.delimiter); + } + + private void executeStatement(String command) throws SQLException { + boolean hasResults = false; + Statement statement = this.connection.createStatement(); + statement.setEscapeProcessing(this.escapeProcessing); + String sql = command; + if (this.removeCRs) { + sql = command.replaceAll("\r\n", "\n"); + } + + if (this.stopOnError) { + hasResults = statement.execute(sql); + if (this.throwWarning) { + SQLWarning warning = statement.getWarnings(); + if (warning != null) { + throw warning; + } + } + } else { + try { + hasResults = statement.execute(sql); + } catch (SQLException var8) { + String message = "Error executing: " + command + ". Cause: " + var8; + this.printlnError(message); + } + } + + this.printResults(statement, hasResults); + + try { + statement.close(); + } catch (Exception var7) { + } + + } + + private void printResults(Statement statement, boolean hasResults) { + try { + if (hasResults) { + ResultSet rs = statement.getResultSet(); + if (rs != null) { + ResultSetMetaData md = rs.getMetaData(); + int cols = md.getColumnCount(); + + int i; + String value; + for(i = 0; i < cols; ++i) { + value = md.getColumnLabel(i + 1); + this.print(value + "\t"); + } + + this.println(""); + + while(rs.next()) { + for(i = 0; i < cols; ++i) { + value = rs.getString(i + 1); + this.print(value + "\t"); + } + + this.println(""); + } + } + } + } catch (SQLException var8) { + this.printlnError("Error printing results: " + var8.getMessage()); + } + + } + + private void print(Object o) { + if (this.logWriter != null) { + this.logWriter.print(o); + this.logWriter.flush(); + } + + } + + private void println(Object o) { + if (this.logWriter != null) { + this.logWriter.println(o); + this.logWriter.flush(); + } + + } + + private void printlnError(Object o) { + if (this.errorLogWriter != null) { + this.errorLogWriter.println(o); + this.errorLogWriter.flush(); + } + + } +} diff --git a/itools-core/itools-common/src/main/java/com/itools/core/init/package-info.java b/itools-core/itools-common/src/main/java/com/itools/core/init/package-info.java new file mode 100644 index 0000000000000000000000000000000000000000..a43fc1a4accb624364dd7645e40fa6f0ca5b5e4d --- /dev/null +++ b/itools-core/itools-common/src/main/java/com/itools/core/init/package-info.java @@ -0,0 +1,4 @@ +/** + * 自动初始化脚本,需要执行 + */ +package com.itools.core.init; \ No newline at end of file diff --git a/itools-core/itools-common/src/main/java/com/itools/core/interceptor/ControllerInterceptor.java b/itools-core/itools-common/src/main/java/com/itools/core/interceptor/ControllerInterceptor.java new file mode 100644 index 0000000000000000000000000000000000000000..e4f27a1c58073942178f1cfe4b1bc46b9d29d309 --- /dev/null +++ b/itools-core/itools-common/src/main/java/com/itools/core/interceptor/ControllerInterceptor.java @@ -0,0 +1,47 @@ +package com.itools.core.interceptor; + +import com.itools.core.utils.StringUtils; +import org.aspectj.lang.ProceedingJoinPoint; +import org.aspectj.lang.annotation.Around; +import org.aspectj.lang.annotation.Aspect; +import org.aspectj.lang.annotation.Pointcut; +import org.aspectj.lang.reflect.MethodSignature; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.springframework.stereotype.Component; + +import java.lang.reflect.Method; +import java.util.Arrays; + + +@Component +@Aspect +public class ControllerInterceptor{ + private static final Logger logger = LoggerFactory.getLogger(ControllerInterceptor.class); + private static final int PARAM_LENGTH_MAX = 100; + + @Pointcut("execution(* com.xuchang..controller..*(..))") + public void pointcut(){ + + } + + @Around("pointcut()") + public Object invoke(ProceedingJoinPoint proceedingJoinPoint) throws Throwable { + Method method = ((MethodSignature) proceedingJoinPoint.getSignature()).getMethod(); + String methodName = method.getDeclaringClass().getName() + ":" + method.getName(); + Object[] objects = proceedingJoinPoint.getArgs(); + String paramString = Arrays.toString(objects); + if(StringUtils.hasText(paramString) && paramString.length() > PARAM_LENGTH_MAX){ + paramString = paramString.substring(0, PARAM_LENGTH_MAX); + } + logger.info("调用控制层服务:" + methodName + ". param=" + paramString + ";"); + Object returnVal; + try { + returnVal = proceedingJoinPoint.proceed(); + } catch (Exception e) { + logger.error("服务{}调用异常,", methodName, e); + throw e; + } + return returnVal; + } +} diff --git a/itools-core/itools-common/src/main/java/com/itools/core/interceptor/DaoInterceptor.java b/itools-core/itools-common/src/main/java/com/itools/core/interceptor/DaoInterceptor.java new file mode 100644 index 0000000000000000000000000000000000000000..fa1e5bab68d7372bf17c9baee6f792b08d1d678a --- /dev/null +++ b/itools-core/itools-common/src/main/java/com/itools/core/interceptor/DaoInterceptor.java @@ -0,0 +1,47 @@ +package com.itools.core.interceptor; + +import com.itools.core.utils.StringUtils; +import org.aspectj.lang.ProceedingJoinPoint; +import org.aspectj.lang.annotation.Around; +import org.aspectj.lang.annotation.Aspect; +import org.aspectj.lang.annotation.Pointcut; +import org.aspectj.lang.reflect.MethodSignature; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.springframework.stereotype.Component; + +import java.lang.reflect.Method; +import java.util.Arrays; + + +@Component +@Aspect +public class DaoInterceptor { + private static final Logger logger = LoggerFactory.getLogger(DaoInterceptor.class); + private static final int PARAM_LENGTH_MAX = 100; + + @Pointcut("execution(* com.xuchang..data..*(..))") + public void pointcut(){ + + } + + @Around("pointcut()") + public Object invoke(ProceedingJoinPoint proceedingJoinPoint) throws Throwable { + Method method = ((MethodSignature) proceedingJoinPoint.getSignature()).getMethod(); + String methodName = method.getDeclaringClass().getName() + ":" + method.getName(); + Object[] objects = proceedingJoinPoint.getArgs(); + String paramString = Arrays.toString(objects); + if(StringUtils.hasText(paramString) && paramString.length() > PARAM_LENGTH_MAX){ + paramString = paramString.substring(0, PARAM_LENGTH_MAX); + } + logger.info("调用数据服务:" + methodName + ". param=" + paramString + ";"); + Object returnVal; + try { + returnVal = proceedingJoinPoint.proceed(); + } catch (Exception e) { + logger.error("服务{}调用异常,", methodName, e); + throw e; + } + return returnVal; + } +} diff --git a/itools-core/itools-common/src/main/java/com/itools/core/interceptor/ManagerInterceptor.java b/itools-core/itools-common/src/main/java/com/itools/core/interceptor/ManagerInterceptor.java new file mode 100644 index 0000000000000000000000000000000000000000..99d4e21648181080c1f475fc8c801de3b8405f7d --- /dev/null +++ b/itools-core/itools-common/src/main/java/com/itools/core/interceptor/ManagerInterceptor.java @@ -0,0 +1,47 @@ +package com.itools.core.interceptor; + +import com.itools.core.utils.StringUtils; +import org.aspectj.lang.ProceedingJoinPoint; +import org.aspectj.lang.annotation.Around; +import org.aspectj.lang.annotation.Aspect; +import org.aspectj.lang.annotation.Pointcut; +import org.aspectj.lang.reflect.MethodSignature; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.springframework.stereotype.Component; + +import java.lang.reflect.Method; +import java.util.Arrays; + + +@Component +@Aspect +public class ManagerInterceptor { + private static final Logger logger = LoggerFactory.getLogger(ManagerInterceptor.class); + private static final int PARAM_LENGTH_MAX = 100; + + @Pointcut("execution(* com.xuchang..manager..*(..))") + public void pointcut(){ + + } + + @Around("pointcut()") + public Object invoke(ProceedingJoinPoint proceedingJoinPoint) throws Throwable { + Method method = ((MethodSignature) proceedingJoinPoint.getSignature()).getMethod(); + String methodName = method.getDeclaringClass().getName() + ":" + method.getName(); + Object[] objects = proceedingJoinPoint.getArgs(); + String paramString = Arrays.toString(objects); + if(StringUtils.hasText(paramString) && paramString.length() > PARAM_LENGTH_MAX){ + paramString = paramString.substring(0, PARAM_LENGTH_MAX); + } + logger.info("调用业务服务:" + methodName + ". param=" + paramString + ";"); + Object returnVal; + try { + returnVal = proceedingJoinPoint.proceed(); + } catch (Exception e) { + logger.error("服务{}调用异常,", methodName, e); + throw e; + } + return returnVal; + } +} diff --git a/itools-core/itools-common/src/main/java/com/itools/core/interceptor/ServiceInterceptor.java b/itools-core/itools-common/src/main/java/com/itools/core/interceptor/ServiceInterceptor.java new file mode 100644 index 0000000000000000000000000000000000000000..f6fa797eb390d1107dda24a18bf3833d66fbf21b --- /dev/null +++ b/itools-core/itools-common/src/main/java/com/itools/core/interceptor/ServiceInterceptor.java @@ -0,0 +1,47 @@ +package com.itools.core.interceptor; + +import com.itools.core.utils.StringUtils; +import org.aspectj.lang.ProceedingJoinPoint; +import org.aspectj.lang.annotation.Around; +import org.aspectj.lang.annotation.Aspect; +import org.aspectj.lang.annotation.Pointcut; +import org.aspectj.lang.reflect.MethodSignature; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.springframework.stereotype.Component; + +import java.lang.reflect.Method; +import java.util.Arrays; + + +@Component +@Aspect +public class ServiceInterceptor{ + private static final Logger logger = LoggerFactory.getLogger(ServiceInterceptor.class); + private static final int PARAM_LENGTH_MAX = 100; + + @Pointcut("execution(* com.xuchang..service..*(..))") + public void pointcut(){ + + } + + @Around("pointcut()") + public Object invoke(ProceedingJoinPoint proceedingJoinPoint) throws Throwable { + Method method = ((MethodSignature) proceedingJoinPoint.getSignature()).getMethod(); + String methodName = method.getDeclaringClass().getName() + ":" + method.getName(); + Object[] objects = proceedingJoinPoint.getArgs(); + String paramString = Arrays.toString(objects); + if(!StringUtils.isEmpty(paramString) && paramString.length() > PARAM_LENGTH_MAX){ + paramString = paramString.substring(0, PARAM_LENGTH_MAX); + } + logger.info("调用接口服务:" + methodName + ". param=" + paramString + ";"); + Object returnVal; + try { + returnVal = proceedingJoinPoint.proceed(); + } catch (Exception e) { + logger.error("服务{}调用异常,", methodName, e); + throw e; + } + return returnVal; + } +} diff --git a/itools-core/itools-common/src/main/java/com/itools/core/interceptor/ServiceThreadManager.java b/itools-core/itools-common/src/main/java/com/itools/core/interceptor/ServiceThreadManager.java new file mode 100644 index 0000000000000000000000000000000000000000..4a9f791f6a18f0256dfae528f78737c20423296a --- /dev/null +++ b/itools-core/itools-common/src/main/java/com/itools/core/interceptor/ServiceThreadManager.java @@ -0,0 +1,35 @@ +package com.itools.core.interceptor; + +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.springframework.stereotype.Component; + +import java.util.concurrent.ExecutorService; +import java.util.concurrent.LinkedBlockingQueue; +import java.util.concurrent.ThreadPoolExecutor; +import java.util.concurrent.TimeUnit; +import java.util.concurrent.atomic.AtomicInteger; + + +@Component +public class ServiceThreadManager { + + private AtomicInteger threadCount = new AtomicInteger(0); + private ExecutorService service; + private static final Logger logger = LoggerFactory.getLogger(ServiceThreadManager.class); + + public ServiceThreadManager() { + this.service = new ThreadPoolExecutor(10, 10, 0L, TimeUnit.MILLISECONDS, + new LinkedBlockingQueue<>(), r -> { + Thread thread = new Thread(r); + thread.setName("Service Thread ->" + ServiceThreadManager.this.threadCount.getAndIncrement()); + thread.setDaemon(true); + thread.setUncaughtExceptionHandler((t, e) -> logger.error("ServiceThreadManager exception ,", e)); + return thread; + }); + } + + public void execute(Runnable task) { + this.service.execute(task); + } +} diff --git a/itools-core/itools-common/src/main/java/com/itools/core/log/Constants.java b/itools-core/itools-common/src/main/java/com/itools/core/log/Constants.java new file mode 100644 index 0000000000000000000000000000000000000000..9761bca3ae4c7ab8bcc90ca2513d38f6dfb0bcbe --- /dev/null +++ b/itools-core/itools-common/src/main/java/com/itools/core/log/Constants.java @@ -0,0 +1,362 @@ +package com.itools.core.log; + +import java.util.HashMap; +import java.util.Map; + +public interface Constants { + public final static String SUCCESS = ReturnCode.SUCCESS.code; + public final static String FAIL = ReturnCode.FAIL.code; + public final static String INVALID_PARAM = ReturnCode.INVALID_PARAM.code; + + enum ReturnCode { + SUCCESS("0", "处理成功"), + FAIL("1", "系统内部错误"), + INVALID_PARAM("2", "参数错误"), + REMOTE_ERROR("3", "远程调用失败"), + DB_ERROR("4", "数据库操作失败"), + CACHE_ERROR("5", "缓存操作失败"), + MQ_ERROR("6", "消息调用失败"), + FILE_ERROR("7", "读写文件失败"), + UNSUPPORT_MQ_MSG_TYPE("8", "不支持的消息类型"), + REPEATED_REQUEST("0103", "重复请求"); + + public final String code; + public final String comment; + + ReturnCode(String code, String comment) { + this.code = code; + this.comment = comment; + } + } + + enum HeadKey { + TOKEN("x-token", "令牌"), + USERID("x-userid", "用户ID"), + CUSTOMER_CODE("x-customer-code", "客户编码"), + USERTYPE("x-user-type", "用户类型,参考Constants.UserType定义"), + BUSINESS_TYPE("x-business-type", "业务类型"), + EXTRA("x-extra", "扩展信息,在令牌中保存,不做其他处理"), + IP("x-user-ip", "用户IP"), + UA("x-user-ua", "用户UA"); + + public final String code; + public final String comment; + + HeadKey(String code, String comment) { + this.code = code; + this.comment = comment; + } + } + + enum ActionType { + COMMAND("CMD", "命令型,Method只返回String,表示成败"), + QUERY("QRY", "查询型,Method返回值对象或者值对象集合"); + + public final String code; + public final String comment; + + ActionType(String code, String comment) { + this.code = code; + this.comment = comment; + } + } + + public enum PayState { + + SUCCESS("SUCCESS", "成功"), + FAIL("FAIL", "失败"), + INIT("INIT", "初始化"), + PROCESSING("IN_PROCESS", "处理中"); + + public final String code; + public final String message; + + PayState(String code, String message) { + this.code = code; + this.message = message; + } + + private static final Map CODE_MAP = new HashMap(); + + static { + for (PayState typeEnum : PayState.values()) { + CODE_MAP.put(typeEnum.code, typeEnum); + } + } + + public static PayState getEnum(String typeName) { + return CODE_MAP.get(typeName); + } + } + + /** + * 费率模式 + * + */ + enum RateMode { + FIX_RATE((short) 1, "固定费率"), + PERCENT_RATE((short) 2, "百分比费率"); + public final Short code; + public final String comment; + + RateMode(Short code, String comment) { + this.code = code; + this.comment = comment; + } + } + + /** + * 系统预置的业务编码 + */ + enum BusinessCode { + + YMF("YMF", "一码付业务"), + API_REFUND("API_REFUND", "API退款业务"), + FZ("FZ", "分账,将某条支付订单的金额分给其他客户"), + BFZ("BFZ", "被分账,从其他客户的支付订单分得金额"), + WITHDRAW("WITHDRAW", "提现业务"), + DL("DL", "代理业务"), + TK("TK", "退款业务"); + + public final String code; + public final String comment; + + BusinessCode(String code, String comment) { + this.code = code; + this.comment = comment; + } + + private static final Map CODE_MAP = new HashMap(); + + static { + for (BusinessCode typeEnum : BusinessCode.values()) { + CODE_MAP.put(typeEnum.code, typeEnum); + } + } + + public static BusinessCode getEnum(String code) { + return CODE_MAP.get(code); + } + } + + /** + * 业务参数,这里还是需要的,否则一些业务逻辑的判断就不好做了 + */ + enum BusinessParamCode { + + AGENT_CUSTOMER_CODE("agentCustomerCode", "代理商客户编码"), + MAX_TXS_AMOUNT("maxTxsAmount", "最大交易限额"), + MIN_TXS_AMOUNT("minTxsAmount", "最小交易限额"), + /** + * 分账客户的客户编码,只允许该商户给对应的子商户分账 + */ + FZ_CUSTOMER_CODE("fzCustomerCode", "分账客户编码"), + SUBSCRIPTION_RATIO("subscriptionRatio", "兑换比例"); + public final String code; + public final String comment; + + BusinessParamCode(String code, String comment) { + this.code = code; + this.comment = comment; + } + + } + + /** + * 业务类别 + */ + enum BusinessCategory { + DSP_BASIC_PAY_SERVICE("dspBasicPayService", "基础支付类业务"), + DSP_FZ_SERVICE("dspFzService", "分账类业务(分账)"), + DSP_BFZ_SERVICE("dspBfzService", "分账类业务(被分账)"), + DSP_FZ_PAY_SERVICE("dspFzPayService", "分账支付类业务"), + DSP_ACCOUNT_SERVICE("dspAccountService", "账务服务"), + DSP_SPECIAL_SERVICE("dspSpecialService", "系统专用业务"), + DSP_MEMBER_RECHARGE_SERVICE("dspMemberRechargeService", "充值服务"); + public final String code; + public final String comment; + + BusinessCategory(String code, String comment) { + this.code = code; + this.comment = comment; + } + } + + /** + * 基础支付类业务 + */ + enum BasicPayService { + YMF("YMF", "一码付"), + AlIJSAPI("AliJSAPI", "支付宝生活号"), + AlIMICRO("AliMicro", "支付宝被扫"), + WXMICRO("WxMicro", "微信被扫"), + AlINATIVE("AliNative", "支付宝主扫"), + QUICKPAY("QuickPay", "快捷支付"), + WXMWEB("WxMWEB", "微信H5支付"), + WXJSAPI("WxJSAPI", "微信公众号支付"), + WXNATIVE("WxNative", "微信主扫"), + SAVINGCARDPAY("SavingCardPay", "网银储蓄卡"), + CREDITCARDPAY("CreditCardPay", "网银信用卡"), + REFUND_USING_FLOAT("RefundUsingFloat", "支付_在途金额退款"); + public final String code; + public final String comment; + + BasicPayService(String code, String comment) { + this.code = code; + this.comment = comment; + } + } + + /** + * 分账类业务(分账) 注:记账计入簿记账户 + */ + enum FzService { + FZ("FZ", "分账"), + FZ_REFUND_USING_FLOAT("FzRefundUsingFloat", "分账_在途金额退款"); + public final String code; + public final String comment; + + FzService(String code, String comment) { + this.code = code; + this.comment = comment; + } + } + + /** + * 分账类业务(被分账) 注:记账计入分账账户 + */ + enum BfzService { + BFZ("BFZ", "被分账"), + BFZ_REFUND_USING_FLOAT("BfzRefundUsingFloat", "被分账_在途金额退款"); + public final String code; + public final String comment; + + BfzService(String code, String comment) { + this.code = code; + this.comment = comment; + } + } + + /** + * 分账支付类业务 + */ + enum FzPayService { + FZ_ALIJSAPI("FZ-AliJSAPI", "分账-支付宝生活号"), + FZ_ALIMICRO("FZ-AliMicro", "分账-支付宝被扫"), + FZ_WXMICRO("FZ-WxMicro", "分账-微信被扫"), + FZ_ALINATIVE("FZ-AliNative", "分账-支付宝主扫"), + FZ_QUICKPAY("FZ-QuickPay", "分账-快捷支付"), + FZ_WXMWEB("FZ-WxMWEB", "分账-微信H5支付"), + FZ_WXJSAPI("FZ-WxJSAPI", "分账-微信公众号支付"), + FZ_WXNATVIE("FZ-WxNative", "分账-微信主扫"), + FZ_SAVINGARDPAY("FZ-SavingCardPay", "分账网银支付"), + FZ_ENTERPRISEUNION("FZ-SavingCardPay", "分账网银支付"); + public final String code; + public final String comment; + + FzPayService(String code, String comment) { + this.code = code; + this.comment = comment; + } + } + + /** + * DSP账户服务(实时结算) + */ + enum AccountService { + REFUND_USING_AVAILABLE("RefundUsingAvailable", "支付_可用金额退款"), + FZ_REFUND_USING_AVAILABLE("FzRefundUsingAvailable", "分账_可用金额退款"), + BFZ_REFUND_USING_AVAILABLE("BfzRefundUsingAvailable", "被分账_可用金额退款"), + FZ_PAY_REFUND_USING_AVAILABLE("FzPayRefundUsingAvailable", "分账支付_可用金额退款"), + WITHDRAW("Withdraw", "代付"), + DL("DL", "代理"), + RECHARGE("Recharge", "充值"), + MEMBER_INSIDE_PAY("MemberInsidePay", "会员内转"), + MEMBER_EXCHANGE_IN("MemberExchangeIn", "会员兑换转入业务"), + MEMBER_EXCHANGE_OUT("MemberExchangeOut", "会员兑换转出业务"), + MEMBER_OPPOSITE_EXCHANGE_IN("MemberOppositeExchangeIn", "会员反兑换转入业务"), + MEMBER_OPPOSITE_EXCHANGE_OUT("MemberOppositeExchangeOut", "会员反兑换转出业务"), + MEMBER_INSIDE_PAY_CENT("MemberInsidePayCent", "会员内转分成业务"), + D0_QUICKPAY("D0-QuickPay", "D0快捷支付"), + D0_WITHDRAW_AUTO("D0-Withdraw-Auto", "D0代付-自动"); + + public final String code; + public final String comment; + + AccountService(String code, String comment) { + this.code = code; + this.comment = comment; + } + } + + /** + * DSP账户服务 + */ + enum MemberRechargeService { + MEMBER_RECHARGE_ALIJSAPI("MemberRecharge-AliJSAPI", "会员充值-支付宝生活号"), + MEMBER_RECHARGE_ALIMICRO("MemberRecharge-AliMicro", "会员充值-支付宝被扫"), + MEMBER_RECHARGE_WXMICRO("MemberRecharge-WxMicro", "会员充值-微信被扫"), + MEMBER_RECHARGE_ALINATIVE("MemberRecharge-AliNative", "会员充值-支付宝主扫"), + MEMBER_RECHARGE_QUICKPAY("MemberRecharge-QuickPay", "会员充值-快捷支付"), + MEMBER_RECHARGE_WXMWEB("MemberRecharge-WxMWEB", "会员充值-微信H5支付"), + MEMBER_RECHARGE_WXJSAPI("MemberRecharge-WxJSAPI", "会员充值-企业网银"), + MEMBER_RECHARGE_WXNATIVE("MemberRecharge-WxNative", "会员充值-微信主扫"), + MEMBER_RECHARGE_UNION("MemberRecharge-Union", "会员充值-企业网银"); + public final String code; + public final String comment; + + MemberRechargeService(String code, String comment) { + this.code = code; + this.comment = comment; + } + } + + /** + * 系统专用业务 + */ + enum SpecialService { + FR("FR", "分润"); + public final String code; + public final String comment; + + SpecialService(String code, String comment) { + this.code = code; + this.comment = comment; + } + } + + /** + * 结算粒度 + * + */ + enum settGrained { + + BUSINESS_CATEGORY("BusinessCategory", "业务类型"), + BUSINESS("business", "业务"); + + public final String code; + public final String comment; + + settGrained(String code, String comment) { + this.code = code; + this.comment = comment; + } + + } + + enum CustomerCategory { + + CUSTOMER("CUSTOMER", "客户"), /* 要营业执照或身份证全局唯一的类型 */ + CUSTOMER_MEMBER("CUSTOMER_MEMBER", "客户(的)会员");/* 营业执照或身份证只需要在所属客户下唯一即可 */ + + public final String code; + public final String comment; + + CustomerCategory(String code, String comment) { + this.code = code; + this.comment = comment; + } + + } + +} diff --git a/itools-core/itools-common/src/main/java/com/itools/core/log/LogRecorder.java b/itools-core/itools-common/src/main/java/com/itools/core/log/LogRecorder.java new file mode 100644 index 0000000000000000000000000000000000000000..70595cd02a09a12c3e51ccbc1a3c88cecaefc7dd --- /dev/null +++ b/itools-core/itools-common/src/main/java/com/itools/core/log/LogRecorder.java @@ -0,0 +1,254 @@ +package com.itools.core.log; + +import com.alibaba.fastjson.JSONObject; +import com.itools.core.exception.AppException; +import com.itools.core.exception.FeignExceptionDTO; +import com.itools.core.exception.FeignExceptionUtils; +import com.itools.core.utils.StringUtils; +import feign.FeignException; +import org.aspectj.lang.ProceedingJoinPoint; +import org.aspectj.lang.annotation.Around; +import org.aspectj.lang.annotation.Aspect; +import org.slf4j.Logger; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.beans.factory.annotation.Value; +import org.springframework.stereotype.Component; + +import java.lang.reflect.Method; +import java.time.ZonedDateTime; +import java.time.format.DateTimeFormatter; +import java.util.Collection; +import java.util.List; +import java.util.concurrent.atomic.AtomicLong; + +/** + * Logable注解的切面实现 + * @author Lida + */ +@Aspect +@Component +public class LogRecorder { + + private final static DateTimeFormatter DF = DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss.SSS"); + private final static AtomicLong COUNTER = new AtomicLong(1000000); + private final static String LOG_POSITION_POST = "POST"; + private final static String LOG_POSITION_PRE = "PRE"; + + private final static String SPLIT = "|"; + + private final static String EXCEPTION_SPLIT = "******"; + + @Value("${spring.application.name}") + private String applicationName; + @Value("${encryKey:''}") + private String encryKey; + + @Autowired + private ServerEnv serverEnv; + + public static final String LOG_LEVEL_DEBUG = "DEBUG"; + + public static final String LOG_LEVEL_INFO = "INFO"; + + @Around("@annotation(com.itools.core.log.Logable)") + public Object log(ProceedingJoinPoint pjp) throws Throwable { + final long start = System.currentTimeMillis(); + final long end; + //final long count = COUNTER.incrementAndGet(); + Throwable t = null; + Object result = null; + Class classTarget = pjp.getTarget().getClass(); + Method currentMethod = LogUtil.getCurrentMethod(pjp); + Object[] args = pjp.getArgs(); + Logable log = currentMethod.getAnnotation(Logable.class); + Logger detailLogger = LogUtil.getLogger(log.loggerName() + "-detail"); + String beginLogTexs = this.buildSimpleLogText(log, classTarget, currentMethod, t, null, LOG_POSITION_PRE) + buildBeginLogText(log, args); + if (detailLogger.isInfoEnabled() && log.level().name().equals(LOG_LEVEL_INFO)) { + detailLogger.info(beginLogTexs); + } else if (detailLogger.isDebugEnabled() && log.level().name().equals(LOG_LEVEL_DEBUG)) { + detailLogger.debug(beginLogTexs); + } + try { + result = pjp.proceed(); + } catch (Throwable t1) { + t = t1; + } finally { + end = System.currentTimeMillis(); + } + String endLogTexs = this.buildSimpleLogText(log, classTarget, currentMethod, t, (end - start), LOG_POSITION_POST) + this.buildEndLogText(log, result, t); + if (t == null) { + if (detailLogger.isInfoEnabled() && log.level().name().equals(LOG_LEVEL_INFO)) { + detailLogger.info(endLogTexs); + } else if (detailLogger.isDebugEnabled() && log.level().name().equals(LOG_LEVEL_DEBUG)) { + detailLogger.debug(endLogTexs); + } + } else { + detailLogger.error(endLogTexs); + } + + if (t == null) { + return result; + } else { + throw t; + } + } + + + /** + * @param log + * @param clazz + * @param method + * @param exception + * @param time + * @return + */ + protected final String buildSimpleLogText(Logable log, Class clazz, Method method, Throwable exception, Long time, String position) { + final StringBuilder sb = new StringBuilder(DF.format(ZonedDateTime.now())); + sb.append(SPLIT).append(this.serverEnv.getServerIp()).append(":").append(this.serverEnv.getServerPort()); + sb.append(SPLIT).append(applicationName); + sb.append(SPLIT).append(clazz.getName()); + sb.append(SPLIT).append(method.getName()); + sb.append(SPLIT).append(LOG_POSITION_POST.equals(position)? (time+"ms"): (0L+"ms")); + sb.append(SPLIT).append(LOG_POSITION_POST.equals(position)? ("errorCode:"+getReturnCode(exception)): "-"); + sb.append(SPLIT).append(LOG_POSITION_POST.equals(position)? (exception == null ? "SUCCESS" : "FAIL"): "-"); + sb.append(SPLIT).append(position); + sb.append(SPLIT).append(LogUtil.getTransaction(log)); + return sb.toString(); + } + + /** + * 开始日志 + * + * @param log + * @param args + * @return + */ + protected final String buildBeginLogText(Logable log, Object[] args) { + final StringBuilder sb = new StringBuilder(); + List objects = LogUtil.args(args); + int[] encryptArgsIndex = log.encryptArgsIndex(); + int[] ignoreOutputArgsIndex = log.ignoreOutputArgsIndex(); + sb.append(SPLIT + "Args: ["); + if(objects != null && !objects.isEmpty()){ + for(Object argSource : objects) { + boolean encrypt = false; + boolean output = true; + for (int index : encryptArgsIndex) { + Object arg = objects.get(index); + if(argSource.equals(arg)){ + encrypt = true; + break; + } + } + for (int index : ignoreOutputArgsIndex) { + Object arg = objects.get(index); + if(argSource.equals(arg)){ + output = false; + break; + } + } + String jsonObjects = JSONObject.toJSONString(argSource); + if(encrypt && log.encrypt() && StringUtils.hasText(encryKey)){ + jsonObjects = LogUtil.encrypt(jsonObjects, encryKey); + } + if (log.outputArgs() && output) { + sb.append(jsonObjects); + sb.append(','); + } + } + sb.deleteCharAt(sb.length() - 1); + } + sb.append(']'); + return sb.toString(); + } + + /** + * 方法执行完毕后的日志 + * + * @param log + * @param result + * @param exception + * @return + */ + protected final String buildEndLogText(Logable log, Object result, Throwable exception) { + final StringBuilder sb = new StringBuilder(); + sb.append(SPLIT + "Result: "); + if (log.outputResult() && result != null) { + if(result instanceof Collection) {//返回集合,减少日志起见,仅打印类型和大小 + sb.append(result.getClass()+"@Size:"+((Collection)result).size()); + } + else { + sb.append(result instanceof String ? result : JSONObject.toJSONString(result)); + } + } + sb.append(SPLIT + "Error: "); + if (log.outputError() && exception != null) { + sb.append(exception.getMessage() + EXCEPTION_SPLIT); + StackTraceElement[] stackTrace = exception.getStackTrace(); + for (StackTraceElement stackTraceElement : stackTrace) { + String str = StringUtils.toString(stackTraceElement); + if (str.contains("com.hashtech")) { + sb.append(str + EXCEPTION_SPLIT); + } else { + continue; + } + } + + Throwable cause = exception.getCause(); + if (cause != null) { + sb.append(cause.getMessage() + EXCEPTION_SPLIT); + StackTraceElement[] stackTrace1 = cause.getStackTrace(); + for (StackTraceElement stackTraceElement : stackTrace1) { + String str = StringUtils.toString(stackTraceElement); + if (str.contains("com.hashtech")) { + sb.append(str + EXCEPTION_SPLIT); + } else { + continue; + } + } + } + sb.deleteCharAt(sb.length() - 1); + } + return sb.toString(); + } + + + + public static AppException getBusinessCause(final Throwable t) { + if (t == null) { + return null; + } + Throwable cause = t; + + while (cause != null) { + if (cause instanceof AppException) { + return (AppException) cause; + } else { + cause = cause.getCause(); + } + } + + return null; + } + + public static String getReturnCode(final Throwable t) { + if(t == null) { + return Constants.SUCCESS; + } + if(t instanceof AppException) { + return ((AppException)t).getErrorCode(); + } else if(t instanceof FeignException) { + FeignExceptionDTO fed = FeignExceptionUtils.parseFeignException(t); + if(fed == null) { + return Constants.ReturnCode.REMOTE_ERROR.code; + } else { + return fed.getCode(); + } + } + if(t.getCause() != null) { + return getReturnCode(t.getCause()); + } else { + return Constants.FAIL; + } + } +} diff --git a/itools-core/itools-common/src/main/java/com/itools/core/log/LogUtil.java b/itools-core/itools-common/src/main/java/com/itools/core/log/LogUtil.java new file mode 100644 index 0000000000000000000000000000000000000000..0ea19ec0194a5f2d8f5b23b6840a7f24861f53fa --- /dev/null +++ b/itools-core/itools-common/src/main/java/com/itools/core/log/LogUtil.java @@ -0,0 +1,194 @@ +package com.itools.core.log; + +import com.itools.core.utils.AesUtils; +import com.itools.core.utils.StringUtils; +import com.itools.core.utils.UUIDUtils; +import org.aspectj.lang.ProceedingJoinPoint; +import org.aspectj.lang.reflect.MethodSignature; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.springframework.web.context.request.RequestAttributes; +import org.springframework.web.context.request.RequestContextHolder; +import org.springframework.web.context.request.ServletRequestAttributes; + +import javax.servlet.http.HttpServletRequestWrapper; +import java.lang.reflect.Method; +import java.net.MalformedURLException; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + + +public class LogUtil { + private final static ThreadLocal transactionNoInThread = new ThreadLocal(); + private final static Map LOGGERS = new HashMap(); + + /** + * 获取 transaction + * + * @return + */ + public static String getTransaction(Logable log) { + String transactionNo = null; + //from attrs + try { + RequestAttributes requestAttributes = RequestContextHolder.getRequestAttributes(); + ServletRequestAttributes attrs = null ; + if (requestAttributes != null && requestAttributes instanceof ServletRequestAttributes) { + attrs = (ServletRequestAttributes) requestAttributes; + } + if(attrs != null) { + transactionNo = (String) attrs.getRequest().getAttribute("transactionNo"); + if(StringUtils.isEmpty(transactionNo)) { + transactionNo = UUIDUtils.uuid(); + attrs.setAttribute("transactionNo", transactionNo, RequestAttributes.SCOPE_REQUEST); + } + } + } catch (Exception e) { } + //from thread context + if(StringUtils.isEmpty(transactionNo) && log != null) { + transactionNo = transactionNoInThread.get(); + if(transactionNo==null) { + transactionNo = UUIDUtils.uuid(); + transactionNoInThread.set(transactionNo); + } + } + return transactionNo; + } + + /** + * 加密字段 + * + * @param str + * @param key + * @param encryKey + * @return + */ + public static String encrypt(String str, String key, String encryKey) { + if (org.apache.commons.lang3.StringUtils.isBlank(str) || org.apache.commons.lang3.StringUtils.isBlank(key)) { + return null; + } + if (!org.apache.commons.lang3.StringUtils.contains(str, key)) { + return null; + } + String subString = org.apache.commons.lang3.StringUtils.substringAfter(str, key); + if (org.apache.commons.lang3.StringUtils.isBlank(subString)) { + return null; + } + String[] strings = org.apache.commons.lang3.StringUtils.substringsBetween(subString, ":\"", "\""); + if (strings == null || strings.length == 0) { + return null; + } + String str0 = strings[0]; + if (org.apache.commons.lang3.StringUtils.isBlank(str0)) { + return null; + } + String encryptStr = null; + try { + encryptStr = AesUtils.encrypt(str0, encryKey); + } catch (MalformedURLException e) { + e.printStackTrace(); + } catch (Exception e) { + e.printStackTrace(); + } + if (org.apache.commons.lang3.StringUtils.isBlank(encryptStr)) { + return null; + } + return org.apache.commons.lang3.StringUtils.replace(str, str0, encryptStr); + } + + /** + * 获取参数 + * + * @param args + * @return + */ + public static List args(Object[] args) { + if (args == null) { + return null; + } + List objects = new ArrayList<>(); + for (int i = 0; i < args.length; i++) { + if (args[i] == null) { + objects.add(null); + } else { + String packageName; + if (args[i] instanceof Object[]) { + packageName = args[i].getClass().getClass().getPackage().getName(); + } else { + packageName = args[i].getClass().getPackage().getName(); + } + boolean flag = (packageName.startsWith("java.lang") || packageName.startsWith("java.util") || packageName.startsWith("com.hashtech")) + && !(args[i] instanceof HttpServletRequestWrapper); + if (flag) { + objects.add(args[i]); + } else { + objects.add(args[i] != null ? args[i].getClass().getName() : "NULL"); + } + } + } + return objects; + } + + /** + * 加密字符串 + * + * @param jsonString + * @param encrypts + * @return + */ + public static String encrypt(String jsonString, String[] encrypts, String encryKey) { + for (int i = 0; i < encrypts.length; i++) { + String encrypt = encrypt(jsonString, encrypts[i], encryKey); + if (org.apache.commons.lang3.StringUtils.isNotBlank(encrypt)) { + return encrypt; + } + } + return jsonString; + } + + /** + * 获取注解的方法 + * + * @param pjp + * @return + * @throws NoSuchMethodException + * @throws SecurityException + */ + public static Method getCurrentMethod(ProceedingJoinPoint pjp) throws NoSuchMethodException, SecurityException { + MethodSignature methodSignature = (MethodSignature) pjp.getSignature(); + return methodSignature.getMethod(); + } + + + /** + * 根据loggerName,获取Logger对象 + * + * @param loggerName + * @return + */ + public static Logger getLogger(String loggerName) { + if (LOGGERS.containsKey(loggerName)) { + return LOGGERS.get(loggerName); + } else { + synchronized (loggerName) { + Logger log = LoggerFactory.getLogger(loggerName); + LOGGERS.put(loggerName, log); + return log; + } + } + } + + public static String encrypt(String str, String encryKey) { + String encryptStr = null; + try { + encryptStr = AesUtils.encrypt(str, encryKey); + } catch (MalformedURLException e) { + e.printStackTrace(); + } catch (Exception e) { + e.printStackTrace(); + } + return encryptStr; + } +} diff --git a/itools-core/itools-common/src/main/java/com/itools/core/log/Logable.java b/itools-core/itools-common/src/main/java/com/itools/core/log/Logable.java new file mode 100644 index 0000000000000000000000000000000000000000..13c77977f70b7a8c763c2c7cd1d16b2ae86eee29 --- /dev/null +++ b/itools-core/itools-common/src/main/java/com/itools/core/log/Logable.java @@ -0,0 +1,63 @@ +package com.itools.core.log; + +import org.springframework.core.Ordered; +import org.springframework.core.annotation.Order; + +import java.lang.annotation.*; + +@Target({ElementType.METHOD}) +@Retention(RetentionPolicy.RUNTIME) +@Documented +@Order(Ordered.HIGHEST_PRECEDENCE) +public @interface Logable { + String loggerName() default "monitor"; + + String businessTag() default ""; + + Format format() default Format.TEXT; + + Level level() default Level.INFO; + + String errorCode() default ""; + + boolean outputArgs() default true; + + int[] ignoreOutputArgsIndex() default {}; + + boolean outputResult() default true; + + boolean outputError() default true; + + boolean encrypt() default false; + + int[] encryptArgsIndex() default {}; + + boolean showAll() default false; + /* + * 该方法是否是入口,对于Request=null时,如果指定该方法为入口,则在该方法处生成transactionNo,多用在JOB中 + * transacionNo是用于跟踪一个调用栈的 + */ + boolean isEntrance() default false; + + /** + * 如果是查询类方法,不需要输出响应值,可设置为QUERY,则日志记录中不会记录其响应内容,避免大规模查询(例如界面的查询批量订单) + * 输出过多无用日志 + * @return + */ + MethodType methodType() default MethodType.ACTION; + + enum Format { + JSON, + TEXT + } + + enum MethodType { + QUERY, + ACTION + } + + enum Level { + INFO, + DEBUG + } +} diff --git a/itools-core/itools-common/src/main/java/com/itools/core/log/ServerEnv.java b/itools-core/itools-common/src/main/java/com/itools/core/log/ServerEnv.java new file mode 100644 index 0000000000000000000000000000000000000000..0c244c991475dc6cf84b9e6b5f84346c1b70cbcf --- /dev/null +++ b/itools-core/itools-common/src/main/java/com/itools/core/log/ServerEnv.java @@ -0,0 +1,29 @@ +package com.itools.core.log; + +import org.springframework.boot.web.context.WebServerInitializedEvent; +import org.springframework.context.ApplicationListener; +import org.springframework.stereotype.Component; + +import java.net.InetAddress; + +@Component +public class ServerEnv implements ApplicationListener { + private int serverPort; + + @Override + public void onApplicationEvent(WebServerInitializedEvent event) { + this.serverPort = event.getWebServer().getPort(); + } + + public int getServerPort() { + return this.serverPort; + } + + public String getServerIp() { + try { + return InetAddress.getLocalHost().getHostAddress(); + } catch (Exception e) { + return "0.0.0.0"; + } + } +} diff --git a/itools-core/itools-common/src/main/java/com/itools/core/log/UserInfo.java b/itools-core/itools-common/src/main/java/com/itools/core/log/UserInfo.java new file mode 100644 index 0000000000000000000000000000000000000000..9ab11d5fd3222983ff4eedcc76790ae0a0b6cab4 --- /dev/null +++ b/itools-core/itools-common/src/main/java/com/itools/core/log/UserInfo.java @@ -0,0 +1,57 @@ +package com.itools.core.log; + +import org.springframework.web.context.request.RequestAttributes; +import org.springframework.web.context.request.RequestContextHolder; +import org.springframework.web.context.request.ServletRequestAttributes; + +import javax.servlet.http.HttpServletRequest; + +/** + * 描述 :用户信息 + * + * @author lidab + * @date 2017/11/15. + */ +public class UserInfo { + String userId; + String userType; + + public String getUserId() { + return userId; + } + + public void setUserId(String userId) { + this.userId = userId; + } + + public String getUserType() { + return userType; + } + + public void setUserType(String userType) { + this.userType = userType; + } + + /** + * 获取用户信息 + * + * @return + */ + public static UserInfo getUserInfo() { + String userId = "NONE"; + String userType = "NONE"; + RequestAttributes requestAttributes = RequestContextHolder.getRequestAttributes(); + if (requestAttributes != null) { + HttpServletRequest request = ((ServletRequestAttributes) requestAttributes).getRequest(); + if (request != null) { + userId = request.getHeader(Constants.HeadKey.USERID.code) == null ? "NONE" : request.getHeader(Constants.HeadKey.USERID.code); + userType = request.getHeader(Constants.HeadKey.USERTYPE.code) == null ? "NONE" : request.getHeader(Constants.HeadKey.USERTYPE.code); + } + } + UserInfo userInfo = new UserInfo(); + userInfo.setUserId(userId); + userInfo.setUserType(userType); + return userInfo; + } + +} diff --git a/itools-core/itools-common/src/main/java/com/itools/core/session/BusinessSessionContextHolder.java b/itools-core/itools-common/src/main/java/com/itools/core/session/BusinessSessionContextHolder.java new file mode 100644 index 0000000000000000000000000000000000000000..2ad2f5b6ee5b0d933ac0d42b3d628fc9cad9ee45 --- /dev/null +++ b/itools-core/itools-common/src/main/java/com/itools/core/session/BusinessSessionContextHolder.java @@ -0,0 +1,39 @@ +package com.itools.core.session; + +/** + * @description: + * @author: XUCHANG + * @time: 2019/12/4 10:51 + */ +public final class BusinessSessionContextHolder { + + /** + * 线程本地变量缓存session + */ + private ThreadLocal sessionObject = new ThreadLocal<>(); + + /** + * 获取session信息 + * + * @return session会话信息 + */ + public BusinessSessionObject getSession() { + return sessionObject.get(); + } + + /** + * 设置session信息 + * + * @param businessSessionObject session会话信息 + */ + public void putSession(BusinessSessionObject businessSessionObject) { + this.sessionObject.set(businessSessionObject); + } + + /** + * 清空session信息 + */ + public void clearSession() { + this.sessionObject.remove(); + } +} diff --git a/itools-core/itools-common/src/main/java/com/itools/core/session/BusinessSessionObject.java b/itools-core/itools-common/src/main/java/com/itools/core/session/BusinessSessionObject.java new file mode 100644 index 0000000000000000000000000000000000000000..913b7c3160f75ce18da296b50b62ee8eef52887c --- /dev/null +++ b/itools-core/itools-common/src/main/java/com/itools/core/session/BusinessSessionObject.java @@ -0,0 +1,92 @@ +package com.itools.core.session; + +import com.itools.core.context.CompanyContext; +import com.itools.core.context.UserContext; +import org.springframework.util.Assert; + +import java.io.Serializable; +import java.util.Date; + +/** + * @description: + * @author: XUCHANG + * @time: 2019/12/4 10:51 + */ +public final class BusinessSessionObject implements Serializable { + private static final long serialVersionUID = -5960069764782340892L; + + /** + * 应用编号 + */ + private String applicationId; + + /** + * 请求时间 + */ + private Date callTime; + + /** + * 用户信息 + */ + private UserContext user; + + /** + * 企业信息 + */ + private CompanyContext company; + + /** + * 构造函数 + * + * @param values 会话数据 + */ + public BusinessSessionObject(String[] values) { + + Assert.notNull(values, "values is not null"); + if (values.length != 4) { + throw new IllegalArgumentException("values is not vaild"); + } + + this.user = new UserContext(); + this.company = new CompanyContext(); + + this.user.setCaller(values[0]); + this.user.setCallerName(values[2]); + this.company.setCompanyId(values[1]); + + this.setApplicationId(values[3]); + this.setCallTime(new Date()); + } + + public String getApplicationId() { + return applicationId; + } + + public void setApplicationId(String applicationId) { + this.applicationId = applicationId; + } + + public Date getCallTime() { + return callTime; + } + + public void setCallTime(Date callTime) { + this.callTime = callTime; + } + + public UserContext getUser() { + return user; + } + + public void setUser(UserContext user) { + this.user = user; + } + + public CompanyContext getCompany() { + return company; + } + + public void setCompany(CompanyContext company) { + this.company = company; + } +} diff --git a/itools-core/itools-common/src/main/java/com/itools/core/snowflake/SequenceService.java b/itools-core/itools-common/src/main/java/com/itools/core/snowflake/SequenceService.java new file mode 100644 index 0000000000000000000000000000000000000000..f855b83c974709c5c599c84ca394a16c62f6d11a --- /dev/null +++ b/itools-core/itools-common/src/main/java/com/itools/core/snowflake/SequenceService.java @@ -0,0 +1,25 @@ +package com.itools.core.snowflake; + +/** + * 描述 :序列服务类 + * @author xuchang + */ +public interface SequenceService { + + /** + * 根据分类,获取序列 + * + * @param category 分类 + * @return Sequence对象 + */ + public Long nextValue(String category); + + /** + * 如果大于maxValue,则会取整除maxValue后的余数 + * @param category + * @param maxValue + * @return + */ + public Long nextValue(String category, Long maxValue); + +} diff --git a/itools-core/itools-common/src/main/java/com/itools/core/snowflake/config/EnableSequenceService.java b/itools-core/itools-common/src/main/java/com/itools/core/snowflake/config/EnableSequenceService.java new file mode 100644 index 0000000000000000000000000000000000000000..fda1cb63e08a69f9f7bcb1690c471e53742fd342 --- /dev/null +++ b/itools-core/itools-common/src/main/java/com/itools/core/snowflake/config/EnableSequenceService.java @@ -0,0 +1,14 @@ +package com.itools.core.snowflake.config; + +import org.springframework.context.annotation.Import; + +import java.lang.annotation.*; + + +@Documented +@Target(ElementType.TYPE) +@Retention(RetentionPolicy.RUNTIME) +@Import(SequenceAutoConfiguration.class) +public @interface EnableSequenceService { + +} diff --git a/itools-core/itools-common/src/main/java/com/itools/core/snowflake/config/SequenceAutoConfiguration.java b/itools-core/itools-common/src/main/java/com/itools/core/snowflake/config/SequenceAutoConfiguration.java new file mode 100644 index 0000000000000000000000000000000000000000..643dbb8ccba2da041f9dd19772835f7ac337ecef --- /dev/null +++ b/itools-core/itools-common/src/main/java/com/itools/core/snowflake/config/SequenceAutoConfiguration.java @@ -0,0 +1,81 @@ +package com.itools.core.snowflake.config; + + +import com.itools.core.snowflake.impl.*; +import com.itools.core.snowflake.SequenceService; +import com.xuchang.itools.snowflake.impl.*; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty; +import org.springframework.boot.context.properties.EnableConfigurationProperties; +import org.springframework.context.annotation.Bean; +import org.springframework.context.annotation.Lazy; +import org.springframework.context.annotation.Primary; +import org.springframework.data.redis.core.RedisTemplate; + +/** + * ClassName: SequenceAutoConfiguration
+ * Description: sequence自动装配 + * Date: 2019/03/08 11:07 + */ +@EnableConfigurationProperties({SequenceProperties.class}) +//@AutoConfigureAfter(PageHelperAutoConfiguration.class) +public class SequenceAutoConfiguration { + + /** + * simple获取节点 + */ + private static final String GENERATE_TYPE_SIMPLE = "simple"; + + /** + * 随机获取节点 + */ + private static final String GENERATE_TYPE_RANDOM = "random"; + + /** + * mac地址获取节点 + */ + private static final String GENERATE_TYPE_MAC = "mac"; + + @Autowired + private SequenceProperties properties; + + @Lazy + @Autowired + private RedisTemplate redisTemplate; + + @Primary + @Bean + @ConditionalOnProperty( + prefix = "sequence", + name = "type", + havingValue = "snowflake") + public SequenceService snowFlakeService(WorkNodeGenerate workNodeGenerate) { + if(redisTemplate == null){ + throw new IllegalStateException("Snowflake sequence service need RedisTemplate bean."); + } + SnowflakeSequenceService snowflakeSequenceService = new SnowflakeSequenceService(); + snowflakeSequenceService.setRedisTemplate(redisTemplate); + snowflakeSequenceService.setWorkNodeGenerate(workNodeGenerate); + return snowflakeSequenceService; + } + + + @Bean + @ConditionalOnProperty( + prefix = "sequence", + name = "type", + havingValue = "snowflake") + public WorkNodeGenerate workNodeGenerate() { + String generate = properties.getGenerate(); + if (GENERATE_TYPE_RANDOM.equals(generate)) { + return new RandomNodeGenerate(); + } else if (GENERATE_TYPE_SIMPLE.equals(generate)) { + return new SimpleNodeGenerate(); + } else if (GENERATE_TYPE_MAC.equals(generate)) { + return new MacNodeGenerate(); + } + return new RandomNodeGenerate(); + } + + +} diff --git a/itools-core/itools-common/src/main/java/com/itools/core/snowflake/config/SequenceProperties.java b/itools-core/itools-common/src/main/java/com/itools/core/snowflake/config/SequenceProperties.java new file mode 100644 index 0000000000000000000000000000000000000000..de28c221e3df0767cbdaeb42dfd8ffc0f2b3c8e0 --- /dev/null +++ b/itools-core/itools-common/src/main/java/com/itools/core/snowflake/config/SequenceProperties.java @@ -0,0 +1,50 @@ +package com.itools.core.snowflake.config; + +import org.springframework.boot.context.properties.ConfigurationProperties; + +/** + * ClassName: SequenceProperties
+ * Description: sequence配置 + * Date: 2019/03/08 11:07 + */ +@ConfigurationProperties( + prefix = "sequence" +) +public class SequenceProperties { + + private boolean enable = true; + + /** + * default, snowflake + */ + private String type; + + /** + * mac, random, simple + */ + private String generate; + + public boolean isEnable() { + return enable; + } + + public void setEnable(boolean enable) { + this.enable = enable; + } + + public String getType() { + return type; + } + + public void setType(String type) { + this.type = type; + } + + public String getGenerate() { + return generate; + } + + public void setGenerate(String generate) { + this.generate = generate; + } +} diff --git a/itools-core/itools-common/src/main/java/com/itools/core/snowflake/impl/ClusterNode.java b/itools-core/itools-common/src/main/java/com/itools/core/snowflake/impl/ClusterNode.java new file mode 100644 index 0000000000000000000000000000000000000000..43dcfb255e71f40078d2ba5fc33d30f045430fef --- /dev/null +++ b/itools-core/itools-common/src/main/java/com/itools/core/snowflake/impl/ClusterNode.java @@ -0,0 +1,42 @@ +package com.itools.core.snowflake.impl; + +/** + * ClassName: ClusterNode
+ * Description: sequence服务分布式节点 + * Date: 2019/03/08 11:07 + * + * @author xuchang + */ +public class ClusterNode { + + /** + * 机房id + */ + private int centerId; + + /** + * 机器id + */ + private int workId; + + public ClusterNode(int centerId, int workId) { + this.centerId = centerId; + this.workId = workId; + } + + public int getCenterId() { + return centerId; + } + + public void setCenterId(int centerId) { + this.centerId = centerId; + } + + public int getWorkId() { + return workId; + } + + public void setWorkId(int workId) { + this.workId = workId; + } +} diff --git a/itools-core/itools-common/src/main/java/com/itools/core/snowflake/impl/MacNodeGenerate.java b/itools-core/itools-common/src/main/java/com/itools/core/snowflake/impl/MacNodeGenerate.java new file mode 100644 index 0000000000000000000000000000000000000000..d5945287bc789ea55653f91d7a72394d816ff2a6 --- /dev/null +++ b/itools-core/itools-common/src/main/java/com/itools/core/snowflake/impl/MacNodeGenerate.java @@ -0,0 +1,153 @@ +package com.itools.core.snowflake.impl; + +import com.alibaba.fastjson.JSON; +import com.alibaba.fastjson.JSONObject; +import com.itools.core.utils.NetworkUtils; +import org.springframework.data.redis.core.RedisTemplate; +import org.springframework.util.StringUtils; + +import java.net.NetworkInterface; +import java.util.Iterator; +import java.util.Map; +import java.util.Set; +import java.util.concurrent.TimeUnit; + +/** + * ClassName: MacNodeGenerate
+ * Description: 分布式节点唯一编号按照机器man地址获取 + * 每个应用单独部署一台机器时使用,可保证获取到的workid不重复 + */ +public class MacNodeGenerate implements WorkNodeGenerate { + + /** redis work id hash key*/ + private static final String SNOW_FLAKE_WORK_ID_KEY = "SNOW_FLAKE_WORK::ID::KEY"; + + /** redis lock time out 5 seconds*/ + private static final int LOCK_TIMEOUT = 5; + + /** + * 机器id所占的位数 + */ + private final int workerIdBits = 5; + + /** 最大机器节点数 31 理论支持31*31台机器*/ + private final Integer MAX_NODE_ID = ~(-1 << workerIdBits); + + /** 最小节点编号 */ + private final Integer MIN_NODE_ID = 0; + + /** redis lock hash key*/ + private static String SNOW_FLAKE_KEY_LOCK; + + static { + SNOW_FLAKE_KEY_LOCK = SNOW_FLAKE_WORK_ID_KEY + "::LOCK"; + } + + @Override + public ClusterNode generate(RedisTemplate redisTemplate) { + return getClusterNode(getServer(), redisTemplate); + } + + @Override + public boolean release(RedisTemplate redisTemplate, ClusterNode node) { + return true; + } + + private ClusterNode getClusterNode(String server, RedisTemplate redisTemplate) { + if (!StringUtils.hasText(server)) { + throw new IllegalArgumentException("server can not be null."); + } else if (redisTemplate.opsForHash().hasKey(SNOW_FLAKE_WORK_ID_KEY, server)) { + Object value = redisTemplate.opsForHash().get(SNOW_FLAKE_WORK_ID_KEY, server); + return JSONObject.parseObject(value.toString(), ClusterNode.class); + } else { + return getNewClusterNode(server, redisTemplate); + } + } + + private ClusterNode getMaxClusterNode(Map entries) { + ClusterNode maxNode = null; + for (Map.Entry entry : entries.entrySet()) { + ClusterNode its = JSONObject.parseObject(entry.getValue().toString(), ClusterNode.class); + if (null == maxNode) { + maxNode = its; + } else if (maxNode.getCenterId() < its.getCenterId()) { + maxNode = its; + } else if (maxNode.getCenterId() == its.getCenterId() && maxNode.getWorkId() < its.getWorkId()) { + maxNode = its; + } + } + + return maxNode; + } + + private ClusterNode getNextClusterNode(Map entries) { + ClusterNode maxNode = getMaxClusterNode(entries); + int centerId = maxNode.getCenterId(); + int workId = maxNode.getWorkId() + 1; + if (workId > MAX_NODE_ID) { + ++centerId; + if (centerId > MAX_NODE_ID) { + throw new IllegalStateException("CenterId max."); + } + + workId = MIN_NODE_ID; + } + + return new ClusterNode(centerId, workId); + } + + private ClusterNode getNewClusterNode(String server, RedisTemplate redisTemplate) { + if (!lock(redisTemplate, server, LOCK_TIMEOUT)) { + throw new IllegalStateException("lock timeout from redis server."); + } else { + Map entries = redisTemplate.opsForHash().entries(SNOW_FLAKE_WORK_ID_KEY); + ClusterNode nextNode; + if (entries != null && !entries.isEmpty()) { + nextNode = getNextClusterNode(entries); + } else { + nextNode = new ClusterNode(MIN_NODE_ID, MIN_NODE_ID); + } + + redisTemplate.opsForHash().put(SNOW_FLAKE_WORK_ID_KEY, server, JSON.toJSONString(nextNode)); + return nextNode; + } + } + + private boolean lock(RedisTemplate redisTemplate, String server, Integer maxTimeout) { + boolean ret; + while (true) { + ret = redisTemplate.opsForHash().putIfAbsent(SNOW_FLAKE_KEY_LOCK, server, Long.toString(System.currentTimeMillis())); + if (ret) { + redisTemplate.expire(SNOW_FLAKE_KEY_LOCK, LOCK_TIMEOUT, TimeUnit.SECONDS); + return true; + } + + try { + TimeUnit.SECONDS.sleep(LOCK_TIMEOUT); + } catch (InterruptedException e) { + e.printStackTrace(); + } + + Integer waitTime = maxTimeout; + maxTimeout = maxTimeout - 1; + if (waitTime > 0) { + continue; + } + + return false; + } + } + + private String getServer() { + Set networkInterfaceSet = NetworkUtils.getNICs(NetworkUtils.Filter.PHYSICAL_ONLY, NetworkUtils.Filter.UP); + Iterator it = networkInterfaceSet.iterator(); + String mac = ""; + while (it.hasNext()) { + mac = NetworkUtils.getMacAddress(it.next(), "-"); + if (StringUtils.hasText(mac)) { + break; + } + } + return mac.toUpperCase(); + } +} diff --git a/itools-core/itools-common/src/main/java/com/itools/core/snowflake/impl/RandomNodeGenerate.java b/itools-core/itools-common/src/main/java/com/itools/core/snowflake/impl/RandomNodeGenerate.java new file mode 100644 index 0000000000000000000000000000000000000000..af44815d561a88deca18c633e7d34c01709364d9 --- /dev/null +++ b/itools-core/itools-common/src/main/java/com/itools/core/snowflake/impl/RandomNodeGenerate.java @@ -0,0 +1,139 @@ +package com.itools.core.snowflake.impl; + +import org.springframework.data.redis.core.RedisTemplate; + +import java.util.Set; +import java.util.concurrent.TimeUnit; + +/** + * ClassName: RandomNodeGenerate
+ * Description:使用一个set维护datacenter, 使用set维护每一个datacenter的work list + *

+ * 每个机器多个应用时使用,可用于容器,不能根据id反查workid,因为workid会变 + */ +public class RandomNodeGenerate implements WorkNodeGenerate { + + /** + * 机器id所占的位数 + */ + private final int workerIdBits = 5; + + /** + * 最大机器节点数 31 理论支持31*31台机器 + */ + private final Integer MAX_NODE_ID = ~(-1 << workerIdBits); + + /** + * 最小节点编号 + */ + private final Integer MIN_NODE_ID = 0; + + private static String DATA_CENTER_KEY = "DATA_CENTER_KEY"; + + private static String WORK_ID_KEY_PREFIXX = "WORK_ID_KEY::"; + + private static String SNOW_FLAKE_KEY_LOCK; + + private static String SNOW_FLAKE_KEY_LOCK_VALUE; + + /** redis lock time out 5 seconds*/ + private static final int LOCK_TIMEOUT = 5; + + private Integer dataCenterId; + + static { + SNOW_FLAKE_KEY_LOCK = DATA_CENTER_KEY + "::LOCK"; + SNOW_FLAKE_KEY_LOCK_VALUE = SNOW_FLAKE_KEY_LOCK + "::VALUE"; + } + + /** + * 1.先找到可以使用的datacenter(满足work list大小不大于最大节点数即可) + * 2.取到已经找到的datacenter的 work list ,并占位 + * 3.datacenter id , workid + * + * @param redisTemplate + * @return + */ + @Override + public ClusterNode generate(RedisTemplate redisTemplate) { + if (!lock(redisTemplate, LOCK_TIMEOUT)) { + throw new IllegalStateException("lock timeout from redis server."); + }else { + this.dataCenterId = getDatacenterId(redisTemplate); + int workId = getWorkId(redisTemplate, dataCenterId); + return new ClusterNode(dataCenterId, workId); + } + } + + @Override + public boolean release(RedisTemplate redisTemplate, ClusterNode node) { + int datacenterId = node.getCenterId(); + int workId = node.getWorkId(); + return redisTemplate.opsForSet().remove(WORK_ID_KEY_PREFIXX + datacenterId, workId) == workId; + } + + private int getDatacenterId(RedisTemplate redisTemplate) { + Set set = redisTemplate.opsForSet().members(DATA_CENTER_KEY); + if (set == null || set.isEmpty()) { + redisTemplate.opsForSet().add(DATA_CENTER_KEY, MIN_NODE_ID); + return MIN_NODE_ID; + } + + for (int i = 0; i <= MAX_NODE_ID; i++) { + if (!set.contains(i)) { + redisTemplate.opsForSet().add(DATA_CENTER_KEY, i); + return i; + } else { + Set workSet = redisTemplate.opsForSet().members(WORK_ID_KEY_PREFIXX + i); + if (workSet == null || workSet.isEmpty() || workSet.size() <= MAX_NODE_ID) { + return i; + } + } + } + + throw new IllegalStateException("have no left datacenter."); + } + + private int getWorkId(RedisTemplate redisTemplate, int datacenterId) { + Set workSet = redisTemplate.opsForSet().members(WORK_ID_KEY_PREFIXX + datacenterId); + + if (workSet == null || workSet.isEmpty()) { + redisTemplate.opsForSet().add(WORK_ID_KEY_PREFIXX + datacenterId, MIN_NODE_ID); + return MIN_NODE_ID; + } + + for (int i = 0; i <= MAX_NODE_ID; i++) { + if (!workSet.contains(i)) { + redisTemplate.opsForSet().add(WORK_ID_KEY_PREFIXX + datacenterId, i); + return i; + } + } + this.dataCenterId = getDatacenterId(redisTemplate); + return getWorkId(redisTemplate, dataCenterId); + } + + private boolean lock(RedisTemplate redisTemplate , Integer maxTimeout) { + boolean ret; + while (true) { + ret = redisTemplate.opsForHash().putIfAbsent(SNOW_FLAKE_KEY_LOCK, SNOW_FLAKE_KEY_LOCK_VALUE, Long.toString(System.currentTimeMillis())); + if (ret) { + redisTemplate.expire(SNOW_FLAKE_KEY_LOCK, LOCK_TIMEOUT, TimeUnit.SECONDS); + return true; + } + + try { + TimeUnit.SECONDS.sleep(LOCK_TIMEOUT); + } catch (InterruptedException e) { + e.printStackTrace(); + } + + Integer waitTime = maxTimeout; + maxTimeout = maxTimeout - 1; + if (waitTime > 0) { + continue; + } + + return false; + } + } +} diff --git a/itools-core/itools-common/src/main/java/com/itools/core/snowflake/impl/SimpleNodeGenerate.java b/itools-core/itools-common/src/main/java/com/itools/core/snowflake/impl/SimpleNodeGenerate.java new file mode 100644 index 0000000000000000000000000000000000000000..c0377b6b3f41d216e0926e4da8556199553e024c --- /dev/null +++ b/itools-core/itools-common/src/main/java/com/itools/core/snowflake/impl/SimpleNodeGenerate.java @@ -0,0 +1,22 @@ +package com.itools.core.snowflake.impl; + +import org.springframework.data.redis.core.RedisTemplate; + +/** + * ClassName: SimpleNodeGenerate
+ * Description:非分布式环境使用 + * Date: 2019/03/08 11:07 + * @author xuchang + */ +public class SimpleNodeGenerate implements WorkNodeGenerate { + + @Override + public ClusterNode generate(RedisTemplate redisTemplate) { + return new ClusterNode(0, 0); + } + + @Override + public boolean release(RedisTemplate redisTemplate, ClusterNode node) { + return true; + } +} diff --git a/itools-core/itools-common/src/main/java/com/itools/core/snowflake/impl/SnowFlakeIdWorker.java b/itools-core/itools-common/src/main/java/com/itools/core/snowflake/impl/SnowFlakeIdWorker.java new file mode 100644 index 0000000000000000000000000000000000000000..e5d3c38837c24f33a3e08f3c97a650bea288cd1d --- /dev/null +++ b/itools-core/itools-common/src/main/java/com/itools/core/snowflake/impl/SnowFlakeIdWorker.java @@ -0,0 +1,146 @@ +package com.itools.core.snowflake.impl; + +/** + * ClassName: SnowFlakeIdWorker
+ * Description: snowFlake算法 + * @author xuchang + */ +public class SnowFlakeIdWorker { + + /** + * 开始时间截 (2019-01-01) + */ + private final long twepoch = 1420041600000L; + + /** + * 机器id所占的位数 + */ + private final long workerIdBits = 5L; + + /** + * 数据标识id所占的位数 + */ + private final long datacenterIdBits = 5L; + + /** + * 支持的最大机器id,结果是31 (这个移位算法可以很快的计算出几位二进制数所能表示的最大十进制数) + */ + private final long maxWorkerId = -1L ^ (-1L << workerIdBits); + + /** + * 支持的最大数据标识id,结果是31 + */ + private final long maxDatacenterId = -1L ^ (-1L << datacenterIdBits); + + /** + * 序列在id中占的位数 + */ + private final long sequenceBits = 12L; + + /** + * 机器ID向左移12位 + */ + private final long workerIdShift = sequenceBits; + + /** + * 数据标识id向左移17位(12+5) + */ + private final long datacenterIdShift = sequenceBits + workerIdBits; + + /** + * 时间截向左移22位(5+5+12) + */ + private final long timestampLeftShift = sequenceBits + workerIdBits + datacenterIdBits; + + /** + * 生成序列的掩码,这里为4095 (0b111111111111=0xfff=4095) + */ + private final long sequenceMask = -1L ^ (-1L << sequenceBits); + + /** + * 工作机器ID(0~31) + */ + private long workerId; + + /** + * 数据中心ID(0~31) + */ + private long datacenterId; + + /** + * 毫秒内序列(0~4095) + */ + private long sequence = 0L; + + /** + * 上次生成ID的时间截 + */ + private long lastTimestamp = -1L; + + public SnowFlakeIdWorker(long workerId, long datacenterId) { + if (workerId > maxWorkerId || workerId < 0) { + throw new IllegalArgumentException(String.format("worker Id can't be greater than %d or less than 0", maxWorkerId)); + } + if (datacenterId > maxDatacenterId || datacenterId < 0) { + throw new IllegalArgumentException(String.format("datacenter Id can't be greater than %d or less than 0", maxDatacenterId)); + } + this.workerId = workerId; + this.datacenterId = datacenterId; + } + + + /** + * 阻塞到下一个毫秒,直到获得新的时间戳 + * + * @param lastTimestamp 上次生成ID的时间截 + * @return 当前时间戳 + */ + protected long tilNextMillis(long lastTimestamp) { + long timestamp = timeGen(); + while (timestamp <= lastTimestamp) { + timestamp = timeGen(); + } + return timestamp; + } + + /** + * 返回以毫秒为单位的当前时间 + * + * @return 当前时间(毫秒) + */ + protected long timeGen() { + return System.currentTimeMillis(); + } + + public synchronized Long nextValue() { + long timestamp = timeGen(); + + //如果当前时间小于上一次ID生成的时间戳,说明系统时钟回退过这个时候 + //等待时间 + if (timestamp < lastTimestamp) { + throw new RuntimeException( + String.format("Clock moved backwards. Refusing to generate id for %d milliseconds", lastTimestamp - timestamp)); + } + + //如果是同一时间生成的,则进行毫秒内序列 + if (lastTimestamp == timestamp) { + sequence = (sequence + 1) & sequenceMask; + //毫秒内序列溢出 + if (sequence == 0) { + //阻塞到下一个毫秒,获得新的时间戳 + timestamp = tilNextMillis(lastTimestamp); + } + } + //时间戳改变,毫秒内序列重置 + else { + sequence = 0L; + } + + //上次生成ID的时间截 + lastTimestamp = timestamp; + + //移位并通过或运算拼到一起组成64位的ID + return ((timestamp - twepoch) << timestampLeftShift) | (datacenterId << datacenterIdShift) | (workerId << workerIdShift) | sequence; + } + +} diff --git a/itools-core/itools-common/src/main/java/com/itools/core/snowflake/impl/SnowflakeSequenceService.java b/itools-core/itools-common/src/main/java/com/itools/core/snowflake/impl/SnowflakeSequenceService.java new file mode 100644 index 0000000000000000000000000000000000000000..8cacf14a54f32afc9a10f285236149aedb7dc079 --- /dev/null +++ b/itools-core/itools-common/src/main/java/com/itools/core/snowflake/impl/SnowflakeSequenceService.java @@ -0,0 +1,65 @@ +package com.itools.core.snowflake.impl; + +import com.itools.core.snowflake.SequenceService; +import org.springframework.data.redis.core.RedisTemplate; +import org.springframework.stereotype.Service; + +import javax.annotation.PostConstruct; +import javax.annotation.PreDestroy; + +/** + * ClassName: SnowflakeSequenceService
+ * Description: 基于snowFlake算法实现序列号生成 + * @author xuchang + */ +@Service +public class SnowflakeSequenceService implements SequenceService { + + /** 最小节点编号 */ + private final Integer MIN_NODE_ID = 0; + + /** id worker*/ + private SnowFlakeIdWorker idWorker; + + /** redis client*/ + private RedisTemplate redisTemplate; + + private WorkNodeGenerate workNodeGenerate; + + private ClusterNode node; + + public void setRedisTemplate(RedisTemplate redisTemplate) { + this.redisTemplate = redisTemplate; + } + + public void setWorkNodeGenerate(WorkNodeGenerate workNodeGenerate) { + this.workNodeGenerate = workNodeGenerate; + } + + @PostConstruct + public void init() { + if (null == redisTemplate) { + this.idWorker = new SnowFlakeIdWorker(MIN_NODE_ID, MIN_NODE_ID); + } else { + node = workNodeGenerate.generate(redisTemplate); + this.idWorker = new SnowFlakeIdWorker(node.getWorkId(), node.getCenterId()); + } + } + + @Override + public Long nextValue(String category) { + return idWorker.nextValue(); + } + + @Override + public Long nextValue(String category, Long maxValue) { + return idWorker.nextValue(); + } + + @PreDestroy + public void destroy(){ + if(node != null){ + workNodeGenerate.release(redisTemplate, node); + } + } +} diff --git a/itools-core/itools-common/src/main/java/com/itools/core/snowflake/impl/WorkNodeGenerate.java b/itools-core/itools-common/src/main/java/com/itools/core/snowflake/impl/WorkNodeGenerate.java new file mode 100644 index 0000000000000000000000000000000000000000..1335129c514998ebf06d4ba70a9f03b4abe732e4 --- /dev/null +++ b/itools-core/itools-common/src/main/java/com/itools/core/snowflake/impl/WorkNodeGenerate.java @@ -0,0 +1,31 @@ +package com.itools.core.snowflake.impl; + +import org.springframework.data.redis.core.RedisTemplate; + +/** + * ClassName: WorkNodeGenerate
+ * Description: 分布式环境获取节点 + * Date: 2019/03/08 11:07 + * + * @author xuchang + */ +public interface WorkNodeGenerate { + + /** + * 生成节点 + * + * @param redisTemplate + * @return + */ + ClusterNode generate(RedisTemplate redisTemplate); + + /** + * 释放节点 + *

+ * 根据datacenter id 取到 worklist, 并从list removce workid + * + * @param node + * @return + */ + boolean release(RedisTemplate redisTemplate, ClusterNode node); +} diff --git a/itools-core/itools-common/src/main/java/com/itools/core/snowflake/package-info.java b/itools-core/itools-common/src/main/java/com/itools/core/snowflake/package-info.java new file mode 100644 index 0000000000000000000000000000000000000000..e7b7a227b6441fb46fb441cb924019737619922c --- /dev/null +++ b/itools-core/itools-common/src/main/java/com/itools/core/snowflake/package-info.java @@ -0,0 +1,12 @@ +/** + * 集成分布式雪花算法 + * 容器启动加入@EnableSequenceService + * 使用结合SequenceService + * + * ###sequence 服务 ### + * sequence: + * enable: true + * type: snowflake + * generate: simple + */ +package com.itools.core.snowflake; \ No newline at end of file diff --git a/itools-core/itools-common/src/main/java/com/itools/core/system/AbstractService.java b/itools-core/itools-common/src/main/java/com/itools/core/system/AbstractService.java new file mode 100644 index 0000000000000000000000000000000000000000..42f13d294efe691fd10c257546a56f5968c96688 --- /dev/null +++ b/itools-core/itools-common/src/main/java/com/itools/core/system/AbstractService.java @@ -0,0 +1,30 @@ +package com.itools.core.system; + +import com.itools.core.code.SystemCodeService; +import com.itools.core.snowflake.SequenceService; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.springframework.beans.factory.annotation.Autowired; + +/** + * @project: iTools + * @description: + * @author: XUCHANG + * @create: 2020-09-28 22:56 + */ +public class AbstractService { + protected final Logger logger = LoggerFactory.getLogger(this.getClass()); + @Autowired + private SystemCodeService systemCodeService; + @Autowired + protected SequenceService sequenceService; + + + public String getMessage(String code) { + return this.systemCodeService.getMessage(code); + } + + public String createGeneralCode() { + return String.valueOf(this.sequenceService.nextValue(null)); + } +} \ No newline at end of file diff --git a/itools-core/itools-common/src/main/java/com/itools/core/validate/EnableValidator.java b/itools-core/itools-common/src/main/java/com/itools/core/validate/EnableValidator.java new file mode 100644 index 0000000000000000000000000000000000000000..cb426ad4888938799bf39be446e55221b32c8a46 --- /dev/null +++ b/itools-core/itools-common/src/main/java/com/itools/core/validate/EnableValidator.java @@ -0,0 +1,13 @@ +package com.itools.core.validate; + +import org.springframework.context.annotation.Import; + +import java.lang.annotation.*; + + +@Target(ElementType.TYPE) +@Documented +@Retention(RetentionPolicy.RUNTIME) +@Import(ValidatorConfig.class) +public @interface EnableValidator { +} diff --git a/itools-core/itools-common/src/main/java/com/itools/core/validate/ParamsValidate.java b/itools-core/itools-common/src/main/java/com/itools/core/validate/ParamsValidate.java new file mode 100644 index 0000000000000000000000000000000000000000..50e3636aa73ba463fd9523a569325713f1a84f96 --- /dev/null +++ b/itools-core/itools-common/src/main/java/com/itools/core/validate/ParamsValidate.java @@ -0,0 +1,18 @@ +package com.itools.core.validate; + +import javax.validation.groups.Default; +import java.lang.annotation.*; + + +/** + * @author xuchang + */ +@Target({ElementType.METHOD}) +@Retention(RetentionPolicy.RUNTIME) +@Documented +public @interface ParamsValidate { + + int[] argsIndexs() default {0}; + + Class[] groups() default {Default.class}; +} diff --git a/itools-core/itools-common/src/main/java/com/itools/core/validate/ParamsValidateAspect.java b/itools-core/itools-common/src/main/java/com/itools/core/validate/ParamsValidateAspect.java new file mode 100644 index 0000000000000000000000000000000000000000..52e1a5c68037e338abc094b3ec4f128d04980b02 --- /dev/null +++ b/itools-core/itools-common/src/main/java/com/itools/core/validate/ParamsValidateAspect.java @@ -0,0 +1,101 @@ +package com.itools.core.validate; + + +import com.itools.core.exception.ParamException; +import com.itools.core.code.SystemCodeService; +import org.aspectj.lang.ProceedingJoinPoint; +import org.aspectj.lang.annotation.Around; +import org.aspectj.lang.annotation.Aspect; +import org.aspectj.lang.annotation.Pointcut; +import org.aspectj.lang.reflect.MethodSignature; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Component; + +import javax.validation.ConstraintViolation; +import javax.validation.Validator; +import java.lang.reflect.Method; +import java.util.Set; + + +@Aspect +@Component +public class ParamsValidateAspect { + + /** + * 日志 + */ + private final Logger logger = LoggerFactory.getLogger(getClass()); + + /** + * 参数校验对象 + */ + @Autowired + private Validator validator; + + /** + * 消息源资源对象 + */ + @Autowired + private SystemCodeService systemCodeService; + + /** + * 获取对应编码的信息描述 + * @param code 编码 + * @return + */ + public String getMessage(String code) { + return this.systemCodeService.getMessageOptional(code).orElse("Invalid Parameter"); + } + + /** + * 定义切面,扫描所有service的实现类 + */ + @Pointcut("@annotation(com.itools.core.validate.ParamsValidate)") + public void validatePointcut() {} + + /** + * 使用环绕通知对service实现类的参数进行检查 + * @param joinPoint + * @throws Throwable + */ + @Around("validatePointcut()") + public Object around(ProceedingJoinPoint joinPoint) throws Throwable { + + MethodSignature methodSignature = (MethodSignature) joinPoint.getSignature(); + Method targetMethod = joinPoint.getTarget().getClass().getMethod( + methodSignature.getName(), methodSignature.getParameterTypes()); + + logger.debug("正在对类{}中方法{}进行参数检查", joinPoint.getTarget().getClass().getName(), targetMethod.getName()); + + // 查找带有参数校验的注解 + ParamsValidate paramsValidate = targetMethod.getAnnotation(ParamsValidate.class); + if (paramsValidate == null) { + return joinPoint.proceed(); + } + + // 遍历方法的所有参数,通过注解指定需要检查的索引,逐个检查 + int[] needCheckParamIndexes = paramsValidate.argsIndexs(); + + // 校验分组,如果未设置,使用默认的分组 + Class[] groupsClazz = paramsValidate.groups(); + + Object[] args = joinPoint.getArgs(); + for (int index : needCheckParamIndexes) { + Object arg = args[index]; + + Set> constraintViolationSet = validator.validate(arg, groupsClazz); + if (constraintViolationSet != null && constraintViolationSet.size() > 0) { + for (ConstraintViolation constraintViolation : constraintViolationSet) { + String code = constraintViolation.getMessage(); + throw new ParamException(code, getMessage(code)); + } + } + } + + logger.debug("类{}中方法{}参数检查通过", joinPoint.getTarget().getClass().getName(), targetMethod.getName()); + // 参数检测通过 + return joinPoint.proceed(); + } +} diff --git a/itools-core/itools-common/src/main/java/com/itools/core/validate/ValidatorConfig.java b/itools-core/itools-common/src/main/java/com/itools/core/validate/ValidatorConfig.java new file mode 100644 index 0000000000000000000000000000000000000000..462d939c73e737ebb2e0c5a088c97a7e14c127d1 --- /dev/null +++ b/itools-core/itools-common/src/main/java/com/itools/core/validate/ValidatorConfig.java @@ -0,0 +1,39 @@ +package com.itools.core.validate; + +import org.hibernate.validator.HibernateValidator; +import org.springframework.context.annotation.Bean; +import org.springframework.validation.beanvalidation.MethodValidationPostProcessor; + +import javax.validation.Validation; +import javax.validation.Validator; +import javax.validation.ValidatorFactory; + + +public class ValidatorConfig { + + /** + * 实例化HibernateValidator + * @return Validator + */ + @Bean + public Validator validator() { + ValidatorFactory validatorFactory = Validation + .byProvider(HibernateValidator.class) + .configure().failFast(true) + .buildValidatorFactory(); + + return validatorFactory.getValidator(); + } + + /** + * 默认是普通模式,会返回所有的验证不通过信息集合 + * @return + */ + @Bean + public MethodValidationPostProcessor methodValidationPostProcessor() { + MethodValidationPostProcessor postProcessor = new MethodValidationPostProcessor(); + postProcessor.setValidator(validator()); + return postProcessor; + } +} + diff --git a/itools-core/itools-common/src/main/java/com/itools/core/validate/package-info.java b/itools-core/itools-common/src/main/java/com/itools/core/validate/package-info.java new file mode 100644 index 0000000000000000000000000000000000000000..ae8ff880f0d643269b2039b6a6aec66181c437db --- /dev/null +++ b/itools-core/itools-common/src/main/java/com/itools/core/validate/package-info.java @@ -0,0 +1,4 @@ +/** + * 容器启动需要加注解 + */ +package com.itools.core.validate; \ No newline at end of file diff --git a/itools-core/itools-common/src/main/java/com/itools/core/web/BaseController.java b/itools-core/itools-common/src/main/java/com/itools/core/web/BaseController.java new file mode 100644 index 0000000000000000000000000000000000000000..2d9927febcda0574ff7b52acd35006ab8ea23b15 --- /dev/null +++ b/itools-core/itools-common/src/main/java/com/itools/core/web/BaseController.java @@ -0,0 +1,27 @@ +package com.itools.core.web; + +import org.springframework.web.bind.annotation.ModelAttribute; + +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; +import javax.servlet.http.HttpSession; + + +public class BaseController { + protected HttpServletRequest request; + + protected HttpServletResponse response; + + protected HttpSession session; + + @ModelAttribute + public void setReqAndRes(HttpServletRequest request, HttpServletResponse response) { + + this.request = request; + + this.response = response; + + this.session = request.getSession(); + + } +} diff --git a/itools-core/itools-common/src/main/resources/META-INF/spring-configuration-metadata.json b/itools-core/itools-common/src/main/resources/META-INF/spring-configuration-metadata.json new file mode 100644 index 0000000000000000000000000000000000000000..3cd08cd76e72978eb3b977d61dcd91680caef884 --- /dev/null +++ b/itools-core/itools-common/src/main/resources/META-INF/spring-configuration-metadata.json @@ -0,0 +1,26 @@ +{ + "hints": [], + "groups": [ + { + "sourceType": "com.itools.core.snowflake.config.SequenceProperties", + "name": "sequence", + "type": "com.itools.core.snowflake.config.SequenceProperties" + } + ], + "properties": [ + { + "sourceType": "com.itools.core.snowflake.config.SequenceProperties", + "name": "sequence.type", + "type": "java.lang.String", + "defaultValue": "snowflake", + "description": "sequence type property, have two value with snowflake and default. default is snowflake" + }, + { + "sourceType": "com.itools.core.snowflake.config.SequenceProperties", + "name": "sequence.generate", + "type": "java.lang.String", + "defaultValue": "random", + "description": "this property worked with sequence.type=snowflake. mac = mac address, random = redis random value , simple = local value" + } + ] +} \ No newline at end of file diff --git a/itools-core/itools-common/src/main/resources/spring.factories b/itools-core/itools-common/src/main/resources/spring.factories new file mode 100644 index 0000000000000000000000000000000000000000..721b830029d3d54f408525662682f1574eb45e2b --- /dev/null +++ b/itools-core/itools-common/src/main/resources/spring.factories @@ -0,0 +1,2 @@ +org.springframework.boot.autoconfigure.EnableAutoConfiguration=\ + com.itools.core.config.Swagger2Config \ No newline at end of file diff --git a/itools-core/itools-model/pom.xml b/itools-core/itools-model/pom.xml new file mode 100644 index 0000000000000000000000000000000000000000..ddc16169d8e9a4a5c9648c1e4d34017533cb73a5 --- /dev/null +++ b/itools-core/itools-model/pom.xml @@ -0,0 +1,20 @@ + + + + itools-core + com.itools.core + 1.0-SNAPSHOT + + 4.0.0 + + itools-model + + + org.projectlombok + lombok + + + + \ No newline at end of file diff --git a/itools-core/itools-model/src/main/java/com/itools/core/package-info.java b/itools-core/itools-model/src/main/java/com/itools/core/package-info.java new file mode 100644 index 0000000000000000000000000000000000000000..d4c6d6e3cfd0afe26b20e56e970b0e7817e40579 --- /dev/null +++ b/itools-core/itools-model/src/main/java/com/itools/core/package-info.java @@ -0,0 +1,4 @@ +/** + * model的实体类对象 + */ +package com.itools.core; \ No newline at end of file diff --git a/itools-core/itools-model/src/main/java/com/itools/core/rbac/dto/ApplicationAuthDTO.java b/itools-core/itools-model/src/main/java/com/itools/core/rbac/dto/ApplicationAuthDTO.java new file mode 100644 index 0000000000000000000000000000000000000000..a1ea3531f2c3451b34109af550302fd210104cfc --- /dev/null +++ b/itools-core/itools-model/src/main/java/com/itools/core/rbac/dto/ApplicationAuthDTO.java @@ -0,0 +1,83 @@ +package com.itools.core.rbac.dto; + +public class ApplicationAuthDTO { + private String id; + + private Long createTime; + + private String createUserId; + + private Long lastUpdateTime; + + private String lastUpdateUserId; + + private String applicationId; + + private String authAppId; + + private Integer status; + + public String getId() { + return id; + } + + public void setId(String id) { + this.id = id; + } + + public Long getCreateTime() { + return createTime; + } + + public void setCreateTime(Long createTime) { + this.createTime = createTime; + } + + public String getCreateUserId() { + return createUserId; + } + + public void setCreateUserId(String createUserId) { + this.createUserId = createUserId; + } + + public Long getLastUpdateTime() { + return lastUpdateTime; + } + + public void setLastUpdateTime(Long lastUpdateTime) { + this.lastUpdateTime = lastUpdateTime; + } + + public String getLastUpdateUserId() { + return lastUpdateUserId; + } + + public void setLastUpdateUserId(String lastUpdateUserId) { + this.lastUpdateUserId = lastUpdateUserId; + } + + public String getApplicationId() { + return applicationId; + } + + public void setApplicationId(String applicationId) { + this.applicationId = applicationId; + } + + public String getAuthAppId() { + return authAppId; + } + + public void setAuthAppId(String authAppId) { + this.authAppId = authAppId; + } + + public Integer getStatus() { + return status; + } + + public void setStatus(Integer status) { + this.status = status; + } +} \ No newline at end of file diff --git a/itools-core/itools-model/src/main/java/com/itools/core/rbac/dto/ApplicationAuthDTOExample.java b/itools-core/itools-model/src/main/java/com/itools/core/rbac/dto/ApplicationAuthDTOExample.java new file mode 100644 index 0000000000000000000000000000000000000000..7dac9ce8cba3899d818200165a10069fecd846b9 --- /dev/null +++ b/itools-core/itools-model/src/main/java/com/itools/core/rbac/dto/ApplicationAuthDTOExample.java @@ -0,0 +1,730 @@ +package com.itools.core.rbac.dto; + +import java.util.ArrayList; +import java.util.List; + +public class ApplicationAuthDTOExample { + protected String orderByClause; + + protected boolean distinct; + + protected List oredCriteria; + + public ApplicationAuthDTOExample() { + oredCriteria = new ArrayList(); + } + + public void setOrderByClause(String orderByClause) { + this.orderByClause = orderByClause; + } + + public String getOrderByClause() { + return orderByClause; + } + + public void setDistinct(boolean distinct) { + this.distinct = distinct; + } + + public boolean isDistinct() { + return distinct; + } + + public List getOredCriteria() { + return oredCriteria; + } + + public void or(Criteria criteria) { + oredCriteria.add(criteria); + } + + public Criteria or() { + Criteria criteria = createCriteriaInternal(); + oredCriteria.add(criteria); + return criteria; + } + + public Criteria createCriteria() { + Criteria criteria = createCriteriaInternal(); + if (oredCriteria.size() == 0) { + oredCriteria.add(criteria); + } + return criteria; + } + + protected Criteria createCriteriaInternal() { + Criteria criteria = new Criteria(); + return criteria; + } + + public void clear() { + oredCriteria.clear(); + orderByClause = null; + distinct = false; + } + + protected abstract static class GeneratedCriteria { + protected List criteria; + + protected GeneratedCriteria() { + super(); + criteria = new ArrayList(); + } + + public boolean isValid() { + return criteria.size() > 0; + } + + public List getAllCriteria() { + return criteria; + } + + public List getCriteria() { + return criteria; + } + + protected void addCriterion(String condition) { + if (condition == null) { + throw new RuntimeException("Value for condition cannot be null"); + } + criteria.add(new Criterion(condition)); + } + + protected void addCriterion(String condition, Object value, String property) { + if (value == null) { + throw new RuntimeException("Value for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value)); + } + + protected void addCriterion(String condition, Object value1, Object value2, String property) { + if (value1 == null || value2 == null) { + throw new RuntimeException("Between values for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value1, value2)); + } + + public Criteria andIdIsNull() { + addCriterion("ID is null"); + return (Criteria) this; + } + + public Criteria andIdIsNotNull() { + addCriterion("ID is not null"); + return (Criteria) this; + } + + public Criteria andIdEqualTo(String value) { + addCriterion("ID =", value, "id"); + return (Criteria) this; + } + + public Criteria andIdNotEqualTo(String value) { + addCriterion("ID <>", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThan(String value) { + addCriterion("ID >", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThanOrEqualTo(String value) { + addCriterion("ID >=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThan(String value) { + addCriterion("ID <", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThanOrEqualTo(String value) { + addCriterion("ID <=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLike(String value) { + addCriterion("ID like", value, "id"); + return (Criteria) this; + } + + public Criteria andIdNotLike(String value) { + addCriterion("ID not like", value, "id"); + return (Criteria) this; + } + + public Criteria andIdIn(List values) { + addCriterion("ID in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdNotIn(List values) { + addCriterion("ID not in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdBetween(String value1, String value2) { + addCriterion("ID between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andIdNotBetween(String value1, String value2) { + addCriterion("ID not between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andCreateTimeIsNull() { + addCriterion("CREATE_TIME is null"); + return (Criteria) this; + } + + public Criteria andCreateTimeIsNotNull() { + addCriterion("CREATE_TIME is not null"); + return (Criteria) this; + } + + public Criteria andCreateTimeEqualTo(Long value) { + addCriterion("CREATE_TIME =", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeNotEqualTo(Long value) { + addCriterion("CREATE_TIME <>", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeGreaterThan(Long value) { + addCriterion("CREATE_TIME >", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeGreaterThanOrEqualTo(Long value) { + addCriterion("CREATE_TIME >=", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeLessThan(Long value) { + addCriterion("CREATE_TIME <", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeLessThanOrEqualTo(Long value) { + addCriterion("CREATE_TIME <=", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeIn(List values) { + addCriterion("CREATE_TIME in", values, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeNotIn(List values) { + addCriterion("CREATE_TIME not in", values, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeBetween(Long value1, Long value2) { + addCriterion("CREATE_TIME between", value1, value2, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeNotBetween(Long value1, Long value2) { + addCriterion("CREATE_TIME not between", value1, value2, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateUserIdIsNull() { + addCriterion("CREATE_USER_ID is null"); + return (Criteria) this; + } + + public Criteria andCreateUserIdIsNotNull() { + addCriterion("CREATE_USER_ID is not null"); + return (Criteria) this; + } + + public Criteria andCreateUserIdEqualTo(String value) { + addCriterion("CREATE_USER_ID =", value, "createUserId"); + return (Criteria) this; + } + + public Criteria andCreateUserIdNotEqualTo(String value) { + addCriterion("CREATE_USER_ID <>", value, "createUserId"); + return (Criteria) this; + } + + public Criteria andCreateUserIdGreaterThan(String value) { + addCriterion("CREATE_USER_ID >", value, "createUserId"); + return (Criteria) this; + } + + public Criteria andCreateUserIdGreaterThanOrEqualTo(String value) { + addCriterion("CREATE_USER_ID >=", value, "createUserId"); + return (Criteria) this; + } + + public Criteria andCreateUserIdLessThan(String value) { + addCriterion("CREATE_USER_ID <", value, "createUserId"); + return (Criteria) this; + } + + public Criteria andCreateUserIdLessThanOrEqualTo(String value) { + addCriterion("CREATE_USER_ID <=", value, "createUserId"); + return (Criteria) this; + } + + public Criteria andCreateUserIdLike(String value) { + addCriterion("CREATE_USER_ID like", value, "createUserId"); + return (Criteria) this; + } + + public Criteria andCreateUserIdNotLike(String value) { + addCriterion("CREATE_USER_ID not like", value, "createUserId"); + return (Criteria) this; + } + + public Criteria andCreateUserIdIn(List values) { + addCriterion("CREATE_USER_ID in", values, "createUserId"); + return (Criteria) this; + } + + public Criteria andCreateUserIdNotIn(List values) { + addCriterion("CREATE_USER_ID not in", values, "createUserId"); + return (Criteria) this; + } + + public Criteria andCreateUserIdBetween(String value1, String value2) { + addCriterion("CREATE_USER_ID between", value1, value2, "createUserId"); + return (Criteria) this; + } + + public Criteria andCreateUserIdNotBetween(String value1, String value2) { + addCriterion("CREATE_USER_ID not between", value1, value2, "createUserId"); + return (Criteria) this; + } + + public Criteria andLastUpdateTimeIsNull() { + addCriterion("LAST_UPDATE_TIME is null"); + return (Criteria) this; + } + + public Criteria andLastUpdateTimeIsNotNull() { + addCriterion("LAST_UPDATE_TIME is not null"); + return (Criteria) this; + } + + public Criteria andLastUpdateTimeEqualTo(Long value) { + addCriterion("LAST_UPDATE_TIME =", value, "lastUpdateTime"); + return (Criteria) this; + } + + public Criteria andLastUpdateTimeNotEqualTo(Long value) { + addCriterion("LAST_UPDATE_TIME <>", value, "lastUpdateTime"); + return (Criteria) this; + } + + public Criteria andLastUpdateTimeGreaterThan(Long value) { + addCriterion("LAST_UPDATE_TIME >", value, "lastUpdateTime"); + return (Criteria) this; + } + + public Criteria andLastUpdateTimeGreaterThanOrEqualTo(Long value) { + addCriterion("LAST_UPDATE_TIME >=", value, "lastUpdateTime"); + return (Criteria) this; + } + + public Criteria andLastUpdateTimeLessThan(Long value) { + addCriterion("LAST_UPDATE_TIME <", value, "lastUpdateTime"); + return (Criteria) this; + } + + public Criteria andLastUpdateTimeLessThanOrEqualTo(Long value) { + addCriterion("LAST_UPDATE_TIME <=", value, "lastUpdateTime"); + return (Criteria) this; + } + + public Criteria andLastUpdateTimeIn(List values) { + addCriterion("LAST_UPDATE_TIME in", values, "lastUpdateTime"); + return (Criteria) this; + } + + public Criteria andLastUpdateTimeNotIn(List values) { + addCriterion("LAST_UPDATE_TIME not in", values, "lastUpdateTime"); + return (Criteria) this; + } + + public Criteria andLastUpdateTimeBetween(Long value1, Long value2) { + addCriterion("LAST_UPDATE_TIME between", value1, value2, "lastUpdateTime"); + return (Criteria) this; + } + + public Criteria andLastUpdateTimeNotBetween(Long value1, Long value2) { + addCriterion("LAST_UPDATE_TIME not between", value1, value2, "lastUpdateTime"); + return (Criteria) this; + } + + public Criteria andLastUpdateUserIdIsNull() { + addCriterion("LAST_UPDATE_USER_ID is null"); + return (Criteria) this; + } + + public Criteria andLastUpdateUserIdIsNotNull() { + addCriterion("LAST_UPDATE_USER_ID is not null"); + return (Criteria) this; + } + + public Criteria andLastUpdateUserIdEqualTo(String value) { + addCriterion("LAST_UPDATE_USER_ID =", value, "lastUpdateUserId"); + return (Criteria) this; + } + + public Criteria andLastUpdateUserIdNotEqualTo(String value) { + addCriterion("LAST_UPDATE_USER_ID <>", value, "lastUpdateUserId"); + return (Criteria) this; + } + + public Criteria andLastUpdateUserIdGreaterThan(String value) { + addCriterion("LAST_UPDATE_USER_ID >", value, "lastUpdateUserId"); + return (Criteria) this; + } + + public Criteria andLastUpdateUserIdGreaterThanOrEqualTo(String value) { + addCriterion("LAST_UPDATE_USER_ID >=", value, "lastUpdateUserId"); + return (Criteria) this; + } + + public Criteria andLastUpdateUserIdLessThan(String value) { + addCriterion("LAST_UPDATE_USER_ID <", value, "lastUpdateUserId"); + return (Criteria) this; + } + + public Criteria andLastUpdateUserIdLessThanOrEqualTo(String value) { + addCriterion("LAST_UPDATE_USER_ID <=", value, "lastUpdateUserId"); + return (Criteria) this; + } + + public Criteria andLastUpdateUserIdLike(String value) { + addCriterion("LAST_UPDATE_USER_ID like", value, "lastUpdateUserId"); + return (Criteria) this; + } + + public Criteria andLastUpdateUserIdNotLike(String value) { + addCriterion("LAST_UPDATE_USER_ID not like", value, "lastUpdateUserId"); + return (Criteria) this; + } + + public Criteria andLastUpdateUserIdIn(List values) { + addCriterion("LAST_UPDATE_USER_ID in", values, "lastUpdateUserId"); + return (Criteria) this; + } + + public Criteria andLastUpdateUserIdNotIn(List values) { + addCriterion("LAST_UPDATE_USER_ID not in", values, "lastUpdateUserId"); + return (Criteria) this; + } + + public Criteria andLastUpdateUserIdBetween(String value1, String value2) { + addCriterion("LAST_UPDATE_USER_ID between", value1, value2, "lastUpdateUserId"); + return (Criteria) this; + } + + public Criteria andLastUpdateUserIdNotBetween(String value1, String value2) { + addCriterion("LAST_UPDATE_USER_ID not between", value1, value2, "lastUpdateUserId"); + return (Criteria) this; + } + + public Criteria andApplicationIdIsNull() { + addCriterion("APPLICATION_ID is null"); + return (Criteria) this; + } + + public Criteria andApplicationIdIsNotNull() { + addCriterion("APPLICATION_ID is not null"); + return (Criteria) this; + } + + public Criteria andApplicationIdEqualTo(String value) { + addCriterion("APPLICATION_ID =", value, "applicationId"); + return (Criteria) this; + } + + public Criteria andApplicationIdNotEqualTo(String value) { + addCriterion("APPLICATION_ID <>", value, "applicationId"); + return (Criteria) this; + } + + public Criteria andApplicationIdGreaterThan(String value) { + addCriterion("APPLICATION_ID >", value, "applicationId"); + return (Criteria) this; + } + + public Criteria andApplicationIdGreaterThanOrEqualTo(String value) { + addCriterion("APPLICATION_ID >=", value, "applicationId"); + return (Criteria) this; + } + + public Criteria andApplicationIdLessThan(String value) { + addCriterion("APPLICATION_ID <", value, "applicationId"); + return (Criteria) this; + } + + public Criteria andApplicationIdLessThanOrEqualTo(String value) { + addCriterion("APPLICATION_ID <=", value, "applicationId"); + return (Criteria) this; + } + + public Criteria andApplicationIdLike(String value) { + addCriterion("APPLICATION_ID like", value, "applicationId"); + return (Criteria) this; + } + + public Criteria andApplicationIdNotLike(String value) { + addCriterion("APPLICATION_ID not like", value, "applicationId"); + return (Criteria) this; + } + + public Criteria andApplicationIdIn(List values) { + addCriterion("APPLICATION_ID in", values, "applicationId"); + return (Criteria) this; + } + + public Criteria andApplicationIdNotIn(List values) { + addCriterion("APPLICATION_ID not in", values, "applicationId"); + return (Criteria) this; + } + + public Criteria andApplicationIdBetween(String value1, String value2) { + addCriterion("APPLICATION_ID between", value1, value2, "applicationId"); + return (Criteria) this; + } + + public Criteria andApplicationIdNotBetween(String value1, String value2) { + addCriterion("APPLICATION_ID not between", value1, value2, "applicationId"); + return (Criteria) this; + } + + public Criteria andAuthAppIdIsNull() { + addCriterion("AUTH_APP_ID is null"); + return (Criteria) this; + } + + public Criteria andAuthAppIdIsNotNull() { + addCriterion("AUTH_APP_ID is not null"); + return (Criteria) this; + } + + public Criteria andAuthAppIdEqualTo(String value) { + addCriterion("AUTH_APP_ID =", value, "authAppId"); + return (Criteria) this; + } + + public Criteria andAuthAppIdNotEqualTo(String value) { + addCriterion("AUTH_APP_ID <>", value, "authAppId"); + return (Criteria) this; + } + + public Criteria andAuthAppIdGreaterThan(String value) { + addCriterion("AUTH_APP_ID >", value, "authAppId"); + return (Criteria) this; + } + + public Criteria andAuthAppIdGreaterThanOrEqualTo(String value) { + addCriterion("AUTH_APP_ID >=", value, "authAppId"); + return (Criteria) this; + } + + public Criteria andAuthAppIdLessThan(String value) { + addCriterion("AUTH_APP_ID <", value, "authAppId"); + return (Criteria) this; + } + + public Criteria andAuthAppIdLessThanOrEqualTo(String value) { + addCriterion("AUTH_APP_ID <=", value, "authAppId"); + return (Criteria) this; + } + + public Criteria andAuthAppIdLike(String value) { + addCriterion("AUTH_APP_ID like", value, "authAppId"); + return (Criteria) this; + } + + public Criteria andAuthAppIdNotLike(String value) { + addCriterion("AUTH_APP_ID not like", value, "authAppId"); + return (Criteria) this; + } + + public Criteria andAuthAppIdIn(List values) { + addCriterion("AUTH_APP_ID in", values, "authAppId"); + return (Criteria) this; + } + + public Criteria andAuthAppIdNotIn(List values) { + addCriterion("AUTH_APP_ID not in", values, "authAppId"); + return (Criteria) this; + } + + public Criteria andAuthAppIdBetween(String value1, String value2) { + addCriterion("AUTH_APP_ID between", value1, value2, "authAppId"); + return (Criteria) this; + } + + public Criteria andAuthAppIdNotBetween(String value1, String value2) { + addCriterion("AUTH_APP_ID not between", value1, value2, "authAppId"); + return (Criteria) this; + } + + public Criteria andStatusIsNull() { + addCriterion("STATUS is null"); + return (Criteria) this; + } + + public Criteria andStatusIsNotNull() { + addCriterion("STATUS is not null"); + return (Criteria) this; + } + + public Criteria andStatusEqualTo(Integer value) { + addCriterion("STATUS =", value, "status"); + return (Criteria) this; + } + + public Criteria andStatusNotEqualTo(Integer value) { + addCriterion("STATUS <>", value, "status"); + return (Criteria) this; + } + + public Criteria andStatusGreaterThan(Integer value) { + addCriterion("STATUS >", value, "status"); + return (Criteria) this; + } + + public Criteria andStatusGreaterThanOrEqualTo(Integer value) { + addCriterion("STATUS >=", value, "status"); + return (Criteria) this; + } + + public Criteria andStatusLessThan(Integer value) { + addCriterion("STATUS <", value, "status"); + return (Criteria) this; + } + + public Criteria andStatusLessThanOrEqualTo(Integer value) { + addCriterion("STATUS <=", value, "status"); + return (Criteria) this; + } + + public Criteria andStatusIn(List values) { + addCriterion("STATUS in", values, "status"); + return (Criteria) this; + } + + public Criteria andStatusNotIn(List values) { + addCriterion("STATUS not in", values, "status"); + return (Criteria) this; + } + + public Criteria andStatusBetween(Integer value1, Integer value2) { + addCriterion("STATUS between", value1, value2, "status"); + return (Criteria) this; + } + + public Criteria andStatusNotBetween(Integer value1, Integer value2) { + addCriterion("STATUS not between", value1, value2, "status"); + return (Criteria) this; + } + } + + public static class Criteria extends GeneratedCriteria { + + protected Criteria() { + super(); + } + } + + public static class Criterion { + private String condition; + + private Object value; + + private Object secondValue; + + private boolean noValue; + + private boolean singleValue; + + private boolean betweenValue; + + private boolean listValue; + + private String typeHandler; + + public String getCondition() { + return condition; + } + + public Object getValue() { + return value; + } + + public Object getSecondValue() { + return secondValue; + } + + public boolean isNoValue() { + return noValue; + } + + public boolean isSingleValue() { + return singleValue; + } + + public boolean isBetweenValue() { + return betweenValue; + } + + public boolean isListValue() { + return listValue; + } + + public String getTypeHandler() { + return typeHandler; + } + + protected Criterion(String condition) { + super(); + this.condition = condition; + this.typeHandler = null; + this.noValue = true; + } + + protected Criterion(String condition, Object value, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.typeHandler = typeHandler; + if (value instanceof List) { + this.listValue = true; + } else { + this.singleValue = true; + } + } + + protected Criterion(String condition, Object value) { + this(condition, value, null); + } + + protected Criterion(String condition, Object value, Object secondValue, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.secondValue = secondValue; + this.typeHandler = typeHandler; + this.betweenValue = true; + } + + protected Criterion(String condition, Object value, Object secondValue) { + this(condition, value, secondValue, null); + } + } +} \ No newline at end of file diff --git a/itools-core/itools-model/src/main/java/com/itools/core/rbac/dto/ApplicationInfoDTO.java b/itools-core/itools-model/src/main/java/com/itools/core/rbac/dto/ApplicationInfoDTO.java new file mode 100644 index 0000000000000000000000000000000000000000..ba719d4955391eff6bf97d942709e1286882c7e3 --- /dev/null +++ b/itools-core/itools-model/src/main/java/com/itools/core/rbac/dto/ApplicationInfoDTO.java @@ -0,0 +1,133 @@ +package com.itools.core.rbac.dto; + +public class ApplicationInfoDTO { + private String id; + + private String appName; + + private String appInstanceId; + + private String appOwner; + + private Short status; + + private Long createTime; + + private String createUserId; + + private Long lastUpdateTime; + + private String lastUpdateUserId; + + private String appCode; + + private String appOwnerEmail; + + private String appRemark; + + private Short appType; + + public String getId() { + return id; + } + + public void setId(String id) { + this.id = id; + } + + public String getAppName() { + return appName; + } + + public void setAppName(String appName) { + this.appName = appName; + } + + public String getAppInstanceId() { + return appInstanceId; + } + + public void setAppInstanceId(String appInstanceId) { + this.appInstanceId = appInstanceId; + } + + public String getAppOwner() { + return appOwner; + } + + public void setAppOwner(String appOwner) { + this.appOwner = appOwner; + } + + public Short getStatus() { + return status; + } + + public void setStatus(Short status) { + this.status = status; + } + + public Long getCreateTime() { + return createTime; + } + + public void setCreateTime(Long createTime) { + this.createTime = createTime; + } + + public String getCreateUserId() { + return createUserId; + } + + public void setCreateUserId(String createUserId) { + this.createUserId = createUserId; + } + + public Long getLastUpdateTime() { + return lastUpdateTime; + } + + public void setLastUpdateTime(Long lastUpdateTime) { + this.lastUpdateTime = lastUpdateTime; + } + + public String getLastUpdateUserId() { + return lastUpdateUserId; + } + + public void setLastUpdateUserId(String lastUpdateUserId) { + this.lastUpdateUserId = lastUpdateUserId; + } + + public String getAppCode() { + return appCode; + } + + public void setAppCode(String appCode) { + this.appCode = appCode; + } + + public String getAppOwnerEmail() { + return appOwnerEmail; + } + + public void setAppOwnerEmail(String appOwnerEmail) { + this.appOwnerEmail = appOwnerEmail; + } + + public String getAppRemark() { + return appRemark; + } + + public void setAppRemark(String appRemark) { + this.appRemark = appRemark; + } + + public Short getAppType() { + return appType; + } + + public void setAppType(Short appType) { + this.appType = appType; + } +} \ No newline at end of file diff --git a/itools-core/itools-model/src/main/java/com/itools/core/rbac/dto/ApplicationInfoDTOExample.java b/itools-core/itools-model/src/main/java/com/itools/core/rbac/dto/ApplicationInfoDTOExample.java new file mode 100644 index 0000000000000000000000000000000000000000..735e5f4c3e5cea46d929ff19fb68501058565ef7 --- /dev/null +++ b/itools-core/itools-model/src/main/java/com/itools/core/rbac/dto/ApplicationInfoDTOExample.java @@ -0,0 +1,1070 @@ +package com.itools.core.rbac.dto; + +import java.util.ArrayList; +import java.util.List; + +public class ApplicationInfoDTOExample { + protected String orderByClause; + + protected boolean distinct; + + protected List oredCriteria; + + public ApplicationInfoDTOExample() { + oredCriteria = new ArrayList(); + } + + public void setOrderByClause(String orderByClause) { + this.orderByClause = orderByClause; + } + + public String getOrderByClause() { + return orderByClause; + } + + public void setDistinct(boolean distinct) { + this.distinct = distinct; + } + + public boolean isDistinct() { + return distinct; + } + + public List getOredCriteria() { + return oredCriteria; + } + + public void or(Criteria criteria) { + oredCriteria.add(criteria); + } + + public Criteria or() { + Criteria criteria = createCriteriaInternal(); + oredCriteria.add(criteria); + return criteria; + } + + public Criteria createCriteria() { + Criteria criteria = createCriteriaInternal(); + if (oredCriteria.size() == 0) { + oredCriteria.add(criteria); + } + return criteria; + } + + protected Criteria createCriteriaInternal() { + Criteria criteria = new Criteria(); + return criteria; + } + + public void clear() { + oredCriteria.clear(); + orderByClause = null; + distinct = false; + } + + protected abstract static class GeneratedCriteria { + protected List criteria; + + protected GeneratedCriteria() { + super(); + criteria = new ArrayList(); + } + + public boolean isValid() { + return criteria.size() > 0; + } + + public List getAllCriteria() { + return criteria; + } + + public List getCriteria() { + return criteria; + } + + protected void addCriterion(String condition) { + if (condition == null) { + throw new RuntimeException("Value for condition cannot be null"); + } + criteria.add(new Criterion(condition)); + } + + protected void addCriterion(String condition, Object value, String property) { + if (value == null) { + throw new RuntimeException("Value for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value)); + } + + protected void addCriterion(String condition, Object value1, Object value2, String property) { + if (value1 == null || value2 == null) { + throw new RuntimeException("Between values for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value1, value2)); + } + + public Criteria andIdIsNull() { + addCriterion("ID is null"); + return (Criteria) this; + } + + public Criteria andIdIsNotNull() { + addCriterion("ID is not null"); + return (Criteria) this; + } + + public Criteria andIdEqualTo(String value) { + addCriterion("ID =", value, "id"); + return (Criteria) this; + } + + public Criteria andIdNotEqualTo(String value) { + addCriterion("ID <>", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThan(String value) { + addCriterion("ID >", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThanOrEqualTo(String value) { + addCriterion("ID >=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThan(String value) { + addCriterion("ID <", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThanOrEqualTo(String value) { + addCriterion("ID <=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLike(String value) { + addCriterion("ID like", value, "id"); + return (Criteria) this; + } + + public Criteria andIdNotLike(String value) { + addCriterion("ID not like", value, "id"); + return (Criteria) this; + } + + public Criteria andIdIn(List values) { + addCriterion("ID in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdNotIn(List values) { + addCriterion("ID not in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdBetween(String value1, String value2) { + addCriterion("ID between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andIdNotBetween(String value1, String value2) { + addCriterion("ID not between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andAppNameIsNull() { + addCriterion("APP_NAME is null"); + return (Criteria) this; + } + + public Criteria andAppNameIsNotNull() { + addCriterion("APP_NAME is not null"); + return (Criteria) this; + } + + public Criteria andAppNameEqualTo(String value) { + addCriterion("APP_NAME =", value, "appName"); + return (Criteria) this; + } + + public Criteria andAppNameNotEqualTo(String value) { + addCriterion("APP_NAME <>", value, "appName"); + return (Criteria) this; + } + + public Criteria andAppNameGreaterThan(String value) { + addCriterion("APP_NAME >", value, "appName"); + return (Criteria) this; + } + + public Criteria andAppNameGreaterThanOrEqualTo(String value) { + addCriterion("APP_NAME >=", value, "appName"); + return (Criteria) this; + } + + public Criteria andAppNameLessThan(String value) { + addCriterion("APP_NAME <", value, "appName"); + return (Criteria) this; + } + + public Criteria andAppNameLessThanOrEqualTo(String value) { + addCriterion("APP_NAME <=", value, "appName"); + return (Criteria) this; + } + + public Criteria andAppNameLike(String value) { + addCriterion("APP_NAME like", value, "appName"); + return (Criteria) this; + } + + public Criteria andAppNameNotLike(String value) { + addCriterion("APP_NAME not like", value, "appName"); + return (Criteria) this; + } + + public Criteria andAppNameIn(List values) { + addCriterion("APP_NAME in", values, "appName"); + return (Criteria) this; + } + + public Criteria andAppNameNotIn(List values) { + addCriterion("APP_NAME not in", values, "appName"); + return (Criteria) this; + } + + public Criteria andAppNameBetween(String value1, String value2) { + addCriterion("APP_NAME between", value1, value2, "appName"); + return (Criteria) this; + } + + public Criteria andAppNameNotBetween(String value1, String value2) { + addCriterion("APP_NAME not between", value1, value2, "appName"); + return (Criteria) this; + } + + public Criteria andAppInstanceIdIsNull() { + addCriterion("APP_INSTANCE_ID is null"); + return (Criteria) this; + } + + public Criteria andAppInstanceIdIsNotNull() { + addCriterion("APP_INSTANCE_ID is not null"); + return (Criteria) this; + } + + public Criteria andAppInstanceIdEqualTo(String value) { + addCriterion("APP_INSTANCE_ID =", value, "appInstanceId"); + return (Criteria) this; + } + + public Criteria andAppInstanceIdNotEqualTo(String value) { + addCriterion("APP_INSTANCE_ID <>", value, "appInstanceId"); + return (Criteria) this; + } + + public Criteria andAppInstanceIdGreaterThan(String value) { + addCriterion("APP_INSTANCE_ID >", value, "appInstanceId"); + return (Criteria) this; + } + + public Criteria andAppInstanceIdGreaterThanOrEqualTo(String value) { + addCriterion("APP_INSTANCE_ID >=", value, "appInstanceId"); + return (Criteria) this; + } + + public Criteria andAppInstanceIdLessThan(String value) { + addCriterion("APP_INSTANCE_ID <", value, "appInstanceId"); + return (Criteria) this; + } + + public Criteria andAppInstanceIdLessThanOrEqualTo(String value) { + addCriterion("APP_INSTANCE_ID <=", value, "appInstanceId"); + return (Criteria) this; + } + + public Criteria andAppInstanceIdLike(String value) { + addCriterion("APP_INSTANCE_ID like", value, "appInstanceId"); + return (Criteria) this; + } + + public Criteria andAppInstanceIdNotLike(String value) { + addCriterion("APP_INSTANCE_ID not like", value, "appInstanceId"); + return (Criteria) this; + } + + public Criteria andAppInstanceIdIn(List values) { + addCriterion("APP_INSTANCE_ID in", values, "appInstanceId"); + return (Criteria) this; + } + + public Criteria andAppInstanceIdNotIn(List values) { + addCriterion("APP_INSTANCE_ID not in", values, "appInstanceId"); + return (Criteria) this; + } + + public Criteria andAppInstanceIdBetween(String value1, String value2) { + addCriterion("APP_INSTANCE_ID between", value1, value2, "appInstanceId"); + return (Criteria) this; + } + + public Criteria andAppInstanceIdNotBetween(String value1, String value2) { + addCriterion("APP_INSTANCE_ID not between", value1, value2, "appInstanceId"); + return (Criteria) this; + } + + public Criteria andAppOwnerIsNull() { + addCriterion("APP_OWNER is null"); + return (Criteria) this; + } + + public Criteria andAppOwnerIsNotNull() { + addCriterion("APP_OWNER is not null"); + return (Criteria) this; + } + + public Criteria andAppOwnerEqualTo(String value) { + addCriterion("APP_OWNER =", value, "appOwner"); + return (Criteria) this; + } + + public Criteria andAppOwnerNotEqualTo(String value) { + addCriterion("APP_OWNER <>", value, "appOwner"); + return (Criteria) this; + } + + public Criteria andAppOwnerGreaterThan(String value) { + addCriterion("APP_OWNER >", value, "appOwner"); + return (Criteria) this; + } + + public Criteria andAppOwnerGreaterThanOrEqualTo(String value) { + addCriterion("APP_OWNER >=", value, "appOwner"); + return (Criteria) this; + } + + public Criteria andAppOwnerLessThan(String value) { + addCriterion("APP_OWNER <", value, "appOwner"); + return (Criteria) this; + } + + public Criteria andAppOwnerLessThanOrEqualTo(String value) { + addCriterion("APP_OWNER <=", value, "appOwner"); + return (Criteria) this; + } + + public Criteria andAppOwnerLike(String value) { + addCriterion("APP_OWNER like", value, "appOwner"); + return (Criteria) this; + } + + public Criteria andAppOwnerNotLike(String value) { + addCriterion("APP_OWNER not like", value, "appOwner"); + return (Criteria) this; + } + + public Criteria andAppOwnerIn(List values) { + addCriterion("APP_OWNER in", values, "appOwner"); + return (Criteria) this; + } + + public Criteria andAppOwnerNotIn(List values) { + addCriterion("APP_OWNER not in", values, "appOwner"); + return (Criteria) this; + } + + public Criteria andAppOwnerBetween(String value1, String value2) { + addCriterion("APP_OWNER between", value1, value2, "appOwner"); + return (Criteria) this; + } + + public Criteria andAppOwnerNotBetween(String value1, String value2) { + addCriterion("APP_OWNER not between", value1, value2, "appOwner"); + return (Criteria) this; + } + + public Criteria andStatusIsNull() { + addCriterion("STATUS is null"); + return (Criteria) this; + } + + public Criteria andStatusIsNotNull() { + addCriterion("STATUS is not null"); + return (Criteria) this; + } + + public Criteria andStatusEqualTo(Short value) { + addCriterion("STATUS =", value, "status"); + return (Criteria) this; + } + + public Criteria andStatusNotEqualTo(Short value) { + addCriterion("STATUS <>", value, "status"); + return (Criteria) this; + } + + public Criteria andStatusGreaterThan(Short value) { + addCriterion("STATUS >", value, "status"); + return (Criteria) this; + } + + public Criteria andStatusGreaterThanOrEqualTo(Short value) { + addCriterion("STATUS >=", value, "status"); + return (Criteria) this; + } + + public Criteria andStatusLessThan(Short value) { + addCriterion("STATUS <", value, "status"); + return (Criteria) this; + } + + public Criteria andStatusLessThanOrEqualTo(Short value) { + addCriterion("STATUS <=", value, "status"); + return (Criteria) this; + } + + public Criteria andStatusIn(List values) { + addCriterion("STATUS in", values, "status"); + return (Criteria) this; + } + + public Criteria andStatusNotIn(List values) { + addCriterion("STATUS not in", values, "status"); + return (Criteria) this; + } + + public Criteria andStatusBetween(Short value1, Short value2) { + addCriterion("STATUS between", value1, value2, "status"); + return (Criteria) this; + } + + public Criteria andStatusNotBetween(Short value1, Short value2) { + addCriterion("STATUS not between", value1, value2, "status"); + return (Criteria) this; + } + + public Criteria andCreateTimeIsNull() { + addCriterion("CREATE_TIME is null"); + return (Criteria) this; + } + + public Criteria andCreateTimeIsNotNull() { + addCriterion("CREATE_TIME is not null"); + return (Criteria) this; + } + + public Criteria andCreateTimeEqualTo(Long value) { + addCriterion("CREATE_TIME =", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeNotEqualTo(Long value) { + addCriterion("CREATE_TIME <>", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeGreaterThan(Long value) { + addCriterion("CREATE_TIME >", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeGreaterThanOrEqualTo(Long value) { + addCriterion("CREATE_TIME >=", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeLessThan(Long value) { + addCriterion("CREATE_TIME <", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeLessThanOrEqualTo(Long value) { + addCriterion("CREATE_TIME <=", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeIn(List values) { + addCriterion("CREATE_TIME in", values, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeNotIn(List values) { + addCriterion("CREATE_TIME not in", values, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeBetween(Long value1, Long value2) { + addCriterion("CREATE_TIME between", value1, value2, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeNotBetween(Long value1, Long value2) { + addCriterion("CREATE_TIME not between", value1, value2, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateUserIdIsNull() { + addCriterion("CREATE_USER_ID is null"); + return (Criteria) this; + } + + public Criteria andCreateUserIdIsNotNull() { + addCriterion("CREATE_USER_ID is not null"); + return (Criteria) this; + } + + public Criteria andCreateUserIdEqualTo(String value) { + addCriterion("CREATE_USER_ID =", value, "createUserId"); + return (Criteria) this; + } + + public Criteria andCreateUserIdNotEqualTo(String value) { + addCriterion("CREATE_USER_ID <>", value, "createUserId"); + return (Criteria) this; + } + + public Criteria andCreateUserIdGreaterThan(String value) { + addCriterion("CREATE_USER_ID >", value, "createUserId"); + return (Criteria) this; + } + + public Criteria andCreateUserIdGreaterThanOrEqualTo(String value) { + addCriterion("CREATE_USER_ID >=", value, "createUserId"); + return (Criteria) this; + } + + public Criteria andCreateUserIdLessThan(String value) { + addCriterion("CREATE_USER_ID <", value, "createUserId"); + return (Criteria) this; + } + + public Criteria andCreateUserIdLessThanOrEqualTo(String value) { + addCriterion("CREATE_USER_ID <=", value, "createUserId"); + return (Criteria) this; + } + + public Criteria andCreateUserIdLike(String value) { + addCriterion("CREATE_USER_ID like", value, "createUserId"); + return (Criteria) this; + } + + public Criteria andCreateUserIdNotLike(String value) { + addCriterion("CREATE_USER_ID not like", value, "createUserId"); + return (Criteria) this; + } + + public Criteria andCreateUserIdIn(List values) { + addCriterion("CREATE_USER_ID in", values, "createUserId"); + return (Criteria) this; + } + + public Criteria andCreateUserIdNotIn(List values) { + addCriterion("CREATE_USER_ID not in", values, "createUserId"); + return (Criteria) this; + } + + public Criteria andCreateUserIdBetween(String value1, String value2) { + addCriterion("CREATE_USER_ID between", value1, value2, "createUserId"); + return (Criteria) this; + } + + public Criteria andCreateUserIdNotBetween(String value1, String value2) { + addCriterion("CREATE_USER_ID not between", value1, value2, "createUserId"); + return (Criteria) this; + } + + public Criteria andLastUpdateTimeIsNull() { + addCriterion("LAST_UPDATE_TIME is null"); + return (Criteria) this; + } + + public Criteria andLastUpdateTimeIsNotNull() { + addCriterion("LAST_UPDATE_TIME is not null"); + return (Criteria) this; + } + + public Criteria andLastUpdateTimeEqualTo(Long value) { + addCriterion("LAST_UPDATE_TIME =", value, "lastUpdateTime"); + return (Criteria) this; + } + + public Criteria andLastUpdateTimeNotEqualTo(Long value) { + addCriterion("LAST_UPDATE_TIME <>", value, "lastUpdateTime"); + return (Criteria) this; + } + + public Criteria andLastUpdateTimeGreaterThan(Long value) { + addCriterion("LAST_UPDATE_TIME >", value, "lastUpdateTime"); + return (Criteria) this; + } + + public Criteria andLastUpdateTimeGreaterThanOrEqualTo(Long value) { + addCriterion("LAST_UPDATE_TIME >=", value, "lastUpdateTime"); + return (Criteria) this; + } + + public Criteria andLastUpdateTimeLessThan(Long value) { + addCriterion("LAST_UPDATE_TIME <", value, "lastUpdateTime"); + return (Criteria) this; + } + + public Criteria andLastUpdateTimeLessThanOrEqualTo(Long value) { + addCriterion("LAST_UPDATE_TIME <=", value, "lastUpdateTime"); + return (Criteria) this; + } + + public Criteria andLastUpdateTimeIn(List values) { + addCriterion("LAST_UPDATE_TIME in", values, "lastUpdateTime"); + return (Criteria) this; + } + + public Criteria andLastUpdateTimeNotIn(List values) { + addCriterion("LAST_UPDATE_TIME not in", values, "lastUpdateTime"); + return (Criteria) this; + } + + public Criteria andLastUpdateTimeBetween(Long value1, Long value2) { + addCriterion("LAST_UPDATE_TIME between", value1, value2, "lastUpdateTime"); + return (Criteria) this; + } + + public Criteria andLastUpdateTimeNotBetween(Long value1, Long value2) { + addCriterion("LAST_UPDATE_TIME not between", value1, value2, "lastUpdateTime"); + return (Criteria) this; + } + + public Criteria andLastUpdateUserIdIsNull() { + addCriterion("LAST_UPDATE_USER_ID is null"); + return (Criteria) this; + } + + public Criteria andLastUpdateUserIdIsNotNull() { + addCriterion("LAST_UPDATE_USER_ID is not null"); + return (Criteria) this; + } + + public Criteria andLastUpdateUserIdEqualTo(String value) { + addCriterion("LAST_UPDATE_USER_ID =", value, "lastUpdateUserId"); + return (Criteria) this; + } + + public Criteria andLastUpdateUserIdNotEqualTo(String value) { + addCriterion("LAST_UPDATE_USER_ID <>", value, "lastUpdateUserId"); + return (Criteria) this; + } + + public Criteria andLastUpdateUserIdGreaterThan(String value) { + addCriterion("LAST_UPDATE_USER_ID >", value, "lastUpdateUserId"); + return (Criteria) this; + } + + public Criteria andLastUpdateUserIdGreaterThanOrEqualTo(String value) { + addCriterion("LAST_UPDATE_USER_ID >=", value, "lastUpdateUserId"); + return (Criteria) this; + } + + public Criteria andLastUpdateUserIdLessThan(String value) { + addCriterion("LAST_UPDATE_USER_ID <", value, "lastUpdateUserId"); + return (Criteria) this; + } + + public Criteria andLastUpdateUserIdLessThanOrEqualTo(String value) { + addCriterion("LAST_UPDATE_USER_ID <=", value, "lastUpdateUserId"); + return (Criteria) this; + } + + public Criteria andLastUpdateUserIdLike(String value) { + addCriterion("LAST_UPDATE_USER_ID like", value, "lastUpdateUserId"); + return (Criteria) this; + } + + public Criteria andLastUpdateUserIdNotLike(String value) { + addCriterion("LAST_UPDATE_USER_ID not like", value, "lastUpdateUserId"); + return (Criteria) this; + } + + public Criteria andLastUpdateUserIdIn(List values) { + addCriterion("LAST_UPDATE_USER_ID in", values, "lastUpdateUserId"); + return (Criteria) this; + } + + public Criteria andLastUpdateUserIdNotIn(List values) { + addCriterion("LAST_UPDATE_USER_ID not in", values, "lastUpdateUserId"); + return (Criteria) this; + } + + public Criteria andLastUpdateUserIdBetween(String value1, String value2) { + addCriterion("LAST_UPDATE_USER_ID between", value1, value2, "lastUpdateUserId"); + return (Criteria) this; + } + + public Criteria andLastUpdateUserIdNotBetween(String value1, String value2) { + addCriterion("LAST_UPDATE_USER_ID not between", value1, value2, "lastUpdateUserId"); + return (Criteria) this; + } + + public Criteria andAppCodeIsNull() { + addCriterion("APP_CODE is null"); + return (Criteria) this; + } + + public Criteria andAppCodeIsNotNull() { + addCriterion("APP_CODE is not null"); + return (Criteria) this; + } + + public Criteria andAppCodeEqualTo(String value) { + addCriterion("APP_CODE =", value, "appCode"); + return (Criteria) this; + } + + public Criteria andAppCodeNotEqualTo(String value) { + addCriterion("APP_CODE <>", value, "appCode"); + return (Criteria) this; + } + + public Criteria andAppCodeGreaterThan(String value) { + addCriterion("APP_CODE >", value, "appCode"); + return (Criteria) this; + } + + public Criteria andAppCodeGreaterThanOrEqualTo(String value) { + addCriterion("APP_CODE >=", value, "appCode"); + return (Criteria) this; + } + + public Criteria andAppCodeLessThan(String value) { + addCriterion("APP_CODE <", value, "appCode"); + return (Criteria) this; + } + + public Criteria andAppCodeLessThanOrEqualTo(String value) { + addCriterion("APP_CODE <=", value, "appCode"); + return (Criteria) this; + } + + public Criteria andAppCodeLike(String value) { + addCriterion("APP_CODE like", value, "appCode"); + return (Criteria) this; + } + + public Criteria andAppCodeNotLike(String value) { + addCriterion("APP_CODE not like", value, "appCode"); + return (Criteria) this; + } + + public Criteria andAppCodeIn(List values) { + addCriterion("APP_CODE in", values, "appCode"); + return (Criteria) this; + } + + public Criteria andAppCodeNotIn(List values) { + addCriterion("APP_CODE not in", values, "appCode"); + return (Criteria) this; + } + + public Criteria andAppCodeBetween(String value1, String value2) { + addCriterion("APP_CODE between", value1, value2, "appCode"); + return (Criteria) this; + } + + public Criteria andAppCodeNotBetween(String value1, String value2) { + addCriterion("APP_CODE not between", value1, value2, "appCode"); + return (Criteria) this; + } + + public Criteria andAppOwnerEmailIsNull() { + addCriterion("APP_OWNER_EMAIL is null"); + return (Criteria) this; + } + + public Criteria andAppOwnerEmailIsNotNull() { + addCriterion("APP_OWNER_EMAIL is not null"); + return (Criteria) this; + } + + public Criteria andAppOwnerEmailEqualTo(String value) { + addCriterion("APP_OWNER_EMAIL =", value, "appOwnerEmail"); + return (Criteria) this; + } + + public Criteria andAppOwnerEmailNotEqualTo(String value) { + addCriterion("APP_OWNER_EMAIL <>", value, "appOwnerEmail"); + return (Criteria) this; + } + + public Criteria andAppOwnerEmailGreaterThan(String value) { + addCriterion("APP_OWNER_EMAIL >", value, "appOwnerEmail"); + return (Criteria) this; + } + + public Criteria andAppOwnerEmailGreaterThanOrEqualTo(String value) { + addCriterion("APP_OWNER_EMAIL >=", value, "appOwnerEmail"); + return (Criteria) this; + } + + public Criteria andAppOwnerEmailLessThan(String value) { + addCriterion("APP_OWNER_EMAIL <", value, "appOwnerEmail"); + return (Criteria) this; + } + + public Criteria andAppOwnerEmailLessThanOrEqualTo(String value) { + addCriterion("APP_OWNER_EMAIL <=", value, "appOwnerEmail"); + return (Criteria) this; + } + + public Criteria andAppOwnerEmailLike(String value) { + addCriterion("APP_OWNER_EMAIL like", value, "appOwnerEmail"); + return (Criteria) this; + } + + public Criteria andAppOwnerEmailNotLike(String value) { + addCriterion("APP_OWNER_EMAIL not like", value, "appOwnerEmail"); + return (Criteria) this; + } + + public Criteria andAppOwnerEmailIn(List values) { + addCriterion("APP_OWNER_EMAIL in", values, "appOwnerEmail"); + return (Criteria) this; + } + + public Criteria andAppOwnerEmailNotIn(List values) { + addCriterion("APP_OWNER_EMAIL not in", values, "appOwnerEmail"); + return (Criteria) this; + } + + public Criteria andAppOwnerEmailBetween(String value1, String value2) { + addCriterion("APP_OWNER_EMAIL between", value1, value2, "appOwnerEmail"); + return (Criteria) this; + } + + public Criteria andAppOwnerEmailNotBetween(String value1, String value2) { + addCriterion("APP_OWNER_EMAIL not between", value1, value2, "appOwnerEmail"); + return (Criteria) this; + } + + public Criteria andAppRemarkIsNull() { + addCriterion("APP_REMARK is null"); + return (Criteria) this; + } + + public Criteria andAppRemarkIsNotNull() { + addCriterion("APP_REMARK is not null"); + return (Criteria) this; + } + + public Criteria andAppRemarkEqualTo(String value) { + addCriterion("APP_REMARK =", value, "appRemark"); + return (Criteria) this; + } + + public Criteria andAppRemarkNotEqualTo(String value) { + addCriterion("APP_REMARK <>", value, "appRemark"); + return (Criteria) this; + } + + public Criteria andAppRemarkGreaterThan(String value) { + addCriterion("APP_REMARK >", value, "appRemark"); + return (Criteria) this; + } + + public Criteria andAppRemarkGreaterThanOrEqualTo(String value) { + addCriterion("APP_REMARK >=", value, "appRemark"); + return (Criteria) this; + } + + public Criteria andAppRemarkLessThan(String value) { + addCriterion("APP_REMARK <", value, "appRemark"); + return (Criteria) this; + } + + public Criteria andAppRemarkLessThanOrEqualTo(String value) { + addCriterion("APP_REMARK <=", value, "appRemark"); + return (Criteria) this; + } + + public Criteria andAppRemarkLike(String value) { + addCriterion("APP_REMARK like", value, "appRemark"); + return (Criteria) this; + } + + public Criteria andAppRemarkNotLike(String value) { + addCriterion("APP_REMARK not like", value, "appRemark"); + return (Criteria) this; + } + + public Criteria andAppRemarkIn(List values) { + addCriterion("APP_REMARK in", values, "appRemark"); + return (Criteria) this; + } + + public Criteria andAppRemarkNotIn(List values) { + addCriterion("APP_REMARK not in", values, "appRemark"); + return (Criteria) this; + } + + public Criteria andAppRemarkBetween(String value1, String value2) { + addCriterion("APP_REMARK between", value1, value2, "appRemark"); + return (Criteria) this; + } + + public Criteria andAppRemarkNotBetween(String value1, String value2) { + addCriterion("APP_REMARK not between", value1, value2, "appRemark"); + return (Criteria) this; + } + + public Criteria andAppTypeIsNull() { + addCriterion("APP_TYPE is null"); + return (Criteria) this; + } + + public Criteria andAppTypeIsNotNull() { + addCriterion("APP_TYPE is not null"); + return (Criteria) this; + } + + public Criteria andAppTypeEqualTo(Short value) { + addCriterion("APP_TYPE =", value, "appType"); + return (Criteria) this; + } + + public Criteria andAppTypeNotEqualTo(Short value) { + addCriterion("APP_TYPE <>", value, "appType"); + return (Criteria) this; + } + + public Criteria andAppTypeGreaterThan(Short value) { + addCriterion("APP_TYPE >", value, "appType"); + return (Criteria) this; + } + + public Criteria andAppTypeGreaterThanOrEqualTo(Short value) { + addCriterion("APP_TYPE >=", value, "appType"); + return (Criteria) this; + } + + public Criteria andAppTypeLessThan(Short value) { + addCriterion("APP_TYPE <", value, "appType"); + return (Criteria) this; + } + + public Criteria andAppTypeLessThanOrEqualTo(Short value) { + addCriterion("APP_TYPE <=", value, "appType"); + return (Criteria) this; + } + + public Criteria andAppTypeIn(List values) { + addCriterion("APP_TYPE in", values, "appType"); + return (Criteria) this; + } + + public Criteria andAppTypeNotIn(List values) { + addCriterion("APP_TYPE not in", values, "appType"); + return (Criteria) this; + } + + public Criteria andAppTypeBetween(Short value1, Short value2) { + addCriterion("APP_TYPE between", value1, value2, "appType"); + return (Criteria) this; + } + + public Criteria andAppTypeNotBetween(Short value1, Short value2) { + addCriterion("APP_TYPE not between", value1, value2, "appType"); + return (Criteria) this; + } + } + + public static class Criteria extends GeneratedCriteria { + + protected Criteria() { + super(); + } + } + + public static class Criterion { + private String condition; + + private Object value; + + private Object secondValue; + + private boolean noValue; + + private boolean singleValue; + + private boolean betweenValue; + + private boolean listValue; + + private String typeHandler; + + public String getCondition() { + return condition; + } + + public Object getValue() { + return value; + } + + public Object getSecondValue() { + return secondValue; + } + + public boolean isNoValue() { + return noValue; + } + + public boolean isSingleValue() { + return singleValue; + } + + public boolean isBetweenValue() { + return betweenValue; + } + + public boolean isListValue() { + return listValue; + } + + public String getTypeHandler() { + return typeHandler; + } + + protected Criterion(String condition) { + super(); + this.condition = condition; + this.typeHandler = null; + this.noValue = true; + } + + protected Criterion(String condition, Object value, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.typeHandler = typeHandler; + if (value instanceof List) { + this.listValue = true; + } else { + this.singleValue = true; + } + } + + protected Criterion(String condition, Object value) { + this(condition, value, null); + } + + protected Criterion(String condition, Object value, Object secondValue, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.secondValue = secondValue; + this.typeHandler = typeHandler; + this.betweenValue = true; + } + + protected Criterion(String condition, Object value, Object secondValue) { + this(condition, value, secondValue, null); + } + } +} \ No newline at end of file diff --git a/itools-core/itools-model/src/main/java/com/itools/core/rbac/dto/ApplicationInfoLogsDTO.java b/itools-core/itools-model/src/main/java/com/itools/core/rbac/dto/ApplicationInfoLogsDTO.java new file mode 100644 index 0000000000000000000000000000000000000000..7c50f444f6b727250ebdb7d75cb8bcecc633fcbc --- /dev/null +++ b/itools-core/itools-model/src/main/java/com/itools/core/rbac/dto/ApplicationInfoLogsDTO.java @@ -0,0 +1,93 @@ +package com.itools.core.rbac.dto; + +public class ApplicationInfoLogsDTO { + private String id; + + private Long createTime; + + private String createUserId; + + private Long lastUpdateTime; + + private String lastUpdateUserId; + + private String applicationId; + + private String optType; + + private Integer status; + + private String authAppIds; + + public String getId() { + return id; + } + + public void setId(String id) { + this.id = id; + } + + public Long getCreateTime() { + return createTime; + } + + public void setCreateTime(Long createTime) { + this.createTime = createTime; + } + + public String getCreateUserId() { + return createUserId; + } + + public void setCreateUserId(String createUserId) { + this.createUserId = createUserId; + } + + public Long getLastUpdateTime() { + return lastUpdateTime; + } + + public void setLastUpdateTime(Long lastUpdateTime) { + this.lastUpdateTime = lastUpdateTime; + } + + public String getLastUpdateUserId() { + return lastUpdateUserId; + } + + public void setLastUpdateUserId(String lastUpdateUserId) { + this.lastUpdateUserId = lastUpdateUserId; + } + + public String getApplicationId() { + return applicationId; + } + + public void setApplicationId(String applicationId) { + this.applicationId = applicationId; + } + + public String getOptType() { + return optType; + } + + public void setOptType(String optType) { + this.optType = optType; + } + + public Integer getStatus() { + return status; + } + + public void setStatus(Integer status) { + this.status = status; + } + + public String getAuthAppIds() { + return authAppIds; + } + + public void setAuthAppIds(String authAppIds) { + this.authAppIds = authAppIds; + } +} \ No newline at end of file diff --git a/itools-core/itools-model/src/main/java/com/itools/core/rbac/dto/ApplicationInfoLogsDTOExample.java b/itools-core/itools-model/src/main/java/com/itools/core/rbac/dto/ApplicationInfoLogsDTOExample.java new file mode 100644 index 0000000000000000000000000000000000000000..f1cf9e158ce50b1d8ac87ab97c18c29108f16635 --- /dev/null +++ b/itools-core/itools-model/src/main/java/com/itools/core/rbac/dto/ApplicationInfoLogsDTOExample.java @@ -0,0 +1,730 @@ +package com.itools.core.rbac.dto; + +import java.util.ArrayList; +import java.util.List; + +public class ApplicationInfoLogsDTOExample { + protected String orderByClause; + + protected boolean distinct; + + protected List oredCriteria; + + public ApplicationInfoLogsDTOExample() { + oredCriteria = new ArrayList(); + } + + public void setOrderByClause(String orderByClause) { + this.orderByClause = orderByClause; + } + + public String getOrderByClause() { + return orderByClause; + } + + public void setDistinct(boolean distinct) { + this.distinct = distinct; + } + + public boolean isDistinct() { + return distinct; + } + + public List getOredCriteria() { + return oredCriteria; + } + + public void or(Criteria criteria) { + oredCriteria.add(criteria); + } + + public Criteria or() { + Criteria criteria = createCriteriaInternal(); + oredCriteria.add(criteria); + return criteria; + } + + public Criteria createCriteria() { + Criteria criteria = createCriteriaInternal(); + if (oredCriteria.size() == 0) { + oredCriteria.add(criteria); + } + return criteria; + } + + protected Criteria createCriteriaInternal() { + Criteria criteria = new Criteria(); + return criteria; + } + + public void clear() { + oredCriteria.clear(); + orderByClause = null; + distinct = false; + } + + protected abstract static class GeneratedCriteria { + protected List criteria; + + protected GeneratedCriteria() { + super(); + criteria = new ArrayList(); + } + + public boolean isValid() { + return criteria.size() > 0; + } + + public List getAllCriteria() { + return criteria; + } + + public List getCriteria() { + return criteria; + } + + protected void addCriterion(String condition) { + if (condition == null) { + throw new RuntimeException("Value for condition cannot be null"); + } + criteria.add(new Criterion(condition)); + } + + protected void addCriterion(String condition, Object value, String property) { + if (value == null) { + throw new RuntimeException("Value for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value)); + } + + protected void addCriterion(String condition, Object value1, Object value2, String property) { + if (value1 == null || value2 == null) { + throw new RuntimeException("Between values for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value1, value2)); + } + + public Criteria andIdIsNull() { + addCriterion("ID is null"); + return (Criteria) this; + } + + public Criteria andIdIsNotNull() { + addCriterion("ID is not null"); + return (Criteria) this; + } + + public Criteria andIdEqualTo(String value) { + addCriterion("ID =", value, "id"); + return (Criteria) this; + } + + public Criteria andIdNotEqualTo(String value) { + addCriterion("ID <>", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThan(String value) { + addCriterion("ID >", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThanOrEqualTo(String value) { + addCriterion("ID >=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThan(String value) { + addCriterion("ID <", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThanOrEqualTo(String value) { + addCriterion("ID <=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLike(String value) { + addCriterion("ID like", value, "id"); + return (Criteria) this; + } + + public Criteria andIdNotLike(String value) { + addCriterion("ID not like", value, "id"); + return (Criteria) this; + } + + public Criteria andIdIn(List values) { + addCriterion("ID in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdNotIn(List values) { + addCriterion("ID not in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdBetween(String value1, String value2) { + addCriterion("ID between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andIdNotBetween(String value1, String value2) { + addCriterion("ID not between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andCreateTimeIsNull() { + addCriterion("CREATE_TIME is null"); + return (Criteria) this; + } + + public Criteria andCreateTimeIsNotNull() { + addCriterion("CREATE_TIME is not null"); + return (Criteria) this; + } + + public Criteria andCreateTimeEqualTo(Long value) { + addCriterion("CREATE_TIME =", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeNotEqualTo(Long value) { + addCriterion("CREATE_TIME <>", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeGreaterThan(Long value) { + addCriterion("CREATE_TIME >", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeGreaterThanOrEqualTo(Long value) { + addCriterion("CREATE_TIME >=", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeLessThan(Long value) { + addCriterion("CREATE_TIME <", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeLessThanOrEqualTo(Long value) { + addCriterion("CREATE_TIME <=", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeIn(List values) { + addCriterion("CREATE_TIME in", values, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeNotIn(List values) { + addCriterion("CREATE_TIME not in", values, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeBetween(Long value1, Long value2) { + addCriterion("CREATE_TIME between", value1, value2, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeNotBetween(Long value1, Long value2) { + addCriterion("CREATE_TIME not between", value1, value2, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateUserIdIsNull() { + addCriterion("CREATE_USER_ID is null"); + return (Criteria) this; + } + + public Criteria andCreateUserIdIsNotNull() { + addCriterion("CREATE_USER_ID is not null"); + return (Criteria) this; + } + + public Criteria andCreateUserIdEqualTo(String value) { + addCriterion("CREATE_USER_ID =", value, "createUserId"); + return (Criteria) this; + } + + public Criteria andCreateUserIdNotEqualTo(String value) { + addCriterion("CREATE_USER_ID <>", value, "createUserId"); + return (Criteria) this; + } + + public Criteria andCreateUserIdGreaterThan(String value) { + addCriterion("CREATE_USER_ID >", value, "createUserId"); + return (Criteria) this; + } + + public Criteria andCreateUserIdGreaterThanOrEqualTo(String value) { + addCriterion("CREATE_USER_ID >=", value, "createUserId"); + return (Criteria) this; + } + + public Criteria andCreateUserIdLessThan(String value) { + addCriterion("CREATE_USER_ID <", value, "createUserId"); + return (Criteria) this; + } + + public Criteria andCreateUserIdLessThanOrEqualTo(String value) { + addCriterion("CREATE_USER_ID <=", value, "createUserId"); + return (Criteria) this; + } + + public Criteria andCreateUserIdLike(String value) { + addCriterion("CREATE_USER_ID like", value, "createUserId"); + return (Criteria) this; + } + + public Criteria andCreateUserIdNotLike(String value) { + addCriterion("CREATE_USER_ID not like", value, "createUserId"); + return (Criteria) this; + } + + public Criteria andCreateUserIdIn(List values) { + addCriterion("CREATE_USER_ID in", values, "createUserId"); + return (Criteria) this; + } + + public Criteria andCreateUserIdNotIn(List values) { + addCriterion("CREATE_USER_ID not in", values, "createUserId"); + return (Criteria) this; + } + + public Criteria andCreateUserIdBetween(String value1, String value2) { + addCriterion("CREATE_USER_ID between", value1, value2, "createUserId"); + return (Criteria) this; + } + + public Criteria andCreateUserIdNotBetween(String value1, String value2) { + addCriterion("CREATE_USER_ID not between", value1, value2, "createUserId"); + return (Criteria) this; + } + + public Criteria andLastUpdateTimeIsNull() { + addCriterion("LAST_UPDATE_TIME is null"); + return (Criteria) this; + } + + public Criteria andLastUpdateTimeIsNotNull() { + addCriterion("LAST_UPDATE_TIME is not null"); + return (Criteria) this; + } + + public Criteria andLastUpdateTimeEqualTo(Long value) { + addCriterion("LAST_UPDATE_TIME =", value, "lastUpdateTime"); + return (Criteria) this; + } + + public Criteria andLastUpdateTimeNotEqualTo(Long value) { + addCriterion("LAST_UPDATE_TIME <>", value, "lastUpdateTime"); + return (Criteria) this; + } + + public Criteria andLastUpdateTimeGreaterThan(Long value) { + addCriterion("LAST_UPDATE_TIME >", value, "lastUpdateTime"); + return (Criteria) this; + } + + public Criteria andLastUpdateTimeGreaterThanOrEqualTo(Long value) { + addCriterion("LAST_UPDATE_TIME >=", value, "lastUpdateTime"); + return (Criteria) this; + } + + public Criteria andLastUpdateTimeLessThan(Long value) { + addCriterion("LAST_UPDATE_TIME <", value, "lastUpdateTime"); + return (Criteria) this; + } + + public Criteria andLastUpdateTimeLessThanOrEqualTo(Long value) { + addCriterion("LAST_UPDATE_TIME <=", value, "lastUpdateTime"); + return (Criteria) this; + } + + public Criteria andLastUpdateTimeIn(List values) { + addCriterion("LAST_UPDATE_TIME in", values, "lastUpdateTime"); + return (Criteria) this; + } + + public Criteria andLastUpdateTimeNotIn(List values) { + addCriterion("LAST_UPDATE_TIME not in", values, "lastUpdateTime"); + return (Criteria) this; + } + + public Criteria andLastUpdateTimeBetween(Long value1, Long value2) { + addCriterion("LAST_UPDATE_TIME between", value1, value2, "lastUpdateTime"); + return (Criteria) this; + } + + public Criteria andLastUpdateTimeNotBetween(Long value1, Long value2) { + addCriterion("LAST_UPDATE_TIME not between", value1, value2, "lastUpdateTime"); + return (Criteria) this; + } + + public Criteria andLastUpdateUserIdIsNull() { + addCriterion("LAST_UPDATE_USER_ID is null"); + return (Criteria) this; + } + + public Criteria andLastUpdateUserIdIsNotNull() { + addCriterion("LAST_UPDATE_USER_ID is not null"); + return (Criteria) this; + } + + public Criteria andLastUpdateUserIdEqualTo(String value) { + addCriterion("LAST_UPDATE_USER_ID =", value, "lastUpdateUserId"); + return (Criteria) this; + } + + public Criteria andLastUpdateUserIdNotEqualTo(String value) { + addCriterion("LAST_UPDATE_USER_ID <>", value, "lastUpdateUserId"); + return (Criteria) this; + } + + public Criteria andLastUpdateUserIdGreaterThan(String value) { + addCriterion("LAST_UPDATE_USER_ID >", value, "lastUpdateUserId"); + return (Criteria) this; + } + + public Criteria andLastUpdateUserIdGreaterThanOrEqualTo(String value) { + addCriterion("LAST_UPDATE_USER_ID >=", value, "lastUpdateUserId"); + return (Criteria) this; + } + + public Criteria andLastUpdateUserIdLessThan(String value) { + addCriterion("LAST_UPDATE_USER_ID <", value, "lastUpdateUserId"); + return (Criteria) this; + } + + public Criteria andLastUpdateUserIdLessThanOrEqualTo(String value) { + addCriterion("LAST_UPDATE_USER_ID <=", value, "lastUpdateUserId"); + return (Criteria) this; + } + + public Criteria andLastUpdateUserIdLike(String value) { + addCriterion("LAST_UPDATE_USER_ID like", value, "lastUpdateUserId"); + return (Criteria) this; + } + + public Criteria andLastUpdateUserIdNotLike(String value) { + addCriterion("LAST_UPDATE_USER_ID not like", value, "lastUpdateUserId"); + return (Criteria) this; + } + + public Criteria andLastUpdateUserIdIn(List values) { + addCriterion("LAST_UPDATE_USER_ID in", values, "lastUpdateUserId"); + return (Criteria) this; + } + + public Criteria andLastUpdateUserIdNotIn(List values) { + addCriterion("LAST_UPDATE_USER_ID not in", values, "lastUpdateUserId"); + return (Criteria) this; + } + + public Criteria andLastUpdateUserIdBetween(String value1, String value2) { + addCriterion("LAST_UPDATE_USER_ID between", value1, value2, "lastUpdateUserId"); + return (Criteria) this; + } + + public Criteria andLastUpdateUserIdNotBetween(String value1, String value2) { + addCriterion("LAST_UPDATE_USER_ID not between", value1, value2, "lastUpdateUserId"); + return (Criteria) this; + } + + public Criteria andApplicationIdIsNull() { + addCriterion("APPLICATION_ID is null"); + return (Criteria) this; + } + + public Criteria andApplicationIdIsNotNull() { + addCriterion("APPLICATION_ID is not null"); + return (Criteria) this; + } + + public Criteria andApplicationIdEqualTo(String value) { + addCriterion("APPLICATION_ID =", value, "applicationId"); + return (Criteria) this; + } + + public Criteria andApplicationIdNotEqualTo(String value) { + addCriterion("APPLICATION_ID <>", value, "applicationId"); + return (Criteria) this; + } + + public Criteria andApplicationIdGreaterThan(String value) { + addCriterion("APPLICATION_ID >", value, "applicationId"); + return (Criteria) this; + } + + public Criteria andApplicationIdGreaterThanOrEqualTo(String value) { + addCriterion("APPLICATION_ID >=", value, "applicationId"); + return (Criteria) this; + } + + public Criteria andApplicationIdLessThan(String value) { + addCriterion("APPLICATION_ID <", value, "applicationId"); + return (Criteria) this; + } + + public Criteria andApplicationIdLessThanOrEqualTo(String value) { + addCriterion("APPLICATION_ID <=", value, "applicationId"); + return (Criteria) this; + } + + public Criteria andApplicationIdLike(String value) { + addCriterion("APPLICATION_ID like", value, "applicationId"); + return (Criteria) this; + } + + public Criteria andApplicationIdNotLike(String value) { + addCriterion("APPLICATION_ID not like", value, "applicationId"); + return (Criteria) this; + } + + public Criteria andApplicationIdIn(List values) { + addCriterion("APPLICATION_ID in", values, "applicationId"); + return (Criteria) this; + } + + public Criteria andApplicationIdNotIn(List values) { + addCriterion("APPLICATION_ID not in", values, "applicationId"); + return (Criteria) this; + } + + public Criteria andApplicationIdBetween(String value1, String value2) { + addCriterion("APPLICATION_ID between", value1, value2, "applicationId"); + return (Criteria) this; + } + + public Criteria andApplicationIdNotBetween(String value1, String value2) { + addCriterion("APPLICATION_ID not between", value1, value2, "applicationId"); + return (Criteria) this; + } + + public Criteria andOptTypeIsNull() { + addCriterion("OPT_TYPE is null"); + return (Criteria) this; + } + + public Criteria andOptTypeIsNotNull() { + addCriterion("OPT_TYPE is not null"); + return (Criteria) this; + } + + public Criteria andOptTypeEqualTo(String value) { + addCriterion("OPT_TYPE =", value, "optType"); + return (Criteria) this; + } + + public Criteria andOptTypeNotEqualTo(String value) { + addCriterion("OPT_TYPE <>", value, "optType"); + return (Criteria) this; + } + + public Criteria andOptTypeGreaterThan(String value) { + addCriterion("OPT_TYPE >", value, "optType"); + return (Criteria) this; + } + + public Criteria andOptTypeGreaterThanOrEqualTo(String value) { + addCriterion("OPT_TYPE >=", value, "optType"); + return (Criteria) this; + } + + public Criteria andOptTypeLessThan(String value) { + addCriterion("OPT_TYPE <", value, "optType"); + return (Criteria) this; + } + + public Criteria andOptTypeLessThanOrEqualTo(String value) { + addCriterion("OPT_TYPE <=", value, "optType"); + return (Criteria) this; + } + + public Criteria andOptTypeLike(String value) { + addCriterion("OPT_TYPE like", value, "optType"); + return (Criteria) this; + } + + public Criteria andOptTypeNotLike(String value) { + addCriterion("OPT_TYPE not like", value, "optType"); + return (Criteria) this; + } + + public Criteria andOptTypeIn(List values) { + addCriterion("OPT_TYPE in", values, "optType"); + return (Criteria) this; + } + + public Criteria andOptTypeNotIn(List values) { + addCriterion("OPT_TYPE not in", values, "optType"); + return (Criteria) this; + } + + public Criteria andOptTypeBetween(String value1, String value2) { + addCriterion("OPT_TYPE between", value1, value2, "optType"); + return (Criteria) this; + } + + public Criteria andOptTypeNotBetween(String value1, String value2) { + addCriterion("OPT_TYPE not between", value1, value2, "optType"); + return (Criteria) this; + } + + public Criteria andStatusIsNull() { + addCriterion("STATUS is null"); + return (Criteria) this; + } + + public Criteria andStatusIsNotNull() { + addCriterion("STATUS is not null"); + return (Criteria) this; + } + + public Criteria andStatusEqualTo(Integer value) { + addCriterion("STATUS =", value, "status"); + return (Criteria) this; + } + + public Criteria andStatusNotEqualTo(Integer value) { + addCriterion("STATUS <>", value, "status"); + return (Criteria) this; + } + + public Criteria andStatusGreaterThan(Integer value) { + addCriterion("STATUS >", value, "status"); + return (Criteria) this; + } + + public Criteria andStatusGreaterThanOrEqualTo(Integer value) { + addCriterion("STATUS >=", value, "status"); + return (Criteria) this; + } + + public Criteria andStatusLessThan(Integer value) { + addCriterion("STATUS <", value, "status"); + return (Criteria) this; + } + + public Criteria andStatusLessThanOrEqualTo(Integer value) { + addCriterion("STATUS <=", value, "status"); + return (Criteria) this; + } + + public Criteria andStatusIn(List values) { + addCriterion("STATUS in", values, "status"); + return (Criteria) this; + } + + public Criteria andStatusNotIn(List values) { + addCriterion("STATUS not in", values, "status"); + return (Criteria) this; + } + + public Criteria andStatusBetween(Integer value1, Integer value2) { + addCriterion("STATUS between", value1, value2, "status"); + return (Criteria) this; + } + + public Criteria andStatusNotBetween(Integer value1, Integer value2) { + addCriterion("STATUS not between", value1, value2, "status"); + return (Criteria) this; + } + } + + public static class Criteria extends GeneratedCriteria { + + protected Criteria() { + super(); + } + } + + public static class Criterion { + private String condition; + + private Object value; + + private Object secondValue; + + private boolean noValue; + + private boolean singleValue; + + private boolean betweenValue; + + private boolean listValue; + + private String typeHandler; + + public String getCondition() { + return condition; + } + + public Object getValue() { + return value; + } + + public Object getSecondValue() { + return secondValue; + } + + public boolean isNoValue() { + return noValue; + } + + public boolean isSingleValue() { + return singleValue; + } + + public boolean isBetweenValue() { + return betweenValue; + } + + public boolean isListValue() { + return listValue; + } + + public String getTypeHandler() { + return typeHandler; + } + + protected Criterion(String condition) { + super(); + this.condition = condition; + this.typeHandler = null; + this.noValue = true; + } + + protected Criterion(String condition, Object value, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.typeHandler = typeHandler; + if (value instanceof List) { + this.listValue = true; + } else { + this.singleValue = true; + } + } + + protected Criterion(String condition, Object value) { + this(condition, value, null); + } + + protected Criterion(String condition, Object value, Object secondValue, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.secondValue = secondValue; + this.typeHandler = typeHandler; + this.betweenValue = true; + } + + protected Criterion(String condition, Object value, Object secondValue) { + this(condition, value, secondValue, null); + } + } +} \ No newline at end of file diff --git a/itools-core/itools-model/src/main/java/com/itools/core/rbac/dto/ApplicationProvideDTO.java b/itools-core/itools-model/src/main/java/com/itools/core/rbac/dto/ApplicationProvideDTO.java new file mode 100644 index 0000000000000000000000000000000000000000..bdabc17849ec88d044bdc0c26d3b4d333c548d1d --- /dev/null +++ b/itools-core/itools-model/src/main/java/com/itools/core/rbac/dto/ApplicationProvideDTO.java @@ -0,0 +1,133 @@ +package com.itools.core.rbac.dto; + +public class ApplicationProvideDTO { + private String id; + + private Long createTime; + + private String createUserId; + + private Long lastUpdateTime; + + private String lastUpdateUserId; + + private String applicationId; + + private String serviceCode; + + private String icon; + + private Short open; + + private String remark; + + private String serviceName; + + private String servicePath; + + private Short status; + + public String getId() { + return id; + } + + public void setId(String id) { + this.id = id; + } + + public Long getCreateTime() { + return createTime; + } + + public void setCreateTime(Long createTime) { + this.createTime = createTime; + } + + public String getCreateUserId() { + return createUserId; + } + + public void setCreateUserId(String createUserId) { + this.createUserId = createUserId; + } + + public Long getLastUpdateTime() { + return lastUpdateTime; + } + + public void setLastUpdateTime(Long lastUpdateTime) { + this.lastUpdateTime = lastUpdateTime; + } + + public String getLastUpdateUserId() { + return lastUpdateUserId; + } + + public void setLastUpdateUserId(String lastUpdateUserId) { + this.lastUpdateUserId = lastUpdateUserId; + } + + public String getApplicationId() { + return applicationId; + } + + public void setApplicationId(String applicationId) { + this.applicationId = applicationId; + } + + public String getServiceCode() { + return serviceCode; + } + + public void setServiceCode(String serviceCode) { + this.serviceCode = serviceCode; + } + + public String getIcon() { + return icon; + } + + public void setIcon(String icon) { + this.icon = icon; + } + + public Short getOpen() { + return open; + } + + public void setOpen(Short open) { + this.open = open; + } + + public String getRemark() { + return remark; + } + + public void setRemark(String remark) { + this.remark = remark; + } + + public String getServiceName() { + return serviceName; + } + + public void setServiceName(String serviceName) { + this.serviceName = serviceName; + } + + public String getServicePath() { + return servicePath; + } + + public void setServicePath(String servicePath) { + this.servicePath = servicePath; + } + + public Short getStatus() { + return status; + } + + public void setStatus(Short status) { + this.status = status; + } +} \ No newline at end of file diff --git a/itools-core/itools-model/src/main/java/com/itools/core/rbac/dto/ApplicationProvideDTOExample.java b/itools-core/itools-model/src/main/java/com/itools/core/rbac/dto/ApplicationProvideDTOExample.java new file mode 100644 index 0000000000000000000000000000000000000000..37e0dfbec5f8af3b4e0849676d412fce04504804 --- /dev/null +++ b/itools-core/itools-model/src/main/java/com/itools/core/rbac/dto/ApplicationProvideDTOExample.java @@ -0,0 +1,1070 @@ +package com.itools.core.rbac.dto; + +import java.util.ArrayList; +import java.util.List; + +public class ApplicationProvideDTOExample { + protected String orderByClause; + + protected boolean distinct; + + protected List oredCriteria; + + public ApplicationProvideDTOExample() { + oredCriteria = new ArrayList(); + } + + public void setOrderByClause(String orderByClause) { + this.orderByClause = orderByClause; + } + + public String getOrderByClause() { + return orderByClause; + } + + public void setDistinct(boolean distinct) { + this.distinct = distinct; + } + + public boolean isDistinct() { + return distinct; + } + + public List getOredCriteria() { + return oredCriteria; + } + + public void or(Criteria criteria) { + oredCriteria.add(criteria); + } + + public Criteria or() { + Criteria criteria = createCriteriaInternal(); + oredCriteria.add(criteria); + return criteria; + } + + public Criteria createCriteria() { + Criteria criteria = createCriteriaInternal(); + if (oredCriteria.size() == 0) { + oredCriteria.add(criteria); + } + return criteria; + } + + protected Criteria createCriteriaInternal() { + Criteria criteria = new Criteria(); + return criteria; + } + + public void clear() { + oredCriteria.clear(); + orderByClause = null; + distinct = false; + } + + protected abstract static class GeneratedCriteria { + protected List criteria; + + protected GeneratedCriteria() { + super(); + criteria = new ArrayList(); + } + + public boolean isValid() { + return criteria.size() > 0; + } + + public List getAllCriteria() { + return criteria; + } + + public List getCriteria() { + return criteria; + } + + protected void addCriterion(String condition) { + if (condition == null) { + throw new RuntimeException("Value for condition cannot be null"); + } + criteria.add(new Criterion(condition)); + } + + protected void addCriterion(String condition, Object value, String property) { + if (value == null) { + throw new RuntimeException("Value for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value)); + } + + protected void addCriterion(String condition, Object value1, Object value2, String property) { + if (value1 == null || value2 == null) { + throw new RuntimeException("Between values for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value1, value2)); + } + + public Criteria andIdIsNull() { + addCriterion("ID is null"); + return (Criteria) this; + } + + public Criteria andIdIsNotNull() { + addCriterion("ID is not null"); + return (Criteria) this; + } + + public Criteria andIdEqualTo(String value) { + addCriterion("ID =", value, "id"); + return (Criteria) this; + } + + public Criteria andIdNotEqualTo(String value) { + addCriterion("ID <>", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThan(String value) { + addCriterion("ID >", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThanOrEqualTo(String value) { + addCriterion("ID >=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThan(String value) { + addCriterion("ID <", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThanOrEqualTo(String value) { + addCriterion("ID <=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLike(String value) { + addCriterion("ID like", value, "id"); + return (Criteria) this; + } + + public Criteria andIdNotLike(String value) { + addCriterion("ID not like", value, "id"); + return (Criteria) this; + } + + public Criteria andIdIn(List values) { + addCriterion("ID in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdNotIn(List values) { + addCriterion("ID not in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdBetween(String value1, String value2) { + addCriterion("ID between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andIdNotBetween(String value1, String value2) { + addCriterion("ID not between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andCreateTimeIsNull() { + addCriterion("CREATE_TIME is null"); + return (Criteria) this; + } + + public Criteria andCreateTimeIsNotNull() { + addCriterion("CREATE_TIME is not null"); + return (Criteria) this; + } + + public Criteria andCreateTimeEqualTo(Long value) { + addCriterion("CREATE_TIME =", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeNotEqualTo(Long value) { + addCriterion("CREATE_TIME <>", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeGreaterThan(Long value) { + addCriterion("CREATE_TIME >", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeGreaterThanOrEqualTo(Long value) { + addCriterion("CREATE_TIME >=", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeLessThan(Long value) { + addCriterion("CREATE_TIME <", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeLessThanOrEqualTo(Long value) { + addCriterion("CREATE_TIME <=", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeIn(List values) { + addCriterion("CREATE_TIME in", values, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeNotIn(List values) { + addCriterion("CREATE_TIME not in", values, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeBetween(Long value1, Long value2) { + addCriterion("CREATE_TIME between", value1, value2, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeNotBetween(Long value1, Long value2) { + addCriterion("CREATE_TIME not between", value1, value2, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateUserIdIsNull() { + addCriterion("CREATE_USER_ID is null"); + return (Criteria) this; + } + + public Criteria andCreateUserIdIsNotNull() { + addCriterion("CREATE_USER_ID is not null"); + return (Criteria) this; + } + + public Criteria andCreateUserIdEqualTo(String value) { + addCriterion("CREATE_USER_ID =", value, "createUserId"); + return (Criteria) this; + } + + public Criteria andCreateUserIdNotEqualTo(String value) { + addCriterion("CREATE_USER_ID <>", value, "createUserId"); + return (Criteria) this; + } + + public Criteria andCreateUserIdGreaterThan(String value) { + addCriterion("CREATE_USER_ID >", value, "createUserId"); + return (Criteria) this; + } + + public Criteria andCreateUserIdGreaterThanOrEqualTo(String value) { + addCriterion("CREATE_USER_ID >=", value, "createUserId"); + return (Criteria) this; + } + + public Criteria andCreateUserIdLessThan(String value) { + addCriterion("CREATE_USER_ID <", value, "createUserId"); + return (Criteria) this; + } + + public Criteria andCreateUserIdLessThanOrEqualTo(String value) { + addCriterion("CREATE_USER_ID <=", value, "createUserId"); + return (Criteria) this; + } + + public Criteria andCreateUserIdLike(String value) { + addCriterion("CREATE_USER_ID like", value, "createUserId"); + return (Criteria) this; + } + + public Criteria andCreateUserIdNotLike(String value) { + addCriterion("CREATE_USER_ID not like", value, "createUserId"); + return (Criteria) this; + } + + public Criteria andCreateUserIdIn(List values) { + addCriterion("CREATE_USER_ID in", values, "createUserId"); + return (Criteria) this; + } + + public Criteria andCreateUserIdNotIn(List values) { + addCriterion("CREATE_USER_ID not in", values, "createUserId"); + return (Criteria) this; + } + + public Criteria andCreateUserIdBetween(String value1, String value2) { + addCriterion("CREATE_USER_ID between", value1, value2, "createUserId"); + return (Criteria) this; + } + + public Criteria andCreateUserIdNotBetween(String value1, String value2) { + addCriterion("CREATE_USER_ID not between", value1, value2, "createUserId"); + return (Criteria) this; + } + + public Criteria andLastUpdateTimeIsNull() { + addCriterion("LAST_UPDATE_TIME is null"); + return (Criteria) this; + } + + public Criteria andLastUpdateTimeIsNotNull() { + addCriterion("LAST_UPDATE_TIME is not null"); + return (Criteria) this; + } + + public Criteria andLastUpdateTimeEqualTo(Long value) { + addCriterion("LAST_UPDATE_TIME =", value, "lastUpdateTime"); + return (Criteria) this; + } + + public Criteria andLastUpdateTimeNotEqualTo(Long value) { + addCriterion("LAST_UPDATE_TIME <>", value, "lastUpdateTime"); + return (Criteria) this; + } + + public Criteria andLastUpdateTimeGreaterThan(Long value) { + addCriterion("LAST_UPDATE_TIME >", value, "lastUpdateTime"); + return (Criteria) this; + } + + public Criteria andLastUpdateTimeGreaterThanOrEqualTo(Long value) { + addCriterion("LAST_UPDATE_TIME >=", value, "lastUpdateTime"); + return (Criteria) this; + } + + public Criteria andLastUpdateTimeLessThan(Long value) { + addCriterion("LAST_UPDATE_TIME <", value, "lastUpdateTime"); + return (Criteria) this; + } + + public Criteria andLastUpdateTimeLessThanOrEqualTo(Long value) { + addCriterion("LAST_UPDATE_TIME <=", value, "lastUpdateTime"); + return (Criteria) this; + } + + public Criteria andLastUpdateTimeIn(List values) { + addCriterion("LAST_UPDATE_TIME in", values, "lastUpdateTime"); + return (Criteria) this; + } + + public Criteria andLastUpdateTimeNotIn(List values) { + addCriterion("LAST_UPDATE_TIME not in", values, "lastUpdateTime"); + return (Criteria) this; + } + + public Criteria andLastUpdateTimeBetween(Long value1, Long value2) { + addCriterion("LAST_UPDATE_TIME between", value1, value2, "lastUpdateTime"); + return (Criteria) this; + } + + public Criteria andLastUpdateTimeNotBetween(Long value1, Long value2) { + addCriterion("LAST_UPDATE_TIME not between", value1, value2, "lastUpdateTime"); + return (Criteria) this; + } + + public Criteria andLastUpdateUserIdIsNull() { + addCriterion("LAST_UPDATE_USER_ID is null"); + return (Criteria) this; + } + + public Criteria andLastUpdateUserIdIsNotNull() { + addCriterion("LAST_UPDATE_USER_ID is not null"); + return (Criteria) this; + } + + public Criteria andLastUpdateUserIdEqualTo(String value) { + addCriterion("LAST_UPDATE_USER_ID =", value, "lastUpdateUserId"); + return (Criteria) this; + } + + public Criteria andLastUpdateUserIdNotEqualTo(String value) { + addCriterion("LAST_UPDATE_USER_ID <>", value, "lastUpdateUserId"); + return (Criteria) this; + } + + public Criteria andLastUpdateUserIdGreaterThan(String value) { + addCriterion("LAST_UPDATE_USER_ID >", value, "lastUpdateUserId"); + return (Criteria) this; + } + + public Criteria andLastUpdateUserIdGreaterThanOrEqualTo(String value) { + addCriterion("LAST_UPDATE_USER_ID >=", value, "lastUpdateUserId"); + return (Criteria) this; + } + + public Criteria andLastUpdateUserIdLessThan(String value) { + addCriterion("LAST_UPDATE_USER_ID <", value, "lastUpdateUserId"); + return (Criteria) this; + } + + public Criteria andLastUpdateUserIdLessThanOrEqualTo(String value) { + addCriterion("LAST_UPDATE_USER_ID <=", value, "lastUpdateUserId"); + return (Criteria) this; + } + + public Criteria andLastUpdateUserIdLike(String value) { + addCriterion("LAST_UPDATE_USER_ID like", value, "lastUpdateUserId"); + return (Criteria) this; + } + + public Criteria andLastUpdateUserIdNotLike(String value) { + addCriterion("LAST_UPDATE_USER_ID not like", value, "lastUpdateUserId"); + return (Criteria) this; + } + + public Criteria andLastUpdateUserIdIn(List values) { + addCriterion("LAST_UPDATE_USER_ID in", values, "lastUpdateUserId"); + return (Criteria) this; + } + + public Criteria andLastUpdateUserIdNotIn(List values) { + addCriterion("LAST_UPDATE_USER_ID not in", values, "lastUpdateUserId"); + return (Criteria) this; + } + + public Criteria andLastUpdateUserIdBetween(String value1, String value2) { + addCriterion("LAST_UPDATE_USER_ID between", value1, value2, "lastUpdateUserId"); + return (Criteria) this; + } + + public Criteria andLastUpdateUserIdNotBetween(String value1, String value2) { + addCriterion("LAST_UPDATE_USER_ID not between", value1, value2, "lastUpdateUserId"); + return (Criteria) this; + } + + public Criteria andApplicationIdIsNull() { + addCriterion("APPLICATION_ID is null"); + return (Criteria) this; + } + + public Criteria andApplicationIdIsNotNull() { + addCriterion("APPLICATION_ID is not null"); + return (Criteria) this; + } + + public Criteria andApplicationIdEqualTo(String value) { + addCriterion("APPLICATION_ID =", value, "applicationId"); + return (Criteria) this; + } + + public Criteria andApplicationIdNotEqualTo(String value) { + addCriterion("APPLICATION_ID <>", value, "applicationId"); + return (Criteria) this; + } + + public Criteria andApplicationIdGreaterThan(String value) { + addCriterion("APPLICATION_ID >", value, "applicationId"); + return (Criteria) this; + } + + public Criteria andApplicationIdGreaterThanOrEqualTo(String value) { + addCriterion("APPLICATION_ID >=", value, "applicationId"); + return (Criteria) this; + } + + public Criteria andApplicationIdLessThan(String value) { + addCriterion("APPLICATION_ID <", value, "applicationId"); + return (Criteria) this; + } + + public Criteria andApplicationIdLessThanOrEqualTo(String value) { + addCriterion("APPLICATION_ID <=", value, "applicationId"); + return (Criteria) this; + } + + public Criteria andApplicationIdLike(String value) { + addCriterion("APPLICATION_ID like", value, "applicationId"); + return (Criteria) this; + } + + public Criteria andApplicationIdNotLike(String value) { + addCriterion("APPLICATION_ID not like", value, "applicationId"); + return (Criteria) this; + } + + public Criteria andApplicationIdIn(List values) { + addCriterion("APPLICATION_ID in", values, "applicationId"); + return (Criteria) this; + } + + public Criteria andApplicationIdNotIn(List values) { + addCriterion("APPLICATION_ID not in", values, "applicationId"); + return (Criteria) this; + } + + public Criteria andApplicationIdBetween(String value1, String value2) { + addCriterion("APPLICATION_ID between", value1, value2, "applicationId"); + return (Criteria) this; + } + + public Criteria andApplicationIdNotBetween(String value1, String value2) { + addCriterion("APPLICATION_ID not between", value1, value2, "applicationId"); + return (Criteria) this; + } + + public Criteria andServiceCodeIsNull() { + addCriterion("SERVICE_CODE is null"); + return (Criteria) this; + } + + public Criteria andServiceCodeIsNotNull() { + addCriterion("SERVICE_CODE is not null"); + return (Criteria) this; + } + + public Criteria andServiceCodeEqualTo(String value) { + addCriterion("SERVICE_CODE =", value, "serviceCode"); + return (Criteria) this; + } + + public Criteria andServiceCodeNotEqualTo(String value) { + addCriterion("SERVICE_CODE <>", value, "serviceCode"); + return (Criteria) this; + } + + public Criteria andServiceCodeGreaterThan(String value) { + addCriterion("SERVICE_CODE >", value, "serviceCode"); + return (Criteria) this; + } + + public Criteria andServiceCodeGreaterThanOrEqualTo(String value) { + addCriterion("SERVICE_CODE >=", value, "serviceCode"); + return (Criteria) this; + } + + public Criteria andServiceCodeLessThan(String value) { + addCriterion("SERVICE_CODE <", value, "serviceCode"); + return (Criteria) this; + } + + public Criteria andServiceCodeLessThanOrEqualTo(String value) { + addCriterion("SERVICE_CODE <=", value, "serviceCode"); + return (Criteria) this; + } + + public Criteria andServiceCodeLike(String value) { + addCriterion("SERVICE_CODE like", value, "serviceCode"); + return (Criteria) this; + } + + public Criteria andServiceCodeNotLike(String value) { + addCriterion("SERVICE_CODE not like", value, "serviceCode"); + return (Criteria) this; + } + + public Criteria andServiceCodeIn(List values) { + addCriterion("SERVICE_CODE in", values, "serviceCode"); + return (Criteria) this; + } + + public Criteria andServiceCodeNotIn(List values) { + addCriterion("SERVICE_CODE not in", values, "serviceCode"); + return (Criteria) this; + } + + public Criteria andServiceCodeBetween(String value1, String value2) { + addCriterion("SERVICE_CODE between", value1, value2, "serviceCode"); + return (Criteria) this; + } + + public Criteria andServiceCodeNotBetween(String value1, String value2) { + addCriterion("SERVICE_CODE not between", value1, value2, "serviceCode"); + return (Criteria) this; + } + + public Criteria andIconIsNull() { + addCriterion("ICON is null"); + return (Criteria) this; + } + + public Criteria andIconIsNotNull() { + addCriterion("ICON is not null"); + return (Criteria) this; + } + + public Criteria andIconEqualTo(String value) { + addCriterion("ICON =", value, "icon"); + return (Criteria) this; + } + + public Criteria andIconNotEqualTo(String value) { + addCriterion("ICON <>", value, "icon"); + return (Criteria) this; + } + + public Criteria andIconGreaterThan(String value) { + addCriterion("ICON >", value, "icon"); + return (Criteria) this; + } + + public Criteria andIconGreaterThanOrEqualTo(String value) { + addCriterion("ICON >=", value, "icon"); + return (Criteria) this; + } + + public Criteria andIconLessThan(String value) { + addCriterion("ICON <", value, "icon"); + return (Criteria) this; + } + + public Criteria andIconLessThanOrEqualTo(String value) { + addCriterion("ICON <=", value, "icon"); + return (Criteria) this; + } + + public Criteria andIconLike(String value) { + addCriterion("ICON like", value, "icon"); + return (Criteria) this; + } + + public Criteria andIconNotLike(String value) { + addCriterion("ICON not like", value, "icon"); + return (Criteria) this; + } + + public Criteria andIconIn(List values) { + addCriterion("ICON in", values, "icon"); + return (Criteria) this; + } + + public Criteria andIconNotIn(List values) { + addCriterion("ICON not in", values, "icon"); + return (Criteria) this; + } + + public Criteria andIconBetween(String value1, String value2) { + addCriterion("ICON between", value1, value2, "icon"); + return (Criteria) this; + } + + public Criteria andIconNotBetween(String value1, String value2) { + addCriterion("ICON not between", value1, value2, "icon"); + return (Criteria) this; + } + + public Criteria andOpenIsNull() { + addCriterion("OPEN is null"); + return (Criteria) this; + } + + public Criteria andOpenIsNotNull() { + addCriterion("OPEN is not null"); + return (Criteria) this; + } + + public Criteria andOpenEqualTo(Short value) { + addCriterion("OPEN =", value, "open"); + return (Criteria) this; + } + + public Criteria andOpenNotEqualTo(Short value) { + addCriterion("OPEN <>", value, "open"); + return (Criteria) this; + } + + public Criteria andOpenGreaterThan(Short value) { + addCriterion("OPEN >", value, "open"); + return (Criteria) this; + } + + public Criteria andOpenGreaterThanOrEqualTo(Short value) { + addCriterion("OPEN >=", value, "open"); + return (Criteria) this; + } + + public Criteria andOpenLessThan(Short value) { + addCriterion("OPEN <", value, "open"); + return (Criteria) this; + } + + public Criteria andOpenLessThanOrEqualTo(Short value) { + addCriterion("OPEN <=", value, "open"); + return (Criteria) this; + } + + public Criteria andOpenIn(List values) { + addCriterion("OPEN in", values, "open"); + return (Criteria) this; + } + + public Criteria andOpenNotIn(List values) { + addCriterion("OPEN not in", values, "open"); + return (Criteria) this; + } + + public Criteria andOpenBetween(Short value1, Short value2) { + addCriterion("OPEN between", value1, value2, "open"); + return (Criteria) this; + } + + public Criteria andOpenNotBetween(Short value1, Short value2) { + addCriterion("OPEN not between", value1, value2, "open"); + return (Criteria) this; + } + + public Criteria andRemarkIsNull() { + addCriterion("REMARK is null"); + return (Criteria) this; + } + + public Criteria andRemarkIsNotNull() { + addCriterion("REMARK is not null"); + return (Criteria) this; + } + + public Criteria andRemarkEqualTo(String value) { + addCriterion("REMARK =", value, "remark"); + return (Criteria) this; + } + + public Criteria andRemarkNotEqualTo(String value) { + addCriterion("REMARK <>", value, "remark"); + return (Criteria) this; + } + + public Criteria andRemarkGreaterThan(String value) { + addCriterion("REMARK >", value, "remark"); + return (Criteria) this; + } + + public Criteria andRemarkGreaterThanOrEqualTo(String value) { + addCriterion("REMARK >=", value, "remark"); + return (Criteria) this; + } + + public Criteria andRemarkLessThan(String value) { + addCriterion("REMARK <", value, "remark"); + return (Criteria) this; + } + + public Criteria andRemarkLessThanOrEqualTo(String value) { + addCriterion("REMARK <=", value, "remark"); + return (Criteria) this; + } + + public Criteria andRemarkLike(String value) { + addCriterion("REMARK like", value, "remark"); + return (Criteria) this; + } + + public Criteria andRemarkNotLike(String value) { + addCriterion("REMARK not like", value, "remark"); + return (Criteria) this; + } + + public Criteria andRemarkIn(List values) { + addCriterion("REMARK in", values, "remark"); + return (Criteria) this; + } + + public Criteria andRemarkNotIn(List values) { + addCriterion("REMARK not in", values, "remark"); + return (Criteria) this; + } + + public Criteria andRemarkBetween(String value1, String value2) { + addCriterion("REMARK between", value1, value2, "remark"); + return (Criteria) this; + } + + public Criteria andRemarkNotBetween(String value1, String value2) { + addCriterion("REMARK not between", value1, value2, "remark"); + return (Criteria) this; + } + + public Criteria andServiceNameIsNull() { + addCriterion("SERVICE_NAME is null"); + return (Criteria) this; + } + + public Criteria andServiceNameIsNotNull() { + addCriterion("SERVICE_NAME is not null"); + return (Criteria) this; + } + + public Criteria andServiceNameEqualTo(String value) { + addCriterion("SERVICE_NAME =", value, "serviceName"); + return (Criteria) this; + } + + public Criteria andServiceNameNotEqualTo(String value) { + addCriterion("SERVICE_NAME <>", value, "serviceName"); + return (Criteria) this; + } + + public Criteria andServiceNameGreaterThan(String value) { + addCriterion("SERVICE_NAME >", value, "serviceName"); + return (Criteria) this; + } + + public Criteria andServiceNameGreaterThanOrEqualTo(String value) { + addCriterion("SERVICE_NAME >=", value, "serviceName"); + return (Criteria) this; + } + + public Criteria andServiceNameLessThan(String value) { + addCriterion("SERVICE_NAME <", value, "serviceName"); + return (Criteria) this; + } + + public Criteria andServiceNameLessThanOrEqualTo(String value) { + addCriterion("SERVICE_NAME <=", value, "serviceName"); + return (Criteria) this; + } + + public Criteria andServiceNameLike(String value) { + addCriterion("SERVICE_NAME like", value, "serviceName"); + return (Criteria) this; + } + + public Criteria andServiceNameNotLike(String value) { + addCriterion("SERVICE_NAME not like", value, "serviceName"); + return (Criteria) this; + } + + public Criteria andServiceNameIn(List values) { + addCriterion("SERVICE_NAME in", values, "serviceName"); + return (Criteria) this; + } + + public Criteria andServiceNameNotIn(List values) { + addCriterion("SERVICE_NAME not in", values, "serviceName"); + return (Criteria) this; + } + + public Criteria andServiceNameBetween(String value1, String value2) { + addCriterion("SERVICE_NAME between", value1, value2, "serviceName"); + return (Criteria) this; + } + + public Criteria andServiceNameNotBetween(String value1, String value2) { + addCriterion("SERVICE_NAME not between", value1, value2, "serviceName"); + return (Criteria) this; + } + + public Criteria andServicePathIsNull() { + addCriterion("SERVICE_PATH is null"); + return (Criteria) this; + } + + public Criteria andServicePathIsNotNull() { + addCriterion("SERVICE_PATH is not null"); + return (Criteria) this; + } + + public Criteria andServicePathEqualTo(String value) { + addCriterion("SERVICE_PATH =", value, "servicePath"); + return (Criteria) this; + } + + public Criteria andServicePathNotEqualTo(String value) { + addCriterion("SERVICE_PATH <>", value, "servicePath"); + return (Criteria) this; + } + + public Criteria andServicePathGreaterThan(String value) { + addCriterion("SERVICE_PATH >", value, "servicePath"); + return (Criteria) this; + } + + public Criteria andServicePathGreaterThanOrEqualTo(String value) { + addCriterion("SERVICE_PATH >=", value, "servicePath"); + return (Criteria) this; + } + + public Criteria andServicePathLessThan(String value) { + addCriterion("SERVICE_PATH <", value, "servicePath"); + return (Criteria) this; + } + + public Criteria andServicePathLessThanOrEqualTo(String value) { + addCriterion("SERVICE_PATH <=", value, "servicePath"); + return (Criteria) this; + } + + public Criteria andServicePathLike(String value) { + addCriterion("SERVICE_PATH like", value, "servicePath"); + return (Criteria) this; + } + + public Criteria andServicePathNotLike(String value) { + addCriterion("SERVICE_PATH not like", value, "servicePath"); + return (Criteria) this; + } + + public Criteria andServicePathIn(List values) { + addCriterion("SERVICE_PATH in", values, "servicePath"); + return (Criteria) this; + } + + public Criteria andServicePathNotIn(List values) { + addCriterion("SERVICE_PATH not in", values, "servicePath"); + return (Criteria) this; + } + + public Criteria andServicePathBetween(String value1, String value2) { + addCriterion("SERVICE_PATH between", value1, value2, "servicePath"); + return (Criteria) this; + } + + public Criteria andServicePathNotBetween(String value1, String value2) { + addCriterion("SERVICE_PATH not between", value1, value2, "servicePath"); + return (Criteria) this; + } + + public Criteria andStatusIsNull() { + addCriterion("STATUS is null"); + return (Criteria) this; + } + + public Criteria andStatusIsNotNull() { + addCriterion("STATUS is not null"); + return (Criteria) this; + } + + public Criteria andStatusEqualTo(Short value) { + addCriterion("STATUS =", value, "status"); + return (Criteria) this; + } + + public Criteria andStatusNotEqualTo(Short value) { + addCriterion("STATUS <>", value, "status"); + return (Criteria) this; + } + + public Criteria andStatusGreaterThan(Short value) { + addCriterion("STATUS >", value, "status"); + return (Criteria) this; + } + + public Criteria andStatusGreaterThanOrEqualTo(Short value) { + addCriterion("STATUS >=", value, "status"); + return (Criteria) this; + } + + public Criteria andStatusLessThan(Short value) { + addCriterion("STATUS <", value, "status"); + return (Criteria) this; + } + + public Criteria andStatusLessThanOrEqualTo(Short value) { + addCriterion("STATUS <=", value, "status"); + return (Criteria) this; + } + + public Criteria andStatusIn(List values) { + addCriterion("STATUS in", values, "status"); + return (Criteria) this; + } + + public Criteria andStatusNotIn(List values) { + addCriterion("STATUS not in", values, "status"); + return (Criteria) this; + } + + public Criteria andStatusBetween(Short value1, Short value2) { + addCriterion("STATUS between", value1, value2, "status"); + return (Criteria) this; + } + + public Criteria andStatusNotBetween(Short value1, Short value2) { + addCriterion("STATUS not between", value1, value2, "status"); + return (Criteria) this; + } + } + + public static class Criteria extends GeneratedCriteria { + + protected Criteria() { + super(); + } + } + + public static class Criterion { + private String condition; + + private Object value; + + private Object secondValue; + + private boolean noValue; + + private boolean singleValue; + + private boolean betweenValue; + + private boolean listValue; + + private String typeHandler; + + public String getCondition() { + return condition; + } + + public Object getValue() { + return value; + } + + public Object getSecondValue() { + return secondValue; + } + + public boolean isNoValue() { + return noValue; + } + + public boolean isSingleValue() { + return singleValue; + } + + public boolean isBetweenValue() { + return betweenValue; + } + + public boolean isListValue() { + return listValue; + } + + public String getTypeHandler() { + return typeHandler; + } + + protected Criterion(String condition) { + super(); + this.condition = condition; + this.typeHandler = null; + this.noValue = true; + } + + protected Criterion(String condition, Object value, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.typeHandler = typeHandler; + if (value instanceof List) { + this.listValue = true; + } else { + this.singleValue = true; + } + } + + protected Criterion(String condition, Object value) { + this(condition, value, null); + } + + protected Criterion(String condition, Object value, Object secondValue, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.secondValue = secondValue; + this.typeHandler = typeHandler; + this.betweenValue = true; + } + + protected Criterion(String condition, Object value, Object secondValue) { + this(condition, value, secondValue, null); + } + } +} \ No newline at end of file diff --git a/itools-core/itools-model/src/main/java/com/itools/core/rbac/dto/ApplicationServiceDTO.java b/itools-core/itools-model/src/main/java/com/itools/core/rbac/dto/ApplicationServiceDTO.java new file mode 100644 index 0000000000000000000000000000000000000000..a925d4ff06cd2f61bac5fe347a2659579df7693f --- /dev/null +++ b/itools-core/itools-model/src/main/java/com/itools/core/rbac/dto/ApplicationServiceDTO.java @@ -0,0 +1,103 @@ +package com.itools.core.rbac.dto; + +public class ApplicationServiceDTO { + private String id; + + private Long createTime; + + private String createUserId; + + private Long lastUpdateTime; + + private String lastUpdateUserId; + + private String applicationId; + + private String serviceName; + + private String serviceCode; + + private String remark; + + private Short status; + + public String getId() { + return id; + } + + public void setId(String id) { + this.id = id; + } + + public Long getCreateTime() { + return createTime; + } + + public void setCreateTime(Long createTime) { + this.createTime = createTime; + } + + public String getCreateUserId() { + return createUserId; + } + + public void setCreateUserId(String createUserId) { + this.createUserId = createUserId; + } + + public Long getLastUpdateTime() { + return lastUpdateTime; + } + + public void setLastUpdateTime(Long lastUpdateTime) { + this.lastUpdateTime = lastUpdateTime; + } + + public String getLastUpdateUserId() { + return lastUpdateUserId; + } + + public void setLastUpdateUserId(String lastUpdateUserId) { + this.lastUpdateUserId = lastUpdateUserId; + } + + public String getApplicationId() { + return applicationId; + } + + public void setApplicationId(String applicationId) { + this.applicationId = applicationId; + } + + public String getServiceName() { + return serviceName; + } + + public void setServiceName(String serviceName) { + this.serviceName = serviceName; + } + + public String getServiceCode() { + return serviceCode; + } + + public void setServiceCode(String serviceCode) { + this.serviceCode = serviceCode; + } + + public String getRemark() { + return remark; + } + + public void setRemark(String remark) { + this.remark = remark; + } + + public Short getStatus() { + return status; + } + + public void setStatus(Short status) { + this.status = status; + } +} \ No newline at end of file diff --git a/itools-core/itools-model/src/main/java/com/itools/core/rbac/dto/ApplicationServiceDTOExample.java b/itools-core/itools-model/src/main/java/com/itools/core/rbac/dto/ApplicationServiceDTOExample.java new file mode 100644 index 0000000000000000000000000000000000000000..2c906b4df8f2753b9fbe351cb6e5489ab28a8fbc --- /dev/null +++ b/itools-core/itools-model/src/main/java/com/itools/core/rbac/dto/ApplicationServiceDTOExample.java @@ -0,0 +1,870 @@ +package com.itools.core.rbac.dto; + +import java.util.ArrayList; +import java.util.List; + +public class ApplicationServiceDTOExample { + protected String orderByClause; + + protected boolean distinct; + + protected List oredCriteria; + + public ApplicationServiceDTOExample() { + oredCriteria = new ArrayList(); + } + + public void setOrderByClause(String orderByClause) { + this.orderByClause = orderByClause; + } + + public String getOrderByClause() { + return orderByClause; + } + + public void setDistinct(boolean distinct) { + this.distinct = distinct; + } + + public boolean isDistinct() { + return distinct; + } + + public List getOredCriteria() { + return oredCriteria; + } + + public void or(Criteria criteria) { + oredCriteria.add(criteria); + } + + public Criteria or() { + Criteria criteria = createCriteriaInternal(); + oredCriteria.add(criteria); + return criteria; + } + + public Criteria createCriteria() { + Criteria criteria = createCriteriaInternal(); + if (oredCriteria.size() == 0) { + oredCriteria.add(criteria); + } + return criteria; + } + + protected Criteria createCriteriaInternal() { + Criteria criteria = new Criteria(); + return criteria; + } + + public void clear() { + oredCriteria.clear(); + orderByClause = null; + distinct = false; + } + + protected abstract static class GeneratedCriteria { + protected List criteria; + + protected GeneratedCriteria() { + super(); + criteria = new ArrayList(); + } + + public boolean isValid() { + return criteria.size() > 0; + } + + public List getAllCriteria() { + return criteria; + } + + public List getCriteria() { + return criteria; + } + + protected void addCriterion(String condition) { + if (condition == null) { + throw new RuntimeException("Value for condition cannot be null"); + } + criteria.add(new Criterion(condition)); + } + + protected void addCriterion(String condition, Object value, String property) { + if (value == null) { + throw new RuntimeException("Value for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value)); + } + + protected void addCriterion(String condition, Object value1, Object value2, String property) { + if (value1 == null || value2 == null) { + throw new RuntimeException("Between values for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value1, value2)); + } + + public Criteria andIdIsNull() { + addCriterion("ID is null"); + return (Criteria) this; + } + + public Criteria andIdIsNotNull() { + addCriterion("ID is not null"); + return (Criteria) this; + } + + public Criteria andIdEqualTo(String value) { + addCriterion("ID =", value, "id"); + return (Criteria) this; + } + + public Criteria andIdNotEqualTo(String value) { + addCriterion("ID <>", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThan(String value) { + addCriterion("ID >", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThanOrEqualTo(String value) { + addCriterion("ID >=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThan(String value) { + addCriterion("ID <", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThanOrEqualTo(String value) { + addCriterion("ID <=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLike(String value) { + addCriterion("ID like", value, "id"); + return (Criteria) this; + } + + public Criteria andIdNotLike(String value) { + addCriterion("ID not like", value, "id"); + return (Criteria) this; + } + + public Criteria andIdIn(List values) { + addCriterion("ID in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdNotIn(List values) { + addCriterion("ID not in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdBetween(String value1, String value2) { + addCriterion("ID between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andIdNotBetween(String value1, String value2) { + addCriterion("ID not between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andCreateTimeIsNull() { + addCriterion("CREATE_TIME is null"); + return (Criteria) this; + } + + public Criteria andCreateTimeIsNotNull() { + addCriterion("CREATE_TIME is not null"); + return (Criteria) this; + } + + public Criteria andCreateTimeEqualTo(Long value) { + addCriterion("CREATE_TIME =", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeNotEqualTo(Long value) { + addCriterion("CREATE_TIME <>", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeGreaterThan(Long value) { + addCriterion("CREATE_TIME >", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeGreaterThanOrEqualTo(Long value) { + addCriterion("CREATE_TIME >=", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeLessThan(Long value) { + addCriterion("CREATE_TIME <", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeLessThanOrEqualTo(Long value) { + addCriterion("CREATE_TIME <=", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeIn(List values) { + addCriterion("CREATE_TIME in", values, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeNotIn(List values) { + addCriterion("CREATE_TIME not in", values, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeBetween(Long value1, Long value2) { + addCriterion("CREATE_TIME between", value1, value2, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeNotBetween(Long value1, Long value2) { + addCriterion("CREATE_TIME not between", value1, value2, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateUserIdIsNull() { + addCriterion("CREATE_USER_ID is null"); + return (Criteria) this; + } + + public Criteria andCreateUserIdIsNotNull() { + addCriterion("CREATE_USER_ID is not null"); + return (Criteria) this; + } + + public Criteria andCreateUserIdEqualTo(String value) { + addCriterion("CREATE_USER_ID =", value, "createUserId"); + return (Criteria) this; + } + + public Criteria andCreateUserIdNotEqualTo(String value) { + addCriterion("CREATE_USER_ID <>", value, "createUserId"); + return (Criteria) this; + } + + public Criteria andCreateUserIdGreaterThan(String value) { + addCriterion("CREATE_USER_ID >", value, "createUserId"); + return (Criteria) this; + } + + public Criteria andCreateUserIdGreaterThanOrEqualTo(String value) { + addCriterion("CREATE_USER_ID >=", value, "createUserId"); + return (Criteria) this; + } + + public Criteria andCreateUserIdLessThan(String value) { + addCriterion("CREATE_USER_ID <", value, "createUserId"); + return (Criteria) this; + } + + public Criteria andCreateUserIdLessThanOrEqualTo(String value) { + addCriterion("CREATE_USER_ID <=", value, "createUserId"); + return (Criteria) this; + } + + public Criteria andCreateUserIdLike(String value) { + addCriterion("CREATE_USER_ID like", value, "createUserId"); + return (Criteria) this; + } + + public Criteria andCreateUserIdNotLike(String value) { + addCriterion("CREATE_USER_ID not like", value, "createUserId"); + return (Criteria) this; + } + + public Criteria andCreateUserIdIn(List values) { + addCriterion("CREATE_USER_ID in", values, "createUserId"); + return (Criteria) this; + } + + public Criteria andCreateUserIdNotIn(List values) { + addCriterion("CREATE_USER_ID not in", values, "createUserId"); + return (Criteria) this; + } + + public Criteria andCreateUserIdBetween(String value1, String value2) { + addCriterion("CREATE_USER_ID between", value1, value2, "createUserId"); + return (Criteria) this; + } + + public Criteria andCreateUserIdNotBetween(String value1, String value2) { + addCriterion("CREATE_USER_ID not between", value1, value2, "createUserId"); + return (Criteria) this; + } + + public Criteria andLastUpdateTimeIsNull() { + addCriterion("LAST_UPDATE_TIME is null"); + return (Criteria) this; + } + + public Criteria andLastUpdateTimeIsNotNull() { + addCriterion("LAST_UPDATE_TIME is not null"); + return (Criteria) this; + } + + public Criteria andLastUpdateTimeEqualTo(Long value) { + addCriterion("LAST_UPDATE_TIME =", value, "lastUpdateTime"); + return (Criteria) this; + } + + public Criteria andLastUpdateTimeNotEqualTo(Long value) { + addCriterion("LAST_UPDATE_TIME <>", value, "lastUpdateTime"); + return (Criteria) this; + } + + public Criteria andLastUpdateTimeGreaterThan(Long value) { + addCriterion("LAST_UPDATE_TIME >", value, "lastUpdateTime"); + return (Criteria) this; + } + + public Criteria andLastUpdateTimeGreaterThanOrEqualTo(Long value) { + addCriterion("LAST_UPDATE_TIME >=", value, "lastUpdateTime"); + return (Criteria) this; + } + + public Criteria andLastUpdateTimeLessThan(Long value) { + addCriterion("LAST_UPDATE_TIME <", value, "lastUpdateTime"); + return (Criteria) this; + } + + public Criteria andLastUpdateTimeLessThanOrEqualTo(Long value) { + addCriterion("LAST_UPDATE_TIME <=", value, "lastUpdateTime"); + return (Criteria) this; + } + + public Criteria andLastUpdateTimeIn(List values) { + addCriterion("LAST_UPDATE_TIME in", values, "lastUpdateTime"); + return (Criteria) this; + } + + public Criteria andLastUpdateTimeNotIn(List values) { + addCriterion("LAST_UPDATE_TIME not in", values, "lastUpdateTime"); + return (Criteria) this; + } + + public Criteria andLastUpdateTimeBetween(Long value1, Long value2) { + addCriterion("LAST_UPDATE_TIME between", value1, value2, "lastUpdateTime"); + return (Criteria) this; + } + + public Criteria andLastUpdateTimeNotBetween(Long value1, Long value2) { + addCriterion("LAST_UPDATE_TIME not between", value1, value2, "lastUpdateTime"); + return (Criteria) this; + } + + public Criteria andLastUpdateUserIdIsNull() { + addCriterion("LAST_UPDATE_USER_ID is null"); + return (Criteria) this; + } + + public Criteria andLastUpdateUserIdIsNotNull() { + addCriterion("LAST_UPDATE_USER_ID is not null"); + return (Criteria) this; + } + + public Criteria andLastUpdateUserIdEqualTo(String value) { + addCriterion("LAST_UPDATE_USER_ID =", value, "lastUpdateUserId"); + return (Criteria) this; + } + + public Criteria andLastUpdateUserIdNotEqualTo(String value) { + addCriterion("LAST_UPDATE_USER_ID <>", value, "lastUpdateUserId"); + return (Criteria) this; + } + + public Criteria andLastUpdateUserIdGreaterThan(String value) { + addCriterion("LAST_UPDATE_USER_ID >", value, "lastUpdateUserId"); + return (Criteria) this; + } + + public Criteria andLastUpdateUserIdGreaterThanOrEqualTo(String value) { + addCriterion("LAST_UPDATE_USER_ID >=", value, "lastUpdateUserId"); + return (Criteria) this; + } + + public Criteria andLastUpdateUserIdLessThan(String value) { + addCriterion("LAST_UPDATE_USER_ID <", value, "lastUpdateUserId"); + return (Criteria) this; + } + + public Criteria andLastUpdateUserIdLessThanOrEqualTo(String value) { + addCriterion("LAST_UPDATE_USER_ID <=", value, "lastUpdateUserId"); + return (Criteria) this; + } + + public Criteria andLastUpdateUserIdLike(String value) { + addCriterion("LAST_UPDATE_USER_ID like", value, "lastUpdateUserId"); + return (Criteria) this; + } + + public Criteria andLastUpdateUserIdNotLike(String value) { + addCriterion("LAST_UPDATE_USER_ID not like", value, "lastUpdateUserId"); + return (Criteria) this; + } + + public Criteria andLastUpdateUserIdIn(List values) { + addCriterion("LAST_UPDATE_USER_ID in", values, "lastUpdateUserId"); + return (Criteria) this; + } + + public Criteria andLastUpdateUserIdNotIn(List values) { + addCriterion("LAST_UPDATE_USER_ID not in", values, "lastUpdateUserId"); + return (Criteria) this; + } + + public Criteria andLastUpdateUserIdBetween(String value1, String value2) { + addCriterion("LAST_UPDATE_USER_ID between", value1, value2, "lastUpdateUserId"); + return (Criteria) this; + } + + public Criteria andLastUpdateUserIdNotBetween(String value1, String value2) { + addCriterion("LAST_UPDATE_USER_ID not between", value1, value2, "lastUpdateUserId"); + return (Criteria) this; + } + + public Criteria andApplicationIdIsNull() { + addCriterion("APPLICATION_ID is null"); + return (Criteria) this; + } + + public Criteria andApplicationIdIsNotNull() { + addCriterion("APPLICATION_ID is not null"); + return (Criteria) this; + } + + public Criteria andApplicationIdEqualTo(String value) { + addCriterion("APPLICATION_ID =", value, "applicationId"); + return (Criteria) this; + } + + public Criteria andApplicationIdNotEqualTo(String value) { + addCriterion("APPLICATION_ID <>", value, "applicationId"); + return (Criteria) this; + } + + public Criteria andApplicationIdGreaterThan(String value) { + addCriterion("APPLICATION_ID >", value, "applicationId"); + return (Criteria) this; + } + + public Criteria andApplicationIdGreaterThanOrEqualTo(String value) { + addCriterion("APPLICATION_ID >=", value, "applicationId"); + return (Criteria) this; + } + + public Criteria andApplicationIdLessThan(String value) { + addCriterion("APPLICATION_ID <", value, "applicationId"); + return (Criteria) this; + } + + public Criteria andApplicationIdLessThanOrEqualTo(String value) { + addCriterion("APPLICATION_ID <=", value, "applicationId"); + return (Criteria) this; + } + + public Criteria andApplicationIdLike(String value) { + addCriterion("APPLICATION_ID like", value, "applicationId"); + return (Criteria) this; + } + + public Criteria andApplicationIdNotLike(String value) { + addCriterion("APPLICATION_ID not like", value, "applicationId"); + return (Criteria) this; + } + + public Criteria andApplicationIdIn(List values) { + addCriterion("APPLICATION_ID in", values, "applicationId"); + return (Criteria) this; + } + + public Criteria andApplicationIdNotIn(List values) { + addCriterion("APPLICATION_ID not in", values, "applicationId"); + return (Criteria) this; + } + + public Criteria andApplicationIdBetween(String value1, String value2) { + addCriterion("APPLICATION_ID between", value1, value2, "applicationId"); + return (Criteria) this; + } + + public Criteria andApplicationIdNotBetween(String value1, String value2) { + addCriterion("APPLICATION_ID not between", value1, value2, "applicationId"); + return (Criteria) this; + } + + public Criteria andServiceNameIsNull() { + addCriterion("SERVICE_NAME is null"); + return (Criteria) this; + } + + public Criteria andServiceNameIsNotNull() { + addCriterion("SERVICE_NAME is not null"); + return (Criteria) this; + } + + public Criteria andServiceNameEqualTo(String value) { + addCriterion("SERVICE_NAME =", value, "serviceName"); + return (Criteria) this; + } + + public Criteria andServiceNameNotEqualTo(String value) { + addCriterion("SERVICE_NAME <>", value, "serviceName"); + return (Criteria) this; + } + + public Criteria andServiceNameGreaterThan(String value) { + addCriterion("SERVICE_NAME >", value, "serviceName"); + return (Criteria) this; + } + + public Criteria andServiceNameGreaterThanOrEqualTo(String value) { + addCriterion("SERVICE_NAME >=", value, "serviceName"); + return (Criteria) this; + } + + public Criteria andServiceNameLessThan(String value) { + addCriterion("SERVICE_NAME <", value, "serviceName"); + return (Criteria) this; + } + + public Criteria andServiceNameLessThanOrEqualTo(String value) { + addCriterion("SERVICE_NAME <=", value, "serviceName"); + return (Criteria) this; + } + + public Criteria andServiceNameLike(String value) { + addCriterion("SERVICE_NAME like", value, "serviceName"); + return (Criteria) this; + } + + public Criteria andServiceNameNotLike(String value) { + addCriterion("SERVICE_NAME not like", value, "serviceName"); + return (Criteria) this; + } + + public Criteria andServiceNameIn(List values) { + addCriterion("SERVICE_NAME in", values, "serviceName"); + return (Criteria) this; + } + + public Criteria andServiceNameNotIn(List values) { + addCriterion("SERVICE_NAME not in", values, "serviceName"); + return (Criteria) this; + } + + public Criteria andServiceNameBetween(String value1, String value2) { + addCriterion("SERVICE_NAME between", value1, value2, "serviceName"); + return (Criteria) this; + } + + public Criteria andServiceNameNotBetween(String value1, String value2) { + addCriterion("SERVICE_NAME not between", value1, value2, "serviceName"); + return (Criteria) this; + } + + public Criteria andServiceCodeIsNull() { + addCriterion("SERVICE_CODE is null"); + return (Criteria) this; + } + + public Criteria andServiceCodeIsNotNull() { + addCriterion("SERVICE_CODE is not null"); + return (Criteria) this; + } + + public Criteria andServiceCodeEqualTo(String value) { + addCriterion("SERVICE_CODE =", value, "serviceCode"); + return (Criteria) this; + } + + public Criteria andServiceCodeNotEqualTo(String value) { + addCriterion("SERVICE_CODE <>", value, "serviceCode"); + return (Criteria) this; + } + + public Criteria andServiceCodeGreaterThan(String value) { + addCriterion("SERVICE_CODE >", value, "serviceCode"); + return (Criteria) this; + } + + public Criteria andServiceCodeGreaterThanOrEqualTo(String value) { + addCriterion("SERVICE_CODE >=", value, "serviceCode"); + return (Criteria) this; + } + + public Criteria andServiceCodeLessThan(String value) { + addCriterion("SERVICE_CODE <", value, "serviceCode"); + return (Criteria) this; + } + + public Criteria andServiceCodeLessThanOrEqualTo(String value) { + addCriterion("SERVICE_CODE <=", value, "serviceCode"); + return (Criteria) this; + } + + public Criteria andServiceCodeLike(String value) { + addCriterion("SERVICE_CODE like", value, "serviceCode"); + return (Criteria) this; + } + + public Criteria andServiceCodeNotLike(String value) { + addCriterion("SERVICE_CODE not like", value, "serviceCode"); + return (Criteria) this; + } + + public Criteria andServiceCodeIn(List values) { + addCriterion("SERVICE_CODE in", values, "serviceCode"); + return (Criteria) this; + } + + public Criteria andServiceCodeNotIn(List values) { + addCriterion("SERVICE_CODE not in", values, "serviceCode"); + return (Criteria) this; + } + + public Criteria andServiceCodeBetween(String value1, String value2) { + addCriterion("SERVICE_CODE between", value1, value2, "serviceCode"); + return (Criteria) this; + } + + public Criteria andServiceCodeNotBetween(String value1, String value2) { + addCriterion("SERVICE_CODE not between", value1, value2, "serviceCode"); + return (Criteria) this; + } + + public Criteria andRemarkIsNull() { + addCriterion("REMARK is null"); + return (Criteria) this; + } + + public Criteria andRemarkIsNotNull() { + addCriterion("REMARK is not null"); + return (Criteria) this; + } + + public Criteria andRemarkEqualTo(String value) { + addCriterion("REMARK =", value, "remark"); + return (Criteria) this; + } + + public Criteria andRemarkNotEqualTo(String value) { + addCriterion("REMARK <>", value, "remark"); + return (Criteria) this; + } + + public Criteria andRemarkGreaterThan(String value) { + addCriterion("REMARK >", value, "remark"); + return (Criteria) this; + } + + public Criteria andRemarkGreaterThanOrEqualTo(String value) { + addCriterion("REMARK >=", value, "remark"); + return (Criteria) this; + } + + public Criteria andRemarkLessThan(String value) { + addCriterion("REMARK <", value, "remark"); + return (Criteria) this; + } + + public Criteria andRemarkLessThanOrEqualTo(String value) { + addCriterion("REMARK <=", value, "remark"); + return (Criteria) this; + } + + public Criteria andRemarkLike(String value) { + addCriterion("REMARK like", value, "remark"); + return (Criteria) this; + } + + public Criteria andRemarkNotLike(String value) { + addCriterion("REMARK not like", value, "remark"); + return (Criteria) this; + } + + public Criteria andRemarkIn(List values) { + addCriterion("REMARK in", values, "remark"); + return (Criteria) this; + } + + public Criteria andRemarkNotIn(List values) { + addCriterion("REMARK not in", values, "remark"); + return (Criteria) this; + } + + public Criteria andRemarkBetween(String value1, String value2) { + addCriterion("REMARK between", value1, value2, "remark"); + return (Criteria) this; + } + + public Criteria andRemarkNotBetween(String value1, String value2) { + addCriterion("REMARK not between", value1, value2, "remark"); + return (Criteria) this; + } + + public Criteria andStatusIsNull() { + addCriterion("STATUS is null"); + return (Criteria) this; + } + + public Criteria andStatusIsNotNull() { + addCriterion("STATUS is not null"); + return (Criteria) this; + } + + public Criteria andStatusEqualTo(Short value) { + addCriterion("STATUS =", value, "status"); + return (Criteria) this; + } + + public Criteria andStatusNotEqualTo(Short value) { + addCriterion("STATUS <>", value, "status"); + return (Criteria) this; + } + + public Criteria andStatusGreaterThan(Short value) { + addCriterion("STATUS >", value, "status"); + return (Criteria) this; + } + + public Criteria andStatusGreaterThanOrEqualTo(Short value) { + addCriterion("STATUS >=", value, "status"); + return (Criteria) this; + } + + public Criteria andStatusLessThan(Short value) { + addCriterion("STATUS <", value, "status"); + return (Criteria) this; + } + + public Criteria andStatusLessThanOrEqualTo(Short value) { + addCriterion("STATUS <=", value, "status"); + return (Criteria) this; + } + + public Criteria andStatusIn(List values) { + addCriterion("STATUS in", values, "status"); + return (Criteria) this; + } + + public Criteria andStatusNotIn(List values) { + addCriterion("STATUS not in", values, "status"); + return (Criteria) this; + } + + public Criteria andStatusBetween(Short value1, Short value2) { + addCriterion("STATUS between", value1, value2, "status"); + return (Criteria) this; + } + + public Criteria andStatusNotBetween(Short value1, Short value2) { + addCriterion("STATUS not between", value1, value2, "status"); + return (Criteria) this; + } + } + + public static class Criteria extends GeneratedCriteria { + + protected Criteria() { + super(); + } + } + + public static class Criterion { + private String condition; + + private Object value; + + private Object secondValue; + + private boolean noValue; + + private boolean singleValue; + + private boolean betweenValue; + + private boolean listValue; + + private String typeHandler; + + public String getCondition() { + return condition; + } + + public Object getValue() { + return value; + } + + public Object getSecondValue() { + return secondValue; + } + + public boolean isNoValue() { + return noValue; + } + + public boolean isSingleValue() { + return singleValue; + } + + public boolean isBetweenValue() { + return betweenValue; + } + + public boolean isListValue() { + return listValue; + } + + public String getTypeHandler() { + return typeHandler; + } + + protected Criterion(String condition) { + super(); + this.condition = condition; + this.typeHandler = null; + this.noValue = true; + } + + protected Criterion(String condition, Object value, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.typeHandler = typeHandler; + if (value instanceof List) { + this.listValue = true; + } else { + this.singleValue = true; + } + } + + protected Criterion(String condition, Object value) { + this(condition, value, null); + } + + protected Criterion(String condition, Object value, Object secondValue, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.secondValue = secondValue; + this.typeHandler = typeHandler; + this.betweenValue = true; + } + + protected Criterion(String condition, Object value, Object secondValue) { + this(condition, value, secondValue, null); + } + } +} \ No newline at end of file diff --git a/itools-core/itools-model/src/main/java/com/itools/core/rbac/dto/AuthResourceDTO.java b/itools-core/itools-model/src/main/java/com/itools/core/rbac/dto/AuthResourceDTO.java new file mode 100644 index 0000000000000000000000000000000000000000..e9ff06f6e582d1212b86d48d3f04e933db04dbde --- /dev/null +++ b/itools-core/itools-model/src/main/java/com/itools/core/rbac/dto/AuthResourceDTO.java @@ -0,0 +1,103 @@ +package com.itools.core.rbac.dto; + +public class AuthResourceDTO { + private String id; + + private String authorizationId; + + private String resourceId; + + private Short type; + + private Short status; + + private Long createTime; + + private String createUserId; + + private Long lastUpdateTime; + + private String lastUpdateUserId; + + private String applicationId; + + public String getId() { + return id; + } + + public void setId(String id) { + this.id = id; + } + + public String getAuthorizationId() { + return authorizationId; + } + + public void setAuthorizationId(String authorizationId) { + this.authorizationId = authorizationId; + } + + public String getResourceId() { + return resourceId; + } + + public void setResourceId(String resourceId) { + this.resourceId = resourceId; + } + + public Short getType() { + return type; + } + + public void setType(Short type) { + this.type = type; + } + + public Short getStatus() { + return status; + } + + public void setStatus(Short status) { + this.status = status; + } + + public Long getCreateTime() { + return createTime; + } + + public void setCreateTime(Long createTime) { + this.createTime = createTime; + } + + public String getCreateUserId() { + return createUserId; + } + + public void setCreateUserId(String createUserId) { + this.createUserId = createUserId; + } + + public Long getLastUpdateTime() { + return lastUpdateTime; + } + + public void setLastUpdateTime(Long lastUpdateTime) { + this.lastUpdateTime = lastUpdateTime; + } + + public String getLastUpdateUserId() { + return lastUpdateUserId; + } + + public void setLastUpdateUserId(String lastUpdateUserId) { + this.lastUpdateUserId = lastUpdateUserId; + } + + public String getApplicationId() { + return applicationId; + } + + public void setApplicationId(String applicationId) { + this.applicationId = applicationId; + } +} \ No newline at end of file diff --git a/itools-core/itools-model/src/main/java/com/itools/core/rbac/dto/AuthResourceDTOExample.java b/itools-core/itools-model/src/main/java/com/itools/core/rbac/dto/AuthResourceDTOExample.java new file mode 100644 index 0000000000000000000000000000000000000000..647de04b8518a5ab28fd00f00961a05163c75609 --- /dev/null +++ b/itools-core/itools-model/src/main/java/com/itools/core/rbac/dto/AuthResourceDTOExample.java @@ -0,0 +1,860 @@ +package com.itools.core.rbac.dto; + +import java.util.ArrayList; +import java.util.List; + +public class AuthResourceDTOExample { + protected String orderByClause; + + protected boolean distinct; + + protected List oredCriteria; + + public AuthResourceDTOExample() { + oredCriteria = new ArrayList(); + } + + public void setOrderByClause(String orderByClause) { + this.orderByClause = orderByClause; + } + + public String getOrderByClause() { + return orderByClause; + } + + public void setDistinct(boolean distinct) { + this.distinct = distinct; + } + + public boolean isDistinct() { + return distinct; + } + + public List getOredCriteria() { + return oredCriteria; + } + + public void or(Criteria criteria) { + oredCriteria.add(criteria); + } + + public Criteria or() { + Criteria criteria = createCriteriaInternal(); + oredCriteria.add(criteria); + return criteria; + } + + public Criteria createCriteria() { + Criteria criteria = createCriteriaInternal(); + if (oredCriteria.size() == 0) { + oredCriteria.add(criteria); + } + return criteria; + } + + protected Criteria createCriteriaInternal() { + Criteria criteria = new Criteria(); + return criteria; + } + + public void clear() { + oredCriteria.clear(); + orderByClause = null; + distinct = false; + } + + protected abstract static class GeneratedCriteria { + protected List criteria; + + protected GeneratedCriteria() { + super(); + criteria = new ArrayList(); + } + + public boolean isValid() { + return criteria.size() > 0; + } + + public List getAllCriteria() { + return criteria; + } + + public List getCriteria() { + return criteria; + } + + protected void addCriterion(String condition) { + if (condition == null) { + throw new RuntimeException("Value for condition cannot be null"); + } + criteria.add(new Criterion(condition)); + } + + protected void addCriterion(String condition, Object value, String property) { + if (value == null) { + throw new RuntimeException("Value for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value)); + } + + protected void addCriterion(String condition, Object value1, Object value2, String property) { + if (value1 == null || value2 == null) { + throw new RuntimeException("Between values for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value1, value2)); + } + + public Criteria andIdIsNull() { + addCriterion("ID is null"); + return (Criteria) this; + } + + public Criteria andIdIsNotNull() { + addCriterion("ID is not null"); + return (Criteria) this; + } + + public Criteria andIdEqualTo(String value) { + addCriterion("ID =", value, "id"); + return (Criteria) this; + } + + public Criteria andIdNotEqualTo(String value) { + addCriterion("ID <>", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThan(String value) { + addCriterion("ID >", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThanOrEqualTo(String value) { + addCriterion("ID >=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThan(String value) { + addCriterion("ID <", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThanOrEqualTo(String value) { + addCriterion("ID <=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLike(String value) { + addCriterion("ID like", value, "id"); + return (Criteria) this; + } + + public Criteria andIdNotLike(String value) { + addCriterion("ID not like", value, "id"); + return (Criteria) this; + } + + public Criteria andIdIn(List values) { + addCriterion("ID in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdNotIn(List values) { + addCriterion("ID not in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdBetween(String value1, String value2) { + addCriterion("ID between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andIdNotBetween(String value1, String value2) { + addCriterion("ID not between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andAuthorizationIdIsNull() { + addCriterion("AUTHORIZATION_ID is null"); + return (Criteria) this; + } + + public Criteria andAuthorizationIdIsNotNull() { + addCriterion("AUTHORIZATION_ID is not null"); + return (Criteria) this; + } + + public Criteria andAuthorizationIdEqualTo(String value) { + addCriterion("AUTHORIZATION_ID =", value, "authorizationId"); + return (Criteria) this; + } + + public Criteria andAuthorizationIdNotEqualTo(String value) { + addCriterion("AUTHORIZATION_ID <>", value, "authorizationId"); + return (Criteria) this; + } + + public Criteria andAuthorizationIdGreaterThan(String value) { + addCriterion("AUTHORIZATION_ID >", value, "authorizationId"); + return (Criteria) this; + } + + public Criteria andAuthorizationIdGreaterThanOrEqualTo(String value) { + addCriterion("AUTHORIZATION_ID >=", value, "authorizationId"); + return (Criteria) this; + } + + public Criteria andAuthorizationIdLessThan(String value) { + addCriterion("AUTHORIZATION_ID <", value, "authorizationId"); + return (Criteria) this; + } + + public Criteria andAuthorizationIdLessThanOrEqualTo(String value) { + addCriterion("AUTHORIZATION_ID <=", value, "authorizationId"); + return (Criteria) this; + } + + public Criteria andAuthorizationIdLike(String value) { + addCriterion("AUTHORIZATION_ID like", value, "authorizationId"); + return (Criteria) this; + } + + public Criteria andAuthorizationIdNotLike(String value) { + addCriterion("AUTHORIZATION_ID not like", value, "authorizationId"); + return (Criteria) this; + } + + public Criteria andAuthorizationIdIn(List values) { + addCriterion("AUTHORIZATION_ID in", values, "authorizationId"); + return (Criteria) this; + } + + public Criteria andAuthorizationIdNotIn(List values) { + addCriterion("AUTHORIZATION_ID not in", values, "authorizationId"); + return (Criteria) this; + } + + public Criteria andAuthorizationIdBetween(String value1, String value2) { + addCriterion("AUTHORIZATION_ID between", value1, value2, "authorizationId"); + return (Criteria) this; + } + + public Criteria andAuthorizationIdNotBetween(String value1, String value2) { + addCriterion("AUTHORIZATION_ID not between", value1, value2, "authorizationId"); + return (Criteria) this; + } + + public Criteria andResourceIdIsNull() { + addCriterion("RESOURCE_ID is null"); + return (Criteria) this; + } + + public Criteria andResourceIdIsNotNull() { + addCriterion("RESOURCE_ID is not null"); + return (Criteria) this; + } + + public Criteria andResourceIdEqualTo(String value) { + addCriterion("RESOURCE_ID =", value, "resourceId"); + return (Criteria) this; + } + + public Criteria andResourceIdNotEqualTo(String value) { + addCriterion("RESOURCE_ID <>", value, "resourceId"); + return (Criteria) this; + } + + public Criteria andResourceIdGreaterThan(String value) { + addCriterion("RESOURCE_ID >", value, "resourceId"); + return (Criteria) this; + } + + public Criteria andResourceIdGreaterThanOrEqualTo(String value) { + addCriterion("RESOURCE_ID >=", value, "resourceId"); + return (Criteria) this; + } + + public Criteria andResourceIdLessThan(String value) { + addCriterion("RESOURCE_ID <", value, "resourceId"); + return (Criteria) this; + } + + public Criteria andResourceIdLessThanOrEqualTo(String value) { + addCriterion("RESOURCE_ID <=", value, "resourceId"); + return (Criteria) this; + } + + public Criteria andResourceIdLike(String value) { + addCriterion("RESOURCE_ID like", value, "resourceId"); + return (Criteria) this; + } + + public Criteria andResourceIdNotLike(String value) { + addCriterion("RESOURCE_ID not like", value, "resourceId"); + return (Criteria) this; + } + + public Criteria andResourceIdIn(List values) { + addCriterion("RESOURCE_ID in", values, "resourceId"); + return (Criteria) this; + } + + public Criteria andResourceIdNotIn(List values) { + addCriterion("RESOURCE_ID not in", values, "resourceId"); + return (Criteria) this; + } + + public Criteria andResourceIdBetween(String value1, String value2) { + addCriterion("RESOURCE_ID between", value1, value2, "resourceId"); + return (Criteria) this; + } + + public Criteria andResourceIdNotBetween(String value1, String value2) { + addCriterion("RESOURCE_ID not between", value1, value2, "resourceId"); + return (Criteria) this; + } + + public Criteria andTypeIsNull() { + addCriterion("TYPE is null"); + return (Criteria) this; + } + + public Criteria andTypeIsNotNull() { + addCriterion("TYPE is not null"); + return (Criteria) this; + } + + public Criteria andTypeEqualTo(Short value) { + addCriterion("TYPE =", value, "type"); + return (Criteria) this; + } + + public Criteria andTypeNotEqualTo(Short value) { + addCriterion("TYPE <>", value, "type"); + return (Criteria) this; + } + + public Criteria andTypeGreaterThan(Short value) { + addCriterion("TYPE >", value, "type"); + return (Criteria) this; + } + + public Criteria andTypeGreaterThanOrEqualTo(Short value) { + addCriterion("TYPE >=", value, "type"); + return (Criteria) this; + } + + public Criteria andTypeLessThan(Short value) { + addCriterion("TYPE <", value, "type"); + return (Criteria) this; + } + + public Criteria andTypeLessThanOrEqualTo(Short value) { + addCriterion("TYPE <=", value, "type"); + return (Criteria) this; + } + + public Criteria andTypeIn(List values) { + addCriterion("TYPE in", values, "type"); + return (Criteria) this; + } + + public Criteria andTypeNotIn(List values) { + addCriterion("TYPE not in", values, "type"); + return (Criteria) this; + } + + public Criteria andTypeBetween(Short value1, Short value2) { + addCriterion("TYPE between", value1, value2, "type"); + return (Criteria) this; + } + + public Criteria andTypeNotBetween(Short value1, Short value2) { + addCriterion("TYPE not between", value1, value2, "type"); + return (Criteria) this; + } + + public Criteria andStatusIsNull() { + addCriterion("STATUS is null"); + return (Criteria) this; + } + + public Criteria andStatusIsNotNull() { + addCriterion("STATUS is not null"); + return (Criteria) this; + } + + public Criteria andStatusEqualTo(Short value) { + addCriterion("STATUS =", value, "status"); + return (Criteria) this; + } + + public Criteria andStatusNotEqualTo(Short value) { + addCriterion("STATUS <>", value, "status"); + return (Criteria) this; + } + + public Criteria andStatusGreaterThan(Short value) { + addCriterion("STATUS >", value, "status"); + return (Criteria) this; + } + + public Criteria andStatusGreaterThanOrEqualTo(Short value) { + addCriterion("STATUS >=", value, "status"); + return (Criteria) this; + } + + public Criteria andStatusLessThan(Short value) { + addCriterion("STATUS <", value, "status"); + return (Criteria) this; + } + + public Criteria andStatusLessThanOrEqualTo(Short value) { + addCriterion("STATUS <=", value, "status"); + return (Criteria) this; + } + + public Criteria andStatusIn(List values) { + addCriterion("STATUS in", values, "status"); + return (Criteria) this; + } + + public Criteria andStatusNotIn(List values) { + addCriterion("STATUS not in", values, "status"); + return (Criteria) this; + } + + public Criteria andStatusBetween(Short value1, Short value2) { + addCriterion("STATUS between", value1, value2, "status"); + return (Criteria) this; + } + + public Criteria andStatusNotBetween(Short value1, Short value2) { + addCriterion("STATUS not between", value1, value2, "status"); + return (Criteria) this; + } + + public Criteria andCreateTimeIsNull() { + addCriterion("CREATE_TIME is null"); + return (Criteria) this; + } + + public Criteria andCreateTimeIsNotNull() { + addCriterion("CREATE_TIME is not null"); + return (Criteria) this; + } + + public Criteria andCreateTimeEqualTo(Long value) { + addCriterion("CREATE_TIME =", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeNotEqualTo(Long value) { + addCriterion("CREATE_TIME <>", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeGreaterThan(Long value) { + addCriterion("CREATE_TIME >", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeGreaterThanOrEqualTo(Long value) { + addCriterion("CREATE_TIME >=", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeLessThan(Long value) { + addCriterion("CREATE_TIME <", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeLessThanOrEqualTo(Long value) { + addCriterion("CREATE_TIME <=", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeIn(List values) { + addCriterion("CREATE_TIME in", values, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeNotIn(List values) { + addCriterion("CREATE_TIME not in", values, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeBetween(Long value1, Long value2) { + addCriterion("CREATE_TIME between", value1, value2, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeNotBetween(Long value1, Long value2) { + addCriterion("CREATE_TIME not between", value1, value2, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateUserIdIsNull() { + addCriterion("CREATE_USER_ID is null"); + return (Criteria) this; + } + + public Criteria andCreateUserIdIsNotNull() { + addCriterion("CREATE_USER_ID is not null"); + return (Criteria) this; + } + + public Criteria andCreateUserIdEqualTo(String value) { + addCriterion("CREATE_USER_ID =", value, "createUserId"); + return (Criteria) this; + } + + public Criteria andCreateUserIdNotEqualTo(String value) { + addCriterion("CREATE_USER_ID <>", value, "createUserId"); + return (Criteria) this; + } + + public Criteria andCreateUserIdGreaterThan(String value) { + addCriterion("CREATE_USER_ID >", value, "createUserId"); + return (Criteria) this; + } + + public Criteria andCreateUserIdGreaterThanOrEqualTo(String value) { + addCriterion("CREATE_USER_ID >=", value, "createUserId"); + return (Criteria) this; + } + + public Criteria andCreateUserIdLessThan(String value) { + addCriterion("CREATE_USER_ID <", value, "createUserId"); + return (Criteria) this; + } + + public Criteria andCreateUserIdLessThanOrEqualTo(String value) { + addCriterion("CREATE_USER_ID <=", value, "createUserId"); + return (Criteria) this; + } + + public Criteria andCreateUserIdLike(String value) { + addCriterion("CREATE_USER_ID like", value, "createUserId"); + return (Criteria) this; + } + + public Criteria andCreateUserIdNotLike(String value) { + addCriterion("CREATE_USER_ID not like", value, "createUserId"); + return (Criteria) this; + } + + public Criteria andCreateUserIdIn(List values) { + addCriterion("CREATE_USER_ID in", values, "createUserId"); + return (Criteria) this; + } + + public Criteria andCreateUserIdNotIn(List values) { + addCriterion("CREATE_USER_ID not in", values, "createUserId"); + return (Criteria) this; + } + + public Criteria andCreateUserIdBetween(String value1, String value2) { + addCriterion("CREATE_USER_ID between", value1, value2, "createUserId"); + return (Criteria) this; + } + + public Criteria andCreateUserIdNotBetween(String value1, String value2) { + addCriterion("CREATE_USER_ID not between", value1, value2, "createUserId"); + return (Criteria) this; + } + + public Criteria andLastUpdateTimeIsNull() { + addCriterion("LAST_UPDATE_TIME is null"); + return (Criteria) this; + } + + public Criteria andLastUpdateTimeIsNotNull() { + addCriterion("LAST_UPDATE_TIME is not null"); + return (Criteria) this; + } + + public Criteria andLastUpdateTimeEqualTo(Long value) { + addCriterion("LAST_UPDATE_TIME =", value, "lastUpdateTime"); + return (Criteria) this; + } + + public Criteria andLastUpdateTimeNotEqualTo(Long value) { + addCriterion("LAST_UPDATE_TIME <>", value, "lastUpdateTime"); + return (Criteria) this; + } + + public Criteria andLastUpdateTimeGreaterThan(Long value) { + addCriterion("LAST_UPDATE_TIME >", value, "lastUpdateTime"); + return (Criteria) this; + } + + public Criteria andLastUpdateTimeGreaterThanOrEqualTo(Long value) { + addCriterion("LAST_UPDATE_TIME >=", value, "lastUpdateTime"); + return (Criteria) this; + } + + public Criteria andLastUpdateTimeLessThan(Long value) { + addCriterion("LAST_UPDATE_TIME <", value, "lastUpdateTime"); + return (Criteria) this; + } + + public Criteria andLastUpdateTimeLessThanOrEqualTo(Long value) { + addCriterion("LAST_UPDATE_TIME <=", value, "lastUpdateTime"); + return (Criteria) this; + } + + public Criteria andLastUpdateTimeIn(List values) { + addCriterion("LAST_UPDATE_TIME in", values, "lastUpdateTime"); + return (Criteria) this; + } + + public Criteria andLastUpdateTimeNotIn(List values) { + addCriterion("LAST_UPDATE_TIME not in", values, "lastUpdateTime"); + return (Criteria) this; + } + + public Criteria andLastUpdateTimeBetween(Long value1, Long value2) { + addCriterion("LAST_UPDATE_TIME between", value1, value2, "lastUpdateTime"); + return (Criteria) this; + } + + public Criteria andLastUpdateTimeNotBetween(Long value1, Long value2) { + addCriterion("LAST_UPDATE_TIME not between", value1, value2, "lastUpdateTime"); + return (Criteria) this; + } + + public Criteria andLastUpdateUserIdIsNull() { + addCriterion("LAST_UPDATE_USER_ID is null"); + return (Criteria) this; + } + + public Criteria andLastUpdateUserIdIsNotNull() { + addCriterion("LAST_UPDATE_USER_ID is not null"); + return (Criteria) this; + } + + public Criteria andLastUpdateUserIdEqualTo(String value) { + addCriterion("LAST_UPDATE_USER_ID =", value, "lastUpdateUserId"); + return (Criteria) this; + } + + public Criteria andLastUpdateUserIdNotEqualTo(String value) { + addCriterion("LAST_UPDATE_USER_ID <>", value, "lastUpdateUserId"); + return (Criteria) this; + } + + public Criteria andLastUpdateUserIdGreaterThan(String value) { + addCriterion("LAST_UPDATE_USER_ID >", value, "lastUpdateUserId"); + return (Criteria) this; + } + + public Criteria andLastUpdateUserIdGreaterThanOrEqualTo(String value) { + addCriterion("LAST_UPDATE_USER_ID >=", value, "lastUpdateUserId"); + return (Criteria) this; + } + + public Criteria andLastUpdateUserIdLessThan(String value) { + addCriterion("LAST_UPDATE_USER_ID <", value, "lastUpdateUserId"); + return (Criteria) this; + } + + public Criteria andLastUpdateUserIdLessThanOrEqualTo(String value) { + addCriterion("LAST_UPDATE_USER_ID <=", value, "lastUpdateUserId"); + return (Criteria) this; + } + + public Criteria andLastUpdateUserIdLike(String value) { + addCriterion("LAST_UPDATE_USER_ID like", value, "lastUpdateUserId"); + return (Criteria) this; + } + + public Criteria andLastUpdateUserIdNotLike(String value) { + addCriterion("LAST_UPDATE_USER_ID not like", value, "lastUpdateUserId"); + return (Criteria) this; + } + + public Criteria andLastUpdateUserIdIn(List values) { + addCriterion("LAST_UPDATE_USER_ID in", values, "lastUpdateUserId"); + return (Criteria) this; + } + + public Criteria andLastUpdateUserIdNotIn(List values) { + addCriterion("LAST_UPDATE_USER_ID not in", values, "lastUpdateUserId"); + return (Criteria) this; + } + + public Criteria andLastUpdateUserIdBetween(String value1, String value2) { + addCriterion("LAST_UPDATE_USER_ID between", value1, value2, "lastUpdateUserId"); + return (Criteria) this; + } + + public Criteria andLastUpdateUserIdNotBetween(String value1, String value2) { + addCriterion("LAST_UPDATE_USER_ID not between", value1, value2, "lastUpdateUserId"); + return (Criteria) this; + } + + public Criteria andApplicationIdIsNull() { + addCriterion("APPLICATION_ID is null"); + return (Criteria) this; + } + + public Criteria andApplicationIdIsNotNull() { + addCriterion("APPLICATION_ID is not null"); + return (Criteria) this; + } + + public Criteria andApplicationIdEqualTo(String value) { + addCriterion("APPLICATION_ID =", value, "applicationId"); + return (Criteria) this; + } + + public Criteria andApplicationIdNotEqualTo(String value) { + addCriterion("APPLICATION_ID <>", value, "applicationId"); + return (Criteria) this; + } + + public Criteria andApplicationIdGreaterThan(String value) { + addCriterion("APPLICATION_ID >", value, "applicationId"); + return (Criteria) this; + } + + public Criteria andApplicationIdGreaterThanOrEqualTo(String value) { + addCriterion("APPLICATION_ID >=", value, "applicationId"); + return (Criteria) this; + } + + public Criteria andApplicationIdLessThan(String value) { + addCriterion("APPLICATION_ID <", value, "applicationId"); + return (Criteria) this; + } + + public Criteria andApplicationIdLessThanOrEqualTo(String value) { + addCriterion("APPLICATION_ID <=", value, "applicationId"); + return (Criteria) this; + } + + public Criteria andApplicationIdLike(String value) { + addCriterion("APPLICATION_ID like", value, "applicationId"); + return (Criteria) this; + } + + public Criteria andApplicationIdNotLike(String value) { + addCriterion("APPLICATION_ID not like", value, "applicationId"); + return (Criteria) this; + } + + public Criteria andApplicationIdIn(List values) { + addCriterion("APPLICATION_ID in", values, "applicationId"); + return (Criteria) this; + } + + public Criteria andApplicationIdNotIn(List values) { + addCriterion("APPLICATION_ID not in", values, "applicationId"); + return (Criteria) this; + } + + public Criteria andApplicationIdBetween(String value1, String value2) { + addCriterion("APPLICATION_ID between", value1, value2, "applicationId"); + return (Criteria) this; + } + + public Criteria andApplicationIdNotBetween(String value1, String value2) { + addCriterion("APPLICATION_ID not between", value1, value2, "applicationId"); + return (Criteria) this; + } + } + + public static class Criteria extends GeneratedCriteria { + + protected Criteria() { + super(); + } + } + + public static class Criterion { + private String condition; + + private Object value; + + private Object secondValue; + + private boolean noValue; + + private boolean singleValue; + + private boolean betweenValue; + + private boolean listValue; + + private String typeHandler; + + public String getCondition() { + return condition; + } + + public Object getValue() { + return value; + } + + public Object getSecondValue() { + return secondValue; + } + + public boolean isNoValue() { + return noValue; + } + + public boolean isSingleValue() { + return singleValue; + } + + public boolean isBetweenValue() { + return betweenValue; + } + + public boolean isListValue() { + return listValue; + } + + public String getTypeHandler() { + return typeHandler; + } + + protected Criterion(String condition) { + super(); + this.condition = condition; + this.typeHandler = null; + this.noValue = true; + } + + protected Criterion(String condition, Object value, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.typeHandler = typeHandler; + if (value instanceof List) { + this.listValue = true; + } else { + this.singleValue = true; + } + } + + protected Criterion(String condition, Object value) { + this(condition, value, null); + } + + protected Criterion(String condition, Object value, Object secondValue, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.secondValue = secondValue; + this.typeHandler = typeHandler; + this.betweenValue = true; + } + + protected Criterion(String condition, Object value, Object secondValue) { + this(condition, value, secondValue, null); + } + } +} \ No newline at end of file diff --git a/itools-core/itools-model/src/main/java/com/itools/core/rbac/dto/AuthorizationDTO.java b/itools-core/itools-model/src/main/java/com/itools/core/rbac/dto/AuthorizationDTO.java new file mode 100644 index 0000000000000000000000000000000000000000..f91463f644093d148c98b46b3ee19221c6facd59 --- /dev/null +++ b/itools-core/itools-model/src/main/java/com/itools/core/rbac/dto/AuthorizationDTO.java @@ -0,0 +1,133 @@ +package com.itools.core.rbac.dto; + +public class AuthorizationDTO { + private String id; + + private String name; + + private String parentId; + + private String remark; + + private Short status; + + private String custId; + + private Long createTime; + + private String createUserId; + + private Long lastUpdateTime; + + private String lastUpdateUserId; + + private String applicationId; + + private String code; + + private Short orderBy; + + public String getId() { + return id; + } + + public void setId(String id) { + this.id = id; + } + + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + public String getParentId() { + return parentId; + } + + public void setParentId(String parentId) { + this.parentId = parentId; + } + + public String getRemark() { + return remark; + } + + public void setRemark(String remark) { + this.remark = remark; + } + + public Short getStatus() { + return status; + } + + public void setStatus(Short status) { + this.status = status; + } + + public String getCustId() { + return custId; + } + + public void setCustId(String custId) { + this.custId = custId; + } + + public Long getCreateTime() { + return createTime; + } + + public void setCreateTime(Long createTime) { + this.createTime = createTime; + } + + public String getCreateUserId() { + return createUserId; + } + + public void setCreateUserId(String createUserId) { + this.createUserId = createUserId; + } + + public Long getLastUpdateTime() { + return lastUpdateTime; + } + + public void setLastUpdateTime(Long lastUpdateTime) { + this.lastUpdateTime = lastUpdateTime; + } + + public String getLastUpdateUserId() { + return lastUpdateUserId; + } + + public void setLastUpdateUserId(String lastUpdateUserId) { + this.lastUpdateUserId = lastUpdateUserId; + } + + public String getApplicationId() { + return applicationId; + } + + public void setApplicationId(String applicationId) { + this.applicationId = applicationId; + } + + public String getCode() { + return code; + } + + public void setCode(String code) { + this.code = code; + } + + public Short getOrderBy() { + return orderBy; + } + + public void setOrderBy(Short orderBy) { + this.orderBy = orderBy; + } +} \ No newline at end of file diff --git a/itools-core/itools-model/src/main/java/com/itools/core/rbac/dto/AuthorizationDTOExample.java b/itools-core/itools-model/src/main/java/com/itools/core/rbac/dto/AuthorizationDTOExample.java new file mode 100644 index 0000000000000000000000000000000000000000..3cfefb76eaa54bbe619b6403af576824d0ecb0c8 --- /dev/null +++ b/itools-core/itools-model/src/main/java/com/itools/core/rbac/dto/AuthorizationDTOExample.java @@ -0,0 +1,1070 @@ +package com.itools.core.rbac.dto; + +import java.util.ArrayList; +import java.util.List; + +public class AuthorizationDTOExample { + protected String orderByClause; + + protected boolean distinct; + + protected List oredCriteria; + + public AuthorizationDTOExample() { + oredCriteria = new ArrayList(); + } + + public void setOrderByClause(String orderByClause) { + this.orderByClause = orderByClause; + } + + public String getOrderByClause() { + return orderByClause; + } + + public void setDistinct(boolean distinct) { + this.distinct = distinct; + } + + public boolean isDistinct() { + return distinct; + } + + public List getOredCriteria() { + return oredCriteria; + } + + public void or(Criteria criteria) { + oredCriteria.add(criteria); + } + + public Criteria or() { + Criteria criteria = createCriteriaInternal(); + oredCriteria.add(criteria); + return criteria; + } + + public Criteria createCriteria() { + Criteria criteria = createCriteriaInternal(); + if (oredCriteria.size() == 0) { + oredCriteria.add(criteria); + } + return criteria; + } + + protected Criteria createCriteriaInternal() { + Criteria criteria = new Criteria(); + return criteria; + } + + public void clear() { + oredCriteria.clear(); + orderByClause = null; + distinct = false; + } + + protected abstract static class GeneratedCriteria { + protected List criteria; + + protected GeneratedCriteria() { + super(); + criteria = new ArrayList(); + } + + public boolean isValid() { + return criteria.size() > 0; + } + + public List getAllCriteria() { + return criteria; + } + + public List getCriteria() { + return criteria; + } + + protected void addCriterion(String condition) { + if (condition == null) { + throw new RuntimeException("Value for condition cannot be null"); + } + criteria.add(new Criterion(condition)); + } + + protected void addCriterion(String condition, Object value, String property) { + if (value == null) { + throw new RuntimeException("Value for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value)); + } + + protected void addCriterion(String condition, Object value1, Object value2, String property) { + if (value1 == null || value2 == null) { + throw new RuntimeException("Between values for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value1, value2)); + } + + public Criteria andIdIsNull() { + addCriterion("ID is null"); + return (Criteria) this; + } + + public Criteria andIdIsNotNull() { + addCriterion("ID is not null"); + return (Criteria) this; + } + + public Criteria andIdEqualTo(String value) { + addCriterion("ID =", value, "id"); + return (Criteria) this; + } + + public Criteria andIdNotEqualTo(String value) { + addCriterion("ID <>", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThan(String value) { + addCriterion("ID >", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThanOrEqualTo(String value) { + addCriterion("ID >=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThan(String value) { + addCriterion("ID <", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThanOrEqualTo(String value) { + addCriterion("ID <=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLike(String value) { + addCriterion("ID like", value, "id"); + return (Criteria) this; + } + + public Criteria andIdNotLike(String value) { + addCriterion("ID not like", value, "id"); + return (Criteria) this; + } + + public Criteria andIdIn(List values) { + addCriterion("ID in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdNotIn(List values) { + addCriterion("ID not in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdBetween(String value1, String value2) { + addCriterion("ID between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andIdNotBetween(String value1, String value2) { + addCriterion("ID not between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andNameIsNull() { + addCriterion("NAME is null"); + return (Criteria) this; + } + + public Criteria andNameIsNotNull() { + addCriterion("NAME is not null"); + return (Criteria) this; + } + + public Criteria andNameEqualTo(String value) { + addCriterion("NAME =", value, "name"); + return (Criteria) this; + } + + public Criteria andNameNotEqualTo(String value) { + addCriterion("NAME <>", value, "name"); + return (Criteria) this; + } + + public Criteria andNameGreaterThan(String value) { + addCriterion("NAME >", value, "name"); + return (Criteria) this; + } + + public Criteria andNameGreaterThanOrEqualTo(String value) { + addCriterion("NAME >=", value, "name"); + return (Criteria) this; + } + + public Criteria andNameLessThan(String value) { + addCriterion("NAME <", value, "name"); + return (Criteria) this; + } + + public Criteria andNameLessThanOrEqualTo(String value) { + addCriterion("NAME <=", value, "name"); + return (Criteria) this; + } + + public Criteria andNameLike(String value) { + addCriterion("NAME like", value, "name"); + return (Criteria) this; + } + + public Criteria andNameNotLike(String value) { + addCriterion("NAME not like", value, "name"); + return (Criteria) this; + } + + public Criteria andNameIn(List values) { + addCriterion("NAME in", values, "name"); + return (Criteria) this; + } + + public Criteria andNameNotIn(List values) { + addCriterion("NAME not in", values, "name"); + return (Criteria) this; + } + + public Criteria andNameBetween(String value1, String value2) { + addCriterion("NAME between", value1, value2, "name"); + return (Criteria) this; + } + + public Criteria andNameNotBetween(String value1, String value2) { + addCriterion("NAME not between", value1, value2, "name"); + return (Criteria) this; + } + + public Criteria andParentIdIsNull() { + addCriterion("PARENT_ID is null"); + return (Criteria) this; + } + + public Criteria andParentIdIsNotNull() { + addCriterion("PARENT_ID is not null"); + return (Criteria) this; + } + + public Criteria andParentIdEqualTo(String value) { + addCriterion("PARENT_ID =", value, "parentId"); + return (Criteria) this; + } + + public Criteria andParentIdNotEqualTo(String value) { + addCriterion("PARENT_ID <>", value, "parentId"); + return (Criteria) this; + } + + public Criteria andParentIdGreaterThan(String value) { + addCriterion("PARENT_ID >", value, "parentId"); + return (Criteria) this; + } + + public Criteria andParentIdGreaterThanOrEqualTo(String value) { + addCriterion("PARENT_ID >=", value, "parentId"); + return (Criteria) this; + } + + public Criteria andParentIdLessThan(String value) { + addCriterion("PARENT_ID <", value, "parentId"); + return (Criteria) this; + } + + public Criteria andParentIdLessThanOrEqualTo(String value) { + addCriterion("PARENT_ID <=", value, "parentId"); + return (Criteria) this; + } + + public Criteria andParentIdLike(String value) { + addCriterion("PARENT_ID like", value, "parentId"); + return (Criteria) this; + } + + public Criteria andParentIdNotLike(String value) { + addCriterion("PARENT_ID not like", value, "parentId"); + return (Criteria) this; + } + + public Criteria andParentIdIn(List values) { + addCriterion("PARENT_ID in", values, "parentId"); + return (Criteria) this; + } + + public Criteria andParentIdNotIn(List values) { + addCriterion("PARENT_ID not in", values, "parentId"); + return (Criteria) this; + } + + public Criteria andParentIdBetween(String value1, String value2) { + addCriterion("PARENT_ID between", value1, value2, "parentId"); + return (Criteria) this; + } + + public Criteria andParentIdNotBetween(String value1, String value2) { + addCriterion("PARENT_ID not between", value1, value2, "parentId"); + return (Criteria) this; + } + + public Criteria andRemarkIsNull() { + addCriterion("REMARK is null"); + return (Criteria) this; + } + + public Criteria andRemarkIsNotNull() { + addCriterion("REMARK is not null"); + return (Criteria) this; + } + + public Criteria andRemarkEqualTo(String value) { + addCriterion("REMARK =", value, "remark"); + return (Criteria) this; + } + + public Criteria andRemarkNotEqualTo(String value) { + addCriterion("REMARK <>", value, "remark"); + return (Criteria) this; + } + + public Criteria andRemarkGreaterThan(String value) { + addCriterion("REMARK >", value, "remark"); + return (Criteria) this; + } + + public Criteria andRemarkGreaterThanOrEqualTo(String value) { + addCriterion("REMARK >=", value, "remark"); + return (Criteria) this; + } + + public Criteria andRemarkLessThan(String value) { + addCriterion("REMARK <", value, "remark"); + return (Criteria) this; + } + + public Criteria andRemarkLessThanOrEqualTo(String value) { + addCriterion("REMARK <=", value, "remark"); + return (Criteria) this; + } + + public Criteria andRemarkLike(String value) { + addCriterion("REMARK like", value, "remark"); + return (Criteria) this; + } + + public Criteria andRemarkNotLike(String value) { + addCriterion("REMARK not like", value, "remark"); + return (Criteria) this; + } + + public Criteria andRemarkIn(List values) { + addCriterion("REMARK in", values, "remark"); + return (Criteria) this; + } + + public Criteria andRemarkNotIn(List values) { + addCriterion("REMARK not in", values, "remark"); + return (Criteria) this; + } + + public Criteria andRemarkBetween(String value1, String value2) { + addCriterion("REMARK between", value1, value2, "remark"); + return (Criteria) this; + } + + public Criteria andRemarkNotBetween(String value1, String value2) { + addCriterion("REMARK not between", value1, value2, "remark"); + return (Criteria) this; + } + + public Criteria andStatusIsNull() { + addCriterion("STATUS is null"); + return (Criteria) this; + } + + public Criteria andStatusIsNotNull() { + addCriterion("STATUS is not null"); + return (Criteria) this; + } + + public Criteria andStatusEqualTo(Short value) { + addCriterion("STATUS =", value, "status"); + return (Criteria) this; + } + + public Criteria andStatusNotEqualTo(Short value) { + addCriterion("STATUS <>", value, "status"); + return (Criteria) this; + } + + public Criteria andStatusGreaterThan(Short value) { + addCriterion("STATUS >", value, "status"); + return (Criteria) this; + } + + public Criteria andStatusGreaterThanOrEqualTo(Short value) { + addCriterion("STATUS >=", value, "status"); + return (Criteria) this; + } + + public Criteria andStatusLessThan(Short value) { + addCriterion("STATUS <", value, "status"); + return (Criteria) this; + } + + public Criteria andStatusLessThanOrEqualTo(Short value) { + addCriterion("STATUS <=", value, "status"); + return (Criteria) this; + } + + public Criteria andStatusIn(List values) { + addCriterion("STATUS in", values, "status"); + return (Criteria) this; + } + + public Criteria andStatusNotIn(List values) { + addCriterion("STATUS not in", values, "status"); + return (Criteria) this; + } + + public Criteria andStatusBetween(Short value1, Short value2) { + addCriterion("STATUS between", value1, value2, "status"); + return (Criteria) this; + } + + public Criteria andStatusNotBetween(Short value1, Short value2) { + addCriterion("STATUS not between", value1, value2, "status"); + return (Criteria) this; + } + + public Criteria andCustIdIsNull() { + addCriterion("CUST_ID is null"); + return (Criteria) this; + } + + public Criteria andCustIdIsNotNull() { + addCriterion("CUST_ID is not null"); + return (Criteria) this; + } + + public Criteria andCustIdEqualTo(String value) { + addCriterion("CUST_ID =", value, "custId"); + return (Criteria) this; + } + + public Criteria andCustIdNotEqualTo(String value) { + addCriterion("CUST_ID <>", value, "custId"); + return (Criteria) this; + } + + public Criteria andCustIdGreaterThan(String value) { + addCriterion("CUST_ID >", value, "custId"); + return (Criteria) this; + } + + public Criteria andCustIdGreaterThanOrEqualTo(String value) { + addCriterion("CUST_ID >=", value, "custId"); + return (Criteria) this; + } + + public Criteria andCustIdLessThan(String value) { + addCriterion("CUST_ID <", value, "custId"); + return (Criteria) this; + } + + public Criteria andCustIdLessThanOrEqualTo(String value) { + addCriterion("CUST_ID <=", value, "custId"); + return (Criteria) this; + } + + public Criteria andCustIdLike(String value) { + addCriterion("CUST_ID like", value, "custId"); + return (Criteria) this; + } + + public Criteria andCustIdNotLike(String value) { + addCriterion("CUST_ID not like", value, "custId"); + return (Criteria) this; + } + + public Criteria andCustIdIn(List values) { + addCriterion("CUST_ID in", values, "custId"); + return (Criteria) this; + } + + public Criteria andCustIdNotIn(List values) { + addCriterion("CUST_ID not in", values, "custId"); + return (Criteria) this; + } + + public Criteria andCustIdBetween(String value1, String value2) { + addCriterion("CUST_ID between", value1, value2, "custId"); + return (Criteria) this; + } + + public Criteria andCustIdNotBetween(String value1, String value2) { + addCriterion("CUST_ID not between", value1, value2, "custId"); + return (Criteria) this; + } + + public Criteria andCreateTimeIsNull() { + addCriterion("CREATE_TIME is null"); + return (Criteria) this; + } + + public Criteria andCreateTimeIsNotNull() { + addCriterion("CREATE_TIME is not null"); + return (Criteria) this; + } + + public Criteria andCreateTimeEqualTo(Long value) { + addCriterion("CREATE_TIME =", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeNotEqualTo(Long value) { + addCriterion("CREATE_TIME <>", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeGreaterThan(Long value) { + addCriterion("CREATE_TIME >", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeGreaterThanOrEqualTo(Long value) { + addCriterion("CREATE_TIME >=", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeLessThan(Long value) { + addCriterion("CREATE_TIME <", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeLessThanOrEqualTo(Long value) { + addCriterion("CREATE_TIME <=", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeIn(List values) { + addCriterion("CREATE_TIME in", values, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeNotIn(List values) { + addCriterion("CREATE_TIME not in", values, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeBetween(Long value1, Long value2) { + addCriterion("CREATE_TIME between", value1, value2, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeNotBetween(Long value1, Long value2) { + addCriterion("CREATE_TIME not between", value1, value2, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateUserIdIsNull() { + addCriterion("CREATE_USER_ID is null"); + return (Criteria) this; + } + + public Criteria andCreateUserIdIsNotNull() { + addCriterion("CREATE_USER_ID is not null"); + return (Criteria) this; + } + + public Criteria andCreateUserIdEqualTo(String value) { + addCriterion("CREATE_USER_ID =", value, "createUserId"); + return (Criteria) this; + } + + public Criteria andCreateUserIdNotEqualTo(String value) { + addCriterion("CREATE_USER_ID <>", value, "createUserId"); + return (Criteria) this; + } + + public Criteria andCreateUserIdGreaterThan(String value) { + addCriterion("CREATE_USER_ID >", value, "createUserId"); + return (Criteria) this; + } + + public Criteria andCreateUserIdGreaterThanOrEqualTo(String value) { + addCriterion("CREATE_USER_ID >=", value, "createUserId"); + return (Criteria) this; + } + + public Criteria andCreateUserIdLessThan(String value) { + addCriterion("CREATE_USER_ID <", value, "createUserId"); + return (Criteria) this; + } + + public Criteria andCreateUserIdLessThanOrEqualTo(String value) { + addCriterion("CREATE_USER_ID <=", value, "createUserId"); + return (Criteria) this; + } + + public Criteria andCreateUserIdLike(String value) { + addCriterion("CREATE_USER_ID like", value, "createUserId"); + return (Criteria) this; + } + + public Criteria andCreateUserIdNotLike(String value) { + addCriterion("CREATE_USER_ID not like", value, "createUserId"); + return (Criteria) this; + } + + public Criteria andCreateUserIdIn(List values) { + addCriterion("CREATE_USER_ID in", values, "createUserId"); + return (Criteria) this; + } + + public Criteria andCreateUserIdNotIn(List values) { + addCriterion("CREATE_USER_ID not in", values, "createUserId"); + return (Criteria) this; + } + + public Criteria andCreateUserIdBetween(String value1, String value2) { + addCriterion("CREATE_USER_ID between", value1, value2, "createUserId"); + return (Criteria) this; + } + + public Criteria andCreateUserIdNotBetween(String value1, String value2) { + addCriterion("CREATE_USER_ID not between", value1, value2, "createUserId"); + return (Criteria) this; + } + + public Criteria andLastUpdateTimeIsNull() { + addCriterion("LAST_UPDATE_TIME is null"); + return (Criteria) this; + } + + public Criteria andLastUpdateTimeIsNotNull() { + addCriterion("LAST_UPDATE_TIME is not null"); + return (Criteria) this; + } + + public Criteria andLastUpdateTimeEqualTo(Long value) { + addCriterion("LAST_UPDATE_TIME =", value, "lastUpdateTime"); + return (Criteria) this; + } + + public Criteria andLastUpdateTimeNotEqualTo(Long value) { + addCriterion("LAST_UPDATE_TIME <>", value, "lastUpdateTime"); + return (Criteria) this; + } + + public Criteria andLastUpdateTimeGreaterThan(Long value) { + addCriterion("LAST_UPDATE_TIME >", value, "lastUpdateTime"); + return (Criteria) this; + } + + public Criteria andLastUpdateTimeGreaterThanOrEqualTo(Long value) { + addCriterion("LAST_UPDATE_TIME >=", value, "lastUpdateTime"); + return (Criteria) this; + } + + public Criteria andLastUpdateTimeLessThan(Long value) { + addCriterion("LAST_UPDATE_TIME <", value, "lastUpdateTime"); + return (Criteria) this; + } + + public Criteria andLastUpdateTimeLessThanOrEqualTo(Long value) { + addCriterion("LAST_UPDATE_TIME <=", value, "lastUpdateTime"); + return (Criteria) this; + } + + public Criteria andLastUpdateTimeIn(List values) { + addCriterion("LAST_UPDATE_TIME in", values, "lastUpdateTime"); + return (Criteria) this; + } + + public Criteria andLastUpdateTimeNotIn(List values) { + addCriterion("LAST_UPDATE_TIME not in", values, "lastUpdateTime"); + return (Criteria) this; + } + + public Criteria andLastUpdateTimeBetween(Long value1, Long value2) { + addCriterion("LAST_UPDATE_TIME between", value1, value2, "lastUpdateTime"); + return (Criteria) this; + } + + public Criteria andLastUpdateTimeNotBetween(Long value1, Long value2) { + addCriterion("LAST_UPDATE_TIME not between", value1, value2, "lastUpdateTime"); + return (Criteria) this; + } + + public Criteria andLastUpdateUserIdIsNull() { + addCriterion("LAST_UPDATE_USER_ID is null"); + return (Criteria) this; + } + + public Criteria andLastUpdateUserIdIsNotNull() { + addCriterion("LAST_UPDATE_USER_ID is not null"); + return (Criteria) this; + } + + public Criteria andLastUpdateUserIdEqualTo(String value) { + addCriterion("LAST_UPDATE_USER_ID =", value, "lastUpdateUserId"); + return (Criteria) this; + } + + public Criteria andLastUpdateUserIdNotEqualTo(String value) { + addCriterion("LAST_UPDATE_USER_ID <>", value, "lastUpdateUserId"); + return (Criteria) this; + } + + public Criteria andLastUpdateUserIdGreaterThan(String value) { + addCriterion("LAST_UPDATE_USER_ID >", value, "lastUpdateUserId"); + return (Criteria) this; + } + + public Criteria andLastUpdateUserIdGreaterThanOrEqualTo(String value) { + addCriterion("LAST_UPDATE_USER_ID >=", value, "lastUpdateUserId"); + return (Criteria) this; + } + + public Criteria andLastUpdateUserIdLessThan(String value) { + addCriterion("LAST_UPDATE_USER_ID <", value, "lastUpdateUserId"); + return (Criteria) this; + } + + public Criteria andLastUpdateUserIdLessThanOrEqualTo(String value) { + addCriterion("LAST_UPDATE_USER_ID <=", value, "lastUpdateUserId"); + return (Criteria) this; + } + + public Criteria andLastUpdateUserIdLike(String value) { + addCriterion("LAST_UPDATE_USER_ID like", value, "lastUpdateUserId"); + return (Criteria) this; + } + + public Criteria andLastUpdateUserIdNotLike(String value) { + addCriterion("LAST_UPDATE_USER_ID not like", value, "lastUpdateUserId"); + return (Criteria) this; + } + + public Criteria andLastUpdateUserIdIn(List values) { + addCriterion("LAST_UPDATE_USER_ID in", values, "lastUpdateUserId"); + return (Criteria) this; + } + + public Criteria andLastUpdateUserIdNotIn(List values) { + addCriterion("LAST_UPDATE_USER_ID not in", values, "lastUpdateUserId"); + return (Criteria) this; + } + + public Criteria andLastUpdateUserIdBetween(String value1, String value2) { + addCriterion("LAST_UPDATE_USER_ID between", value1, value2, "lastUpdateUserId"); + return (Criteria) this; + } + + public Criteria andLastUpdateUserIdNotBetween(String value1, String value2) { + addCriterion("LAST_UPDATE_USER_ID not between", value1, value2, "lastUpdateUserId"); + return (Criteria) this; + } + + public Criteria andApplicationIdIsNull() { + addCriterion("APPLICATION_ID is null"); + return (Criteria) this; + } + + public Criteria andApplicationIdIsNotNull() { + addCriterion("APPLICATION_ID is not null"); + return (Criteria) this; + } + + public Criteria andApplicationIdEqualTo(String value) { + addCriterion("APPLICATION_ID =", value, "applicationId"); + return (Criteria) this; + } + + public Criteria andApplicationIdNotEqualTo(String value) { + addCriterion("APPLICATION_ID <>", value, "applicationId"); + return (Criteria) this; + } + + public Criteria andApplicationIdGreaterThan(String value) { + addCriterion("APPLICATION_ID >", value, "applicationId"); + return (Criteria) this; + } + + public Criteria andApplicationIdGreaterThanOrEqualTo(String value) { + addCriterion("APPLICATION_ID >=", value, "applicationId"); + return (Criteria) this; + } + + public Criteria andApplicationIdLessThan(String value) { + addCriterion("APPLICATION_ID <", value, "applicationId"); + return (Criteria) this; + } + + public Criteria andApplicationIdLessThanOrEqualTo(String value) { + addCriterion("APPLICATION_ID <=", value, "applicationId"); + return (Criteria) this; + } + + public Criteria andApplicationIdLike(String value) { + addCriterion("APPLICATION_ID like", value, "applicationId"); + return (Criteria) this; + } + + public Criteria andApplicationIdNotLike(String value) { + addCriterion("APPLICATION_ID not like", value, "applicationId"); + return (Criteria) this; + } + + public Criteria andApplicationIdIn(List values) { + addCriterion("APPLICATION_ID in", values, "applicationId"); + return (Criteria) this; + } + + public Criteria andApplicationIdNotIn(List values) { + addCriterion("APPLICATION_ID not in", values, "applicationId"); + return (Criteria) this; + } + + public Criteria andApplicationIdBetween(String value1, String value2) { + addCriterion("APPLICATION_ID between", value1, value2, "applicationId"); + return (Criteria) this; + } + + public Criteria andApplicationIdNotBetween(String value1, String value2) { + addCriterion("APPLICATION_ID not between", value1, value2, "applicationId"); + return (Criteria) this; + } + + public Criteria andCodeIsNull() { + addCriterion("CODE is null"); + return (Criteria) this; + } + + public Criteria andCodeIsNotNull() { + addCriterion("CODE is not null"); + return (Criteria) this; + } + + public Criteria andCodeEqualTo(String value) { + addCriterion("CODE =", value, "code"); + return (Criteria) this; + } + + public Criteria andCodeNotEqualTo(String value) { + addCriterion("CODE <>", value, "code"); + return (Criteria) this; + } + + public Criteria andCodeGreaterThan(String value) { + addCriterion("CODE >", value, "code"); + return (Criteria) this; + } + + public Criteria andCodeGreaterThanOrEqualTo(String value) { + addCriterion("CODE >=", value, "code"); + return (Criteria) this; + } + + public Criteria andCodeLessThan(String value) { + addCriterion("CODE <", value, "code"); + return (Criteria) this; + } + + public Criteria andCodeLessThanOrEqualTo(String value) { + addCriterion("CODE <=", value, "code"); + return (Criteria) this; + } + + public Criteria andCodeLike(String value) { + addCriterion("CODE like", value, "code"); + return (Criteria) this; + } + + public Criteria andCodeNotLike(String value) { + addCriterion("CODE not like", value, "code"); + return (Criteria) this; + } + + public Criteria andCodeIn(List values) { + addCriterion("CODE in", values, "code"); + return (Criteria) this; + } + + public Criteria andCodeNotIn(List values) { + addCriterion("CODE not in", values, "code"); + return (Criteria) this; + } + + public Criteria andCodeBetween(String value1, String value2) { + addCriterion("CODE between", value1, value2, "code"); + return (Criteria) this; + } + + public Criteria andCodeNotBetween(String value1, String value2) { + addCriterion("CODE not between", value1, value2, "code"); + return (Criteria) this; + } + + public Criteria andOrderByIsNull() { + addCriterion("ORDER_BY is null"); + return (Criteria) this; + } + + public Criteria andOrderByIsNotNull() { + addCriterion("ORDER_BY is not null"); + return (Criteria) this; + } + + public Criteria andOrderByEqualTo(Short value) { + addCriterion("ORDER_BY =", value, "orderBy"); + return (Criteria) this; + } + + public Criteria andOrderByNotEqualTo(Short value) { + addCriterion("ORDER_BY <>", value, "orderBy"); + return (Criteria) this; + } + + public Criteria andOrderByGreaterThan(Short value) { + addCriterion("ORDER_BY >", value, "orderBy"); + return (Criteria) this; + } + + public Criteria andOrderByGreaterThanOrEqualTo(Short value) { + addCriterion("ORDER_BY >=", value, "orderBy"); + return (Criteria) this; + } + + public Criteria andOrderByLessThan(Short value) { + addCriterion("ORDER_BY <", value, "orderBy"); + return (Criteria) this; + } + + public Criteria andOrderByLessThanOrEqualTo(Short value) { + addCriterion("ORDER_BY <=", value, "orderBy"); + return (Criteria) this; + } + + public Criteria andOrderByIn(List values) { + addCriterion("ORDER_BY in", values, "orderBy"); + return (Criteria) this; + } + + public Criteria andOrderByNotIn(List values) { + addCriterion("ORDER_BY not in", values, "orderBy"); + return (Criteria) this; + } + + public Criteria andOrderByBetween(Short value1, Short value2) { + addCriterion("ORDER_BY between", value1, value2, "orderBy"); + return (Criteria) this; + } + + public Criteria andOrderByNotBetween(Short value1, Short value2) { + addCriterion("ORDER_BY not between", value1, value2, "orderBy"); + return (Criteria) this; + } + } + + public static class Criteria extends GeneratedCriteria { + + protected Criteria() { + super(); + } + } + + public static class Criterion { + private String condition; + + private Object value; + + private Object secondValue; + + private boolean noValue; + + private boolean singleValue; + + private boolean betweenValue; + + private boolean listValue; + + private String typeHandler; + + public String getCondition() { + return condition; + } + + public Object getValue() { + return value; + } + + public Object getSecondValue() { + return secondValue; + } + + public boolean isNoValue() { + return noValue; + } + + public boolean isSingleValue() { + return singleValue; + } + + public boolean isBetweenValue() { + return betweenValue; + } + + public boolean isListValue() { + return listValue; + } + + public String getTypeHandler() { + return typeHandler; + } + + protected Criterion(String condition) { + super(); + this.condition = condition; + this.typeHandler = null; + this.noValue = true; + } + + protected Criterion(String condition, Object value, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.typeHandler = typeHandler; + if (value instanceof List) { + this.listValue = true; + } else { + this.singleValue = true; + } + } + + protected Criterion(String condition, Object value) { + this(condition, value, null); + } + + protected Criterion(String condition, Object value, Object secondValue, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.secondValue = secondValue; + this.typeHandler = typeHandler; + this.betweenValue = true; + } + + protected Criterion(String condition, Object value, Object secondValue) { + this(condition, value, secondValue, null); + } + } +} \ No newline at end of file diff --git a/itools-core/itools-model/src/main/java/com/itools/core/rbac/dto/EnterpriseDTO.java b/itools-core/itools-model/src/main/java/com/itools/core/rbac/dto/EnterpriseDTO.java new file mode 100644 index 0000000000000000000000000000000000000000..b1fbb96f83b1d07b619b60cd68e22273852f8c64 --- /dev/null +++ b/itools-core/itools-model/src/main/java/com/itools/core/rbac/dto/EnterpriseDTO.java @@ -0,0 +1,113 @@ +package com.itools.core.rbac.dto; + +public class EnterpriseDTO { + private String id; + + private Long createTime; + + private String createUserId; + + private Long lastUpdateTime; + + private String lastUpdateUserId; + + private String employeesNum; + + private String enterAddress; + + private String enterContacts; + + private String enterName; + + private String enterTrade; + + private String enterLicense; + + public String getId() { + return id; + } + + public void setId(String id) { + this.id = id; + } + + public Long getCreateTime() { + return createTime; + } + + public void setCreateTime(Long createTime) { + this.createTime = createTime; + } + + public String getCreateUserId() { + return createUserId; + } + + public void setCreateUserId(String createUserId) { + this.createUserId = createUserId; + } + + public Long getLastUpdateTime() { + return lastUpdateTime; + } + + public void setLastUpdateTime(Long lastUpdateTime) { + this.lastUpdateTime = lastUpdateTime; + } + + public String getLastUpdateUserId() { + return lastUpdateUserId; + } + + public void setLastUpdateUserId(String lastUpdateUserId) { + this.lastUpdateUserId = lastUpdateUserId; + } + + public String getEmployeesNum() { + return employeesNum; + } + + public void setEmployeesNum(String employeesNum) { + this.employeesNum = employeesNum; + } + + public String getEnterAddress() { + return enterAddress; + } + + public void setEnterAddress(String enterAddress) { + this.enterAddress = enterAddress; + } + + public String getEnterContacts() { + return enterContacts; + } + + public void setEnterContacts(String enterContacts) { + this.enterContacts = enterContacts; + } + + public String getEnterName() { + return enterName; + } + + public void setEnterName(String enterName) { + this.enterName = enterName; + } + + public String getEnterTrade() { + return enterTrade; + } + + public void setEnterTrade(String enterTrade) { + this.enterTrade = enterTrade; + } + + public String getEnterLicense() { + return enterLicense; + } + + public void setEnterLicense(String enterLicense) { + this.enterLicense = enterLicense; + } +} \ No newline at end of file diff --git a/itools-core/itools-model/src/main/java/com/itools/core/rbac/dto/EnterpriseDTOExample.java b/itools-core/itools-model/src/main/java/com/itools/core/rbac/dto/EnterpriseDTOExample.java new file mode 100644 index 0000000000000000000000000000000000000000..c920c28d533f8295dbc2b6c16f6c95b710507584 --- /dev/null +++ b/itools-core/itools-model/src/main/java/com/itools/core/rbac/dto/EnterpriseDTOExample.java @@ -0,0 +1,950 @@ +package com.itools.core.rbac.dto; + +import java.util.ArrayList; +import java.util.List; + +public class EnterpriseDTOExample { + protected String orderByClause; + + protected boolean distinct; + + protected List oredCriteria; + + public EnterpriseDTOExample() { + oredCriteria = new ArrayList(); + } + + public void setOrderByClause(String orderByClause) { + this.orderByClause = orderByClause; + } + + public String getOrderByClause() { + return orderByClause; + } + + public void setDistinct(boolean distinct) { + this.distinct = distinct; + } + + public boolean isDistinct() { + return distinct; + } + + public List getOredCriteria() { + return oredCriteria; + } + + public void or(Criteria criteria) { + oredCriteria.add(criteria); + } + + public Criteria or() { + Criteria criteria = createCriteriaInternal(); + oredCriteria.add(criteria); + return criteria; + } + + public Criteria createCriteria() { + Criteria criteria = createCriteriaInternal(); + if (oredCriteria.size() == 0) { + oredCriteria.add(criteria); + } + return criteria; + } + + protected Criteria createCriteriaInternal() { + Criteria criteria = new Criteria(); + return criteria; + } + + public void clear() { + oredCriteria.clear(); + orderByClause = null; + distinct = false; + } + + protected abstract static class GeneratedCriteria { + protected List criteria; + + protected GeneratedCriteria() { + super(); + criteria = new ArrayList(); + } + + public boolean isValid() { + return criteria.size() > 0; + } + + public List getAllCriteria() { + return criteria; + } + + public List getCriteria() { + return criteria; + } + + protected void addCriterion(String condition) { + if (condition == null) { + throw new RuntimeException("Value for condition cannot be null"); + } + criteria.add(new Criterion(condition)); + } + + protected void addCriterion(String condition, Object value, String property) { + if (value == null) { + throw new RuntimeException("Value for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value)); + } + + protected void addCriterion(String condition, Object value1, Object value2, String property) { + if (value1 == null || value2 == null) { + throw new RuntimeException("Between values for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value1, value2)); + } + + public Criteria andIdIsNull() { + addCriterion("ID is null"); + return (Criteria) this; + } + + public Criteria andIdIsNotNull() { + addCriterion("ID is not null"); + return (Criteria) this; + } + + public Criteria andIdEqualTo(String value) { + addCriterion("ID =", value, "id"); + return (Criteria) this; + } + + public Criteria andIdNotEqualTo(String value) { + addCriterion("ID <>", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThan(String value) { + addCriterion("ID >", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThanOrEqualTo(String value) { + addCriterion("ID >=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThan(String value) { + addCriterion("ID <", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThanOrEqualTo(String value) { + addCriterion("ID <=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLike(String value) { + addCriterion("ID like", value, "id"); + return (Criteria) this; + } + + public Criteria andIdNotLike(String value) { + addCriterion("ID not like", value, "id"); + return (Criteria) this; + } + + public Criteria andIdIn(List values) { + addCriterion("ID in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdNotIn(List values) { + addCriterion("ID not in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdBetween(String value1, String value2) { + addCriterion("ID between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andIdNotBetween(String value1, String value2) { + addCriterion("ID not between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andCreateTimeIsNull() { + addCriterion("CREATE_TIME is null"); + return (Criteria) this; + } + + public Criteria andCreateTimeIsNotNull() { + addCriterion("CREATE_TIME is not null"); + return (Criteria) this; + } + + public Criteria andCreateTimeEqualTo(Long value) { + addCriterion("CREATE_TIME =", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeNotEqualTo(Long value) { + addCriterion("CREATE_TIME <>", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeGreaterThan(Long value) { + addCriterion("CREATE_TIME >", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeGreaterThanOrEqualTo(Long value) { + addCriterion("CREATE_TIME >=", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeLessThan(Long value) { + addCriterion("CREATE_TIME <", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeLessThanOrEqualTo(Long value) { + addCriterion("CREATE_TIME <=", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeIn(List values) { + addCriterion("CREATE_TIME in", values, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeNotIn(List values) { + addCriterion("CREATE_TIME not in", values, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeBetween(Long value1, Long value2) { + addCriterion("CREATE_TIME between", value1, value2, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeNotBetween(Long value1, Long value2) { + addCriterion("CREATE_TIME not between", value1, value2, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateUserIdIsNull() { + addCriterion("CREATE_USER_ID is null"); + return (Criteria) this; + } + + public Criteria andCreateUserIdIsNotNull() { + addCriterion("CREATE_USER_ID is not null"); + return (Criteria) this; + } + + public Criteria andCreateUserIdEqualTo(String value) { + addCriterion("CREATE_USER_ID =", value, "createUserId"); + return (Criteria) this; + } + + public Criteria andCreateUserIdNotEqualTo(String value) { + addCriterion("CREATE_USER_ID <>", value, "createUserId"); + return (Criteria) this; + } + + public Criteria andCreateUserIdGreaterThan(String value) { + addCriterion("CREATE_USER_ID >", value, "createUserId"); + return (Criteria) this; + } + + public Criteria andCreateUserIdGreaterThanOrEqualTo(String value) { + addCriterion("CREATE_USER_ID >=", value, "createUserId"); + return (Criteria) this; + } + + public Criteria andCreateUserIdLessThan(String value) { + addCriterion("CREATE_USER_ID <", value, "createUserId"); + return (Criteria) this; + } + + public Criteria andCreateUserIdLessThanOrEqualTo(String value) { + addCriterion("CREATE_USER_ID <=", value, "createUserId"); + return (Criteria) this; + } + + public Criteria andCreateUserIdLike(String value) { + addCriterion("CREATE_USER_ID like", value, "createUserId"); + return (Criteria) this; + } + + public Criteria andCreateUserIdNotLike(String value) { + addCriterion("CREATE_USER_ID not like", value, "createUserId"); + return (Criteria) this; + } + + public Criteria andCreateUserIdIn(List values) { + addCriterion("CREATE_USER_ID in", values, "createUserId"); + return (Criteria) this; + } + + public Criteria andCreateUserIdNotIn(List values) { + addCriterion("CREATE_USER_ID not in", values, "createUserId"); + return (Criteria) this; + } + + public Criteria andCreateUserIdBetween(String value1, String value2) { + addCriterion("CREATE_USER_ID between", value1, value2, "createUserId"); + return (Criteria) this; + } + + public Criteria andCreateUserIdNotBetween(String value1, String value2) { + addCriterion("CREATE_USER_ID not between", value1, value2, "createUserId"); + return (Criteria) this; + } + + public Criteria andLastUpdateTimeIsNull() { + addCriterion("LAST_UPDATE_TIME is null"); + return (Criteria) this; + } + + public Criteria andLastUpdateTimeIsNotNull() { + addCriterion("LAST_UPDATE_TIME is not null"); + return (Criteria) this; + } + + public Criteria andLastUpdateTimeEqualTo(Long value) { + addCriterion("LAST_UPDATE_TIME =", value, "lastUpdateTime"); + return (Criteria) this; + } + + public Criteria andLastUpdateTimeNotEqualTo(Long value) { + addCriterion("LAST_UPDATE_TIME <>", value, "lastUpdateTime"); + return (Criteria) this; + } + + public Criteria andLastUpdateTimeGreaterThan(Long value) { + addCriterion("LAST_UPDATE_TIME >", value, "lastUpdateTime"); + return (Criteria) this; + } + + public Criteria andLastUpdateTimeGreaterThanOrEqualTo(Long value) { + addCriterion("LAST_UPDATE_TIME >=", value, "lastUpdateTime"); + return (Criteria) this; + } + + public Criteria andLastUpdateTimeLessThan(Long value) { + addCriterion("LAST_UPDATE_TIME <", value, "lastUpdateTime"); + return (Criteria) this; + } + + public Criteria andLastUpdateTimeLessThanOrEqualTo(Long value) { + addCriterion("LAST_UPDATE_TIME <=", value, "lastUpdateTime"); + return (Criteria) this; + } + + public Criteria andLastUpdateTimeIn(List values) { + addCriterion("LAST_UPDATE_TIME in", values, "lastUpdateTime"); + return (Criteria) this; + } + + public Criteria andLastUpdateTimeNotIn(List values) { + addCriterion("LAST_UPDATE_TIME not in", values, "lastUpdateTime"); + return (Criteria) this; + } + + public Criteria andLastUpdateTimeBetween(Long value1, Long value2) { + addCriterion("LAST_UPDATE_TIME between", value1, value2, "lastUpdateTime"); + return (Criteria) this; + } + + public Criteria andLastUpdateTimeNotBetween(Long value1, Long value2) { + addCriterion("LAST_UPDATE_TIME not between", value1, value2, "lastUpdateTime"); + return (Criteria) this; + } + + public Criteria andLastUpdateUserIdIsNull() { + addCriterion("LAST_UPDATE_USER_ID is null"); + return (Criteria) this; + } + + public Criteria andLastUpdateUserIdIsNotNull() { + addCriterion("LAST_UPDATE_USER_ID is not null"); + return (Criteria) this; + } + + public Criteria andLastUpdateUserIdEqualTo(String value) { + addCriterion("LAST_UPDATE_USER_ID =", value, "lastUpdateUserId"); + return (Criteria) this; + } + + public Criteria andLastUpdateUserIdNotEqualTo(String value) { + addCriterion("LAST_UPDATE_USER_ID <>", value, "lastUpdateUserId"); + return (Criteria) this; + } + + public Criteria andLastUpdateUserIdGreaterThan(String value) { + addCriterion("LAST_UPDATE_USER_ID >", value, "lastUpdateUserId"); + return (Criteria) this; + } + + public Criteria andLastUpdateUserIdGreaterThanOrEqualTo(String value) { + addCriterion("LAST_UPDATE_USER_ID >=", value, "lastUpdateUserId"); + return (Criteria) this; + } + + public Criteria andLastUpdateUserIdLessThan(String value) { + addCriterion("LAST_UPDATE_USER_ID <", value, "lastUpdateUserId"); + return (Criteria) this; + } + + public Criteria andLastUpdateUserIdLessThanOrEqualTo(String value) { + addCriterion("LAST_UPDATE_USER_ID <=", value, "lastUpdateUserId"); + return (Criteria) this; + } + + public Criteria andLastUpdateUserIdLike(String value) { + addCriterion("LAST_UPDATE_USER_ID like", value, "lastUpdateUserId"); + return (Criteria) this; + } + + public Criteria andLastUpdateUserIdNotLike(String value) { + addCriterion("LAST_UPDATE_USER_ID not like", value, "lastUpdateUserId"); + return (Criteria) this; + } + + public Criteria andLastUpdateUserIdIn(List values) { + addCriterion("LAST_UPDATE_USER_ID in", values, "lastUpdateUserId"); + return (Criteria) this; + } + + public Criteria andLastUpdateUserIdNotIn(List values) { + addCriterion("LAST_UPDATE_USER_ID not in", values, "lastUpdateUserId"); + return (Criteria) this; + } + + public Criteria andLastUpdateUserIdBetween(String value1, String value2) { + addCriterion("LAST_UPDATE_USER_ID between", value1, value2, "lastUpdateUserId"); + return (Criteria) this; + } + + public Criteria andLastUpdateUserIdNotBetween(String value1, String value2) { + addCriterion("LAST_UPDATE_USER_ID not between", value1, value2, "lastUpdateUserId"); + return (Criteria) this; + } + + public Criteria andEmployeesNumIsNull() { + addCriterion("EMPLOYEES_NUM is null"); + return (Criteria) this; + } + + public Criteria andEmployeesNumIsNotNull() { + addCriterion("EMPLOYEES_NUM is not null"); + return (Criteria) this; + } + + public Criteria andEmployeesNumEqualTo(String value) { + addCriterion("EMPLOYEES_NUM =", value, "employeesNum"); + return (Criteria) this; + } + + public Criteria andEmployeesNumNotEqualTo(String value) { + addCriterion("EMPLOYEES_NUM <>", value, "employeesNum"); + return (Criteria) this; + } + + public Criteria andEmployeesNumGreaterThan(String value) { + addCriterion("EMPLOYEES_NUM >", value, "employeesNum"); + return (Criteria) this; + } + + public Criteria andEmployeesNumGreaterThanOrEqualTo(String value) { + addCriterion("EMPLOYEES_NUM >=", value, "employeesNum"); + return (Criteria) this; + } + + public Criteria andEmployeesNumLessThan(String value) { + addCriterion("EMPLOYEES_NUM <", value, "employeesNum"); + return (Criteria) this; + } + + public Criteria andEmployeesNumLessThanOrEqualTo(String value) { + addCriterion("EMPLOYEES_NUM <=", value, "employeesNum"); + return (Criteria) this; + } + + public Criteria andEmployeesNumLike(String value) { + addCriterion("EMPLOYEES_NUM like", value, "employeesNum"); + return (Criteria) this; + } + + public Criteria andEmployeesNumNotLike(String value) { + addCriterion("EMPLOYEES_NUM not like", value, "employeesNum"); + return (Criteria) this; + } + + public Criteria andEmployeesNumIn(List values) { + addCriterion("EMPLOYEES_NUM in", values, "employeesNum"); + return (Criteria) this; + } + + public Criteria andEmployeesNumNotIn(List values) { + addCriterion("EMPLOYEES_NUM not in", values, "employeesNum"); + return (Criteria) this; + } + + public Criteria andEmployeesNumBetween(String value1, String value2) { + addCriterion("EMPLOYEES_NUM between", value1, value2, "employeesNum"); + return (Criteria) this; + } + + public Criteria andEmployeesNumNotBetween(String value1, String value2) { + addCriterion("EMPLOYEES_NUM not between", value1, value2, "employeesNum"); + return (Criteria) this; + } + + public Criteria andEnterAddressIsNull() { + addCriterion("ENTER_ADDRESS is null"); + return (Criteria) this; + } + + public Criteria andEnterAddressIsNotNull() { + addCriterion("ENTER_ADDRESS is not null"); + return (Criteria) this; + } + + public Criteria andEnterAddressEqualTo(String value) { + addCriterion("ENTER_ADDRESS =", value, "enterAddress"); + return (Criteria) this; + } + + public Criteria andEnterAddressNotEqualTo(String value) { + addCriterion("ENTER_ADDRESS <>", value, "enterAddress"); + return (Criteria) this; + } + + public Criteria andEnterAddressGreaterThan(String value) { + addCriterion("ENTER_ADDRESS >", value, "enterAddress"); + return (Criteria) this; + } + + public Criteria andEnterAddressGreaterThanOrEqualTo(String value) { + addCriterion("ENTER_ADDRESS >=", value, "enterAddress"); + return (Criteria) this; + } + + public Criteria andEnterAddressLessThan(String value) { + addCriterion("ENTER_ADDRESS <", value, "enterAddress"); + return (Criteria) this; + } + + public Criteria andEnterAddressLessThanOrEqualTo(String value) { + addCriterion("ENTER_ADDRESS <=", value, "enterAddress"); + return (Criteria) this; + } + + public Criteria andEnterAddressLike(String value) { + addCriterion("ENTER_ADDRESS like", value, "enterAddress"); + return (Criteria) this; + } + + public Criteria andEnterAddressNotLike(String value) { + addCriterion("ENTER_ADDRESS not like", value, "enterAddress"); + return (Criteria) this; + } + + public Criteria andEnterAddressIn(List values) { + addCriterion("ENTER_ADDRESS in", values, "enterAddress"); + return (Criteria) this; + } + + public Criteria andEnterAddressNotIn(List values) { + addCriterion("ENTER_ADDRESS not in", values, "enterAddress"); + return (Criteria) this; + } + + public Criteria andEnterAddressBetween(String value1, String value2) { + addCriterion("ENTER_ADDRESS between", value1, value2, "enterAddress"); + return (Criteria) this; + } + + public Criteria andEnterAddressNotBetween(String value1, String value2) { + addCriterion("ENTER_ADDRESS not between", value1, value2, "enterAddress"); + return (Criteria) this; + } + + public Criteria andEnterContactsIsNull() { + addCriterion("ENTER_CONTACTS is null"); + return (Criteria) this; + } + + public Criteria andEnterContactsIsNotNull() { + addCriterion("ENTER_CONTACTS is not null"); + return (Criteria) this; + } + + public Criteria andEnterContactsEqualTo(String value) { + addCriterion("ENTER_CONTACTS =", value, "enterContacts"); + return (Criteria) this; + } + + public Criteria andEnterContactsNotEqualTo(String value) { + addCriterion("ENTER_CONTACTS <>", value, "enterContacts"); + return (Criteria) this; + } + + public Criteria andEnterContactsGreaterThan(String value) { + addCriterion("ENTER_CONTACTS >", value, "enterContacts"); + return (Criteria) this; + } + + public Criteria andEnterContactsGreaterThanOrEqualTo(String value) { + addCriterion("ENTER_CONTACTS >=", value, "enterContacts"); + return (Criteria) this; + } + + public Criteria andEnterContactsLessThan(String value) { + addCriterion("ENTER_CONTACTS <", value, "enterContacts"); + return (Criteria) this; + } + + public Criteria andEnterContactsLessThanOrEqualTo(String value) { + addCriterion("ENTER_CONTACTS <=", value, "enterContacts"); + return (Criteria) this; + } + + public Criteria andEnterContactsLike(String value) { + addCriterion("ENTER_CONTACTS like", value, "enterContacts"); + return (Criteria) this; + } + + public Criteria andEnterContactsNotLike(String value) { + addCriterion("ENTER_CONTACTS not like", value, "enterContacts"); + return (Criteria) this; + } + + public Criteria andEnterContactsIn(List values) { + addCriterion("ENTER_CONTACTS in", values, "enterContacts"); + return (Criteria) this; + } + + public Criteria andEnterContactsNotIn(List values) { + addCriterion("ENTER_CONTACTS not in", values, "enterContacts"); + return (Criteria) this; + } + + public Criteria andEnterContactsBetween(String value1, String value2) { + addCriterion("ENTER_CONTACTS between", value1, value2, "enterContacts"); + return (Criteria) this; + } + + public Criteria andEnterContactsNotBetween(String value1, String value2) { + addCriterion("ENTER_CONTACTS not between", value1, value2, "enterContacts"); + return (Criteria) this; + } + + public Criteria andEnterNameIsNull() { + addCriterion("ENTER_NAME is null"); + return (Criteria) this; + } + + public Criteria andEnterNameIsNotNull() { + addCriterion("ENTER_NAME is not null"); + return (Criteria) this; + } + + public Criteria andEnterNameEqualTo(String value) { + addCriterion("ENTER_NAME =", value, "enterName"); + return (Criteria) this; + } + + public Criteria andEnterNameNotEqualTo(String value) { + addCriterion("ENTER_NAME <>", value, "enterName"); + return (Criteria) this; + } + + public Criteria andEnterNameGreaterThan(String value) { + addCriterion("ENTER_NAME >", value, "enterName"); + return (Criteria) this; + } + + public Criteria andEnterNameGreaterThanOrEqualTo(String value) { + addCriterion("ENTER_NAME >=", value, "enterName"); + return (Criteria) this; + } + + public Criteria andEnterNameLessThan(String value) { + addCriterion("ENTER_NAME <", value, "enterName"); + return (Criteria) this; + } + + public Criteria andEnterNameLessThanOrEqualTo(String value) { + addCriterion("ENTER_NAME <=", value, "enterName"); + return (Criteria) this; + } + + public Criteria andEnterNameLike(String value) { + addCriterion("ENTER_NAME like", value, "enterName"); + return (Criteria) this; + } + + public Criteria andEnterNameNotLike(String value) { + addCriterion("ENTER_NAME not like", value, "enterName"); + return (Criteria) this; + } + + public Criteria andEnterNameIn(List values) { + addCriterion("ENTER_NAME in", values, "enterName"); + return (Criteria) this; + } + + public Criteria andEnterNameNotIn(List values) { + addCriterion("ENTER_NAME not in", values, "enterName"); + return (Criteria) this; + } + + public Criteria andEnterNameBetween(String value1, String value2) { + addCriterion("ENTER_NAME between", value1, value2, "enterName"); + return (Criteria) this; + } + + public Criteria andEnterNameNotBetween(String value1, String value2) { + addCriterion("ENTER_NAME not between", value1, value2, "enterName"); + return (Criteria) this; + } + + public Criteria andEnterTradeIsNull() { + addCriterion("ENTER_TRADE is null"); + return (Criteria) this; + } + + public Criteria andEnterTradeIsNotNull() { + addCriterion("ENTER_TRADE is not null"); + return (Criteria) this; + } + + public Criteria andEnterTradeEqualTo(String value) { + addCriterion("ENTER_TRADE =", value, "enterTrade"); + return (Criteria) this; + } + + public Criteria andEnterTradeNotEqualTo(String value) { + addCriterion("ENTER_TRADE <>", value, "enterTrade"); + return (Criteria) this; + } + + public Criteria andEnterTradeGreaterThan(String value) { + addCriterion("ENTER_TRADE >", value, "enterTrade"); + return (Criteria) this; + } + + public Criteria andEnterTradeGreaterThanOrEqualTo(String value) { + addCriterion("ENTER_TRADE >=", value, "enterTrade"); + return (Criteria) this; + } + + public Criteria andEnterTradeLessThan(String value) { + addCriterion("ENTER_TRADE <", value, "enterTrade"); + return (Criteria) this; + } + + public Criteria andEnterTradeLessThanOrEqualTo(String value) { + addCriterion("ENTER_TRADE <=", value, "enterTrade"); + return (Criteria) this; + } + + public Criteria andEnterTradeLike(String value) { + addCriterion("ENTER_TRADE like", value, "enterTrade"); + return (Criteria) this; + } + + public Criteria andEnterTradeNotLike(String value) { + addCriterion("ENTER_TRADE not like", value, "enterTrade"); + return (Criteria) this; + } + + public Criteria andEnterTradeIn(List values) { + addCriterion("ENTER_TRADE in", values, "enterTrade"); + return (Criteria) this; + } + + public Criteria andEnterTradeNotIn(List values) { + addCriterion("ENTER_TRADE not in", values, "enterTrade"); + return (Criteria) this; + } + + public Criteria andEnterTradeBetween(String value1, String value2) { + addCriterion("ENTER_TRADE between", value1, value2, "enterTrade"); + return (Criteria) this; + } + + public Criteria andEnterTradeNotBetween(String value1, String value2) { + addCriterion("ENTER_TRADE not between", value1, value2, "enterTrade"); + return (Criteria) this; + } + + public Criteria andEnterLicenseIsNull() { + addCriterion("ENTER_LICENSE is null"); + return (Criteria) this; + } + + public Criteria andEnterLicenseIsNotNull() { + addCriterion("ENTER_LICENSE is not null"); + return (Criteria) this; + } + + public Criteria andEnterLicenseEqualTo(String value) { + addCriterion("ENTER_LICENSE =", value, "enterLicense"); + return (Criteria) this; + } + + public Criteria andEnterLicenseNotEqualTo(String value) { + addCriterion("ENTER_LICENSE <>", value, "enterLicense"); + return (Criteria) this; + } + + public Criteria andEnterLicenseGreaterThan(String value) { + addCriterion("ENTER_LICENSE >", value, "enterLicense"); + return (Criteria) this; + } + + public Criteria andEnterLicenseGreaterThanOrEqualTo(String value) { + addCriterion("ENTER_LICENSE >=", value, "enterLicense"); + return (Criteria) this; + } + + public Criteria andEnterLicenseLessThan(String value) { + addCriterion("ENTER_LICENSE <", value, "enterLicense"); + return (Criteria) this; + } + + public Criteria andEnterLicenseLessThanOrEqualTo(String value) { + addCriterion("ENTER_LICENSE <=", value, "enterLicense"); + return (Criteria) this; + } + + public Criteria andEnterLicenseLike(String value) { + addCriterion("ENTER_LICENSE like", value, "enterLicense"); + return (Criteria) this; + } + + public Criteria andEnterLicenseNotLike(String value) { + addCriterion("ENTER_LICENSE not like", value, "enterLicense"); + return (Criteria) this; + } + + public Criteria andEnterLicenseIn(List values) { + addCriterion("ENTER_LICENSE in", values, "enterLicense"); + return (Criteria) this; + } + + public Criteria andEnterLicenseNotIn(List values) { + addCriterion("ENTER_LICENSE not in", values, "enterLicense"); + return (Criteria) this; + } + + public Criteria andEnterLicenseBetween(String value1, String value2) { + addCriterion("ENTER_LICENSE between", value1, value2, "enterLicense"); + return (Criteria) this; + } + + public Criteria andEnterLicenseNotBetween(String value1, String value2) { + addCriterion("ENTER_LICENSE not between", value1, value2, "enterLicense"); + return (Criteria) this; + } + } + + public static class Criteria extends GeneratedCriteria { + + protected Criteria() { + super(); + } + } + + public static class Criterion { + private String condition; + + private Object value; + + private Object secondValue; + + private boolean noValue; + + private boolean singleValue; + + private boolean betweenValue; + + private boolean listValue; + + private String typeHandler; + + public String getCondition() { + return condition; + } + + public Object getValue() { + return value; + } + + public Object getSecondValue() { + return secondValue; + } + + public boolean isNoValue() { + return noValue; + } + + public boolean isSingleValue() { + return singleValue; + } + + public boolean isBetweenValue() { + return betweenValue; + } + + public boolean isListValue() { + return listValue; + } + + public String getTypeHandler() { + return typeHandler; + } + + protected Criterion(String condition) { + super(); + this.condition = condition; + this.typeHandler = null; + this.noValue = true; + } + + protected Criterion(String condition, Object value, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.typeHandler = typeHandler; + if (value instanceof List) { + this.listValue = true; + } else { + this.singleValue = true; + } + } + + protected Criterion(String condition, Object value) { + this(condition, value, null); + } + + protected Criterion(String condition, Object value, Object secondValue, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.secondValue = secondValue; + this.typeHandler = typeHandler; + this.betweenValue = true; + } + + protected Criterion(String condition, Object value, Object secondValue) { + this(condition, value, secondValue, null); + } + } +} \ No newline at end of file diff --git a/itools-core/itools-model/src/main/java/com/itools/core/rbac/dto/GroupDTO.java b/itools-core/itools-model/src/main/java/com/itools/core/rbac/dto/GroupDTO.java new file mode 100644 index 0000000000000000000000000000000000000000..95d6c27a4214a6496d16f8c5c49efd1492b56641 --- /dev/null +++ b/itools-core/itools-model/src/main/java/com/itools/core/rbac/dto/GroupDTO.java @@ -0,0 +1,113 @@ +package com.itools.core.rbac.dto; + +public class GroupDTO { + private String id; + + private String custId; + + private Long createTime; + + private String createUserId; + + private Long lastUpdateTime; + + private String lastUpdateUserId; + + private String applicationId; + + private String code; + + private String name; + + private String remark; + + private Short status; + + public String getId() { + return id; + } + + public void setId(String id) { + this.id = id; + } + + public String getCustId() { + return custId; + } + + public void setCustId(String custId) { + this.custId = custId; + } + + public Long getCreateTime() { + return createTime; + } + + public void setCreateTime(Long createTime) { + this.createTime = createTime; + } + + public String getCreateUserId() { + return createUserId; + } + + public void setCreateUserId(String createUserId) { + this.createUserId = createUserId; + } + + public Long getLastUpdateTime() { + return lastUpdateTime; + } + + public void setLastUpdateTime(Long lastUpdateTime) { + this.lastUpdateTime = lastUpdateTime; + } + + public String getLastUpdateUserId() { + return lastUpdateUserId; + } + + public void setLastUpdateUserId(String lastUpdateUserId) { + this.lastUpdateUserId = lastUpdateUserId; + } + + public String getApplicationId() { + return applicationId; + } + + public void setApplicationId(String applicationId) { + this.applicationId = applicationId; + } + + public String getCode() { + return code; + } + + public void setCode(String code) { + this.code = code; + } + + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + public String getRemark() { + return remark; + } + + public void setRemark(String remark) { + this.remark = remark; + } + + public Short getStatus() { + return status; + } + + public void setStatus(Short status) { + this.status = status; + } +} \ No newline at end of file diff --git a/itools-core/itools-model/src/main/java/com/itools/core/rbac/dto/GroupDTOExample.java b/itools-core/itools-model/src/main/java/com/itools/core/rbac/dto/GroupDTOExample.java new file mode 100644 index 0000000000000000000000000000000000000000..5075966a9a9cbb5b0c46af40f6ded6d46d28e04e --- /dev/null +++ b/itools-core/itools-model/src/main/java/com/itools/core/rbac/dto/GroupDTOExample.java @@ -0,0 +1,940 @@ +package com.itools.core.rbac.dto; + +import java.util.ArrayList; +import java.util.List; + +public class GroupDTOExample { + protected String orderByClause; + + protected boolean distinct; + + protected List oredCriteria; + + public GroupDTOExample() { + oredCriteria = new ArrayList(); + } + + public void setOrderByClause(String orderByClause) { + this.orderByClause = orderByClause; + } + + public String getOrderByClause() { + return orderByClause; + } + + public void setDistinct(boolean distinct) { + this.distinct = distinct; + } + + public boolean isDistinct() { + return distinct; + } + + public List getOredCriteria() { + return oredCriteria; + } + + public void or(Criteria criteria) { + oredCriteria.add(criteria); + } + + public Criteria or() { + Criteria criteria = createCriteriaInternal(); + oredCriteria.add(criteria); + return criteria; + } + + public Criteria createCriteria() { + Criteria criteria = createCriteriaInternal(); + if (oredCriteria.size() == 0) { + oredCriteria.add(criteria); + } + return criteria; + } + + protected Criteria createCriteriaInternal() { + Criteria criteria = new Criteria(); + return criteria; + } + + public void clear() { + oredCriteria.clear(); + orderByClause = null; + distinct = false; + } + + protected abstract static class GeneratedCriteria { + protected List criteria; + + protected GeneratedCriteria() { + super(); + criteria = new ArrayList(); + } + + public boolean isValid() { + return criteria.size() > 0; + } + + public List getAllCriteria() { + return criteria; + } + + public List getCriteria() { + return criteria; + } + + protected void addCriterion(String condition) { + if (condition == null) { + throw new RuntimeException("Value for condition cannot be null"); + } + criteria.add(new Criterion(condition)); + } + + protected void addCriterion(String condition, Object value, String property) { + if (value == null) { + throw new RuntimeException("Value for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value)); + } + + protected void addCriterion(String condition, Object value1, Object value2, String property) { + if (value1 == null || value2 == null) { + throw new RuntimeException("Between values for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value1, value2)); + } + + public Criteria andIdIsNull() { + addCriterion("ID is null"); + return (Criteria) this; + } + + public Criteria andIdIsNotNull() { + addCriterion("ID is not null"); + return (Criteria) this; + } + + public Criteria andIdEqualTo(String value) { + addCriterion("ID =", value, "id"); + return (Criteria) this; + } + + public Criteria andIdNotEqualTo(String value) { + addCriterion("ID <>", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThan(String value) { + addCriterion("ID >", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThanOrEqualTo(String value) { + addCriterion("ID >=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThan(String value) { + addCriterion("ID <", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThanOrEqualTo(String value) { + addCriterion("ID <=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLike(String value) { + addCriterion("ID like", value, "id"); + return (Criteria) this; + } + + public Criteria andIdNotLike(String value) { + addCriterion("ID not like", value, "id"); + return (Criteria) this; + } + + public Criteria andIdIn(List values) { + addCriterion("ID in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdNotIn(List values) { + addCriterion("ID not in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdBetween(String value1, String value2) { + addCriterion("ID between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andIdNotBetween(String value1, String value2) { + addCriterion("ID not between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andCustIdIsNull() { + addCriterion("CUST_ID is null"); + return (Criteria) this; + } + + public Criteria andCustIdIsNotNull() { + addCriterion("CUST_ID is not null"); + return (Criteria) this; + } + + public Criteria andCustIdEqualTo(String value) { + addCriterion("CUST_ID =", value, "custId"); + return (Criteria) this; + } + + public Criteria andCustIdNotEqualTo(String value) { + addCriterion("CUST_ID <>", value, "custId"); + return (Criteria) this; + } + + public Criteria andCustIdGreaterThan(String value) { + addCriterion("CUST_ID >", value, "custId"); + return (Criteria) this; + } + + public Criteria andCustIdGreaterThanOrEqualTo(String value) { + addCriterion("CUST_ID >=", value, "custId"); + return (Criteria) this; + } + + public Criteria andCustIdLessThan(String value) { + addCriterion("CUST_ID <", value, "custId"); + return (Criteria) this; + } + + public Criteria andCustIdLessThanOrEqualTo(String value) { + addCriterion("CUST_ID <=", value, "custId"); + return (Criteria) this; + } + + public Criteria andCustIdLike(String value) { + addCriterion("CUST_ID like", value, "custId"); + return (Criteria) this; + } + + public Criteria andCustIdNotLike(String value) { + addCriterion("CUST_ID not like", value, "custId"); + return (Criteria) this; + } + + public Criteria andCustIdIn(List values) { + addCriterion("CUST_ID in", values, "custId"); + return (Criteria) this; + } + + public Criteria andCustIdNotIn(List values) { + addCriterion("CUST_ID not in", values, "custId"); + return (Criteria) this; + } + + public Criteria andCustIdBetween(String value1, String value2) { + addCriterion("CUST_ID between", value1, value2, "custId"); + return (Criteria) this; + } + + public Criteria andCustIdNotBetween(String value1, String value2) { + addCriterion("CUST_ID not between", value1, value2, "custId"); + return (Criteria) this; + } + + public Criteria andCreateTimeIsNull() { + addCriterion("CREATE_TIME is null"); + return (Criteria) this; + } + + public Criteria andCreateTimeIsNotNull() { + addCriterion("CREATE_TIME is not null"); + return (Criteria) this; + } + + public Criteria andCreateTimeEqualTo(Long value) { + addCriterion("CREATE_TIME =", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeNotEqualTo(Long value) { + addCriterion("CREATE_TIME <>", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeGreaterThan(Long value) { + addCriterion("CREATE_TIME >", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeGreaterThanOrEqualTo(Long value) { + addCriterion("CREATE_TIME >=", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeLessThan(Long value) { + addCriterion("CREATE_TIME <", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeLessThanOrEqualTo(Long value) { + addCriterion("CREATE_TIME <=", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeIn(List values) { + addCriterion("CREATE_TIME in", values, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeNotIn(List values) { + addCriterion("CREATE_TIME not in", values, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeBetween(Long value1, Long value2) { + addCriterion("CREATE_TIME between", value1, value2, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeNotBetween(Long value1, Long value2) { + addCriterion("CREATE_TIME not between", value1, value2, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateUserIdIsNull() { + addCriterion("CREATE_USER_ID is null"); + return (Criteria) this; + } + + public Criteria andCreateUserIdIsNotNull() { + addCriterion("CREATE_USER_ID is not null"); + return (Criteria) this; + } + + public Criteria andCreateUserIdEqualTo(String value) { + addCriterion("CREATE_USER_ID =", value, "createUserId"); + return (Criteria) this; + } + + public Criteria andCreateUserIdNotEqualTo(String value) { + addCriterion("CREATE_USER_ID <>", value, "createUserId"); + return (Criteria) this; + } + + public Criteria andCreateUserIdGreaterThan(String value) { + addCriterion("CREATE_USER_ID >", value, "createUserId"); + return (Criteria) this; + } + + public Criteria andCreateUserIdGreaterThanOrEqualTo(String value) { + addCriterion("CREATE_USER_ID >=", value, "createUserId"); + return (Criteria) this; + } + + public Criteria andCreateUserIdLessThan(String value) { + addCriterion("CREATE_USER_ID <", value, "createUserId"); + return (Criteria) this; + } + + public Criteria andCreateUserIdLessThanOrEqualTo(String value) { + addCriterion("CREATE_USER_ID <=", value, "createUserId"); + return (Criteria) this; + } + + public Criteria andCreateUserIdLike(String value) { + addCriterion("CREATE_USER_ID like", value, "createUserId"); + return (Criteria) this; + } + + public Criteria andCreateUserIdNotLike(String value) { + addCriterion("CREATE_USER_ID not like", value, "createUserId"); + return (Criteria) this; + } + + public Criteria andCreateUserIdIn(List values) { + addCriterion("CREATE_USER_ID in", values, "createUserId"); + return (Criteria) this; + } + + public Criteria andCreateUserIdNotIn(List values) { + addCriterion("CREATE_USER_ID not in", values, "createUserId"); + return (Criteria) this; + } + + public Criteria andCreateUserIdBetween(String value1, String value2) { + addCriterion("CREATE_USER_ID between", value1, value2, "createUserId"); + return (Criteria) this; + } + + public Criteria andCreateUserIdNotBetween(String value1, String value2) { + addCriterion("CREATE_USER_ID not between", value1, value2, "createUserId"); + return (Criteria) this; + } + + public Criteria andLastUpdateTimeIsNull() { + addCriterion("LAST_UPDATE_TIME is null"); + return (Criteria) this; + } + + public Criteria andLastUpdateTimeIsNotNull() { + addCriterion("LAST_UPDATE_TIME is not null"); + return (Criteria) this; + } + + public Criteria andLastUpdateTimeEqualTo(Long value) { + addCriterion("LAST_UPDATE_TIME =", value, "lastUpdateTime"); + return (Criteria) this; + } + + public Criteria andLastUpdateTimeNotEqualTo(Long value) { + addCriterion("LAST_UPDATE_TIME <>", value, "lastUpdateTime"); + return (Criteria) this; + } + + public Criteria andLastUpdateTimeGreaterThan(Long value) { + addCriterion("LAST_UPDATE_TIME >", value, "lastUpdateTime"); + return (Criteria) this; + } + + public Criteria andLastUpdateTimeGreaterThanOrEqualTo(Long value) { + addCriterion("LAST_UPDATE_TIME >=", value, "lastUpdateTime"); + return (Criteria) this; + } + + public Criteria andLastUpdateTimeLessThan(Long value) { + addCriterion("LAST_UPDATE_TIME <", value, "lastUpdateTime"); + return (Criteria) this; + } + + public Criteria andLastUpdateTimeLessThanOrEqualTo(Long value) { + addCriterion("LAST_UPDATE_TIME <=", value, "lastUpdateTime"); + return (Criteria) this; + } + + public Criteria andLastUpdateTimeIn(List values) { + addCriterion("LAST_UPDATE_TIME in", values, "lastUpdateTime"); + return (Criteria) this; + } + + public Criteria andLastUpdateTimeNotIn(List values) { + addCriterion("LAST_UPDATE_TIME not in", values, "lastUpdateTime"); + return (Criteria) this; + } + + public Criteria andLastUpdateTimeBetween(Long value1, Long value2) { + addCriterion("LAST_UPDATE_TIME between", value1, value2, "lastUpdateTime"); + return (Criteria) this; + } + + public Criteria andLastUpdateTimeNotBetween(Long value1, Long value2) { + addCriterion("LAST_UPDATE_TIME not between", value1, value2, "lastUpdateTime"); + return (Criteria) this; + } + + public Criteria andLastUpdateUserIdIsNull() { + addCriterion("LAST_UPDATE_USER_ID is null"); + return (Criteria) this; + } + + public Criteria andLastUpdateUserIdIsNotNull() { + addCriterion("LAST_UPDATE_USER_ID is not null"); + return (Criteria) this; + } + + public Criteria andLastUpdateUserIdEqualTo(String value) { + addCriterion("LAST_UPDATE_USER_ID =", value, "lastUpdateUserId"); + return (Criteria) this; + } + + public Criteria andLastUpdateUserIdNotEqualTo(String value) { + addCriterion("LAST_UPDATE_USER_ID <>", value, "lastUpdateUserId"); + return (Criteria) this; + } + + public Criteria andLastUpdateUserIdGreaterThan(String value) { + addCriterion("LAST_UPDATE_USER_ID >", value, "lastUpdateUserId"); + return (Criteria) this; + } + + public Criteria andLastUpdateUserIdGreaterThanOrEqualTo(String value) { + addCriterion("LAST_UPDATE_USER_ID >=", value, "lastUpdateUserId"); + return (Criteria) this; + } + + public Criteria andLastUpdateUserIdLessThan(String value) { + addCriterion("LAST_UPDATE_USER_ID <", value, "lastUpdateUserId"); + return (Criteria) this; + } + + public Criteria andLastUpdateUserIdLessThanOrEqualTo(String value) { + addCriterion("LAST_UPDATE_USER_ID <=", value, "lastUpdateUserId"); + return (Criteria) this; + } + + public Criteria andLastUpdateUserIdLike(String value) { + addCriterion("LAST_UPDATE_USER_ID like", value, "lastUpdateUserId"); + return (Criteria) this; + } + + public Criteria andLastUpdateUserIdNotLike(String value) { + addCriterion("LAST_UPDATE_USER_ID not like", value, "lastUpdateUserId"); + return (Criteria) this; + } + + public Criteria andLastUpdateUserIdIn(List values) { + addCriterion("LAST_UPDATE_USER_ID in", values, "lastUpdateUserId"); + return (Criteria) this; + } + + public Criteria andLastUpdateUserIdNotIn(List values) { + addCriterion("LAST_UPDATE_USER_ID not in", values, "lastUpdateUserId"); + return (Criteria) this; + } + + public Criteria andLastUpdateUserIdBetween(String value1, String value2) { + addCriterion("LAST_UPDATE_USER_ID between", value1, value2, "lastUpdateUserId"); + return (Criteria) this; + } + + public Criteria andLastUpdateUserIdNotBetween(String value1, String value2) { + addCriterion("LAST_UPDATE_USER_ID not between", value1, value2, "lastUpdateUserId"); + return (Criteria) this; + } + + public Criteria andApplicationIdIsNull() { + addCriterion("APPLICATION_ID is null"); + return (Criteria) this; + } + + public Criteria andApplicationIdIsNotNull() { + addCriterion("APPLICATION_ID is not null"); + return (Criteria) this; + } + + public Criteria andApplicationIdEqualTo(String value) { + addCriterion("APPLICATION_ID =", value, "applicationId"); + return (Criteria) this; + } + + public Criteria andApplicationIdNotEqualTo(String value) { + addCriterion("APPLICATION_ID <>", value, "applicationId"); + return (Criteria) this; + } + + public Criteria andApplicationIdGreaterThan(String value) { + addCriterion("APPLICATION_ID >", value, "applicationId"); + return (Criteria) this; + } + + public Criteria andApplicationIdGreaterThanOrEqualTo(String value) { + addCriterion("APPLICATION_ID >=", value, "applicationId"); + return (Criteria) this; + } + + public Criteria andApplicationIdLessThan(String value) { + addCriterion("APPLICATION_ID <", value, "applicationId"); + return (Criteria) this; + } + + public Criteria andApplicationIdLessThanOrEqualTo(String value) { + addCriterion("APPLICATION_ID <=", value, "applicationId"); + return (Criteria) this; + } + + public Criteria andApplicationIdLike(String value) { + addCriterion("APPLICATION_ID like", value, "applicationId"); + return (Criteria) this; + } + + public Criteria andApplicationIdNotLike(String value) { + addCriterion("APPLICATION_ID not like", value, "applicationId"); + return (Criteria) this; + } + + public Criteria andApplicationIdIn(List values) { + addCriterion("APPLICATION_ID in", values, "applicationId"); + return (Criteria) this; + } + + public Criteria andApplicationIdNotIn(List values) { + addCriterion("APPLICATION_ID not in", values, "applicationId"); + return (Criteria) this; + } + + public Criteria andApplicationIdBetween(String value1, String value2) { + addCriterion("APPLICATION_ID between", value1, value2, "applicationId"); + return (Criteria) this; + } + + public Criteria andApplicationIdNotBetween(String value1, String value2) { + addCriterion("APPLICATION_ID not between", value1, value2, "applicationId"); + return (Criteria) this; + } + + public Criteria andCodeIsNull() { + addCriterion("CODE is null"); + return (Criteria) this; + } + + public Criteria andCodeIsNotNull() { + addCriterion("CODE is not null"); + return (Criteria) this; + } + + public Criteria andCodeEqualTo(String value) { + addCriterion("CODE =", value, "code"); + return (Criteria) this; + } + + public Criteria andCodeNotEqualTo(String value) { + addCriterion("CODE <>", value, "code"); + return (Criteria) this; + } + + public Criteria andCodeGreaterThan(String value) { + addCriterion("CODE >", value, "code"); + return (Criteria) this; + } + + public Criteria andCodeGreaterThanOrEqualTo(String value) { + addCriterion("CODE >=", value, "code"); + return (Criteria) this; + } + + public Criteria andCodeLessThan(String value) { + addCriterion("CODE <", value, "code"); + return (Criteria) this; + } + + public Criteria andCodeLessThanOrEqualTo(String value) { + addCriterion("CODE <=", value, "code"); + return (Criteria) this; + } + + public Criteria andCodeLike(String value) { + addCriterion("CODE like", value, "code"); + return (Criteria) this; + } + + public Criteria andCodeNotLike(String value) { + addCriterion("CODE not like", value, "code"); + return (Criteria) this; + } + + public Criteria andCodeIn(List values) { + addCriterion("CODE in", values, "code"); + return (Criteria) this; + } + + public Criteria andCodeNotIn(List values) { + addCriterion("CODE not in", values, "code"); + return (Criteria) this; + } + + public Criteria andCodeBetween(String value1, String value2) { + addCriterion("CODE between", value1, value2, "code"); + return (Criteria) this; + } + + public Criteria andCodeNotBetween(String value1, String value2) { + addCriterion("CODE not between", value1, value2, "code"); + return (Criteria) this; + } + + public Criteria andNameIsNull() { + addCriterion("NAME is null"); + return (Criteria) this; + } + + public Criteria andNameIsNotNull() { + addCriterion("NAME is not null"); + return (Criteria) this; + } + + public Criteria andNameEqualTo(String value) { + addCriterion("NAME =", value, "name"); + return (Criteria) this; + } + + public Criteria andNameNotEqualTo(String value) { + addCriterion("NAME <>", value, "name"); + return (Criteria) this; + } + + public Criteria andNameGreaterThan(String value) { + addCriterion("NAME >", value, "name"); + return (Criteria) this; + } + + public Criteria andNameGreaterThanOrEqualTo(String value) { + addCriterion("NAME >=", value, "name"); + return (Criteria) this; + } + + public Criteria andNameLessThan(String value) { + addCriterion("NAME <", value, "name"); + return (Criteria) this; + } + + public Criteria andNameLessThanOrEqualTo(String value) { + addCriterion("NAME <=", value, "name"); + return (Criteria) this; + } + + public Criteria andNameLike(String value) { + addCriterion("NAME like", value, "name"); + return (Criteria) this; + } + + public Criteria andNameNotLike(String value) { + addCriterion("NAME not like", value, "name"); + return (Criteria) this; + } + + public Criteria andNameIn(List values) { + addCriterion("NAME in", values, "name"); + return (Criteria) this; + } + + public Criteria andNameNotIn(List values) { + addCriterion("NAME not in", values, "name"); + return (Criteria) this; + } + + public Criteria andNameBetween(String value1, String value2) { + addCriterion("NAME between", value1, value2, "name"); + return (Criteria) this; + } + + public Criteria andNameNotBetween(String value1, String value2) { + addCriterion("NAME not between", value1, value2, "name"); + return (Criteria) this; + } + + public Criteria andRemarkIsNull() { + addCriterion("REMARK is null"); + return (Criteria) this; + } + + public Criteria andRemarkIsNotNull() { + addCriterion("REMARK is not null"); + return (Criteria) this; + } + + public Criteria andRemarkEqualTo(String value) { + addCriterion("REMARK =", value, "remark"); + return (Criteria) this; + } + + public Criteria andRemarkNotEqualTo(String value) { + addCriterion("REMARK <>", value, "remark"); + return (Criteria) this; + } + + public Criteria andRemarkGreaterThan(String value) { + addCriterion("REMARK >", value, "remark"); + return (Criteria) this; + } + + public Criteria andRemarkGreaterThanOrEqualTo(String value) { + addCriterion("REMARK >=", value, "remark"); + return (Criteria) this; + } + + public Criteria andRemarkLessThan(String value) { + addCriterion("REMARK <", value, "remark"); + return (Criteria) this; + } + + public Criteria andRemarkLessThanOrEqualTo(String value) { + addCriterion("REMARK <=", value, "remark"); + return (Criteria) this; + } + + public Criteria andRemarkLike(String value) { + addCriterion("REMARK like", value, "remark"); + return (Criteria) this; + } + + public Criteria andRemarkNotLike(String value) { + addCriterion("REMARK not like", value, "remark"); + return (Criteria) this; + } + + public Criteria andRemarkIn(List values) { + addCriterion("REMARK in", values, "remark"); + return (Criteria) this; + } + + public Criteria andRemarkNotIn(List values) { + addCriterion("REMARK not in", values, "remark"); + return (Criteria) this; + } + + public Criteria andRemarkBetween(String value1, String value2) { + addCriterion("REMARK between", value1, value2, "remark"); + return (Criteria) this; + } + + public Criteria andRemarkNotBetween(String value1, String value2) { + addCriterion("REMARK not between", value1, value2, "remark"); + return (Criteria) this; + } + + public Criteria andStatusIsNull() { + addCriterion("STATUS is null"); + return (Criteria) this; + } + + public Criteria andStatusIsNotNull() { + addCriterion("STATUS is not null"); + return (Criteria) this; + } + + public Criteria andStatusEqualTo(Short value) { + addCriterion("STATUS =", value, "status"); + return (Criteria) this; + } + + public Criteria andStatusNotEqualTo(Short value) { + addCriterion("STATUS <>", value, "status"); + return (Criteria) this; + } + + public Criteria andStatusGreaterThan(Short value) { + addCriterion("STATUS >", value, "status"); + return (Criteria) this; + } + + public Criteria andStatusGreaterThanOrEqualTo(Short value) { + addCriterion("STATUS >=", value, "status"); + return (Criteria) this; + } + + public Criteria andStatusLessThan(Short value) { + addCriterion("STATUS <", value, "status"); + return (Criteria) this; + } + + public Criteria andStatusLessThanOrEqualTo(Short value) { + addCriterion("STATUS <=", value, "status"); + return (Criteria) this; + } + + public Criteria andStatusIn(List values) { + addCriterion("STATUS in", values, "status"); + return (Criteria) this; + } + + public Criteria andStatusNotIn(List values) { + addCriterion("STATUS not in", values, "status"); + return (Criteria) this; + } + + public Criteria andStatusBetween(Short value1, Short value2) { + addCriterion("STATUS between", value1, value2, "status"); + return (Criteria) this; + } + + public Criteria andStatusNotBetween(Short value1, Short value2) { + addCriterion("STATUS not between", value1, value2, "status"); + return (Criteria) this; + } + } + + public static class Criteria extends GeneratedCriteria { + + protected Criteria() { + super(); + } + } + + public static class Criterion { + private String condition; + + private Object value; + + private Object secondValue; + + private boolean noValue; + + private boolean singleValue; + + private boolean betweenValue; + + private boolean listValue; + + private String typeHandler; + + public String getCondition() { + return condition; + } + + public Object getValue() { + return value; + } + + public Object getSecondValue() { + return secondValue; + } + + public boolean isNoValue() { + return noValue; + } + + public boolean isSingleValue() { + return singleValue; + } + + public boolean isBetweenValue() { + return betweenValue; + } + + public boolean isListValue() { + return listValue; + } + + public String getTypeHandler() { + return typeHandler; + } + + protected Criterion(String condition) { + super(); + this.condition = condition; + this.typeHandler = null; + this.noValue = true; + } + + protected Criterion(String condition, Object value, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.typeHandler = typeHandler; + if (value instanceof List) { + this.listValue = true; + } else { + this.singleValue = true; + } + } + + protected Criterion(String condition, Object value) { + this(condition, value, null); + } + + protected Criterion(String condition, Object value, Object secondValue, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.secondValue = secondValue; + this.typeHandler = typeHandler; + this.betweenValue = true; + } + + protected Criterion(String condition, Object value, Object secondValue) { + this(condition, value, secondValue, null); + } + } +} \ No newline at end of file diff --git a/itools-core/itools-model/src/main/java/com/itools/core/rbac/dto/GroupRoleDTO.java b/itools-core/itools-model/src/main/java/com/itools/core/rbac/dto/GroupRoleDTO.java new file mode 100644 index 0000000000000000000000000000000000000000..5d79acddc2451e542a2e3a3a5ad65c4e21439cc8 --- /dev/null +++ b/itools-core/itools-model/src/main/java/com/itools/core/rbac/dto/GroupRoleDTO.java @@ -0,0 +1,83 @@ +package com.itools.core.rbac.dto; + +public class GroupRoleDTO { + private String id; + + private Long createTime; + + private String createUserId; + + private Long lastUpdateTime; + + private String lastUpdateUserId; + + private String applicationId; + + private String groupId; + + private String roleId; + + public String getId() { + return id; + } + + public void setId(String id) { + this.id = id; + } + + public Long getCreateTime() { + return createTime; + } + + public void setCreateTime(Long createTime) { + this.createTime = createTime; + } + + public String getCreateUserId() { + return createUserId; + } + + public void setCreateUserId(String createUserId) { + this.createUserId = createUserId; + } + + public Long getLastUpdateTime() { + return lastUpdateTime; + } + + public void setLastUpdateTime(Long lastUpdateTime) { + this.lastUpdateTime = lastUpdateTime; + } + + public String getLastUpdateUserId() { + return lastUpdateUserId; + } + + public void setLastUpdateUserId(String lastUpdateUserId) { + this.lastUpdateUserId = lastUpdateUserId; + } + + public String getApplicationId() { + return applicationId; + } + + public void setApplicationId(String applicationId) { + this.applicationId = applicationId; + } + + public String getGroupId() { + return groupId; + } + + public void setGroupId(String groupId) { + this.groupId = groupId; + } + + public String getRoleId() { + return roleId; + } + + public void setRoleId(String roleId) { + this.roleId = roleId; + } +} \ No newline at end of file diff --git a/itools-core/itools-model/src/main/java/com/itools/core/rbac/dto/GroupRoleDTOExample.java b/itools-core/itools-model/src/main/java/com/itools/core/rbac/dto/GroupRoleDTOExample.java new file mode 100644 index 0000000000000000000000000000000000000000..f60b723c123b4d480c6d540226864f71a9fdade0 --- /dev/null +++ b/itools-core/itools-model/src/main/java/com/itools/core/rbac/dto/GroupRoleDTOExample.java @@ -0,0 +1,740 @@ +package com.itools.core.rbac.dto; + +import java.util.ArrayList; +import java.util.List; + +public class GroupRoleDTOExample { + protected String orderByClause; + + protected boolean distinct; + + protected List oredCriteria; + + public GroupRoleDTOExample() { + oredCriteria = new ArrayList(); + } + + public void setOrderByClause(String orderByClause) { + this.orderByClause = orderByClause; + } + + public String getOrderByClause() { + return orderByClause; + } + + public void setDistinct(boolean distinct) { + this.distinct = distinct; + } + + public boolean isDistinct() { + return distinct; + } + + public List getOredCriteria() { + return oredCriteria; + } + + public void or(Criteria criteria) { + oredCriteria.add(criteria); + } + + public Criteria or() { + Criteria criteria = createCriteriaInternal(); + oredCriteria.add(criteria); + return criteria; + } + + public Criteria createCriteria() { + Criteria criteria = createCriteriaInternal(); + if (oredCriteria.size() == 0) { + oredCriteria.add(criteria); + } + return criteria; + } + + protected Criteria createCriteriaInternal() { + Criteria criteria = new Criteria(); + return criteria; + } + + public void clear() { + oredCriteria.clear(); + orderByClause = null; + distinct = false; + } + + protected abstract static class GeneratedCriteria { + protected List criteria; + + protected GeneratedCriteria() { + super(); + criteria = new ArrayList(); + } + + public boolean isValid() { + return criteria.size() > 0; + } + + public List getAllCriteria() { + return criteria; + } + + public List getCriteria() { + return criteria; + } + + protected void addCriterion(String condition) { + if (condition == null) { + throw new RuntimeException("Value for condition cannot be null"); + } + criteria.add(new Criterion(condition)); + } + + protected void addCriterion(String condition, Object value, String property) { + if (value == null) { + throw new RuntimeException("Value for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value)); + } + + protected void addCriterion(String condition, Object value1, Object value2, String property) { + if (value1 == null || value2 == null) { + throw new RuntimeException("Between values for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value1, value2)); + } + + public Criteria andIdIsNull() { + addCriterion("ID is null"); + return (Criteria) this; + } + + public Criteria andIdIsNotNull() { + addCriterion("ID is not null"); + return (Criteria) this; + } + + public Criteria andIdEqualTo(String value) { + addCriterion("ID =", value, "id"); + return (Criteria) this; + } + + public Criteria andIdNotEqualTo(String value) { + addCriterion("ID <>", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThan(String value) { + addCriterion("ID >", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThanOrEqualTo(String value) { + addCriterion("ID >=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThan(String value) { + addCriterion("ID <", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThanOrEqualTo(String value) { + addCriterion("ID <=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLike(String value) { + addCriterion("ID like", value, "id"); + return (Criteria) this; + } + + public Criteria andIdNotLike(String value) { + addCriterion("ID not like", value, "id"); + return (Criteria) this; + } + + public Criteria andIdIn(List values) { + addCriterion("ID in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdNotIn(List values) { + addCriterion("ID not in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdBetween(String value1, String value2) { + addCriterion("ID between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andIdNotBetween(String value1, String value2) { + addCriterion("ID not between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andCreateTimeIsNull() { + addCriterion("CREATE_TIME is null"); + return (Criteria) this; + } + + public Criteria andCreateTimeIsNotNull() { + addCriterion("CREATE_TIME is not null"); + return (Criteria) this; + } + + public Criteria andCreateTimeEqualTo(Long value) { + addCriterion("CREATE_TIME =", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeNotEqualTo(Long value) { + addCriterion("CREATE_TIME <>", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeGreaterThan(Long value) { + addCriterion("CREATE_TIME >", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeGreaterThanOrEqualTo(Long value) { + addCriterion("CREATE_TIME >=", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeLessThan(Long value) { + addCriterion("CREATE_TIME <", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeLessThanOrEqualTo(Long value) { + addCriterion("CREATE_TIME <=", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeIn(List values) { + addCriterion("CREATE_TIME in", values, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeNotIn(List values) { + addCriterion("CREATE_TIME not in", values, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeBetween(Long value1, Long value2) { + addCriterion("CREATE_TIME between", value1, value2, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeNotBetween(Long value1, Long value2) { + addCriterion("CREATE_TIME not between", value1, value2, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateUserIdIsNull() { + addCriterion("CREATE_USER_ID is null"); + return (Criteria) this; + } + + public Criteria andCreateUserIdIsNotNull() { + addCriterion("CREATE_USER_ID is not null"); + return (Criteria) this; + } + + public Criteria andCreateUserIdEqualTo(String value) { + addCriterion("CREATE_USER_ID =", value, "createUserId"); + return (Criteria) this; + } + + public Criteria andCreateUserIdNotEqualTo(String value) { + addCriterion("CREATE_USER_ID <>", value, "createUserId"); + return (Criteria) this; + } + + public Criteria andCreateUserIdGreaterThan(String value) { + addCriterion("CREATE_USER_ID >", value, "createUserId"); + return (Criteria) this; + } + + public Criteria andCreateUserIdGreaterThanOrEqualTo(String value) { + addCriterion("CREATE_USER_ID >=", value, "createUserId"); + return (Criteria) this; + } + + public Criteria andCreateUserIdLessThan(String value) { + addCriterion("CREATE_USER_ID <", value, "createUserId"); + return (Criteria) this; + } + + public Criteria andCreateUserIdLessThanOrEqualTo(String value) { + addCriterion("CREATE_USER_ID <=", value, "createUserId"); + return (Criteria) this; + } + + public Criteria andCreateUserIdLike(String value) { + addCriterion("CREATE_USER_ID like", value, "createUserId"); + return (Criteria) this; + } + + public Criteria andCreateUserIdNotLike(String value) { + addCriterion("CREATE_USER_ID not like", value, "createUserId"); + return (Criteria) this; + } + + public Criteria andCreateUserIdIn(List values) { + addCriterion("CREATE_USER_ID in", values, "createUserId"); + return (Criteria) this; + } + + public Criteria andCreateUserIdNotIn(List values) { + addCriterion("CREATE_USER_ID not in", values, "createUserId"); + return (Criteria) this; + } + + public Criteria andCreateUserIdBetween(String value1, String value2) { + addCriterion("CREATE_USER_ID between", value1, value2, "createUserId"); + return (Criteria) this; + } + + public Criteria andCreateUserIdNotBetween(String value1, String value2) { + addCriterion("CREATE_USER_ID not between", value1, value2, "createUserId"); + return (Criteria) this; + } + + public Criteria andLastUpdateTimeIsNull() { + addCriterion("LAST_UPDATE_TIME is null"); + return (Criteria) this; + } + + public Criteria andLastUpdateTimeIsNotNull() { + addCriterion("LAST_UPDATE_TIME is not null"); + return (Criteria) this; + } + + public Criteria andLastUpdateTimeEqualTo(Long value) { + addCriterion("LAST_UPDATE_TIME =", value, "lastUpdateTime"); + return (Criteria) this; + } + + public Criteria andLastUpdateTimeNotEqualTo(Long value) { + addCriterion("LAST_UPDATE_TIME <>", value, "lastUpdateTime"); + return (Criteria) this; + } + + public Criteria andLastUpdateTimeGreaterThan(Long value) { + addCriterion("LAST_UPDATE_TIME >", value, "lastUpdateTime"); + return (Criteria) this; + } + + public Criteria andLastUpdateTimeGreaterThanOrEqualTo(Long value) { + addCriterion("LAST_UPDATE_TIME >=", value, "lastUpdateTime"); + return (Criteria) this; + } + + public Criteria andLastUpdateTimeLessThan(Long value) { + addCriterion("LAST_UPDATE_TIME <", value, "lastUpdateTime"); + return (Criteria) this; + } + + public Criteria andLastUpdateTimeLessThanOrEqualTo(Long value) { + addCriterion("LAST_UPDATE_TIME <=", value, "lastUpdateTime"); + return (Criteria) this; + } + + public Criteria andLastUpdateTimeIn(List values) { + addCriterion("LAST_UPDATE_TIME in", values, "lastUpdateTime"); + return (Criteria) this; + } + + public Criteria andLastUpdateTimeNotIn(List values) { + addCriterion("LAST_UPDATE_TIME not in", values, "lastUpdateTime"); + return (Criteria) this; + } + + public Criteria andLastUpdateTimeBetween(Long value1, Long value2) { + addCriterion("LAST_UPDATE_TIME between", value1, value2, "lastUpdateTime"); + return (Criteria) this; + } + + public Criteria andLastUpdateTimeNotBetween(Long value1, Long value2) { + addCriterion("LAST_UPDATE_TIME not between", value1, value2, "lastUpdateTime"); + return (Criteria) this; + } + + public Criteria andLastUpdateUserIdIsNull() { + addCriterion("LAST_UPDATE_USER_ID is null"); + return (Criteria) this; + } + + public Criteria andLastUpdateUserIdIsNotNull() { + addCriterion("LAST_UPDATE_USER_ID is not null"); + return (Criteria) this; + } + + public Criteria andLastUpdateUserIdEqualTo(String value) { + addCriterion("LAST_UPDATE_USER_ID =", value, "lastUpdateUserId"); + return (Criteria) this; + } + + public Criteria andLastUpdateUserIdNotEqualTo(String value) { + addCriterion("LAST_UPDATE_USER_ID <>", value, "lastUpdateUserId"); + return (Criteria) this; + } + + public Criteria andLastUpdateUserIdGreaterThan(String value) { + addCriterion("LAST_UPDATE_USER_ID >", value, "lastUpdateUserId"); + return (Criteria) this; + } + + public Criteria andLastUpdateUserIdGreaterThanOrEqualTo(String value) { + addCriterion("LAST_UPDATE_USER_ID >=", value, "lastUpdateUserId"); + return (Criteria) this; + } + + public Criteria andLastUpdateUserIdLessThan(String value) { + addCriterion("LAST_UPDATE_USER_ID <", value, "lastUpdateUserId"); + return (Criteria) this; + } + + public Criteria andLastUpdateUserIdLessThanOrEqualTo(String value) { + addCriterion("LAST_UPDATE_USER_ID <=", value, "lastUpdateUserId"); + return (Criteria) this; + } + + public Criteria andLastUpdateUserIdLike(String value) { + addCriterion("LAST_UPDATE_USER_ID like", value, "lastUpdateUserId"); + return (Criteria) this; + } + + public Criteria andLastUpdateUserIdNotLike(String value) { + addCriterion("LAST_UPDATE_USER_ID not like", value, "lastUpdateUserId"); + return (Criteria) this; + } + + public Criteria andLastUpdateUserIdIn(List values) { + addCriterion("LAST_UPDATE_USER_ID in", values, "lastUpdateUserId"); + return (Criteria) this; + } + + public Criteria andLastUpdateUserIdNotIn(List values) { + addCriterion("LAST_UPDATE_USER_ID not in", values, "lastUpdateUserId"); + return (Criteria) this; + } + + public Criteria andLastUpdateUserIdBetween(String value1, String value2) { + addCriterion("LAST_UPDATE_USER_ID between", value1, value2, "lastUpdateUserId"); + return (Criteria) this; + } + + public Criteria andLastUpdateUserIdNotBetween(String value1, String value2) { + addCriterion("LAST_UPDATE_USER_ID not between", value1, value2, "lastUpdateUserId"); + return (Criteria) this; + } + + public Criteria andApplicationIdIsNull() { + addCriterion("APPLICATION_ID is null"); + return (Criteria) this; + } + + public Criteria andApplicationIdIsNotNull() { + addCriterion("APPLICATION_ID is not null"); + return (Criteria) this; + } + + public Criteria andApplicationIdEqualTo(String value) { + addCriterion("APPLICATION_ID =", value, "applicationId"); + return (Criteria) this; + } + + public Criteria andApplicationIdNotEqualTo(String value) { + addCriterion("APPLICATION_ID <>", value, "applicationId"); + return (Criteria) this; + } + + public Criteria andApplicationIdGreaterThan(String value) { + addCriterion("APPLICATION_ID >", value, "applicationId"); + return (Criteria) this; + } + + public Criteria andApplicationIdGreaterThanOrEqualTo(String value) { + addCriterion("APPLICATION_ID >=", value, "applicationId"); + return (Criteria) this; + } + + public Criteria andApplicationIdLessThan(String value) { + addCriterion("APPLICATION_ID <", value, "applicationId"); + return (Criteria) this; + } + + public Criteria andApplicationIdLessThanOrEqualTo(String value) { + addCriterion("APPLICATION_ID <=", value, "applicationId"); + return (Criteria) this; + } + + public Criteria andApplicationIdLike(String value) { + addCriterion("APPLICATION_ID like", value, "applicationId"); + return (Criteria) this; + } + + public Criteria andApplicationIdNotLike(String value) { + addCriterion("APPLICATION_ID not like", value, "applicationId"); + return (Criteria) this; + } + + public Criteria andApplicationIdIn(List values) { + addCriterion("APPLICATION_ID in", values, "applicationId"); + return (Criteria) this; + } + + public Criteria andApplicationIdNotIn(List values) { + addCriterion("APPLICATION_ID not in", values, "applicationId"); + return (Criteria) this; + } + + public Criteria andApplicationIdBetween(String value1, String value2) { + addCriterion("APPLICATION_ID between", value1, value2, "applicationId"); + return (Criteria) this; + } + + public Criteria andApplicationIdNotBetween(String value1, String value2) { + addCriterion("APPLICATION_ID not between", value1, value2, "applicationId"); + return (Criteria) this; + } + + public Criteria andGroupIdIsNull() { + addCriterion("GROUP_ID is null"); + return (Criteria) this; + } + + public Criteria andGroupIdIsNotNull() { + addCriterion("GROUP_ID is not null"); + return (Criteria) this; + } + + public Criteria andGroupIdEqualTo(String value) { + addCriterion("GROUP_ID =", value, "groupId"); + return (Criteria) this; + } + + public Criteria andGroupIdNotEqualTo(String value) { + addCriterion("GROUP_ID <>", value, "groupId"); + return (Criteria) this; + } + + public Criteria andGroupIdGreaterThan(String value) { + addCriterion("GROUP_ID >", value, "groupId"); + return (Criteria) this; + } + + public Criteria andGroupIdGreaterThanOrEqualTo(String value) { + addCriterion("GROUP_ID >=", value, "groupId"); + return (Criteria) this; + } + + public Criteria andGroupIdLessThan(String value) { + addCriterion("GROUP_ID <", value, "groupId"); + return (Criteria) this; + } + + public Criteria andGroupIdLessThanOrEqualTo(String value) { + addCriterion("GROUP_ID <=", value, "groupId"); + return (Criteria) this; + } + + public Criteria andGroupIdLike(String value) { + addCriterion("GROUP_ID like", value, "groupId"); + return (Criteria) this; + } + + public Criteria andGroupIdNotLike(String value) { + addCriterion("GROUP_ID not like", value, "groupId"); + return (Criteria) this; + } + + public Criteria andGroupIdIn(List values) { + addCriterion("GROUP_ID in", values, "groupId"); + return (Criteria) this; + } + + public Criteria andGroupIdNotIn(List values) { + addCriterion("GROUP_ID not in", values, "groupId"); + return (Criteria) this; + } + + public Criteria andGroupIdBetween(String value1, String value2) { + addCriterion("GROUP_ID between", value1, value2, "groupId"); + return (Criteria) this; + } + + public Criteria andGroupIdNotBetween(String value1, String value2) { + addCriterion("GROUP_ID not between", value1, value2, "groupId"); + return (Criteria) this; + } + + public Criteria andRoleIdIsNull() { + addCriterion("ROLE_ID is null"); + return (Criteria) this; + } + + public Criteria andRoleIdIsNotNull() { + addCriterion("ROLE_ID is not null"); + return (Criteria) this; + } + + public Criteria andRoleIdEqualTo(String value) { + addCriterion("ROLE_ID =", value, "roleId"); + return (Criteria) this; + } + + public Criteria andRoleIdNotEqualTo(String value) { + addCriterion("ROLE_ID <>", value, "roleId"); + return (Criteria) this; + } + + public Criteria andRoleIdGreaterThan(String value) { + addCriterion("ROLE_ID >", value, "roleId"); + return (Criteria) this; + } + + public Criteria andRoleIdGreaterThanOrEqualTo(String value) { + addCriterion("ROLE_ID >=", value, "roleId"); + return (Criteria) this; + } + + public Criteria andRoleIdLessThan(String value) { + addCriterion("ROLE_ID <", value, "roleId"); + return (Criteria) this; + } + + public Criteria andRoleIdLessThanOrEqualTo(String value) { + addCriterion("ROLE_ID <=", value, "roleId"); + return (Criteria) this; + } + + public Criteria andRoleIdLike(String value) { + addCriterion("ROLE_ID like", value, "roleId"); + return (Criteria) this; + } + + public Criteria andRoleIdNotLike(String value) { + addCriterion("ROLE_ID not like", value, "roleId"); + return (Criteria) this; + } + + public Criteria andRoleIdIn(List values) { + addCriterion("ROLE_ID in", values, "roleId"); + return (Criteria) this; + } + + public Criteria andRoleIdNotIn(List values) { + addCriterion("ROLE_ID not in", values, "roleId"); + return (Criteria) this; + } + + public Criteria andRoleIdBetween(String value1, String value2) { + addCriterion("ROLE_ID between", value1, value2, "roleId"); + return (Criteria) this; + } + + public Criteria andRoleIdNotBetween(String value1, String value2) { + addCriterion("ROLE_ID not between", value1, value2, "roleId"); + return (Criteria) this; + } + } + + public static class Criteria extends GeneratedCriteria { + + protected Criteria() { + super(); + } + } + + public static class Criterion { + private String condition; + + private Object value; + + private Object secondValue; + + private boolean noValue; + + private boolean singleValue; + + private boolean betweenValue; + + private boolean listValue; + + private String typeHandler; + + public String getCondition() { + return condition; + } + + public Object getValue() { + return value; + } + + public Object getSecondValue() { + return secondValue; + } + + public boolean isNoValue() { + return noValue; + } + + public boolean isSingleValue() { + return singleValue; + } + + public boolean isBetweenValue() { + return betweenValue; + } + + public boolean isListValue() { + return listValue; + } + + public String getTypeHandler() { + return typeHandler; + } + + protected Criterion(String condition) { + super(); + this.condition = condition; + this.typeHandler = null; + this.noValue = true; + } + + protected Criterion(String condition, Object value, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.typeHandler = typeHandler; + if (value instanceof List) { + this.listValue = true; + } else { + this.singleValue = true; + } + } + + protected Criterion(String condition, Object value) { + this(condition, value, null); + } + + protected Criterion(String condition, Object value, Object secondValue, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.secondValue = secondValue; + this.typeHandler = typeHandler; + this.betweenValue = true; + } + + protected Criterion(String condition, Object value, Object secondValue) { + this(condition, value, secondValue, null); + } + } +} \ No newline at end of file diff --git a/itools-core/itools-model/src/main/java/com/itools/core/rbac/dto/OrganizationDTO.java b/itools-core/itools-model/src/main/java/com/itools/core/rbac/dto/OrganizationDTO.java new file mode 100644 index 0000000000000000000000000000000000000000..8f46dc524b333c402b727aaf21485991ea398d73 --- /dev/null +++ b/itools-core/itools-model/src/main/java/com/itools/core/rbac/dto/OrganizationDTO.java @@ -0,0 +1,283 @@ +package com.itools.core.rbac.dto; + +public class OrganizationDTO { + private String id; + + private String name; + + private String parentId; + + private Long createTime; + + private String createUserId; + + private Long lastUpdateTime; + + private String lastUpdateUserId; + + private String address; + + private String applicationId; + + private String code; + + private String custId; + + private String fax; + + private String linkManDept; + + private String linkManEmail; + + private String linkManName; + + private String linkManPos; + + private String linkManTel; + + private Short rank; + + private String remark; + + private Short status; + + private String telephone; + + private Short type; + + private String zipCode; + + private String path; + + private String organizationNumber; + + private String adminUserId; + + private Short area; + + private Short orderBy; + + public String getId() { + return id; + } + + public void setId(String id) { + this.id = id; + } + + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + public String getParentId() { + return parentId; + } + + public void setParentId(String parentId) { + this.parentId = parentId; + } + + public Long getCreateTime() { + return createTime; + } + + public void setCreateTime(Long createTime) { + this.createTime = createTime; + } + + public String getCreateUserId() { + return createUserId; + } + + public void setCreateUserId(String createUserId) { + this.createUserId = createUserId; + } + + public Long getLastUpdateTime() { + return lastUpdateTime; + } + + public void setLastUpdateTime(Long lastUpdateTime) { + this.lastUpdateTime = lastUpdateTime; + } + + public String getLastUpdateUserId() { + return lastUpdateUserId; + } + + public void setLastUpdateUserId(String lastUpdateUserId) { + this.lastUpdateUserId = lastUpdateUserId; + } + + public String getAddress() { + return address; + } + + public void setAddress(String address) { + this.address = address; + } + + public String getApplicationId() { + return applicationId; + } + + public void setApplicationId(String applicationId) { + this.applicationId = applicationId; + } + + public String getCode() { + return code; + } + + public void setCode(String code) { + this.code = code; + } + + public String getCustId() { + return custId; + } + + public void setCustId(String custId) { + this.custId = custId; + } + + public String getFax() { + return fax; + } + + public void setFax(String fax) { + this.fax = fax; + } + + public String getLinkManDept() { + return linkManDept; + } + + public void setLinkManDept(String linkManDept) { + this.linkManDept = linkManDept; + } + + public String getLinkManEmail() { + return linkManEmail; + } + + public void setLinkManEmail(String linkManEmail) { + this.linkManEmail = linkManEmail; + } + + public String getLinkManName() { + return linkManName; + } + + public void setLinkManName(String linkManName) { + this.linkManName = linkManName; + } + + public String getLinkManPos() { + return linkManPos; + } + + public void setLinkManPos(String linkManPos) { + this.linkManPos = linkManPos; + } + + public String getLinkManTel() { + return linkManTel; + } + + public void setLinkManTel(String linkManTel) { + this.linkManTel = linkManTel; + } + + public Short getRank() { + return rank; + } + + public void setRank(Short rank) { + this.rank = rank; + } + + public String getRemark() { + return remark; + } + + public void setRemark(String remark) { + this.remark = remark; + } + + public Short getStatus() { + return status; + } + + public void setStatus(Short status) { + this.status = status; + } + + public String getTelephone() { + return telephone; + } + + public void setTelephone(String telephone) { + this.telephone = telephone; + } + + public Short getType() { + return type; + } + + public void setType(Short type) { + this.type = type; + } + + public String getZipCode() { + return zipCode; + } + + public void setZipCode(String zipCode) { + this.zipCode = zipCode; + } + + public String getPath() { + return path; + } + + public void setPath(String path) { + this.path = path; + } + + public String getOrganizationNumber() { + return organizationNumber; + } + + public void setOrganizationNumber(String organizationNumber) { + this.organizationNumber = organizationNumber; + } + + public String getAdminUserId() { + return adminUserId; + } + + public void setAdminUserId(String adminUserId) { + this.adminUserId = adminUserId; + } + + public Short getArea() { + return area; + } + + public void setArea(Short area) { + this.area = area; + } + + public Short getOrderBy() { + return orderBy; + } + + public void setOrderBy(Short orderBy) { + this.orderBy = orderBy; + } +} \ No newline at end of file diff --git a/itools-core/itools-model/src/main/java/com/itools/core/rbac/dto/OrganizationDTOExample.java b/itools-core/itools-model/src/main/java/com/itools/core/rbac/dto/OrganizationDTOExample.java new file mode 100644 index 0000000000000000000000000000000000000000..3814f57d074e535775bab5777e25e5504f9586ad --- /dev/null +++ b/itools-core/itools-model/src/main/java/com/itools/core/rbac/dto/OrganizationDTOExample.java @@ -0,0 +1,2090 @@ +package com.itools.core.rbac.dto; + +import java.util.ArrayList; +import java.util.List; + +public class OrganizationDTOExample { + protected String orderByClause; + + protected boolean distinct; + + protected List oredCriteria; + + public OrganizationDTOExample() { + oredCriteria = new ArrayList(); + } + + public void setOrderByClause(String orderByClause) { + this.orderByClause = orderByClause; + } + + public String getOrderByClause() { + return orderByClause; + } + + public void setDistinct(boolean distinct) { + this.distinct = distinct; + } + + public boolean isDistinct() { + return distinct; + } + + public List getOredCriteria() { + return oredCriteria; + } + + public void or(Criteria criteria) { + oredCriteria.add(criteria); + } + + public Criteria or() { + Criteria criteria = createCriteriaInternal(); + oredCriteria.add(criteria); + return criteria; + } + + public Criteria createCriteria() { + Criteria criteria = createCriteriaInternal(); + if (oredCriteria.size() == 0) { + oredCriteria.add(criteria); + } + return criteria; + } + + protected Criteria createCriteriaInternal() { + Criteria criteria = new Criteria(); + return criteria; + } + + public void clear() { + oredCriteria.clear(); + orderByClause = null; + distinct = false; + } + + protected abstract static class GeneratedCriteria { + protected List criteria; + + protected GeneratedCriteria() { + super(); + criteria = new ArrayList(); + } + + public boolean isValid() { + return criteria.size() > 0; + } + + public List getAllCriteria() { + return criteria; + } + + public List getCriteria() { + return criteria; + } + + protected void addCriterion(String condition) { + if (condition == null) { + throw new RuntimeException("Value for condition cannot be null"); + } + criteria.add(new Criterion(condition)); + } + + protected void addCriterion(String condition, Object value, String property) { + if (value == null) { + throw new RuntimeException("Value for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value)); + } + + protected void addCriterion(String condition, Object value1, Object value2, String property) { + if (value1 == null || value2 == null) { + throw new RuntimeException("Between values for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value1, value2)); + } + + public Criteria andIdIsNull() { + addCriterion("ID is null"); + return (Criteria) this; + } + + public Criteria andIdIsNotNull() { + addCriterion("ID is not null"); + return (Criteria) this; + } + + public Criteria andIdEqualTo(String value) { + addCriterion("ID =", value, "id"); + return (Criteria) this; + } + + public Criteria andIdNotEqualTo(String value) { + addCriterion("ID <>", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThan(String value) { + addCriterion("ID >", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThanOrEqualTo(String value) { + addCriterion("ID >=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThan(String value) { + addCriterion("ID <", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThanOrEqualTo(String value) { + addCriterion("ID <=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLike(String value) { + addCriterion("ID like", value, "id"); + return (Criteria) this; + } + + public Criteria andIdNotLike(String value) { + addCriterion("ID not like", value, "id"); + return (Criteria) this; + } + + public Criteria andIdIn(List values) { + addCriterion("ID in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdNotIn(List values) { + addCriterion("ID not in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdBetween(String value1, String value2) { + addCriterion("ID between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andIdNotBetween(String value1, String value2) { + addCriterion("ID not between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andNameIsNull() { + addCriterion("NAME is null"); + return (Criteria) this; + } + + public Criteria andNameIsNotNull() { + addCriterion("NAME is not null"); + return (Criteria) this; + } + + public Criteria andNameEqualTo(String value) { + addCriterion("NAME =", value, "name"); + return (Criteria) this; + } + + public Criteria andNameNotEqualTo(String value) { + addCriterion("NAME <>", value, "name"); + return (Criteria) this; + } + + public Criteria andNameGreaterThan(String value) { + addCriterion("NAME >", value, "name"); + return (Criteria) this; + } + + public Criteria andNameGreaterThanOrEqualTo(String value) { + addCriterion("NAME >=", value, "name"); + return (Criteria) this; + } + + public Criteria andNameLessThan(String value) { + addCriterion("NAME <", value, "name"); + return (Criteria) this; + } + + public Criteria andNameLessThanOrEqualTo(String value) { + addCriterion("NAME <=", value, "name"); + return (Criteria) this; + } + + public Criteria andNameLike(String value) { + addCriterion("NAME like", value, "name"); + return (Criteria) this; + } + + public Criteria andNameNotLike(String value) { + addCriterion("NAME not like", value, "name"); + return (Criteria) this; + } + + public Criteria andNameIn(List values) { + addCriterion("NAME in", values, "name"); + return (Criteria) this; + } + + public Criteria andNameNotIn(List values) { + addCriterion("NAME not in", values, "name"); + return (Criteria) this; + } + + public Criteria andNameBetween(String value1, String value2) { + addCriterion("NAME between", value1, value2, "name"); + return (Criteria) this; + } + + public Criteria andNameNotBetween(String value1, String value2) { + addCriterion("NAME not between", value1, value2, "name"); + return (Criteria) this; + } + + public Criteria andParentIdIsNull() { + addCriterion("PARENT_ID is null"); + return (Criteria) this; + } + + public Criteria andParentIdIsNotNull() { + addCriterion("PARENT_ID is not null"); + return (Criteria) this; + } + + public Criteria andParentIdEqualTo(String value) { + addCriterion("PARENT_ID =", value, "parentId"); + return (Criteria) this; + } + + public Criteria andParentIdNotEqualTo(String value) { + addCriterion("PARENT_ID <>", value, "parentId"); + return (Criteria) this; + } + + public Criteria andParentIdGreaterThan(String value) { + addCriterion("PARENT_ID >", value, "parentId"); + return (Criteria) this; + } + + public Criteria andParentIdGreaterThanOrEqualTo(String value) { + addCriterion("PARENT_ID >=", value, "parentId"); + return (Criteria) this; + } + + public Criteria andParentIdLessThan(String value) { + addCriterion("PARENT_ID <", value, "parentId"); + return (Criteria) this; + } + + public Criteria andParentIdLessThanOrEqualTo(String value) { + addCriterion("PARENT_ID <=", value, "parentId"); + return (Criteria) this; + } + + public Criteria andParentIdLike(String value) { + addCriterion("PARENT_ID like", value, "parentId"); + return (Criteria) this; + } + + public Criteria andParentIdNotLike(String value) { + addCriterion("PARENT_ID not like", value, "parentId"); + return (Criteria) this; + } + + public Criteria andParentIdIn(List values) { + addCriterion("PARENT_ID in", values, "parentId"); + return (Criteria) this; + } + + public Criteria andParentIdNotIn(List values) { + addCriterion("PARENT_ID not in", values, "parentId"); + return (Criteria) this; + } + + public Criteria andParentIdBetween(String value1, String value2) { + addCriterion("PARENT_ID between", value1, value2, "parentId"); + return (Criteria) this; + } + + public Criteria andParentIdNotBetween(String value1, String value2) { + addCriterion("PARENT_ID not between", value1, value2, "parentId"); + return (Criteria) this; + } + + public Criteria andCreateTimeIsNull() { + addCriterion("CREATE_TIME is null"); + return (Criteria) this; + } + + public Criteria andCreateTimeIsNotNull() { + addCriterion("CREATE_TIME is not null"); + return (Criteria) this; + } + + public Criteria andCreateTimeEqualTo(Long value) { + addCriterion("CREATE_TIME =", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeNotEqualTo(Long value) { + addCriterion("CREATE_TIME <>", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeGreaterThan(Long value) { + addCriterion("CREATE_TIME >", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeGreaterThanOrEqualTo(Long value) { + addCriterion("CREATE_TIME >=", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeLessThan(Long value) { + addCriterion("CREATE_TIME <", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeLessThanOrEqualTo(Long value) { + addCriterion("CREATE_TIME <=", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeIn(List values) { + addCriterion("CREATE_TIME in", values, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeNotIn(List values) { + addCriterion("CREATE_TIME not in", values, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeBetween(Long value1, Long value2) { + addCriterion("CREATE_TIME between", value1, value2, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeNotBetween(Long value1, Long value2) { + addCriterion("CREATE_TIME not between", value1, value2, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateUserIdIsNull() { + addCriterion("CREATE_USER_ID is null"); + return (Criteria) this; + } + + public Criteria andCreateUserIdIsNotNull() { + addCriterion("CREATE_USER_ID is not null"); + return (Criteria) this; + } + + public Criteria andCreateUserIdEqualTo(String value) { + addCriterion("CREATE_USER_ID =", value, "createUserId"); + return (Criteria) this; + } + + public Criteria andCreateUserIdNotEqualTo(String value) { + addCriterion("CREATE_USER_ID <>", value, "createUserId"); + return (Criteria) this; + } + + public Criteria andCreateUserIdGreaterThan(String value) { + addCriterion("CREATE_USER_ID >", value, "createUserId"); + return (Criteria) this; + } + + public Criteria andCreateUserIdGreaterThanOrEqualTo(String value) { + addCriterion("CREATE_USER_ID >=", value, "createUserId"); + return (Criteria) this; + } + + public Criteria andCreateUserIdLessThan(String value) { + addCriterion("CREATE_USER_ID <", value, "createUserId"); + return (Criteria) this; + } + + public Criteria andCreateUserIdLessThanOrEqualTo(String value) { + addCriterion("CREATE_USER_ID <=", value, "createUserId"); + return (Criteria) this; + } + + public Criteria andCreateUserIdLike(String value) { + addCriterion("CREATE_USER_ID like", value, "createUserId"); + return (Criteria) this; + } + + public Criteria andCreateUserIdNotLike(String value) { + addCriterion("CREATE_USER_ID not like", value, "createUserId"); + return (Criteria) this; + } + + public Criteria andCreateUserIdIn(List values) { + addCriterion("CREATE_USER_ID in", values, "createUserId"); + return (Criteria) this; + } + + public Criteria andCreateUserIdNotIn(List values) { + addCriterion("CREATE_USER_ID not in", values, "createUserId"); + return (Criteria) this; + } + + public Criteria andCreateUserIdBetween(String value1, String value2) { + addCriterion("CREATE_USER_ID between", value1, value2, "createUserId"); + return (Criteria) this; + } + + public Criteria andCreateUserIdNotBetween(String value1, String value2) { + addCriterion("CREATE_USER_ID not between", value1, value2, "createUserId"); + return (Criteria) this; + } + + public Criteria andLastUpdateTimeIsNull() { + addCriterion("LAST_UPDATE_TIME is null"); + return (Criteria) this; + } + + public Criteria andLastUpdateTimeIsNotNull() { + addCriterion("LAST_UPDATE_TIME is not null"); + return (Criteria) this; + } + + public Criteria andLastUpdateTimeEqualTo(Long value) { + addCriterion("LAST_UPDATE_TIME =", value, "lastUpdateTime"); + return (Criteria) this; + } + + public Criteria andLastUpdateTimeNotEqualTo(Long value) { + addCriterion("LAST_UPDATE_TIME <>", value, "lastUpdateTime"); + return (Criteria) this; + } + + public Criteria andLastUpdateTimeGreaterThan(Long value) { + addCriterion("LAST_UPDATE_TIME >", value, "lastUpdateTime"); + return (Criteria) this; + } + + public Criteria andLastUpdateTimeGreaterThanOrEqualTo(Long value) { + addCriterion("LAST_UPDATE_TIME >=", value, "lastUpdateTime"); + return (Criteria) this; + } + + public Criteria andLastUpdateTimeLessThan(Long value) { + addCriterion("LAST_UPDATE_TIME <", value, "lastUpdateTime"); + return (Criteria) this; + } + + public Criteria andLastUpdateTimeLessThanOrEqualTo(Long value) { + addCriterion("LAST_UPDATE_TIME <=", value, "lastUpdateTime"); + return (Criteria) this; + } + + public Criteria andLastUpdateTimeIn(List values) { + addCriterion("LAST_UPDATE_TIME in", values, "lastUpdateTime"); + return (Criteria) this; + } + + public Criteria andLastUpdateTimeNotIn(List values) { + addCriterion("LAST_UPDATE_TIME not in", values, "lastUpdateTime"); + return (Criteria) this; + } + + public Criteria andLastUpdateTimeBetween(Long value1, Long value2) { + addCriterion("LAST_UPDATE_TIME between", value1, value2, "lastUpdateTime"); + return (Criteria) this; + } + + public Criteria andLastUpdateTimeNotBetween(Long value1, Long value2) { + addCriterion("LAST_UPDATE_TIME not between", value1, value2, "lastUpdateTime"); + return (Criteria) this; + } + + public Criteria andLastUpdateUserIdIsNull() { + addCriterion("LAST_UPDATE_USER_ID is null"); + return (Criteria) this; + } + + public Criteria andLastUpdateUserIdIsNotNull() { + addCriterion("LAST_UPDATE_USER_ID is not null"); + return (Criteria) this; + } + + public Criteria andLastUpdateUserIdEqualTo(String value) { + addCriterion("LAST_UPDATE_USER_ID =", value, "lastUpdateUserId"); + return (Criteria) this; + } + + public Criteria andLastUpdateUserIdNotEqualTo(String value) { + addCriterion("LAST_UPDATE_USER_ID <>", value, "lastUpdateUserId"); + return (Criteria) this; + } + + public Criteria andLastUpdateUserIdGreaterThan(String value) { + addCriterion("LAST_UPDATE_USER_ID >", value, "lastUpdateUserId"); + return (Criteria) this; + } + + public Criteria andLastUpdateUserIdGreaterThanOrEqualTo(String value) { + addCriterion("LAST_UPDATE_USER_ID >=", value, "lastUpdateUserId"); + return (Criteria) this; + } + + public Criteria andLastUpdateUserIdLessThan(String value) { + addCriterion("LAST_UPDATE_USER_ID <", value, "lastUpdateUserId"); + return (Criteria) this; + } + + public Criteria andLastUpdateUserIdLessThanOrEqualTo(String value) { + addCriterion("LAST_UPDATE_USER_ID <=", value, "lastUpdateUserId"); + return (Criteria) this; + } + + public Criteria andLastUpdateUserIdLike(String value) { + addCriterion("LAST_UPDATE_USER_ID like", value, "lastUpdateUserId"); + return (Criteria) this; + } + + public Criteria andLastUpdateUserIdNotLike(String value) { + addCriterion("LAST_UPDATE_USER_ID not like", value, "lastUpdateUserId"); + return (Criteria) this; + } + + public Criteria andLastUpdateUserIdIn(List values) { + addCriterion("LAST_UPDATE_USER_ID in", values, "lastUpdateUserId"); + return (Criteria) this; + } + + public Criteria andLastUpdateUserIdNotIn(List values) { + addCriterion("LAST_UPDATE_USER_ID not in", values, "lastUpdateUserId"); + return (Criteria) this; + } + + public Criteria andLastUpdateUserIdBetween(String value1, String value2) { + addCriterion("LAST_UPDATE_USER_ID between", value1, value2, "lastUpdateUserId"); + return (Criteria) this; + } + + public Criteria andLastUpdateUserIdNotBetween(String value1, String value2) { + addCriterion("LAST_UPDATE_USER_ID not between", value1, value2, "lastUpdateUserId"); + return (Criteria) this; + } + + public Criteria andAddressIsNull() { + addCriterion("ADDRESS is null"); + return (Criteria) this; + } + + public Criteria andAddressIsNotNull() { + addCriterion("ADDRESS is not null"); + return (Criteria) this; + } + + public Criteria andAddressEqualTo(String value) { + addCriterion("ADDRESS =", value, "address"); + return (Criteria) this; + } + + public Criteria andAddressNotEqualTo(String value) { + addCriterion("ADDRESS <>", value, "address"); + return (Criteria) this; + } + + public Criteria andAddressGreaterThan(String value) { + addCriterion("ADDRESS >", value, "address"); + return (Criteria) this; + } + + public Criteria andAddressGreaterThanOrEqualTo(String value) { + addCriterion("ADDRESS >=", value, "address"); + return (Criteria) this; + } + + public Criteria andAddressLessThan(String value) { + addCriterion("ADDRESS <", value, "address"); + return (Criteria) this; + } + + public Criteria andAddressLessThanOrEqualTo(String value) { + addCriterion("ADDRESS <=", value, "address"); + return (Criteria) this; + } + + public Criteria andAddressLike(String value) { + addCriterion("ADDRESS like", value, "address"); + return (Criteria) this; + } + + public Criteria andAddressNotLike(String value) { + addCriterion("ADDRESS not like", value, "address"); + return (Criteria) this; + } + + public Criteria andAddressIn(List values) { + addCriterion("ADDRESS in", values, "address"); + return (Criteria) this; + } + + public Criteria andAddressNotIn(List values) { + addCriterion("ADDRESS not in", values, "address"); + return (Criteria) this; + } + + public Criteria andAddressBetween(String value1, String value2) { + addCriterion("ADDRESS between", value1, value2, "address"); + return (Criteria) this; + } + + public Criteria andAddressNotBetween(String value1, String value2) { + addCriterion("ADDRESS not between", value1, value2, "address"); + return (Criteria) this; + } + + public Criteria andApplicationIdIsNull() { + addCriterion("APPLICATION_ID is null"); + return (Criteria) this; + } + + public Criteria andApplicationIdIsNotNull() { + addCriterion("APPLICATION_ID is not null"); + return (Criteria) this; + } + + public Criteria andApplicationIdEqualTo(String value) { + addCriterion("APPLICATION_ID =", value, "applicationId"); + return (Criteria) this; + } + + public Criteria andApplicationIdNotEqualTo(String value) { + addCriterion("APPLICATION_ID <>", value, "applicationId"); + return (Criteria) this; + } + + public Criteria andApplicationIdGreaterThan(String value) { + addCriterion("APPLICATION_ID >", value, "applicationId"); + return (Criteria) this; + } + + public Criteria andApplicationIdGreaterThanOrEqualTo(String value) { + addCriterion("APPLICATION_ID >=", value, "applicationId"); + return (Criteria) this; + } + + public Criteria andApplicationIdLessThan(String value) { + addCriterion("APPLICATION_ID <", value, "applicationId"); + return (Criteria) this; + } + + public Criteria andApplicationIdLessThanOrEqualTo(String value) { + addCriterion("APPLICATION_ID <=", value, "applicationId"); + return (Criteria) this; + } + + public Criteria andApplicationIdLike(String value) { + addCriterion("APPLICATION_ID like", value, "applicationId"); + return (Criteria) this; + } + + public Criteria andApplicationIdNotLike(String value) { + addCriterion("APPLICATION_ID not like", value, "applicationId"); + return (Criteria) this; + } + + public Criteria andApplicationIdIn(List values) { + addCriterion("APPLICATION_ID in", values, "applicationId"); + return (Criteria) this; + } + + public Criteria andApplicationIdNotIn(List values) { + addCriterion("APPLICATION_ID not in", values, "applicationId"); + return (Criteria) this; + } + + public Criteria andApplicationIdBetween(String value1, String value2) { + addCriterion("APPLICATION_ID between", value1, value2, "applicationId"); + return (Criteria) this; + } + + public Criteria andApplicationIdNotBetween(String value1, String value2) { + addCriterion("APPLICATION_ID not between", value1, value2, "applicationId"); + return (Criteria) this; + } + + public Criteria andCodeIsNull() { + addCriterion("CODE is null"); + return (Criteria) this; + } + + public Criteria andCodeIsNotNull() { + addCriterion("CODE is not null"); + return (Criteria) this; + } + + public Criteria andCodeEqualTo(String value) { + addCriterion("CODE =", value, "code"); + return (Criteria) this; + } + + public Criteria andCodeNotEqualTo(String value) { + addCriterion("CODE <>", value, "code"); + return (Criteria) this; + } + + public Criteria andCodeGreaterThan(String value) { + addCriterion("CODE >", value, "code"); + return (Criteria) this; + } + + public Criteria andCodeGreaterThanOrEqualTo(String value) { + addCriterion("CODE >=", value, "code"); + return (Criteria) this; + } + + public Criteria andCodeLessThan(String value) { + addCriterion("CODE <", value, "code"); + return (Criteria) this; + } + + public Criteria andCodeLessThanOrEqualTo(String value) { + addCriterion("CODE <=", value, "code"); + return (Criteria) this; + } + + public Criteria andCodeLike(String value) { + addCriterion("CODE like", value, "code"); + return (Criteria) this; + } + + public Criteria andCodeNotLike(String value) { + addCriterion("CODE not like", value, "code"); + return (Criteria) this; + } + + public Criteria andCodeIn(List values) { + addCriterion("CODE in", values, "code"); + return (Criteria) this; + } + + public Criteria andCodeNotIn(List values) { + addCriterion("CODE not in", values, "code"); + return (Criteria) this; + } + + public Criteria andCodeBetween(String value1, String value2) { + addCriterion("CODE between", value1, value2, "code"); + return (Criteria) this; + } + + public Criteria andCodeNotBetween(String value1, String value2) { + addCriterion("CODE not between", value1, value2, "code"); + return (Criteria) this; + } + + public Criteria andCustIdIsNull() { + addCriterion("CUST_ID is null"); + return (Criteria) this; + } + + public Criteria andCustIdIsNotNull() { + addCriterion("CUST_ID is not null"); + return (Criteria) this; + } + + public Criteria andCustIdEqualTo(String value) { + addCriterion("CUST_ID =", value, "custId"); + return (Criteria) this; + } + + public Criteria andCustIdNotEqualTo(String value) { + addCriterion("CUST_ID <>", value, "custId"); + return (Criteria) this; + } + + public Criteria andCustIdGreaterThan(String value) { + addCriterion("CUST_ID >", value, "custId"); + return (Criteria) this; + } + + public Criteria andCustIdGreaterThanOrEqualTo(String value) { + addCriterion("CUST_ID >=", value, "custId"); + return (Criteria) this; + } + + public Criteria andCustIdLessThan(String value) { + addCriterion("CUST_ID <", value, "custId"); + return (Criteria) this; + } + + public Criteria andCustIdLessThanOrEqualTo(String value) { + addCriterion("CUST_ID <=", value, "custId"); + return (Criteria) this; + } + + public Criteria andCustIdLike(String value) { + addCriterion("CUST_ID like", value, "custId"); + return (Criteria) this; + } + + public Criteria andCustIdNotLike(String value) { + addCriterion("CUST_ID not like", value, "custId"); + return (Criteria) this; + } + + public Criteria andCustIdIn(List values) { + addCriterion("CUST_ID in", values, "custId"); + return (Criteria) this; + } + + public Criteria andCustIdNotIn(List values) { + addCriterion("CUST_ID not in", values, "custId"); + return (Criteria) this; + } + + public Criteria andCustIdBetween(String value1, String value2) { + addCriterion("CUST_ID between", value1, value2, "custId"); + return (Criteria) this; + } + + public Criteria andCustIdNotBetween(String value1, String value2) { + addCriterion("CUST_ID not between", value1, value2, "custId"); + return (Criteria) this; + } + + public Criteria andFaxIsNull() { + addCriterion("FAX is null"); + return (Criteria) this; + } + + public Criteria andFaxIsNotNull() { + addCriterion("FAX is not null"); + return (Criteria) this; + } + + public Criteria andFaxEqualTo(String value) { + addCriterion("FAX =", value, "fax"); + return (Criteria) this; + } + + public Criteria andFaxNotEqualTo(String value) { + addCriterion("FAX <>", value, "fax"); + return (Criteria) this; + } + + public Criteria andFaxGreaterThan(String value) { + addCriterion("FAX >", value, "fax"); + return (Criteria) this; + } + + public Criteria andFaxGreaterThanOrEqualTo(String value) { + addCriterion("FAX >=", value, "fax"); + return (Criteria) this; + } + + public Criteria andFaxLessThan(String value) { + addCriterion("FAX <", value, "fax"); + return (Criteria) this; + } + + public Criteria andFaxLessThanOrEqualTo(String value) { + addCriterion("FAX <=", value, "fax"); + return (Criteria) this; + } + + public Criteria andFaxLike(String value) { + addCriterion("FAX like", value, "fax"); + return (Criteria) this; + } + + public Criteria andFaxNotLike(String value) { + addCriterion("FAX not like", value, "fax"); + return (Criteria) this; + } + + public Criteria andFaxIn(List values) { + addCriterion("FAX in", values, "fax"); + return (Criteria) this; + } + + public Criteria andFaxNotIn(List values) { + addCriterion("FAX not in", values, "fax"); + return (Criteria) this; + } + + public Criteria andFaxBetween(String value1, String value2) { + addCriterion("FAX between", value1, value2, "fax"); + return (Criteria) this; + } + + public Criteria andFaxNotBetween(String value1, String value2) { + addCriterion("FAX not between", value1, value2, "fax"); + return (Criteria) this; + } + + public Criteria andLinkManDeptIsNull() { + addCriterion("LINK_MAN_DEPT is null"); + return (Criteria) this; + } + + public Criteria andLinkManDeptIsNotNull() { + addCriterion("LINK_MAN_DEPT is not null"); + return (Criteria) this; + } + + public Criteria andLinkManDeptEqualTo(String value) { + addCriterion("LINK_MAN_DEPT =", value, "linkManDept"); + return (Criteria) this; + } + + public Criteria andLinkManDeptNotEqualTo(String value) { + addCriterion("LINK_MAN_DEPT <>", value, "linkManDept"); + return (Criteria) this; + } + + public Criteria andLinkManDeptGreaterThan(String value) { + addCriterion("LINK_MAN_DEPT >", value, "linkManDept"); + return (Criteria) this; + } + + public Criteria andLinkManDeptGreaterThanOrEqualTo(String value) { + addCriterion("LINK_MAN_DEPT >=", value, "linkManDept"); + return (Criteria) this; + } + + public Criteria andLinkManDeptLessThan(String value) { + addCriterion("LINK_MAN_DEPT <", value, "linkManDept"); + return (Criteria) this; + } + + public Criteria andLinkManDeptLessThanOrEqualTo(String value) { + addCriterion("LINK_MAN_DEPT <=", value, "linkManDept"); + return (Criteria) this; + } + + public Criteria andLinkManDeptLike(String value) { + addCriterion("LINK_MAN_DEPT like", value, "linkManDept"); + return (Criteria) this; + } + + public Criteria andLinkManDeptNotLike(String value) { + addCriterion("LINK_MAN_DEPT not like", value, "linkManDept"); + return (Criteria) this; + } + + public Criteria andLinkManDeptIn(List values) { + addCriterion("LINK_MAN_DEPT in", values, "linkManDept"); + return (Criteria) this; + } + + public Criteria andLinkManDeptNotIn(List values) { + addCriterion("LINK_MAN_DEPT not in", values, "linkManDept"); + return (Criteria) this; + } + + public Criteria andLinkManDeptBetween(String value1, String value2) { + addCriterion("LINK_MAN_DEPT between", value1, value2, "linkManDept"); + return (Criteria) this; + } + + public Criteria andLinkManDeptNotBetween(String value1, String value2) { + addCriterion("LINK_MAN_DEPT not between", value1, value2, "linkManDept"); + return (Criteria) this; + } + + public Criteria andLinkManEmailIsNull() { + addCriterion("LINK_MAN_EMAIL is null"); + return (Criteria) this; + } + + public Criteria andLinkManEmailIsNotNull() { + addCriterion("LINK_MAN_EMAIL is not null"); + return (Criteria) this; + } + + public Criteria andLinkManEmailEqualTo(String value) { + addCriterion("LINK_MAN_EMAIL =", value, "linkManEmail"); + return (Criteria) this; + } + + public Criteria andLinkManEmailNotEqualTo(String value) { + addCriterion("LINK_MAN_EMAIL <>", value, "linkManEmail"); + return (Criteria) this; + } + + public Criteria andLinkManEmailGreaterThan(String value) { + addCriterion("LINK_MAN_EMAIL >", value, "linkManEmail"); + return (Criteria) this; + } + + public Criteria andLinkManEmailGreaterThanOrEqualTo(String value) { + addCriterion("LINK_MAN_EMAIL >=", value, "linkManEmail"); + return (Criteria) this; + } + + public Criteria andLinkManEmailLessThan(String value) { + addCriterion("LINK_MAN_EMAIL <", value, "linkManEmail"); + return (Criteria) this; + } + + public Criteria andLinkManEmailLessThanOrEqualTo(String value) { + addCriterion("LINK_MAN_EMAIL <=", value, "linkManEmail"); + return (Criteria) this; + } + + public Criteria andLinkManEmailLike(String value) { + addCriterion("LINK_MAN_EMAIL like", value, "linkManEmail"); + return (Criteria) this; + } + + public Criteria andLinkManEmailNotLike(String value) { + addCriterion("LINK_MAN_EMAIL not like", value, "linkManEmail"); + return (Criteria) this; + } + + public Criteria andLinkManEmailIn(List values) { + addCriterion("LINK_MAN_EMAIL in", values, "linkManEmail"); + return (Criteria) this; + } + + public Criteria andLinkManEmailNotIn(List values) { + addCriterion("LINK_MAN_EMAIL not in", values, "linkManEmail"); + return (Criteria) this; + } + + public Criteria andLinkManEmailBetween(String value1, String value2) { + addCriterion("LINK_MAN_EMAIL between", value1, value2, "linkManEmail"); + return (Criteria) this; + } + + public Criteria andLinkManEmailNotBetween(String value1, String value2) { + addCriterion("LINK_MAN_EMAIL not between", value1, value2, "linkManEmail"); + return (Criteria) this; + } + + public Criteria andLinkManNameIsNull() { + addCriterion("LINK_MAN_NAME is null"); + return (Criteria) this; + } + + public Criteria andLinkManNameIsNotNull() { + addCriterion("LINK_MAN_NAME is not null"); + return (Criteria) this; + } + + public Criteria andLinkManNameEqualTo(String value) { + addCriterion("LINK_MAN_NAME =", value, "linkManName"); + return (Criteria) this; + } + + public Criteria andLinkManNameNotEqualTo(String value) { + addCriterion("LINK_MAN_NAME <>", value, "linkManName"); + return (Criteria) this; + } + + public Criteria andLinkManNameGreaterThan(String value) { + addCriterion("LINK_MAN_NAME >", value, "linkManName"); + return (Criteria) this; + } + + public Criteria andLinkManNameGreaterThanOrEqualTo(String value) { + addCriterion("LINK_MAN_NAME >=", value, "linkManName"); + return (Criteria) this; + } + + public Criteria andLinkManNameLessThan(String value) { + addCriterion("LINK_MAN_NAME <", value, "linkManName"); + return (Criteria) this; + } + + public Criteria andLinkManNameLessThanOrEqualTo(String value) { + addCriterion("LINK_MAN_NAME <=", value, "linkManName"); + return (Criteria) this; + } + + public Criteria andLinkManNameLike(String value) { + addCriterion("LINK_MAN_NAME like", value, "linkManName"); + return (Criteria) this; + } + + public Criteria andLinkManNameNotLike(String value) { + addCriterion("LINK_MAN_NAME not like", value, "linkManName"); + return (Criteria) this; + } + + public Criteria andLinkManNameIn(List values) { + addCriterion("LINK_MAN_NAME in", values, "linkManName"); + return (Criteria) this; + } + + public Criteria andLinkManNameNotIn(List values) { + addCriterion("LINK_MAN_NAME not in", values, "linkManName"); + return (Criteria) this; + } + + public Criteria andLinkManNameBetween(String value1, String value2) { + addCriterion("LINK_MAN_NAME between", value1, value2, "linkManName"); + return (Criteria) this; + } + + public Criteria andLinkManNameNotBetween(String value1, String value2) { + addCriterion("LINK_MAN_NAME not between", value1, value2, "linkManName"); + return (Criteria) this; + } + + public Criteria andLinkManPosIsNull() { + addCriterion("LINK_MAN_POS is null"); + return (Criteria) this; + } + + public Criteria andLinkManPosIsNotNull() { + addCriterion("LINK_MAN_POS is not null"); + return (Criteria) this; + } + + public Criteria andLinkManPosEqualTo(String value) { + addCriterion("LINK_MAN_POS =", value, "linkManPos"); + return (Criteria) this; + } + + public Criteria andLinkManPosNotEqualTo(String value) { + addCriterion("LINK_MAN_POS <>", value, "linkManPos"); + return (Criteria) this; + } + + public Criteria andLinkManPosGreaterThan(String value) { + addCriterion("LINK_MAN_POS >", value, "linkManPos"); + return (Criteria) this; + } + + public Criteria andLinkManPosGreaterThanOrEqualTo(String value) { + addCriterion("LINK_MAN_POS >=", value, "linkManPos"); + return (Criteria) this; + } + + public Criteria andLinkManPosLessThan(String value) { + addCriterion("LINK_MAN_POS <", value, "linkManPos"); + return (Criteria) this; + } + + public Criteria andLinkManPosLessThanOrEqualTo(String value) { + addCriterion("LINK_MAN_POS <=", value, "linkManPos"); + return (Criteria) this; + } + + public Criteria andLinkManPosLike(String value) { + addCriterion("LINK_MAN_POS like", value, "linkManPos"); + return (Criteria) this; + } + + public Criteria andLinkManPosNotLike(String value) { + addCriterion("LINK_MAN_POS not like", value, "linkManPos"); + return (Criteria) this; + } + + public Criteria andLinkManPosIn(List values) { + addCriterion("LINK_MAN_POS in", values, "linkManPos"); + return (Criteria) this; + } + + public Criteria andLinkManPosNotIn(List values) { + addCriterion("LINK_MAN_POS not in", values, "linkManPos"); + return (Criteria) this; + } + + public Criteria andLinkManPosBetween(String value1, String value2) { + addCriterion("LINK_MAN_POS between", value1, value2, "linkManPos"); + return (Criteria) this; + } + + public Criteria andLinkManPosNotBetween(String value1, String value2) { + addCriterion("LINK_MAN_POS not between", value1, value2, "linkManPos"); + return (Criteria) this; + } + + public Criteria andLinkManTelIsNull() { + addCriterion("LINK_MAN_TEL is null"); + return (Criteria) this; + } + + public Criteria andLinkManTelIsNotNull() { + addCriterion("LINK_MAN_TEL is not null"); + return (Criteria) this; + } + + public Criteria andLinkManTelEqualTo(String value) { + addCriterion("LINK_MAN_TEL =", value, "linkManTel"); + return (Criteria) this; + } + + public Criteria andLinkManTelNotEqualTo(String value) { + addCriterion("LINK_MAN_TEL <>", value, "linkManTel"); + return (Criteria) this; + } + + public Criteria andLinkManTelGreaterThan(String value) { + addCriterion("LINK_MAN_TEL >", value, "linkManTel"); + return (Criteria) this; + } + + public Criteria andLinkManTelGreaterThanOrEqualTo(String value) { + addCriterion("LINK_MAN_TEL >=", value, "linkManTel"); + return (Criteria) this; + } + + public Criteria andLinkManTelLessThan(String value) { + addCriterion("LINK_MAN_TEL <", value, "linkManTel"); + return (Criteria) this; + } + + public Criteria andLinkManTelLessThanOrEqualTo(String value) { + addCriterion("LINK_MAN_TEL <=", value, "linkManTel"); + return (Criteria) this; + } + + public Criteria andLinkManTelLike(String value) { + addCriterion("LINK_MAN_TEL like", value, "linkManTel"); + return (Criteria) this; + } + + public Criteria andLinkManTelNotLike(String value) { + addCriterion("LINK_MAN_TEL not like", value, "linkManTel"); + return (Criteria) this; + } + + public Criteria andLinkManTelIn(List values) { + addCriterion("LINK_MAN_TEL in", values, "linkManTel"); + return (Criteria) this; + } + + public Criteria andLinkManTelNotIn(List values) { + addCriterion("LINK_MAN_TEL not in", values, "linkManTel"); + return (Criteria) this; + } + + public Criteria andLinkManTelBetween(String value1, String value2) { + addCriterion("LINK_MAN_TEL between", value1, value2, "linkManTel"); + return (Criteria) this; + } + + public Criteria andLinkManTelNotBetween(String value1, String value2) { + addCriterion("LINK_MAN_TEL not between", value1, value2, "linkManTel"); + return (Criteria) this; + } + + public Criteria andRankIsNull() { + addCriterion("RANK is null"); + return (Criteria) this; + } + + public Criteria andRankIsNotNull() { + addCriterion("RANK is not null"); + return (Criteria) this; + } + + public Criteria andRankEqualTo(Short value) { + addCriterion("RANK =", value, "rank"); + return (Criteria) this; + } + + public Criteria andRankNotEqualTo(Short value) { + addCriterion("RANK <>", value, "rank"); + return (Criteria) this; + } + + public Criteria andRankGreaterThan(Short value) { + addCriterion("RANK >", value, "rank"); + return (Criteria) this; + } + + public Criteria andRankGreaterThanOrEqualTo(Short value) { + addCriterion("RANK >=", value, "rank"); + return (Criteria) this; + } + + public Criteria andRankLessThan(Short value) { + addCriterion("RANK <", value, "rank"); + return (Criteria) this; + } + + public Criteria andRankLessThanOrEqualTo(Short value) { + addCriterion("RANK <=", value, "rank"); + return (Criteria) this; + } + + public Criteria andRankIn(List values) { + addCriterion("RANK in", values, "rank"); + return (Criteria) this; + } + + public Criteria andRankNotIn(List values) { + addCriterion("RANK not in", values, "rank"); + return (Criteria) this; + } + + public Criteria andRankBetween(Short value1, Short value2) { + addCriterion("RANK between", value1, value2, "rank"); + return (Criteria) this; + } + + public Criteria andRankNotBetween(Short value1, Short value2) { + addCriterion("RANK not between", value1, value2, "rank"); + return (Criteria) this; + } + + public Criteria andRemarkIsNull() { + addCriterion("REMARK is null"); + return (Criteria) this; + } + + public Criteria andRemarkIsNotNull() { + addCriterion("REMARK is not null"); + return (Criteria) this; + } + + public Criteria andRemarkEqualTo(String value) { + addCriterion("REMARK =", value, "remark"); + return (Criteria) this; + } + + public Criteria andRemarkNotEqualTo(String value) { + addCriterion("REMARK <>", value, "remark"); + return (Criteria) this; + } + + public Criteria andRemarkGreaterThan(String value) { + addCriterion("REMARK >", value, "remark"); + return (Criteria) this; + } + + public Criteria andRemarkGreaterThanOrEqualTo(String value) { + addCriterion("REMARK >=", value, "remark"); + return (Criteria) this; + } + + public Criteria andRemarkLessThan(String value) { + addCriterion("REMARK <", value, "remark"); + return (Criteria) this; + } + + public Criteria andRemarkLessThanOrEqualTo(String value) { + addCriterion("REMARK <=", value, "remark"); + return (Criteria) this; + } + + public Criteria andRemarkLike(String value) { + addCriterion("REMARK like", value, "remark"); + return (Criteria) this; + } + + public Criteria andRemarkNotLike(String value) { + addCriterion("REMARK not like", value, "remark"); + return (Criteria) this; + } + + public Criteria andRemarkIn(List values) { + addCriterion("REMARK in", values, "remark"); + return (Criteria) this; + } + + public Criteria andRemarkNotIn(List values) { + addCriterion("REMARK not in", values, "remark"); + return (Criteria) this; + } + + public Criteria andRemarkBetween(String value1, String value2) { + addCriterion("REMARK between", value1, value2, "remark"); + return (Criteria) this; + } + + public Criteria andRemarkNotBetween(String value1, String value2) { + addCriterion("REMARK not between", value1, value2, "remark"); + return (Criteria) this; + } + + public Criteria andStatusIsNull() { + addCriterion("STATUS is null"); + return (Criteria) this; + } + + public Criteria andStatusIsNotNull() { + addCriterion("STATUS is not null"); + return (Criteria) this; + } + + public Criteria andStatusEqualTo(Short value) { + addCriterion("STATUS =", value, "status"); + return (Criteria) this; + } + + public Criteria andStatusNotEqualTo(Short value) { + addCriterion("STATUS <>", value, "status"); + return (Criteria) this; + } + + public Criteria andStatusGreaterThan(Short value) { + addCriterion("STATUS >", value, "status"); + return (Criteria) this; + } + + public Criteria andStatusGreaterThanOrEqualTo(Short value) { + addCriterion("STATUS >=", value, "status"); + return (Criteria) this; + } + + public Criteria andStatusLessThan(Short value) { + addCriterion("STATUS <", value, "status"); + return (Criteria) this; + } + + public Criteria andStatusLessThanOrEqualTo(Short value) { + addCriterion("STATUS <=", value, "status"); + return (Criteria) this; + } + + public Criteria andStatusIn(List values) { + addCriterion("STATUS in", values, "status"); + return (Criteria) this; + } + + public Criteria andStatusNotIn(List values) { + addCriterion("STATUS not in", values, "status"); + return (Criteria) this; + } + + public Criteria andStatusBetween(Short value1, Short value2) { + addCriterion("STATUS between", value1, value2, "status"); + return (Criteria) this; + } + + public Criteria andStatusNotBetween(Short value1, Short value2) { + addCriterion("STATUS not between", value1, value2, "status"); + return (Criteria) this; + } + + public Criteria andTelephoneIsNull() { + addCriterion("TELEPHONE is null"); + return (Criteria) this; + } + + public Criteria andTelephoneIsNotNull() { + addCriterion("TELEPHONE is not null"); + return (Criteria) this; + } + + public Criteria andTelephoneEqualTo(String value) { + addCriterion("TELEPHONE =", value, "telephone"); + return (Criteria) this; + } + + public Criteria andTelephoneNotEqualTo(String value) { + addCriterion("TELEPHONE <>", value, "telephone"); + return (Criteria) this; + } + + public Criteria andTelephoneGreaterThan(String value) { + addCriterion("TELEPHONE >", value, "telephone"); + return (Criteria) this; + } + + public Criteria andTelephoneGreaterThanOrEqualTo(String value) { + addCriterion("TELEPHONE >=", value, "telephone"); + return (Criteria) this; + } + + public Criteria andTelephoneLessThan(String value) { + addCriterion("TELEPHONE <", value, "telephone"); + return (Criteria) this; + } + + public Criteria andTelephoneLessThanOrEqualTo(String value) { + addCriterion("TELEPHONE <=", value, "telephone"); + return (Criteria) this; + } + + public Criteria andTelephoneLike(String value) { + addCriterion("TELEPHONE like", value, "telephone"); + return (Criteria) this; + } + + public Criteria andTelephoneNotLike(String value) { + addCriterion("TELEPHONE not like", value, "telephone"); + return (Criteria) this; + } + + public Criteria andTelephoneIn(List values) { + addCriterion("TELEPHONE in", values, "telephone"); + return (Criteria) this; + } + + public Criteria andTelephoneNotIn(List values) { + addCriterion("TELEPHONE not in", values, "telephone"); + return (Criteria) this; + } + + public Criteria andTelephoneBetween(String value1, String value2) { + addCriterion("TELEPHONE between", value1, value2, "telephone"); + return (Criteria) this; + } + + public Criteria andTelephoneNotBetween(String value1, String value2) { + addCriterion("TELEPHONE not between", value1, value2, "telephone"); + return (Criteria) this; + } + + public Criteria andTypeIsNull() { + addCriterion("TYPE is null"); + return (Criteria) this; + } + + public Criteria andTypeIsNotNull() { + addCriterion("TYPE is not null"); + return (Criteria) this; + } + + public Criteria andTypeEqualTo(Short value) { + addCriterion("TYPE =", value, "type"); + return (Criteria) this; + } + + public Criteria andTypeNotEqualTo(Short value) { + addCriterion("TYPE <>", value, "type"); + return (Criteria) this; + } + + public Criteria andTypeGreaterThan(Short value) { + addCriterion("TYPE >", value, "type"); + return (Criteria) this; + } + + public Criteria andTypeGreaterThanOrEqualTo(Short value) { + addCriterion("TYPE >=", value, "type"); + return (Criteria) this; + } + + public Criteria andTypeLessThan(Short value) { + addCriterion("TYPE <", value, "type"); + return (Criteria) this; + } + + public Criteria andTypeLessThanOrEqualTo(Short value) { + addCriterion("TYPE <=", value, "type"); + return (Criteria) this; + } + + public Criteria andTypeIn(List values) { + addCriterion("TYPE in", values, "type"); + return (Criteria) this; + } + + public Criteria andTypeNotIn(List values) { + addCriterion("TYPE not in", values, "type"); + return (Criteria) this; + } + + public Criteria andTypeBetween(Short value1, Short value2) { + addCriterion("TYPE between", value1, value2, "type"); + return (Criteria) this; + } + + public Criteria andTypeNotBetween(Short value1, Short value2) { + addCriterion("TYPE not between", value1, value2, "type"); + return (Criteria) this; + } + + public Criteria andZipCodeIsNull() { + addCriterion("ZIP_CODE is null"); + return (Criteria) this; + } + + public Criteria andZipCodeIsNotNull() { + addCriterion("ZIP_CODE is not null"); + return (Criteria) this; + } + + public Criteria andZipCodeEqualTo(String value) { + addCriterion("ZIP_CODE =", value, "zipCode"); + return (Criteria) this; + } + + public Criteria andZipCodeNotEqualTo(String value) { + addCriterion("ZIP_CODE <>", value, "zipCode"); + return (Criteria) this; + } + + public Criteria andZipCodeGreaterThan(String value) { + addCriterion("ZIP_CODE >", value, "zipCode"); + return (Criteria) this; + } + + public Criteria andZipCodeGreaterThanOrEqualTo(String value) { + addCriterion("ZIP_CODE >=", value, "zipCode"); + return (Criteria) this; + } + + public Criteria andZipCodeLessThan(String value) { + addCriterion("ZIP_CODE <", value, "zipCode"); + return (Criteria) this; + } + + public Criteria andZipCodeLessThanOrEqualTo(String value) { + addCriterion("ZIP_CODE <=", value, "zipCode"); + return (Criteria) this; + } + + public Criteria andZipCodeLike(String value) { + addCriterion("ZIP_CODE like", value, "zipCode"); + return (Criteria) this; + } + + public Criteria andZipCodeNotLike(String value) { + addCriterion("ZIP_CODE not like", value, "zipCode"); + return (Criteria) this; + } + + public Criteria andZipCodeIn(List values) { + addCriterion("ZIP_CODE in", values, "zipCode"); + return (Criteria) this; + } + + public Criteria andZipCodeNotIn(List values) { + addCriterion("ZIP_CODE not in", values, "zipCode"); + return (Criteria) this; + } + + public Criteria andZipCodeBetween(String value1, String value2) { + addCriterion("ZIP_CODE between", value1, value2, "zipCode"); + return (Criteria) this; + } + + public Criteria andZipCodeNotBetween(String value1, String value2) { + addCriterion("ZIP_CODE not between", value1, value2, "zipCode"); + return (Criteria) this; + } + + public Criteria andPathIsNull() { + addCriterion("PATH is null"); + return (Criteria) this; + } + + public Criteria andPathIsNotNull() { + addCriterion("PATH is not null"); + return (Criteria) this; + } + + public Criteria andPathEqualTo(String value) { + addCriterion("PATH =", value, "path"); + return (Criteria) this; + } + + public Criteria andPathNotEqualTo(String value) { + addCriterion("PATH <>", value, "path"); + return (Criteria) this; + } + + public Criteria andPathGreaterThan(String value) { + addCriterion("PATH >", value, "path"); + return (Criteria) this; + } + + public Criteria andPathGreaterThanOrEqualTo(String value) { + addCriterion("PATH >=", value, "path"); + return (Criteria) this; + } + + public Criteria andPathLessThan(String value) { + addCriterion("PATH <", value, "path"); + return (Criteria) this; + } + + public Criteria andPathLessThanOrEqualTo(String value) { + addCriterion("PATH <=", value, "path"); + return (Criteria) this; + } + + public Criteria andPathLike(String value) { + addCriterion("PATH like", value, "path"); + return (Criteria) this; + } + + public Criteria andPathNotLike(String value) { + addCriterion("PATH not like", value, "path"); + return (Criteria) this; + } + + public Criteria andPathIn(List values) { + addCriterion("PATH in", values, "path"); + return (Criteria) this; + } + + public Criteria andPathNotIn(List values) { + addCriterion("PATH not in", values, "path"); + return (Criteria) this; + } + + public Criteria andPathBetween(String value1, String value2) { + addCriterion("PATH between", value1, value2, "path"); + return (Criteria) this; + } + + public Criteria andPathNotBetween(String value1, String value2) { + addCriterion("PATH not between", value1, value2, "path"); + return (Criteria) this; + } + + public Criteria andOrganizationNumberIsNull() { + addCriterion("ORGANIZATION_NUMBER is null"); + return (Criteria) this; + } + + public Criteria andOrganizationNumberIsNotNull() { + addCriterion("ORGANIZATION_NUMBER is not null"); + return (Criteria) this; + } + + public Criteria andOrganizationNumberEqualTo(String value) { + addCriterion("ORGANIZATION_NUMBER =", value, "organizationNumber"); + return (Criteria) this; + } + + public Criteria andOrganizationNumberNotEqualTo(String value) { + addCriterion("ORGANIZATION_NUMBER <>", value, "organizationNumber"); + return (Criteria) this; + } + + public Criteria andOrganizationNumberGreaterThan(String value) { + addCriterion("ORGANIZATION_NUMBER >", value, "organizationNumber"); + return (Criteria) this; + } + + public Criteria andOrganizationNumberGreaterThanOrEqualTo(String value) { + addCriterion("ORGANIZATION_NUMBER >=", value, "organizationNumber"); + return (Criteria) this; + } + + public Criteria andOrganizationNumberLessThan(String value) { + addCriterion("ORGANIZATION_NUMBER <", value, "organizationNumber"); + return (Criteria) this; + } + + public Criteria andOrganizationNumberLessThanOrEqualTo(String value) { + addCriterion("ORGANIZATION_NUMBER <=", value, "organizationNumber"); + return (Criteria) this; + } + + public Criteria andOrganizationNumberLike(String value) { + addCriterion("ORGANIZATION_NUMBER like", value, "organizationNumber"); + return (Criteria) this; + } + + public Criteria andOrganizationNumberNotLike(String value) { + addCriterion("ORGANIZATION_NUMBER not like", value, "organizationNumber"); + return (Criteria) this; + } + + public Criteria andOrganizationNumberIn(List values) { + addCriterion("ORGANIZATION_NUMBER in", values, "organizationNumber"); + return (Criteria) this; + } + + public Criteria andOrganizationNumberNotIn(List values) { + addCriterion("ORGANIZATION_NUMBER not in", values, "organizationNumber"); + return (Criteria) this; + } + + public Criteria andOrganizationNumberBetween(String value1, String value2) { + addCriterion("ORGANIZATION_NUMBER between", value1, value2, "organizationNumber"); + return (Criteria) this; + } + + public Criteria andOrganizationNumberNotBetween(String value1, String value2) { + addCriterion("ORGANIZATION_NUMBER not between", value1, value2, "organizationNumber"); + return (Criteria) this; + } + + public Criteria andAdminUserIdIsNull() { + addCriterion("ADMIN_USER_ID is null"); + return (Criteria) this; + } + + public Criteria andAdminUserIdIsNotNull() { + addCriterion("ADMIN_USER_ID is not null"); + return (Criteria) this; + } + + public Criteria andAdminUserIdEqualTo(String value) { + addCriterion("ADMIN_USER_ID =", value, "adminUserId"); + return (Criteria) this; + } + + public Criteria andAdminUserIdNotEqualTo(String value) { + addCriterion("ADMIN_USER_ID <>", value, "adminUserId"); + return (Criteria) this; + } + + public Criteria andAdminUserIdGreaterThan(String value) { + addCriterion("ADMIN_USER_ID >", value, "adminUserId"); + return (Criteria) this; + } + + public Criteria andAdminUserIdGreaterThanOrEqualTo(String value) { + addCriterion("ADMIN_USER_ID >=", value, "adminUserId"); + return (Criteria) this; + } + + public Criteria andAdminUserIdLessThan(String value) { + addCriterion("ADMIN_USER_ID <", value, "adminUserId"); + return (Criteria) this; + } + + public Criteria andAdminUserIdLessThanOrEqualTo(String value) { + addCriterion("ADMIN_USER_ID <=", value, "adminUserId"); + return (Criteria) this; + } + + public Criteria andAdminUserIdLike(String value) { + addCriterion("ADMIN_USER_ID like", value, "adminUserId"); + return (Criteria) this; + } + + public Criteria andAdminUserIdNotLike(String value) { + addCriterion("ADMIN_USER_ID not like", value, "adminUserId"); + return (Criteria) this; + } + + public Criteria andAdminUserIdIn(List values) { + addCriterion("ADMIN_USER_ID in", values, "adminUserId"); + return (Criteria) this; + } + + public Criteria andAdminUserIdNotIn(List values) { + addCriterion("ADMIN_USER_ID not in", values, "adminUserId"); + return (Criteria) this; + } + + public Criteria andAdminUserIdBetween(String value1, String value2) { + addCriterion("ADMIN_USER_ID between", value1, value2, "adminUserId"); + return (Criteria) this; + } + + public Criteria andAdminUserIdNotBetween(String value1, String value2) { + addCriterion("ADMIN_USER_ID not between", value1, value2, "adminUserId"); + return (Criteria) this; + } + + public Criteria andAreaIsNull() { + addCriterion("AREA is null"); + return (Criteria) this; + } + + public Criteria andAreaIsNotNull() { + addCriterion("AREA is not null"); + return (Criteria) this; + } + + public Criteria andAreaEqualTo(Short value) { + addCriterion("AREA =", value, "area"); + return (Criteria) this; + } + + public Criteria andAreaNotEqualTo(Short value) { + addCriterion("AREA <>", value, "area"); + return (Criteria) this; + } + + public Criteria andAreaGreaterThan(Short value) { + addCriterion("AREA >", value, "area"); + return (Criteria) this; + } + + public Criteria andAreaGreaterThanOrEqualTo(Short value) { + addCriterion("AREA >=", value, "area"); + return (Criteria) this; + } + + public Criteria andAreaLessThan(Short value) { + addCriterion("AREA <", value, "area"); + return (Criteria) this; + } + + public Criteria andAreaLessThanOrEqualTo(Short value) { + addCriterion("AREA <=", value, "area"); + return (Criteria) this; + } + + public Criteria andAreaIn(List values) { + addCriterion("AREA in", values, "area"); + return (Criteria) this; + } + + public Criteria andAreaNotIn(List values) { + addCriterion("AREA not in", values, "area"); + return (Criteria) this; + } + + public Criteria andAreaBetween(Short value1, Short value2) { + addCriterion("AREA between", value1, value2, "area"); + return (Criteria) this; + } + + public Criteria andAreaNotBetween(Short value1, Short value2) { + addCriterion("AREA not between", value1, value2, "area"); + return (Criteria) this; + } + + public Criteria andOrderByIsNull() { + addCriterion("ORDER_BY is null"); + return (Criteria) this; + } + + public Criteria andOrderByIsNotNull() { + addCriterion("ORDER_BY is not null"); + return (Criteria) this; + } + + public Criteria andOrderByEqualTo(Short value) { + addCriterion("ORDER_BY =", value, "orderBy"); + return (Criteria) this; + } + + public Criteria andOrderByNotEqualTo(Short value) { + addCriterion("ORDER_BY <>", value, "orderBy"); + return (Criteria) this; + } + + public Criteria andOrderByGreaterThan(Short value) { + addCriterion("ORDER_BY >", value, "orderBy"); + return (Criteria) this; + } + + public Criteria andOrderByGreaterThanOrEqualTo(Short value) { + addCriterion("ORDER_BY >=", value, "orderBy"); + return (Criteria) this; + } + + public Criteria andOrderByLessThan(Short value) { + addCriterion("ORDER_BY <", value, "orderBy"); + return (Criteria) this; + } + + public Criteria andOrderByLessThanOrEqualTo(Short value) { + addCriterion("ORDER_BY <=", value, "orderBy"); + return (Criteria) this; + } + + public Criteria andOrderByIn(List values) { + addCriterion("ORDER_BY in", values, "orderBy"); + return (Criteria) this; + } + + public Criteria andOrderByNotIn(List values) { + addCriterion("ORDER_BY not in", values, "orderBy"); + return (Criteria) this; + } + + public Criteria andOrderByBetween(Short value1, Short value2) { + addCriterion("ORDER_BY between", value1, value2, "orderBy"); + return (Criteria) this; + } + + public Criteria andOrderByNotBetween(Short value1, Short value2) { + addCriterion("ORDER_BY not between", value1, value2, "orderBy"); + return (Criteria) this; + } + } + + public static class Criteria extends GeneratedCriteria { + + protected Criteria() { + super(); + } + } + + public static class Criterion { + private String condition; + + private Object value; + + private Object secondValue; + + private boolean noValue; + + private boolean singleValue; + + private boolean betweenValue; + + private boolean listValue; + + private String typeHandler; + + public String getCondition() { + return condition; + } + + public Object getValue() { + return value; + } + + public Object getSecondValue() { + return secondValue; + } + + public boolean isNoValue() { + return noValue; + } + + public boolean isSingleValue() { + return singleValue; + } + + public boolean isBetweenValue() { + return betweenValue; + } + + public boolean isListValue() { + return listValue; + } + + public String getTypeHandler() { + return typeHandler; + } + + protected Criterion(String condition) { + super(); + this.condition = condition; + this.typeHandler = null; + this.noValue = true; + } + + protected Criterion(String condition, Object value, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.typeHandler = typeHandler; + if (value instanceof List) { + this.listValue = true; + } else { + this.singleValue = true; + } + } + + protected Criterion(String condition, Object value) { + this(condition, value, null); + } + + protected Criterion(String condition, Object value, Object secondValue, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.secondValue = secondValue; + this.typeHandler = typeHandler; + this.betweenValue = true; + } + + protected Criterion(String condition, Object value, Object secondValue) { + this(condition, value, secondValue, null); + } + } +} \ No newline at end of file diff --git a/itools-core/itools-model/src/main/java/com/itools/core/rbac/dto/ResourceDTO.java b/itools-core/itools-model/src/main/java/com/itools/core/rbac/dto/ResourceDTO.java new file mode 100644 index 0000000000000000000000000000000000000000..20ef788a2f879edbd4c131d153ee829f7ac68919 --- /dev/null +++ b/itools-core/itools-model/src/main/java/com/itools/core/rbac/dto/ResourceDTO.java @@ -0,0 +1,173 @@ +package com.itools.core.rbac.dto; + +public class ResourceDTO { + private String id; + + private String name; + + private String parentId; + + private Short status; + + private Long createTime; + + private String createUserId; + + private Long lastUpdateTime; + + private String lastUpdateUserId; + + private String applicationId; + + private String code; + + private Short orderBy; + + private String pictureName; + + private String remark; + + private Short type; + + private String url; + + private Short showStatus; + + private Short haveMenu; + + public String getId() { + return id; + } + + public void setId(String id) { + this.id = id; + } + + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + public String getParentId() { + return parentId; + } + + public void setParentId(String parentId) { + this.parentId = parentId; + } + + public Short getStatus() { + return status; + } + + public void setStatus(Short status) { + this.status = status; + } + + public Long getCreateTime() { + return createTime; + } + + public void setCreateTime(Long createTime) { + this.createTime = createTime; + } + + public String getCreateUserId() { + return createUserId; + } + + public void setCreateUserId(String createUserId) { + this.createUserId = createUserId; + } + + public Long getLastUpdateTime() { + return lastUpdateTime; + } + + public void setLastUpdateTime(Long lastUpdateTime) { + this.lastUpdateTime = lastUpdateTime; + } + + public String getLastUpdateUserId() { + return lastUpdateUserId; + } + + public void setLastUpdateUserId(String lastUpdateUserId) { + this.lastUpdateUserId = lastUpdateUserId; + } + + public String getApplicationId() { + return applicationId; + } + + public void setApplicationId(String applicationId) { + this.applicationId = applicationId; + } + + public String getCode() { + return code; + } + + public void setCode(String code) { + this.code = code; + } + + public Short getOrderBy() { + return orderBy; + } + + public void setOrderBy(Short orderBy) { + this.orderBy = orderBy; + } + + public String getPictureName() { + return pictureName; + } + + public void setPictureName(String pictureName) { + this.pictureName = pictureName; + } + + public String getRemark() { + return remark; + } + + public void setRemark(String remark) { + this.remark = remark; + } + + public Short getType() { + return type; + } + + public void setType(Short type) { + this.type = type; + } + + public String getUrl() { + return url; + } + + public void setUrl(String url) { + this.url = url; + } + + public Short getShowStatus() { + return showStatus; + } + + public void setShowStatus(Short showStatus) { + this.showStatus = showStatus; + } + + public Short getHaveMenu() { + return haveMenu; + } + + public void setHaveMenu(Short haveMenu) { + this.haveMenu = haveMenu; + } +} \ No newline at end of file diff --git a/itools-core/itools-model/src/main/java/com/itools/core/rbac/dto/ResourceDTOExample.java b/itools-core/itools-model/src/main/java/com/itools/core/rbac/dto/ResourceDTOExample.java new file mode 100644 index 0000000000000000000000000000000000000000..1959183f37c1d46c3cc54116b080dc4d8099321e --- /dev/null +++ b/itools-core/itools-model/src/main/java/com/itools/core/rbac/dto/ResourceDTOExample.java @@ -0,0 +1,1320 @@ +package com.itools.core.rbac.dto; + +import java.util.ArrayList; +import java.util.List; + +public class ResourceDTOExample { + protected String orderByClause; + + protected boolean distinct; + + protected List oredCriteria; + + public ResourceDTOExample() { + oredCriteria = new ArrayList(); + } + + public void setOrderByClause(String orderByClause) { + this.orderByClause = orderByClause; + } + + public String getOrderByClause() { + return orderByClause; + } + + public void setDistinct(boolean distinct) { + this.distinct = distinct; + } + + public boolean isDistinct() { + return distinct; + } + + public List getOredCriteria() { + return oredCriteria; + } + + public void or(Criteria criteria) { + oredCriteria.add(criteria); + } + + public Criteria or() { + Criteria criteria = createCriteriaInternal(); + oredCriteria.add(criteria); + return criteria; + } + + public Criteria createCriteria() { + Criteria criteria = createCriteriaInternal(); + if (oredCriteria.size() == 0) { + oredCriteria.add(criteria); + } + return criteria; + } + + protected Criteria createCriteriaInternal() { + Criteria criteria = new Criteria(); + return criteria; + } + + public void clear() { + oredCriteria.clear(); + orderByClause = null; + distinct = false; + } + + protected abstract static class GeneratedCriteria { + protected List criteria; + + protected GeneratedCriteria() { + super(); + criteria = new ArrayList(); + } + + public boolean isValid() { + return criteria.size() > 0; + } + + public List getAllCriteria() { + return criteria; + } + + public List getCriteria() { + return criteria; + } + + protected void addCriterion(String condition) { + if (condition == null) { + throw new RuntimeException("Value for condition cannot be null"); + } + criteria.add(new Criterion(condition)); + } + + protected void addCriterion(String condition, Object value, String property) { + if (value == null) { + throw new RuntimeException("Value for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value)); + } + + protected void addCriterion(String condition, Object value1, Object value2, String property) { + if (value1 == null || value2 == null) { + throw new RuntimeException("Between values for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value1, value2)); + } + + public Criteria andIdIsNull() { + addCriterion("ID is null"); + return (Criteria) this; + } + + public Criteria andIdIsNotNull() { + addCriterion("ID is not null"); + return (Criteria) this; + } + + public Criteria andIdEqualTo(String value) { + addCriterion("ID =", value, "id"); + return (Criteria) this; + } + + public Criteria andIdNotEqualTo(String value) { + addCriterion("ID <>", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThan(String value) { + addCriterion("ID >", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThanOrEqualTo(String value) { + addCriterion("ID >=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThan(String value) { + addCriterion("ID <", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThanOrEqualTo(String value) { + addCriterion("ID <=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLike(String value) { + addCriterion("ID like", value, "id"); + return (Criteria) this; + } + + public Criteria andIdNotLike(String value) { + addCriterion("ID not like", value, "id"); + return (Criteria) this; + } + + public Criteria andIdIn(List values) { + addCriterion("ID in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdNotIn(List values) { + addCriterion("ID not in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdBetween(String value1, String value2) { + addCriterion("ID between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andIdNotBetween(String value1, String value2) { + addCriterion("ID not between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andNameIsNull() { + addCriterion("NAME is null"); + return (Criteria) this; + } + + public Criteria andNameIsNotNull() { + addCriterion("NAME is not null"); + return (Criteria) this; + } + + public Criteria andNameEqualTo(String value) { + addCriterion("NAME =", value, "name"); + return (Criteria) this; + } + + public Criteria andNameNotEqualTo(String value) { + addCriterion("NAME <>", value, "name"); + return (Criteria) this; + } + + public Criteria andNameGreaterThan(String value) { + addCriterion("NAME >", value, "name"); + return (Criteria) this; + } + + public Criteria andNameGreaterThanOrEqualTo(String value) { + addCriterion("NAME >=", value, "name"); + return (Criteria) this; + } + + public Criteria andNameLessThan(String value) { + addCriterion("NAME <", value, "name"); + return (Criteria) this; + } + + public Criteria andNameLessThanOrEqualTo(String value) { + addCriterion("NAME <=", value, "name"); + return (Criteria) this; + } + + public Criteria andNameLike(String value) { + addCriterion("NAME like", value, "name"); + return (Criteria) this; + } + + public Criteria andNameNotLike(String value) { + addCriterion("NAME not like", value, "name"); + return (Criteria) this; + } + + public Criteria andNameIn(List values) { + addCriterion("NAME in", values, "name"); + return (Criteria) this; + } + + public Criteria andNameNotIn(List values) { + addCriterion("NAME not in", values, "name"); + return (Criteria) this; + } + + public Criteria andNameBetween(String value1, String value2) { + addCriterion("NAME between", value1, value2, "name"); + return (Criteria) this; + } + + public Criteria andNameNotBetween(String value1, String value2) { + addCriterion("NAME not between", value1, value2, "name"); + return (Criteria) this; + } + + public Criteria andParentIdIsNull() { + addCriterion("PARENT_ID is null"); + return (Criteria) this; + } + + public Criteria andParentIdIsNotNull() { + addCriterion("PARENT_ID is not null"); + return (Criteria) this; + } + + public Criteria andParentIdEqualTo(String value) { + addCriterion("PARENT_ID =", value, "parentId"); + return (Criteria) this; + } + + public Criteria andParentIdNotEqualTo(String value) { + addCriterion("PARENT_ID <>", value, "parentId"); + return (Criteria) this; + } + + public Criteria andParentIdGreaterThan(String value) { + addCriterion("PARENT_ID >", value, "parentId"); + return (Criteria) this; + } + + public Criteria andParentIdGreaterThanOrEqualTo(String value) { + addCriterion("PARENT_ID >=", value, "parentId"); + return (Criteria) this; + } + + public Criteria andParentIdLessThan(String value) { + addCriterion("PARENT_ID <", value, "parentId"); + return (Criteria) this; + } + + public Criteria andParentIdLessThanOrEqualTo(String value) { + addCriterion("PARENT_ID <=", value, "parentId"); + return (Criteria) this; + } + + public Criteria andParentIdLike(String value) { + addCriterion("PARENT_ID like", value, "parentId"); + return (Criteria) this; + } + + public Criteria andParentIdNotLike(String value) { + addCriterion("PARENT_ID not like", value, "parentId"); + return (Criteria) this; + } + + public Criteria andParentIdIn(List values) { + addCriterion("PARENT_ID in", values, "parentId"); + return (Criteria) this; + } + + public Criteria andParentIdNotIn(List values) { + addCriterion("PARENT_ID not in", values, "parentId"); + return (Criteria) this; + } + + public Criteria andParentIdBetween(String value1, String value2) { + addCriterion("PARENT_ID between", value1, value2, "parentId"); + return (Criteria) this; + } + + public Criteria andParentIdNotBetween(String value1, String value2) { + addCriterion("PARENT_ID not between", value1, value2, "parentId"); + return (Criteria) this; + } + + public Criteria andStatusIsNull() { + addCriterion("STATUS is null"); + return (Criteria) this; + } + + public Criteria andStatusIsNotNull() { + addCriterion("STATUS is not null"); + return (Criteria) this; + } + + public Criteria andStatusEqualTo(Short value) { + addCriterion("STATUS =", value, "status"); + return (Criteria) this; + } + + public Criteria andStatusNotEqualTo(Short value) { + addCriterion("STATUS <>", value, "status"); + return (Criteria) this; + } + + public Criteria andStatusGreaterThan(Short value) { + addCriterion("STATUS >", value, "status"); + return (Criteria) this; + } + + public Criteria andStatusGreaterThanOrEqualTo(Short value) { + addCriterion("STATUS >=", value, "status"); + return (Criteria) this; + } + + public Criteria andStatusLessThan(Short value) { + addCriterion("STATUS <", value, "status"); + return (Criteria) this; + } + + public Criteria andStatusLessThanOrEqualTo(Short value) { + addCriterion("STATUS <=", value, "status"); + return (Criteria) this; + } + + public Criteria andStatusIn(List values) { + addCriterion("STATUS in", values, "status"); + return (Criteria) this; + } + + public Criteria andStatusNotIn(List values) { + addCriterion("STATUS not in", values, "status"); + return (Criteria) this; + } + + public Criteria andStatusBetween(Short value1, Short value2) { + addCriterion("STATUS between", value1, value2, "status"); + return (Criteria) this; + } + + public Criteria andStatusNotBetween(Short value1, Short value2) { + addCriterion("STATUS not between", value1, value2, "status"); + return (Criteria) this; + } + + public Criteria andCreateTimeIsNull() { + addCriterion("CREATE_TIME is null"); + return (Criteria) this; + } + + public Criteria andCreateTimeIsNotNull() { + addCriterion("CREATE_TIME is not null"); + return (Criteria) this; + } + + public Criteria andCreateTimeEqualTo(Long value) { + addCriterion("CREATE_TIME =", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeNotEqualTo(Long value) { + addCriterion("CREATE_TIME <>", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeGreaterThan(Long value) { + addCriterion("CREATE_TIME >", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeGreaterThanOrEqualTo(Long value) { + addCriterion("CREATE_TIME >=", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeLessThan(Long value) { + addCriterion("CREATE_TIME <", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeLessThanOrEqualTo(Long value) { + addCriterion("CREATE_TIME <=", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeIn(List values) { + addCriterion("CREATE_TIME in", values, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeNotIn(List values) { + addCriterion("CREATE_TIME not in", values, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeBetween(Long value1, Long value2) { + addCriterion("CREATE_TIME between", value1, value2, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeNotBetween(Long value1, Long value2) { + addCriterion("CREATE_TIME not between", value1, value2, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateUserIdIsNull() { + addCriterion("CREATE_USER_ID is null"); + return (Criteria) this; + } + + public Criteria andCreateUserIdIsNotNull() { + addCriterion("CREATE_USER_ID is not null"); + return (Criteria) this; + } + + public Criteria andCreateUserIdEqualTo(String value) { + addCriterion("CREATE_USER_ID =", value, "createUserId"); + return (Criteria) this; + } + + public Criteria andCreateUserIdNotEqualTo(String value) { + addCriterion("CREATE_USER_ID <>", value, "createUserId"); + return (Criteria) this; + } + + public Criteria andCreateUserIdGreaterThan(String value) { + addCriterion("CREATE_USER_ID >", value, "createUserId"); + return (Criteria) this; + } + + public Criteria andCreateUserIdGreaterThanOrEqualTo(String value) { + addCriterion("CREATE_USER_ID >=", value, "createUserId"); + return (Criteria) this; + } + + public Criteria andCreateUserIdLessThan(String value) { + addCriterion("CREATE_USER_ID <", value, "createUserId"); + return (Criteria) this; + } + + public Criteria andCreateUserIdLessThanOrEqualTo(String value) { + addCriterion("CREATE_USER_ID <=", value, "createUserId"); + return (Criteria) this; + } + + public Criteria andCreateUserIdLike(String value) { + addCriterion("CREATE_USER_ID like", value, "createUserId"); + return (Criteria) this; + } + + public Criteria andCreateUserIdNotLike(String value) { + addCriterion("CREATE_USER_ID not like", value, "createUserId"); + return (Criteria) this; + } + + public Criteria andCreateUserIdIn(List values) { + addCriterion("CREATE_USER_ID in", values, "createUserId"); + return (Criteria) this; + } + + public Criteria andCreateUserIdNotIn(List values) { + addCriterion("CREATE_USER_ID not in", values, "createUserId"); + return (Criteria) this; + } + + public Criteria andCreateUserIdBetween(String value1, String value2) { + addCriterion("CREATE_USER_ID between", value1, value2, "createUserId"); + return (Criteria) this; + } + + public Criteria andCreateUserIdNotBetween(String value1, String value2) { + addCriterion("CREATE_USER_ID not between", value1, value2, "createUserId"); + return (Criteria) this; + } + + public Criteria andLastUpdateTimeIsNull() { + addCriterion("LAST_UPDATE_TIME is null"); + return (Criteria) this; + } + + public Criteria andLastUpdateTimeIsNotNull() { + addCriterion("LAST_UPDATE_TIME is not null"); + return (Criteria) this; + } + + public Criteria andLastUpdateTimeEqualTo(Long value) { + addCriterion("LAST_UPDATE_TIME =", value, "lastUpdateTime"); + return (Criteria) this; + } + + public Criteria andLastUpdateTimeNotEqualTo(Long value) { + addCriterion("LAST_UPDATE_TIME <>", value, "lastUpdateTime"); + return (Criteria) this; + } + + public Criteria andLastUpdateTimeGreaterThan(Long value) { + addCriterion("LAST_UPDATE_TIME >", value, "lastUpdateTime"); + return (Criteria) this; + } + + public Criteria andLastUpdateTimeGreaterThanOrEqualTo(Long value) { + addCriterion("LAST_UPDATE_TIME >=", value, "lastUpdateTime"); + return (Criteria) this; + } + + public Criteria andLastUpdateTimeLessThan(Long value) { + addCriterion("LAST_UPDATE_TIME <", value, "lastUpdateTime"); + return (Criteria) this; + } + + public Criteria andLastUpdateTimeLessThanOrEqualTo(Long value) { + addCriterion("LAST_UPDATE_TIME <=", value, "lastUpdateTime"); + return (Criteria) this; + } + + public Criteria andLastUpdateTimeIn(List values) { + addCriterion("LAST_UPDATE_TIME in", values, "lastUpdateTime"); + return (Criteria) this; + } + + public Criteria andLastUpdateTimeNotIn(List values) { + addCriterion("LAST_UPDATE_TIME not in", values, "lastUpdateTime"); + return (Criteria) this; + } + + public Criteria andLastUpdateTimeBetween(Long value1, Long value2) { + addCriterion("LAST_UPDATE_TIME between", value1, value2, "lastUpdateTime"); + return (Criteria) this; + } + + public Criteria andLastUpdateTimeNotBetween(Long value1, Long value2) { + addCriterion("LAST_UPDATE_TIME not between", value1, value2, "lastUpdateTime"); + return (Criteria) this; + } + + public Criteria andLastUpdateUserIdIsNull() { + addCriterion("LAST_UPDATE_USER_ID is null"); + return (Criteria) this; + } + + public Criteria andLastUpdateUserIdIsNotNull() { + addCriterion("LAST_UPDATE_USER_ID is not null"); + return (Criteria) this; + } + + public Criteria andLastUpdateUserIdEqualTo(String value) { + addCriterion("LAST_UPDATE_USER_ID =", value, "lastUpdateUserId"); + return (Criteria) this; + } + + public Criteria andLastUpdateUserIdNotEqualTo(String value) { + addCriterion("LAST_UPDATE_USER_ID <>", value, "lastUpdateUserId"); + return (Criteria) this; + } + + public Criteria andLastUpdateUserIdGreaterThan(String value) { + addCriterion("LAST_UPDATE_USER_ID >", value, "lastUpdateUserId"); + return (Criteria) this; + } + + public Criteria andLastUpdateUserIdGreaterThanOrEqualTo(String value) { + addCriterion("LAST_UPDATE_USER_ID >=", value, "lastUpdateUserId"); + return (Criteria) this; + } + + public Criteria andLastUpdateUserIdLessThan(String value) { + addCriterion("LAST_UPDATE_USER_ID <", value, "lastUpdateUserId"); + return (Criteria) this; + } + + public Criteria andLastUpdateUserIdLessThanOrEqualTo(String value) { + addCriterion("LAST_UPDATE_USER_ID <=", value, "lastUpdateUserId"); + return (Criteria) this; + } + + public Criteria andLastUpdateUserIdLike(String value) { + addCriterion("LAST_UPDATE_USER_ID like", value, "lastUpdateUserId"); + return (Criteria) this; + } + + public Criteria andLastUpdateUserIdNotLike(String value) { + addCriterion("LAST_UPDATE_USER_ID not like", value, "lastUpdateUserId"); + return (Criteria) this; + } + + public Criteria andLastUpdateUserIdIn(List values) { + addCriterion("LAST_UPDATE_USER_ID in", values, "lastUpdateUserId"); + return (Criteria) this; + } + + public Criteria andLastUpdateUserIdNotIn(List values) { + addCriterion("LAST_UPDATE_USER_ID not in", values, "lastUpdateUserId"); + return (Criteria) this; + } + + public Criteria andLastUpdateUserIdBetween(String value1, String value2) { + addCriterion("LAST_UPDATE_USER_ID between", value1, value2, "lastUpdateUserId"); + return (Criteria) this; + } + + public Criteria andLastUpdateUserIdNotBetween(String value1, String value2) { + addCriterion("LAST_UPDATE_USER_ID not between", value1, value2, "lastUpdateUserId"); + return (Criteria) this; + } + + public Criteria andApplicationIdIsNull() { + addCriterion("APPLICATION_ID is null"); + return (Criteria) this; + } + + public Criteria andApplicationIdIsNotNull() { + addCriterion("APPLICATION_ID is not null"); + return (Criteria) this; + } + + public Criteria andApplicationIdEqualTo(String value) { + addCriterion("APPLICATION_ID =", value, "applicationId"); + return (Criteria) this; + } + + public Criteria andApplicationIdNotEqualTo(String value) { + addCriterion("APPLICATION_ID <>", value, "applicationId"); + return (Criteria) this; + } + + public Criteria andApplicationIdGreaterThan(String value) { + addCriterion("APPLICATION_ID >", value, "applicationId"); + return (Criteria) this; + } + + public Criteria andApplicationIdGreaterThanOrEqualTo(String value) { + addCriterion("APPLICATION_ID >=", value, "applicationId"); + return (Criteria) this; + } + + public Criteria andApplicationIdLessThan(String value) { + addCriterion("APPLICATION_ID <", value, "applicationId"); + return (Criteria) this; + } + + public Criteria andApplicationIdLessThanOrEqualTo(String value) { + addCriterion("APPLICATION_ID <=", value, "applicationId"); + return (Criteria) this; + } + + public Criteria andApplicationIdLike(String value) { + addCriterion("APPLICATION_ID like", value, "applicationId"); + return (Criteria) this; + } + + public Criteria andApplicationIdNotLike(String value) { + addCriterion("APPLICATION_ID not like", value, "applicationId"); + return (Criteria) this; + } + + public Criteria andApplicationIdIn(List values) { + addCriterion("APPLICATION_ID in", values, "applicationId"); + return (Criteria) this; + } + + public Criteria andApplicationIdNotIn(List values) { + addCriterion("APPLICATION_ID not in", values, "applicationId"); + return (Criteria) this; + } + + public Criteria andApplicationIdBetween(String value1, String value2) { + addCriterion("APPLICATION_ID between", value1, value2, "applicationId"); + return (Criteria) this; + } + + public Criteria andApplicationIdNotBetween(String value1, String value2) { + addCriterion("APPLICATION_ID not between", value1, value2, "applicationId"); + return (Criteria) this; + } + + public Criteria andCodeIsNull() { + addCriterion("CODE is null"); + return (Criteria) this; + } + + public Criteria andCodeIsNotNull() { + addCriterion("CODE is not null"); + return (Criteria) this; + } + + public Criteria andCodeEqualTo(String value) { + addCriterion("CODE =", value, "code"); + return (Criteria) this; + } + + public Criteria andCodeNotEqualTo(String value) { + addCriterion("CODE <>", value, "code"); + return (Criteria) this; + } + + public Criteria andCodeGreaterThan(String value) { + addCriterion("CODE >", value, "code"); + return (Criteria) this; + } + + public Criteria andCodeGreaterThanOrEqualTo(String value) { + addCriterion("CODE >=", value, "code"); + return (Criteria) this; + } + + public Criteria andCodeLessThan(String value) { + addCriterion("CODE <", value, "code"); + return (Criteria) this; + } + + public Criteria andCodeLessThanOrEqualTo(String value) { + addCriterion("CODE <=", value, "code"); + return (Criteria) this; + } + + public Criteria andCodeLike(String value) { + addCriterion("CODE like", value, "code"); + return (Criteria) this; + } + + public Criteria andCodeNotLike(String value) { + addCriterion("CODE not like", value, "code"); + return (Criteria) this; + } + + public Criteria andCodeIn(List values) { + addCriterion("CODE in", values, "code"); + return (Criteria) this; + } + + public Criteria andCodeNotIn(List values) { + addCriterion("CODE not in", values, "code"); + return (Criteria) this; + } + + public Criteria andCodeBetween(String value1, String value2) { + addCriterion("CODE between", value1, value2, "code"); + return (Criteria) this; + } + + public Criteria andCodeNotBetween(String value1, String value2) { + addCriterion("CODE not between", value1, value2, "code"); + return (Criteria) this; + } + + public Criteria andOrderByIsNull() { + addCriterion("ORDER_BY is null"); + return (Criteria) this; + } + + public Criteria andOrderByIsNotNull() { + addCriterion("ORDER_BY is not null"); + return (Criteria) this; + } + + public Criteria andOrderByEqualTo(Short value) { + addCriterion("ORDER_BY =", value, "orderBy"); + return (Criteria) this; + } + + public Criteria andOrderByNotEqualTo(Short value) { + addCriterion("ORDER_BY <>", value, "orderBy"); + return (Criteria) this; + } + + public Criteria andOrderByGreaterThan(Short value) { + addCriterion("ORDER_BY >", value, "orderBy"); + return (Criteria) this; + } + + public Criteria andOrderByGreaterThanOrEqualTo(Short value) { + addCriterion("ORDER_BY >=", value, "orderBy"); + return (Criteria) this; + } + + public Criteria andOrderByLessThan(Short value) { + addCriterion("ORDER_BY <", value, "orderBy"); + return (Criteria) this; + } + + public Criteria andOrderByLessThanOrEqualTo(Short value) { + addCriterion("ORDER_BY <=", value, "orderBy"); + return (Criteria) this; + } + + public Criteria andOrderByIn(List values) { + addCriterion("ORDER_BY in", values, "orderBy"); + return (Criteria) this; + } + + public Criteria andOrderByNotIn(List values) { + addCriterion("ORDER_BY not in", values, "orderBy"); + return (Criteria) this; + } + + public Criteria andOrderByBetween(Short value1, Short value2) { + addCriterion("ORDER_BY between", value1, value2, "orderBy"); + return (Criteria) this; + } + + public Criteria andOrderByNotBetween(Short value1, Short value2) { + addCriterion("ORDER_BY not between", value1, value2, "orderBy"); + return (Criteria) this; + } + + public Criteria andPictureNameIsNull() { + addCriterion("PICTURE_NAME is null"); + return (Criteria) this; + } + + public Criteria andPictureNameIsNotNull() { + addCriterion("PICTURE_NAME is not null"); + return (Criteria) this; + } + + public Criteria andPictureNameEqualTo(String value) { + addCriterion("PICTURE_NAME =", value, "pictureName"); + return (Criteria) this; + } + + public Criteria andPictureNameNotEqualTo(String value) { + addCriterion("PICTURE_NAME <>", value, "pictureName"); + return (Criteria) this; + } + + public Criteria andPictureNameGreaterThan(String value) { + addCriterion("PICTURE_NAME >", value, "pictureName"); + return (Criteria) this; + } + + public Criteria andPictureNameGreaterThanOrEqualTo(String value) { + addCriterion("PICTURE_NAME >=", value, "pictureName"); + return (Criteria) this; + } + + public Criteria andPictureNameLessThan(String value) { + addCriterion("PICTURE_NAME <", value, "pictureName"); + return (Criteria) this; + } + + public Criteria andPictureNameLessThanOrEqualTo(String value) { + addCriterion("PICTURE_NAME <=", value, "pictureName"); + return (Criteria) this; + } + + public Criteria andPictureNameLike(String value) { + addCriterion("PICTURE_NAME like", value, "pictureName"); + return (Criteria) this; + } + + public Criteria andPictureNameNotLike(String value) { + addCriterion("PICTURE_NAME not like", value, "pictureName"); + return (Criteria) this; + } + + public Criteria andPictureNameIn(List values) { + addCriterion("PICTURE_NAME in", values, "pictureName"); + return (Criteria) this; + } + + public Criteria andPictureNameNotIn(List values) { + addCriterion("PICTURE_NAME not in", values, "pictureName"); + return (Criteria) this; + } + + public Criteria andPictureNameBetween(String value1, String value2) { + addCriterion("PICTURE_NAME between", value1, value2, "pictureName"); + return (Criteria) this; + } + + public Criteria andPictureNameNotBetween(String value1, String value2) { + addCriterion("PICTURE_NAME not between", value1, value2, "pictureName"); + return (Criteria) this; + } + + public Criteria andRemarkIsNull() { + addCriterion("REMARK is null"); + return (Criteria) this; + } + + public Criteria andRemarkIsNotNull() { + addCriterion("REMARK is not null"); + return (Criteria) this; + } + + public Criteria andRemarkEqualTo(String value) { + addCriterion("REMARK =", value, "remark"); + return (Criteria) this; + } + + public Criteria andRemarkNotEqualTo(String value) { + addCriterion("REMARK <>", value, "remark"); + return (Criteria) this; + } + + public Criteria andRemarkGreaterThan(String value) { + addCriterion("REMARK >", value, "remark"); + return (Criteria) this; + } + + public Criteria andRemarkGreaterThanOrEqualTo(String value) { + addCriterion("REMARK >=", value, "remark"); + return (Criteria) this; + } + + public Criteria andRemarkLessThan(String value) { + addCriterion("REMARK <", value, "remark"); + return (Criteria) this; + } + + public Criteria andRemarkLessThanOrEqualTo(String value) { + addCriterion("REMARK <=", value, "remark"); + return (Criteria) this; + } + + public Criteria andRemarkLike(String value) { + addCriterion("REMARK like", value, "remark"); + return (Criteria) this; + } + + public Criteria andRemarkNotLike(String value) { + addCriterion("REMARK not like", value, "remark"); + return (Criteria) this; + } + + public Criteria andRemarkIn(List values) { + addCriterion("REMARK in", values, "remark"); + return (Criteria) this; + } + + public Criteria andRemarkNotIn(List values) { + addCriterion("REMARK not in", values, "remark"); + return (Criteria) this; + } + + public Criteria andRemarkBetween(String value1, String value2) { + addCriterion("REMARK between", value1, value2, "remark"); + return (Criteria) this; + } + + public Criteria andRemarkNotBetween(String value1, String value2) { + addCriterion("REMARK not between", value1, value2, "remark"); + return (Criteria) this; + } + + public Criteria andTypeIsNull() { + addCriterion("TYPE is null"); + return (Criteria) this; + } + + public Criteria andTypeIsNotNull() { + addCriterion("TYPE is not null"); + return (Criteria) this; + } + + public Criteria andTypeEqualTo(Short value) { + addCriterion("TYPE =", value, "type"); + return (Criteria) this; + } + + public Criteria andTypeNotEqualTo(Short value) { + addCriterion("TYPE <>", value, "type"); + return (Criteria) this; + } + + public Criteria andTypeGreaterThan(Short value) { + addCriterion("TYPE >", value, "type"); + return (Criteria) this; + } + + public Criteria andTypeGreaterThanOrEqualTo(Short value) { + addCriterion("TYPE >=", value, "type"); + return (Criteria) this; + } + + public Criteria andTypeLessThan(Short value) { + addCriterion("TYPE <", value, "type"); + return (Criteria) this; + } + + public Criteria andTypeLessThanOrEqualTo(Short value) { + addCriterion("TYPE <=", value, "type"); + return (Criteria) this; + } + + public Criteria andTypeIn(List values) { + addCriterion("TYPE in", values, "type"); + return (Criteria) this; + } + + public Criteria andTypeNotIn(List values) { + addCriterion("TYPE not in", values, "type"); + return (Criteria) this; + } + + public Criteria andTypeBetween(Short value1, Short value2) { + addCriterion("TYPE between", value1, value2, "type"); + return (Criteria) this; + } + + public Criteria andTypeNotBetween(Short value1, Short value2) { + addCriterion("TYPE not between", value1, value2, "type"); + return (Criteria) this; + } + + public Criteria andUrlIsNull() { + addCriterion("URL is null"); + return (Criteria) this; + } + + public Criteria andUrlIsNotNull() { + addCriterion("URL is not null"); + return (Criteria) this; + } + + public Criteria andUrlEqualTo(String value) { + addCriterion("URL =", value, "url"); + return (Criteria) this; + } + + public Criteria andUrlNotEqualTo(String value) { + addCriterion("URL <>", value, "url"); + return (Criteria) this; + } + + public Criteria andUrlGreaterThan(String value) { + addCriterion("URL >", value, "url"); + return (Criteria) this; + } + + public Criteria andUrlGreaterThanOrEqualTo(String value) { + addCriterion("URL >=", value, "url"); + return (Criteria) this; + } + + public Criteria andUrlLessThan(String value) { + addCriterion("URL <", value, "url"); + return (Criteria) this; + } + + public Criteria andUrlLessThanOrEqualTo(String value) { + addCriterion("URL <=", value, "url"); + return (Criteria) this; + } + + public Criteria andUrlLike(String value) { + addCriterion("URL like", value, "url"); + return (Criteria) this; + } + + public Criteria andUrlNotLike(String value) { + addCriterion("URL not like", value, "url"); + return (Criteria) this; + } + + public Criteria andUrlIn(List values) { + addCriterion("URL in", values, "url"); + return (Criteria) this; + } + + public Criteria andUrlNotIn(List values) { + addCriterion("URL not in", values, "url"); + return (Criteria) this; + } + + public Criteria andUrlBetween(String value1, String value2) { + addCriterion("URL between", value1, value2, "url"); + return (Criteria) this; + } + + public Criteria andUrlNotBetween(String value1, String value2) { + addCriterion("URL not between", value1, value2, "url"); + return (Criteria) this; + } + + public Criteria andShowStatusIsNull() { + addCriterion("SHOW_STATUS is null"); + return (Criteria) this; + } + + public Criteria andShowStatusIsNotNull() { + addCriterion("SHOW_STATUS is not null"); + return (Criteria) this; + } + + public Criteria andShowStatusEqualTo(Short value) { + addCriterion("SHOW_STATUS =", value, "showStatus"); + return (Criteria) this; + } + + public Criteria andShowStatusNotEqualTo(Short value) { + addCriterion("SHOW_STATUS <>", value, "showStatus"); + return (Criteria) this; + } + + public Criteria andShowStatusGreaterThan(Short value) { + addCriterion("SHOW_STATUS >", value, "showStatus"); + return (Criteria) this; + } + + public Criteria andShowStatusGreaterThanOrEqualTo(Short value) { + addCriterion("SHOW_STATUS >=", value, "showStatus"); + return (Criteria) this; + } + + public Criteria andShowStatusLessThan(Short value) { + addCriterion("SHOW_STATUS <", value, "showStatus"); + return (Criteria) this; + } + + public Criteria andShowStatusLessThanOrEqualTo(Short value) { + addCriterion("SHOW_STATUS <=", value, "showStatus"); + return (Criteria) this; + } + + public Criteria andShowStatusIn(List values) { + addCriterion("SHOW_STATUS in", values, "showStatus"); + return (Criteria) this; + } + + public Criteria andShowStatusNotIn(List values) { + addCriterion("SHOW_STATUS not in", values, "showStatus"); + return (Criteria) this; + } + + public Criteria andShowStatusBetween(Short value1, Short value2) { + addCriterion("SHOW_STATUS between", value1, value2, "showStatus"); + return (Criteria) this; + } + + public Criteria andShowStatusNotBetween(Short value1, Short value2) { + addCriterion("SHOW_STATUS not between", value1, value2, "showStatus"); + return (Criteria) this; + } + + public Criteria andHaveMenuIsNull() { + addCriterion("HAVE_MENU is null"); + return (Criteria) this; + } + + public Criteria andHaveMenuIsNotNull() { + addCriterion("HAVE_MENU is not null"); + return (Criteria) this; + } + + public Criteria andHaveMenuEqualTo(Short value) { + addCriterion("HAVE_MENU =", value, "haveMenu"); + return (Criteria) this; + } + + public Criteria andHaveMenuNotEqualTo(Short value) { + addCriterion("HAVE_MENU <>", value, "haveMenu"); + return (Criteria) this; + } + + public Criteria andHaveMenuGreaterThan(Short value) { + addCriterion("HAVE_MENU >", value, "haveMenu"); + return (Criteria) this; + } + + public Criteria andHaveMenuGreaterThanOrEqualTo(Short value) { + addCriterion("HAVE_MENU >=", value, "haveMenu"); + return (Criteria) this; + } + + public Criteria andHaveMenuLessThan(Short value) { + addCriterion("HAVE_MENU <", value, "haveMenu"); + return (Criteria) this; + } + + public Criteria andHaveMenuLessThanOrEqualTo(Short value) { + addCriterion("HAVE_MENU <=", value, "haveMenu"); + return (Criteria) this; + } + + public Criteria andHaveMenuIn(List values) { + addCriterion("HAVE_MENU in", values, "haveMenu"); + return (Criteria) this; + } + + public Criteria andHaveMenuNotIn(List values) { + addCriterion("HAVE_MENU not in", values, "haveMenu"); + return (Criteria) this; + } + + public Criteria andHaveMenuBetween(Short value1, Short value2) { + addCriterion("HAVE_MENU between", value1, value2, "haveMenu"); + return (Criteria) this; + } + + public Criteria andHaveMenuNotBetween(Short value1, Short value2) { + addCriterion("HAVE_MENU not between", value1, value2, "haveMenu"); + return (Criteria) this; + } + } + + public static class Criteria extends GeneratedCriteria { + + protected Criteria() { + super(); + } + } + + public static class Criterion { + private String condition; + + private Object value; + + private Object secondValue; + + private boolean noValue; + + private boolean singleValue; + + private boolean betweenValue; + + private boolean listValue; + + private String typeHandler; + + public String getCondition() { + return condition; + } + + public Object getValue() { + return value; + } + + public Object getSecondValue() { + return secondValue; + } + + public boolean isNoValue() { + return noValue; + } + + public boolean isSingleValue() { + return singleValue; + } + + public boolean isBetweenValue() { + return betweenValue; + } + + public boolean isListValue() { + return listValue; + } + + public String getTypeHandler() { + return typeHandler; + } + + protected Criterion(String condition) { + super(); + this.condition = condition; + this.typeHandler = null; + this.noValue = true; + } + + protected Criterion(String condition, Object value, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.typeHandler = typeHandler; + if (value instanceof List) { + this.listValue = true; + } else { + this.singleValue = true; + } + } + + protected Criterion(String condition, Object value) { + this(condition, value, null); + } + + protected Criterion(String condition, Object value, Object secondValue, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.secondValue = secondValue; + this.typeHandler = typeHandler; + this.betweenValue = true; + } + + protected Criterion(String condition, Object value, Object secondValue) { + this(condition, value, secondValue, null); + } + } +} \ No newline at end of file diff --git a/itools-core/itools-model/src/main/java/com/itools/core/rbac/dto/RoleAuthDTO.java b/itools-core/itools-model/src/main/java/com/itools/core/rbac/dto/RoleAuthDTO.java new file mode 100644 index 0000000000000000000000000000000000000000..0f79075acb7a881f29bff3bd16d7cb5b4ab9313a --- /dev/null +++ b/itools-core/itools-model/src/main/java/com/itools/core/rbac/dto/RoleAuthDTO.java @@ -0,0 +1,93 @@ +package com.itools.core.rbac.dto; + +public class RoleAuthDTO { + private String id; + + private Long createTime; + + private String createUserId; + + private Long lastUpdateTime; + + private String lastUpdateUserId; + + private String applicationId; + + private String authorizationId; + + private String roleId; + + private Short status; + + public String getId() { + return id; + } + + public void setId(String id) { + this.id = id; + } + + public Long getCreateTime() { + return createTime; + } + + public void setCreateTime(Long createTime) { + this.createTime = createTime; + } + + public String getCreateUserId() { + return createUserId; + } + + public void setCreateUserId(String createUserId) { + this.createUserId = createUserId; + } + + public Long getLastUpdateTime() { + return lastUpdateTime; + } + + public void setLastUpdateTime(Long lastUpdateTime) { + this.lastUpdateTime = lastUpdateTime; + } + + public String getLastUpdateUserId() { + return lastUpdateUserId; + } + + public void setLastUpdateUserId(String lastUpdateUserId) { + this.lastUpdateUserId = lastUpdateUserId; + } + + public String getApplicationId() { + return applicationId; + } + + public void setApplicationId(String applicationId) { + this.applicationId = applicationId; + } + + public String getAuthorizationId() { + return authorizationId; + } + + public void setAuthorizationId(String authorizationId) { + this.authorizationId = authorizationId; + } + + public String getRoleId() { + return roleId; + } + + public void setRoleId(String roleId) { + this.roleId = roleId; + } + + public Short getStatus() { + return status; + } + + public void setStatus(Short status) { + this.status = status; + } +} \ No newline at end of file diff --git a/itools-core/itools-model/src/main/java/com/itools/core/rbac/dto/RoleAuthDTOExample.java b/itools-core/itools-model/src/main/java/com/itools/core/rbac/dto/RoleAuthDTOExample.java new file mode 100644 index 0000000000000000000000000000000000000000..732c40c90dedcd1e006a25c7c3ccb9286e82a633 --- /dev/null +++ b/itools-core/itools-model/src/main/java/com/itools/core/rbac/dto/RoleAuthDTOExample.java @@ -0,0 +1,800 @@ +package com.itools.core.rbac.dto; + +import java.util.ArrayList; +import java.util.List; + +public class RoleAuthDTOExample { + protected String orderByClause; + + protected boolean distinct; + + protected List oredCriteria; + + public RoleAuthDTOExample() { + oredCriteria = new ArrayList(); + } + + public void setOrderByClause(String orderByClause) { + this.orderByClause = orderByClause; + } + + public String getOrderByClause() { + return orderByClause; + } + + public void setDistinct(boolean distinct) { + this.distinct = distinct; + } + + public boolean isDistinct() { + return distinct; + } + + public List getOredCriteria() { + return oredCriteria; + } + + public void or(Criteria criteria) { + oredCriteria.add(criteria); + } + + public Criteria or() { + Criteria criteria = createCriteriaInternal(); + oredCriteria.add(criteria); + return criteria; + } + + public Criteria createCriteria() { + Criteria criteria = createCriteriaInternal(); + if (oredCriteria.size() == 0) { + oredCriteria.add(criteria); + } + return criteria; + } + + protected Criteria createCriteriaInternal() { + Criteria criteria = new Criteria(); + return criteria; + } + + public void clear() { + oredCriteria.clear(); + orderByClause = null; + distinct = false; + } + + protected abstract static class GeneratedCriteria { + protected List criteria; + + protected GeneratedCriteria() { + super(); + criteria = new ArrayList(); + } + + public boolean isValid() { + return criteria.size() > 0; + } + + public List getAllCriteria() { + return criteria; + } + + public List getCriteria() { + return criteria; + } + + protected void addCriterion(String condition) { + if (condition == null) { + throw new RuntimeException("Value for condition cannot be null"); + } + criteria.add(new Criterion(condition)); + } + + protected void addCriterion(String condition, Object value, String property) { + if (value == null) { + throw new RuntimeException("Value for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value)); + } + + protected void addCriterion(String condition, Object value1, Object value2, String property) { + if (value1 == null || value2 == null) { + throw new RuntimeException("Between values for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value1, value2)); + } + + public Criteria andIdIsNull() { + addCriterion("ID is null"); + return (Criteria) this; + } + + public Criteria andIdIsNotNull() { + addCriterion("ID is not null"); + return (Criteria) this; + } + + public Criteria andIdEqualTo(String value) { + addCriterion("ID =", value, "id"); + return (Criteria) this; + } + + public Criteria andIdNotEqualTo(String value) { + addCriterion("ID <>", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThan(String value) { + addCriterion("ID >", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThanOrEqualTo(String value) { + addCriterion("ID >=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThan(String value) { + addCriterion("ID <", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThanOrEqualTo(String value) { + addCriterion("ID <=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLike(String value) { + addCriterion("ID like", value, "id"); + return (Criteria) this; + } + + public Criteria andIdNotLike(String value) { + addCriterion("ID not like", value, "id"); + return (Criteria) this; + } + + public Criteria andIdIn(List values) { + addCriterion("ID in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdNotIn(List values) { + addCriterion("ID not in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdBetween(String value1, String value2) { + addCriterion("ID between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andIdNotBetween(String value1, String value2) { + addCriterion("ID not between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andCreateTimeIsNull() { + addCriterion("CREATE_TIME is null"); + return (Criteria) this; + } + + public Criteria andCreateTimeIsNotNull() { + addCriterion("CREATE_TIME is not null"); + return (Criteria) this; + } + + public Criteria andCreateTimeEqualTo(Long value) { + addCriterion("CREATE_TIME =", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeNotEqualTo(Long value) { + addCriterion("CREATE_TIME <>", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeGreaterThan(Long value) { + addCriterion("CREATE_TIME >", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeGreaterThanOrEqualTo(Long value) { + addCriterion("CREATE_TIME >=", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeLessThan(Long value) { + addCriterion("CREATE_TIME <", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeLessThanOrEqualTo(Long value) { + addCriterion("CREATE_TIME <=", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeIn(List values) { + addCriterion("CREATE_TIME in", values, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeNotIn(List values) { + addCriterion("CREATE_TIME not in", values, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeBetween(Long value1, Long value2) { + addCriterion("CREATE_TIME between", value1, value2, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeNotBetween(Long value1, Long value2) { + addCriterion("CREATE_TIME not between", value1, value2, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateUserIdIsNull() { + addCriterion("CREATE_USER_ID is null"); + return (Criteria) this; + } + + public Criteria andCreateUserIdIsNotNull() { + addCriterion("CREATE_USER_ID is not null"); + return (Criteria) this; + } + + public Criteria andCreateUserIdEqualTo(String value) { + addCriterion("CREATE_USER_ID =", value, "createUserId"); + return (Criteria) this; + } + + public Criteria andCreateUserIdNotEqualTo(String value) { + addCriterion("CREATE_USER_ID <>", value, "createUserId"); + return (Criteria) this; + } + + public Criteria andCreateUserIdGreaterThan(String value) { + addCriterion("CREATE_USER_ID >", value, "createUserId"); + return (Criteria) this; + } + + public Criteria andCreateUserIdGreaterThanOrEqualTo(String value) { + addCriterion("CREATE_USER_ID >=", value, "createUserId"); + return (Criteria) this; + } + + public Criteria andCreateUserIdLessThan(String value) { + addCriterion("CREATE_USER_ID <", value, "createUserId"); + return (Criteria) this; + } + + public Criteria andCreateUserIdLessThanOrEqualTo(String value) { + addCriterion("CREATE_USER_ID <=", value, "createUserId"); + return (Criteria) this; + } + + public Criteria andCreateUserIdLike(String value) { + addCriterion("CREATE_USER_ID like", value, "createUserId"); + return (Criteria) this; + } + + public Criteria andCreateUserIdNotLike(String value) { + addCriterion("CREATE_USER_ID not like", value, "createUserId"); + return (Criteria) this; + } + + public Criteria andCreateUserIdIn(List values) { + addCriterion("CREATE_USER_ID in", values, "createUserId"); + return (Criteria) this; + } + + public Criteria andCreateUserIdNotIn(List values) { + addCriterion("CREATE_USER_ID not in", values, "createUserId"); + return (Criteria) this; + } + + public Criteria andCreateUserIdBetween(String value1, String value2) { + addCriterion("CREATE_USER_ID between", value1, value2, "createUserId"); + return (Criteria) this; + } + + public Criteria andCreateUserIdNotBetween(String value1, String value2) { + addCriterion("CREATE_USER_ID not between", value1, value2, "createUserId"); + return (Criteria) this; + } + + public Criteria andLastUpdateTimeIsNull() { + addCriterion("LAST_UPDATE_TIME is null"); + return (Criteria) this; + } + + public Criteria andLastUpdateTimeIsNotNull() { + addCriterion("LAST_UPDATE_TIME is not null"); + return (Criteria) this; + } + + public Criteria andLastUpdateTimeEqualTo(Long value) { + addCriterion("LAST_UPDATE_TIME =", value, "lastUpdateTime"); + return (Criteria) this; + } + + public Criteria andLastUpdateTimeNotEqualTo(Long value) { + addCriterion("LAST_UPDATE_TIME <>", value, "lastUpdateTime"); + return (Criteria) this; + } + + public Criteria andLastUpdateTimeGreaterThan(Long value) { + addCriterion("LAST_UPDATE_TIME >", value, "lastUpdateTime"); + return (Criteria) this; + } + + public Criteria andLastUpdateTimeGreaterThanOrEqualTo(Long value) { + addCriterion("LAST_UPDATE_TIME >=", value, "lastUpdateTime"); + return (Criteria) this; + } + + public Criteria andLastUpdateTimeLessThan(Long value) { + addCriterion("LAST_UPDATE_TIME <", value, "lastUpdateTime"); + return (Criteria) this; + } + + public Criteria andLastUpdateTimeLessThanOrEqualTo(Long value) { + addCriterion("LAST_UPDATE_TIME <=", value, "lastUpdateTime"); + return (Criteria) this; + } + + public Criteria andLastUpdateTimeIn(List values) { + addCriterion("LAST_UPDATE_TIME in", values, "lastUpdateTime"); + return (Criteria) this; + } + + public Criteria andLastUpdateTimeNotIn(List values) { + addCriterion("LAST_UPDATE_TIME not in", values, "lastUpdateTime"); + return (Criteria) this; + } + + public Criteria andLastUpdateTimeBetween(Long value1, Long value2) { + addCriterion("LAST_UPDATE_TIME between", value1, value2, "lastUpdateTime"); + return (Criteria) this; + } + + public Criteria andLastUpdateTimeNotBetween(Long value1, Long value2) { + addCriterion("LAST_UPDATE_TIME not between", value1, value2, "lastUpdateTime"); + return (Criteria) this; + } + + public Criteria andLastUpdateUserIdIsNull() { + addCriterion("LAST_UPDATE_USER_ID is null"); + return (Criteria) this; + } + + public Criteria andLastUpdateUserIdIsNotNull() { + addCriterion("LAST_UPDATE_USER_ID is not null"); + return (Criteria) this; + } + + public Criteria andLastUpdateUserIdEqualTo(String value) { + addCriterion("LAST_UPDATE_USER_ID =", value, "lastUpdateUserId"); + return (Criteria) this; + } + + public Criteria andLastUpdateUserIdNotEqualTo(String value) { + addCriterion("LAST_UPDATE_USER_ID <>", value, "lastUpdateUserId"); + return (Criteria) this; + } + + public Criteria andLastUpdateUserIdGreaterThan(String value) { + addCriterion("LAST_UPDATE_USER_ID >", value, "lastUpdateUserId"); + return (Criteria) this; + } + + public Criteria andLastUpdateUserIdGreaterThanOrEqualTo(String value) { + addCriterion("LAST_UPDATE_USER_ID >=", value, "lastUpdateUserId"); + return (Criteria) this; + } + + public Criteria andLastUpdateUserIdLessThan(String value) { + addCriterion("LAST_UPDATE_USER_ID <", value, "lastUpdateUserId"); + return (Criteria) this; + } + + public Criteria andLastUpdateUserIdLessThanOrEqualTo(String value) { + addCriterion("LAST_UPDATE_USER_ID <=", value, "lastUpdateUserId"); + return (Criteria) this; + } + + public Criteria andLastUpdateUserIdLike(String value) { + addCriterion("LAST_UPDATE_USER_ID like", value, "lastUpdateUserId"); + return (Criteria) this; + } + + public Criteria andLastUpdateUserIdNotLike(String value) { + addCriterion("LAST_UPDATE_USER_ID not like", value, "lastUpdateUserId"); + return (Criteria) this; + } + + public Criteria andLastUpdateUserIdIn(List values) { + addCriterion("LAST_UPDATE_USER_ID in", values, "lastUpdateUserId"); + return (Criteria) this; + } + + public Criteria andLastUpdateUserIdNotIn(List values) { + addCriterion("LAST_UPDATE_USER_ID not in", values, "lastUpdateUserId"); + return (Criteria) this; + } + + public Criteria andLastUpdateUserIdBetween(String value1, String value2) { + addCriterion("LAST_UPDATE_USER_ID between", value1, value2, "lastUpdateUserId"); + return (Criteria) this; + } + + public Criteria andLastUpdateUserIdNotBetween(String value1, String value2) { + addCriterion("LAST_UPDATE_USER_ID not between", value1, value2, "lastUpdateUserId"); + return (Criteria) this; + } + + public Criteria andApplicationIdIsNull() { + addCriterion("APPLICATION_ID is null"); + return (Criteria) this; + } + + public Criteria andApplicationIdIsNotNull() { + addCriterion("APPLICATION_ID is not null"); + return (Criteria) this; + } + + public Criteria andApplicationIdEqualTo(String value) { + addCriterion("APPLICATION_ID =", value, "applicationId"); + return (Criteria) this; + } + + public Criteria andApplicationIdNotEqualTo(String value) { + addCriterion("APPLICATION_ID <>", value, "applicationId"); + return (Criteria) this; + } + + public Criteria andApplicationIdGreaterThan(String value) { + addCriterion("APPLICATION_ID >", value, "applicationId"); + return (Criteria) this; + } + + public Criteria andApplicationIdGreaterThanOrEqualTo(String value) { + addCriterion("APPLICATION_ID >=", value, "applicationId"); + return (Criteria) this; + } + + public Criteria andApplicationIdLessThan(String value) { + addCriterion("APPLICATION_ID <", value, "applicationId"); + return (Criteria) this; + } + + public Criteria andApplicationIdLessThanOrEqualTo(String value) { + addCriterion("APPLICATION_ID <=", value, "applicationId"); + return (Criteria) this; + } + + public Criteria andApplicationIdLike(String value) { + addCriterion("APPLICATION_ID like", value, "applicationId"); + return (Criteria) this; + } + + public Criteria andApplicationIdNotLike(String value) { + addCriterion("APPLICATION_ID not like", value, "applicationId"); + return (Criteria) this; + } + + public Criteria andApplicationIdIn(List values) { + addCriterion("APPLICATION_ID in", values, "applicationId"); + return (Criteria) this; + } + + public Criteria andApplicationIdNotIn(List values) { + addCriterion("APPLICATION_ID not in", values, "applicationId"); + return (Criteria) this; + } + + public Criteria andApplicationIdBetween(String value1, String value2) { + addCriterion("APPLICATION_ID between", value1, value2, "applicationId"); + return (Criteria) this; + } + + public Criteria andApplicationIdNotBetween(String value1, String value2) { + addCriterion("APPLICATION_ID not between", value1, value2, "applicationId"); + return (Criteria) this; + } + + public Criteria andAuthorizationIdIsNull() { + addCriterion("AUTHORIZATION_ID is null"); + return (Criteria) this; + } + + public Criteria andAuthorizationIdIsNotNull() { + addCriterion("AUTHORIZATION_ID is not null"); + return (Criteria) this; + } + + public Criteria andAuthorizationIdEqualTo(String value) { + addCriterion("AUTHORIZATION_ID =", value, "authorizationId"); + return (Criteria) this; + } + + public Criteria andAuthorizationIdNotEqualTo(String value) { + addCriterion("AUTHORIZATION_ID <>", value, "authorizationId"); + return (Criteria) this; + } + + public Criteria andAuthorizationIdGreaterThan(String value) { + addCriterion("AUTHORIZATION_ID >", value, "authorizationId"); + return (Criteria) this; + } + + public Criteria andAuthorizationIdGreaterThanOrEqualTo(String value) { + addCriterion("AUTHORIZATION_ID >=", value, "authorizationId"); + return (Criteria) this; + } + + public Criteria andAuthorizationIdLessThan(String value) { + addCriterion("AUTHORIZATION_ID <", value, "authorizationId"); + return (Criteria) this; + } + + public Criteria andAuthorizationIdLessThanOrEqualTo(String value) { + addCriterion("AUTHORIZATION_ID <=", value, "authorizationId"); + return (Criteria) this; + } + + public Criteria andAuthorizationIdLike(String value) { + addCriterion("AUTHORIZATION_ID like", value, "authorizationId"); + return (Criteria) this; + } + + public Criteria andAuthorizationIdNotLike(String value) { + addCriterion("AUTHORIZATION_ID not like", value, "authorizationId"); + return (Criteria) this; + } + + public Criteria andAuthorizationIdIn(List values) { + addCriterion("AUTHORIZATION_ID in", values, "authorizationId"); + return (Criteria) this; + } + + public Criteria andAuthorizationIdNotIn(List values) { + addCriterion("AUTHORIZATION_ID not in", values, "authorizationId"); + return (Criteria) this; + } + + public Criteria andAuthorizationIdBetween(String value1, String value2) { + addCriterion("AUTHORIZATION_ID between", value1, value2, "authorizationId"); + return (Criteria) this; + } + + public Criteria andAuthorizationIdNotBetween(String value1, String value2) { + addCriterion("AUTHORIZATION_ID not between", value1, value2, "authorizationId"); + return (Criteria) this; + } + + public Criteria andRoleIdIsNull() { + addCriterion("ROLE_ID is null"); + return (Criteria) this; + } + + public Criteria andRoleIdIsNotNull() { + addCriterion("ROLE_ID is not null"); + return (Criteria) this; + } + + public Criteria andRoleIdEqualTo(String value) { + addCriterion("ROLE_ID =", value, "roleId"); + return (Criteria) this; + } + + public Criteria andRoleIdNotEqualTo(String value) { + addCriterion("ROLE_ID <>", value, "roleId"); + return (Criteria) this; + } + + public Criteria andRoleIdGreaterThan(String value) { + addCriterion("ROLE_ID >", value, "roleId"); + return (Criteria) this; + } + + public Criteria andRoleIdGreaterThanOrEqualTo(String value) { + addCriterion("ROLE_ID >=", value, "roleId"); + return (Criteria) this; + } + + public Criteria andRoleIdLessThan(String value) { + addCriterion("ROLE_ID <", value, "roleId"); + return (Criteria) this; + } + + public Criteria andRoleIdLessThanOrEqualTo(String value) { + addCriterion("ROLE_ID <=", value, "roleId"); + return (Criteria) this; + } + + public Criteria andRoleIdLike(String value) { + addCriterion("ROLE_ID like", value, "roleId"); + return (Criteria) this; + } + + public Criteria andRoleIdNotLike(String value) { + addCriterion("ROLE_ID not like", value, "roleId"); + return (Criteria) this; + } + + public Criteria andRoleIdIn(List values) { + addCriterion("ROLE_ID in", values, "roleId"); + return (Criteria) this; + } + + public Criteria andRoleIdNotIn(List values) { + addCriterion("ROLE_ID not in", values, "roleId"); + return (Criteria) this; + } + + public Criteria andRoleIdBetween(String value1, String value2) { + addCriterion("ROLE_ID between", value1, value2, "roleId"); + return (Criteria) this; + } + + public Criteria andRoleIdNotBetween(String value1, String value2) { + addCriterion("ROLE_ID not between", value1, value2, "roleId"); + return (Criteria) this; + } + + public Criteria andStatusIsNull() { + addCriterion("STATUS is null"); + return (Criteria) this; + } + + public Criteria andStatusIsNotNull() { + addCriterion("STATUS is not null"); + return (Criteria) this; + } + + public Criteria andStatusEqualTo(Short value) { + addCriterion("STATUS =", value, "status"); + return (Criteria) this; + } + + public Criteria andStatusNotEqualTo(Short value) { + addCriterion("STATUS <>", value, "status"); + return (Criteria) this; + } + + public Criteria andStatusGreaterThan(Short value) { + addCriterion("STATUS >", value, "status"); + return (Criteria) this; + } + + public Criteria andStatusGreaterThanOrEqualTo(Short value) { + addCriterion("STATUS >=", value, "status"); + return (Criteria) this; + } + + public Criteria andStatusLessThan(Short value) { + addCriterion("STATUS <", value, "status"); + return (Criteria) this; + } + + public Criteria andStatusLessThanOrEqualTo(Short value) { + addCriterion("STATUS <=", value, "status"); + return (Criteria) this; + } + + public Criteria andStatusIn(List values) { + addCriterion("STATUS in", values, "status"); + return (Criteria) this; + } + + public Criteria andStatusNotIn(List values) { + addCriterion("STATUS not in", values, "status"); + return (Criteria) this; + } + + public Criteria andStatusBetween(Short value1, Short value2) { + addCriterion("STATUS between", value1, value2, "status"); + return (Criteria) this; + } + + public Criteria andStatusNotBetween(Short value1, Short value2) { + addCriterion("STATUS not between", value1, value2, "status"); + return (Criteria) this; + } + } + + public static class Criteria extends GeneratedCriteria { + + protected Criteria() { + super(); + } + } + + public static class Criterion { + private String condition; + + private Object value; + + private Object secondValue; + + private boolean noValue; + + private boolean singleValue; + + private boolean betweenValue; + + private boolean listValue; + + private String typeHandler; + + public String getCondition() { + return condition; + } + + public Object getValue() { + return value; + } + + public Object getSecondValue() { + return secondValue; + } + + public boolean isNoValue() { + return noValue; + } + + public boolean isSingleValue() { + return singleValue; + } + + public boolean isBetweenValue() { + return betweenValue; + } + + public boolean isListValue() { + return listValue; + } + + public String getTypeHandler() { + return typeHandler; + } + + protected Criterion(String condition) { + super(); + this.condition = condition; + this.typeHandler = null; + this.noValue = true; + } + + protected Criterion(String condition, Object value, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.typeHandler = typeHandler; + if (value instanceof List) { + this.listValue = true; + } else { + this.singleValue = true; + } + } + + protected Criterion(String condition, Object value) { + this(condition, value, null); + } + + protected Criterion(String condition, Object value, Object secondValue, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.secondValue = secondValue; + this.typeHandler = typeHandler; + this.betweenValue = true; + } + + protected Criterion(String condition, Object value, Object secondValue) { + this(condition, value, secondValue, null); + } + } +} \ No newline at end of file diff --git a/itools-core/itools-model/src/main/java/com/itools/core/rbac/dto/RoleInfoDTO.java b/itools-core/itools-model/src/main/java/com/itools/core/rbac/dto/RoleInfoDTO.java new file mode 100644 index 0000000000000000000000000000000000000000..df553f15fdfdca69fa5067684a53807fce094d88 --- /dev/null +++ b/itools-core/itools-model/src/main/java/com/itools/core/rbac/dto/RoleInfoDTO.java @@ -0,0 +1,143 @@ +package com.itools.core.rbac.dto; + +public class RoleInfoDTO { + private String id; + + private String parentId; + + private String name; + + private String custId; + + private String applicationId; + + private String remark; + + private Long createTime; + + private String code; + + private String createUserId; + + private Long lastUpdateTime; + + private String lastUpdateUserId; + + private Short status; + + private Short orderBy; + + private Short type; + + public String getId() { + return id; + } + + public void setId(String id) { + this.id = id; + } + + public String getParentId() { + return parentId; + } + + public void setParentId(String parentId) { + this.parentId = parentId; + } + + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + public String getCustId() { + return custId; + } + + public void setCustId(String custId) { + this.custId = custId; + } + + public String getApplicationId() { + return applicationId; + } + + public void setApplicationId(String applicationId) { + this.applicationId = applicationId; + } + + public String getRemark() { + return remark; + } + + public void setRemark(String remark) { + this.remark = remark; + } + + public Long getCreateTime() { + return createTime; + } + + public void setCreateTime(Long createTime) { + this.createTime = createTime; + } + + public String getCode() { + return code; + } + + public void setCode(String code) { + this.code = code; + } + + public String getCreateUserId() { + return createUserId; + } + + public void setCreateUserId(String createUserId) { + this.createUserId = createUserId; + } + + public Long getLastUpdateTime() { + return lastUpdateTime; + } + + public void setLastUpdateTime(Long lastUpdateTime) { + this.lastUpdateTime = lastUpdateTime; + } + + public String getLastUpdateUserId() { + return lastUpdateUserId; + } + + public void setLastUpdateUserId(String lastUpdateUserId) { + this.lastUpdateUserId = lastUpdateUserId; + } + + public Short getStatus() { + return status; + } + + public void setStatus(Short status) { + this.status = status; + } + + public Short getOrderBy() { + return orderBy; + } + + public void setOrderBy(Short orderBy) { + this.orderBy = orderBy; + } + + public Short getType() { + return type; + } + + public void setType(Short type) { + this.type = type; + } +} \ No newline at end of file diff --git a/itools-core/itools-model/src/main/java/com/itools/core/rbac/dto/RoleInfoDTOExample.java b/itools-core/itools-model/src/main/java/com/itools/core/rbac/dto/RoleInfoDTOExample.java new file mode 100644 index 0000000000000000000000000000000000000000..b1615c212111bcf1cf0db3d1f7c35bf1fb32a04c --- /dev/null +++ b/itools-core/itools-model/src/main/java/com/itools/core/rbac/dto/RoleInfoDTOExample.java @@ -0,0 +1,1130 @@ +package com.itools.core.rbac.dto; + +import java.util.ArrayList; +import java.util.List; + +public class RoleInfoDTOExample { + protected String orderByClause; + + protected boolean distinct; + + protected List oredCriteria; + + public RoleInfoDTOExample() { + oredCriteria = new ArrayList(); + } + + public void setOrderByClause(String orderByClause) { + this.orderByClause = orderByClause; + } + + public String getOrderByClause() { + return orderByClause; + } + + public void setDistinct(boolean distinct) { + this.distinct = distinct; + } + + public boolean isDistinct() { + return distinct; + } + + public List getOredCriteria() { + return oredCriteria; + } + + public void or(Criteria criteria) { + oredCriteria.add(criteria); + } + + public Criteria or() { + Criteria criteria = createCriteriaInternal(); + oredCriteria.add(criteria); + return criteria; + } + + public Criteria createCriteria() { + Criteria criteria = createCriteriaInternal(); + if (oredCriteria.size() == 0) { + oredCriteria.add(criteria); + } + return criteria; + } + + protected Criteria createCriteriaInternal() { + Criteria criteria = new Criteria(); + return criteria; + } + + public void clear() { + oredCriteria.clear(); + orderByClause = null; + distinct = false; + } + + protected abstract static class GeneratedCriteria { + protected List criteria; + + protected GeneratedCriteria() { + super(); + criteria = new ArrayList(); + } + + public boolean isValid() { + return criteria.size() > 0; + } + + public List getAllCriteria() { + return criteria; + } + + public List getCriteria() { + return criteria; + } + + protected void addCriterion(String condition) { + if (condition == null) { + throw new RuntimeException("Value for condition cannot be null"); + } + criteria.add(new Criterion(condition)); + } + + protected void addCriterion(String condition, Object value, String property) { + if (value == null) { + throw new RuntimeException("Value for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value)); + } + + protected void addCriterion(String condition, Object value1, Object value2, String property) { + if (value1 == null || value2 == null) { + throw new RuntimeException("Between values for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value1, value2)); + } + + public Criteria andIdIsNull() { + addCriterion("ID is null"); + return (Criteria) this; + } + + public Criteria andIdIsNotNull() { + addCriterion("ID is not null"); + return (Criteria) this; + } + + public Criteria andIdEqualTo(String value) { + addCriterion("ID =", value, "id"); + return (Criteria) this; + } + + public Criteria andIdNotEqualTo(String value) { + addCriterion("ID <>", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThan(String value) { + addCriterion("ID >", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThanOrEqualTo(String value) { + addCriterion("ID >=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThan(String value) { + addCriterion("ID <", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThanOrEqualTo(String value) { + addCriterion("ID <=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLike(String value) { + addCriterion("ID like", value, "id"); + return (Criteria) this; + } + + public Criteria andIdNotLike(String value) { + addCriterion("ID not like", value, "id"); + return (Criteria) this; + } + + public Criteria andIdIn(List values) { + addCriterion("ID in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdNotIn(List values) { + addCriterion("ID not in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdBetween(String value1, String value2) { + addCriterion("ID between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andIdNotBetween(String value1, String value2) { + addCriterion("ID not between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andParentIdIsNull() { + addCriterion("PARENT_ID is null"); + return (Criteria) this; + } + + public Criteria andParentIdIsNotNull() { + addCriterion("PARENT_ID is not null"); + return (Criteria) this; + } + + public Criteria andParentIdEqualTo(String value) { + addCriterion("PARENT_ID =", value, "parentId"); + return (Criteria) this; + } + + public Criteria andParentIdNotEqualTo(String value) { + addCriterion("PARENT_ID <>", value, "parentId"); + return (Criteria) this; + } + + public Criteria andParentIdGreaterThan(String value) { + addCriterion("PARENT_ID >", value, "parentId"); + return (Criteria) this; + } + + public Criteria andParentIdGreaterThanOrEqualTo(String value) { + addCriterion("PARENT_ID >=", value, "parentId"); + return (Criteria) this; + } + + public Criteria andParentIdLessThan(String value) { + addCriterion("PARENT_ID <", value, "parentId"); + return (Criteria) this; + } + + public Criteria andParentIdLessThanOrEqualTo(String value) { + addCriterion("PARENT_ID <=", value, "parentId"); + return (Criteria) this; + } + + public Criteria andParentIdLike(String value) { + addCriterion("PARENT_ID like", value, "parentId"); + return (Criteria) this; + } + + public Criteria andParentIdNotLike(String value) { + addCriterion("PARENT_ID not like", value, "parentId"); + return (Criteria) this; + } + + public Criteria andParentIdIn(List values) { + addCriterion("PARENT_ID in", values, "parentId"); + return (Criteria) this; + } + + public Criteria andParentIdNotIn(List values) { + addCriterion("PARENT_ID not in", values, "parentId"); + return (Criteria) this; + } + + public Criteria andParentIdBetween(String value1, String value2) { + addCriterion("PARENT_ID between", value1, value2, "parentId"); + return (Criteria) this; + } + + public Criteria andParentIdNotBetween(String value1, String value2) { + addCriterion("PARENT_ID not between", value1, value2, "parentId"); + return (Criteria) this; + } + + public Criteria andNameIsNull() { + addCriterion("NAME is null"); + return (Criteria) this; + } + + public Criteria andNameIsNotNull() { + addCriterion("NAME is not null"); + return (Criteria) this; + } + + public Criteria andNameEqualTo(String value) { + addCriterion("NAME =", value, "name"); + return (Criteria) this; + } + + public Criteria andNameNotEqualTo(String value) { + addCriterion("NAME <>", value, "name"); + return (Criteria) this; + } + + public Criteria andNameGreaterThan(String value) { + addCriterion("NAME >", value, "name"); + return (Criteria) this; + } + + public Criteria andNameGreaterThanOrEqualTo(String value) { + addCriterion("NAME >=", value, "name"); + return (Criteria) this; + } + + public Criteria andNameLessThan(String value) { + addCriterion("NAME <", value, "name"); + return (Criteria) this; + } + + public Criteria andNameLessThanOrEqualTo(String value) { + addCriterion("NAME <=", value, "name"); + return (Criteria) this; + } + + public Criteria andNameLike(String value) { + addCriterion("NAME like", value, "name"); + return (Criteria) this; + } + + public Criteria andNameNotLike(String value) { + addCriterion("NAME not like", value, "name"); + return (Criteria) this; + } + + public Criteria andNameIn(List values) { + addCriterion("NAME in", values, "name"); + return (Criteria) this; + } + + public Criteria andNameNotIn(List values) { + addCriterion("NAME not in", values, "name"); + return (Criteria) this; + } + + public Criteria andNameBetween(String value1, String value2) { + addCriterion("NAME between", value1, value2, "name"); + return (Criteria) this; + } + + public Criteria andNameNotBetween(String value1, String value2) { + addCriterion("NAME not between", value1, value2, "name"); + return (Criteria) this; + } + + public Criteria andCustIdIsNull() { + addCriterion("CUST_ID is null"); + return (Criteria) this; + } + + public Criteria andCustIdIsNotNull() { + addCriterion("CUST_ID is not null"); + return (Criteria) this; + } + + public Criteria andCustIdEqualTo(String value) { + addCriterion("CUST_ID =", value, "custId"); + return (Criteria) this; + } + + public Criteria andCustIdNotEqualTo(String value) { + addCriterion("CUST_ID <>", value, "custId"); + return (Criteria) this; + } + + public Criteria andCustIdGreaterThan(String value) { + addCriterion("CUST_ID >", value, "custId"); + return (Criteria) this; + } + + public Criteria andCustIdGreaterThanOrEqualTo(String value) { + addCriterion("CUST_ID >=", value, "custId"); + return (Criteria) this; + } + + public Criteria andCustIdLessThan(String value) { + addCriterion("CUST_ID <", value, "custId"); + return (Criteria) this; + } + + public Criteria andCustIdLessThanOrEqualTo(String value) { + addCriterion("CUST_ID <=", value, "custId"); + return (Criteria) this; + } + + public Criteria andCustIdLike(String value) { + addCriterion("CUST_ID like", value, "custId"); + return (Criteria) this; + } + + public Criteria andCustIdNotLike(String value) { + addCriterion("CUST_ID not like", value, "custId"); + return (Criteria) this; + } + + public Criteria andCustIdIn(List values) { + addCriterion("CUST_ID in", values, "custId"); + return (Criteria) this; + } + + public Criteria andCustIdNotIn(List values) { + addCriterion("CUST_ID not in", values, "custId"); + return (Criteria) this; + } + + public Criteria andCustIdBetween(String value1, String value2) { + addCriterion("CUST_ID between", value1, value2, "custId"); + return (Criteria) this; + } + + public Criteria andCustIdNotBetween(String value1, String value2) { + addCriterion("CUST_ID not between", value1, value2, "custId"); + return (Criteria) this; + } + + public Criteria andApplicationIdIsNull() { + addCriterion("APPLICATION_ID is null"); + return (Criteria) this; + } + + public Criteria andApplicationIdIsNotNull() { + addCriterion("APPLICATION_ID is not null"); + return (Criteria) this; + } + + public Criteria andApplicationIdEqualTo(String value) { + addCriterion("APPLICATION_ID =", value, "applicationId"); + return (Criteria) this; + } + + public Criteria andApplicationIdNotEqualTo(String value) { + addCriterion("APPLICATION_ID <>", value, "applicationId"); + return (Criteria) this; + } + + public Criteria andApplicationIdGreaterThan(String value) { + addCriterion("APPLICATION_ID >", value, "applicationId"); + return (Criteria) this; + } + + public Criteria andApplicationIdGreaterThanOrEqualTo(String value) { + addCriterion("APPLICATION_ID >=", value, "applicationId"); + return (Criteria) this; + } + + public Criteria andApplicationIdLessThan(String value) { + addCriterion("APPLICATION_ID <", value, "applicationId"); + return (Criteria) this; + } + + public Criteria andApplicationIdLessThanOrEqualTo(String value) { + addCriterion("APPLICATION_ID <=", value, "applicationId"); + return (Criteria) this; + } + + public Criteria andApplicationIdLike(String value) { + addCriterion("APPLICATION_ID like", value, "applicationId"); + return (Criteria) this; + } + + public Criteria andApplicationIdNotLike(String value) { + addCriterion("APPLICATION_ID not like", value, "applicationId"); + return (Criteria) this; + } + + public Criteria andApplicationIdIn(List values) { + addCriterion("APPLICATION_ID in", values, "applicationId"); + return (Criteria) this; + } + + public Criteria andApplicationIdNotIn(List values) { + addCriterion("APPLICATION_ID not in", values, "applicationId"); + return (Criteria) this; + } + + public Criteria andApplicationIdBetween(String value1, String value2) { + addCriterion("APPLICATION_ID between", value1, value2, "applicationId"); + return (Criteria) this; + } + + public Criteria andApplicationIdNotBetween(String value1, String value2) { + addCriterion("APPLICATION_ID not between", value1, value2, "applicationId"); + return (Criteria) this; + } + + public Criteria andRemarkIsNull() { + addCriterion("REMARK is null"); + return (Criteria) this; + } + + public Criteria andRemarkIsNotNull() { + addCriterion("REMARK is not null"); + return (Criteria) this; + } + + public Criteria andRemarkEqualTo(String value) { + addCriterion("REMARK =", value, "remark"); + return (Criteria) this; + } + + public Criteria andRemarkNotEqualTo(String value) { + addCriterion("REMARK <>", value, "remark"); + return (Criteria) this; + } + + public Criteria andRemarkGreaterThan(String value) { + addCriterion("REMARK >", value, "remark"); + return (Criteria) this; + } + + public Criteria andRemarkGreaterThanOrEqualTo(String value) { + addCriterion("REMARK >=", value, "remark"); + return (Criteria) this; + } + + public Criteria andRemarkLessThan(String value) { + addCriterion("REMARK <", value, "remark"); + return (Criteria) this; + } + + public Criteria andRemarkLessThanOrEqualTo(String value) { + addCriterion("REMARK <=", value, "remark"); + return (Criteria) this; + } + + public Criteria andRemarkLike(String value) { + addCriterion("REMARK like", value, "remark"); + return (Criteria) this; + } + + public Criteria andRemarkNotLike(String value) { + addCriterion("REMARK not like", value, "remark"); + return (Criteria) this; + } + + public Criteria andRemarkIn(List values) { + addCriterion("REMARK in", values, "remark"); + return (Criteria) this; + } + + public Criteria andRemarkNotIn(List values) { + addCriterion("REMARK not in", values, "remark"); + return (Criteria) this; + } + + public Criteria andRemarkBetween(String value1, String value2) { + addCriterion("REMARK between", value1, value2, "remark"); + return (Criteria) this; + } + + public Criteria andRemarkNotBetween(String value1, String value2) { + addCriterion("REMARK not between", value1, value2, "remark"); + return (Criteria) this; + } + + public Criteria andCreateTimeIsNull() { + addCriterion("CREATE_TIME is null"); + return (Criteria) this; + } + + public Criteria andCreateTimeIsNotNull() { + addCriterion("CREATE_TIME is not null"); + return (Criteria) this; + } + + public Criteria andCreateTimeEqualTo(Long value) { + addCriterion("CREATE_TIME =", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeNotEqualTo(Long value) { + addCriterion("CREATE_TIME <>", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeGreaterThan(Long value) { + addCriterion("CREATE_TIME >", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeGreaterThanOrEqualTo(Long value) { + addCriterion("CREATE_TIME >=", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeLessThan(Long value) { + addCriterion("CREATE_TIME <", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeLessThanOrEqualTo(Long value) { + addCriterion("CREATE_TIME <=", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeIn(List values) { + addCriterion("CREATE_TIME in", values, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeNotIn(List values) { + addCriterion("CREATE_TIME not in", values, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeBetween(Long value1, Long value2) { + addCriterion("CREATE_TIME between", value1, value2, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeNotBetween(Long value1, Long value2) { + addCriterion("CREATE_TIME not between", value1, value2, "createTime"); + return (Criteria) this; + } + + public Criteria andCodeIsNull() { + addCriterion("CODE is null"); + return (Criteria) this; + } + + public Criteria andCodeIsNotNull() { + addCriterion("CODE is not null"); + return (Criteria) this; + } + + public Criteria andCodeEqualTo(String value) { + addCriterion("CODE =", value, "code"); + return (Criteria) this; + } + + public Criteria andCodeNotEqualTo(String value) { + addCriterion("CODE <>", value, "code"); + return (Criteria) this; + } + + public Criteria andCodeGreaterThan(String value) { + addCriterion("CODE >", value, "code"); + return (Criteria) this; + } + + public Criteria andCodeGreaterThanOrEqualTo(String value) { + addCriterion("CODE >=", value, "code"); + return (Criteria) this; + } + + public Criteria andCodeLessThan(String value) { + addCriterion("CODE <", value, "code"); + return (Criteria) this; + } + + public Criteria andCodeLessThanOrEqualTo(String value) { + addCriterion("CODE <=", value, "code"); + return (Criteria) this; + } + + public Criteria andCodeLike(String value) { + addCriterion("CODE like", value, "code"); + return (Criteria) this; + } + + public Criteria andCodeNotLike(String value) { + addCriterion("CODE not like", value, "code"); + return (Criteria) this; + } + + public Criteria andCodeIn(List values) { + addCriterion("CODE in", values, "code"); + return (Criteria) this; + } + + public Criteria andCodeNotIn(List values) { + addCriterion("CODE not in", values, "code"); + return (Criteria) this; + } + + public Criteria andCodeBetween(String value1, String value2) { + addCriterion("CODE between", value1, value2, "code"); + return (Criteria) this; + } + + public Criteria andCodeNotBetween(String value1, String value2) { + addCriterion("CODE not between", value1, value2, "code"); + return (Criteria) this; + } + + public Criteria andCreateUserIdIsNull() { + addCriterion("CREATE_USER_ID is null"); + return (Criteria) this; + } + + public Criteria andCreateUserIdIsNotNull() { + addCriterion("CREATE_USER_ID is not null"); + return (Criteria) this; + } + + public Criteria andCreateUserIdEqualTo(String value) { + addCriterion("CREATE_USER_ID =", value, "createUserId"); + return (Criteria) this; + } + + public Criteria andCreateUserIdNotEqualTo(String value) { + addCriterion("CREATE_USER_ID <>", value, "createUserId"); + return (Criteria) this; + } + + public Criteria andCreateUserIdGreaterThan(String value) { + addCriterion("CREATE_USER_ID >", value, "createUserId"); + return (Criteria) this; + } + + public Criteria andCreateUserIdGreaterThanOrEqualTo(String value) { + addCriterion("CREATE_USER_ID >=", value, "createUserId"); + return (Criteria) this; + } + + public Criteria andCreateUserIdLessThan(String value) { + addCriterion("CREATE_USER_ID <", value, "createUserId"); + return (Criteria) this; + } + + public Criteria andCreateUserIdLessThanOrEqualTo(String value) { + addCriterion("CREATE_USER_ID <=", value, "createUserId"); + return (Criteria) this; + } + + public Criteria andCreateUserIdLike(String value) { + addCriterion("CREATE_USER_ID like", value, "createUserId"); + return (Criteria) this; + } + + public Criteria andCreateUserIdNotLike(String value) { + addCriterion("CREATE_USER_ID not like", value, "createUserId"); + return (Criteria) this; + } + + public Criteria andCreateUserIdIn(List values) { + addCriterion("CREATE_USER_ID in", values, "createUserId"); + return (Criteria) this; + } + + public Criteria andCreateUserIdNotIn(List values) { + addCriterion("CREATE_USER_ID not in", values, "createUserId"); + return (Criteria) this; + } + + public Criteria andCreateUserIdBetween(String value1, String value2) { + addCriterion("CREATE_USER_ID between", value1, value2, "createUserId"); + return (Criteria) this; + } + + public Criteria andCreateUserIdNotBetween(String value1, String value2) { + addCriterion("CREATE_USER_ID not between", value1, value2, "createUserId"); + return (Criteria) this; + } + + public Criteria andLastUpdateTimeIsNull() { + addCriterion("LAST_UPDATE_TIME is null"); + return (Criteria) this; + } + + public Criteria andLastUpdateTimeIsNotNull() { + addCriterion("LAST_UPDATE_TIME is not null"); + return (Criteria) this; + } + + public Criteria andLastUpdateTimeEqualTo(Long value) { + addCriterion("LAST_UPDATE_TIME =", value, "lastUpdateTime"); + return (Criteria) this; + } + + public Criteria andLastUpdateTimeNotEqualTo(Long value) { + addCriterion("LAST_UPDATE_TIME <>", value, "lastUpdateTime"); + return (Criteria) this; + } + + public Criteria andLastUpdateTimeGreaterThan(Long value) { + addCriterion("LAST_UPDATE_TIME >", value, "lastUpdateTime"); + return (Criteria) this; + } + + public Criteria andLastUpdateTimeGreaterThanOrEqualTo(Long value) { + addCriterion("LAST_UPDATE_TIME >=", value, "lastUpdateTime"); + return (Criteria) this; + } + + public Criteria andLastUpdateTimeLessThan(Long value) { + addCriterion("LAST_UPDATE_TIME <", value, "lastUpdateTime"); + return (Criteria) this; + } + + public Criteria andLastUpdateTimeLessThanOrEqualTo(Long value) { + addCriterion("LAST_UPDATE_TIME <=", value, "lastUpdateTime"); + return (Criteria) this; + } + + public Criteria andLastUpdateTimeIn(List values) { + addCriterion("LAST_UPDATE_TIME in", values, "lastUpdateTime"); + return (Criteria) this; + } + + public Criteria andLastUpdateTimeNotIn(List values) { + addCriterion("LAST_UPDATE_TIME not in", values, "lastUpdateTime"); + return (Criteria) this; + } + + public Criteria andLastUpdateTimeBetween(Long value1, Long value2) { + addCriterion("LAST_UPDATE_TIME between", value1, value2, "lastUpdateTime"); + return (Criteria) this; + } + + public Criteria andLastUpdateTimeNotBetween(Long value1, Long value2) { + addCriterion("LAST_UPDATE_TIME not between", value1, value2, "lastUpdateTime"); + return (Criteria) this; + } + + public Criteria andLastUpdateUserIdIsNull() { + addCriterion("LAST_UPDATE_USER_ID is null"); + return (Criteria) this; + } + + public Criteria andLastUpdateUserIdIsNotNull() { + addCriterion("LAST_UPDATE_USER_ID is not null"); + return (Criteria) this; + } + + public Criteria andLastUpdateUserIdEqualTo(String value) { + addCriterion("LAST_UPDATE_USER_ID =", value, "lastUpdateUserId"); + return (Criteria) this; + } + + public Criteria andLastUpdateUserIdNotEqualTo(String value) { + addCriterion("LAST_UPDATE_USER_ID <>", value, "lastUpdateUserId"); + return (Criteria) this; + } + + public Criteria andLastUpdateUserIdGreaterThan(String value) { + addCriterion("LAST_UPDATE_USER_ID >", value, "lastUpdateUserId"); + return (Criteria) this; + } + + public Criteria andLastUpdateUserIdGreaterThanOrEqualTo(String value) { + addCriterion("LAST_UPDATE_USER_ID >=", value, "lastUpdateUserId"); + return (Criteria) this; + } + + public Criteria andLastUpdateUserIdLessThan(String value) { + addCriterion("LAST_UPDATE_USER_ID <", value, "lastUpdateUserId"); + return (Criteria) this; + } + + public Criteria andLastUpdateUserIdLessThanOrEqualTo(String value) { + addCriterion("LAST_UPDATE_USER_ID <=", value, "lastUpdateUserId"); + return (Criteria) this; + } + + public Criteria andLastUpdateUserIdLike(String value) { + addCriterion("LAST_UPDATE_USER_ID like", value, "lastUpdateUserId"); + return (Criteria) this; + } + + public Criteria andLastUpdateUserIdNotLike(String value) { + addCriterion("LAST_UPDATE_USER_ID not like", value, "lastUpdateUserId"); + return (Criteria) this; + } + + public Criteria andLastUpdateUserIdIn(List values) { + addCriterion("LAST_UPDATE_USER_ID in", values, "lastUpdateUserId"); + return (Criteria) this; + } + + public Criteria andLastUpdateUserIdNotIn(List values) { + addCriterion("LAST_UPDATE_USER_ID not in", values, "lastUpdateUserId"); + return (Criteria) this; + } + + public Criteria andLastUpdateUserIdBetween(String value1, String value2) { + addCriterion("LAST_UPDATE_USER_ID between", value1, value2, "lastUpdateUserId"); + return (Criteria) this; + } + + public Criteria andLastUpdateUserIdNotBetween(String value1, String value2) { + addCriterion("LAST_UPDATE_USER_ID not between", value1, value2, "lastUpdateUserId"); + return (Criteria) this; + } + + public Criteria andStatusIsNull() { + addCriterion("STATUS is null"); + return (Criteria) this; + } + + public Criteria andStatusIsNotNull() { + addCriterion("STATUS is not null"); + return (Criteria) this; + } + + public Criteria andStatusEqualTo(Short value) { + addCriterion("STATUS =", value, "status"); + return (Criteria) this; + } + + public Criteria andStatusNotEqualTo(Short value) { + addCriterion("STATUS <>", value, "status"); + return (Criteria) this; + } + + public Criteria andStatusGreaterThan(Short value) { + addCriterion("STATUS >", value, "status"); + return (Criteria) this; + } + + public Criteria andStatusGreaterThanOrEqualTo(Short value) { + addCriterion("STATUS >=", value, "status"); + return (Criteria) this; + } + + public Criteria andStatusLessThan(Short value) { + addCriterion("STATUS <", value, "status"); + return (Criteria) this; + } + + public Criteria andStatusLessThanOrEqualTo(Short value) { + addCriterion("STATUS <=", value, "status"); + return (Criteria) this; + } + + public Criteria andStatusIn(List values) { + addCriterion("STATUS in", values, "status"); + return (Criteria) this; + } + + public Criteria andStatusNotIn(List values) { + addCriterion("STATUS not in", values, "status"); + return (Criteria) this; + } + + public Criteria andStatusBetween(Short value1, Short value2) { + addCriterion("STATUS between", value1, value2, "status"); + return (Criteria) this; + } + + public Criteria andStatusNotBetween(Short value1, Short value2) { + addCriterion("STATUS not between", value1, value2, "status"); + return (Criteria) this; + } + + public Criteria andOrderByIsNull() { + addCriterion("ORDER_BY is null"); + return (Criteria) this; + } + + public Criteria andOrderByIsNotNull() { + addCriterion("ORDER_BY is not null"); + return (Criteria) this; + } + + public Criteria andOrderByEqualTo(Short value) { + addCriterion("ORDER_BY =", value, "orderBy"); + return (Criteria) this; + } + + public Criteria andOrderByNotEqualTo(Short value) { + addCriterion("ORDER_BY <>", value, "orderBy"); + return (Criteria) this; + } + + public Criteria andOrderByGreaterThan(Short value) { + addCriterion("ORDER_BY >", value, "orderBy"); + return (Criteria) this; + } + + public Criteria andOrderByGreaterThanOrEqualTo(Short value) { + addCriterion("ORDER_BY >=", value, "orderBy"); + return (Criteria) this; + } + + public Criteria andOrderByLessThan(Short value) { + addCriterion("ORDER_BY <", value, "orderBy"); + return (Criteria) this; + } + + public Criteria andOrderByLessThanOrEqualTo(Short value) { + addCriterion("ORDER_BY <=", value, "orderBy"); + return (Criteria) this; + } + + public Criteria andOrderByIn(List values) { + addCriterion("ORDER_BY in", values, "orderBy"); + return (Criteria) this; + } + + public Criteria andOrderByNotIn(List values) { + addCriterion("ORDER_BY not in", values, "orderBy"); + return (Criteria) this; + } + + public Criteria andOrderByBetween(Short value1, Short value2) { + addCriterion("ORDER_BY between", value1, value2, "orderBy"); + return (Criteria) this; + } + + public Criteria andOrderByNotBetween(Short value1, Short value2) { + addCriterion("ORDER_BY not between", value1, value2, "orderBy"); + return (Criteria) this; + } + + public Criteria andTypeIsNull() { + addCriterion("TYPE is null"); + return (Criteria) this; + } + + public Criteria andTypeIsNotNull() { + addCriterion("TYPE is not null"); + return (Criteria) this; + } + + public Criteria andTypeEqualTo(Short value) { + addCriterion("TYPE =", value, "type"); + return (Criteria) this; + } + + public Criteria andTypeNotEqualTo(Short value) { + addCriterion("TYPE <>", value, "type"); + return (Criteria) this; + } + + public Criteria andTypeGreaterThan(Short value) { + addCriterion("TYPE >", value, "type"); + return (Criteria) this; + } + + public Criteria andTypeGreaterThanOrEqualTo(Short value) { + addCriterion("TYPE >=", value, "type"); + return (Criteria) this; + } + + public Criteria andTypeLessThan(Short value) { + addCriterion("TYPE <", value, "type"); + return (Criteria) this; + } + + public Criteria andTypeLessThanOrEqualTo(Short value) { + addCriterion("TYPE <=", value, "type"); + return (Criteria) this; + } + + public Criteria andTypeIn(List values) { + addCriterion("TYPE in", values, "type"); + return (Criteria) this; + } + + public Criteria andTypeNotIn(List values) { + addCriterion("TYPE not in", values, "type"); + return (Criteria) this; + } + + public Criteria andTypeBetween(Short value1, Short value2) { + addCriterion("TYPE between", value1, value2, "type"); + return (Criteria) this; + } + + public Criteria andTypeNotBetween(Short value1, Short value2) { + addCriterion("TYPE not between", value1, value2, "type"); + return (Criteria) this; + } + } + + public static class Criteria extends GeneratedCriteria { + + protected Criteria() { + super(); + } + } + + public static class Criterion { + private String condition; + + private Object value; + + private Object secondValue; + + private boolean noValue; + + private boolean singleValue; + + private boolean betweenValue; + + private boolean listValue; + + private String typeHandler; + + public String getCondition() { + return condition; + } + + public Object getValue() { + return value; + } + + public Object getSecondValue() { + return secondValue; + } + + public boolean isNoValue() { + return noValue; + } + + public boolean isSingleValue() { + return singleValue; + } + + public boolean isBetweenValue() { + return betweenValue; + } + + public boolean isListValue() { + return listValue; + } + + public String getTypeHandler() { + return typeHandler; + } + + protected Criterion(String condition) { + super(); + this.condition = condition; + this.typeHandler = null; + this.noValue = true; + } + + protected Criterion(String condition, Object value, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.typeHandler = typeHandler; + if (value instanceof List) { + this.listValue = true; + } else { + this.singleValue = true; + } + } + + protected Criterion(String condition, Object value) { + this(condition, value, null); + } + + protected Criterion(String condition, Object value, Object secondValue, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.secondValue = secondValue; + this.typeHandler = typeHandler; + this.betweenValue = true; + } + + protected Criterion(String condition, Object value, Object secondValue) { + this(condition, value, secondValue, null); + } + } +} \ No newline at end of file diff --git a/itools-core/itools-model/src/main/java/com/itools/core/rbac/dto/RoleResourceDTO.java b/itools-core/itools-model/src/main/java/com/itools/core/rbac/dto/RoleResourceDTO.java new file mode 100644 index 0000000000000000000000000000000000000000..8a1570ee003d3a39a771a7571efc004282224447 --- /dev/null +++ b/itools-core/itools-model/src/main/java/com/itools/core/rbac/dto/RoleResourceDTO.java @@ -0,0 +1,103 @@ +package com.itools.core.rbac.dto; + +public class RoleResourceDTO { + private String id; + + private Long createTime; + + private String createUserId; + + private Long lastUpdateTime; + + private String lastUpdateUserId; + + private String applicationId; + + private String roleId; + + private String resourceId; + + private Short status; + + private Short type; + + public String getId() { + return id; + } + + public void setId(String id) { + this.id = id; + } + + public Long getCreateTime() { + return createTime; + } + + public void setCreateTime(Long createTime) { + this.createTime = createTime; + } + + public String getCreateUserId() { + return createUserId; + } + + public void setCreateUserId(String createUserId) { + this.createUserId = createUserId; + } + + public Long getLastUpdateTime() { + return lastUpdateTime; + } + + public void setLastUpdateTime(Long lastUpdateTime) { + this.lastUpdateTime = lastUpdateTime; + } + + public String getLastUpdateUserId() { + return lastUpdateUserId; + } + + public void setLastUpdateUserId(String lastUpdateUserId) { + this.lastUpdateUserId = lastUpdateUserId; + } + + public String getApplicationId() { + return applicationId; + } + + public void setApplicationId(String applicationId) { + this.applicationId = applicationId; + } + + public String getRoleId() { + return roleId; + } + + public void setRoleId(String roleId) { + this.roleId = roleId; + } + + public String getResourceId() { + return resourceId; + } + + public void setResourceId(String resourceId) { + this.resourceId = resourceId; + } + + public Short getStatus() { + return status; + } + + public void setStatus(Short status) { + this.status = status; + } + + public Short getType() { + return type; + } + + public void setType(Short type) { + this.type = type; + } +} \ No newline at end of file diff --git a/itools-core/itools-model/src/main/java/com/itools/core/rbac/dto/RoleResourceDTOExample.java b/itools-core/itools-model/src/main/java/com/itools/core/rbac/dto/RoleResourceDTOExample.java new file mode 100644 index 0000000000000000000000000000000000000000..9663024f8daaf101425886a7a1acdd4b1df5fd36 --- /dev/null +++ b/itools-core/itools-model/src/main/java/com/itools/core/rbac/dto/RoleResourceDTOExample.java @@ -0,0 +1,860 @@ +package com.itools.core.rbac.dto; + +import java.util.ArrayList; +import java.util.List; + +public class RoleResourceDTOExample { + protected String orderByClause; + + protected boolean distinct; + + protected List oredCriteria; + + public RoleResourceDTOExample() { + oredCriteria = new ArrayList(); + } + + public void setOrderByClause(String orderByClause) { + this.orderByClause = orderByClause; + } + + public String getOrderByClause() { + return orderByClause; + } + + public void setDistinct(boolean distinct) { + this.distinct = distinct; + } + + public boolean isDistinct() { + return distinct; + } + + public List getOredCriteria() { + return oredCriteria; + } + + public void or(Criteria criteria) { + oredCriteria.add(criteria); + } + + public Criteria or() { + Criteria criteria = createCriteriaInternal(); + oredCriteria.add(criteria); + return criteria; + } + + public Criteria createCriteria() { + Criteria criteria = createCriteriaInternal(); + if (oredCriteria.size() == 0) { + oredCriteria.add(criteria); + } + return criteria; + } + + protected Criteria createCriteriaInternal() { + Criteria criteria = new Criteria(); + return criteria; + } + + public void clear() { + oredCriteria.clear(); + orderByClause = null; + distinct = false; + } + + protected abstract static class GeneratedCriteria { + protected List criteria; + + protected GeneratedCriteria() { + super(); + criteria = new ArrayList(); + } + + public boolean isValid() { + return criteria.size() > 0; + } + + public List getAllCriteria() { + return criteria; + } + + public List getCriteria() { + return criteria; + } + + protected void addCriterion(String condition) { + if (condition == null) { + throw new RuntimeException("Value for condition cannot be null"); + } + criteria.add(new Criterion(condition)); + } + + protected void addCriterion(String condition, Object value, String property) { + if (value == null) { + throw new RuntimeException("Value for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value)); + } + + protected void addCriterion(String condition, Object value1, Object value2, String property) { + if (value1 == null || value2 == null) { + throw new RuntimeException("Between values for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value1, value2)); + } + + public Criteria andIdIsNull() { + addCriterion("ID is null"); + return (Criteria) this; + } + + public Criteria andIdIsNotNull() { + addCriterion("ID is not null"); + return (Criteria) this; + } + + public Criteria andIdEqualTo(String value) { + addCriterion("ID =", value, "id"); + return (Criteria) this; + } + + public Criteria andIdNotEqualTo(String value) { + addCriterion("ID <>", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThan(String value) { + addCriterion("ID >", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThanOrEqualTo(String value) { + addCriterion("ID >=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThan(String value) { + addCriterion("ID <", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThanOrEqualTo(String value) { + addCriterion("ID <=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLike(String value) { + addCriterion("ID like", value, "id"); + return (Criteria) this; + } + + public Criteria andIdNotLike(String value) { + addCriterion("ID not like", value, "id"); + return (Criteria) this; + } + + public Criteria andIdIn(List values) { + addCriterion("ID in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdNotIn(List values) { + addCriterion("ID not in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdBetween(String value1, String value2) { + addCriterion("ID between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andIdNotBetween(String value1, String value2) { + addCriterion("ID not between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andCreateTimeIsNull() { + addCriterion("CREATE_TIME is null"); + return (Criteria) this; + } + + public Criteria andCreateTimeIsNotNull() { + addCriterion("CREATE_TIME is not null"); + return (Criteria) this; + } + + public Criteria andCreateTimeEqualTo(Long value) { + addCriterion("CREATE_TIME =", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeNotEqualTo(Long value) { + addCriterion("CREATE_TIME <>", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeGreaterThan(Long value) { + addCriterion("CREATE_TIME >", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeGreaterThanOrEqualTo(Long value) { + addCriterion("CREATE_TIME >=", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeLessThan(Long value) { + addCriterion("CREATE_TIME <", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeLessThanOrEqualTo(Long value) { + addCriterion("CREATE_TIME <=", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeIn(List values) { + addCriterion("CREATE_TIME in", values, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeNotIn(List values) { + addCriterion("CREATE_TIME not in", values, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeBetween(Long value1, Long value2) { + addCriterion("CREATE_TIME between", value1, value2, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeNotBetween(Long value1, Long value2) { + addCriterion("CREATE_TIME not between", value1, value2, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateUserIdIsNull() { + addCriterion("CREATE_USER_ID is null"); + return (Criteria) this; + } + + public Criteria andCreateUserIdIsNotNull() { + addCriterion("CREATE_USER_ID is not null"); + return (Criteria) this; + } + + public Criteria andCreateUserIdEqualTo(String value) { + addCriterion("CREATE_USER_ID =", value, "createUserId"); + return (Criteria) this; + } + + public Criteria andCreateUserIdNotEqualTo(String value) { + addCriterion("CREATE_USER_ID <>", value, "createUserId"); + return (Criteria) this; + } + + public Criteria andCreateUserIdGreaterThan(String value) { + addCriterion("CREATE_USER_ID >", value, "createUserId"); + return (Criteria) this; + } + + public Criteria andCreateUserIdGreaterThanOrEqualTo(String value) { + addCriterion("CREATE_USER_ID >=", value, "createUserId"); + return (Criteria) this; + } + + public Criteria andCreateUserIdLessThan(String value) { + addCriterion("CREATE_USER_ID <", value, "createUserId"); + return (Criteria) this; + } + + public Criteria andCreateUserIdLessThanOrEqualTo(String value) { + addCriterion("CREATE_USER_ID <=", value, "createUserId"); + return (Criteria) this; + } + + public Criteria andCreateUserIdLike(String value) { + addCriterion("CREATE_USER_ID like", value, "createUserId"); + return (Criteria) this; + } + + public Criteria andCreateUserIdNotLike(String value) { + addCriterion("CREATE_USER_ID not like", value, "createUserId"); + return (Criteria) this; + } + + public Criteria andCreateUserIdIn(List values) { + addCriterion("CREATE_USER_ID in", values, "createUserId"); + return (Criteria) this; + } + + public Criteria andCreateUserIdNotIn(List values) { + addCriterion("CREATE_USER_ID not in", values, "createUserId"); + return (Criteria) this; + } + + public Criteria andCreateUserIdBetween(String value1, String value2) { + addCriterion("CREATE_USER_ID between", value1, value2, "createUserId"); + return (Criteria) this; + } + + public Criteria andCreateUserIdNotBetween(String value1, String value2) { + addCriterion("CREATE_USER_ID not between", value1, value2, "createUserId"); + return (Criteria) this; + } + + public Criteria andLastUpdateTimeIsNull() { + addCriterion("LAST_UPDATE_TIME is null"); + return (Criteria) this; + } + + public Criteria andLastUpdateTimeIsNotNull() { + addCriterion("LAST_UPDATE_TIME is not null"); + return (Criteria) this; + } + + public Criteria andLastUpdateTimeEqualTo(Long value) { + addCriterion("LAST_UPDATE_TIME =", value, "lastUpdateTime"); + return (Criteria) this; + } + + public Criteria andLastUpdateTimeNotEqualTo(Long value) { + addCriterion("LAST_UPDATE_TIME <>", value, "lastUpdateTime"); + return (Criteria) this; + } + + public Criteria andLastUpdateTimeGreaterThan(Long value) { + addCriterion("LAST_UPDATE_TIME >", value, "lastUpdateTime"); + return (Criteria) this; + } + + public Criteria andLastUpdateTimeGreaterThanOrEqualTo(Long value) { + addCriterion("LAST_UPDATE_TIME >=", value, "lastUpdateTime"); + return (Criteria) this; + } + + public Criteria andLastUpdateTimeLessThan(Long value) { + addCriterion("LAST_UPDATE_TIME <", value, "lastUpdateTime"); + return (Criteria) this; + } + + public Criteria andLastUpdateTimeLessThanOrEqualTo(Long value) { + addCriterion("LAST_UPDATE_TIME <=", value, "lastUpdateTime"); + return (Criteria) this; + } + + public Criteria andLastUpdateTimeIn(List values) { + addCriterion("LAST_UPDATE_TIME in", values, "lastUpdateTime"); + return (Criteria) this; + } + + public Criteria andLastUpdateTimeNotIn(List values) { + addCriterion("LAST_UPDATE_TIME not in", values, "lastUpdateTime"); + return (Criteria) this; + } + + public Criteria andLastUpdateTimeBetween(Long value1, Long value2) { + addCriterion("LAST_UPDATE_TIME between", value1, value2, "lastUpdateTime"); + return (Criteria) this; + } + + public Criteria andLastUpdateTimeNotBetween(Long value1, Long value2) { + addCriterion("LAST_UPDATE_TIME not between", value1, value2, "lastUpdateTime"); + return (Criteria) this; + } + + public Criteria andLastUpdateUserIdIsNull() { + addCriterion("LAST_UPDATE_USER_ID is null"); + return (Criteria) this; + } + + public Criteria andLastUpdateUserIdIsNotNull() { + addCriterion("LAST_UPDATE_USER_ID is not null"); + return (Criteria) this; + } + + public Criteria andLastUpdateUserIdEqualTo(String value) { + addCriterion("LAST_UPDATE_USER_ID =", value, "lastUpdateUserId"); + return (Criteria) this; + } + + public Criteria andLastUpdateUserIdNotEqualTo(String value) { + addCriterion("LAST_UPDATE_USER_ID <>", value, "lastUpdateUserId"); + return (Criteria) this; + } + + public Criteria andLastUpdateUserIdGreaterThan(String value) { + addCriterion("LAST_UPDATE_USER_ID >", value, "lastUpdateUserId"); + return (Criteria) this; + } + + public Criteria andLastUpdateUserIdGreaterThanOrEqualTo(String value) { + addCriterion("LAST_UPDATE_USER_ID >=", value, "lastUpdateUserId"); + return (Criteria) this; + } + + public Criteria andLastUpdateUserIdLessThan(String value) { + addCriterion("LAST_UPDATE_USER_ID <", value, "lastUpdateUserId"); + return (Criteria) this; + } + + public Criteria andLastUpdateUserIdLessThanOrEqualTo(String value) { + addCriterion("LAST_UPDATE_USER_ID <=", value, "lastUpdateUserId"); + return (Criteria) this; + } + + public Criteria andLastUpdateUserIdLike(String value) { + addCriterion("LAST_UPDATE_USER_ID like", value, "lastUpdateUserId"); + return (Criteria) this; + } + + public Criteria andLastUpdateUserIdNotLike(String value) { + addCriterion("LAST_UPDATE_USER_ID not like", value, "lastUpdateUserId"); + return (Criteria) this; + } + + public Criteria andLastUpdateUserIdIn(List values) { + addCriterion("LAST_UPDATE_USER_ID in", values, "lastUpdateUserId"); + return (Criteria) this; + } + + public Criteria andLastUpdateUserIdNotIn(List values) { + addCriterion("LAST_UPDATE_USER_ID not in", values, "lastUpdateUserId"); + return (Criteria) this; + } + + public Criteria andLastUpdateUserIdBetween(String value1, String value2) { + addCriterion("LAST_UPDATE_USER_ID between", value1, value2, "lastUpdateUserId"); + return (Criteria) this; + } + + public Criteria andLastUpdateUserIdNotBetween(String value1, String value2) { + addCriterion("LAST_UPDATE_USER_ID not between", value1, value2, "lastUpdateUserId"); + return (Criteria) this; + } + + public Criteria andApplicationIdIsNull() { + addCriterion("APPLICATION_ID is null"); + return (Criteria) this; + } + + public Criteria andApplicationIdIsNotNull() { + addCriterion("APPLICATION_ID is not null"); + return (Criteria) this; + } + + public Criteria andApplicationIdEqualTo(String value) { + addCriterion("APPLICATION_ID =", value, "applicationId"); + return (Criteria) this; + } + + public Criteria andApplicationIdNotEqualTo(String value) { + addCriterion("APPLICATION_ID <>", value, "applicationId"); + return (Criteria) this; + } + + public Criteria andApplicationIdGreaterThan(String value) { + addCriterion("APPLICATION_ID >", value, "applicationId"); + return (Criteria) this; + } + + public Criteria andApplicationIdGreaterThanOrEqualTo(String value) { + addCriterion("APPLICATION_ID >=", value, "applicationId"); + return (Criteria) this; + } + + public Criteria andApplicationIdLessThan(String value) { + addCriterion("APPLICATION_ID <", value, "applicationId"); + return (Criteria) this; + } + + public Criteria andApplicationIdLessThanOrEqualTo(String value) { + addCriterion("APPLICATION_ID <=", value, "applicationId"); + return (Criteria) this; + } + + public Criteria andApplicationIdLike(String value) { + addCriterion("APPLICATION_ID like", value, "applicationId"); + return (Criteria) this; + } + + public Criteria andApplicationIdNotLike(String value) { + addCriterion("APPLICATION_ID not like", value, "applicationId"); + return (Criteria) this; + } + + public Criteria andApplicationIdIn(List values) { + addCriterion("APPLICATION_ID in", values, "applicationId"); + return (Criteria) this; + } + + public Criteria andApplicationIdNotIn(List values) { + addCriterion("APPLICATION_ID not in", values, "applicationId"); + return (Criteria) this; + } + + public Criteria andApplicationIdBetween(String value1, String value2) { + addCriterion("APPLICATION_ID between", value1, value2, "applicationId"); + return (Criteria) this; + } + + public Criteria andApplicationIdNotBetween(String value1, String value2) { + addCriterion("APPLICATION_ID not between", value1, value2, "applicationId"); + return (Criteria) this; + } + + public Criteria andRoleIdIsNull() { + addCriterion("ROLE_ID is null"); + return (Criteria) this; + } + + public Criteria andRoleIdIsNotNull() { + addCriterion("ROLE_ID is not null"); + return (Criteria) this; + } + + public Criteria andRoleIdEqualTo(String value) { + addCriterion("ROLE_ID =", value, "roleId"); + return (Criteria) this; + } + + public Criteria andRoleIdNotEqualTo(String value) { + addCriterion("ROLE_ID <>", value, "roleId"); + return (Criteria) this; + } + + public Criteria andRoleIdGreaterThan(String value) { + addCriterion("ROLE_ID >", value, "roleId"); + return (Criteria) this; + } + + public Criteria andRoleIdGreaterThanOrEqualTo(String value) { + addCriterion("ROLE_ID >=", value, "roleId"); + return (Criteria) this; + } + + public Criteria andRoleIdLessThan(String value) { + addCriterion("ROLE_ID <", value, "roleId"); + return (Criteria) this; + } + + public Criteria andRoleIdLessThanOrEqualTo(String value) { + addCriterion("ROLE_ID <=", value, "roleId"); + return (Criteria) this; + } + + public Criteria andRoleIdLike(String value) { + addCriterion("ROLE_ID like", value, "roleId"); + return (Criteria) this; + } + + public Criteria andRoleIdNotLike(String value) { + addCriterion("ROLE_ID not like", value, "roleId"); + return (Criteria) this; + } + + public Criteria andRoleIdIn(List values) { + addCriterion("ROLE_ID in", values, "roleId"); + return (Criteria) this; + } + + public Criteria andRoleIdNotIn(List values) { + addCriterion("ROLE_ID not in", values, "roleId"); + return (Criteria) this; + } + + public Criteria andRoleIdBetween(String value1, String value2) { + addCriterion("ROLE_ID between", value1, value2, "roleId"); + return (Criteria) this; + } + + public Criteria andRoleIdNotBetween(String value1, String value2) { + addCriterion("ROLE_ID not between", value1, value2, "roleId"); + return (Criteria) this; + } + + public Criteria andResourceIdIsNull() { + addCriterion("RESOURCE_ID is null"); + return (Criteria) this; + } + + public Criteria andResourceIdIsNotNull() { + addCriterion("RESOURCE_ID is not null"); + return (Criteria) this; + } + + public Criteria andResourceIdEqualTo(String value) { + addCriterion("RESOURCE_ID =", value, "resourceId"); + return (Criteria) this; + } + + public Criteria andResourceIdNotEqualTo(String value) { + addCriterion("RESOURCE_ID <>", value, "resourceId"); + return (Criteria) this; + } + + public Criteria andResourceIdGreaterThan(String value) { + addCriterion("RESOURCE_ID >", value, "resourceId"); + return (Criteria) this; + } + + public Criteria andResourceIdGreaterThanOrEqualTo(String value) { + addCriterion("RESOURCE_ID >=", value, "resourceId"); + return (Criteria) this; + } + + public Criteria andResourceIdLessThan(String value) { + addCriterion("RESOURCE_ID <", value, "resourceId"); + return (Criteria) this; + } + + public Criteria andResourceIdLessThanOrEqualTo(String value) { + addCriterion("RESOURCE_ID <=", value, "resourceId"); + return (Criteria) this; + } + + public Criteria andResourceIdLike(String value) { + addCriterion("RESOURCE_ID like", value, "resourceId"); + return (Criteria) this; + } + + public Criteria andResourceIdNotLike(String value) { + addCriterion("RESOURCE_ID not like", value, "resourceId"); + return (Criteria) this; + } + + public Criteria andResourceIdIn(List values) { + addCriterion("RESOURCE_ID in", values, "resourceId"); + return (Criteria) this; + } + + public Criteria andResourceIdNotIn(List values) { + addCriterion("RESOURCE_ID not in", values, "resourceId"); + return (Criteria) this; + } + + public Criteria andResourceIdBetween(String value1, String value2) { + addCriterion("RESOURCE_ID between", value1, value2, "resourceId"); + return (Criteria) this; + } + + public Criteria andResourceIdNotBetween(String value1, String value2) { + addCriterion("RESOURCE_ID not between", value1, value2, "resourceId"); + return (Criteria) this; + } + + public Criteria andStatusIsNull() { + addCriterion("STATUS is null"); + return (Criteria) this; + } + + public Criteria andStatusIsNotNull() { + addCriterion("STATUS is not null"); + return (Criteria) this; + } + + public Criteria andStatusEqualTo(Short value) { + addCriterion("STATUS =", value, "status"); + return (Criteria) this; + } + + public Criteria andStatusNotEqualTo(Short value) { + addCriterion("STATUS <>", value, "status"); + return (Criteria) this; + } + + public Criteria andStatusGreaterThan(Short value) { + addCriterion("STATUS >", value, "status"); + return (Criteria) this; + } + + public Criteria andStatusGreaterThanOrEqualTo(Short value) { + addCriterion("STATUS >=", value, "status"); + return (Criteria) this; + } + + public Criteria andStatusLessThan(Short value) { + addCriterion("STATUS <", value, "status"); + return (Criteria) this; + } + + public Criteria andStatusLessThanOrEqualTo(Short value) { + addCriterion("STATUS <=", value, "status"); + return (Criteria) this; + } + + public Criteria andStatusIn(List values) { + addCriterion("STATUS in", values, "status"); + return (Criteria) this; + } + + public Criteria andStatusNotIn(List values) { + addCriterion("STATUS not in", values, "status"); + return (Criteria) this; + } + + public Criteria andStatusBetween(Short value1, Short value2) { + addCriterion("STATUS between", value1, value2, "status"); + return (Criteria) this; + } + + public Criteria andStatusNotBetween(Short value1, Short value2) { + addCriterion("STATUS not between", value1, value2, "status"); + return (Criteria) this; + } + + public Criteria andTypeIsNull() { + addCriterion("TYPE is null"); + return (Criteria) this; + } + + public Criteria andTypeIsNotNull() { + addCriterion("TYPE is not null"); + return (Criteria) this; + } + + public Criteria andTypeEqualTo(Short value) { + addCriterion("TYPE =", value, "type"); + return (Criteria) this; + } + + public Criteria andTypeNotEqualTo(Short value) { + addCriterion("TYPE <>", value, "type"); + return (Criteria) this; + } + + public Criteria andTypeGreaterThan(Short value) { + addCriterion("TYPE >", value, "type"); + return (Criteria) this; + } + + public Criteria andTypeGreaterThanOrEqualTo(Short value) { + addCriterion("TYPE >=", value, "type"); + return (Criteria) this; + } + + public Criteria andTypeLessThan(Short value) { + addCriterion("TYPE <", value, "type"); + return (Criteria) this; + } + + public Criteria andTypeLessThanOrEqualTo(Short value) { + addCriterion("TYPE <=", value, "type"); + return (Criteria) this; + } + + public Criteria andTypeIn(List values) { + addCriterion("TYPE in", values, "type"); + return (Criteria) this; + } + + public Criteria andTypeNotIn(List values) { + addCriterion("TYPE not in", values, "type"); + return (Criteria) this; + } + + public Criteria andTypeBetween(Short value1, Short value2) { + addCriterion("TYPE between", value1, value2, "type"); + return (Criteria) this; + } + + public Criteria andTypeNotBetween(Short value1, Short value2) { + addCriterion("TYPE not between", value1, value2, "type"); + return (Criteria) this; + } + } + + public static class Criteria extends GeneratedCriteria { + + protected Criteria() { + super(); + } + } + + public static class Criterion { + private String condition; + + private Object value; + + private Object secondValue; + + private boolean noValue; + + private boolean singleValue; + + private boolean betweenValue; + + private boolean listValue; + + private String typeHandler; + + public String getCondition() { + return condition; + } + + public Object getValue() { + return value; + } + + public Object getSecondValue() { + return secondValue; + } + + public boolean isNoValue() { + return noValue; + } + + public boolean isSingleValue() { + return singleValue; + } + + public boolean isBetweenValue() { + return betweenValue; + } + + public boolean isListValue() { + return listValue; + } + + public String getTypeHandler() { + return typeHandler; + } + + protected Criterion(String condition) { + super(); + this.condition = condition; + this.typeHandler = null; + this.noValue = true; + } + + protected Criterion(String condition, Object value, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.typeHandler = typeHandler; + if (value instanceof List) { + this.listValue = true; + } else { + this.singleValue = true; + } + } + + protected Criterion(String condition, Object value) { + this(condition, value, null); + } + + protected Criterion(String condition, Object value, Object secondValue, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.secondValue = secondValue; + this.typeHandler = typeHandler; + this.betweenValue = true; + } + + protected Criterion(String condition, Object value, Object secondValue) { + this(condition, value, secondValue, null); + } + } +} \ No newline at end of file diff --git a/itools-core/itools-model/src/main/java/com/itools/core/rbac/dto/UserAccountDTO.java b/itools-core/itools-model/src/main/java/com/itools/core/rbac/dto/UserAccountDTO.java new file mode 100644 index 0000000000000000000000000000000000000000..a2b9b04db1d2e4261a2b31d97f59ee594a7ab8c2 --- /dev/null +++ b/itools-core/itools-model/src/main/java/com/itools/core/rbac/dto/UserAccountDTO.java @@ -0,0 +1,173 @@ +package com.itools.core.rbac.dto; + +public class UserAccountDTO { + private String id; + + private Long accountExpired; + + private Short accountLocked; + + private Long createTime; + + private String credential; + + private Long credentialExpired; + + private String identifier; + + private Short identityType; + + private String lastLoginIp; + + private String lastLoginTime; + + private Long lastUpdateTime; + + private Short loginMode; + + private Short status; + + private String userId; + + private Long credentialUpdateTime; + + private Long firstPwdErrorTime; + + private Short loginPwdErrorTime; + + public String getId() { + return id; + } + + public void setId(String id) { + this.id = id; + } + + public Long getAccountExpired() { + return accountExpired; + } + + public void setAccountExpired(Long accountExpired) { + this.accountExpired = accountExpired; + } + + public Short getAccountLocked() { + return accountLocked; + } + + public void setAccountLocked(Short accountLocked) { + this.accountLocked = accountLocked; + } + + public Long getCreateTime() { + return createTime; + } + + public void setCreateTime(Long createTime) { + this.createTime = createTime; + } + + public String getCredential() { + return credential; + } + + public void setCredential(String credential) { + this.credential = credential; + } + + public Long getCredentialExpired() { + return credentialExpired; + } + + public void setCredentialExpired(Long credentialExpired) { + this.credentialExpired = credentialExpired; + } + + public String getIdentifier() { + return identifier; + } + + public void setIdentifier(String identifier) { + this.identifier = identifier; + } + + public Short getIdentityType() { + return identityType; + } + + public void setIdentityType(Short identityType) { + this.identityType = identityType; + } + + public String getLastLoginIp() { + return lastLoginIp; + } + + public void setLastLoginIp(String lastLoginIp) { + this.lastLoginIp = lastLoginIp; + } + + public String getLastLoginTime() { + return lastLoginTime; + } + + public void setLastLoginTime(String lastLoginTime) { + this.lastLoginTime = lastLoginTime; + } + + public Long getLastUpdateTime() { + return lastUpdateTime; + } + + public void setLastUpdateTime(Long lastUpdateTime) { + this.lastUpdateTime = lastUpdateTime; + } + + public Short getLoginMode() { + return loginMode; + } + + public void setLoginMode(Short loginMode) { + this.loginMode = loginMode; + } + + public Short getStatus() { + return status; + } + + public void setStatus(Short status) { + this.status = status; + } + + public String getUserId() { + return userId; + } + + public void setUserId(String userId) { + this.userId = userId; + } + + public Long getCredentialUpdateTime() { + return credentialUpdateTime; + } + + public void setCredentialUpdateTime(Long credentialUpdateTime) { + this.credentialUpdateTime = credentialUpdateTime; + } + + public Long getFirstPwdErrorTime() { + return firstPwdErrorTime; + } + + public void setFirstPwdErrorTime(Long firstPwdErrorTime) { + this.firstPwdErrorTime = firstPwdErrorTime; + } + + public Short getLoginPwdErrorTime() { + return loginPwdErrorTime; + } + + public void setLoginPwdErrorTime(Short loginPwdErrorTime) { + this.loginPwdErrorTime = loginPwdErrorTime; + } +} \ No newline at end of file diff --git a/itools-core/itools-model/src/main/java/com/itools/core/rbac/dto/UserAccountDTOExample.java b/itools-core/itools-model/src/main/java/com/itools/core/rbac/dto/UserAccountDTOExample.java new file mode 100644 index 0000000000000000000000000000000000000000..71ac5814aeadf02d30c400e26b45905ec8b15ef6 --- /dev/null +++ b/itools-core/itools-model/src/main/java/com/itools/core/rbac/dto/UserAccountDTOExample.java @@ -0,0 +1,1280 @@ +package com.itools.core.rbac.dto; + +import java.util.ArrayList; +import java.util.List; + +public class UserAccountDTOExample { + protected String orderByClause; + + protected boolean distinct; + + protected List oredCriteria; + + public UserAccountDTOExample() { + oredCriteria = new ArrayList(); + } + + public void setOrderByClause(String orderByClause) { + this.orderByClause = orderByClause; + } + + public String getOrderByClause() { + return orderByClause; + } + + public void setDistinct(boolean distinct) { + this.distinct = distinct; + } + + public boolean isDistinct() { + return distinct; + } + + public List getOredCriteria() { + return oredCriteria; + } + + public void or(Criteria criteria) { + oredCriteria.add(criteria); + } + + public Criteria or() { + Criteria criteria = createCriteriaInternal(); + oredCriteria.add(criteria); + return criteria; + } + + public Criteria createCriteria() { + Criteria criteria = createCriteriaInternal(); + if (oredCriteria.size() == 0) { + oredCriteria.add(criteria); + } + return criteria; + } + + protected Criteria createCriteriaInternal() { + Criteria criteria = new Criteria(); + return criteria; + } + + public void clear() { + oredCriteria.clear(); + orderByClause = null; + distinct = false; + } + + protected abstract static class GeneratedCriteria { + protected List criteria; + + protected GeneratedCriteria() { + super(); + criteria = new ArrayList(); + } + + public boolean isValid() { + return criteria.size() > 0; + } + + public List getAllCriteria() { + return criteria; + } + + public List getCriteria() { + return criteria; + } + + protected void addCriterion(String condition) { + if (condition == null) { + throw new RuntimeException("Value for condition cannot be null"); + } + criteria.add(new Criterion(condition)); + } + + protected void addCriterion(String condition, Object value, String property) { + if (value == null) { + throw new RuntimeException("Value for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value)); + } + + protected void addCriterion(String condition, Object value1, Object value2, String property) { + if (value1 == null || value2 == null) { + throw new RuntimeException("Between values for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value1, value2)); + } + + public Criteria andIdIsNull() { + addCriterion("ID is null"); + return (Criteria) this; + } + + public Criteria andIdIsNotNull() { + addCriterion("ID is not null"); + return (Criteria) this; + } + + public Criteria andIdEqualTo(String value) { + addCriterion("ID =", value, "id"); + return (Criteria) this; + } + + public Criteria andIdNotEqualTo(String value) { + addCriterion("ID <>", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThan(String value) { + addCriterion("ID >", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThanOrEqualTo(String value) { + addCriterion("ID >=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThan(String value) { + addCriterion("ID <", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThanOrEqualTo(String value) { + addCriterion("ID <=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLike(String value) { + addCriterion("ID like", value, "id"); + return (Criteria) this; + } + + public Criteria andIdNotLike(String value) { + addCriterion("ID not like", value, "id"); + return (Criteria) this; + } + + public Criteria andIdIn(List values) { + addCriterion("ID in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdNotIn(List values) { + addCriterion("ID not in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdBetween(String value1, String value2) { + addCriterion("ID between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andIdNotBetween(String value1, String value2) { + addCriterion("ID not between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andAccountExpiredIsNull() { + addCriterion("ACCOUNT_EXPIRED is null"); + return (Criteria) this; + } + + public Criteria andAccountExpiredIsNotNull() { + addCriterion("ACCOUNT_EXPIRED is not null"); + return (Criteria) this; + } + + public Criteria andAccountExpiredEqualTo(Long value) { + addCriterion("ACCOUNT_EXPIRED =", value, "accountExpired"); + return (Criteria) this; + } + + public Criteria andAccountExpiredNotEqualTo(Long value) { + addCriterion("ACCOUNT_EXPIRED <>", value, "accountExpired"); + return (Criteria) this; + } + + public Criteria andAccountExpiredGreaterThan(Long value) { + addCriterion("ACCOUNT_EXPIRED >", value, "accountExpired"); + return (Criteria) this; + } + + public Criteria andAccountExpiredGreaterThanOrEqualTo(Long value) { + addCriterion("ACCOUNT_EXPIRED >=", value, "accountExpired"); + return (Criteria) this; + } + + public Criteria andAccountExpiredLessThan(Long value) { + addCriterion("ACCOUNT_EXPIRED <", value, "accountExpired"); + return (Criteria) this; + } + + public Criteria andAccountExpiredLessThanOrEqualTo(Long value) { + addCriterion("ACCOUNT_EXPIRED <=", value, "accountExpired"); + return (Criteria) this; + } + + public Criteria andAccountExpiredIn(List values) { + addCriterion("ACCOUNT_EXPIRED in", values, "accountExpired"); + return (Criteria) this; + } + + public Criteria andAccountExpiredNotIn(List values) { + addCriterion("ACCOUNT_EXPIRED not in", values, "accountExpired"); + return (Criteria) this; + } + + public Criteria andAccountExpiredBetween(Long value1, Long value2) { + addCriterion("ACCOUNT_EXPIRED between", value1, value2, "accountExpired"); + return (Criteria) this; + } + + public Criteria andAccountExpiredNotBetween(Long value1, Long value2) { + addCriterion("ACCOUNT_EXPIRED not between", value1, value2, "accountExpired"); + return (Criteria) this; + } + + public Criteria andAccountLockedIsNull() { + addCriterion("ACCOUNT_LOCKED is null"); + return (Criteria) this; + } + + public Criteria andAccountLockedIsNotNull() { + addCriterion("ACCOUNT_LOCKED is not null"); + return (Criteria) this; + } + + public Criteria andAccountLockedEqualTo(Short value) { + addCriterion("ACCOUNT_LOCKED =", value, "accountLocked"); + return (Criteria) this; + } + + public Criteria andAccountLockedNotEqualTo(Short value) { + addCriterion("ACCOUNT_LOCKED <>", value, "accountLocked"); + return (Criteria) this; + } + + public Criteria andAccountLockedGreaterThan(Short value) { + addCriterion("ACCOUNT_LOCKED >", value, "accountLocked"); + return (Criteria) this; + } + + public Criteria andAccountLockedGreaterThanOrEqualTo(Short value) { + addCriterion("ACCOUNT_LOCKED >=", value, "accountLocked"); + return (Criteria) this; + } + + public Criteria andAccountLockedLessThan(Short value) { + addCriterion("ACCOUNT_LOCKED <", value, "accountLocked"); + return (Criteria) this; + } + + public Criteria andAccountLockedLessThanOrEqualTo(Short value) { + addCriterion("ACCOUNT_LOCKED <=", value, "accountLocked"); + return (Criteria) this; + } + + public Criteria andAccountLockedIn(List values) { + addCriterion("ACCOUNT_LOCKED in", values, "accountLocked"); + return (Criteria) this; + } + + public Criteria andAccountLockedNotIn(List values) { + addCriterion("ACCOUNT_LOCKED not in", values, "accountLocked"); + return (Criteria) this; + } + + public Criteria andAccountLockedBetween(Short value1, Short value2) { + addCriterion("ACCOUNT_LOCKED between", value1, value2, "accountLocked"); + return (Criteria) this; + } + + public Criteria andAccountLockedNotBetween(Short value1, Short value2) { + addCriterion("ACCOUNT_LOCKED not between", value1, value2, "accountLocked"); + return (Criteria) this; + } + + public Criteria andCreateTimeIsNull() { + addCriterion("CREATE_TIME is null"); + return (Criteria) this; + } + + public Criteria andCreateTimeIsNotNull() { + addCriterion("CREATE_TIME is not null"); + return (Criteria) this; + } + + public Criteria andCreateTimeEqualTo(Long value) { + addCriterion("CREATE_TIME =", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeNotEqualTo(Long value) { + addCriterion("CREATE_TIME <>", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeGreaterThan(Long value) { + addCriterion("CREATE_TIME >", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeGreaterThanOrEqualTo(Long value) { + addCriterion("CREATE_TIME >=", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeLessThan(Long value) { + addCriterion("CREATE_TIME <", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeLessThanOrEqualTo(Long value) { + addCriterion("CREATE_TIME <=", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeIn(List values) { + addCriterion("CREATE_TIME in", values, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeNotIn(List values) { + addCriterion("CREATE_TIME not in", values, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeBetween(Long value1, Long value2) { + addCriterion("CREATE_TIME between", value1, value2, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeNotBetween(Long value1, Long value2) { + addCriterion("CREATE_TIME not between", value1, value2, "createTime"); + return (Criteria) this; + } + + public Criteria andCredentialIsNull() { + addCriterion("CREDENTIAL is null"); + return (Criteria) this; + } + + public Criteria andCredentialIsNotNull() { + addCriterion("CREDENTIAL is not null"); + return (Criteria) this; + } + + public Criteria andCredentialEqualTo(String value) { + addCriterion("CREDENTIAL =", value, "credential"); + return (Criteria) this; + } + + public Criteria andCredentialNotEqualTo(String value) { + addCriterion("CREDENTIAL <>", value, "credential"); + return (Criteria) this; + } + + public Criteria andCredentialGreaterThan(String value) { + addCriterion("CREDENTIAL >", value, "credential"); + return (Criteria) this; + } + + public Criteria andCredentialGreaterThanOrEqualTo(String value) { + addCriterion("CREDENTIAL >=", value, "credential"); + return (Criteria) this; + } + + public Criteria andCredentialLessThan(String value) { + addCriterion("CREDENTIAL <", value, "credential"); + return (Criteria) this; + } + + public Criteria andCredentialLessThanOrEqualTo(String value) { + addCriterion("CREDENTIAL <=", value, "credential"); + return (Criteria) this; + } + + public Criteria andCredentialLike(String value) { + addCriterion("CREDENTIAL like", value, "credential"); + return (Criteria) this; + } + + public Criteria andCredentialNotLike(String value) { + addCriterion("CREDENTIAL not like", value, "credential"); + return (Criteria) this; + } + + public Criteria andCredentialIn(List values) { + addCriterion("CREDENTIAL in", values, "credential"); + return (Criteria) this; + } + + public Criteria andCredentialNotIn(List values) { + addCriterion("CREDENTIAL not in", values, "credential"); + return (Criteria) this; + } + + public Criteria andCredentialBetween(String value1, String value2) { + addCriterion("CREDENTIAL between", value1, value2, "credential"); + return (Criteria) this; + } + + public Criteria andCredentialNotBetween(String value1, String value2) { + addCriterion("CREDENTIAL not between", value1, value2, "credential"); + return (Criteria) this; + } + + public Criteria andCredentialExpiredIsNull() { + addCriterion("CREDENTIAL_EXPIRED is null"); + return (Criteria) this; + } + + public Criteria andCredentialExpiredIsNotNull() { + addCriterion("CREDENTIAL_EXPIRED is not null"); + return (Criteria) this; + } + + public Criteria andCredentialExpiredEqualTo(Long value) { + addCriterion("CREDENTIAL_EXPIRED =", value, "credentialExpired"); + return (Criteria) this; + } + + public Criteria andCredentialExpiredNotEqualTo(Long value) { + addCriterion("CREDENTIAL_EXPIRED <>", value, "credentialExpired"); + return (Criteria) this; + } + + public Criteria andCredentialExpiredGreaterThan(Long value) { + addCriterion("CREDENTIAL_EXPIRED >", value, "credentialExpired"); + return (Criteria) this; + } + + public Criteria andCredentialExpiredGreaterThanOrEqualTo(Long value) { + addCriterion("CREDENTIAL_EXPIRED >=", value, "credentialExpired"); + return (Criteria) this; + } + + public Criteria andCredentialExpiredLessThan(Long value) { + addCriterion("CREDENTIAL_EXPIRED <", value, "credentialExpired"); + return (Criteria) this; + } + + public Criteria andCredentialExpiredLessThanOrEqualTo(Long value) { + addCriterion("CREDENTIAL_EXPIRED <=", value, "credentialExpired"); + return (Criteria) this; + } + + public Criteria andCredentialExpiredIn(List values) { + addCriterion("CREDENTIAL_EXPIRED in", values, "credentialExpired"); + return (Criteria) this; + } + + public Criteria andCredentialExpiredNotIn(List values) { + addCriterion("CREDENTIAL_EXPIRED not in", values, "credentialExpired"); + return (Criteria) this; + } + + public Criteria andCredentialExpiredBetween(Long value1, Long value2) { + addCriterion("CREDENTIAL_EXPIRED between", value1, value2, "credentialExpired"); + return (Criteria) this; + } + + public Criteria andCredentialExpiredNotBetween(Long value1, Long value2) { + addCriterion("CREDENTIAL_EXPIRED not between", value1, value2, "credentialExpired"); + return (Criteria) this; + } + + public Criteria andIdentifierIsNull() { + addCriterion("IDENTIFIER is null"); + return (Criteria) this; + } + + public Criteria andIdentifierIsNotNull() { + addCriterion("IDENTIFIER is not null"); + return (Criteria) this; + } + + public Criteria andIdentifierEqualTo(String value) { + addCriterion("IDENTIFIER =", value, "identifier"); + return (Criteria) this; + } + + public Criteria andIdentifierNotEqualTo(String value) { + addCriterion("IDENTIFIER <>", value, "identifier"); + return (Criteria) this; + } + + public Criteria andIdentifierGreaterThan(String value) { + addCriterion("IDENTIFIER >", value, "identifier"); + return (Criteria) this; + } + + public Criteria andIdentifierGreaterThanOrEqualTo(String value) { + addCriterion("IDENTIFIER >=", value, "identifier"); + return (Criteria) this; + } + + public Criteria andIdentifierLessThan(String value) { + addCriterion("IDENTIFIER <", value, "identifier"); + return (Criteria) this; + } + + public Criteria andIdentifierLessThanOrEqualTo(String value) { + addCriterion("IDENTIFIER <=", value, "identifier"); + return (Criteria) this; + } + + public Criteria andIdentifierLike(String value) { + addCriterion("IDENTIFIER like", value, "identifier"); + return (Criteria) this; + } + + public Criteria andIdentifierNotLike(String value) { + addCriterion("IDENTIFIER not like", value, "identifier"); + return (Criteria) this; + } + + public Criteria andIdentifierIn(List values) { + addCriterion("IDENTIFIER in", values, "identifier"); + return (Criteria) this; + } + + public Criteria andIdentifierNotIn(List values) { + addCriterion("IDENTIFIER not in", values, "identifier"); + return (Criteria) this; + } + + public Criteria andIdentifierBetween(String value1, String value2) { + addCriterion("IDENTIFIER between", value1, value2, "identifier"); + return (Criteria) this; + } + + public Criteria andIdentifierNotBetween(String value1, String value2) { + addCriterion("IDENTIFIER not between", value1, value2, "identifier"); + return (Criteria) this; + } + + public Criteria andIdentityTypeIsNull() { + addCriterion("IDENTITY_TYPE is null"); + return (Criteria) this; + } + + public Criteria andIdentityTypeIsNotNull() { + addCriterion("IDENTITY_TYPE is not null"); + return (Criteria) this; + } + + public Criteria andIdentityTypeEqualTo(Short value) { + addCriterion("IDENTITY_TYPE =", value, "identityType"); + return (Criteria) this; + } + + public Criteria andIdentityTypeNotEqualTo(Short value) { + addCriterion("IDENTITY_TYPE <>", value, "identityType"); + return (Criteria) this; + } + + public Criteria andIdentityTypeGreaterThan(Short value) { + addCriterion("IDENTITY_TYPE >", value, "identityType"); + return (Criteria) this; + } + + public Criteria andIdentityTypeGreaterThanOrEqualTo(Short value) { + addCriterion("IDENTITY_TYPE >=", value, "identityType"); + return (Criteria) this; + } + + public Criteria andIdentityTypeLessThan(Short value) { + addCriterion("IDENTITY_TYPE <", value, "identityType"); + return (Criteria) this; + } + + public Criteria andIdentityTypeLessThanOrEqualTo(Short value) { + addCriterion("IDENTITY_TYPE <=", value, "identityType"); + return (Criteria) this; + } + + public Criteria andIdentityTypeIn(List values) { + addCriterion("IDENTITY_TYPE in", values, "identityType"); + return (Criteria) this; + } + + public Criteria andIdentityTypeNotIn(List values) { + addCriterion("IDENTITY_TYPE not in", values, "identityType"); + return (Criteria) this; + } + + public Criteria andIdentityTypeBetween(Short value1, Short value2) { + addCriterion("IDENTITY_TYPE between", value1, value2, "identityType"); + return (Criteria) this; + } + + public Criteria andIdentityTypeNotBetween(Short value1, Short value2) { + addCriterion("IDENTITY_TYPE not between", value1, value2, "identityType"); + return (Criteria) this; + } + + public Criteria andLastLoginIpIsNull() { + addCriterion("LAST_LOGIN_IP is null"); + return (Criteria) this; + } + + public Criteria andLastLoginIpIsNotNull() { + addCriterion("LAST_LOGIN_IP is not null"); + return (Criteria) this; + } + + public Criteria andLastLoginIpEqualTo(String value) { + addCriterion("LAST_LOGIN_IP =", value, "lastLoginIp"); + return (Criteria) this; + } + + public Criteria andLastLoginIpNotEqualTo(String value) { + addCriterion("LAST_LOGIN_IP <>", value, "lastLoginIp"); + return (Criteria) this; + } + + public Criteria andLastLoginIpGreaterThan(String value) { + addCriterion("LAST_LOGIN_IP >", value, "lastLoginIp"); + return (Criteria) this; + } + + public Criteria andLastLoginIpGreaterThanOrEqualTo(String value) { + addCriterion("LAST_LOGIN_IP >=", value, "lastLoginIp"); + return (Criteria) this; + } + + public Criteria andLastLoginIpLessThan(String value) { + addCriterion("LAST_LOGIN_IP <", value, "lastLoginIp"); + return (Criteria) this; + } + + public Criteria andLastLoginIpLessThanOrEqualTo(String value) { + addCriterion("LAST_LOGIN_IP <=", value, "lastLoginIp"); + return (Criteria) this; + } + + public Criteria andLastLoginIpLike(String value) { + addCriterion("LAST_LOGIN_IP like", value, "lastLoginIp"); + return (Criteria) this; + } + + public Criteria andLastLoginIpNotLike(String value) { + addCriterion("LAST_LOGIN_IP not like", value, "lastLoginIp"); + return (Criteria) this; + } + + public Criteria andLastLoginIpIn(List values) { + addCriterion("LAST_LOGIN_IP in", values, "lastLoginIp"); + return (Criteria) this; + } + + public Criteria andLastLoginIpNotIn(List values) { + addCriterion("LAST_LOGIN_IP not in", values, "lastLoginIp"); + return (Criteria) this; + } + + public Criteria andLastLoginIpBetween(String value1, String value2) { + addCriterion("LAST_LOGIN_IP between", value1, value2, "lastLoginIp"); + return (Criteria) this; + } + + public Criteria andLastLoginIpNotBetween(String value1, String value2) { + addCriterion("LAST_LOGIN_IP not between", value1, value2, "lastLoginIp"); + return (Criteria) this; + } + + public Criteria andLastLoginTimeIsNull() { + addCriterion("LAST_LOGIN_TIME is null"); + return (Criteria) this; + } + + public Criteria andLastLoginTimeIsNotNull() { + addCriterion("LAST_LOGIN_TIME is not null"); + return (Criteria) this; + } + + public Criteria andLastLoginTimeEqualTo(String value) { + addCriterion("LAST_LOGIN_TIME =", value, "lastLoginTime"); + return (Criteria) this; + } + + public Criteria andLastLoginTimeNotEqualTo(String value) { + addCriterion("LAST_LOGIN_TIME <>", value, "lastLoginTime"); + return (Criteria) this; + } + + public Criteria andLastLoginTimeGreaterThan(String value) { + addCriterion("LAST_LOGIN_TIME >", value, "lastLoginTime"); + return (Criteria) this; + } + + public Criteria andLastLoginTimeGreaterThanOrEqualTo(String value) { + addCriterion("LAST_LOGIN_TIME >=", value, "lastLoginTime"); + return (Criteria) this; + } + + public Criteria andLastLoginTimeLessThan(String value) { + addCriterion("LAST_LOGIN_TIME <", value, "lastLoginTime"); + return (Criteria) this; + } + + public Criteria andLastLoginTimeLessThanOrEqualTo(String value) { + addCriterion("LAST_LOGIN_TIME <=", value, "lastLoginTime"); + return (Criteria) this; + } + + public Criteria andLastLoginTimeLike(String value) { + addCriterion("LAST_LOGIN_TIME like", value, "lastLoginTime"); + return (Criteria) this; + } + + public Criteria andLastLoginTimeNotLike(String value) { + addCriterion("LAST_LOGIN_TIME not like", value, "lastLoginTime"); + return (Criteria) this; + } + + public Criteria andLastLoginTimeIn(List values) { + addCriterion("LAST_LOGIN_TIME in", values, "lastLoginTime"); + return (Criteria) this; + } + + public Criteria andLastLoginTimeNotIn(List values) { + addCriterion("LAST_LOGIN_TIME not in", values, "lastLoginTime"); + return (Criteria) this; + } + + public Criteria andLastLoginTimeBetween(String value1, String value2) { + addCriterion("LAST_LOGIN_TIME between", value1, value2, "lastLoginTime"); + return (Criteria) this; + } + + public Criteria andLastLoginTimeNotBetween(String value1, String value2) { + addCriterion("LAST_LOGIN_TIME not between", value1, value2, "lastLoginTime"); + return (Criteria) this; + } + + public Criteria andLastUpdateTimeIsNull() { + addCriterion("LAST_UPDATE_TIME is null"); + return (Criteria) this; + } + + public Criteria andLastUpdateTimeIsNotNull() { + addCriterion("LAST_UPDATE_TIME is not null"); + return (Criteria) this; + } + + public Criteria andLastUpdateTimeEqualTo(Long value) { + addCriterion("LAST_UPDATE_TIME =", value, "lastUpdateTime"); + return (Criteria) this; + } + + public Criteria andLastUpdateTimeNotEqualTo(Long value) { + addCriterion("LAST_UPDATE_TIME <>", value, "lastUpdateTime"); + return (Criteria) this; + } + + public Criteria andLastUpdateTimeGreaterThan(Long value) { + addCriterion("LAST_UPDATE_TIME >", value, "lastUpdateTime"); + return (Criteria) this; + } + + public Criteria andLastUpdateTimeGreaterThanOrEqualTo(Long value) { + addCriterion("LAST_UPDATE_TIME >=", value, "lastUpdateTime"); + return (Criteria) this; + } + + public Criteria andLastUpdateTimeLessThan(Long value) { + addCriterion("LAST_UPDATE_TIME <", value, "lastUpdateTime"); + return (Criteria) this; + } + + public Criteria andLastUpdateTimeLessThanOrEqualTo(Long value) { + addCriterion("LAST_UPDATE_TIME <=", value, "lastUpdateTime"); + return (Criteria) this; + } + + public Criteria andLastUpdateTimeIn(List values) { + addCriterion("LAST_UPDATE_TIME in", values, "lastUpdateTime"); + return (Criteria) this; + } + + public Criteria andLastUpdateTimeNotIn(List values) { + addCriterion("LAST_UPDATE_TIME not in", values, "lastUpdateTime"); + return (Criteria) this; + } + + public Criteria andLastUpdateTimeBetween(Long value1, Long value2) { + addCriterion("LAST_UPDATE_TIME between", value1, value2, "lastUpdateTime"); + return (Criteria) this; + } + + public Criteria andLastUpdateTimeNotBetween(Long value1, Long value2) { + addCriterion("LAST_UPDATE_TIME not between", value1, value2, "lastUpdateTime"); + return (Criteria) this; + } + + public Criteria andLoginModeIsNull() { + addCriterion("LOGIN_MODE is null"); + return (Criteria) this; + } + + public Criteria andLoginModeIsNotNull() { + addCriterion("LOGIN_MODE is not null"); + return (Criteria) this; + } + + public Criteria andLoginModeEqualTo(Short value) { + addCriterion("LOGIN_MODE =", value, "loginMode"); + return (Criteria) this; + } + + public Criteria andLoginModeNotEqualTo(Short value) { + addCriterion("LOGIN_MODE <>", value, "loginMode"); + return (Criteria) this; + } + + public Criteria andLoginModeGreaterThan(Short value) { + addCriterion("LOGIN_MODE >", value, "loginMode"); + return (Criteria) this; + } + + public Criteria andLoginModeGreaterThanOrEqualTo(Short value) { + addCriterion("LOGIN_MODE >=", value, "loginMode"); + return (Criteria) this; + } + + public Criteria andLoginModeLessThan(Short value) { + addCriterion("LOGIN_MODE <", value, "loginMode"); + return (Criteria) this; + } + + public Criteria andLoginModeLessThanOrEqualTo(Short value) { + addCriterion("LOGIN_MODE <=", value, "loginMode"); + return (Criteria) this; + } + + public Criteria andLoginModeIn(List values) { + addCriterion("LOGIN_MODE in", values, "loginMode"); + return (Criteria) this; + } + + public Criteria andLoginModeNotIn(List values) { + addCriterion("LOGIN_MODE not in", values, "loginMode"); + return (Criteria) this; + } + + public Criteria andLoginModeBetween(Short value1, Short value2) { + addCriterion("LOGIN_MODE between", value1, value2, "loginMode"); + return (Criteria) this; + } + + public Criteria andLoginModeNotBetween(Short value1, Short value2) { + addCriterion("LOGIN_MODE not between", value1, value2, "loginMode"); + return (Criteria) this; + } + + public Criteria andStatusIsNull() { + addCriterion("STATUS is null"); + return (Criteria) this; + } + + public Criteria andStatusIsNotNull() { + addCriterion("STATUS is not null"); + return (Criteria) this; + } + + public Criteria andStatusEqualTo(Short value) { + addCriterion("STATUS =", value, "status"); + return (Criteria) this; + } + + public Criteria andStatusNotEqualTo(Short value) { + addCriterion("STATUS <>", value, "status"); + return (Criteria) this; + } + + public Criteria andStatusGreaterThan(Short value) { + addCriterion("STATUS >", value, "status"); + return (Criteria) this; + } + + public Criteria andStatusGreaterThanOrEqualTo(Short value) { + addCriterion("STATUS >=", value, "status"); + return (Criteria) this; + } + + public Criteria andStatusLessThan(Short value) { + addCriterion("STATUS <", value, "status"); + return (Criteria) this; + } + + public Criteria andStatusLessThanOrEqualTo(Short value) { + addCriterion("STATUS <=", value, "status"); + return (Criteria) this; + } + + public Criteria andStatusIn(List values) { + addCriterion("STATUS in", values, "status"); + return (Criteria) this; + } + + public Criteria andStatusNotIn(List values) { + addCriterion("STATUS not in", values, "status"); + return (Criteria) this; + } + + public Criteria andStatusBetween(Short value1, Short value2) { + addCriterion("STATUS between", value1, value2, "status"); + return (Criteria) this; + } + + public Criteria andStatusNotBetween(Short value1, Short value2) { + addCriterion("STATUS not between", value1, value2, "status"); + return (Criteria) this; + } + + public Criteria andUserIdIsNull() { + addCriterion("USER_ID is null"); + return (Criteria) this; + } + + public Criteria andUserIdIsNotNull() { + addCriterion("USER_ID is not null"); + return (Criteria) this; + } + + public Criteria andUserIdEqualTo(String value) { + addCriterion("USER_ID =", value, "userId"); + return (Criteria) this; + } + + public Criteria andUserIdNotEqualTo(String value) { + addCriterion("USER_ID <>", value, "userId"); + return (Criteria) this; + } + + public Criteria andUserIdGreaterThan(String value) { + addCriterion("USER_ID >", value, "userId"); + return (Criteria) this; + } + + public Criteria andUserIdGreaterThanOrEqualTo(String value) { + addCriterion("USER_ID >=", value, "userId"); + return (Criteria) this; + } + + public Criteria andUserIdLessThan(String value) { + addCriterion("USER_ID <", value, "userId"); + return (Criteria) this; + } + + public Criteria andUserIdLessThanOrEqualTo(String value) { + addCriterion("USER_ID <=", value, "userId"); + return (Criteria) this; + } + + public Criteria andUserIdLike(String value) { + addCriterion("USER_ID like", value, "userId"); + return (Criteria) this; + } + + public Criteria andUserIdNotLike(String value) { + addCriterion("USER_ID not like", value, "userId"); + return (Criteria) this; + } + + public Criteria andUserIdIn(List values) { + addCriterion("USER_ID in", values, "userId"); + return (Criteria) this; + } + + public Criteria andUserIdNotIn(List values) { + addCriterion("USER_ID not in", values, "userId"); + return (Criteria) this; + } + + public Criteria andUserIdBetween(String value1, String value2) { + addCriterion("USER_ID between", value1, value2, "userId"); + return (Criteria) this; + } + + public Criteria andUserIdNotBetween(String value1, String value2) { + addCriterion("USER_ID not between", value1, value2, "userId"); + return (Criteria) this; + } + + public Criteria andCredentialUpdateTimeIsNull() { + addCriterion("CREDENTIAL_UPDATE_TIME is null"); + return (Criteria) this; + } + + public Criteria andCredentialUpdateTimeIsNotNull() { + addCriterion("CREDENTIAL_UPDATE_TIME is not null"); + return (Criteria) this; + } + + public Criteria andCredentialUpdateTimeEqualTo(Long value) { + addCriterion("CREDENTIAL_UPDATE_TIME =", value, "credentialUpdateTime"); + return (Criteria) this; + } + + public Criteria andCredentialUpdateTimeNotEqualTo(Long value) { + addCriterion("CREDENTIAL_UPDATE_TIME <>", value, "credentialUpdateTime"); + return (Criteria) this; + } + + public Criteria andCredentialUpdateTimeGreaterThan(Long value) { + addCriterion("CREDENTIAL_UPDATE_TIME >", value, "credentialUpdateTime"); + return (Criteria) this; + } + + public Criteria andCredentialUpdateTimeGreaterThanOrEqualTo(Long value) { + addCriterion("CREDENTIAL_UPDATE_TIME >=", value, "credentialUpdateTime"); + return (Criteria) this; + } + + public Criteria andCredentialUpdateTimeLessThan(Long value) { + addCriterion("CREDENTIAL_UPDATE_TIME <", value, "credentialUpdateTime"); + return (Criteria) this; + } + + public Criteria andCredentialUpdateTimeLessThanOrEqualTo(Long value) { + addCriterion("CREDENTIAL_UPDATE_TIME <=", value, "credentialUpdateTime"); + return (Criteria) this; + } + + public Criteria andCredentialUpdateTimeIn(List values) { + addCriterion("CREDENTIAL_UPDATE_TIME in", values, "credentialUpdateTime"); + return (Criteria) this; + } + + public Criteria andCredentialUpdateTimeNotIn(List values) { + addCriterion("CREDENTIAL_UPDATE_TIME not in", values, "credentialUpdateTime"); + return (Criteria) this; + } + + public Criteria andCredentialUpdateTimeBetween(Long value1, Long value2) { + addCriterion("CREDENTIAL_UPDATE_TIME between", value1, value2, "credentialUpdateTime"); + return (Criteria) this; + } + + public Criteria andCredentialUpdateTimeNotBetween(Long value1, Long value2) { + addCriterion("CREDENTIAL_UPDATE_TIME not between", value1, value2, "credentialUpdateTime"); + return (Criteria) this; + } + + public Criteria andFirstPwdErrorTimeIsNull() { + addCriterion("FIRST_PWD_ERROR_TIME is null"); + return (Criteria) this; + } + + public Criteria andFirstPwdErrorTimeIsNotNull() { + addCriterion("FIRST_PWD_ERROR_TIME is not null"); + return (Criteria) this; + } + + public Criteria andFirstPwdErrorTimeEqualTo(Long value) { + addCriterion("FIRST_PWD_ERROR_TIME =", value, "firstPwdErrorTime"); + return (Criteria) this; + } + + public Criteria andFirstPwdErrorTimeNotEqualTo(Long value) { + addCriterion("FIRST_PWD_ERROR_TIME <>", value, "firstPwdErrorTime"); + return (Criteria) this; + } + + public Criteria andFirstPwdErrorTimeGreaterThan(Long value) { + addCriterion("FIRST_PWD_ERROR_TIME >", value, "firstPwdErrorTime"); + return (Criteria) this; + } + + public Criteria andFirstPwdErrorTimeGreaterThanOrEqualTo(Long value) { + addCriterion("FIRST_PWD_ERROR_TIME >=", value, "firstPwdErrorTime"); + return (Criteria) this; + } + + public Criteria andFirstPwdErrorTimeLessThan(Long value) { + addCriterion("FIRST_PWD_ERROR_TIME <", value, "firstPwdErrorTime"); + return (Criteria) this; + } + + public Criteria andFirstPwdErrorTimeLessThanOrEqualTo(Long value) { + addCriterion("FIRST_PWD_ERROR_TIME <=", value, "firstPwdErrorTime"); + return (Criteria) this; + } + + public Criteria andFirstPwdErrorTimeIn(List values) { + addCriterion("FIRST_PWD_ERROR_TIME in", values, "firstPwdErrorTime"); + return (Criteria) this; + } + + public Criteria andFirstPwdErrorTimeNotIn(List values) { + addCriterion("FIRST_PWD_ERROR_TIME not in", values, "firstPwdErrorTime"); + return (Criteria) this; + } + + public Criteria andFirstPwdErrorTimeBetween(Long value1, Long value2) { + addCriterion("FIRST_PWD_ERROR_TIME between", value1, value2, "firstPwdErrorTime"); + return (Criteria) this; + } + + public Criteria andFirstPwdErrorTimeNotBetween(Long value1, Long value2) { + addCriterion("FIRST_PWD_ERROR_TIME not between", value1, value2, "firstPwdErrorTime"); + return (Criteria) this; + } + + public Criteria andLoginPwdErrorTimeIsNull() { + addCriterion("LOGIN_PWD_ERROR_TIME is null"); + return (Criteria) this; + } + + public Criteria andLoginPwdErrorTimeIsNotNull() { + addCriterion("LOGIN_PWD_ERROR_TIME is not null"); + return (Criteria) this; + } + + public Criteria andLoginPwdErrorTimeEqualTo(Short value) { + addCriterion("LOGIN_PWD_ERROR_TIME =", value, "loginPwdErrorTime"); + return (Criteria) this; + } + + public Criteria andLoginPwdErrorTimeNotEqualTo(Short value) { + addCriterion("LOGIN_PWD_ERROR_TIME <>", value, "loginPwdErrorTime"); + return (Criteria) this; + } + + public Criteria andLoginPwdErrorTimeGreaterThan(Short value) { + addCriterion("LOGIN_PWD_ERROR_TIME >", value, "loginPwdErrorTime"); + return (Criteria) this; + } + + public Criteria andLoginPwdErrorTimeGreaterThanOrEqualTo(Short value) { + addCriterion("LOGIN_PWD_ERROR_TIME >=", value, "loginPwdErrorTime"); + return (Criteria) this; + } + + public Criteria andLoginPwdErrorTimeLessThan(Short value) { + addCriterion("LOGIN_PWD_ERROR_TIME <", value, "loginPwdErrorTime"); + return (Criteria) this; + } + + public Criteria andLoginPwdErrorTimeLessThanOrEqualTo(Short value) { + addCriterion("LOGIN_PWD_ERROR_TIME <=", value, "loginPwdErrorTime"); + return (Criteria) this; + } + + public Criteria andLoginPwdErrorTimeIn(List values) { + addCriterion("LOGIN_PWD_ERROR_TIME in", values, "loginPwdErrorTime"); + return (Criteria) this; + } + + public Criteria andLoginPwdErrorTimeNotIn(List values) { + addCriterion("LOGIN_PWD_ERROR_TIME not in", values, "loginPwdErrorTime"); + return (Criteria) this; + } + + public Criteria andLoginPwdErrorTimeBetween(Short value1, Short value2) { + addCriterion("LOGIN_PWD_ERROR_TIME between", value1, value2, "loginPwdErrorTime"); + return (Criteria) this; + } + + public Criteria andLoginPwdErrorTimeNotBetween(Short value1, Short value2) { + addCriterion("LOGIN_PWD_ERROR_TIME not between", value1, value2, "loginPwdErrorTime"); + return (Criteria) this; + } + } + + public static class Criteria extends GeneratedCriteria { + + protected Criteria() { + super(); + } + } + + public static class Criterion { + private String condition; + + private Object value; + + private Object secondValue; + + private boolean noValue; + + private boolean singleValue; + + private boolean betweenValue; + + private boolean listValue; + + private String typeHandler; + + public String getCondition() { + return condition; + } + + public Object getValue() { + return value; + } + + public Object getSecondValue() { + return secondValue; + } + + public boolean isNoValue() { + return noValue; + } + + public boolean isSingleValue() { + return singleValue; + } + + public boolean isBetweenValue() { + return betweenValue; + } + + public boolean isListValue() { + return listValue; + } + + public String getTypeHandler() { + return typeHandler; + } + + protected Criterion(String condition) { + super(); + this.condition = condition; + this.typeHandler = null; + this.noValue = true; + } + + protected Criterion(String condition, Object value, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.typeHandler = typeHandler; + if (value instanceof List) { + this.listValue = true; + } else { + this.singleValue = true; + } + } + + protected Criterion(String condition, Object value) { + this(condition, value, null); + } + + protected Criterion(String condition, Object value, Object secondValue, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.secondValue = secondValue; + this.typeHandler = typeHandler; + this.betweenValue = true; + } + + protected Criterion(String condition, Object value, Object secondValue) { + this(condition, value, secondValue, null); + } + } +} \ No newline at end of file diff --git a/itools-core/itools-model/src/main/java/com/itools/core/rbac/dto/UserInfoDTO.java b/itools-core/itools-model/src/main/java/com/itools/core/rbac/dto/UserInfoDTO.java new file mode 100644 index 0000000000000000000000000000000000000000..da6b74c9a2c2598549eed59a757ca12447c68a9d --- /dev/null +++ b/itools-core/itools-model/src/main/java/com/itools/core/rbac/dto/UserInfoDTO.java @@ -0,0 +1,233 @@ +package com.itools.core.rbac.dto; + +public class UserInfoDTO { + private String id; + + private Long createTime; + + private String createUserId; + + private String platfromUserid; + + private Long lastUpdateTime; + + private String lastUpdateUserId; + + private String companyId; + + private String organizationId; + + private String name; + + private Short userType; + + private String nodeId; + + private Short sex; + + private String birthday; + + private String email; + + private String position; + + private String remark; + + private String telPhone; + + private String userCode; + + private Short userLevel; + + private String platPersonId; + + private String sign; + + private String briefIntrod; + + private byte[] faceUrl; + + public String getId() { + return id; + } + + public void setId(String id) { + this.id = id; + } + + public Long getCreateTime() { + return createTime; + } + + public void setCreateTime(Long createTime) { + this.createTime = createTime; + } + + public String getCreateUserId() { + return createUserId; + } + + public void setCreateUserId(String createUserId) { + this.createUserId = createUserId; + } + + public String getPlatfromUserid() { + return platfromUserid; + } + + public void setPlatfromUserid(String platfromUserid) { + this.platfromUserid = platfromUserid; + } + + public Long getLastUpdateTime() { + return lastUpdateTime; + } + + public void setLastUpdateTime(Long lastUpdateTime) { + this.lastUpdateTime = lastUpdateTime; + } + + public String getLastUpdateUserId() { + return lastUpdateUserId; + } + + public void setLastUpdateUserId(String lastUpdateUserId) { + this.lastUpdateUserId = lastUpdateUserId; + } + + public String getCompanyId() { + return companyId; + } + + public void setCompanyId(String companyId) { + this.companyId = companyId; + } + + public String getOrganizationId() { + return organizationId; + } + + public void setOrganizationId(String organizationId) { + this.organizationId = organizationId; + } + + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + public Short getUserType() { + return userType; + } + + public void setUserType(Short userType) { + this.userType = userType; + } + + public String getNodeId() { + return nodeId; + } + + public void setNodeId(String nodeId) { + this.nodeId = nodeId; + } + + public Short getSex() { + return sex; + } + + public void setSex(Short sex) { + this.sex = sex; + } + + public String getBirthday() { + return birthday; + } + + public void setBirthday(String birthday) { + this.birthday = birthday; + } + + public String getEmail() { + return email; + } + + public void setEmail(String email) { + this.email = email; + } + + public String getPosition() { + return position; + } + + public void setPosition(String position) { + this.position = position; + } + + public String getRemark() { + return remark; + } + + public void setRemark(String remark) { + this.remark = remark; + } + + public String getTelPhone() { + return telPhone; + } + + public void setTelPhone(String telPhone) { + this.telPhone = telPhone; + } + + public String getUserCode() { + return userCode; + } + + public void setUserCode(String userCode) { + this.userCode = userCode; + } + + public Short getUserLevel() { + return userLevel; + } + + public void setUserLevel(Short userLevel) { + this.userLevel = userLevel; + } + + public String getPlatPersonId() { + return platPersonId; + } + + public void setPlatPersonId(String platPersonId) { + this.platPersonId = platPersonId; + } + + public String getSign() { + return sign; + } + + public void setSign(String sign) { + this.sign = sign; + } + + public String getBriefIntrod() { + return briefIntrod; + } + + public void setBriefIntrod(String briefIntrod) { + this.briefIntrod = briefIntrod; + } + + public byte[] getFaceUrl() { + return faceUrl; + } + + public void setFaceUrl(byte[] faceUrl) { + this.faceUrl = faceUrl; + } +} \ No newline at end of file diff --git a/itools-core/itools-model/src/main/java/com/itools/core/rbac/dto/UserInfoDTOExample.java b/itools-core/itools-model/src/main/java/com/itools/core/rbac/dto/UserInfoDTOExample.java new file mode 100644 index 0000000000000000000000000000000000000000..9a7603fe72384162d97e907c776bac1fede0fe4e --- /dev/null +++ b/itools-core/itools-model/src/main/java/com/itools/core/rbac/dto/UserInfoDTOExample.java @@ -0,0 +1,1690 @@ +package com.itools.core.rbac.dto; + +import java.util.ArrayList; +import java.util.List; + +public class UserInfoDTOExample { + protected String orderByClause; + + protected boolean distinct; + + protected List oredCriteria; + + public UserInfoDTOExample() { + oredCriteria = new ArrayList(); + } + + public void setOrderByClause(String orderByClause) { + this.orderByClause = orderByClause; + } + + public String getOrderByClause() { + return orderByClause; + } + + public void setDistinct(boolean distinct) { + this.distinct = distinct; + } + + public boolean isDistinct() { + return distinct; + } + + public List getOredCriteria() { + return oredCriteria; + } + + public void or(Criteria criteria) { + oredCriteria.add(criteria); + } + + public Criteria or() { + Criteria criteria = createCriteriaInternal(); + oredCriteria.add(criteria); + return criteria; + } + + public Criteria createCriteria() { + Criteria criteria = createCriteriaInternal(); + if (oredCriteria.size() == 0) { + oredCriteria.add(criteria); + } + return criteria; + } + + protected Criteria createCriteriaInternal() { + Criteria criteria = new Criteria(); + return criteria; + } + + public void clear() { + oredCriteria.clear(); + orderByClause = null; + distinct = false; + } + + protected abstract static class GeneratedCriteria { + protected List criteria; + + protected GeneratedCriteria() { + super(); + criteria = new ArrayList(); + } + + public boolean isValid() { + return criteria.size() > 0; + } + + public List getAllCriteria() { + return criteria; + } + + public List getCriteria() { + return criteria; + } + + protected void addCriterion(String condition) { + if (condition == null) { + throw new RuntimeException("Value for condition cannot be null"); + } + criteria.add(new Criterion(condition)); + } + + protected void addCriterion(String condition, Object value, String property) { + if (value == null) { + throw new RuntimeException("Value for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value)); + } + + protected void addCriterion(String condition, Object value1, Object value2, String property) { + if (value1 == null || value2 == null) { + throw new RuntimeException("Between values for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value1, value2)); + } + + public Criteria andIdIsNull() { + addCriterion("ID is null"); + return (Criteria) this; + } + + public Criteria andIdIsNotNull() { + addCriterion("ID is not null"); + return (Criteria) this; + } + + public Criteria andIdEqualTo(String value) { + addCriterion("ID =", value, "id"); + return (Criteria) this; + } + + public Criteria andIdNotEqualTo(String value) { + addCriterion("ID <>", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThan(String value) { + addCriterion("ID >", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThanOrEqualTo(String value) { + addCriterion("ID >=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThan(String value) { + addCriterion("ID <", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThanOrEqualTo(String value) { + addCriterion("ID <=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLike(String value) { + addCriterion("ID like", value, "id"); + return (Criteria) this; + } + + public Criteria andIdNotLike(String value) { + addCriterion("ID not like", value, "id"); + return (Criteria) this; + } + + public Criteria andIdIn(List values) { + addCriterion("ID in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdNotIn(List values) { + addCriterion("ID not in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdBetween(String value1, String value2) { + addCriterion("ID between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andIdNotBetween(String value1, String value2) { + addCriterion("ID not between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andCreateTimeIsNull() { + addCriterion("CREATE_TIME is null"); + return (Criteria) this; + } + + public Criteria andCreateTimeIsNotNull() { + addCriterion("CREATE_TIME is not null"); + return (Criteria) this; + } + + public Criteria andCreateTimeEqualTo(Long value) { + addCriterion("CREATE_TIME =", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeNotEqualTo(Long value) { + addCriterion("CREATE_TIME <>", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeGreaterThan(Long value) { + addCriterion("CREATE_TIME >", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeGreaterThanOrEqualTo(Long value) { + addCriterion("CREATE_TIME >=", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeLessThan(Long value) { + addCriterion("CREATE_TIME <", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeLessThanOrEqualTo(Long value) { + addCriterion("CREATE_TIME <=", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeIn(List values) { + addCriterion("CREATE_TIME in", values, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeNotIn(List values) { + addCriterion("CREATE_TIME not in", values, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeBetween(Long value1, Long value2) { + addCriterion("CREATE_TIME between", value1, value2, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeNotBetween(Long value1, Long value2) { + addCriterion("CREATE_TIME not between", value1, value2, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateUserIdIsNull() { + addCriterion("CREATE_USER_ID is null"); + return (Criteria) this; + } + + public Criteria andCreateUserIdIsNotNull() { + addCriterion("CREATE_USER_ID is not null"); + return (Criteria) this; + } + + public Criteria andCreateUserIdEqualTo(String value) { + addCriterion("CREATE_USER_ID =", value, "createUserId"); + return (Criteria) this; + } + + public Criteria andCreateUserIdNotEqualTo(String value) { + addCriterion("CREATE_USER_ID <>", value, "createUserId"); + return (Criteria) this; + } + + public Criteria andCreateUserIdGreaterThan(String value) { + addCriterion("CREATE_USER_ID >", value, "createUserId"); + return (Criteria) this; + } + + public Criteria andCreateUserIdGreaterThanOrEqualTo(String value) { + addCriterion("CREATE_USER_ID >=", value, "createUserId"); + return (Criteria) this; + } + + public Criteria andCreateUserIdLessThan(String value) { + addCriterion("CREATE_USER_ID <", value, "createUserId"); + return (Criteria) this; + } + + public Criteria andCreateUserIdLessThanOrEqualTo(String value) { + addCriterion("CREATE_USER_ID <=", value, "createUserId"); + return (Criteria) this; + } + + public Criteria andCreateUserIdLike(String value) { + addCriterion("CREATE_USER_ID like", value, "createUserId"); + return (Criteria) this; + } + + public Criteria andCreateUserIdNotLike(String value) { + addCriterion("CREATE_USER_ID not like", value, "createUserId"); + return (Criteria) this; + } + + public Criteria andCreateUserIdIn(List values) { + addCriterion("CREATE_USER_ID in", values, "createUserId"); + return (Criteria) this; + } + + public Criteria andCreateUserIdNotIn(List values) { + addCriterion("CREATE_USER_ID not in", values, "createUserId"); + return (Criteria) this; + } + + public Criteria andCreateUserIdBetween(String value1, String value2) { + addCriterion("CREATE_USER_ID between", value1, value2, "createUserId"); + return (Criteria) this; + } + + public Criteria andCreateUserIdNotBetween(String value1, String value2) { + addCriterion("CREATE_USER_ID not between", value1, value2, "createUserId"); + return (Criteria) this; + } + + public Criteria andPlatfromUseridIsNull() { + addCriterion("PLATFROM_USERID is null"); + return (Criteria) this; + } + + public Criteria andPlatfromUseridIsNotNull() { + addCriterion("PLATFROM_USERID is not null"); + return (Criteria) this; + } + + public Criteria andPlatfromUseridEqualTo(String value) { + addCriterion("PLATFROM_USERID =", value, "platfromUserid"); + return (Criteria) this; + } + + public Criteria andPlatfromUseridNotEqualTo(String value) { + addCriterion("PLATFROM_USERID <>", value, "platfromUserid"); + return (Criteria) this; + } + + public Criteria andPlatfromUseridGreaterThan(String value) { + addCriterion("PLATFROM_USERID >", value, "platfromUserid"); + return (Criteria) this; + } + + public Criteria andPlatfromUseridGreaterThanOrEqualTo(String value) { + addCriterion("PLATFROM_USERID >=", value, "platfromUserid"); + return (Criteria) this; + } + + public Criteria andPlatfromUseridLessThan(String value) { + addCriterion("PLATFROM_USERID <", value, "platfromUserid"); + return (Criteria) this; + } + + public Criteria andPlatfromUseridLessThanOrEqualTo(String value) { + addCriterion("PLATFROM_USERID <=", value, "platfromUserid"); + return (Criteria) this; + } + + public Criteria andPlatfromUseridLike(String value) { + addCriterion("PLATFROM_USERID like", value, "platfromUserid"); + return (Criteria) this; + } + + public Criteria andPlatfromUseridNotLike(String value) { + addCriterion("PLATFROM_USERID not like", value, "platfromUserid"); + return (Criteria) this; + } + + public Criteria andPlatfromUseridIn(List values) { + addCriterion("PLATFROM_USERID in", values, "platfromUserid"); + return (Criteria) this; + } + + public Criteria andPlatfromUseridNotIn(List values) { + addCriterion("PLATFROM_USERID not in", values, "platfromUserid"); + return (Criteria) this; + } + + public Criteria andPlatfromUseridBetween(String value1, String value2) { + addCriterion("PLATFROM_USERID between", value1, value2, "platfromUserid"); + return (Criteria) this; + } + + public Criteria andPlatfromUseridNotBetween(String value1, String value2) { + addCriterion("PLATFROM_USERID not between", value1, value2, "platfromUserid"); + return (Criteria) this; + } + + public Criteria andLastUpdateTimeIsNull() { + addCriterion("LAST_UPDATE_TIME is null"); + return (Criteria) this; + } + + public Criteria andLastUpdateTimeIsNotNull() { + addCriterion("LAST_UPDATE_TIME is not null"); + return (Criteria) this; + } + + public Criteria andLastUpdateTimeEqualTo(Long value) { + addCriterion("LAST_UPDATE_TIME =", value, "lastUpdateTime"); + return (Criteria) this; + } + + public Criteria andLastUpdateTimeNotEqualTo(Long value) { + addCriterion("LAST_UPDATE_TIME <>", value, "lastUpdateTime"); + return (Criteria) this; + } + + public Criteria andLastUpdateTimeGreaterThan(Long value) { + addCriterion("LAST_UPDATE_TIME >", value, "lastUpdateTime"); + return (Criteria) this; + } + + public Criteria andLastUpdateTimeGreaterThanOrEqualTo(Long value) { + addCriterion("LAST_UPDATE_TIME >=", value, "lastUpdateTime"); + return (Criteria) this; + } + + public Criteria andLastUpdateTimeLessThan(Long value) { + addCriterion("LAST_UPDATE_TIME <", value, "lastUpdateTime"); + return (Criteria) this; + } + + public Criteria andLastUpdateTimeLessThanOrEqualTo(Long value) { + addCriterion("LAST_UPDATE_TIME <=", value, "lastUpdateTime"); + return (Criteria) this; + } + + public Criteria andLastUpdateTimeIn(List values) { + addCriterion("LAST_UPDATE_TIME in", values, "lastUpdateTime"); + return (Criteria) this; + } + + public Criteria andLastUpdateTimeNotIn(List values) { + addCriterion("LAST_UPDATE_TIME not in", values, "lastUpdateTime"); + return (Criteria) this; + } + + public Criteria andLastUpdateTimeBetween(Long value1, Long value2) { + addCriterion("LAST_UPDATE_TIME between", value1, value2, "lastUpdateTime"); + return (Criteria) this; + } + + public Criteria andLastUpdateTimeNotBetween(Long value1, Long value2) { + addCriterion("LAST_UPDATE_TIME not between", value1, value2, "lastUpdateTime"); + return (Criteria) this; + } + + public Criteria andLastUpdateUserIdIsNull() { + addCriterion("LAST_UPDATE_USER_ID is null"); + return (Criteria) this; + } + + public Criteria andLastUpdateUserIdIsNotNull() { + addCriterion("LAST_UPDATE_USER_ID is not null"); + return (Criteria) this; + } + + public Criteria andLastUpdateUserIdEqualTo(String value) { + addCriterion("LAST_UPDATE_USER_ID =", value, "lastUpdateUserId"); + return (Criteria) this; + } + + public Criteria andLastUpdateUserIdNotEqualTo(String value) { + addCriterion("LAST_UPDATE_USER_ID <>", value, "lastUpdateUserId"); + return (Criteria) this; + } + + public Criteria andLastUpdateUserIdGreaterThan(String value) { + addCriterion("LAST_UPDATE_USER_ID >", value, "lastUpdateUserId"); + return (Criteria) this; + } + + public Criteria andLastUpdateUserIdGreaterThanOrEqualTo(String value) { + addCriterion("LAST_UPDATE_USER_ID >=", value, "lastUpdateUserId"); + return (Criteria) this; + } + + public Criteria andLastUpdateUserIdLessThan(String value) { + addCriterion("LAST_UPDATE_USER_ID <", value, "lastUpdateUserId"); + return (Criteria) this; + } + + public Criteria andLastUpdateUserIdLessThanOrEqualTo(String value) { + addCriterion("LAST_UPDATE_USER_ID <=", value, "lastUpdateUserId"); + return (Criteria) this; + } + + public Criteria andLastUpdateUserIdLike(String value) { + addCriterion("LAST_UPDATE_USER_ID like", value, "lastUpdateUserId"); + return (Criteria) this; + } + + public Criteria andLastUpdateUserIdNotLike(String value) { + addCriterion("LAST_UPDATE_USER_ID not like", value, "lastUpdateUserId"); + return (Criteria) this; + } + + public Criteria andLastUpdateUserIdIn(List values) { + addCriterion("LAST_UPDATE_USER_ID in", values, "lastUpdateUserId"); + return (Criteria) this; + } + + public Criteria andLastUpdateUserIdNotIn(List values) { + addCriterion("LAST_UPDATE_USER_ID not in", values, "lastUpdateUserId"); + return (Criteria) this; + } + + public Criteria andLastUpdateUserIdBetween(String value1, String value2) { + addCriterion("LAST_UPDATE_USER_ID between", value1, value2, "lastUpdateUserId"); + return (Criteria) this; + } + + public Criteria andLastUpdateUserIdNotBetween(String value1, String value2) { + addCriterion("LAST_UPDATE_USER_ID not between", value1, value2, "lastUpdateUserId"); + return (Criteria) this; + } + + public Criteria andCompanyIdIsNull() { + addCriterion("COMPANY_ID is null"); + return (Criteria) this; + } + + public Criteria andCompanyIdIsNotNull() { + addCriterion("COMPANY_ID is not null"); + return (Criteria) this; + } + + public Criteria andCompanyIdEqualTo(String value) { + addCriterion("COMPANY_ID =", value, "companyId"); + return (Criteria) this; + } + + public Criteria andCompanyIdNotEqualTo(String value) { + addCriterion("COMPANY_ID <>", value, "companyId"); + return (Criteria) this; + } + + public Criteria andCompanyIdGreaterThan(String value) { + addCriterion("COMPANY_ID >", value, "companyId"); + return (Criteria) this; + } + + public Criteria andCompanyIdGreaterThanOrEqualTo(String value) { + addCriterion("COMPANY_ID >=", value, "companyId"); + return (Criteria) this; + } + + public Criteria andCompanyIdLessThan(String value) { + addCriterion("COMPANY_ID <", value, "companyId"); + return (Criteria) this; + } + + public Criteria andCompanyIdLessThanOrEqualTo(String value) { + addCriterion("COMPANY_ID <=", value, "companyId"); + return (Criteria) this; + } + + public Criteria andCompanyIdLike(String value) { + addCriterion("COMPANY_ID like", value, "companyId"); + return (Criteria) this; + } + + public Criteria andCompanyIdNotLike(String value) { + addCriterion("COMPANY_ID not like", value, "companyId"); + return (Criteria) this; + } + + public Criteria andCompanyIdIn(List values) { + addCriterion("COMPANY_ID in", values, "companyId"); + return (Criteria) this; + } + + public Criteria andCompanyIdNotIn(List values) { + addCriterion("COMPANY_ID not in", values, "companyId"); + return (Criteria) this; + } + + public Criteria andCompanyIdBetween(String value1, String value2) { + addCriterion("COMPANY_ID between", value1, value2, "companyId"); + return (Criteria) this; + } + + public Criteria andCompanyIdNotBetween(String value1, String value2) { + addCriterion("COMPANY_ID not between", value1, value2, "companyId"); + return (Criteria) this; + } + + public Criteria andOrganizationIdIsNull() { + addCriterion("ORGANIZATION_ID is null"); + return (Criteria) this; + } + + public Criteria andOrganizationIdIsNotNull() { + addCriterion("ORGANIZATION_ID is not null"); + return (Criteria) this; + } + + public Criteria andOrganizationIdEqualTo(String value) { + addCriterion("ORGANIZATION_ID =", value, "organizationId"); + return (Criteria) this; + } + + public Criteria andOrganizationIdNotEqualTo(String value) { + addCriterion("ORGANIZATION_ID <>", value, "organizationId"); + return (Criteria) this; + } + + public Criteria andOrganizationIdGreaterThan(String value) { + addCriterion("ORGANIZATION_ID >", value, "organizationId"); + return (Criteria) this; + } + + public Criteria andOrganizationIdGreaterThanOrEqualTo(String value) { + addCriterion("ORGANIZATION_ID >=", value, "organizationId"); + return (Criteria) this; + } + + public Criteria andOrganizationIdLessThan(String value) { + addCriterion("ORGANIZATION_ID <", value, "organizationId"); + return (Criteria) this; + } + + public Criteria andOrganizationIdLessThanOrEqualTo(String value) { + addCriterion("ORGANIZATION_ID <=", value, "organizationId"); + return (Criteria) this; + } + + public Criteria andOrganizationIdLike(String value) { + addCriterion("ORGANIZATION_ID like", value, "organizationId"); + return (Criteria) this; + } + + public Criteria andOrganizationIdNotLike(String value) { + addCriterion("ORGANIZATION_ID not like", value, "organizationId"); + return (Criteria) this; + } + + public Criteria andOrganizationIdIn(List values) { + addCriterion("ORGANIZATION_ID in", values, "organizationId"); + return (Criteria) this; + } + + public Criteria andOrganizationIdNotIn(List values) { + addCriterion("ORGANIZATION_ID not in", values, "organizationId"); + return (Criteria) this; + } + + public Criteria andOrganizationIdBetween(String value1, String value2) { + addCriterion("ORGANIZATION_ID between", value1, value2, "organizationId"); + return (Criteria) this; + } + + public Criteria andOrganizationIdNotBetween(String value1, String value2) { + addCriterion("ORGANIZATION_ID not between", value1, value2, "organizationId"); + return (Criteria) this; + } + + public Criteria andNameIsNull() { + addCriterion("NAME is null"); + return (Criteria) this; + } + + public Criteria andNameIsNotNull() { + addCriterion("NAME is not null"); + return (Criteria) this; + } + + public Criteria andNameEqualTo(String value) { + addCriterion("NAME =", value, "name"); + return (Criteria) this; + } + + public Criteria andNameNotEqualTo(String value) { + addCriterion("NAME <>", value, "name"); + return (Criteria) this; + } + + public Criteria andNameGreaterThan(String value) { + addCriterion("NAME >", value, "name"); + return (Criteria) this; + } + + public Criteria andNameGreaterThanOrEqualTo(String value) { + addCriterion("NAME >=", value, "name"); + return (Criteria) this; + } + + public Criteria andNameLessThan(String value) { + addCriterion("NAME <", value, "name"); + return (Criteria) this; + } + + public Criteria andNameLessThanOrEqualTo(String value) { + addCriterion("NAME <=", value, "name"); + return (Criteria) this; + } + + public Criteria andNameLike(String value) { + addCriterion("NAME like", value, "name"); + return (Criteria) this; + } + + public Criteria andNameNotLike(String value) { + addCriterion("NAME not like", value, "name"); + return (Criteria) this; + } + + public Criteria andNameIn(List values) { + addCriterion("NAME in", values, "name"); + return (Criteria) this; + } + + public Criteria andNameNotIn(List values) { + addCriterion("NAME not in", values, "name"); + return (Criteria) this; + } + + public Criteria andNameBetween(String value1, String value2) { + addCriterion("NAME between", value1, value2, "name"); + return (Criteria) this; + } + + public Criteria andNameNotBetween(String value1, String value2) { + addCriterion("NAME not between", value1, value2, "name"); + return (Criteria) this; + } + + public Criteria andUserTypeIsNull() { + addCriterion("USER_TYPE is null"); + return (Criteria) this; + } + + public Criteria andUserTypeIsNotNull() { + addCriterion("USER_TYPE is not null"); + return (Criteria) this; + } + + public Criteria andUserTypeEqualTo(Short value) { + addCriterion("USER_TYPE =", value, "userType"); + return (Criteria) this; + } + + public Criteria andUserTypeNotEqualTo(Short value) { + addCriterion("USER_TYPE <>", value, "userType"); + return (Criteria) this; + } + + public Criteria andUserTypeGreaterThan(Short value) { + addCriterion("USER_TYPE >", value, "userType"); + return (Criteria) this; + } + + public Criteria andUserTypeGreaterThanOrEqualTo(Short value) { + addCriterion("USER_TYPE >=", value, "userType"); + return (Criteria) this; + } + + public Criteria andUserTypeLessThan(Short value) { + addCriterion("USER_TYPE <", value, "userType"); + return (Criteria) this; + } + + public Criteria andUserTypeLessThanOrEqualTo(Short value) { + addCriterion("USER_TYPE <=", value, "userType"); + return (Criteria) this; + } + + public Criteria andUserTypeIn(List values) { + addCriterion("USER_TYPE in", values, "userType"); + return (Criteria) this; + } + + public Criteria andUserTypeNotIn(List values) { + addCriterion("USER_TYPE not in", values, "userType"); + return (Criteria) this; + } + + public Criteria andUserTypeBetween(Short value1, Short value2) { + addCriterion("USER_TYPE between", value1, value2, "userType"); + return (Criteria) this; + } + + public Criteria andUserTypeNotBetween(Short value1, Short value2) { + addCriterion("USER_TYPE not between", value1, value2, "userType"); + return (Criteria) this; + } + + public Criteria andNodeIdIsNull() { + addCriterion("NODE_ID is null"); + return (Criteria) this; + } + + public Criteria andNodeIdIsNotNull() { + addCriterion("NODE_ID is not null"); + return (Criteria) this; + } + + public Criteria andNodeIdEqualTo(String value) { + addCriterion("NODE_ID =", value, "nodeId"); + return (Criteria) this; + } + + public Criteria andNodeIdNotEqualTo(String value) { + addCriterion("NODE_ID <>", value, "nodeId"); + return (Criteria) this; + } + + public Criteria andNodeIdGreaterThan(String value) { + addCriterion("NODE_ID >", value, "nodeId"); + return (Criteria) this; + } + + public Criteria andNodeIdGreaterThanOrEqualTo(String value) { + addCriterion("NODE_ID >=", value, "nodeId"); + return (Criteria) this; + } + + public Criteria andNodeIdLessThan(String value) { + addCriterion("NODE_ID <", value, "nodeId"); + return (Criteria) this; + } + + public Criteria andNodeIdLessThanOrEqualTo(String value) { + addCriterion("NODE_ID <=", value, "nodeId"); + return (Criteria) this; + } + + public Criteria andNodeIdLike(String value) { + addCriterion("NODE_ID like", value, "nodeId"); + return (Criteria) this; + } + + public Criteria andNodeIdNotLike(String value) { + addCriterion("NODE_ID not like", value, "nodeId"); + return (Criteria) this; + } + + public Criteria andNodeIdIn(List values) { + addCriterion("NODE_ID in", values, "nodeId"); + return (Criteria) this; + } + + public Criteria andNodeIdNotIn(List values) { + addCriterion("NODE_ID not in", values, "nodeId"); + return (Criteria) this; + } + + public Criteria andNodeIdBetween(String value1, String value2) { + addCriterion("NODE_ID between", value1, value2, "nodeId"); + return (Criteria) this; + } + + public Criteria andNodeIdNotBetween(String value1, String value2) { + addCriterion("NODE_ID not between", value1, value2, "nodeId"); + return (Criteria) this; + } + + public Criteria andSexIsNull() { + addCriterion("SEX is null"); + return (Criteria) this; + } + + public Criteria andSexIsNotNull() { + addCriterion("SEX is not null"); + return (Criteria) this; + } + + public Criteria andSexEqualTo(Short value) { + addCriterion("SEX =", value, "sex"); + return (Criteria) this; + } + + public Criteria andSexNotEqualTo(Short value) { + addCriterion("SEX <>", value, "sex"); + return (Criteria) this; + } + + public Criteria andSexGreaterThan(Short value) { + addCriterion("SEX >", value, "sex"); + return (Criteria) this; + } + + public Criteria andSexGreaterThanOrEqualTo(Short value) { + addCriterion("SEX >=", value, "sex"); + return (Criteria) this; + } + + public Criteria andSexLessThan(Short value) { + addCriterion("SEX <", value, "sex"); + return (Criteria) this; + } + + public Criteria andSexLessThanOrEqualTo(Short value) { + addCriterion("SEX <=", value, "sex"); + return (Criteria) this; + } + + public Criteria andSexIn(List values) { + addCriterion("SEX in", values, "sex"); + return (Criteria) this; + } + + public Criteria andSexNotIn(List values) { + addCriterion("SEX not in", values, "sex"); + return (Criteria) this; + } + + public Criteria andSexBetween(Short value1, Short value2) { + addCriterion("SEX between", value1, value2, "sex"); + return (Criteria) this; + } + + public Criteria andSexNotBetween(Short value1, Short value2) { + addCriterion("SEX not between", value1, value2, "sex"); + return (Criteria) this; + } + + public Criteria andBirthdayIsNull() { + addCriterion("BIRTHDAY is null"); + return (Criteria) this; + } + + public Criteria andBirthdayIsNotNull() { + addCriterion("BIRTHDAY is not null"); + return (Criteria) this; + } + + public Criteria andBirthdayEqualTo(String value) { + addCriterion("BIRTHDAY =", value, "birthday"); + return (Criteria) this; + } + + public Criteria andBirthdayNotEqualTo(String value) { + addCriterion("BIRTHDAY <>", value, "birthday"); + return (Criteria) this; + } + + public Criteria andBirthdayGreaterThan(String value) { + addCriterion("BIRTHDAY >", value, "birthday"); + return (Criteria) this; + } + + public Criteria andBirthdayGreaterThanOrEqualTo(String value) { + addCriterion("BIRTHDAY >=", value, "birthday"); + return (Criteria) this; + } + + public Criteria andBirthdayLessThan(String value) { + addCriterion("BIRTHDAY <", value, "birthday"); + return (Criteria) this; + } + + public Criteria andBirthdayLessThanOrEqualTo(String value) { + addCriterion("BIRTHDAY <=", value, "birthday"); + return (Criteria) this; + } + + public Criteria andBirthdayLike(String value) { + addCriterion("BIRTHDAY like", value, "birthday"); + return (Criteria) this; + } + + public Criteria andBirthdayNotLike(String value) { + addCriterion("BIRTHDAY not like", value, "birthday"); + return (Criteria) this; + } + + public Criteria andBirthdayIn(List values) { + addCriterion("BIRTHDAY in", values, "birthday"); + return (Criteria) this; + } + + public Criteria andBirthdayNotIn(List values) { + addCriterion("BIRTHDAY not in", values, "birthday"); + return (Criteria) this; + } + + public Criteria andBirthdayBetween(String value1, String value2) { + addCriterion("BIRTHDAY between", value1, value2, "birthday"); + return (Criteria) this; + } + + public Criteria andBirthdayNotBetween(String value1, String value2) { + addCriterion("BIRTHDAY not between", value1, value2, "birthday"); + return (Criteria) this; + } + + public Criteria andEmailIsNull() { + addCriterion("EMAIL is null"); + return (Criteria) this; + } + + public Criteria andEmailIsNotNull() { + addCriterion("EMAIL is not null"); + return (Criteria) this; + } + + public Criteria andEmailEqualTo(String value) { + addCriterion("EMAIL =", value, "email"); + return (Criteria) this; + } + + public Criteria andEmailNotEqualTo(String value) { + addCriterion("EMAIL <>", value, "email"); + return (Criteria) this; + } + + public Criteria andEmailGreaterThan(String value) { + addCriterion("EMAIL >", value, "email"); + return (Criteria) this; + } + + public Criteria andEmailGreaterThanOrEqualTo(String value) { + addCriterion("EMAIL >=", value, "email"); + return (Criteria) this; + } + + public Criteria andEmailLessThan(String value) { + addCriterion("EMAIL <", value, "email"); + return (Criteria) this; + } + + public Criteria andEmailLessThanOrEqualTo(String value) { + addCriterion("EMAIL <=", value, "email"); + return (Criteria) this; + } + + public Criteria andEmailLike(String value) { + addCriterion("EMAIL like", value, "email"); + return (Criteria) this; + } + + public Criteria andEmailNotLike(String value) { + addCriterion("EMAIL not like", value, "email"); + return (Criteria) this; + } + + public Criteria andEmailIn(List values) { + addCriterion("EMAIL in", values, "email"); + return (Criteria) this; + } + + public Criteria andEmailNotIn(List values) { + addCriterion("EMAIL not in", values, "email"); + return (Criteria) this; + } + + public Criteria andEmailBetween(String value1, String value2) { + addCriterion("EMAIL between", value1, value2, "email"); + return (Criteria) this; + } + + public Criteria andEmailNotBetween(String value1, String value2) { + addCriterion("EMAIL not between", value1, value2, "email"); + return (Criteria) this; + } + + public Criteria andPositionIsNull() { + addCriterion("POSITION is null"); + return (Criteria) this; + } + + public Criteria andPositionIsNotNull() { + addCriterion("POSITION is not null"); + return (Criteria) this; + } + + public Criteria andPositionEqualTo(String value) { + addCriterion("POSITION =", value, "position"); + return (Criteria) this; + } + + public Criteria andPositionNotEqualTo(String value) { + addCriterion("POSITION <>", value, "position"); + return (Criteria) this; + } + + public Criteria andPositionGreaterThan(String value) { + addCriterion("POSITION >", value, "position"); + return (Criteria) this; + } + + public Criteria andPositionGreaterThanOrEqualTo(String value) { + addCriterion("POSITION >=", value, "position"); + return (Criteria) this; + } + + public Criteria andPositionLessThan(String value) { + addCriterion("POSITION <", value, "position"); + return (Criteria) this; + } + + public Criteria andPositionLessThanOrEqualTo(String value) { + addCriterion("POSITION <=", value, "position"); + return (Criteria) this; + } + + public Criteria andPositionLike(String value) { + addCriterion("POSITION like", value, "position"); + return (Criteria) this; + } + + public Criteria andPositionNotLike(String value) { + addCriterion("POSITION not like", value, "position"); + return (Criteria) this; + } + + public Criteria andPositionIn(List values) { + addCriterion("POSITION in", values, "position"); + return (Criteria) this; + } + + public Criteria andPositionNotIn(List values) { + addCriterion("POSITION not in", values, "position"); + return (Criteria) this; + } + + public Criteria andPositionBetween(String value1, String value2) { + addCriterion("POSITION between", value1, value2, "position"); + return (Criteria) this; + } + + public Criteria andPositionNotBetween(String value1, String value2) { + addCriterion("POSITION not between", value1, value2, "position"); + return (Criteria) this; + } + + public Criteria andRemarkIsNull() { + addCriterion("REMARK is null"); + return (Criteria) this; + } + + public Criteria andRemarkIsNotNull() { + addCriterion("REMARK is not null"); + return (Criteria) this; + } + + public Criteria andRemarkEqualTo(String value) { + addCriterion("REMARK =", value, "remark"); + return (Criteria) this; + } + + public Criteria andRemarkNotEqualTo(String value) { + addCriterion("REMARK <>", value, "remark"); + return (Criteria) this; + } + + public Criteria andRemarkGreaterThan(String value) { + addCriterion("REMARK >", value, "remark"); + return (Criteria) this; + } + + public Criteria andRemarkGreaterThanOrEqualTo(String value) { + addCriterion("REMARK >=", value, "remark"); + return (Criteria) this; + } + + public Criteria andRemarkLessThan(String value) { + addCriterion("REMARK <", value, "remark"); + return (Criteria) this; + } + + public Criteria andRemarkLessThanOrEqualTo(String value) { + addCriterion("REMARK <=", value, "remark"); + return (Criteria) this; + } + + public Criteria andRemarkLike(String value) { + addCriterion("REMARK like", value, "remark"); + return (Criteria) this; + } + + public Criteria andRemarkNotLike(String value) { + addCriterion("REMARK not like", value, "remark"); + return (Criteria) this; + } + + public Criteria andRemarkIn(List values) { + addCriterion("REMARK in", values, "remark"); + return (Criteria) this; + } + + public Criteria andRemarkNotIn(List values) { + addCriterion("REMARK not in", values, "remark"); + return (Criteria) this; + } + + public Criteria andRemarkBetween(String value1, String value2) { + addCriterion("REMARK between", value1, value2, "remark"); + return (Criteria) this; + } + + public Criteria andRemarkNotBetween(String value1, String value2) { + addCriterion("REMARK not between", value1, value2, "remark"); + return (Criteria) this; + } + + public Criteria andTelPhoneIsNull() { + addCriterion("TEL_PHONE is null"); + return (Criteria) this; + } + + public Criteria andTelPhoneIsNotNull() { + addCriterion("TEL_PHONE is not null"); + return (Criteria) this; + } + + public Criteria andTelPhoneEqualTo(String value) { + addCriterion("TEL_PHONE =", value, "telPhone"); + return (Criteria) this; + } + + public Criteria andTelPhoneNotEqualTo(String value) { + addCriterion("TEL_PHONE <>", value, "telPhone"); + return (Criteria) this; + } + + public Criteria andTelPhoneGreaterThan(String value) { + addCriterion("TEL_PHONE >", value, "telPhone"); + return (Criteria) this; + } + + public Criteria andTelPhoneGreaterThanOrEqualTo(String value) { + addCriterion("TEL_PHONE >=", value, "telPhone"); + return (Criteria) this; + } + + public Criteria andTelPhoneLessThan(String value) { + addCriterion("TEL_PHONE <", value, "telPhone"); + return (Criteria) this; + } + + public Criteria andTelPhoneLessThanOrEqualTo(String value) { + addCriterion("TEL_PHONE <=", value, "telPhone"); + return (Criteria) this; + } + + public Criteria andTelPhoneLike(String value) { + addCriterion("TEL_PHONE like", value, "telPhone"); + return (Criteria) this; + } + + public Criteria andTelPhoneNotLike(String value) { + addCriterion("TEL_PHONE not like", value, "telPhone"); + return (Criteria) this; + } + + public Criteria andTelPhoneIn(List values) { + addCriterion("TEL_PHONE in", values, "telPhone"); + return (Criteria) this; + } + + public Criteria andTelPhoneNotIn(List values) { + addCriterion("TEL_PHONE not in", values, "telPhone"); + return (Criteria) this; + } + + public Criteria andTelPhoneBetween(String value1, String value2) { + addCriterion("TEL_PHONE between", value1, value2, "telPhone"); + return (Criteria) this; + } + + public Criteria andTelPhoneNotBetween(String value1, String value2) { + addCriterion("TEL_PHONE not between", value1, value2, "telPhone"); + return (Criteria) this; + } + + public Criteria andUserCodeIsNull() { + addCriterion("USER_CODE is null"); + return (Criteria) this; + } + + public Criteria andUserCodeIsNotNull() { + addCriterion("USER_CODE is not null"); + return (Criteria) this; + } + + public Criteria andUserCodeEqualTo(String value) { + addCriterion("USER_CODE =", value, "userCode"); + return (Criteria) this; + } + + public Criteria andUserCodeNotEqualTo(String value) { + addCriterion("USER_CODE <>", value, "userCode"); + return (Criteria) this; + } + + public Criteria andUserCodeGreaterThan(String value) { + addCriterion("USER_CODE >", value, "userCode"); + return (Criteria) this; + } + + public Criteria andUserCodeGreaterThanOrEqualTo(String value) { + addCriterion("USER_CODE >=", value, "userCode"); + return (Criteria) this; + } + + public Criteria andUserCodeLessThan(String value) { + addCriterion("USER_CODE <", value, "userCode"); + return (Criteria) this; + } + + public Criteria andUserCodeLessThanOrEqualTo(String value) { + addCriterion("USER_CODE <=", value, "userCode"); + return (Criteria) this; + } + + public Criteria andUserCodeLike(String value) { + addCriterion("USER_CODE like", value, "userCode"); + return (Criteria) this; + } + + public Criteria andUserCodeNotLike(String value) { + addCriterion("USER_CODE not like", value, "userCode"); + return (Criteria) this; + } + + public Criteria andUserCodeIn(List values) { + addCriterion("USER_CODE in", values, "userCode"); + return (Criteria) this; + } + + public Criteria andUserCodeNotIn(List values) { + addCriterion("USER_CODE not in", values, "userCode"); + return (Criteria) this; + } + + public Criteria andUserCodeBetween(String value1, String value2) { + addCriterion("USER_CODE between", value1, value2, "userCode"); + return (Criteria) this; + } + + public Criteria andUserCodeNotBetween(String value1, String value2) { + addCriterion("USER_CODE not between", value1, value2, "userCode"); + return (Criteria) this; + } + + public Criteria andUserLevelIsNull() { + addCriterion("USER_LEVEL is null"); + return (Criteria) this; + } + + public Criteria andUserLevelIsNotNull() { + addCriterion("USER_LEVEL is not null"); + return (Criteria) this; + } + + public Criteria andUserLevelEqualTo(Short value) { + addCriterion("USER_LEVEL =", value, "userLevel"); + return (Criteria) this; + } + + public Criteria andUserLevelNotEqualTo(Short value) { + addCriterion("USER_LEVEL <>", value, "userLevel"); + return (Criteria) this; + } + + public Criteria andUserLevelGreaterThan(Short value) { + addCriterion("USER_LEVEL >", value, "userLevel"); + return (Criteria) this; + } + + public Criteria andUserLevelGreaterThanOrEqualTo(Short value) { + addCriterion("USER_LEVEL >=", value, "userLevel"); + return (Criteria) this; + } + + public Criteria andUserLevelLessThan(Short value) { + addCriterion("USER_LEVEL <", value, "userLevel"); + return (Criteria) this; + } + + public Criteria andUserLevelLessThanOrEqualTo(Short value) { + addCriterion("USER_LEVEL <=", value, "userLevel"); + return (Criteria) this; + } + + public Criteria andUserLevelIn(List values) { + addCriterion("USER_LEVEL in", values, "userLevel"); + return (Criteria) this; + } + + public Criteria andUserLevelNotIn(List values) { + addCriterion("USER_LEVEL not in", values, "userLevel"); + return (Criteria) this; + } + + public Criteria andUserLevelBetween(Short value1, Short value2) { + addCriterion("USER_LEVEL between", value1, value2, "userLevel"); + return (Criteria) this; + } + + public Criteria andUserLevelNotBetween(Short value1, Short value2) { + addCriterion("USER_LEVEL not between", value1, value2, "userLevel"); + return (Criteria) this; + } + + public Criteria andPlatPersonIdIsNull() { + addCriterion("PLAT_PERSON_ID is null"); + return (Criteria) this; + } + + public Criteria andPlatPersonIdIsNotNull() { + addCriterion("PLAT_PERSON_ID is not null"); + return (Criteria) this; + } + + public Criteria andPlatPersonIdEqualTo(String value) { + addCriterion("PLAT_PERSON_ID =", value, "platPersonId"); + return (Criteria) this; + } + + public Criteria andPlatPersonIdNotEqualTo(String value) { + addCriterion("PLAT_PERSON_ID <>", value, "platPersonId"); + return (Criteria) this; + } + + public Criteria andPlatPersonIdGreaterThan(String value) { + addCriterion("PLAT_PERSON_ID >", value, "platPersonId"); + return (Criteria) this; + } + + public Criteria andPlatPersonIdGreaterThanOrEqualTo(String value) { + addCriterion("PLAT_PERSON_ID >=", value, "platPersonId"); + return (Criteria) this; + } + + public Criteria andPlatPersonIdLessThan(String value) { + addCriterion("PLAT_PERSON_ID <", value, "platPersonId"); + return (Criteria) this; + } + + public Criteria andPlatPersonIdLessThanOrEqualTo(String value) { + addCriterion("PLAT_PERSON_ID <=", value, "platPersonId"); + return (Criteria) this; + } + + public Criteria andPlatPersonIdLike(String value) { + addCriterion("PLAT_PERSON_ID like", value, "platPersonId"); + return (Criteria) this; + } + + public Criteria andPlatPersonIdNotLike(String value) { + addCriterion("PLAT_PERSON_ID not like", value, "platPersonId"); + return (Criteria) this; + } + + public Criteria andPlatPersonIdIn(List values) { + addCriterion("PLAT_PERSON_ID in", values, "platPersonId"); + return (Criteria) this; + } + + public Criteria andPlatPersonIdNotIn(List values) { + addCriterion("PLAT_PERSON_ID not in", values, "platPersonId"); + return (Criteria) this; + } + + public Criteria andPlatPersonIdBetween(String value1, String value2) { + addCriterion("PLAT_PERSON_ID between", value1, value2, "platPersonId"); + return (Criteria) this; + } + + public Criteria andPlatPersonIdNotBetween(String value1, String value2) { + addCriterion("PLAT_PERSON_ID not between", value1, value2, "platPersonId"); + return (Criteria) this; + } + + public Criteria andSignIsNull() { + addCriterion("SIGN is null"); + return (Criteria) this; + } + + public Criteria andSignIsNotNull() { + addCriterion("SIGN is not null"); + return (Criteria) this; + } + + public Criteria andSignEqualTo(String value) { + addCriterion("SIGN =", value, "sign"); + return (Criteria) this; + } + + public Criteria andSignNotEqualTo(String value) { + addCriterion("SIGN <>", value, "sign"); + return (Criteria) this; + } + + public Criteria andSignGreaterThan(String value) { + addCriterion("SIGN >", value, "sign"); + return (Criteria) this; + } + + public Criteria andSignGreaterThanOrEqualTo(String value) { + addCriterion("SIGN >=", value, "sign"); + return (Criteria) this; + } + + public Criteria andSignLessThan(String value) { + addCriterion("SIGN <", value, "sign"); + return (Criteria) this; + } + + public Criteria andSignLessThanOrEqualTo(String value) { + addCriterion("SIGN <=", value, "sign"); + return (Criteria) this; + } + + public Criteria andSignLike(String value) { + addCriterion("SIGN like", value, "sign"); + return (Criteria) this; + } + + public Criteria andSignNotLike(String value) { + addCriterion("SIGN not like", value, "sign"); + return (Criteria) this; + } + + public Criteria andSignIn(List values) { + addCriterion("SIGN in", values, "sign"); + return (Criteria) this; + } + + public Criteria andSignNotIn(List values) { + addCriterion("SIGN not in", values, "sign"); + return (Criteria) this; + } + + public Criteria andSignBetween(String value1, String value2) { + addCriterion("SIGN between", value1, value2, "sign"); + return (Criteria) this; + } + + public Criteria andSignNotBetween(String value1, String value2) { + addCriterion("SIGN not between", value1, value2, "sign"); + return (Criteria) this; + } + + public Criteria andBriefIntrodIsNull() { + addCriterion("BRIEF_INTROD is null"); + return (Criteria) this; + } + + public Criteria andBriefIntrodIsNotNull() { + addCriterion("BRIEF_INTROD is not null"); + return (Criteria) this; + } + + public Criteria andBriefIntrodEqualTo(String value) { + addCriterion("BRIEF_INTROD =", value, "briefIntrod"); + return (Criteria) this; + } + + public Criteria andBriefIntrodNotEqualTo(String value) { + addCriterion("BRIEF_INTROD <>", value, "briefIntrod"); + return (Criteria) this; + } + + public Criteria andBriefIntrodGreaterThan(String value) { + addCriterion("BRIEF_INTROD >", value, "briefIntrod"); + return (Criteria) this; + } + + public Criteria andBriefIntrodGreaterThanOrEqualTo(String value) { + addCriterion("BRIEF_INTROD >=", value, "briefIntrod"); + return (Criteria) this; + } + + public Criteria andBriefIntrodLessThan(String value) { + addCriterion("BRIEF_INTROD <", value, "briefIntrod"); + return (Criteria) this; + } + + public Criteria andBriefIntrodLessThanOrEqualTo(String value) { + addCriterion("BRIEF_INTROD <=", value, "briefIntrod"); + return (Criteria) this; + } + + public Criteria andBriefIntrodLike(String value) { + addCriterion("BRIEF_INTROD like", value, "briefIntrod"); + return (Criteria) this; + } + + public Criteria andBriefIntrodNotLike(String value) { + addCriterion("BRIEF_INTROD not like", value, "briefIntrod"); + return (Criteria) this; + } + + public Criteria andBriefIntrodIn(List values) { + addCriterion("BRIEF_INTROD in", values, "briefIntrod"); + return (Criteria) this; + } + + public Criteria andBriefIntrodNotIn(List values) { + addCriterion("BRIEF_INTROD not in", values, "briefIntrod"); + return (Criteria) this; + } + + public Criteria andBriefIntrodBetween(String value1, String value2) { + addCriterion("BRIEF_INTROD between", value1, value2, "briefIntrod"); + return (Criteria) this; + } + + public Criteria andBriefIntrodNotBetween(String value1, String value2) { + addCriterion("BRIEF_INTROD not between", value1, value2, "briefIntrod"); + return (Criteria) this; + } + } + + public static class Criteria extends GeneratedCriteria { + + protected Criteria() { + super(); + } + } + + public static class Criterion { + private String condition; + + private Object value; + + private Object secondValue; + + private boolean noValue; + + private boolean singleValue; + + private boolean betweenValue; + + private boolean listValue; + + private String typeHandler; + + public String getCondition() { + return condition; + } + + public Object getValue() { + return value; + } + + public Object getSecondValue() { + return secondValue; + } + + public boolean isNoValue() { + return noValue; + } + + public boolean isSingleValue() { + return singleValue; + } + + public boolean isBetweenValue() { + return betweenValue; + } + + public boolean isListValue() { + return listValue; + } + + public String getTypeHandler() { + return typeHandler; + } + + protected Criterion(String condition) { + super(); + this.condition = condition; + this.typeHandler = null; + this.noValue = true; + } + + protected Criterion(String condition, Object value, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.typeHandler = typeHandler; + if (value instanceof List) { + this.listValue = true; + } else { + this.singleValue = true; + } + } + + protected Criterion(String condition, Object value) { + this(condition, value, null); + } + + protected Criterion(String condition, Object value, Object secondValue, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.secondValue = secondValue; + this.typeHandler = typeHandler; + this.betweenValue = true; + } + + protected Criterion(String condition, Object value, Object secondValue) { + this(condition, value, secondValue, null); + } + } +} \ No newline at end of file diff --git a/itools-core/itools-model/src/main/java/com/itools/core/rbac/dto/UserRoleDTO.java b/itools-core/itools-model/src/main/java/com/itools/core/rbac/dto/UserRoleDTO.java new file mode 100644 index 0000000000000000000000000000000000000000..f13162dfb8c6b104c1c4f5fe6f52c45005d49b67 --- /dev/null +++ b/itools-core/itools-model/src/main/java/com/itools/core/rbac/dto/UserRoleDTO.java @@ -0,0 +1,93 @@ +package com.itools.core.rbac.dto; + +public class UserRoleDTO { + private String id; + + private String applicationId; + + private Long createTime; + + private String createUserId; + + private Long lastUpdateTime; + + private String lastUpdateUserId; + + private String roleId; + + private String userId; + + private Short type; + + public String getId() { + return id; + } + + public void setId(String id) { + this.id = id; + } + + public String getApplicationId() { + return applicationId; + } + + public void setApplicationId(String applicationId) { + this.applicationId = applicationId; + } + + public Long getCreateTime() { + return createTime; + } + + public void setCreateTime(Long createTime) { + this.createTime = createTime; + } + + public String getCreateUserId() { + return createUserId; + } + + public void setCreateUserId(String createUserId) { + this.createUserId = createUserId; + } + + public Long getLastUpdateTime() { + return lastUpdateTime; + } + + public void setLastUpdateTime(Long lastUpdateTime) { + this.lastUpdateTime = lastUpdateTime; + } + + public String getLastUpdateUserId() { + return lastUpdateUserId; + } + + public void setLastUpdateUserId(String lastUpdateUserId) { + this.lastUpdateUserId = lastUpdateUserId; + } + + public String getRoleId() { + return roleId; + } + + public void setRoleId(String roleId) { + this.roleId = roleId; + } + + public String getUserId() { + return userId; + } + + public void setUserId(String userId) { + this.userId = userId; + } + + public Short getType() { + return type; + } + + public void setType(Short type) { + this.type = type; + } +} \ No newline at end of file diff --git a/itools-core/itools-model/src/main/java/com/itools/core/rbac/dto/UserRoleDTOExample.java b/itools-core/itools-model/src/main/java/com/itools/core/rbac/dto/UserRoleDTOExample.java new file mode 100644 index 0000000000000000000000000000000000000000..945c23f19b83f0be95cc5ecb3b11939d0a8a3c36 --- /dev/null +++ b/itools-core/itools-model/src/main/java/com/itools/core/rbac/dto/UserRoleDTOExample.java @@ -0,0 +1,800 @@ +package com.itools.core.rbac.dto; + +import java.util.ArrayList; +import java.util.List; + +public class UserRoleDTOExample { + protected String orderByClause; + + protected boolean distinct; + + protected List oredCriteria; + + public UserRoleDTOExample() { + oredCriteria = new ArrayList(); + } + + public void setOrderByClause(String orderByClause) { + this.orderByClause = orderByClause; + } + + public String getOrderByClause() { + return orderByClause; + } + + public void setDistinct(boolean distinct) { + this.distinct = distinct; + } + + public boolean isDistinct() { + return distinct; + } + + public List getOredCriteria() { + return oredCriteria; + } + + public void or(Criteria criteria) { + oredCriteria.add(criteria); + } + + public Criteria or() { + Criteria criteria = createCriteriaInternal(); + oredCriteria.add(criteria); + return criteria; + } + + public Criteria createCriteria() { + Criteria criteria = createCriteriaInternal(); + if (oredCriteria.size() == 0) { + oredCriteria.add(criteria); + } + return criteria; + } + + protected Criteria createCriteriaInternal() { + Criteria criteria = new Criteria(); + return criteria; + } + + public void clear() { + oredCriteria.clear(); + orderByClause = null; + distinct = false; + } + + protected abstract static class GeneratedCriteria { + protected List criteria; + + protected GeneratedCriteria() { + super(); + criteria = new ArrayList(); + } + + public boolean isValid() { + return criteria.size() > 0; + } + + public List getAllCriteria() { + return criteria; + } + + public List getCriteria() { + return criteria; + } + + protected void addCriterion(String condition) { + if (condition == null) { + throw new RuntimeException("Value for condition cannot be null"); + } + criteria.add(new Criterion(condition)); + } + + protected void addCriterion(String condition, Object value, String property) { + if (value == null) { + throw new RuntimeException("Value for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value)); + } + + protected void addCriterion(String condition, Object value1, Object value2, String property) { + if (value1 == null || value2 == null) { + throw new RuntimeException("Between values for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value1, value2)); + } + + public Criteria andIdIsNull() { + addCriterion("ID is null"); + return (Criteria) this; + } + + public Criteria andIdIsNotNull() { + addCriterion("ID is not null"); + return (Criteria) this; + } + + public Criteria andIdEqualTo(String value) { + addCriterion("ID =", value, "id"); + return (Criteria) this; + } + + public Criteria andIdNotEqualTo(String value) { + addCriterion("ID <>", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThan(String value) { + addCriterion("ID >", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThanOrEqualTo(String value) { + addCriterion("ID >=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThan(String value) { + addCriterion("ID <", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThanOrEqualTo(String value) { + addCriterion("ID <=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLike(String value) { + addCriterion("ID like", value, "id"); + return (Criteria) this; + } + + public Criteria andIdNotLike(String value) { + addCriterion("ID not like", value, "id"); + return (Criteria) this; + } + + public Criteria andIdIn(List values) { + addCriterion("ID in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdNotIn(List values) { + addCriterion("ID not in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdBetween(String value1, String value2) { + addCriterion("ID between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andIdNotBetween(String value1, String value2) { + addCriterion("ID not between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andApplicationIdIsNull() { + addCriterion("APPLICATION_ID is null"); + return (Criteria) this; + } + + public Criteria andApplicationIdIsNotNull() { + addCriterion("APPLICATION_ID is not null"); + return (Criteria) this; + } + + public Criteria andApplicationIdEqualTo(String value) { + addCriterion("APPLICATION_ID =", value, "applicationId"); + return (Criteria) this; + } + + public Criteria andApplicationIdNotEqualTo(String value) { + addCriterion("APPLICATION_ID <>", value, "applicationId"); + return (Criteria) this; + } + + public Criteria andApplicationIdGreaterThan(String value) { + addCriterion("APPLICATION_ID >", value, "applicationId"); + return (Criteria) this; + } + + public Criteria andApplicationIdGreaterThanOrEqualTo(String value) { + addCriterion("APPLICATION_ID >=", value, "applicationId"); + return (Criteria) this; + } + + public Criteria andApplicationIdLessThan(String value) { + addCriterion("APPLICATION_ID <", value, "applicationId"); + return (Criteria) this; + } + + public Criteria andApplicationIdLessThanOrEqualTo(String value) { + addCriterion("APPLICATION_ID <=", value, "applicationId"); + return (Criteria) this; + } + + public Criteria andApplicationIdLike(String value) { + addCriterion("APPLICATION_ID like", value, "applicationId"); + return (Criteria) this; + } + + public Criteria andApplicationIdNotLike(String value) { + addCriterion("APPLICATION_ID not like", value, "applicationId"); + return (Criteria) this; + } + + public Criteria andApplicationIdIn(List values) { + addCriterion("APPLICATION_ID in", values, "applicationId"); + return (Criteria) this; + } + + public Criteria andApplicationIdNotIn(List values) { + addCriterion("APPLICATION_ID not in", values, "applicationId"); + return (Criteria) this; + } + + public Criteria andApplicationIdBetween(String value1, String value2) { + addCriterion("APPLICATION_ID between", value1, value2, "applicationId"); + return (Criteria) this; + } + + public Criteria andApplicationIdNotBetween(String value1, String value2) { + addCriterion("APPLICATION_ID not between", value1, value2, "applicationId"); + return (Criteria) this; + } + + public Criteria andCreateTimeIsNull() { + addCriterion("CREATE_TIME is null"); + return (Criteria) this; + } + + public Criteria andCreateTimeIsNotNull() { + addCriterion("CREATE_TIME is not null"); + return (Criteria) this; + } + + public Criteria andCreateTimeEqualTo(Long value) { + addCriterion("CREATE_TIME =", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeNotEqualTo(Long value) { + addCriterion("CREATE_TIME <>", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeGreaterThan(Long value) { + addCriterion("CREATE_TIME >", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeGreaterThanOrEqualTo(Long value) { + addCriterion("CREATE_TIME >=", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeLessThan(Long value) { + addCriterion("CREATE_TIME <", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeLessThanOrEqualTo(Long value) { + addCriterion("CREATE_TIME <=", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeIn(List values) { + addCriterion("CREATE_TIME in", values, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeNotIn(List values) { + addCriterion("CREATE_TIME not in", values, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeBetween(Long value1, Long value2) { + addCriterion("CREATE_TIME between", value1, value2, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeNotBetween(Long value1, Long value2) { + addCriterion("CREATE_TIME not between", value1, value2, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateUserIdIsNull() { + addCriterion("CREATE_USER_ID is null"); + return (Criteria) this; + } + + public Criteria andCreateUserIdIsNotNull() { + addCriterion("CREATE_USER_ID is not null"); + return (Criteria) this; + } + + public Criteria andCreateUserIdEqualTo(String value) { + addCriterion("CREATE_USER_ID =", value, "createUserId"); + return (Criteria) this; + } + + public Criteria andCreateUserIdNotEqualTo(String value) { + addCriterion("CREATE_USER_ID <>", value, "createUserId"); + return (Criteria) this; + } + + public Criteria andCreateUserIdGreaterThan(String value) { + addCriterion("CREATE_USER_ID >", value, "createUserId"); + return (Criteria) this; + } + + public Criteria andCreateUserIdGreaterThanOrEqualTo(String value) { + addCriterion("CREATE_USER_ID >=", value, "createUserId"); + return (Criteria) this; + } + + public Criteria andCreateUserIdLessThan(String value) { + addCriterion("CREATE_USER_ID <", value, "createUserId"); + return (Criteria) this; + } + + public Criteria andCreateUserIdLessThanOrEqualTo(String value) { + addCriterion("CREATE_USER_ID <=", value, "createUserId"); + return (Criteria) this; + } + + public Criteria andCreateUserIdLike(String value) { + addCriterion("CREATE_USER_ID like", value, "createUserId"); + return (Criteria) this; + } + + public Criteria andCreateUserIdNotLike(String value) { + addCriterion("CREATE_USER_ID not like", value, "createUserId"); + return (Criteria) this; + } + + public Criteria andCreateUserIdIn(List values) { + addCriterion("CREATE_USER_ID in", values, "createUserId"); + return (Criteria) this; + } + + public Criteria andCreateUserIdNotIn(List values) { + addCriterion("CREATE_USER_ID not in", values, "createUserId"); + return (Criteria) this; + } + + public Criteria andCreateUserIdBetween(String value1, String value2) { + addCriterion("CREATE_USER_ID between", value1, value2, "createUserId"); + return (Criteria) this; + } + + public Criteria andCreateUserIdNotBetween(String value1, String value2) { + addCriterion("CREATE_USER_ID not between", value1, value2, "createUserId"); + return (Criteria) this; + } + + public Criteria andLastUpdateTimeIsNull() { + addCriterion("LAST_UPDATE_TIME is null"); + return (Criteria) this; + } + + public Criteria andLastUpdateTimeIsNotNull() { + addCriterion("LAST_UPDATE_TIME is not null"); + return (Criteria) this; + } + + public Criteria andLastUpdateTimeEqualTo(Long value) { + addCriterion("LAST_UPDATE_TIME =", value, "lastUpdateTime"); + return (Criteria) this; + } + + public Criteria andLastUpdateTimeNotEqualTo(Long value) { + addCriterion("LAST_UPDATE_TIME <>", value, "lastUpdateTime"); + return (Criteria) this; + } + + public Criteria andLastUpdateTimeGreaterThan(Long value) { + addCriterion("LAST_UPDATE_TIME >", value, "lastUpdateTime"); + return (Criteria) this; + } + + public Criteria andLastUpdateTimeGreaterThanOrEqualTo(Long value) { + addCriterion("LAST_UPDATE_TIME >=", value, "lastUpdateTime"); + return (Criteria) this; + } + + public Criteria andLastUpdateTimeLessThan(Long value) { + addCriterion("LAST_UPDATE_TIME <", value, "lastUpdateTime"); + return (Criteria) this; + } + + public Criteria andLastUpdateTimeLessThanOrEqualTo(Long value) { + addCriterion("LAST_UPDATE_TIME <=", value, "lastUpdateTime"); + return (Criteria) this; + } + + public Criteria andLastUpdateTimeIn(List values) { + addCriterion("LAST_UPDATE_TIME in", values, "lastUpdateTime"); + return (Criteria) this; + } + + public Criteria andLastUpdateTimeNotIn(List values) { + addCriterion("LAST_UPDATE_TIME not in", values, "lastUpdateTime"); + return (Criteria) this; + } + + public Criteria andLastUpdateTimeBetween(Long value1, Long value2) { + addCriterion("LAST_UPDATE_TIME between", value1, value2, "lastUpdateTime"); + return (Criteria) this; + } + + public Criteria andLastUpdateTimeNotBetween(Long value1, Long value2) { + addCriterion("LAST_UPDATE_TIME not between", value1, value2, "lastUpdateTime"); + return (Criteria) this; + } + + public Criteria andLastUpdateUserIdIsNull() { + addCriterion("LAST_UPDATE_USER_ID is null"); + return (Criteria) this; + } + + public Criteria andLastUpdateUserIdIsNotNull() { + addCriterion("LAST_UPDATE_USER_ID is not null"); + return (Criteria) this; + } + + public Criteria andLastUpdateUserIdEqualTo(String value) { + addCriterion("LAST_UPDATE_USER_ID =", value, "lastUpdateUserId"); + return (Criteria) this; + } + + public Criteria andLastUpdateUserIdNotEqualTo(String value) { + addCriterion("LAST_UPDATE_USER_ID <>", value, "lastUpdateUserId"); + return (Criteria) this; + } + + public Criteria andLastUpdateUserIdGreaterThan(String value) { + addCriterion("LAST_UPDATE_USER_ID >", value, "lastUpdateUserId"); + return (Criteria) this; + } + + public Criteria andLastUpdateUserIdGreaterThanOrEqualTo(String value) { + addCriterion("LAST_UPDATE_USER_ID >=", value, "lastUpdateUserId"); + return (Criteria) this; + } + + public Criteria andLastUpdateUserIdLessThan(String value) { + addCriterion("LAST_UPDATE_USER_ID <", value, "lastUpdateUserId"); + return (Criteria) this; + } + + public Criteria andLastUpdateUserIdLessThanOrEqualTo(String value) { + addCriterion("LAST_UPDATE_USER_ID <=", value, "lastUpdateUserId"); + return (Criteria) this; + } + + public Criteria andLastUpdateUserIdLike(String value) { + addCriterion("LAST_UPDATE_USER_ID like", value, "lastUpdateUserId"); + return (Criteria) this; + } + + public Criteria andLastUpdateUserIdNotLike(String value) { + addCriterion("LAST_UPDATE_USER_ID not like", value, "lastUpdateUserId"); + return (Criteria) this; + } + + public Criteria andLastUpdateUserIdIn(List values) { + addCriterion("LAST_UPDATE_USER_ID in", values, "lastUpdateUserId"); + return (Criteria) this; + } + + public Criteria andLastUpdateUserIdNotIn(List values) { + addCriterion("LAST_UPDATE_USER_ID not in", values, "lastUpdateUserId"); + return (Criteria) this; + } + + public Criteria andLastUpdateUserIdBetween(String value1, String value2) { + addCriterion("LAST_UPDATE_USER_ID between", value1, value2, "lastUpdateUserId"); + return (Criteria) this; + } + + public Criteria andLastUpdateUserIdNotBetween(String value1, String value2) { + addCriterion("LAST_UPDATE_USER_ID not between", value1, value2, "lastUpdateUserId"); + return (Criteria) this; + } + + public Criteria andRoleIdIsNull() { + addCriterion("ROLE_ID is null"); + return (Criteria) this; + } + + public Criteria andRoleIdIsNotNull() { + addCriterion("ROLE_ID is not null"); + return (Criteria) this; + } + + public Criteria andRoleIdEqualTo(String value) { + addCriterion("ROLE_ID =", value, "roleId"); + return (Criteria) this; + } + + public Criteria andRoleIdNotEqualTo(String value) { + addCriterion("ROLE_ID <>", value, "roleId"); + return (Criteria) this; + } + + public Criteria andRoleIdGreaterThan(String value) { + addCriterion("ROLE_ID >", value, "roleId"); + return (Criteria) this; + } + + public Criteria andRoleIdGreaterThanOrEqualTo(String value) { + addCriterion("ROLE_ID >=", value, "roleId"); + return (Criteria) this; + } + + public Criteria andRoleIdLessThan(String value) { + addCriterion("ROLE_ID <", value, "roleId"); + return (Criteria) this; + } + + public Criteria andRoleIdLessThanOrEqualTo(String value) { + addCriterion("ROLE_ID <=", value, "roleId"); + return (Criteria) this; + } + + public Criteria andRoleIdLike(String value) { + addCriterion("ROLE_ID like", value, "roleId"); + return (Criteria) this; + } + + public Criteria andRoleIdNotLike(String value) { + addCriterion("ROLE_ID not like", value, "roleId"); + return (Criteria) this; + } + + public Criteria andRoleIdIn(List values) { + addCriterion("ROLE_ID in", values, "roleId"); + return (Criteria) this; + } + + public Criteria andRoleIdNotIn(List values) { + addCriterion("ROLE_ID not in", values, "roleId"); + return (Criteria) this; + } + + public Criteria andRoleIdBetween(String value1, String value2) { + addCriterion("ROLE_ID between", value1, value2, "roleId"); + return (Criteria) this; + } + + public Criteria andRoleIdNotBetween(String value1, String value2) { + addCriterion("ROLE_ID not between", value1, value2, "roleId"); + return (Criteria) this; + } + + public Criteria andUserIdIsNull() { + addCriterion("USER_ID is null"); + return (Criteria) this; + } + + public Criteria andUserIdIsNotNull() { + addCriterion("USER_ID is not null"); + return (Criteria) this; + } + + public Criteria andUserIdEqualTo(String value) { + addCriterion("USER_ID =", value, "userId"); + return (Criteria) this; + } + + public Criteria andUserIdNotEqualTo(String value) { + addCriterion("USER_ID <>", value, "userId"); + return (Criteria) this; + } + + public Criteria andUserIdGreaterThan(String value) { + addCriterion("USER_ID >", value, "userId"); + return (Criteria) this; + } + + public Criteria andUserIdGreaterThanOrEqualTo(String value) { + addCriterion("USER_ID >=", value, "userId"); + return (Criteria) this; + } + + public Criteria andUserIdLessThan(String value) { + addCriterion("USER_ID <", value, "userId"); + return (Criteria) this; + } + + public Criteria andUserIdLessThanOrEqualTo(String value) { + addCriterion("USER_ID <=", value, "userId"); + return (Criteria) this; + } + + public Criteria andUserIdLike(String value) { + addCriterion("USER_ID like", value, "userId"); + return (Criteria) this; + } + + public Criteria andUserIdNotLike(String value) { + addCriterion("USER_ID not like", value, "userId"); + return (Criteria) this; + } + + public Criteria andUserIdIn(List values) { + addCriterion("USER_ID in", values, "userId"); + return (Criteria) this; + } + + public Criteria andUserIdNotIn(List values) { + addCriterion("USER_ID not in", values, "userId"); + return (Criteria) this; + } + + public Criteria andUserIdBetween(String value1, String value2) { + addCriterion("USER_ID between", value1, value2, "userId"); + return (Criteria) this; + } + + public Criteria andUserIdNotBetween(String value1, String value2) { + addCriterion("USER_ID not between", value1, value2, "userId"); + return (Criteria) this; + } + + public Criteria andTypeIsNull() { + addCriterion("TYPE is null"); + return (Criteria) this; + } + + public Criteria andTypeIsNotNull() { + addCriterion("TYPE is not null"); + return (Criteria) this; + } + + public Criteria andTypeEqualTo(Short value) { + addCriterion("TYPE =", value, "type"); + return (Criteria) this; + } + + public Criteria andTypeNotEqualTo(Short value) { + addCriterion("TYPE <>", value, "type"); + return (Criteria) this; + } + + public Criteria andTypeGreaterThan(Short value) { + addCriterion("TYPE >", value, "type"); + return (Criteria) this; + } + + public Criteria andTypeGreaterThanOrEqualTo(Short value) { + addCriterion("TYPE >=", value, "type"); + return (Criteria) this; + } + + public Criteria andTypeLessThan(Short value) { + addCriterion("TYPE <", value, "type"); + return (Criteria) this; + } + + public Criteria andTypeLessThanOrEqualTo(Short value) { + addCriterion("TYPE <=", value, "type"); + return (Criteria) this; + } + + public Criteria andTypeIn(List values) { + addCriterion("TYPE in", values, "type"); + return (Criteria) this; + } + + public Criteria andTypeNotIn(List values) { + addCriterion("TYPE not in", values, "type"); + return (Criteria) this; + } + + public Criteria andTypeBetween(Short value1, Short value2) { + addCriterion("TYPE between", value1, value2, "type"); + return (Criteria) this; + } + + public Criteria andTypeNotBetween(Short value1, Short value2) { + addCriterion("TYPE not between", value1, value2, "type"); + return (Criteria) this; + } + } + + public static class Criteria extends GeneratedCriteria { + + protected Criteria() { + super(); + } + } + + public static class Criterion { + private String condition; + + private Object value; + + private Object secondValue; + + private boolean noValue; + + private boolean singleValue; + + private boolean betweenValue; + + private boolean listValue; + + private String typeHandler; + + public String getCondition() { + return condition; + } + + public Object getValue() { + return value; + } + + public Object getSecondValue() { + return secondValue; + } + + public boolean isNoValue() { + return noValue; + } + + public boolean isSingleValue() { + return singleValue; + } + + public boolean isBetweenValue() { + return betweenValue; + } + + public boolean isListValue() { + return listValue; + } + + public String getTypeHandler() { + return typeHandler; + } + + protected Criterion(String condition) { + super(); + this.condition = condition; + this.typeHandler = null; + this.noValue = true; + } + + protected Criterion(String condition, Object value, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.typeHandler = typeHandler; + if (value instanceof List) { + this.listValue = true; + } else { + this.singleValue = true; + } + } + + protected Criterion(String condition, Object value) { + this(condition, value, null); + } + + protected Criterion(String condition, Object value, Object secondValue, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.secondValue = secondValue; + this.typeHandler = typeHandler; + this.betweenValue = true; + } + + protected Criterion(String condition, Object value, Object secondValue) { + this(condition, value, secondValue, null); + } + } +} \ No newline at end of file diff --git a/itools-core/itools-model/src/main/java/com/itools/core/rbac/initDB/InitDBInsertDTO.java b/itools-core/itools-model/src/main/java/com/itools/core/rbac/initDB/InitDBInsertDTO.java new file mode 100644 index 0000000000000000000000000000000000000000..634fdd5c3a1e23e750f6a5b460724c860f1d3b79 --- /dev/null +++ b/itools-core/itools-model/src/main/java/com/itools/core/rbac/initDB/InitDBInsertDTO.java @@ -0,0 +1,38 @@ +package com.itools.core.rbac.initDB; + +import lombok.Data; + +import java.util.Date; + +/** + * @Author XUCHANG + * @description: + * @Date 2020/9/11 9:57 + */ +@Data +public class InitDBInsertDTO { + /** + * id + */ + private String id; + /** + * 执行的sql + */ + private String content; + /** + * 类型,ddl,dml,function + */ + private String type; + /** + * 版本 + */ + private String version; + /** + * 创建时间 + */ + private Date createTime; + /** + * 分支,环境 + */ + private String env; +} diff --git a/itools-core/itools-model/src/main/java/com/itools/core/rbac/initDB/InitDBQueryDTO.java b/itools-core/itools-model/src/main/java/com/itools/core/rbac/initDB/InitDBQueryDTO.java new file mode 100644 index 0000000000000000000000000000000000000000..e2f6b7b6a9f1b5557af48b07157ccff15fca01ff --- /dev/null +++ b/itools-core/itools-model/src/main/java/com/itools/core/rbac/initDB/InitDBQueryDTO.java @@ -0,0 +1,38 @@ +package com.itools.core.rbac.initDB; + +import lombok.Data; + +import java.util.Date; + +/** + * @Author XUCHANG + * @description: + * @Date 2020/9/11 9:57 + */ +@Data +public class InitDBQueryDTO { + /** + * id + */ + private String id; + /** + * 执行的sql + */ + private String content; + /** + * 类型,ddl,dml,function + */ + private String type; + /** + * 版本 + */ + private String version; + /** + * 创建时间 + */ + private Date createTime; + /** + * 分支,环境 + */ + private String env; +} diff --git a/itools-core/itools-model/src/main/java/com/itools/core/rbac/initDB/InitDBResultDTO.java b/itools-core/itools-model/src/main/java/com/itools/core/rbac/initDB/InitDBResultDTO.java new file mode 100644 index 0000000000000000000000000000000000000000..879ba43ba06bd6650b9c5c7a6eac0e37f030774b --- /dev/null +++ b/itools-core/itools-model/src/main/java/com/itools/core/rbac/initDB/InitDBResultDTO.java @@ -0,0 +1,38 @@ +package com.itools.core.rbac.initDB; + +import lombok.Data; + +import java.util.Date; + +/** + * @Author XUCHANG + * @description: + * @Date 2020/9/11 9:57 + */ +@Data +public class InitDBResultDTO { + /** + * id + */ + private String id; + /** + * 执行的sql + */ + private String content; + /** + * 类型,ddl,dml,function + */ + private String type; + /** + * 版本 + */ + private String version; + /** + * 创建时间 + */ + private Date createTime; + /** + * 分支,环境 + */ + private String env; +} diff --git a/itools-core/itools-model/src/main/java/com/itools/core/rbac/param/initDB/InitDBInsertParam.java b/itools-core/itools-model/src/main/java/com/itools/core/rbac/param/initDB/InitDBInsertParam.java new file mode 100644 index 0000000000000000000000000000000000000000..42b36d9cf637f0446142a1e88b8f168c647f32a2 --- /dev/null +++ b/itools-core/itools-model/src/main/java/com/itools/core/rbac/param/initDB/InitDBInsertParam.java @@ -0,0 +1,16 @@ +package com.itools.core.rbac.param.initDB; + +import lombok.Data; + +/** + * @Author XUCHANG + * @description: + * @Date 2020/9/11 9:57 + */ +@Data +public class InitDBInsertParam { + private String content; + private String type; + private String version; + private String env; +} diff --git a/itools-core/itools-model/src/main/java/com/itools/core/rbac/param/initDB/InitDBQueryParam.java b/itools-core/itools-model/src/main/java/com/itools/core/rbac/param/initDB/InitDBQueryParam.java new file mode 100644 index 0000000000000000000000000000000000000000..f7d17d7a1cf07dad7f0cb348dd95b3c3a327251b --- /dev/null +++ b/itools-core/itools-model/src/main/java/com/itools/core/rbac/param/initDB/InitDBQueryParam.java @@ -0,0 +1,20 @@ +package com.itools.core.rbac.param.initDB; + +import lombok.Data; + +import java.util.Date; + +/** + * @Author XUCHANG + * @description: + * @Date 2020/9/11 9:57 + */ +@Data +public class InitDBQueryParam { + private String id; + private String content; + private String type; + private String version; + private Date createTime; + private String env; +} diff --git a/itools-core/itools-model/src/main/java/com/itools/core/rbac/param/initDB/InitDBResult.java b/itools-core/itools-model/src/main/java/com/itools/core/rbac/param/initDB/InitDBResult.java new file mode 100644 index 0000000000000000000000000000000000000000..760a6311772e5e70f95c738a1be75dc3d483d319 --- /dev/null +++ b/itools-core/itools-model/src/main/java/com/itools/core/rbac/param/initDB/InitDBResult.java @@ -0,0 +1,20 @@ +package com.itools.core.rbac.param.initDB; + +import lombok.Data; + +import java.util.Date; + +/** + * @Author XUCHANG + * @description: + * @Date 2020/9/11 9:57 + */ +@Data +public class InitDBResult { + private String id; + private String content; + private String type; + private String version; + private Date createTime; + private String env; +} diff --git a/itools-core/itools-model/src/main/resources/logback-spring.xml b/itools-core/itools-model/src/main/resources/logback-spring.xml new file mode 100644 index 0000000000000000000000000000000000000000..2fbb2b605fad5988b36f879bdfc1067b432743ac --- /dev/null +++ b/itools-core/itools-model/src/main/resources/logback-spring.xml @@ -0,0 +1,21 @@ + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/itools-core/itools-model/src/main/resources/mybatis-config.xml b/itools-core/itools-model/src/main/resources/mybatis-config.xml new file mode 100644 index 0000000000000000000000000000000000000000..87c2a3202fc51e831e50903b9f3a75a44ce08307 --- /dev/null +++ b/itools-core/itools-model/src/main/resources/mybatis-config.xml @@ -0,0 +1,12 @@ + + + + + + + + + + \ No newline at end of file diff --git a/itools-core/itools-utils/pom.xml b/itools-core/itools-utils/pom.xml new file mode 100644 index 0000000000000000000000000000000000000000..e6e8c17acff839b410faa70054c99f82fc0bafd7 --- /dev/null +++ b/itools-core/itools-utils/pom.xml @@ -0,0 +1,60 @@ + + + + itools-core + com.itools.core + 1.0-SNAPSHOT + + 4.0.0 + + itools-utils + + + javax.servlet + javax.servlet-api + + + org.springframework.boot + spring-boot-starter-logging + + + org.apache.httpcomponents + httpclient + 4.5.3 + + + net.lingala.zip4j + zip4j + 1.3.1 + + + org.springframework.security + spring-security-crypto + 4.2.3.RELEASE + + + org.springframework.security + spring-security-jwt + 1.0.8.RELEASE + + + com.alibaba + fastjson + + + commons-io + commons-io + + + org.apache.commons + commons-lang3 + + + org.projectlombok + lombok + + + + \ No newline at end of file diff --git a/itools-core/itools-utils/src/main/java/com/itools/core/utils/AesUtils.java b/itools-core/itools-utils/src/main/java/com/itools/core/utils/AesUtils.java new file mode 100644 index 0000000000000000000000000000000000000000..85707ead1291edde880ea90846f343df471bcc09 --- /dev/null +++ b/itools-core/itools-utils/src/main/java/com/itools/core/utils/AesUtils.java @@ -0,0 +1,81 @@ +package com.itools.core.utils; + +import javax.crypto.Cipher; +import javax.crypto.SecretKey; +import javax.crypto.spec.SecretKeySpec; +import java.security.Key; + + +public class AesUtils { + + public final static String CHARSET = "utf-8"; + + /** + * 密钥算法 + */ + public final static String KEY_ALGORITHM = "AES"; + + /** + * 加密算法/工作模式/填充方式 + */ + public final static String CIPHER_ALGORITHM = "AES/ECB/PKCS5Padding"; + + + /** + * 转换密钥 + * + * @param key + * @return + * @throws Exception + */ + private static Key toKey(byte[] key) throws Exception { + // 生成秘密密钥 + SecretKey secretKey = new SecretKeySpec(key, KEY_ALGORITHM); + return secretKey; + } + + /** + * 解密 + * + * @param data + * @param key + * @return + * @throws Exception + */ + public static String decrypt(String data, String key) throws Exception { + // 还原密钥 + Key k = toKey(key.getBytes()); + // 实例化 + Cipher cipher = Cipher.getInstance(CIPHER_ALGORITHM); + // 初始化, 设置为解密模式 + cipher.init(Cipher.DECRYPT_MODE, k); + // 执行操作 + return new String(cipher.doFinal(org.apache.commons.codec.binary.Base64.decodeBase64(data))); + } + + /** + * 加密 + * + * @param data + * @param key 16位 + * @return + * @throws Exception + */ + public static String encrypt(String data, String key) throws Exception { + // 还原密钥 + Key k = toKey(key.getBytes()); + // 实例化 + Cipher cipher = Cipher.getInstance(CIPHER_ALGORITHM); + // 初始化, 设置为加密模式 + cipher.init(Cipher.ENCRYPT_MODE, k); + // 执行操作 + return new String(org.apache.commons.codec.binary.Base64.encodeBase64(cipher.doFinal(data.getBytes())), CHARSET); + + } + + public static void main(String[] args) throws Exception { + //高级加密标准,是下一代的加密算法标准,速度快,安全级别高, key的长度为16位 + String encrypt = AesUtils.encrypt("11", "hashtechiright00"); + System.out.println(encrypt); + } +} diff --git a/itools-core/itools-utils/src/main/java/com/itools/core/utils/BCryptUtil.java b/itools-core/itools-utils/src/main/java/com/itools/core/utils/BCryptUtil.java new file mode 100644 index 0000000000000000000000000000000000000000..052f9fc6970279a423624a0cc1d01e9f750ddd77 --- /dev/null +++ b/itools-core/itools-utils/src/main/java/com/itools/core/utils/BCryptUtil.java @@ -0,0 +1,21 @@ +package com.itools.core.utils; + +import org.springframework.security.crypto.bcrypt.BCryptPasswordEncoder; +import org.springframework.security.crypto.password.PasswordEncoder; + +/** + * @description: + * @author: XUCHANG + */ +public class BCryptUtil { + public static String encode(String password){ + PasswordEncoder passwordEncoder = new BCryptPasswordEncoder(); + String hashPass = passwordEncoder.encode(password); + return hashPass; + } + public static boolean matches(String password,String hashPass){ + PasswordEncoder passwordEncoder = new BCryptPasswordEncoder(); + boolean f = passwordEncoder.matches(password, hashPass); + return f; + } +} diff --git a/itools-core/itools-utils/src/main/java/com/itools/core/utils/CharCheckUtils.java b/itools-core/itools-utils/src/main/java/com/itools/core/utils/CharCheckUtils.java new file mode 100644 index 0000000000000000000000000000000000000000..0bc461e999b2fed77401bd127173ea077a8147fb --- /dev/null +++ b/itools-core/itools-utils/src/main/java/com/itools/core/utils/CharCheckUtils.java @@ -0,0 +1,62 @@ +package com.itools.core.utils; + +import java.util.List; + +/** + * @description: + * @author: XUCHANG + */ +public class CharCheckUtils { + + /** + * 手机号码前三后四脱敏 + * @param mobile + * @return + */ + public static String mobileEncrypt(String mobile) { + if (StringUtils.isEmpty(mobile) || (mobile.length() != 11)) { + return mobile; + } + return mobile.replaceAll("(\\d{3})\\d{4}(\\d{4})", "$1****$2"); + } + + /** + * 身份证前三后四脱敏 + * @param id + * @return + */ + public static String idEncrypt(String id) { + if (StringUtils.isEmpty(id) || (id.length() < 8)) { + return id; + } + return id.replaceAll("(?<=\\w{3})\\w(?=\\w{4})", "*"); + } + + /** + * 护照前2后3位脱敏,护照一般为8或9位 + * @param id + * @return + */ + public static String idPassport(String id) { + if (StringUtils.isEmpty(id) || (id.length() < 8)) { + return id; + } + return id.substring(0, 2) + new String(new char[id.length() - 5]).replace("\0", "*") + id.substring(id.length() - 3); + } + + /** + * 判断list是否相同 + * @param list1 + * @param list2 + * @return + */ + public static boolean isEquals(List list1, List list2){ + if(null != list1 && null != list2){ + if(list1.containsAll(list2) && list2.containsAll(list1)){ + return true; + } + return false; + } + return true; + } +} diff --git a/itools-core/itools-utils/src/main/java/com/itools/core/utils/CollectionUtils.java b/itools-core/itools-utils/src/main/java/com/itools/core/utils/CollectionUtils.java new file mode 100644 index 0000000000000000000000000000000000000000..9a7726949cf8557b479a1f161f1052d42c42f61e --- /dev/null +++ b/itools-core/itools-utils/src/main/java/com/itools/core/utils/CollectionUtils.java @@ -0,0 +1,368 @@ +/* + * Copyright 2002-2010 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.itools.core.utils; + +import java.util.*; + +/** + * @description: + * @author: XUCHANG + */ +public abstract class CollectionUtils { + + /** + * Return true if the supplied Collection is null + * or empty. Otherwise, return false. + * @param collection the Collection to check + * @return whether the given Collection is empty + */ + public static boolean isEmpty(Collection collection) { + return (collection == null || collection.isEmpty()); + } + + /** + * Return true if the supplied Map is null + * or empty. Otherwise, return false. + * @param map the Map to check + * @return whether the given Map is empty + */ + public static boolean isEmpty(Map map) { + return (map == null || map.isEmpty()); + } + + /** + * Convert the supplied array into a List. A primitive array gets + * converted into a List of the appropriate wrapper type. + *

A null source value will be converted to an + * empty List. + * @param source the (potentially primitive) array + * @return the converted List result + * @see ObjectUtils#toObjectArray(Object) + */ + public static List arrayToList(Object source) { + return Arrays.asList(ObjectUtils.toObjectArray(source)); + } + + public static List arrayToList(T[] source) { + List list = Utils.newArrayList(); + if(source != null) { + for(T item: source) { + list.add(item); + } + } + return list; + } + + /** + * Merge the given array into the given Collection. + * @param array the array to merge (may be null) + * @param collection the target Collection to merge the array into + */ + @SuppressWarnings("unchecked") + public static void mergeArrayIntoCollection(Object array, Collection collection) { + if (collection == null) { + throw new IllegalArgumentException("Collection must not be null"); + } + Object[] arr = ObjectUtils.toObjectArray(array); + for (Object elem : arr) { + collection.add(elem); + } + } + + /** + * Merge the given Properties instance into the given Map, + * copying all properties (key-value pairs) over. + *

Uses Properties.propertyNames() to even catch + * default properties linked into the original Properties instance. + * @param props the Properties instance to merge (may be null) + * @param map the target Map to merge the properties into + */ + @SuppressWarnings("unchecked") + public static void mergePropertiesIntoMap(Properties props, Map map) { + if (map == null) { + throw new IllegalArgumentException("Map must not be null"); + } + if (props != null) { + for (Enumeration en = props.propertyNames(); en.hasMoreElements();) { + String key = (String) en.nextElement(); + Object value = props.getProperty(key); + if (value == null) { + // Potentially a non-String value... + value = props.get(key); + } + map.put(key, value); + } + } + } + + + /** + * Check whether the given Iterator contains the given element. + * @param iterator the Iterator to check + * @param element the element to look for + * @return true if found, false else + */ + public static boolean contains(Iterator iterator, Object element) { + if (iterator != null) { + while (iterator.hasNext()) { + Object candidate = iterator.next(); + if (ObjectUtils.nullSafeEquals(candidate, element)) { + return true; + } + } + } + return false; + } + + /** + * Check whether the given Enumeration contains the given element. + * @param enumeration the Enumeration to check + * @param element the element to look for + * @return true if found, false else + */ + public static boolean contains(Enumeration enumeration, Object element) { + if (enumeration != null) { + while (enumeration.hasMoreElements()) { + Object candidate = enumeration.nextElement(); + if (ObjectUtils.nullSafeEquals(candidate, element)) { + return true; + } + } + } + return false; + } + + /** + * Check whether the given Collection contains the given element instance. + *

Enforces the given instance to be present, rather than returning + * true for an equal element as well. + * @param collection the Collection to check + * @param element the element to look for + * @return true if found, false else + */ + public static boolean containsInstance(Collection collection, Object element) { + if (collection != null) { + for (Object candidate : collection) { + if (candidate == element) { + return true; + } + } + } + return false; + } + + /** + * Return true if any element in 'candidates' is + * contained in 'source'; otherwise returns false. + * @param source the source Collection + * @param candidates the candidates to search for + * @return whether any of the candidates has been found + */ + public static boolean containsAny(Collection source, Collection candidates) { + if (isEmpty(source) || isEmpty(candidates)) { + return false; + } + for (Object candidate : candidates) { + if (source.contains(candidate)) { + return true; + } + } + return false; + } + + /** + * Return the first element in 'candidates' that is contained in + * 'source'. If no element in 'candidates' is present in + * 'source' returns null. Iteration order is + * {@link Collection} implementation specific. + * @param source the source Collection + * @param candidates the candidates to search for + * @return the first present object, or null if not found + */ + public static Object findFirstMatch(Collection source, Collection candidates) { + if (isEmpty(source) || isEmpty(candidates)) { + return null; + } + for (Object candidate : candidates) { + if (source.contains(candidate)) { + return candidate; + } + } + return null; + } + + /** + * Find a single value of the given type in the given Collection. + * @param collection the Collection to search + * @param type the type to look for + * @return a value of the given type found if there is a clear match, + * or null if none or more than one such value found + */ + @SuppressWarnings("unchecked") + public static T findValueOfType(Collection collection, Class type) { + if (isEmpty(collection)) { + return null; + } + T value = null; + for (Object element : collection) { + if (type == null || type.isInstance(element)) { + if (value != null) { + // More than one value found... no clear single value. + return null; + } + value = (T) element; + } + } + return value; + } + + /** + * Find a single value of one of the given types in the given Collection: + * searching the Collection for a value of the first type, then + * searching for a value of the second type, etc. + * @param collection the collection to search + * @param types the types to look for, in prioritized order + * @return a value of one of the given types found if there is a clear match, + * or null if none or more than one such value found + */ + public static Object findValueOfType(Collection collection, Class[] types) { + if (isEmpty(collection) || ObjectUtils.isEmpty(types)) { + return null; + } + for (Class type : types) { + Object value = findValueOfType(collection, type); + if (value != null) { + return value; + } + } + return null; + } + + /** + * Determine whether the given Collection only contains a single unique object. + * @param collection the Collection to check + * @return true if the collection contains a single reference or + * multiple references to the same instance, false else + */ + public static boolean hasUniqueObject(Collection collection) { + if (isEmpty(collection)) { + return false; + } + boolean hasCandidate = false; + Object candidate = null; + for (Object elem : collection) { + if (!hasCandidate) { + hasCandidate = true; + candidate = elem; + } + else if (candidate != elem) { + return false; + } + } + return true; + } + + /** + * Find the common element type of the given Collection, if any. + * @param collection the Collection to check + * @return the common element type, or null if no clear + * common type has been found (or the collection was empty) + */ + public static Class findCommonElementType(Collection collection) { + if (isEmpty(collection)) { + return null; + } + Class candidate = null; + for (Object val : collection) { + if (val != null) { + if (candidate == null) { + candidate = val.getClass(); + } + else if (candidate != val.getClass()) { + return null; + } + } + } + return candidate; + } + + /** + * Adapts an enumeration to an iterator. + * @param enumeration the enumeration + * @return the iterator + */ + public static Iterator toIterator(Enumeration enumeration) { + return new EnumerationIterator(enumeration); + } + + /** + * @return item's property in oneCollection but not in otherCollection,ignore null values + */ + public static Collection> notExistsItems(Collection> oneCollection, + Collection> otherCollection, String oneProperty, String otherProperty) { + + Collection> result = Utils.newArrayList(); + for(Map oneItem: oneCollection) { + if(oneItem.get(oneProperty) == null) { + continue; + } + + String oneItemPropertyValue = oneItem.get(oneProperty).toString(); + boolean found = false; + for(Map otherItem: otherCollection) { + String otherItemPropertyValue = otherItem.get(otherProperty) == null? null:otherItem.get(otherProperty).toString(); + if(StringUtils.equals(oneItemPropertyValue, otherItemPropertyValue)) { + found = true; + break; + } + } + // + if(found) { + result.add(oneItem); + } + } + return result; + } + + /** + * Iterator wrapping an Enumeration. + */ + private static class EnumerationIterator implements Iterator { + + private Enumeration enumeration; + + public EnumerationIterator(Enumeration enumeration) { + this.enumeration = enumeration; + } + + @Override + public boolean hasNext() { + return this.enumeration.hasMoreElements(); + } + + @Override + public E next() { + return this.enumeration.nextElement(); + } + + @Override + public void remove() throws UnsupportedOperationException { + throw new UnsupportedOperationException("Not supported"); + } + } + +} diff --git a/itools-core/itools-utils/src/main/java/com/itools/core/utils/CookieUtil.java b/itools-core/itools-utils/src/main/java/com/itools/core/utils/CookieUtil.java new file mode 100644 index 0000000000000000000000000000000000000000..a941934eb66d1a298b6ec6e3cd8a37d38294ffbc --- /dev/null +++ b/itools-core/itools-utils/src/main/java/com/itools/core/utils/CookieUtil.java @@ -0,0 +1,109 @@ +package com.itools.core.utils; + +import javax.servlet.http.Cookie; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; +import java.util.HashMap; +import java.util.Map; + +/** + * @description: + * @author: XUCHANG + */ +public class CookieUtil { + + /** + * 设置cookie + * + * @param response + * @param name cookie名字 + * @param value cookie值 + * @param maxAge cookie生命周期 以秒为单位 + */ + public static void addCookie(HttpServletResponse response,String domain,String path, String name, + String value, int maxAge,boolean httpOnly) { + Cookie cookie = new Cookie(name, value); + cookie.setDomain(domain); + cookie.setPath(path); + cookie.setMaxAge(maxAge); + cookie.setHttpOnly(httpOnly); + response.addCookie(cookie); + } + + public static void setCookie(HttpServletResponse response,String path, String name, + String value, int maxAge) { + Cookie cookie = new Cookie(name, value); + cookie.setPath(path); + cookie.setMaxAge(maxAge); + response.addCookie(cookie); + } + + public static void updateCookie(HttpServletRequest request,HttpServletResponse response,String path, String name, + String value, int maxAge) { + deleteCookie(request.getCookies(),name); + setCookie(response,path,name,value,maxAge); + } + + public static void updateCookie(HttpServletRequest request,HttpServletResponse response,String domain,String path, String name, + String value, int maxAge,boolean httpOnly) { + deleteCookie(request.getCookies(),name); + addCookie(response,domain,path,name,value,maxAge,httpOnly); + } + + + + /** + * 根据cookie名称读取cookie + * @param request + * @return map + */ + + public static Map readCookie(HttpServletRequest request,String ... cookieNames) { + Map cookieMap = new HashMap(); + Cookie[] cookies = request.getCookies(); + if (cookies != null) { + for (Cookie cookie : cookies) { + String cookieName = cookie.getName(); + String cookieValue = cookie.getValue(); + for(int i=0;i0) { + for (Cookie cookie : cookies) { + String cookieName = cookie.getName(); + if (StringUtils.equals(cookieName,name)){ + token = cookie.getValue(); + } + } + } + return token; + } + public static void deleteCookie(Cookie[] cookies,String name) { + + if (cookies != null && cookies.length>0) { + for (Cookie cookie : cookies) { + String cookieName = cookie.getName(); + if (StringUtils.equals(cookieName,name)){ + cookie.setMaxAge(-1); + } + } + } + } +} diff --git a/itools-core/itools-utils/src/main/java/com/itools/core/utils/DateUtils.java b/itools-core/itools-utils/src/main/java/com/itools/core/utils/DateUtils.java new file mode 100644 index 0000000000000000000000000000000000000000..aeef54f21615e5f8c550d03b784eb355b5806bed --- /dev/null +++ b/itools-core/itools-utils/src/main/java/com/itools/core/utils/DateUtils.java @@ -0,0 +1,756 @@ +package com.itools.core.utils; + +import java.sql.Timestamp; +import java.text.SimpleDateFormat; +import java.util.Calendar; +import java.util.Date; +import java.util.GregorianCalendar; +import java.util.SimpleTimeZone; + +/** + * @description: + * @author: XUCHANG + * @time: 2019/12/12 14:17 + */ +public final class DateUtils { + + private static final String DEFAULT_DATE_FORMAT = "yyyy-MM-dd"; + + private static final String DEFAULT_DATETIME_FORMAT = "yyyy-MM-dd HH:mm:ss"; + + private static final String DATETIME_FORMAT = "yyyyMMddHHmmss"; + + private static final String DEFAULT_TIME_FORMAT = "HH:mm:ss"; + + private static SimpleDateFormat dateFormat = new SimpleDateFormat(DEFAULT_DATE_FORMAT); + + private static SimpleDateFormat dateTimeFormat = new SimpleDateFormat(DEFAULT_DATETIME_FORMAT); + + private static SimpleDateFormat datePattern = new SimpleDateFormat(DATETIME_FORMAT); + + + private DateUtils() { + // + } + + /** + * 当前日期转为String + * + * @param date + * 日期 + * @param pattern + * 格式 + * @return + */ + public static String dateToString(Date date, String pattern) { + SimpleDateFormat dateFormat = new SimpleDateFormat(pattern); + return dateFormat.format(date); + } + + /** + * 获得日期相差天数 + * + * @param date1 + * @param date2 + * @return 相差天数 + */ + public static int getDateDifferent(Date date1, Date date2) { + if (date1 == null || date2 == null) { + return -1; + } + long intervalMilli = date1.getTime() - date2.getTime(); + return (int) (intervalMilli / (24 * 60 * 60 * 1000)); + } + + /** + * 获得往后推迟amount天的时间 如果填入负数,则往前推 + * + * @param date + * @param amount + * @return + */ + public static Date addDate(Date date, int amount) { + Calendar calendar = new GregorianCalendar(); + calendar.setTime(date); + calendar.add(Calendar.DATE, amount); + date = calendar.getTime(); + return date; + } + + public static Date addMonth(Date date, int monthCnt) { + Calendar calendar = new GregorianCalendar(); + calendar.setTime(date); + calendar.add(Calendar.MONTH, monthCnt); + date = calendar.getTime(); + return date; + } + + /** + * 获得往后推迟amount的时间 + * + * @param date + * @param amount + * 分钟数 + * @return + */ + public static Date addDateWithMin(Date date, int amount) { + Calendar calendar = new GregorianCalendar(); + calendar.setTime(date); + calendar.add(Calendar.MINUTE, amount); + date = calendar.getTime(); + return date; + } + + /** + * 以入参构造一个新的Date,时、分、秒、毫秒均设置为0 + * + * @param date + * @return + */ + public static Date getFirstSecondOfDate(Date date) { + Calendar calendar = Calendar.getInstance(); + calendar.setTime(date); + calendar.set(Calendar.HOUR_OF_DAY, 0); + calendar.set(Calendar.MINUTE, 0); + calendar.set(Calendar.SECOND, 0); + calendar.set(Calendar.MILLISECOND, 0); + return calendar.getTime(); + } + + public static Date getLastSecondOfDate(Date date) { + Calendar calendar = Calendar.getInstance(); + calendar.setTime(date); + calendar.set(Calendar.HOUR_OF_DAY, 23); + calendar.set(Calendar.MINUTE, 59); + calendar.set(Calendar.SECOND, 59); + calendar.set(Calendar.MILLISECOND, 0); + return calendar.getTime(); + } + + + public static Timestamp getNow() { + return new Timestamp(System.currentTimeMillis()); + } + + /** + * 使用指定的格式将字符串解析成日期 + * + * @modify Dec 26, 2006 11:06:48 AM + * @param dateString + * @param format + * @return + */ + public static Date parseDate(String dateString, String format) { + if (StringUtils.isEmpty(dateString)) { + return null; + } + try { + return new SimpleDateFormat(format).parse(dateString); + } catch (Exception e) { + return null; + } + } + + /** + * 将字符串解析成日期 + * + * @modify Dec 26, 2006 11:06:27 AM + * @param dateString + * @return + */ + public static Date parseDate(String dateString) { + if (StringUtils.isEmpty(dateString)) { + return null; + } + try { + if (dateString.length() <= 10) { + return dateFormat.parse(dateString); + } else { + if(dateString.length() == 14){ + return dateTimeFormat.parse(dateString); + } + return dateTimeFormat.parse(dateString); + } + } catch (Exception e) { + return null; + } + } + + /** + * 解析日期时间 + * + * @modify Dec 28, 2006 9:31:26 AM + * @param dateString + * @return + */ + public static Timestamp parseDatetime(String dateString) { + if (StringUtils.isEmpty(dateString)) { + return null; + } + Date date = null; + try { + date = dateTimeFormat.parse(dateString); + } catch (Exception e) { + date = parseDate(dateString); + } + return date == null ? null : new Timestamp(date.getTime()); + } + + public static int get(Date date, Field field) { + Calendar cal = Calendar.getInstance(); + cal.setTime(date); + return cal.get(Field.toInt(field)); + } + + /** + * 获取日期中的年份 + * + * @modify Dec 26, 2006 11:05:34 AM + * @param date + * @return + */ + public static int getYear(Date date) { + if (date == null) { + throw new IllegalArgumentException("Date is null!"); + } + Calendar cal = Calendar.getInstance(); + cal.setTime(date); + return cal.get(Calendar.YEAR); + } + + /** + * 获取日期所在的季度 + * + * @modify Dec 29, 2006 11:13:26 AM + * @param date + * @return + */ + public static Season getSeason(Date date) { + Month m = getMonth(date); + int mi = Month.toInt(m); + return Season.valueOf(mi / 3); + } + + /** + * 获取日期中的月份 + * + * @modify Dec 26, 2006 11:05:50 AM + * @param date + * @return + */ + public static Month getMonth(Date date) { + if (date == null) { + throw new IllegalArgumentException("Date is null!"); + } + Calendar cal = Calendar.getInstance(); + cal.setTime(date); + return Month.valueOf(cal.get(Calendar.MONTH)); + } + + /** + * 获取日期中的天 从1开始 + * + * @modify Dec 26, 2006 11:06:04 AM + * @param date + * @return + */ + public static int getDay(Date date) { + if (date == null) { + throw new IllegalArgumentException("Date is null!"); + } + Calendar cal = Calendar.getInstance(); + cal.setTime(date); + return cal.get(Calendar.DATE); + } + + /** + * 计算获取每年的第几天 + * + * @modify Dec 25, 2006 2:40:39 PM + * @param year + * @param days + * 1表示年的第一天 + * @return 那一天的日期类型 + */ + public static Date getDate(int year, int days) { + Calendar cal = Calendar.getInstance(); + cal.set(Calendar.YEAR, year); + cal.set(Calendar.MONTH, 0); + cal.add(Calendar.DATE, days); + cal.set(Calendar.HOUR_OF_DAY, 0); + cal.set(Calendar.MINUTE, 0); + cal.set(Calendar.SECOND, 0); + cal.set(Calendar.MILLISECOND, 0); + return cal.getTime(); + } + + /** + * 根据年月日获取日期 + * + * @modify Dec 26, 2006 1:04:12 PM + * @param year + * @param month + * 0表示一月 + * @param day + * 1表示月的第一天 + * @return + */ + public static Date getDate(int year, int month, int day) { + Calendar cal = Calendar.getInstance(); + cal.set(Calendar.YEAR, year); + cal.set(Calendar.MONTH, month); + cal.set(Calendar.DATE, day); + return getDate(cal.getTime()); + } + + /** + * 同上 + * + * @modify Dec 29, 2006 10:17:36 AM + * @param year + * @param month + * @param day + * @return + */ + public static Date getDate(int year, Month month, int day) { + return getDate(year, Month.toInt(month), day); + } + + /** + * 取得季度的的一个月 + * + * @modify Dec 29, 2006 10:27:28 AM + * @param season + * @return + */ + public static Month getFirstMonthOfSeason(Season season) { + return Month.valueOf(Season.toInt(season) * 3); + } + + /** + * 获取那个季度的第几天 + * + * @modify Dec 29, 2006 10:24:39 AM + * @param year + * @param season + * @param days + * @return + */ + public static Date getDate(final int year, final Season season, final int days) { + Month firstMonth = getFirstMonthOfSeason(season); + Date firstDate = getDate(year, firstMonth, 1); + Date date = add(firstDate, Field.DATE, days - 1); + int y = getYear(date); + Season s = getSeason(date); + if (y != year || s != season) { + throw new IllegalArgumentException("day is too large!"); + } + return date; + } + + /** + * 获取日期部分 + * + * @modify Dec 29, 2006 9:18:08 AM + * @param date + * @return + */ + public static Date getDate(final Date date) { + return setFields(date, new Field[] { Field.HOUR, Field.MINUTE, + Field.SECOND, Field.MILLISECOND }, new int[] { 0, 0, 0, 0 }); + } + + /** + * 根据给定值获取日期时间 + * + * @modify Dec 29, 2006 11:13:02 AM + * @param year + * @param month + * @param day + * @param hour + * @param min + * @param seconds + * @return + */ + public static Date getDate(int year, int month, int day, int hour, int min, int seconds) { + Calendar cal = Calendar.getInstance(); + cal.set(Calendar.YEAR, year); + cal.set(Calendar.MONTH, month); + cal.set(Calendar.DATE, day); + cal.set(Calendar.HOUR, hour); + cal.set(Calendar.MINUTE, min); + cal.set(Calendar.SECOND, seconds); + return cal.getTime(); + } + + /** + * 计算年度中一月的天数 0:是一月 + * + * @modify Dec 26, 2006 11:03:46 AM + * @param year + * @param month + * @return + */ + public static int getMonthDays(int year, Month month) { + Calendar cal1 = Calendar.getInstance(); + cal1.set(Calendar.YEAR, year); + cal1.set(Calendar.MONTH, Month.toInt(month)); + Calendar cal2 = Calendar.getInstance(); + cal2.set(Calendar.YEAR, year); + cal2.set(Calendar.MONTH, Month.toInt(month) + 1); + long time = cal2.getTimeInMillis() - cal1.getTimeInMillis(); + time = time / (24 * 3600 * 1000); + return (int) time; + } + + /** + * 一个星期的第几天 1:周日,2:周一 + * + * @modify Dec 26, 2006 1:01:08 PM + * @param date + * @return + */ + public static Weekday getWeekDay(Date date) { + Calendar cal = Calendar.getInstance(); + cal.setTime(date); + return Weekday.valueOf(cal.get(Calendar.DAY_OF_WEEK)); + } + + /** + * 获取一个月第几周的所有日期 + * + * @modify Jan 4, 2007 10:01:10 PM + * @param year + * @param month + * @param index + * 从0开始计数 + * @return + */ + public static Date[] getWeekDays(int year, Month month, int index) { + Date[] result = new Date[7]; + Date date = getDate(year, month, index * 7); + setFields(date, new Field[] { Field.HOUR, Field.MINUTE, Field.SECOND }, new int[] { 0, 0, 0 }); + date = add(date, Field.DATE, Weekday.toInt(getWeekDay(date))); + for (int i = 0; i < 7; i++) { + result[i] = add(date, Field.DATE, i); + } + return result; + } + + /** + * 找到最近的一个周天,这一天与给定的天在同一周 + * + * @modify Dec 28, 2006 5:30:30 PM + * @param date + * @param week + * 0~6,分别取周日到周六 + * @return + */ + public static Date getNearestWeekDay(Date date, Weekday week) { + Weekday weekday = getWeekDay(date); + return add(date, Field.DATE, Weekday.toInt(week) - Weekday.toInt(weekday)); + } + + /** + * 获取当月的第几天 + * + * @modify Dec 28, 2006 11:08:50 PM + * @param date + * @param day + * @return + */ + public static Date getNearestMonthDay(Date date, int day) { + if (date == null) { + throw new IllegalArgumentException("Date is null!"); + } + Calendar cal = Calendar.getInstance(); + cal.setTime(date); + int year = cal.get(Calendar.YEAR); + int month = cal.get(Calendar.MONTH); + return getDate(year, month, day); + } + + /** + * 比较两个日期的大小 + * + * @modify Nov 7, 2006 10:37:49 PM + * @param date1 + * @param date2 + * @return + */ + public static int compareTo(Date date1, Date date2) { + if (date1 == null && date2 == null) { + return 0; + } + if (date1 == null && date2 != null) { + return -1; + } + if (date1 != null && date2 == null) { + return 1; + } + return (int) (date1.compareTo(date2)); + } + + /** + * 判断指定日期是否在指定范围内 + * + * @modify Dec 28, 2006 3:12:21 PM + * @param input + * @param from + * @param to + * @return + */ + public static boolean between(Date input, Date from, Date to) { + return compareTo(input, from) >= 0 && compareTo(input, to) <= 0; + } + + /** + * 使用缺省的格式格式化日期 + * + * @modify Dec 25, 2006 2:41:25 PM + * @param date + * @return + */ + public static String formatDate(Date date) { + if (date == null) { + return ""; + } + if (date instanceof java.sql.Date) { + return dateFormat.format(date); + } else { + return dateTimeFormat.format(date); + } + } + + /** + * 使用指定的格式将日期格式化 + * + * @modify Dec 26, 2006 11:07:16 AM + * @param date + * @param format + * @return + */ + public static String formatDate(Date date, String format) { + if (date == null) { + return ""; + } + SimpleDateFormat sdf = new SimpleDateFormat(format); + return sdf.format(date); + } + + /** + * 向日期增加若干部分 + * + * @modify Dec 28, 2006 4:00:42 PM + * @param date + * @param field + * @param amount + * @return + */ + public static Date add(final Date date, final Field field, final int amount) { + if (date == null) { + throw new IllegalArgumentException("Date is null!"); + } + Field type = field; + if (type == null) { + type = Field.DATE; + } + // + Calendar cal = Calendar.getInstance(); + cal.setTime(date); + + int calType = Field.toInt(field); + if (calType != -1) { + cal.add(calType, amount); + } + return cal.getTime(); + } + + /** + * 设置一个字段的值 + * + * @modify Dec 28, 2006 5:14:00 PM + * @param date + * @param field + * @param amount + * @return + */ + public static Date setField(final Date date, final Field field, final int amount) { + if (date == null) { + throw new IllegalArgumentException("Date is null!"); + } + // + Calendar cal = Calendar.getInstance(); + cal.setTime(date); + + int calType = Field.toInt(field); + if (calType != -1) { + cal.set(calType, amount); + } + return cal.getTime(); + } + + public static Date setFields(final Date date, final Field[] fields, final int[] amounts) { + if (date == null) { + throw new IllegalArgumentException("Date is null!"); + } + // + Calendar cal = Calendar.getInstance(); + cal.setTime(date); + + for (int i = 0; i < fields.length; i++) { + int calType = Field.toInt(fields[i]); + if (calType != -1) { + cal.set(calType, amounts[i]); + } + } + return cal.getTime(); + } + + /** + * 时间段类型 + * + * @author + * @create Dec 28, 2006 3:59:27 PM + * + */ + public static enum Field { + YEAR, MONTH, DATE, HOUR, MINUTE, SECOND, MILLISECOND; + + public static int toInt(final Field type) { + int calType = -1; + if (type == Field.YEAR) { + calType = Calendar.YEAR; + } else if (type == Field.MONTH) { + calType = Calendar.MONTH; + } else if (type == Field.DATE) { + calType = Calendar.DATE; + } else if (type == Field.HOUR) { + calType = Calendar.HOUR_OF_DAY; + } else if (type == Field.MINUTE) { + calType = Calendar.MINUTE; + } else if (type == Field.SECOND) { + calType = Calendar.SECOND; + } else if (type == Field.MILLISECOND) { + calType = Calendar.MILLISECOND; + } + return calType; + } + } + + /** + * 季度枚举 + * + * @author + * @create Dec 29, 2006 9:24:04 AM + * + */ + public static enum Season { + SPRING, SUMMER, AUTUMN, WINTER; + + public static Season valueOf(final int i) { + if (i >= 0 && i <= 3) { + return Season.values()[i]; + } else { + return null; + } + } + + public static int toInt(final Season season) { + Season[] seasons = Season.values(); + for (int i = 0; i < seasons.length; i++) { + if (seasons[i] == season) { + return i; + } + } + return -1; + } + } + + /** + * 枚举月 0:一月; 11:12月 + * + * @author + * @create Dec 29, 2006 9:28:06 AM + * + */ + public static enum Month { + JAN, FEB, MAR, APR, MAY, JUN, JUL, AUG, SEP, OCT, NOV, DEC; + + /** + * 取值0~11 + * + * @modify Dec 29, 2006 11:09:33 AM + * @param i + * @return + */ + public static Month valueOf(final int i) { + if (i >= 0 && i <= 11) { + return Month.values()[i]; + } else { + return null; + } + } + + /** + * 返回值0~11 + * + * @modify Dec 29, 2006 11:09:16 AM + * @param month + * @return + */ + public static int toInt(final Month month) { + Month[] months = Month.values(); + for (int i = 0; i < months.length; i++) { + if (months[i] == month) { + return i; + } + } + return -1; + } + } + + /** + * 枚举周 1:周日, 7:周六 + * + * @author + * @create Dec 29, 2006 9:29:07 AM + * + */ + public static enum Weekday { + SUN, MON, TUE, WEN, THR, FRI, SAT; + + /** + * 从1开始获取 + * + * @modify Dec 29, 2006 10:05:20 AM + * @param i + * @return + */ + public static Weekday valueOf(final int i) { + if (i >= 1 && i <= 7) { + return Weekday.values()[i - 1]; + } else { + return null; + } + } + + public static int toInt(final Weekday week) { + Weekday[] weeks = Weekday.values(); + for (int i = 0; i < weeks.length; i++) { + if (weeks[i] == week) { + return i; + } + } + return -1; + } + } + + protected final static SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); + + public static String toGMT(Date date) { + Calendar cal = Calendar.getInstance(new SimpleTimeZone(0, "GMT")); + format.setCalendar(cal); + return format.format(date); + } +} diff --git a/itools-core/itools-utils/src/main/java/com/itools/core/utils/FileOperateUtils.java b/itools-core/itools-utils/src/main/java/com/itools/core/utils/FileOperateUtils.java new file mode 100644 index 0000000000000000000000000000000000000000..ba2dcfc2e8b66a8c6709ca0ad44909afb643ea3a --- /dev/null +++ b/itools-core/itools-utils/src/main/java/com/itools/core/utils/FileOperateUtils.java @@ -0,0 +1,265 @@ +package com.itools.core.utils; + +import java.io.File; +import java.io.FileInputStream; +import java.io.FileOutputStream; +import java.io.IOException; + +/** + * @description:复制、删除、剪切文件封装的工具类 + * @author: XUCHANG + */ +public class FileOperateUtils { + /** + * 复制文件或文件夹 + * + * @param srcPath + * @param destDir + * 目标文件所在的目录 + * @return + */ + public static boolean copyGeneralFile(String srcPath, String destDir) { + boolean flag = false; + File file = new File(srcPath); + if (!file.exists()) { + System.out.println("源文件或源文件夹不存在!"); + return false; + } + if (file.isFile()) { // 源文件 + System.out.println("下面进行文件复制!"); + flag = copyFile(srcPath, destDir); + } else if (file.isDirectory()) { + System.out.println("下面进行文件夹复制!"); + flag = copyDirectory(srcPath, destDir); + } + + return flag; + } + + /** + * 复制文件 + * + * @param srcPath + * 源文件绝对路径 + * @param destDir + * 目标文件所在目录 + * @return boolean + */ + private static boolean copyFile(String srcPath, String destDir) { + boolean flag = false; + + File srcFile = new File(srcPath); + if (!srcFile.exists()) { // 源文件不存在 + System.out.println("源文件不存在"); + return false; + } + // 获取待复制文件的文件名 + File file = new File(srcPath); + String fileName = file.getName(); + // String fileName = srcPath.substring(srcPath.lastIndexOf("//")+2, + // srcPath.length()); + // String fileName = srcPath + // .substring(srcPath.lastIndexOf(File.separator)); + String destPath = destDir + fileName; + if (destPath.equals(srcPath)) { // 源文件路径和目标文件路径重复 + System.out.println("源文件路径和目标文件路径重复!"); + return false; + } + File destFile = new File(destPath); + if (destFile.exists() && destFile.isFile()) { // 该路径下已经有一个同名文件 + System.out.println("目标目录下已有同名文件!"); + return false; + } + + File destFileDir = new File(destDir); + destFileDir.mkdirs(); + try { + FileInputStream fis = new FileInputStream(srcPath); + FileOutputStream fos = new FileOutputStream(destFile); + byte[] buf = new byte[1024]; + int c; + while ((c = fis.read(buf)) != -1) { + fos.write(buf, 0, c); + } + fis.close(); + fos.close(); + + flag = true; + } catch (IOException e) { + // + } + + if (flag) { + System.out.println("复制文件成功!"); + } + + return flag; + } + + /** + * + * @param srcPath + * 源文件夹路径 + * @param destDir + * 目标文件夹所在目录 + * @return + */ + private static boolean copyDirectory(String srcPath, String destDir) { + System.out.println("复制文件夹开始!"); + boolean flag = false; + + File srcFile = new File(srcPath); + if (!srcFile.exists()) { // 源文件夹不存在 + System.out.println("源文件夹不存在"); + return false; + } + // 获得待复制的文件夹的名字,比如待复制的文件夹为"E://dir"则获取的名字为"dir" + String dirName = getDirName(srcPath); + // 目标文件夹的完整路径 + String destPath = destDir + File.separator + dirName; + // System.out.println("目标文件夹的完整路径为:" + destPath); + + if (destPath.equals(srcPath)) { + System.out.println("目标文件夹与源文件夹重复"); + return false; + } + File destDirFile = new File(destPath); + if (destDirFile.exists()) { // 目标位置有一个同名文件夹 + System.out.println("目标位置已有同名文件夹!"); + return false; + } + destDirFile.mkdirs(); // 生成目录 + + File[] fileList = srcFile.listFiles(); // 获取源文件夹下的子文件和子文件夹 + if (fileList.length == 0) { // 如果源文件夹为空目录则直接设置flag为true,这一步非常隐蔽,debug了很久 + flag = true; + } else { + for (File temp : fileList) { + if (temp.isFile()) { // 文件 + flag = copyFile(temp.getAbsolutePath(), destPath); + } else if (temp.isDirectory()) { // 文件夹 + flag = copyDirectory(temp.getAbsolutePath(), destPath); + } + if (!flag) { + break; + } + } + } + + if (flag) { + System.out.println("复制文件夹成功!"); + } + + return flag; + } + + /** + * 获取待复制文件夹的文件夹名 + * + * @param dir + * @return String + */ + private static String getDirName(String dir) { + if (dir.endsWith(File.separator)) { // 如果文件夹路径以"//"结尾,则先去除末尾的"//" + dir = dir.substring(0, dir.lastIndexOf(File.separator)); + } + return dir.substring(dir.lastIndexOf(File.separator) + 1); + } + + /** + * 删除文件或文件夹 + * + * @param path + * 待删除的文件的绝对路径 + * @return boolean + */ + public static boolean deleteGeneralFile(String path) { + boolean flag = false; + + File file = new File(path); + if (!file.exists()) { // 文件不存在 + System.out.println("要删除的文件不存在!"); + } + + if (file.isDirectory()) { // 如果是目录,则单独处理 + flag = deleteDirectory(file.getAbsolutePath()); + } else if (file.isFile()) { + flag = deleteFile(file); + } + + if (flag) { + System.out.println("删除文件或文件夹成功!"); + } + + return flag; + } + + /** + * 删除文件 + * + * @param file + * @return boolean + */ + private static boolean deleteFile(File file) { + return file.delete(); + } + + /** + * 删除目录及其下面的所有子文件和子文件夹,注意一个目录下如果还有其他文件或文件夹 + * 则直接调用delete方法是不行的,必须待其子文件和子文件夹完全删除了才能够调用delete + * + * @param path + * path为该目录的路径 + */ + private static boolean deleteDirectory(String path) { + boolean flag = true; + File dirFile = new File(path); + if (!dirFile.isDirectory()) { + return flag; + } + File[] files = dirFile.listFiles(); + for (File file : files) { // 删除该文件夹下的文件和文件夹 + // Delete file. + if (file.isFile()) { + flag = deleteFile(file); + } else if (file.isDirectory()) {// Delete folder + flag = deleteDirectory(file.getAbsolutePath()); + } + if (!flag) { // 只要有一个失败就立刻不再继续 + break; + } + } + flag = dirFile.delete(); // 删除空目录 + return flag; + } + + /** + * 由上面方法延伸出剪切方法:复制+删除 + * + * @param destDir + * 同上 + */ + public static boolean cutGeneralFile(String srcPath, String destDir) { + if (!copyGeneralFile(srcPath, destDir)) { + System.out.println("复制失败导致剪切失败!"); + return false; + } + if (!deleteGeneralFile(srcPath)) { + System.out.println("删除源文件(文件夹)失败导致剪切失败!"); + return false; + } + + System.out.println("剪切成功!"); + return true; + } + + public static void main(String[] args) { + copyGeneralFile("E://Assemble.txt", "E://New.txt"); // 复制文件 + copyGeneralFile("E://hello", "E://world"); // 复制文件夹 + deleteGeneralFile("E://onlinestockdb.sql"); // 删除文件 + deleteGeneralFile("E://woman"); // 删除文件夹 + cutGeneralFile("E://hello", "E://world"); // 剪切文件夹 + cutGeneralFile("E://Difficult.java", "E://Cow//"); // 剪切文件 + } +} + diff --git a/itools-core/itools-utils/src/main/java/com/itools/core/utils/GenerateOrderNum.java b/itools-core/itools-utils/src/main/java/com/itools/core/utils/GenerateOrderNum.java new file mode 100644 index 0000000000000000000000000000000000000000..151dc4cc591b21de292e249148771134f9305404 --- /dev/null +++ b/itools-core/itools-utils/src/main/java/com/itools/core/utils/GenerateOrderNum.java @@ -0,0 +1,82 @@ +package com.itools.core.utils; + +import java.text.SimpleDateFormat; +import java.util.Date; + +/** + * @description: + * @author: XUCHANG + */ +public class GenerateOrderNum { + /** + * 锁对象,可以为任意对象 + */ + private static Object lockObj = "lockerOrder"; + /** + * 订单号生成计数器 + */ + private static long orderNumCount = 0L; + /** + * 每毫秒生成订单号数量最大值 + */ + private int maxPerMSECSize=1000; + + /** + * + */ + + /** + * 生成非重复订单号,理论上限1毫秒1000个,可扩展 + * @param tname 测试用 + */ + public synchronized void generate(String tname) { + try { + // 最终生成的订单号 + String finOrderNum = ""; + synchronized (lockObj) { + // 取系统当前时间作为订单号变量前半部分,精确到毫秒 + long nowLong = Long.parseLong(new SimpleDateFormat("yyyyMMddHHmmssSSS").format(new Date())); + // 计数器到最大值归零,可扩展更大,目前1毫秒处理峰值1000个,1秒100万 + if (orderNumCount >= maxPerMSECSize) { + orderNumCount = 0L; + } + //组装订单号 + String countStr=maxPerMSECSize +orderNumCount+""; + finOrderNum=nowLong+countStr.substring(1); + orderNumCount++; + System.out.println(finOrderNum + "--" + Thread.currentThread().getName() + "::" + tname ); + // Thread.sleep(1000); + } + } catch (Exception e) { + e.printStackTrace(); + } + } + + public static void main(String[] args) { + // 测试多线程调用订单号生成工具 + try { + for (int i = 0; i < 200; i++) { + Thread t1 = new Thread(new Runnable() { + @Override + public void run() { + GenerateOrderNum generateOrderNum = new GenerateOrderNum(); + generateOrderNum.generate("a"); + } + }, "at" + i); + t1.start(); + + Thread t2 = new Thread(new Runnable() { + @Override + public void run() { + GenerateOrderNum generateOrderNum = new GenerateOrderNum(); + generateOrderNum.generate("b"); + } + }, "bt" + i); + t2.start(); + } + } catch (Exception e) { + e.printStackTrace(); + } + System.out.println(System.currentTimeMillis()); + } +} diff --git a/itools-core/itools-utils/src/main/java/com/itools/core/utils/HlsVideoUtil.java b/itools-core/itools-utils/src/main/java/com/itools/core/utils/HlsVideoUtil.java new file mode 100644 index 0000000000000000000000000000000000000000..e2fa86dde87d50c73fca99f585f58e23a2ec9d31 --- /dev/null +++ b/itools-core/itools-utils/src/main/java/com/itools/core/utils/HlsVideoUtil.java @@ -0,0 +1,158 @@ +package com.itools.core.utils; + +import java.io.BufferedReader; +import java.io.File; +import java.io.FileReader; +import java.io.IOException; +import java.util.ArrayList; +import java.util.List; + +/** + * @description: + * * 此文件用于视频文件处理,步骤如下: + * 1、生成mp4 + * 2、生成m3u8 + * @author: XUCHANG + */ +public class HlsVideoUtil extends VideoUtil { + + String ffmpeg_path = "D:\\Program Files\\ffmpeg-20180227-fa0c9d6-win64-static\\bin\\ffmpeg.exe";//ffmpeg的安装位置 + String video_path = "D:\\BaiduNetdiskDownload\\test1.avi"; + String m3u8_name = "test1.m3u8"; + String m3u8folder_path = "D:/BaiduNetdiskDownload/Movies/test1/"; + public HlsVideoUtil(String ffmpeg_path, String video_path, String m3u8_name,String m3u8folder_path){ + super(ffmpeg_path); + this.ffmpeg_path = ffmpeg_path; + this.video_path = video_path; + this.m3u8_name = m3u8_name; + this.m3u8folder_path = m3u8folder_path; + } + + private void clear_m3u8(String m3u8_path){ + //删除原来已经生成的m3u8及ts文件 + File m3u8dir = new File(m3u8_path); + if(!m3u8dir.exists()){ + m3u8dir.mkdirs(); + } + /* if(m3u8dir.exists()&&m3u8_path.indexOf("/hls/")>=0){//在hls目录方可删除,以免错误删除 + String[] children = m3u8dir.list(); + //删除目录中的文件 + for (int i = 0; i < children.length; i++) { + File file = new File(m3u8_path, children[i]); + file.delete(); + } + }else{ + m3u8dir.mkdirs(); + }*/ + } + + /** + * 生成m3u8文件 + * @return 成功则返回success,失败返回控制台日志 + */ + public String generateM3u8(){ + //清理m3u8文件目录 + clear_m3u8(m3u8folder_path); + /* + ffmpeg -i lucene.mp4 -hls_time 10 -hls_list_size 0 -hls_segment_filename ./hls/lucene_%05d.ts ./hls/lucene.m3u8 + */ +// String m3u8_name = video_name.substring(0, video_name.lastIndexOf("."))+".m3u8"; + List commend = new ArrayList(); + commend.add(ffmpeg_path); + commend.add("-i"); + commend.add(video_path); + commend.add("-hls_time"); + commend.add("10"); + commend.add("-hls_list_size"); + commend.add("0"); + commend.add("-hls_segment_filename"); +// commend.add("D:/BaiduNetdiskDownload/Movies/test1/test1_%05d.ts"); + commend.add(m3u8folder_path + m3u8_name.substring(0,m3u8_name.lastIndexOf(".")) + "_%05d.ts"); +// commend.add("D:/BaiduNetdiskDownload/Movies/test1/test1.m3u8"); + commend.add(m3u8folder_path + m3u8_name ); + String outstring = null; + try { + ProcessBuilder builder = new ProcessBuilder(); + builder.command(commend); + //将标准输入流和错误输入流合并,通过标准输入流程读取信息 + builder.redirectErrorStream(true); + Process p = builder.start(); + outstring = waitFor(p); + + } catch (Exception ex) { + + ex.printStackTrace(); + + } + //通过查看视频时长判断是否成功 + Boolean check_video_time = check_video_time(video_path, m3u8folder_path + m3u8_name); + if(!check_video_time){ + return outstring; + } + //通过查看m3u8列表判断是否成功 + List ts_list = get_ts_list(); + if(ts_list == null){ + return outstring; + } + return "success"; + + + } + + + + /** + * 检查视频处理是否完成 + * @return ts列表 + */ + public List get_ts_list() { +// String m3u8_name = video_name.substring(0, video_name.lastIndexOf("."))+".m3u8"; + List fileList = new ArrayList(); + List tsList = new ArrayList(); + String m3u8file_path =m3u8folder_path + m3u8_name; + BufferedReader br = null; + String str = null; + String bottomline = ""; + try { + br = new BufferedReader(new FileReader(m3u8file_path)); + while ((str = br.readLine()) != null) { + bottomline = str; + if(bottomline.endsWith(".ts")){ + tsList.add(bottomline); + } + //System.out.println(str); + } + } catch (IOException e) { + e.printStackTrace(); + }finally { + if(br!=null){ + try { + br.close(); + } catch (IOException e) { + e.printStackTrace(); + } + } + } + if (bottomline.contains("#EXT-X-ENDLIST")) { +// fileList.add(hls_relativepath+m3u8_name); + fileList.addAll(tsList); + return fileList; + } + return null; + + } + + + + + public static void main(String[] args) throws IOException { + String ffmpeg_path = "D:\\Program Files\\ffmpeg-20180227-fa0c9d6-win64-static\\bin\\ffmpeg.exe";//ffmpeg的安装位置 + String video_path = "E:\\ffmpeg_test\\1.mp4"; + String m3u8_name = "1.m3u8"; + String m3u8_path = "E:\\ffmpeg_test\\1\\"; + HlsVideoUtil videoUtil = new HlsVideoUtil(ffmpeg_path,video_path,m3u8_name,m3u8_path); + String s = videoUtil.generateM3u8(); + System.out.println(s); + System.out.println(videoUtil.get_ts_list()); + } +} diff --git a/itools-core/itools-utils/src/main/java/com/itools/core/utils/HttpClient.java b/itools-core/itools-utils/src/main/java/com/itools/core/utils/HttpClient.java new file mode 100644 index 0000000000000000000000000000000000000000..950a5c6d711303c9d1f97c99d49919beaf997f51 --- /dev/null +++ b/itools-core/itools-utils/src/main/java/com/itools/core/utils/HttpClient.java @@ -0,0 +1,172 @@ +package com.itools.core.utils; + +import org.apache.http.Consts; +import org.apache.http.HttpEntity; +import org.apache.http.NameValuePair; +import org.apache.http.client.ClientProtocolException; +import org.apache.http.client.entity.UrlEncodedFormEntity; +import org.apache.http.client.methods.*; +import org.apache.http.conn.ssl.SSLConnectionSocketFactory; +import org.apache.http.conn.ssl.SSLContextBuilder; +import org.apache.http.conn.ssl.TrustStrategy; +import org.apache.http.entity.StringEntity; +import org.apache.http.impl.client.CloseableHttpClient; +import org.apache.http.impl.client.HttpClients; +import org.apache.http.message.BasicNameValuePair; +import org.apache.http.util.EntityUtils; + +import javax.net.ssl.SSLContext; +import java.io.IOException; +import java.security.cert.CertificateException; +import java.security.cert.X509Certificate; +import java.text.ParseException; +import java.util.HashMap; +import java.util.LinkedList; +import java.util.List; +import java.util.Map; + +/** + * @description: + * @author: XUCHANG + */ +public class HttpClient { + private String url; + private Map param; + private int statusCode; + private String content; + private String xmlParam; + private boolean isHttps; + + public boolean isHttps() { + return isHttps; + } + + public void setHttps(boolean isHttps) { + this.isHttps = isHttps; + } + + public String getXmlParam() { + return xmlParam; + } + + public void setXmlParam(String xmlParam) { + this.xmlParam = xmlParam; + } + + public HttpClient(String url, Map param) { + this.url = url; + this.param = param; + } + + public HttpClient(String url) { + this.url = url; + } + + public void setParameter(Map map) { + param = map; + } + + public void addParameter(String key, String value) { + if (param == null) { + param = new HashMap(); + } + param.put(key, value); + } + + public void post() throws ClientProtocolException, IOException { + HttpPost http = new HttpPost(url); + setEntity(http); + execute(http); + } + + public void put() throws ClientProtocolException, IOException { + HttpPut http = new HttpPut(url); + setEntity(http); + execute(http); + } + + public void get() throws ClientProtocolException, IOException { + if (param != null) { + StringBuilder url = new StringBuilder(this.url); + boolean isFirst = true; + for (String key : param.keySet()) { + if (isFirst) { + url.append("?"); + } else { + url.append("&"); + } + url.append(key).append("=").append(param.get(key)); + } + this.url = url.toString(); + } + HttpGet http = new HttpGet(url); + execute(http); + } + + /** + * set http post,put param + */ + private void setEntity(HttpEntityEnclosingRequestBase http) { + if (param != null) { + List nvps = new LinkedList(); + for (String key : param.keySet()) { + nvps.add(new BasicNameValuePair(key, param.get(key))); // 参数 + } + http.setEntity(new UrlEncodedFormEntity(nvps, Consts.UTF_8)); // 设置参数 + } + if (xmlParam != null) { + http.setEntity(new StringEntity(xmlParam, Consts.UTF_8)); + } + } + + private void execute(HttpUriRequest http) throws ClientProtocolException, + IOException { + CloseableHttpClient httpClient = null; + try { + if (isHttps) { + SSLContext sslContext = new SSLContextBuilder() + .loadTrustMaterial(null, new TrustStrategy() { + // 信任所有 + @Override + public boolean isTrusted(X509Certificate[] chain, + String authType) + throws CertificateException { + return true; + } + }).build(); + SSLConnectionSocketFactory sslsf = new SSLConnectionSocketFactory( + sslContext); + httpClient = HttpClients.custom().setSSLSocketFactory(sslsf) + .build(); + } else { + httpClient = HttpClients.createDefault(); + } + CloseableHttpResponse response = httpClient.execute(http); + try { + if (response != null) { + if (response.getStatusLine() != null) { + statusCode = response.getStatusLine().getStatusCode(); + } + HttpEntity entity = response.getEntity(); + // 响应内容 + content = EntityUtils.toString(entity, Consts.UTF_8); + } + } finally { + response.close(); + } + } catch (Exception e) { + e.printStackTrace(); + } finally { + httpClient.close(); + } + } + + public int getStatusCode() { + return statusCode; + } + + public String getContent() throws ParseException, IOException { + return content; + } + +} diff --git a/itools-core/itools-utils/src/main/java/com/itools/core/utils/IDUtils.java b/itools-core/itools-utils/src/main/java/com/itools/core/utils/IDUtils.java new file mode 100644 index 0000000000000000000000000000000000000000..a4ae61dcf1992461466de13e50115855574d4d82 --- /dev/null +++ b/itools-core/itools-utils/src/main/java/com/itools/core/utils/IDUtils.java @@ -0,0 +1,48 @@ +package com.itools.core.utils; + +import java.util.Random; + +/** + * @description: + * @author: XUCHANG + */ +public class IDUtils { + + /** + * 图片名生成 + */ + public static String genImageName() { + //取当前时间的长整形值包含毫秒 + long millis = System.currentTimeMillis(); + //long millis = System.nanoTime(); + //加上三位随机数 + Random random = new Random(); + int end3 = random.nextInt(999); + //如果不足三位前面补0 + String str = millis + String.format("%03d", end3); + + return str; + } + + /** + * 商品id生成 + */ + public static long genItemId() { + //取当前时间的长整形值包含毫秒 + long millis = System.currentTimeMillis(); + //long millis = System.nanoTime(); + //加上两位随机数 + Random random = new Random(); + int end2 = random.nextInt(99); + //如果不足两位前面补0 + String str = millis + String.format("%02d", end2); + long id = new Long(str); + return id; + } + + public static void main(String[] args) { + for(int i=0;i< 100;i++) { + System.out.println(genItemId()); + } + } +} diff --git a/itools-core/itools-utils/src/main/java/com/itools/core/utils/IOUtils.java b/itools-core/itools-utils/src/main/java/com/itools/core/utils/IOUtils.java new file mode 100644 index 0000000000000000000000000000000000000000..b246fc72ef984abb8b30779ef3fa5fadf5a74cf7 --- /dev/null +++ b/itools-core/itools-utils/src/main/java/com/itools/core/utils/IOUtils.java @@ -0,0 +1,128 @@ +package com.itools.core.utils; + +import java.io.IOException; +import java.io.InputStream; +import java.io.OutputStream; + +/** + * @description: + * @author: XUCHANG + */ +public class IOUtils { + private final static int CRYPTED_BYTES = 1024; + private final static String HEAD = "V1"; + + protected static String encrypt2Str(byte[] buff) { + // Hex处理 + String result = bytes2HexString(buff); + // 加密服务,demo,往字符串后面加"000"; + result = result + "000"; + // + return result; + } + + protected static byte[] decrypt2Bytes(String sEncryptedData) { + // 解密服务,demo:减去尾巴上:000 + sEncryptedData = sEncryptedData.substring(0, sEncryptedData.length() - 3); + // Hex处理 + return hexString2Bytes(sEncryptedData); + } + + public static void encrypt(InputStream is, OutputStream os) throws IOException { + final int sbytes = is.available() > CRYPTED_BYTES ? CRYPTED_BYTES : is.available(); + byte[] buff = new byte[sbytes]; + int len = is.read(buff, 0, sbytes); + String encryptedData = encrypt2Str(buff); + + os.write(HEAD.getBytes()); + os.write(intToBytes(encryptedData.getBytes().length)); + os.write(encryptedData.getBytes()); + // + byte[] buff2 = new byte[1024]; + len = is.read(buff2); + while (len > 0) { + os.write(buff2, 0, len); + len = is.read(buff2); + } + } + + public static void decrypt(InputStream is, OutputStream os) throws IOException { + byte headerBytes[] = new byte[HEAD.length()]; + int len = is.read(headerBytes); + boolean isEncryptedData = false; + if (len < 2 || !HEAD.equals(new String(headerBytes))) { // 判断是否加密数据 + isEncryptedData = false; + } else { + isEncryptedData = true; + } + if (!isEncryptedData) { + os.write(headerBytes); + + byte[] buff2 = new byte[1024]; + len = is.read(buff2); + while (len > 0) { + os.write(buff2, 0, len); + len = is.read(buff2); + } + return; + } else { + byte[] lenBytes = new byte[4]; + is.read(lenBytes); + int slen = bytesToInt(lenBytes); + byte[] encryptedData = new byte[slen]; + len = is.read(encryptedData); + String sEncryptedData = new String(encryptedData); + + byte[] sEncryptedData2 = decrypt2Bytes(sEncryptedData); + os.write(sEncryptedData2); + // + byte[] buff2 = new byte[1024]; + len = is.read(buff2); + while (len > 0) { + os.write(buff2, 0, len); + len = is.read(buff2); + } + return; + } + + } + + protected static byte[] intToBytes(int n) { + byte[] b = new byte[4]; + b[0] = (byte) (n & 0xff); + b[1] = (byte) (n >> 8 & 0xff); + b[2] = (byte) (n >> 16 & 0xff); + b[3] = (byte) (n >> 24 & 0xff); + return b; + } + + // 将低字节在前转为int,高字节在后的byte数组(与IntToByteArray1想对应) + protected static int bytesToInt(byte[] bArr) { + if (bArr.length != 4) { + return -1; + } + return (int) ((((bArr[3] & 0xff) << 24) | ((bArr[2] & 0xff) << 16) | ((bArr[1] & 0xff) << 8) + | ((bArr[0] & 0xff) << 0))); + } + + protected static String bytes2HexString(byte[] buffer) { + StringBuffer result = new StringBuffer(); + for (int i = 0; i < buffer.length; i++) { + String hex = Integer.toHexString(buffer[i] & 0xFF); + if (hex.length() == 1) { + hex = '0' + hex; + } + result.append(hex.toUpperCase()); + } + return result.toString(); + } + + protected static byte[] hexString2Bytes(String src) { + int l = src.length() / 2; + byte[] ret = new byte[l]; + for (int i = 0; i < l; i++) { + ret[i] = Integer.valueOf(src.substring(i * 2, i * 2 + 2), 16).byteValue(); + } + return ret; + } +} diff --git a/itools-core/itools-utils/src/main/java/com/itools/core/utils/Long64.java b/itools-core/itools-utils/src/main/java/com/itools/core/utils/Long64.java new file mode 100644 index 0000000000000000000000000000000000000000..398a2e549449b23e2ab832a0cbf61848d5274fcd --- /dev/null +++ b/itools-core/itools-utils/src/main/java/com/itools/core/utils/Long64.java @@ -0,0 +1,94 @@ +package com.itools.core.utils; + +/** + * @description:长整数与64进制数据互换 + * @author: XUCHANG + */ +public class Long64 { + private final static char[] CHARS64 = { '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'A', 'B', 'C', 'D', 'E', + 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z', + 'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', + 'v', 'w', 'x', 'y', 'z', '*', '_' }; + + public static int charAt(char c) { + if (c >= '0' && c <= '9') { + return (int) c - 48; + } + if (c >= 'A' && c <= 'Z') { + return (int) c - 65 + 10; + } + if (c >= 'a' && c <= 'z') { + return (int) c - 97 + 10 + 26; + } + if (c == '@') { + return 62; + } + if (c == '!') { + return 63; + } + return -1; + } + + public static char[] generatChar64() { + char[] char64 = new char[64]; + int c = 0; + for (int i = '0'; i <= '9'; i++) { + char64[c] = (char) i; + c++; + } + for (int i = 'A'; i <= 'Z'; i++) { + char64[c] = (char) i; + c++; + } + for (int i = 'a'; i <= 'z'; i++) { + char64[c] = (char) i; + c++; + } + char64[c] = '@'; + char64[c++] = '!'; + return char64; + } + + public static String encode(final long x) { + int mr = 0; + for (long tmp = Math.abs(x) >>> 6; tmp > 0;) { + tmp = tmp >>> 6; + mr++; + } + // + long tmp = Math.abs(x); + StringBuffer res = new StringBuffer(); + if (x < 0) { + res.append("-"); + } + for (int i = mr; i >= 0; i--) { + if (i > 0) { + long ll = tmp >>> (6 * i); + res.append(CHARS64[(int) ll]); + + tmp -= ll << (6 * i); + } else { + res.append(CHARS64[(int) tmp]); + } + } + return res.toString(); + } + + public static long decode(final String x) { + long res = 0; + boolean b = false; + for (int i = 0; i < x.length(); i++) { + final char c = x.charAt(i); + if (c == '-' && i == 0) { + b = true; + continue; + } + res += charAt(c) * (1 << (6 * (x.length() - 1 - i))); + } + if (b) { + res *= -1; + } + return res; + } + +} diff --git a/itools-core/itools-utils/src/main/java/com/itools/core/utils/MD5Util.java b/itools-core/itools-utils/src/main/java/com/itools/core/utils/MD5Util.java new file mode 100644 index 0000000000000000000000000000000000000000..b5e5e96c77cada44f0ae61925c8ffff008090e5c --- /dev/null +++ b/itools-core/itools-utils/src/main/java/com/itools/core/utils/MD5Util.java @@ -0,0 +1,162 @@ +package com.itools.core.utils; + +import java.io.File; +import java.io.FileInputStream; +import java.io.FileNotFoundException; +import java.io.IOException; +import java.security.MessageDigest; +import java.security.NoSuchAlgorithmException; + +/** + * @description: + * @author: XUCHANG + */ +public class MD5Util { + + /** + * The M d5. + */ + static MessageDigest MD5 = null; + + /** + * The Constant HEX_DIGITS. + */ + private static final char HEX_DIGITS[] = {'0', '1', '2', '3', '4', '5', + '6', '7', '8', '9', 'a', 'b', 'c', 'd', 'e', 'f'}; + + static { + try { + MD5 = MessageDigest.getInstance("MD5"); + } catch (NoSuchAlgorithmException ne) { + ne.printStackTrace(); + } + } + + /** + * 获取文件md5值. + * + * @param file the file + * @return md5串 + * @throws IOException + */ + public static String getFileMD5String(File file) throws IOException { + FileInputStream fileInputStream = null; + try { + fileInputStream = new FileInputStream(file); + byte[] buffer = new byte[8192]; + int length; + while ((length = fileInputStream.read(buffer)) != -1) { + MD5.update(buffer, 0, length); + } + + return new String(encodeHex(MD5.digest())); + } catch (FileNotFoundException e) { + throw e; + } catch (IOException e) { + throw e; + } finally { + try { + if (fileInputStream != null) { + fileInputStream.close(); + } + } catch (IOException e) { + throw e; + } + } + } + + /** + * 获取文件md5值. + * + * @param data the byte[] data + * @return md5串 + * @throws IOException + */ + public static String getFileMD5String(byte[] data) throws IOException { + MD5.update(data); + return new String(encodeHex(MD5.digest())); + } + + /** + * Encode hex. + * + * @param bytes the bytes + * @return the string + */ + public static String encodeHex(byte bytes[]) { + return bytesToHex(bytes, 0, bytes.length); + + } + + /** + * Bytes to hex. + * + * @param bytes the bytes + * @param start the start + * @param end the end + * @return the string + */ + public static String bytesToHex(byte bytes[], int start, int end) { + StringBuilder sb = new StringBuilder(); + for (int i = start; i < start + end; i++) { + sb.append(byteToHex(bytes[i])); + } + return sb.toString(); + + } + + /** + * Byte to hex. + * + * @param bt the bt + * @return the string + */ + public static String byteToHex(byte bt) { + return HEX_DIGITS[(bt & 0xf0) >> 4] + "" + HEX_DIGITS[bt & 0xf]; + + } + + /** + * 获取md5值. + * + * @param str the string + * @return md5串 + * @throws IOException + */ + public static String getStringMD5(String str) { + StringBuilder sb = new StringBuilder(); + try { + byte[] data = str.getBytes("utf-8"); + MessageDigest MD5 = MessageDigest.getInstance("MD5"); + MD5.update(data); + data = MD5.digest(); + for (int i = 0; i < data.length; i++) { + sb.append(HEX_DIGITS[(data[i] & 0xf0) >> 4] + "" + HEX_DIGITS[data[i] & 0xf]); + } + } catch (Exception e) { + } + return sb.toString(); + } + + /** + * The main method. + * + * @param args the arguments + */ + public static void main(String[] args) { + + long beginTime = System.currentTimeMillis(); + File fileZIP = new File("D:\\BaiduNetdiskDownload\\test1.avi"); + + String md5 = ""; + try { + md5 = getFileMD5String(fileZIP); + } catch (IOException e) { + e.printStackTrace(); + } + long endTime = System.currentTimeMillis(); + System.out.println("MD5:" + md5 + "\n time:" + ((endTime - beginTime)) + "ms"); + + System.out.println(getStringMD5("440923201801010001")); + } +} diff --git a/itools-core/itools-utils/src/main/java/com/itools/core/utils/Mp4VideoUtil.java b/itools-core/itools-utils/src/main/java/com/itools/core/utils/Mp4VideoUtil.java new file mode 100644 index 0000000000000000000000000000000000000000..34add4d14c3649bf00be73c33afac23a41c857fa --- /dev/null +++ b/itools-core/itools-utils/src/main/java/com/itools/core/utils/Mp4VideoUtil.java @@ -0,0 +1,94 @@ +package com.itools.core.utils; + +import java.io.File; +import java.io.IOException; +import java.util.ArrayList; +import java.util.List; + +/** + * @description: + * @author: XUCHANG + */ +public class Mp4VideoUtil extends VideoUtil { + + String ffmpeg_path = "D:\\Program Files\\ffmpeg-20180227-fa0c9d6-win64-static\\bin\\ffmpeg.exe";//ffmpeg的安装位置 + String video_path = "D:\\BaiduNetdiskDownload\\test1.avi"; + String mp4_name = "test1.mp4"; + String mp4folder_path = "D:/BaiduNetdiskDownload/Movies/test1/"; + public Mp4VideoUtil(String ffmpeg_path, String video_path, String mp4_name, String mp4folder_path){ + super(ffmpeg_path); + this.ffmpeg_path = ffmpeg_path; + this.video_path = video_path; + this.mp4_name = mp4_name; + this.mp4folder_path = mp4folder_path; + } + //清除已生成的mp4 + private void clear_mp4(String mp4_path){ + //删除原来已经生成的m3u8及ts文件 + File mp4File = new File(mp4_path); + if(mp4File.exists() && mp4File.isFile()){ + mp4File.delete(); + } + } + /** + * 视频编码,生成mp4文件 + * @return 成功返回success,失败返回控制台日志 + */ + public String generateMp4(){ + //清除已生成的mp4 + clear_mp4(mp4folder_path+mp4_name); + /* + ffmpeg.exe -i lucene.avi -c:v libx264 -s 1280x720 -pix_fmt yuv420p -b:a 63k -b:v 753k -r 18 .\lucene.mp4 + */ + List commend = new ArrayList(); + //commend.add("D:\\Program Files\\ffmpeg-20180227-fa0c9d6-win64-static\\bin\\ffmpeg.exe"); + commend.add(ffmpeg_path); + commend.add("-i"); +// commend.add("D:\\BaiduNetdiskDownload\\test1.avi"); + commend.add(video_path); + commend.add("-c:v"); + commend.add("libx264"); + commend.add("-y");//覆盖输出文件 + commend.add("-s"); + commend.add("1280x720"); + commend.add("-pix_fmt"); + commend.add("yuv420p"); + commend.add("-b:a"); + commend.add("63k"); + commend.add("-b:v"); + commend.add("753k"); + commend.add("-r"); + commend.add("18"); + commend.add(mp4folder_path + mp4_name ); + String outstring = null; + try { + ProcessBuilder builder = new ProcessBuilder(); + builder.command(commend); + //将标准输入流和错误输入流合并,通过标准输入流程读取信息 + builder.redirectErrorStream(true); + Process p = builder.start(); + outstring = waitFor(p); + + } catch (Exception ex) { + + ex.printStackTrace(); + + } + Boolean check_video_time = this.check_video_time(video_path, mp4folder_path + mp4_name); + if(!check_video_time){ + return outstring; + }else{ + return "success"; + } + } + + public static void main(String[] args) throws IOException { + String ffmpeg_path = "D:\\Program Files\\ffmpeg-20180227-fa0c9d6-win64-static\\bin\\ffmpeg.exe";//ffmpeg的安装位置 + String video_path = "E:\\ffmpeg_test\\1.avi"; + String mp4_name = "809694a6a974c35e3a36f36850837d7c.mp4"; + String mp4_path = "F:/develop/upload/8/0/809694a6a974c35e3a36f36850837d7c/"; + Mp4VideoUtil videoUtil = new Mp4VideoUtil(ffmpeg_path,video_path,mp4_name,mp4_path); + String s = videoUtil.generateMp4(); + System.out.println(s); + } +} diff --git a/itools-core/itools-utils/src/main/java/com/itools/core/utils/NetworkUtils.java b/itools-core/itools-utils/src/main/java/com/itools/core/utils/NetworkUtils.java new file mode 100644 index 0000000000000000000000000000000000000000..534b5db62191c7d3fc027dd5c24e8e1ac4664c8c --- /dev/null +++ b/itools-core/itools-utils/src/main/java/com/itools/core/utils/NetworkUtils.java @@ -0,0 +1,203 @@ +package com.itools.core.utils; + +import javax.servlet.http.HttpServletRequest; +import java.io.IOException; +import java.net.NetworkInterface; +import java.net.SocketException; +import java.util.Enumeration; +import java.util.HashSet; +import java.util.Set; + +/** + * @description:网络工具类 + * @author: XUCHANG + */ +public class NetworkUtils { + + /** + * 网卡过滤 + */ + public enum Filter { + + /**全部*/ + ALL, + + /**在线*/ + UP, + + /**虚拟*/ + VIRTUAL, + + /**loopback*/ + LOOPBACK, + + /**物理*/ + PHYSICAL_ONLY, + ; + + public boolean apply(NetworkInterface input) { + + if (null == input) { + return false; + } + + try { + switch (this) { + case UP: + return input.isUp(); + case VIRTUAL: + return input.isVirtual(); + case LOOPBACK: + return input.isLoopback(); + case PHYSICAL_ONLY: + byte[] hardwareAddress = input.getHardwareAddress(); + return null != hardwareAddress && hardwareAddress.length > 0 && !input.isVirtual() && !isVmMac(hardwareAddress); + case ALL: + default: + return true; + } + } catch (SocketException ex) { + throw new IllegalStateException(ex); + } + } + } + + public enum Radix { + /**二进制*/ + BIN(2), + + /**10进制*/ + DEC(10), + + /** 16进制*/ + HEX(16), + ; + + final int value; + + Radix(int radix) { + this.value = radix; + } + } + + private static byte[][] invalidMacs = { + //VMWare + {0x00, 0x05, 0x69}, + {0x00, 0x1c, 0x14}, + {0x00, 0x0c, 0x29}, + {0x00, 0x50, 0x56}, + //VirtualBox + {0x08, 0x00, 0x27}, + {0x0a, 0x00, 0x27}, + //Virtual-PC + {0x00, 0x03, (byte) 0xff}, + //Hyper-V + {0x00, 0x15, 0x50} + }; + + private static boolean isVmMac(byte[] mac) { + if (null == mac) { + return false; + } + for (byte[] invalid : invalidMacs) { + if (invalid[0] == mac[0] && invalid[1] == mac[1] && invalid[2] == mac[2]) { + return true; + } + } + return false; + } + + public static Set getNICs(Filter... filters) { + if (null == filters) { + filters = new Filter[]{Filter.ALL}; + } + + Set ret = new HashSet<>(); + Enumeration networkInterfaceEnumeration; + try { + networkInterfaceEnumeration = NetworkInterface.getNetworkInterfaces(); + } catch (SocketException ex) { + throw new IllegalStateException(ex); + } + while (networkInterfaceEnumeration.hasMoreElements()) { + boolean match = false; + NetworkInterface next = networkInterfaceEnumeration.nextElement(); + for (Filter filter : filters) { + if (!filter.apply(next)) { + continue; + } + match = true; + } + + if (match) { + ret.add(next); + } + } + + return ret; + } + + public static String getMacAddress(NetworkInterface networkInterface, String separator) { + try { + return format(networkInterface.getHardwareAddress(), separator, Radix.HEX); + } catch (SocketException ex) { + throw new IllegalStateException(ex); + } + } + + public static String format(byte[] source, String separator, final Radix radix) { + if (null == source) { + return ""; + } + + if (null == separator) { + separator = ""; + } + + StringBuilder sb = new StringBuilder(); + for (byte b : source) { + sb.append(separator).append(apply(b, radix)); + } + + return sb.length() > 0 ? sb.substring(separator.length()) : ""; + + } + + public final static String getIpAddress(HttpServletRequest request) throws IOException { + // 获取请求主机IP地址,如果通过代理进来,则透过防火墙获取真实IP地址 + String ip = request.getHeader("X-Forwarded-For"); + if (ip == null || ip.length() == 0 || "unknown".equalsIgnoreCase(ip)) { + ip = request.getHeader("X-Real-IP"); + } + if (ip == null || ip.length() == 0 || "unknown".equalsIgnoreCase(ip)) { + ip = request.getHeader("Proxy-Client-IP"); + } + if (ip == null || ip.length() == 0 || "unknown".equalsIgnoreCase(ip)) { + ip = request.getHeader("WL-Proxy-Client-IP"); + } + if (ip == null || ip.length() == 0 || "unknown".equalsIgnoreCase(ip)) { + ip = request.getHeader("HTTP_CLIENT_IP"); + } + if (ip == null || ip.length() == 0 || "unknown".equalsIgnoreCase(ip)) { + ip = request.getHeader("HTTP_X_FORWARDED_FOR"); + } + if (ip == null || ip.length() == 0 || "unknown".equalsIgnoreCase(ip)) { + ip = request.getRemoteAddr();//这个是不可能拿不到值的 + } + if (ip.length() > 15) {//多个IP时,取第一个非unknow的IP + String[] ips = ip.split(","); + for (int index = 0; index < ips.length; index++) { + String strIp = (String) ips[index]; + if (!("unknown".equalsIgnoreCase(strIp))) { + ip = strIp; + break; + } + } + } + return ip; + } + + private static String apply(Byte input, final Radix radix) { + return String.copyValueOf(new char[]{Character.forDigit((input & 240) >> 4, radix.value), Character.forDigit(input & 15, radix.value)}); + } +} diff --git a/itools-core/itools-utils/src/main/java/com/itools/core/utils/Oauth2Util.java b/itools-core/itools-utils/src/main/java/com/itools/core/utils/Oauth2Util.java new file mode 100644 index 0000000000000000000000000000000000000000..95c85855feb3d54a4f5970cf4a6ded7ab23e7664 --- /dev/null +++ b/itools-core/itools-utils/src/main/java/com/itools/core/utils/Oauth2Util.java @@ -0,0 +1,41 @@ +package com.itools.core.utils; + +import com.alibaba.fastjson.JSON; +import org.springframework.security.jwt.Jwt; +import org.springframework.security.jwt.JwtHelper; + +import javax.servlet.http.HttpServletRequest; +import java.util.Map; + + +/** + * @description: + * @author: XUCHANG + */ +public class Oauth2Util { + + public static Map getJwtClaimsFromHeader(HttpServletRequest request) { + if (request == null) { + return null; + } + //取出头信息 + String authorization = request.getHeader("Authorization"); + if (StringUtils.isEmpty(authorization) || authorization.indexOf("Bearer") < 0) { + return null; + } + //从Bearer 后边开始取出token + String token = authorization.substring(7); + Map map = null; + try { + //解析jwt + Jwt decode = JwtHelper.decode(token); + //得到 jwt中的用户信息 + String claims = decode.getClaims(); + //将jwt转为Map + map = JSON.parseObject(claims, Map.class); + } catch (Exception e) { + e.printStackTrace(); + } + return map; + } +} diff --git a/itools-core/itools-utils/src/main/java/com/itools/core/utils/ObjectUtils.java b/itools-core/itools-utils/src/main/java/com/itools/core/utils/ObjectUtils.java new file mode 100644 index 0000000000000000000000000000000000000000..c55e80d1bb9ecaef1ac085ffa2fd7065032ce44c --- /dev/null +++ b/itools-core/itools-utils/src/main/java/com/itools/core/utils/ObjectUtils.java @@ -0,0 +1,886 @@ +/* + * Copyright 2002-2009 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.itools.core.utils; + +import java.lang.reflect.Array; +import java.lang.reflect.Field; +import java.lang.reflect.Method; +import java.util.Arrays; + +/** + * Miscellaneous object utility methods. + * + *

Mainly for internal use within the framework; consider + * Jakarta's Commons Lang + * for a more comprehensive suite of object utilities. + * + *

Thanks to Alex Ruiz for contributing several enhancements to this class! + * + * @author Juergen Hoeller + * @author Keith Donald + * @author Rod Johnson + * @author Rob Harrop + * @since 19.03.2004 + */ +public abstract class ObjectUtils { + + private static final int INITIAL_HASH = 7; + private static final int MULTIPLIER = 31; + + private static final String EMPTY_STRING = ""; + private static final String NULL_STRING = "null"; + private static final String ARRAY_START = "{"; + private static final String ARRAY_END = "}"; + private static final String EMPTY_ARRAY = ARRAY_START + ARRAY_END; + private static final String ARRAY_ELEMENT_SEPARATOR = ", "; + + + /** + * Return whether the given throwable is a checked exception: + * that is, neither a RuntimeException nor an Error. + * @param ex the throwable to check + * @return whether the throwable is a checked exception + * @see Exception + * @see RuntimeException + * @see Error + */ + public static boolean isCheckedException(Throwable ex) { + return !(ex instanceof RuntimeException || ex instanceof Error); + } + + /** + * Check whether the given exception is compatible with the exceptions + * declared in a throws clause. + * @param ex the exception to checked + * @param declaredExceptions the exceptions declared in the throws clause + * @return whether the given exception is compatible + */ + public static boolean isCompatibleWithThrowsClause(Throwable ex, Class[] declaredExceptions) { + if (!isCheckedException(ex)) { + return true; + } + if (declaredExceptions != null) { + int i = 0; + while (i < declaredExceptions.length) { + if (declaredExceptions[i].isAssignableFrom(ex.getClass())) { + return true; + } + i++; + } + } + return false; + } + + /** + * Determine whether the given object is an array: + * either an Object array or a primitive array. + * @param obj the object to check + */ + public static boolean isArray(Object obj) { + return (obj != null && obj.getClass().isArray()); + } + + /** + * Determine whether the given array is empty: + * i.e. null or of zero length. + * @param array the array to check + */ + public static boolean isEmpty(Object[] array) { + return (array == null || array.length == 0); + } + + /** + * Check whether the given array contains the given element. + * @param array the array to check (may be null, + * in which case the return value will always be false) + * @param element the element to check for + * @return whether the element has been found in the given array + */ + public static boolean containsElement(Object[] array, Object element) { + if (array == null) { + return false; + } + for (Object arrayEle : array) { + if (nullSafeEquals(arrayEle, element)) { + return true; + } + } + return false; + } + + /** + * Append the given Object to the given array, returning a new array + * consisting of the input array contents plus the given Object. + * @param array the array to append to (can be null) + * @param obj the Object to append + * @return the new array (of the same component type; never null) + */ + public static Object[] addObjectToArray(Object[] array, Object obj) { + Class compType = Object.class; + if (array != null) { + compType = array.getClass().getComponentType(); + } + else if (obj != null) { + compType = obj.getClass(); + } + int newArrLength = (array != null ? array.length + 1 : 1); + Object[] newArr = (Object[]) Array.newInstance(compType, newArrLength); + if (array != null) { + System.arraycopy(array, 0, newArr, 0, array.length); + } + newArr[newArr.length - 1] = obj; + return newArr; + } + + /** + * Convert the given array (which may be a primitive array) to an + * object array (if necessary of primitive wrapper objects). + *

A null source value will be converted to an + * empty Object array. + * @param source the (potentially primitive) array + * @return the corresponding object array (never null) + * @throws IllegalArgumentException if the parameter is not an array + */ + public static Object[] toObjectArray(Object source) { + if (source instanceof Object[]) { + return (Object[]) source; + } + if (source == null) { + return new Object[0]; + } + if (!source.getClass().isArray()) { + throw new IllegalArgumentException("Source is not an array: " + source); + } + int length = Array.getLength(source); + if (length == 0) { + return new Object[0]; + } + Class wrapperType = Array.get(source, 0).getClass(); + Object[] newArray = (Object[]) Array.newInstance(wrapperType, length); + for (int i = 0; i < length; i++) { + newArray[i] = Array.get(source, i); + } + return newArray; + } + + + //--------------------------------------------------------------------- + // Convenience methods for content-based equality/hash-code handling + //--------------------------------------------------------------------- + + /** + * Determine if the given objects are equal, returning true + * if both are null or false if only one is + * null. + *

Compares arrays with Arrays.equals, performing an equality + * check based on the array elements rather than the array reference. + * @param o1 first Object to compare + * @param o2 second Object to compare + * @return whether the given objects are equal + * @see Arrays#equals + */ + public static boolean nullSafeEquals(Object o1, Object o2) { + if (o1 == o2) { + return true; + } + if (o1 == null || o2 == null) { + return false; + } + if (o1.equals(o2)) { + return true; + } + if (o1.getClass().isArray() && o2.getClass().isArray()) { + if (o1 instanceof Object[] && o2 instanceof Object[]) { + return Arrays.equals((Object[]) o1, (Object[]) o2); + } + if (o1 instanceof boolean[] && o2 instanceof boolean[]) { + return Arrays.equals((boolean[]) o1, (boolean[]) o2); + } + if (o1 instanceof byte[] && o2 instanceof byte[]) { + return Arrays.equals((byte[]) o1, (byte[]) o2); + } + if (o1 instanceof char[] && o2 instanceof char[]) { + return Arrays.equals((char[]) o1, (char[]) o2); + } + if (o1 instanceof double[] && o2 instanceof double[]) { + return Arrays.equals((double[]) o1, (double[]) o2); + } + if (o1 instanceof float[] && o2 instanceof float[]) { + return Arrays.equals((float[]) o1, (float[]) o2); + } + if (o1 instanceof int[] && o2 instanceof int[]) { + return Arrays.equals((int[]) o1, (int[]) o2); + } + if (o1 instanceof long[] && o2 instanceof long[]) { + return Arrays.equals((long[]) o1, (long[]) o2); + } + if (o1 instanceof short[] && o2 instanceof short[]) { + return Arrays.equals((short[]) o1, (short[]) o2); + } + } + return false; + } + + /** + * Return as hash code for the given object; typically the value of + * {@link Object#hashCode()}. If the object is an array, + * this method will delegate to any of the nullSafeHashCode + * methods for arrays in this class. If the object is null, + * this method returns 0. + * @see #nullSafeHashCode(Object[]) + * @see #nullSafeHashCode(boolean[]) + * @see #nullSafeHashCode(byte[]) + * @see #nullSafeHashCode(char[]) + * @see #nullSafeHashCode(double[]) + * @see #nullSafeHashCode(float[]) + * @see #nullSafeHashCode(int[]) + * @see #nullSafeHashCode(long[]) + * @see #nullSafeHashCode(short[]) + */ + public static int nullSafeHashCode(Object obj) { + if (obj == null) { + return 0; + } + if (obj.getClass().isArray()) { + if (obj instanceof Object[]) { + return nullSafeHashCode((Object[]) obj); + } + if (obj instanceof boolean[]) { + return nullSafeHashCode((boolean[]) obj); + } + if (obj instanceof byte[]) { + return nullSafeHashCode((byte[]) obj); + } + if (obj instanceof char[]) { + return nullSafeHashCode((char[]) obj); + } + if (obj instanceof double[]) { + return nullSafeHashCode((double[]) obj); + } + if (obj instanceof float[]) { + return nullSafeHashCode((float[]) obj); + } + if (obj instanceof int[]) { + return nullSafeHashCode((int[]) obj); + } + if (obj instanceof long[]) { + return nullSafeHashCode((long[]) obj); + } + if (obj instanceof short[]) { + return nullSafeHashCode((short[]) obj); + } + } + return obj.hashCode(); + } + + /** + * Return a hash code based on the contents of the specified array. + * If array is null, this method returns 0. + */ + public static int nullSafeHashCode(Object[] array) { + if (array == null) { + return 0; + } + int hash = INITIAL_HASH; + int arraySize = array.length; + for (int i = 0; i < arraySize; i++) { + hash = MULTIPLIER * hash + nullSafeHashCode(array[i]); + } + return hash; + } + + /** + * Return a hash code based on the contents of the specified array. + * If array is null, this method returns 0. + */ + public static int nullSafeHashCode(boolean[] array) { + if (array == null) { + return 0; + } + int hash = INITIAL_HASH; + int arraySize = array.length; + for (int i = 0; i < arraySize; i++) { + hash = MULTIPLIER * hash + hashCode(array[i]); + } + return hash; + } + + /** + * Return a hash code based on the contents of the specified array. + * If array is null, this method returns 0. + */ + public static int nullSafeHashCode(byte[] array) { + if (array == null) { + return 0; + } + int hash = INITIAL_HASH; + int arraySize = array.length; + for (int i = 0; i < arraySize; i++) { + hash = MULTIPLIER * hash + array[i]; + } + return hash; + } + + /** + * Return a hash code based on the contents of the specified array. + * If array is null, this method returns 0. + */ + public static int nullSafeHashCode(char[] array) { + if (array == null) { + return 0; + } + int hash = INITIAL_HASH; + int arraySize = array.length; + for (int i = 0; i < arraySize; i++) { + hash = MULTIPLIER * hash + array[i]; + } + return hash; + } + + /** + * Return a hash code based on the contents of the specified array. + * If array is null, this method returns 0. + */ + public static int nullSafeHashCode(double[] array) { + if (array == null) { + return 0; + } + int hash = INITIAL_HASH; + int arraySize = array.length; + for (int i = 0; i < arraySize; i++) { + hash = MULTIPLIER * hash + hashCode(array[i]); + } + return hash; + } + + /** + * Return a hash code based on the contents of the specified array. + * If array is null, this method returns 0. + */ + public static int nullSafeHashCode(float[] array) { + if (array == null) { + return 0; + } + int hash = INITIAL_HASH; + int arraySize = array.length; + for (int i = 0; i < arraySize; i++) { + hash = MULTIPLIER * hash + hashCode(array[i]); + } + return hash; + } + + /** + * Return a hash code based on the contents of the specified array. + * If array is null, this method returns 0. + */ + public static int nullSafeHashCode(int[] array) { + if (array == null) { + return 0; + } + int hash = INITIAL_HASH; + int arraySize = array.length; + for (int i = 0; i < arraySize; i++) { + hash = MULTIPLIER * hash + array[i]; + } + return hash; + } + + /** + * Return a hash code based on the contents of the specified array. + * If array is null, this method returns 0. + */ + public static int nullSafeHashCode(long[] array) { + if (array == null) { + return 0; + } + int hash = INITIAL_HASH; + int arraySize = array.length; + for (int i = 0; i < arraySize; i++) { + hash = MULTIPLIER * hash + hashCode(array[i]); + } + return hash; + } + + /** + * Return a hash code based on the contents of the specified array. + * If array is null, this method returns 0. + */ + public static int nullSafeHashCode(short[] array) { + if (array == null) { + return 0; + } + int hash = INITIAL_HASH; + int arraySize = array.length; + for (int i = 0; i < arraySize; i++) { + hash = MULTIPLIER * hash + array[i]; + } + return hash; + } + + /** + * Return the same value as {@link Boolean#hashCode()}. + * @see Boolean#hashCode() + */ + public static int hashCode(boolean bool) { + return bool ? 1231 : 1237; + } + + /** + * Return the same value as {@link Double#hashCode()}. + * @see Double#hashCode() + */ + public static int hashCode(double dbl) { + long bits = Double.doubleToLongBits(dbl); + return hashCode(bits); + } + + /** + * Return the same value as {@link Float#hashCode()}. + * @see Float#hashCode() + */ + public static int hashCode(float flt) { + return Float.floatToIntBits(flt); + } + + /** + * Return the same value as {@link Long#hashCode()}. + * @see Long#hashCode() + */ + public static int hashCode(long lng) { + return (int) (lng ^ (lng >>> 32)); + } + + + //--------------------------------------------------------------------- + // Convenience methods for toString output + //--------------------------------------------------------------------- + + /** + * Return a String representation of an object's overall identity. + * @param obj the object (may be null) + * @return the object's identity as String representation, + * or an empty String if the object was null + */ + public static String identityToString(Object obj) { + if (obj == null) { + return EMPTY_STRING; + } + return obj.getClass().getName() + "@" + getIdentityHexString(obj); + } + + /** + * Return a hex String form of an object's identity hash code. + * @param obj the object + * @return the object's identity code in hex notation + */ + public static String getIdentityHexString(Object obj) { + return Integer.toHexString(System.identityHashCode(obj)); + } + + /** + * Return a content-based String representation if obj is + * not null; otherwise returns an empty String. + *

Differs from {@link #nullSafeToString(Object)} in that it returns + * an empty String rather than "null" for a null value. + * @param obj the object to build a display String for + * @return a display String representation of obj + * @see #nullSafeToString(Object) + */ + public static String getDisplayString(Object obj) { + if (obj == null) { + return EMPTY_STRING; + } + return nullSafeToString(obj); + } + + /** + * Determine the class name for the given object. + *

Returns "null" if obj is null. + * @param obj the object to introspect (may be null) + * @return the corresponding class name + */ + public static String nullSafeClassName(Object obj) { + return (obj != null ? obj.getClass().getName() : NULL_STRING); + } + + /** + * Return a String representation of the specified Object. + *

Builds a String representation of the contents in case of an array. + * Returns "null" if obj is null. + * @param obj the object to build a String representation for + * @return a String representation of obj + */ + public static String nullSafeToString(Object obj) { + if (obj == null) { + return NULL_STRING; + } + if (obj instanceof String) { + return (String) obj; + } + if (obj instanceof Object[]) { + return nullSafeToString((Object[]) obj); + } + if (obj instanceof boolean[]) { + return nullSafeToString((boolean[]) obj); + } + if (obj instanceof byte[]) { + return nullSafeToString((byte[]) obj); + } + if (obj instanceof char[]) { + return nullSafeToString((char[]) obj); + } + if (obj instanceof double[]) { + return nullSafeToString((double[]) obj); + } + if (obj instanceof float[]) { + return nullSafeToString((float[]) obj); + } + if (obj instanceof int[]) { + return nullSafeToString((int[]) obj); + } + if (obj instanceof long[]) { + return nullSafeToString((long[]) obj); + } + if (obj instanceof short[]) { + return nullSafeToString((short[]) obj); + } + String str = obj.toString(); + return (str != null ? str : EMPTY_STRING); + } + + /** + * Return a String representation of the contents of the specified array. + *

The String representation consists of a list of the array's elements, + * enclosed in curly braces ("{}"). Adjacent elements are separated + * by the characters ", " (a comma followed by a space). Returns + * "null" if array is null. + * @param array the array to build a String representation for + * @return a String representation of array + */ + public static String nullSafeToString(Object[] array) { + if (array == null) { + return NULL_STRING; + } + int length = array.length; + if (length == 0) { + return EMPTY_ARRAY; + } + StringBuilder sb = new StringBuilder(); + for (int i = 0; i < length; i++) { + if (i == 0) { + sb.append(ARRAY_START); + } + else { + sb.append(ARRAY_ELEMENT_SEPARATOR); + } + sb.append(String.valueOf(array[i])); + } + sb.append(ARRAY_END); + return sb.toString(); + } + + /** + * Return a String representation of the contents of the specified array. + *

The String representation consists of a list of the array's elements, + * enclosed in curly braces ("{}"). Adjacent elements are separated + * by the characters ", " (a comma followed by a space). Returns + * "null" if array is null. + * @param array the array to build a String representation for + * @return a String representation of array + */ + public static String nullSafeToString(boolean[] array) { + if (array == null) { + return NULL_STRING; + } + int length = array.length; + if (length == 0) { + return EMPTY_ARRAY; + } + StringBuilder sb = new StringBuilder(); + for (int i = 0; i < length; i++) { + if (i == 0) { + sb.append(ARRAY_START); + } + else { + sb.append(ARRAY_ELEMENT_SEPARATOR); + } + + sb.append(array[i]); + } + sb.append(ARRAY_END); + return sb.toString(); + } + + /** + * Return a String representation of the contents of the specified array. + *

The String representation consists of a list of the array's elements, + * enclosed in curly braces ("{}"). Adjacent elements are separated + * by the characters ", " (a comma followed by a space). Returns + * "null" if array is null. + * @param array the array to build a String representation for + * @return a String representation of array + */ + public static String nullSafeToString(byte[] array) { + if (array == null) { + return NULL_STRING; + } + int length = array.length; + if (length == 0) { + return EMPTY_ARRAY; + } + StringBuilder sb = new StringBuilder(); + for (int i = 0; i < length; i++) { + if (i == 0) { + sb.append(ARRAY_START); + } + else { + sb.append(ARRAY_ELEMENT_SEPARATOR); + } + sb.append(array[i]); + } + sb.append(ARRAY_END); + return sb.toString(); + } + + /** + * Return a String representation of the contents of the specified array. + *

The String representation consists of a list of the array's elements, + * enclosed in curly braces ("{}"). Adjacent elements are separated + * by the characters ", " (a comma followed by a space). Returns + * "null" if array is null. + * @param array the array to build a String representation for + * @return a String representation of array + */ + public static String nullSafeToString(char[] array) { + if (array == null) { + return NULL_STRING; + } + int length = array.length; + if (length == 0) { + return EMPTY_ARRAY; + } + StringBuilder sb = new StringBuilder(); + for (int i = 0; i < length; i++) { + if (i == 0) { + sb.append(ARRAY_START); + } + else { + sb.append(ARRAY_ELEMENT_SEPARATOR); + } + sb.append("'").append(array[i]).append("'"); + } + sb.append(ARRAY_END); + return sb.toString(); + } + + /** + * Return a String representation of the contents of the specified array. + *

The String representation consists of a list of the array's elements, + * enclosed in curly braces ("{}"). Adjacent elements are separated + * by the characters ", " (a comma followed by a space). Returns + * "null" if array is null. + * @param array the array to build a String representation for + * @return a String representation of array + */ + public static String nullSafeToString(double[] array) { + if (array == null) { + return NULL_STRING; + } + int length = array.length; + if (length == 0) { + return EMPTY_ARRAY; + } + StringBuilder sb = new StringBuilder(); + for (int i = 0; i < length; i++) { + if (i == 0) { + sb.append(ARRAY_START); + } + else { + sb.append(ARRAY_ELEMENT_SEPARATOR); + } + + sb.append(array[i]); + } + sb.append(ARRAY_END); + return sb.toString(); + } + + /** + * Return a String representation of the contents of the specified array. + *

The String representation consists of a list of the array's elements, + * enclosed in curly braces ("{}"). Adjacent elements are separated + * by the characters ", " (a comma followed by a space). Returns + * "null" if array is null. + * @param array the array to build a String representation for + * @return a String representation of array + */ + public static String nullSafeToString(float[] array) { + if (array == null) { + return NULL_STRING; + } + int length = array.length; + if (length == 0) { + return EMPTY_ARRAY; + } + StringBuilder sb = new StringBuilder(); + for (int i = 0; i < length; i++) { + if (i == 0) { + sb.append(ARRAY_START); + } + else { + sb.append(ARRAY_ELEMENT_SEPARATOR); + } + + sb.append(array[i]); + } + sb.append(ARRAY_END); + return sb.toString(); + } + + /** + * Return a String representation of the contents of the specified array. + *

The String representation consists of a list of the array's elements, + * enclosed in curly braces ("{}"). Adjacent elements are separated + * by the characters ", " (a comma followed by a space). Returns + * "null" if array is null. + * @param array the array to build a String representation for + * @return a String representation of array + */ + public static String nullSafeToString(int[] array) { + if (array == null) { + return NULL_STRING; + } + int length = array.length; + if (length == 0) { + return EMPTY_ARRAY; + } + StringBuilder sb = new StringBuilder(); + for (int i = 0; i < length; i++) { + if (i == 0) { + sb.append(ARRAY_START); + } + else { + sb.append(ARRAY_ELEMENT_SEPARATOR); + } + sb.append(array[i]); + } + sb.append(ARRAY_END); + return sb.toString(); + } + + /** + * Return a String representation of the contents of the specified array. + *

The String representation consists of a list of the array's elements, + * enclosed in curly braces ("{}"). Adjacent elements are separated + * by the characters ", " (a comma followed by a space). Returns + * "null" if array is null. + * @param array the array to build a String representation for + * @return a String representation of array + */ + public static String nullSafeToString(long[] array) { + if (array == null) { + return NULL_STRING; + } + int length = array.length; + if (length == 0) { + return EMPTY_ARRAY; + } + StringBuilder sb = new StringBuilder(); + for (int i = 0; i < length; i++) { + if (i == 0) { + sb.append(ARRAY_START); + } + else { + sb.append(ARRAY_ELEMENT_SEPARATOR); + } + sb.append(array[i]); + } + sb.append(ARRAY_END); + return sb.toString(); + } + + /** + * Return a String representation of the contents of the specified array. + *

The String representation consists of a list of the array's elements, + * enclosed in curly braces ("{}"). Adjacent elements are separated + * by the characters ", " (a comma followed by a space). Returns + * "null" if array is null. + * @param array the array to build a String representation for + * @return a String representation of array + */ + public static String nullSafeToString(short[] array) { + if (array == null) { + return NULL_STRING; + } + int length = array.length; + if (length == 0) { + return EMPTY_ARRAY; + } + StringBuilder sb = new StringBuilder(); + for (int i = 0; i < length; i++) { + if (i == 0) { + sb.append(ARRAY_START); + } + else { + sb.append(ARRAY_ELEMENT_SEPARATOR); + } + sb.append(array[i]); + } + sb.append(ARRAY_END); + return sb.toString(); + } + + /** + * 获取对象的所有属性值,返回一个对象数组 + * @author lidab + */ + public static Object[] getFiledValues(Object o) { + String[] fieldNames = getFiledName(o); + int len = fieldNames.length; + Object[] values = new Object[len]; + for (int i = 0; i < len; i++) { + values[i] = getFieldValueByName(fieldNames[i], o); + } + return values; + } + /** + * 根据属性名获取属性值 + */ + protected static Object getFieldValueByName(String fieldName, Object o) { + try { + String firstLetter = fieldName.substring(0, 1).toUpperCase(); + String getter = "get" + firstLetter + fieldName.substring(1); + Method method = o.getClass().getMethod(getter, new Class[] {}); + Object value = method.invoke(o, new Object[] {}); + return value; + } catch (Exception e) { + return null; + } + } + /** + * 获取属性名数组 + */ + protected static String[] getFiledName(Object o) { + Field[] fields = o.getClass().getDeclaredFields(); + int len = fields.length; + String[] fieldNames = new String[len]; + for (int i = 0; i < len; i++) { + fieldNames[i] = fields[i].getName(); + } + return fieldNames; + } +} diff --git a/itools-core/itools-utils/src/main/java/com/itools/core/utils/RandomUtil.java b/itools-core/itools-utils/src/main/java/com/itools/core/utils/RandomUtil.java new file mode 100644 index 0000000000000000000000000000000000000000..1a2187c5948f742393c36080d05dd47cc5d5c852 --- /dev/null +++ b/itools-core/itools-utils/src/main/java/com/itools/core/utils/RandomUtil.java @@ -0,0 +1,42 @@ +package com.itools.core.utils; + +import java.util.Random; + +/** + * @description:随机生成1到10位的随机数的工具类 + * @author: XUCHANG + * @time: 2020/1/11 14:18 + */ +public class RandomUtil { + + public static String getRandom(int num) { + int[] array = {0,1,2,3,4,5,6,7,8,9}; + //随机对象 + Random rand = new Random(); + //循环产生 + for (int i = 10; i > 1; i--) { + int index = rand.nextInt(i); + int tmp = array[index]; + array[index] = array[i - 1]; + array[i - 1] = tmp; + } + int result = 0; + for(int i = 0; i < num; i++) { + result = result * 10 + array[i]; + } + String code = Integer.toString(result); + if (code.length() == num-1) { + code = "0" + code; + } + return code; + + } + public static void main(String[] args) { + for (int i=0 ; i<100;i++){ + System.out.println(RandomUtil.getRandom(6)); + + } + } + + +} diff --git a/itools-core/itools-utils/src/main/java/com/itools/core/utils/RegexUtil.java b/itools-core/itools-utils/src/main/java/com/itools/core/utils/RegexUtil.java new file mode 100644 index 0000000000000000000000000000000000000000..11f321f2f11e7b209dec81b8a31dc353a7fd5170 --- /dev/null +++ b/itools-core/itools-utils/src/main/java/com/itools/core/utils/RegexUtil.java @@ -0,0 +1,97 @@ +package com.itools.core.utils; + +import java.util.regex.Matcher; +import java.util.regex.Pattern; + +/** + * @description: + * @author: XUCHANG + */ +public class RegexUtil { + private final static String POSITIVE_NUMBER_PATTERN = "^[1-9]\\d*$"; + + private final static String POSIT_NUMBER_PATTERN = "^[0-9]\\d*$"; + + private final static String MOBILE_NUMBER_PATTERN = "^[1][3,4,5,7,8][0-9]{9}$"; + + private final static String EMAIL_NUMBER_PATTERN = "^\\w+([-+.]\\w+)*@\\w+([-.]\\w+)*\\.\\w+([-.]\\w+)*$"; + + private static final String DEFAULT_DATE_FORMAT = "yyyy-MM-dd"; + + + private static final String DEFAULT_DATETIME_FORMAT = "yyyy-MM-dd HH:mm:ss"; + + private static final String DATETIME_FORMAT = "yyyyMMddHHmmss"; + /** + * 正整数 不包括0 + * @param testStr + * @return + */ + public static boolean checkPositiveNum(Integer testStr){ + Pattern pattern= Pattern.compile(POSITIVE_NUMBER_PATTERN); + Matcher matcher = pattern.matcher(testStr.toString()); + return matcher.matches(); + } + /** + * 正整数包括0 + * @param testStr + * @return + */ + public static boolean checkPositNum(Integer testStr){ + Pattern pattern= Pattern.compile(POSIT_NUMBER_PATTERN); + Matcher matcher = pattern.matcher(testStr.toString()); + return matcher.matches(); + } + /** + * 校验日期 + * @param date + * @return + */ + public static boolean checkDatePattern(String date){ + if (StringUtils.isEmpty(date)){ + return false; + } + String rexp = "^((\\d{2}(([02468][048])|([13579][26]))[\\-\\/\\s]?((((0?[13578])|(1[02]))[\\-\\/\\s]?((0?[1-9])|([1-2][0-9])|(3[01])))|(((0?[469])|(11))[\\-\\/\\s]?((0?[1-9])|([1-2][0-9])|(30)))|(0?2[\\-\\/\\s]?((0?[1-9])|([1-2][0-9])))))|(\\d{2}(([02468][1235679])|([13579][01345789]))[\\-\\/\\s]?((((0?[13578])|(1[02]))[\\-\\/\\s]?((0?[1-9])|([1-2][0-9])|(3[01])))|(((0?[469])|(11))[\\-\\/\\s]?((0?[1-9])|([1-2][0-9])|(30)))|(0?2[\\-\\/\\s]?((0?[1-9])|(1[0-9])|(2[0-8]))))))"; + Pattern patternDate = Pattern.compile(rexp); + Matcher matcherDate = patternDate.matcher(date); + boolean dateType = matcherDate.matches(); + return dateType; + } + + /** + * 校验手机号码 + * @param mobile + * @return + */ + public static boolean checkMobilePattern(String mobile){ + if (StringUtils.isEmpty(mobile)){ + return false; + } + Pattern patternDate = Pattern.compile(MOBILE_NUMBER_PATTERN); + Matcher matcherDate = patternDate.matcher(mobile); + boolean dateType = matcherDate.matches(); + return dateType; + } + + /** + * 校验邮箱 + * @param email + * @return + */ + public static boolean checkEmailPattern(String email){ + if (StringUtils.isEmpty(email)){ + return false; + } + Pattern patternDate = Pattern.compile(EMAIL_NUMBER_PATTERN); + Matcher matcherDate = patternDate.matcher(email); + boolean dateType = matcherDate.matches(); + return dateType; + } + + + public static boolean checkPositNum(Long deptId) { + Pattern pattern= Pattern.compile(POSIT_NUMBER_PATTERN); + Matcher matcher = pattern.matcher(deptId.toString()); + return matcher.matches(); + } +} diff --git a/itools-core/itools-utils/src/main/java/com/itools/core/utils/SnowFlake.java b/itools-core/itools-utils/src/main/java/com/itools/core/utils/SnowFlake.java new file mode 100644 index 0000000000000000000000000000000000000000..099c9c9aab11d0424d9d4c3a5f220988ba8d61b4 --- /dev/null +++ b/itools-core/itools-utils/src/main/java/com/itools/core/utils/SnowFlake.java @@ -0,0 +1,108 @@ +package com.itools.core.utils; + + +/** + * @description:Twitter的分布式自增ID雪花算法snowflake (Java版) + * @author: XUCHANG + */ +public class SnowFlake { + + /** + * 起始的时间戳 + */ + private final static long START_STMP = 1480166465631L; + + /** + * 每一部分占用的位数 + */ + private final static long SEQUENCE_BIT = 12; //序列号占用的位数 + private final static long MACHINE_BIT = 5; //机器标识占用的位数 + private final static long DATACENTER_BIT = 5;//数据中心占用的位数 + + /** + * 每一部分的最大值 + */ + private final static long MAX_DATACENTER_NUM = -1L ^ (-1L << DATACENTER_BIT); + private final static long MAX_MACHINE_NUM = -1L ^ (-1L << MACHINE_BIT); + private final static long MAX_SEQUENCE = -1L ^ (-1L << SEQUENCE_BIT); + + /** + * 每一部分向左的位移 + */ + private final static long MACHINE_LEFT = SEQUENCE_BIT; + private final static long DATACENTER_LEFT = SEQUENCE_BIT + MACHINE_BIT; + private final static long TIMESTMP_LEFT = DATACENTER_LEFT + DATACENTER_BIT; + + private long datacenterId; //数据中心 + private long machineId; //机器标识 + private long sequence = 0L; //序列号 + private long lastStmp = -1L;//上一次时间戳 + + public SnowFlake(long datacenterId, long machineId) { + if (datacenterId > MAX_DATACENTER_NUM || datacenterId < 0) { + throw new IllegalArgumentException("datacenterId can't be greater than MAX_DATACENTER_NUM or less than 0"); + } + if (machineId > MAX_MACHINE_NUM || machineId < 0) { + throw new IllegalArgumentException("machineId can't be greater than MAX_MACHINE_NUM or less than 0"); + } + this.datacenterId = datacenterId; + this.machineId = machineId; + } + + /** + * 产生下一个ID + * + * @return + */ + public synchronized long nextId() { + long currStmp = getNewstmp(); + if (currStmp < lastStmp) { + throw new RuntimeException("Clock moved backwards. Refusing to generate id"); + } + + if (currStmp == lastStmp) { + //相同毫秒内,序列号自增 + sequence = (sequence + 1) & MAX_SEQUENCE; + //同一毫秒的序列数已经达到最大 + if (sequence == 0L) { + currStmp = getNextMill(); + } + } else { + //不同毫秒内,序列号置为0 + sequence = 0L; + } + + lastStmp = currStmp; + + return (currStmp - START_STMP) << TIMESTMP_LEFT //时间戳部分 + | datacenterId << DATACENTER_LEFT //数据中心部分 + | machineId << MACHINE_LEFT //机器标识部分 + | sequence; //序列号部分 + } + + private long getNextMill() { + long mill = getNewstmp(); + while (mill <= lastStmp) { + mill = getNewstmp(); + } + return mill; + } + + private long getNewstmp() { + return System.currentTimeMillis(); + } + + public static void main(String[] args) { + SnowFlake snowFlake = new SnowFlake(2, 3); + + long start = System.currentTimeMillis(); + for (int i = 0; i < 1000000; i++) { + System.out.println(snowFlake.nextId()); + } + + System.out.println(System.currentTimeMillis() - start); + + + } +} + diff --git a/itools-core/itools-utils/src/main/java/com/itools/core/utils/SnowflakeIdWorker.java b/itools-core/itools-utils/src/main/java/com/itools/core/utils/SnowflakeIdWorker.java new file mode 100644 index 0000000000000000000000000000000000000000..cce083050e52d575db6d821f9256059825ae64f3 --- /dev/null +++ b/itools-core/itools-utils/src/main/java/com/itools/core/utils/SnowflakeIdWorker.java @@ -0,0 +1,147 @@ +package com.itools.core.utils; + + +/** + * Twitter_Snowflake
+ * SnowFlake的结构如下(每部分用-分开):
+ * 0 - 0000000000 0000000000 0000000000 0000000000 0 - 00000 - 00000 - 000000000000
+ * 1位标识,由于long基本类型在Java中是带符号的,最高位是符号位,正数是0,负数是1,所以id一般是正数,最高位是0
+ * 41位时间截(毫秒级),注意,41位时间截不是存储当前时间的时间截,而是存储时间截的差值(当前时间截 - 开始时间截) + * 得到的值),这里的的开始时间截,一般是我们的id生成器开始使用的时间,由我们程序来指定的(如下下面程序IdWorker类的startTime属性)。41位的时间截,可以使用69年,年T = (1L << 41) / (1000L * 60 * 60 * 24 * 365) = 69
+ * 10位的数据机器位,可以部署在1024个节点,包括5位datacenterId和5位workerId
+ * 12位序列,毫秒内的计数,12位的计数顺序号支持每个节点每毫秒(同一机器,同一时间截)产生4096个ID序号
+ * 加起来刚好64位,为一个Long型。
+ * SnowFlake的优点是,整体上按照时间自增排序,并且整个分布式系统内不会产生ID碰撞(由数据中心ID和机器ID作区分),并且效率较高,经测试,SnowFlake每秒能够产生26万ID左右。 + */ +public class SnowflakeIdWorker { + + // ==============================Fields=========================================== + /** 开始时间截 (2015-01-01) */ + private final long twepoch = 1420041600000L; + + /** 机器id所占的位数 */ + private final long workerIdBits = 5L; + + /** 数据标识id所占的位数 */ + private final long datacenterIdBits = 5L; + + /** 支持的最大机器id,结果是31 (这个移位算法可以很快的计算出几位二进制数所能表示的最大十进制数) */ + private final long maxWorkerId = -1L ^ (-1L << workerIdBits); + + /** 支持的最大数据标识id,结果是31 */ + private final long maxDatacenterId = -1L ^ (-1L << datacenterIdBits); + + /** 序列在id中占的位数 */ + private final long sequenceBits = 12L; + + /** 机器ID向左移12位 */ + private final long workerIdShift = sequenceBits; + + /** 数据标识id向左移17位(12+5) */ + private final long datacenterIdShift = sequenceBits + workerIdBits; + + /** 时间截向左移22位(5+5+12) */ + private final long timestampLeftShift = sequenceBits + workerIdBits + datacenterIdBits; + + /** 生成序列的掩码,这里为4095 (0b111111111111=0xfff=4095) */ + private final long sequenceMask = -1L ^ (-1L << sequenceBits); + + /** 工作机器ID(0~31) */ + private long workerId; + + /** 数据中心ID(0~31) */ + private long datacenterId; + + /** 毫秒内序列(0~4095) */ + private long sequence = 0L; + + /** 上次生成ID的时间截 */ + private long lastTimestamp = -1L; + + //==============================Constructors===================================== + /** + * 构造函数 + * @param workerId 工作ID (0~31) + * @param datacenterId 数据中心ID (0~31) + */ + public SnowflakeIdWorker(long workerId, long datacenterId) { + if (workerId > maxWorkerId || workerId < 0) { + throw new IllegalArgumentException(String.format("worker Id can't be greater than %d or less than 0", maxWorkerId)); + } + if (datacenterId > maxDatacenterId || datacenterId < 0) { + throw new IllegalArgumentException(String.format("datacenter Id can't be greater than %d or less than 0", maxDatacenterId)); + } + this.workerId = workerId; + this.datacenterId = datacenterId; + } + + // ==============================Methods========================================== + /** + * 获得下一个ID (该方法是线程安全的) + * @return SnowflakeId + */ + public synchronized long nextId() { + long timestamp = timeGen(); + + //如果当前时间小于上一次ID生成的时间戳,说明系统时钟回退过这个时候应当抛出异常 + if (timestamp < lastTimestamp) { + throw new RuntimeException( + String.format("Clock moved backwards. Refusing to generate id for %d milliseconds", lastTimestamp - timestamp)); + } + + //如果是同一时间生成的,则进行毫秒内序列 + if (lastTimestamp == timestamp) { + sequence = (sequence + 1) & sequenceMask; + //毫秒内序列溢出 + if (sequence == 0) { + //阻塞到下一个毫秒,获得新的时间戳 + timestamp = tilNextMillis(lastTimestamp); + } + } + //时间戳改变,毫秒内序列重置 + else { + sequence = 0L; + } + + //上次生成ID的时间截 + lastTimestamp = timestamp; + + //移位并通过或运算拼到一起组成64位的ID + return ((timestamp - twepoch) << timestampLeftShift) // + | (datacenterId << datacenterIdShift) // + | (workerId << workerIdShift) // + | sequence; + } + + /** + * 阻塞到下一个毫秒,直到获得新的时间戳 + * @param lastTimestamp 上次生成ID的时间截 + * @return 当前时间戳 + */ + protected long tilNextMillis(long lastTimestamp) { + long timestamp = timeGen(); + while (timestamp <= lastTimestamp) { + timestamp = timeGen(); + } + return timestamp; + } + + /** + * 返回以毫秒为单位的当前时间 + * @return 当前时间(毫秒) + */ + protected long timeGen() { + return System.currentTimeMillis(); + } + + + public static void main(String[] args) { +// System.out.println(Long.toBinaryString(5)); + SnowflakeIdWorker idWorker = new SnowflakeIdWorker(1, 1); + for (int i = 0; i < 10000; i++) { + long id = idWorker.nextId(); + System.out.println(Long.toBinaryString(id)); + System.out.println(id); + } + } +} diff --git a/itools-core/itools-utils/src/main/java/com/itools/core/utils/StringUtils.java b/itools-core/itools-utils/src/main/java/com/itools/core/utils/StringUtils.java new file mode 100644 index 0000000000000000000000000000000000000000..49ced1706f12a68db10538a519a118c1233ddc10 --- /dev/null +++ b/itools-core/itools-utils/src/main/java/com/itools/core/utils/StringUtils.java @@ -0,0 +1,1325 @@ +/* + * Copyright 2002-2010 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.itools.core.utils; + +import java.io.PrintWriter; +import java.io.StringWriter; +import java.io.UnsupportedEncodingException; +import java.lang.reflect.Array; +import java.util.*; +import java.util.regex.Pattern; + +/** + * Miscellaneous {@link String} utility methods. + * + *

Mainly for internal use within the framework; consider + * Jakarta's Commons Lang + * for a more comprehensive suite of String utilities. + * + *

This class delivers some simple functionality that should really + * be provided by the core Java String and {@link StringBuilder} + * classes, such as the ability to {@link #replace} all occurrences of a given + * substring in a target string. It also provides easy-to-use methods to convert + * between delimited strings, such as CSV strings, and collections and arrays. + * + * @author Rod Johnson + * @author Juergen Hoeller + * @author Keith Donald + * @author Rob Harrop + * @author Rick Evans + * @author Arjen Poutsma + * @since 16 April 2001 + * @see org.apache.commons.lang.StringUtils + */ +public abstract class StringUtils { + + private static final String FOLDER_SEPARATOR = "/"; + + private static final String WINDOWS_FOLDER_SEPARATOR = "\\"; + + private static final String TOP_PATH = ".."; + + private static final String CURRENT_PATH = "."; + + private static final char EXTENSION_SEPARATOR = '.'; + + private static Pattern NUMBER_PATTERN = Pattern.compile("^[-\\+]?[\\d]*$"); + + + //--------------------------------------------------------------------- + // General convenience methods for working with Strings + //--------------------------------------------------------------------- + + /** + * Check that the given CharSequence is neither null nor of length 0. + * Note: Will return true for a CharSequence that purely consists of whitespace. + *

+	 * StringUtils.hasLength(null) = false
+	 * StringUtils.hasLength("") = false
+	 * StringUtils.hasLength(" ") = true
+	 * StringUtils.hasLength("Hello") = true
+	 * 
+ * @param str the CharSequence to check (may be null) + * @return true if the CharSequence is not null and has length + * @see #hasText(String) + */ + public static boolean hasLength(CharSequence str) { + return (str != null && str.length() > 0); + } + + /** + * Check that the given String is neither null nor of length 0. + * Note: Will return true for a String that purely consists of whitespace. + * @param str the String to check (may be null) + * @return true if the String is not null and has length + * @see #hasLength(CharSequence) + */ + public static boolean hasLength(String str) { + return hasLength((CharSequence) str); + } + + /** + * Check whether the given CharSequence has actual text. + * More specifically, returns true if the string not null, + * its length is greater than 0, and it contains at least one non-whitespace character. + *

+	 * StringUtils.hasText(null) = false
+	 * StringUtils.hasText("") = false
+	 * StringUtils.hasText(" ") = false
+	 * StringUtils.hasText("12345") = true
+	 * StringUtils.hasText(" 12345 ") = true
+	 * 
+ * @param str the CharSequence to check (may be null) + * @return true if the CharSequence is not null, + * its length is greater than 0, and it does not contain whitespace only + * @see Character#isWhitespace + */ + public static boolean hasText(CharSequence str) { + if (!hasLength(str)) { + return false; + } + int strLen = str.length(); + for (int i = 0; i < strLen; i++) { + if (!Character.isWhitespace(str.charAt(i))) { + return true; + } + } + return false; + } + + /** + * Check whether the given String has actual text. + * More specifically, returns true if the string not null, + * its length is greater than 0, and it contains at least one non-whitespace character. + * @param str the String to check (may be null) + * @return true if the String is not null, its length is + * greater than 0, and it does not contain whitespace only + * @see #hasText(CharSequence) + */ + public static boolean hasText(String str) { + return hasText((CharSequence) str); + } + + /** + * Check whether the given CharSequence contains any whitespace characters. + * @param str the CharSequence to check (may be null) + * @return true if the CharSequence is not empty and + * contains at least 1 whitespace character + * @see Character#isWhitespace + */ + public static boolean containsWhitespace(CharSequence str) { + if (!hasLength(str)) { + return false; + } + int strLen = str.length(); + for (int i = 0; i < strLen; i++) { + if (Character.isWhitespace(str.charAt(i))) { + return true; + } + } + return false; + } + + /** + * Check whether the given String contains any whitespace characters. + * @param str the String to check (may be null) + * @return true if the String is not empty and + * contains at least 1 whitespace character + * @see #containsWhitespace(CharSequence) + */ + public static boolean containsWhitespace(String str) { + return containsWhitespace((CharSequence) str); + } + + /** + * Trim leading and trailing whitespace from the given String. + * @param str the String to check + * @return the trimmed String + * @see Character#isWhitespace + */ + public static String trimWhitespace(String str) { + if (!hasLength(str)) { + return str; + } + StringBuilder sb = new StringBuilder(str); + while (sb.length() > 0 && Character.isWhitespace(sb.charAt(0))) { + sb.deleteCharAt(0); + } + while (sb.length() > 0 && Character.isWhitespace(sb.charAt(sb.length() - 1))) { + sb.deleteCharAt(sb.length() - 1); + } + return sb.toString(); + } + + /** + * Trim all whitespace from the given String: + * leading, trailing, and inbetween characters. + * @param str the String to check + * @return the trimmed String + * @see Character#isWhitespace + */ + public static String trimAllWhitespace(String str) { + if (!hasLength(str)) { + return str; + } + StringBuilder sb = new StringBuilder(str); + int index = 0; + while (sb.length() > index) { + if (Character.isWhitespace(sb.charAt(index))) { + sb.deleteCharAt(index); + } + else { + index++; + } + } + return sb.toString(); + } + + /** + * Trim leading whitespace from the given String. + * @param str the String to check + * @return the trimmed String + * @see Character#isWhitespace + */ + public static String trimLeadingWhitespace(String str) { + if (!hasLength(str)) { + return str; + } + StringBuilder sb = new StringBuilder(str); + while (sb.length() > 0 && Character.isWhitespace(sb.charAt(0))) { + sb.deleteCharAt(0); + } + return sb.toString(); + } + + /** + * Trim trailing whitespace from the given String. + * @param str the String to check + * @return the trimmed String + * @see Character#isWhitespace + */ + public static String trimTrailingWhitespace(String str) { + if (!hasLength(str)) { + return str; + } + StringBuilder sb = new StringBuilder(str); + while (sb.length() > 0 && Character.isWhitespace(sb.charAt(sb.length() - 1))) { + sb.deleteCharAt(sb.length() - 1); + } + return sb.toString(); + } + + /** + * Trim all occurences of the supplied leading character from the given String. + * @param str the String to check + * @param leadingCharacter the leading character to be trimmed + * @return the trimmed String + */ + public static String trimLeadingCharacter(String str, char leadingCharacter) { + if (!hasLength(str)) { + return str; + } + StringBuilder sb = new StringBuilder(str); + while (sb.length() > 0 && sb.charAt(0) == leadingCharacter) { + sb.deleteCharAt(0); + } + return sb.toString(); + } + + /** + * Trim all occurences of the supplied trailing character from the given String. + * @param str the String to check + * @param trailingCharacter the trailing character to be trimmed + * @return the trimmed String + */ + public static String trimTrailingCharacter(String str, char trailingCharacter) { + if (!hasLength(str)) { + return str; + } + StringBuilder sb = new StringBuilder(str); + while (sb.length() > 0 && sb.charAt(sb.length() - 1) == trailingCharacter) { + sb.deleteCharAt(sb.length() - 1); + } + return sb.toString(); + } + + + /** + * Test if the given String starts with the specified prefix, + * ignoring upper/lower case. + * @param str the String to check + * @param prefix the prefix to look for + * @see String#startsWith + */ + public static boolean startsWithIgnoreCase(String str, String prefix) { + if (str == null || prefix == null) { + return false; + } + if (str.startsWith(prefix)) { + return true; + } + if (str.length() < prefix.length()) { + return false; + } + String lcStr = str.substring(0, prefix.length()).toLowerCase(); + String lcPrefix = prefix.toLowerCase(); + return lcStr.equals(lcPrefix); + } + + /** + * Test if the given String ends with the specified suffix, + * ignoring upper/lower case. + * @param str the String to check + * @param suffix the suffix to look for + * @see String#endsWith + */ + public static boolean endsWithIgnoreCase(String str, String suffix) { + if (str == null || suffix == null) { + return false; + } + if (str.endsWith(suffix)) { + return true; + } + if (str.length() < suffix.length()) { + return false; + } + + String lcStr = str.substring(str.length() - suffix.length()).toLowerCase(); + String lcSuffix = suffix.toLowerCase(); + return lcStr.equals(lcSuffix); + } + + /** + * Test whether the given string matches the given substring + * at the given index. + * @param str the original string (or StringBuilder) + * @param index the index in the original string to start matching against + * @param substring the substring to match at the given index + */ + public static boolean substringMatch(CharSequence str, int index, CharSequence substring) { + for (int j = 0; j < substring.length(); j++) { + int i = index + j; + if (i >= str.length() || str.charAt(i) != substring.charAt(j)) { + return false; + } + } + return true; + } + + /** + * Count the occurrences of the substring in string s. + * @param str string to search in. Return 0 if this is null. + * @param sub string to search for. Return 0 if this is null. + */ + public static int countOccurrencesOf(String str, String sub) { + if (str == null || sub == null || str.length() == 0 || sub.length() == 0) { + return 0; + } + int count = 0; + int pos = 0; + int idx; + while ((idx = str.indexOf(sub, pos)) != -1) { + ++count; + pos = idx + sub.length(); + } + return count; + } + + /** + * Replace all occurences of a substring within a string with + * another string. + * @param inString String to examine + * @param oldPattern String to replace + * @param newPattern String to insert + * @return a String with the replacements + */ + public static String replace(String inString, String oldPattern, String newPattern) { + if (!hasLength(inString) || !hasLength(oldPattern) || newPattern == null) { + return inString; + } + StringBuilder sb = new StringBuilder(); + int pos = 0; // our position in the old string + int index = inString.indexOf(oldPattern); + // the index of an occurrence we've found, or -1 + int patLen = oldPattern.length(); + while (index >= 0) { + sb.append(inString.substring(pos, index)); + sb.append(newPattern); + pos = index + patLen; + index = inString.indexOf(oldPattern, pos); + } + sb.append(inString.substring(pos)); + // remember to append any characters to the right of a match + return sb.toString(); + } + + /** + * Delete all occurrences of the given substring. + * @param inString the original String + * @param pattern the pattern to delete all occurrences of + * @return the resulting String + */ + public static String delete(String inString, String pattern) { + return replace(inString, pattern, ""); + } + + /** + * Delete any character in a given String. + * @param inString the original String + * @param charsToDelete a set of characters to delete. + * E.g. "az\n" will delete 'a's, 'z's and new lines. + * @return the resulting String + */ + public static String deleteAny(String inString, String charsToDelete) { + if (!hasLength(inString) || !hasLength(charsToDelete)) { + return inString; + } + StringBuilder sb = new StringBuilder(); + for (int i = 0; i < inString.length(); i++) { + char c = inString.charAt(i); + if (charsToDelete.indexOf(c) == -1) { + sb.append(c); + } + } + return sb.toString(); + } + + + //--------------------------------------------------------------------- + // Convenience methods for working with formatted Strings + //--------------------------------------------------------------------- + + /** + * Quote the given String with single quotes. + * @param str the input String (e.g. "myString") + * @return the quoted String (e.g. "'myString'"), + * or null if the input was null + */ + public static String quote(String str) { + return (str != null ? "'" + str + "'" : null); + } + + /** + * Turn the given Object into a String with single quotes + * if it is a String; keeping the Object as-is else. + * @param obj the input Object (e.g. "myString") + * @return the quoted String (e.g. "'myString'"), + * or the input object as-is if not a String + */ + public static Object quoteIfString(Object obj) { + return (obj instanceof String ? quote((String) obj) : obj); + } + + /** + * Unqualify a string qualified by a '.' dot character. For example, + * "this.name.is.qualified", returns "qualified". + * @param qualifiedName the qualified name + */ + public static String unqualify(String qualifiedName) { + return unqualify(qualifiedName, '.'); + } + + /** + * Unqualify a string qualified by a separator character. For example, + * "this:name:is:qualified" returns "qualified" if using a ':' separator. + * @param qualifiedName the qualified name + * @param separator the separator + */ + public static String unqualify(String qualifiedName, char separator) { + return qualifiedName.substring(qualifiedName.lastIndexOf(separator) + 1); + } + + /** + * Capitalize a String, changing the first letter to + * upper case as per {@link Character#toUpperCase(char)}. + * No other letters are changed. + * @param str the String to capitalize, may be null + * @return the capitalized String, null if null + */ + public static String capitalize(String str) { + return changeFirstCharacterCase(str, true); + } + + /** + * Uncapitalize a String, changing the first letter to + * lower case as per {@link Character#toLowerCase(char)}. + * No other letters are changed. + * @param str the String to uncapitalize, may be null + * @return the uncapitalized String, null if null + */ + public static String uncapitalize(String str) { + return changeFirstCharacterCase(str, false); + } + + protected static String changeFirstCharacterCase(String str, boolean capitalize) { + if (str == null || str.length() == 0) { + return str; + } + StringBuilder sb = new StringBuilder(str.length()); + if (capitalize) { + sb.append(Character.toUpperCase(str.charAt(0))); + } + else { + sb.append(Character.toLowerCase(str.charAt(0))); + } + sb.append(str.substring(1)); + return sb.toString(); + } + + /** + * Extract the filename from the given path, + * e.g. "mypath/myfile.txt" -> "myfile.txt". + * @param path the file path (may be null) + * @return the extracted filename, or null if none + */ + public static String getFilename(String path) { + if (path == null) { + return null; + } + int separatorIndex = path.lastIndexOf(FOLDER_SEPARATOR); + return (separatorIndex != -1 ? path.substring(separatorIndex + 1) : path); + } + + /** + * Extract the filename extension from the given path, + * e.g. "mypath/myfile.txt" -> "txt". + * @param path the file path (may be null) + * @return the extracted filename extension, or null if none + */ + public static String getFilenameExtension(String path) { + if (path == null) { + return null; + } + int sepIndex = path.lastIndexOf(EXTENSION_SEPARATOR); + return (sepIndex != -1 ? path.substring(sepIndex + 1) : null); + } + + /** + * Strip the filename extension from the given path, + * e.g. "mypath/myfile.txt" -> "mypath/myfile". + * @param path the file path (may be null) + * @return the path with stripped filename extension, + * or null if none + */ + public static String stripFilenameExtension(String path) { + if (path == null) { + return null; + } + int sepIndex = path.lastIndexOf(EXTENSION_SEPARATOR); + return (sepIndex != -1 ? path.substring(0, sepIndex) : path); + } + + /** + * Apply the given relative path to the given path, + * assuming standard Java folder separation (i.e. "/" separators). + * @param path the path to start from (usually a full file path) + * @param relativePath the relative path to apply + * (relative to the full file path above) + * @return the full file path that results from applying the relative path + */ + public static String applyRelativePath(String path, String relativePath) { + int separatorIndex = path.lastIndexOf(FOLDER_SEPARATOR); + if (separatorIndex != -1) { + String newPath = path.substring(0, separatorIndex); + if (!relativePath.startsWith(FOLDER_SEPARATOR)) { + newPath += FOLDER_SEPARATOR; + } + return newPath + relativePath; + } + else { + return relativePath; + } + } + + /** + * Normalize the path by suppressing sequences like "path/.." and + * inner simple dots. + *

The result is convenient for path comparison. For other uses, + * notice that Windows separators ("\") are replaced by simple slashes. + * @param path the original path + * @return the normalized path + */ + public static String cleanPath(String path) { + if (path == null) { + return null; + } + String pathToUse = replace(path, WINDOWS_FOLDER_SEPARATOR, FOLDER_SEPARATOR); + + // Strip prefix from path to analyze, to not treat it as part of the + // first path element. This is necessary to correctly parse paths like + // "file:core/../core/io/Resource.class", where the ".." should just + // strip the first "core" directory while keeping the "file:" prefix. + int prefixIndex = pathToUse.indexOf(":"); + String prefix = ""; + if (prefixIndex != -1) { + prefix = pathToUse.substring(0, prefixIndex + 1); + pathToUse = pathToUse.substring(prefixIndex + 1); + } + if (pathToUse.startsWith(FOLDER_SEPARATOR)) { + prefix = prefix + FOLDER_SEPARATOR; + pathToUse = pathToUse.substring(1); + } + + String[] pathArray = delimitedListToStringArray(pathToUse, FOLDER_SEPARATOR); + List pathElements = new LinkedList(); + int tops = 0; + + for (int i = pathArray.length - 1; i >= 0; i--) { + String element = pathArray[i]; + if (CURRENT_PATH.equals(element)) { + // Points to current directory - drop it. + } + else if (TOP_PATH.equals(element)) { + // Registering top path found. + tops++; + } + else { + if (tops > 0) { + // Merging path element with element corresponding to top path. + tops--; + } + else { + // Normal path element found. + pathElements.add(0, element); + } + } + } + + // Remaining top paths need to be retained. + for (int i = 0; i < tops; i++) { + pathElements.add(0, TOP_PATH); + } + + return prefix + collectionToDelimitedString(pathElements, FOLDER_SEPARATOR); + } + + /** + * Compare two paths after normalization of them. + * @param path1 first path for comparison + * @param path2 second path for comparison + * @return whether the two paths are equivalent after normalization + */ + public static boolean pathEquals(String path1, String path2) { + return cleanPath(path1).equals(cleanPath(path2)); + } + + /** + * Parse the given localeString into a {@link Locale}. + *

This is the inverse operation of {@link Locale#toString Locale's toString}. + * @param localeString the locale string, following Locale's + * toString() format ("en", "en_UK", etc); + * also accepts spaces as separators, as an alternative to underscores + * @return a corresponding Locale instance + */ + public static Locale parseLocaleString(String localeString) { + String[] parts = tokenizeToStringArray(localeString, "_ ", false, false); + String language = (parts.length > 0 ? parts[0] : ""); + String country = (parts.length > 1 ? parts[1] : ""); + String variant = ""; + if (parts.length >= 2) { + // There is definitely a variant, and it is everything after the country + // code sans the separator between the country code and the variant. + int endIndexOfCountryCode = localeString.indexOf(country) + country.length(); + // Strip off any leading '_' and whitespace, what's left is the variant. + variant = trimLeadingWhitespace(localeString.substring(endIndexOfCountryCode)); + if (variant.startsWith("_")) { + variant = trimLeadingCharacter(variant, '_'); + } + } + return (language.length() > 0 ? new Locale(language, country, variant) : null); + } + + /** + * Determine the RFC 3066 compliant language tag, + * as used for the HTTP "Accept-Language" header. + * @param locale the Locale to transform to a language tag + * @return the RFC 3066 compliant language tag as String + */ + public static String toLanguageTag(Locale locale) { + return locale.getLanguage() + (hasText(locale.getCountry()) ? "-" + locale.getCountry() : ""); + } + + + //--------------------------------------------------------------------- + // Convenience methods for working with String arrays + //--------------------------------------------------------------------- + + /** + * Append the given String to the given String array, returning a new array + * consisting of the input array contents plus the given String. + * @param array the array to append to (can be null) + * @param str the String to append + * @return the new array (never null) + */ + public static String[] addStringToArray(String[] array, String str) { + if (ObjectUtils.isEmpty(array)) { + return new String[] {str}; + } + String[] newArr = new String[array.length + 1]; + System.arraycopy(array, 0, newArr, 0, array.length); + newArr[array.length] = str; + return newArr; + } + + /** + * Concatenate the given String arrays into one, + * with overlapping array elements included twice. + *

The order of elements in the original arrays is preserved. + * @param array1 the first array (can be null) + * @param array2 the second array (can be null) + * @return the new array (null if both given arrays were null) + */ + public static String[] concatenateStringArrays(String[] array1, String[] array2) { + if (ObjectUtils.isEmpty(array1)) { + return array2; + } + if (ObjectUtils.isEmpty(array2)) { + return array1; + } + String[] newArr = new String[array1.length + array2.length]; + System.arraycopy(array1, 0, newArr, 0, array1.length); + System.arraycopy(array2, 0, newArr, array1.length, array2.length); + return newArr; + } + + /** + * Merge the given String arrays into one, with overlapping + * array elements only included once. + *

The order of elements in the original arrays is preserved + * (with the exception of overlapping elements, which are only + * included on their first occurence). + * @param array1 the first array (can be null) + * @param array2 the second array (can be null) + * @return the new array (null if both given arrays were null) + */ + public static String[] mergeStringArrays(String[] array1, String[] array2) { + if (ObjectUtils.isEmpty(array1)) { + return array2; + } + if (ObjectUtils.isEmpty(array2)) { + return array1; + } + List result = new ArrayList(); + result.addAll(Arrays.asList(array1)); + for (String str : array2) { + if (!result.contains(str)) { + result.add(str); + } + } + return toStringArray(result); + } + + /** + * Turn given source String array into sorted array. + * @param array the source array + * @return the sorted array (never null) + */ + public static String[] sortStringArray(String[] array) { + if (ObjectUtils.isEmpty(array)) { + return new String[0]; + } + Arrays.sort(array); + return array; + } + + /** + * Copy the given Collection into a String array. + * The Collection must contain String elements only. + * @param collection the Collection to copy + * @return the String array (null if the passed-in + * Collection was null) + */ + public static String[] toStringArray(Collection collection) { + if (collection == null) { + return null; + } + return collection.toArray(new String[collection.size()]); + } + + public static String[] toStringArray(Object[] coll) { + if(coll == null) { + return null; + } + String[] res = new String[coll.length]; + for(int i=0; i < coll.length; i++) { + if(coll[i] == null) { + res[i] = null; + } else if(coll[i] instanceof String) { + res[i] = (String)coll[i]; + } else { + res[i] = coll[i].toString(); + } + } + return res; + } + + public static String[] toStringArray(Object obj) { + if(obj == null) { + return null; + } + if(obj.getClass().isArray()) { + return toStringArray((Object[])obj); + } + return null; + } + + /** + * Copy the given Enumeration into a String array. + * The Enumeration must contain String elements only. + * @param enumeration the Enumeration to copy + * @return the String array (null if the passed-in + * Enumeration was null) + */ + public static String[] toStringArray(Enumeration enumeration) { + if (enumeration == null) { + return null; + } + List list = Collections.list(enumeration); + return list.toArray(new String[list.size()]); + } + + @SuppressWarnings({ "unchecked", "rawtypes" }) + public static String toString(Object obj) { + if(obj == null) { + return null; + } + StringBuffer sb = new StringBuffer(); + if(obj.getClass().isArray()) { + sb.append("["); + for(int i = 0; i< Array.getLength(obj); i++) { + if(i > 0) { + sb.append(", "); + } + sb.append(toString(Array.get(obj, i))); + } + sb.append("]"); + } else if(obj instanceof Collection) { + sb.append("["); + ((Collection)obj).stream().map(o -> toString(o) + ", ").peek(sb::append); + sb.append("]"); + } else if(obj instanceof Map) { + sb.append("{"); + final Map m = (Map)obj; + for(Object k: m.keySet()) { + sb.append(k).append(":").append(toString(m.get(k))).append(", "); + } + sb.append("}"); + } else if(obj instanceof Throwable) { + Throwable t = (Throwable)obj; + StringWriter sw = new StringWriter(); + PrintWriter pw = new PrintWriter(sw); + t.printStackTrace(pw); + sb.append(sw.toString()); + } else { + sb.append(obj); + } + return sb.toString(); + } + /** + * Trim the elements of the given String array, + * calling String.trim() on each of them. + * @param array the original String array + * @return the resulting array (of the same size) with trimmed elements + */ + public static String[] trimArrayElements(String[] array) { + if (ObjectUtils.isEmpty(array)) { + return new String[0]; + } + String[] result = new String[array.length]; + for (int i = 0; i < array.length; i++) { + String element = array[i]; + result[i] = (element != null ? element.trim() : null); + } + return result; + } + + /** + * Remove duplicate Strings from the given array. + * Also sorts the array, as it uses a TreeSet. + * @param array the String array + * @return an array without duplicates, in natural sort order + */ + public static String[] removeDuplicateStrings(String[] array) { + if (ObjectUtils.isEmpty(array)) { + return array; + } + Set set = new TreeSet(); + for (String element : array) { + set.add(element); + } + return toStringArray(set); + } + + /** + * Split a String at the first occurrence of the delimiter. + * Does not include the delimiter in the result. + * @param toSplit the string to split + * @param delimiter to split the string up with + * @return a two element array with index 0 being before the delimiter, and + * index 1 being after the delimiter (neither element includes the delimiter); + * or null if the delimiter wasn't found in the given input String + */ + public static String[] split(String toSplit, String delimiter) { + if (!hasLength(toSplit) || !hasLength(delimiter)) { + return null; + } + int offset = toSplit.indexOf(delimiter); + if (offset < 0) { + return new String[]{toSplit}; + } + String beforeDelimiter = toSplit.substring(0, offset); + String afterDelimiter = toSplit.substring(offset + delimiter.length()); + return new String[] {beforeDelimiter, afterDelimiter}; + } + + /** + * Take an array Strings and split each element based on the given delimiter. + * A Properties instance is then generated, with the left of the + * delimiter providing the key, and the right of the delimiter providing the value. + *

Will trim both the key and value before adding them to the + * Properties instance. + * @param array the array to process + * @param delimiter to split each element using (typically the equals symbol) + * @return a Properties instance representing the array contents, + * or null if the array to process was null or empty + */ + public static Properties splitArrayElementsIntoProperties(String[] array, String delimiter) { + return splitArrayElementsIntoProperties(array, delimiter, null); + } + + /** + * Take an array Strings and split each element based on the given delimiter. + * A Properties instance is then generated, with the left of the + * delimiter providing the key, and the right of the delimiter providing the value. + *

Will trim both the key and value before adding them to the + * Properties instance. + * @param array the array to process + * @param delimiter to split each element using (typically the equals symbol) + * @param charsToDelete one or more characters to remove from each element + * prior to attempting the split operation (typically the quotation mark + * symbol), or null if no removal should occur + * @return a Properties instance representing the array contents, + * or null if the array to process was null or empty + */ + public static Properties splitArrayElementsIntoProperties( + String[] array, String delimiter, String charsToDelete) { + + if (ObjectUtils.isEmpty(array)) { + return null; + } + Properties result = new Properties(); + for (String element : array) { + if (charsToDelete != null) { + element = deleteAny(element, charsToDelete); + } + String[] splittedElement = split(element, delimiter); + if (splittedElement == null) { + continue; + } + result.setProperty(splittedElement[0].trim(), splittedElement[1].trim()); + } + return result; + } + + /** + * Tokenize the given String into a String array via a StringTokenizer. + * Trims tokens and omits empty tokens. + *

The given delimiters string is supposed to consist of any number of + * delimiter characters. Each of those characters can be used to separate + * tokens. A delimiter is always a single character; for multi-character + * delimiters, consider using delimitedListToStringArray + * @param str the String to tokenize + * @param delimiters the delimiter characters, assembled as String + * (each of those characters is individually considered as delimiter). + * @return an array of the tokens + * @see StringTokenizer + * @see String#trim() + * @see #delimitedListToStringArray + */ + public static String[] tokenizeToStringArray(String str, String delimiters) { + return tokenizeToStringArray(str, delimiters, true, true); + } + + /** + * Tokenize the given String into a String array via a StringTokenizer. + *

The given delimiters string is supposed to consist of any number of + * delimiter characters. Each of those characters can be used to separate + * tokens. A delimiter is always a single character; for multi-character + * delimiters, consider using delimitedListToStringArray + * @param str the String to tokenize + * @param delimiters the delimiter characters, assembled as String + * (each of those characters is individually considered as delimiter) + * @param trimTokens trim the tokens via String's trim + * @param ignoreEmptyTokens omit empty tokens from the result array + * (only applies to tokens that are empty after trimming; StringTokenizer + * will not consider subsequent delimiters as token in the first place). + * @return an array of the tokens (null if the input String + * was null) + * @see StringTokenizer + * @see String#trim() + * @see #delimitedListToStringArray + */ + public static String[] tokenizeToStringArray( + String str, String delimiters, boolean trimTokens, boolean ignoreEmptyTokens) { + + if (str == null) { + return null; + } + StringTokenizer st = new StringTokenizer(str, delimiters); + List tokens = new ArrayList(); + while (st.hasMoreTokens()) { + String token = st.nextToken(); + if (trimTokens) { + token = token.trim(); + } + if (!ignoreEmptyTokens || token.length() > 0) { + tokens.add(token); + } + } + return toStringArray(tokens); + } + + /** + * Take a String which is a delimited list and convert it to a String array. + *

A single delimiter can consists of more than one character: It will still + * be considered as single delimiter string, rather than as bunch of potential + * delimiter characters - in contrast to tokenizeToStringArray. + * @param str the input String + * @param delimiter the delimiter between elements (this is a single delimiter, + * rather than a bunch individual delimiter characters) + * @return an array of the tokens in the list + * @see #tokenizeToStringArray + */ + public static String[] delimitedListToStringArray(String str, String delimiter) { + return delimitedListToStringArray(str, delimiter, null); + } + + /** + * Take a String which is a delimited list and convert it to a String array. + *

A single delimiter can consists of more than one character: It will still + * be considered as single delimiter string, rather than as bunch of potential + * delimiter characters - in contrast to tokenizeToStringArray. + * @param str the input String + * @param delimiter the delimiter between elements (this is a single delimiter, + * rather than a bunch individual delimiter characters) + * @param charsToDelete a set of characters to delete. Useful for deleting unwanted + * line breaks: e.g. "\r\n\f" will delete all new lines and line feeds in a String. + * @return an array of the tokens in the list + * @see #tokenizeToStringArray + */ + public static String[] delimitedListToStringArray(String str, String delimiter, String charsToDelete) { + if (str == null) { + return new String[0]; + } + if (delimiter == null) { + return new String[] {str}; + } + List result = new ArrayList(); + if ("".equals(delimiter)) { + for (int i = 0; i < str.length(); i++) { + result.add(deleteAny(str.substring(i, i + 1), charsToDelete)); + } + } + else { + int pos = 0; + int delPos; + while ((delPos = str.indexOf(delimiter, pos)) != -1) { + result.add(deleteAny(str.substring(pos, delPos), charsToDelete)); + pos = delPos + delimiter.length(); + } + if (str.length() > 0 && pos <= str.length()) { + // Add rest of String, but not in case of empty input. + result.add(deleteAny(str.substring(pos), charsToDelete)); + } + } + return toStringArray(result); + } + + /** + * Convert a CSV list into an array of Strings. + * @param str the input String + * @return an array of Strings, or the empty array in case of empty input + */ + public static String[] commaDelimitedListToStringArray(String str) { + return delimitedListToStringArray(str, ","); + } + + /** + * Convenience method to convert a CSV string list to a set. + * Note that this will suppress duplicates. + * @param str the input String + * @return a Set of String entries in the list + */ + public static Set commaDelimitedListToSet(String str) { + Set set = new TreeSet(); + String[] tokens = commaDelimitedListToStringArray(str); + for (String token : tokens) { + set.add(token); + } + return set; + } + + /** + * Convenience method to return a Collection as a delimited (e.g. CSV) + * String. E.g. useful for toString() implementations. + * @param coll the Collection to display + * @param delim the delimiter to use (probably a ",") + * @param prefix the String to start each element with + * @param suffix the String to end each element with + * @return the delimited String + */ + public static String collectionToDelimitedString(@SuppressWarnings("rawtypes") Collection coll, String delim, String prefix, String suffix) { + if (CollectionUtils.isEmpty(coll)) { + return ""; + } + StringBuilder sb = new StringBuilder(); + @SuppressWarnings("rawtypes") + Iterator it = coll.iterator(); + while (it.hasNext()) { + sb.append(prefix).append(it.next()).append(suffix); + if (it.hasNext()) { + sb.append(delim); + } + } + return sb.toString(); + } + + /** + * Convenience method to return a Collection as a delimited (e.g. CSV) + * String. E.g. useful for toString() implementations. + * @param coll the Collection to display + * @param delim the delimiter to use (probably a ",") + * @return the delimited String + */ + public static String collectionToDelimitedString(Collection coll, String delim) { + return collectionToDelimitedString(coll, delim, "", ""); + } + + /** + * Convenience method to return a Collection as a CSV String. + * E.g. useful for toString() implementations. + * @param coll the Collection to display + * @return the delimited String + */ + public static String collectionToCommaDelimitedString(@SuppressWarnings("rawtypes") Collection coll) { + return collectionToDelimitedString(coll, ","); + } + + /** + * Convenience method to return a String array as a delimited (e.g. CSV) + * String. E.g. useful for toString() implementations. + * @param arr the array to display + * @param delim the delimiter to use (probably a ",") + * @return the delimited String + */ + public static String arrayToDelimitedString(Object[] arr, String delim) { + if (ObjectUtils.isEmpty(arr)) { + return ""; + } + if (arr.length == 1) { + return ObjectUtils.nullSafeToString(arr[0]); + } + StringBuilder sb = new StringBuilder(); + for (int i = 0; i < arr.length; i++) { + if (i > 0) { + sb.append(delim); + } + sb.append(arr[i]); + } + return sb.toString(); + } + + /** + * Convenience method to return a String array as a CSV String. + * E.g. useful for toString() implementations. + * @param arr the array to display + * @return the delimited String + */ + public static String arrayToCommaDelimitedString(Object[] arr) { + return arrayToDelimitedString(arr, ","); + } + + public static boolean isEmpty(String str) { + return str == null || "".equals(str); + } + + public static boolean isNotEmpty(String str) { + return !isEmpty(str); + } + + public static boolean isBlank(String str) { + return str == null || "".equals(str.trim()); + } + + public static boolean equalsIgnoreCase(String str1, String str2) { + if(str1 == null && str2 == null) { + return true; + } + if(str1 == null || str2 == null) { + return false; + } + return str1.equalsIgnoreCase(str2); + } + + public static boolean equals(String str1, String str2) { + if(str1 == null && str2 == null) { + return true; + } + if(str1 == null || str2 == null) { + return false; + } + return str1.equals(str2); + } + + public static String join(String[] strs, String spliter) { + if(strs == null) { + return null; + } + StringBuffer sb = new StringBuffer(); + int c = 0; + for(String s: strs) { + if(c > 0) { + sb.append(spliter); + } + sb.append(s); + c++; + } + return sb.toString(); + } + + public static String join(Object strs, String spliter) { + if(strs == null) { + return null; + } + if(!strs.getClass().isArray()) { + return null; + } + StringBuffer sb = new StringBuffer(); + int c = 0; + for(int i = 0; i< Array.getLength(strs); i ++) { + if(c > 0) { + sb.append(spliter); + } + sb.append(Array.get(strs, i)); + c++; + } + return sb.toString(); + } + + /** + * 将文件名中的汉字转为UTF8编码的串,以便下载时能正确显示另存的文件名. + * + * @param s 原文件名 + * @return 重新编码后的文件名 + */ + public static String toUtf8String(String s) { + StringBuffer sb = new StringBuffer(); + for (int i = 0; i < s.length(); i++) { + char c = s.charAt(i); + if (c >= 0 && c <= 255) { + sb.append(c); + } else { + byte[] b; + try { + b = Character.toString(c).getBytes("utf-8"); + } catch (Exception ex) { + System.out.println(ex); + b = new byte[0]; + } + for (int j = 0; j < b.length; j++) { + int k = b[j]; + if (k < 0) { + k += 256; + } + sb.append("%" + Integer.toHexString(k).toUpperCase()); + } + } + } + return sb.toString(); + } + + + public static String toUTF_8(String str) { + if(str == null) { + return null; + } + try { + return new String(str.getBytes("iso-8859-1"),"UTF-8"); + } catch (UnsupportedEncodingException e) { + return str; + } + } + + + public static String toGBK(String str) { + if(str == null) { + return null; + } + try { + return new String(str.getBytes("iso-8859-1"),"GBK"); + } catch (UnsupportedEncodingException e) { + return str; + } + } + + /** + * 字符串转换为HTML代码
return ex: &id= + * + * @param arg0 + * a String + * @return a String + */ + public static String HTMLEncoding(String arg0) { + String encodeStr = arg0; + encodeStr = encodeStr.replaceAll("&","&"); + encodeStr = encodeStr.replaceAll("\"","""); + encodeStr = encodeStr.replaceAll("<","<"); + encodeStr = encodeStr.replaceAll(">",">"); + return encodeStr; + } + + /** + * 判断String中是否是数字 + * @param str + * @return + */ + public static boolean isInteger(String str) { + return NUMBER_PATTERN.matcher(str).matches(); + } + + +} diff --git a/itools-core/itools-utils/src/main/java/com/itools/core/utils/UUIDUtils.java b/itools-core/itools-utils/src/main/java/com/itools/core/utils/UUIDUtils.java new file mode 100644 index 0000000000000000000000000000000000000000..9becec1baf5b7f7bf00f551d9be728ba9213f291 --- /dev/null +++ b/itools-core/itools-utils/src/main/java/com/itools/core/utils/UUIDUtils.java @@ -0,0 +1,13 @@ +package com.itools.core.utils; + +import java.util.UUID; + +/** + * 描述 :uuid生成工具类 + */ +public class UUIDUtils { + + public static String uuid() { + return UUID.randomUUID().toString().replaceAll("-", ""); + } +} diff --git a/itools-core/itools-utils/src/main/java/com/itools/core/utils/Utils.java b/itools-core/itools-utils/src/main/java/com/itools/core/utils/Utils.java new file mode 100644 index 0000000000000000000000000000000000000000..e6e25b22a319ca29d0736fbcf010076cd554fda3 --- /dev/null +++ b/itools-core/itools-utils/src/main/java/com/itools/core/utils/Utils.java @@ -0,0 +1,193 @@ +package com.itools.core.utils; + +import java.lang.reflect.Array; +import java.util.*; +import java.util.Map.Entry; + +public class Utils { + + public static String toString(Object obj) { + if (obj == null) { + return null; + } + StringBuffer sb = new StringBuffer(obj.getClass().getName()).append("@").append(obj.hashCode()); + if (obj.getClass().isArray()) { + int len = Array.getLength(obj); + sb.append("["); + for (int i = 0; i < len; i++) { + if (i > 0) { + sb.append(","); + } + sb.append(toString(Array.get(obj, i))); + } + sb.append("]"); + } else { + return obj.toString(); + } + return sb.toString(); + } + + public static String toString2(Object obj) { + if (obj == null) { + return null; + } + StringBuffer sb = new StringBuffer(); + if (obj.getClass().isArray()) { + int len = Array.getLength(obj); + sb.append("["); + for (int i = 0; i < len; i++) { + if (i > 0) { + sb.append(","); + } + sb.append(toString(Array.get(obj, i))); + } + sb.append("]"); + } else { + return obj.toString(); + } + return sb.toString(); + } + + public static Map newHashMap(int size) { + return new HashMap(size); + } + + public static Map newHashMap() { + return new HashMap(64); + } + + public static Map newHashMap(K[] keys, V[] values) { + Map m = new HashMap(64); + int i =0; + for(K k: keys) { + m.put(k, values[i]); + i++; + } + return m; + } + + public static List newArrayList(int size) { + return new ArrayList(size); + } + + public static List newArrayList() { + return new ArrayList(64); + } + + public static Set newHashSet(int size) { + return new HashSet(size); + } + + public static Set newHashSet() { + return new HashSet(64); + } + + public static Collection addAll(Collection coll, T[] arr) { + if ((arr == null) || (coll == null)) { + return coll; + } + for (T e : arr) { + coll.add(e); + } + return coll; + } + + @SuppressWarnings("unchecked") + public static Map>> group(List> rows, String group_field) { + Map>> result = Utils.newHashMap(); + for(Map item: rows) { + K itemKey = (K)item.get(group_field); + if(result.containsKey(itemKey)) { + List> list = result.get(itemKey); + list.add(item); + } else { + List> list = Utils.newArrayList(); + list.add(item); + result.put(itemKey, list); + } + } + return result; + } + + public static List> groupAsList(List> rows, String group_field, String list_field) { + Map>> grouped = group(rows, group_field); + + List> result = Utils.newArrayList(); + for(Entry>> e: grouped.entrySet()) { + K key = e.getKey(); + List> value = e.getValue(); + + Map item = new HashMap(); + item.put(group_field, key); + item.put(list_field, value); + result.add(item); + } + return result; + } + + public static Throwable getBusinessCause(final Throwable t) { + Throwable cause = t; + + while ((cause != null) + && (cause.getCause() != null) + && (cause.getClass().getName().startsWith("java.lang.") || cause.getCause().getClass().getName() + .startsWith("java.lang."))) { + cause = cause.getCause(); + } + + return cause; + } + + public static String toDataBaseField(String name){ + if(null == name) + { + return null; + } + char c, pc = (char) 0; + StringBuilder sb = new StringBuilder(); + for(int i = 0; i < name.length(); i++) + { + c = name.charAt(i); + if(Character.isLowerCase(pc) && Character.isUpperCase(c)) + { + sb.append('_'); + } + pc = c; + sb.append(Character.toUpperCase(c)); + } + return sb.toString(); + } + /** + * 生成n位随机数字,返回值为int + * int的最大值是2147483647,因此当生成10位随机数容易出现 + * 数值一直是2147483647,因此只能生成0到9位长度的数值 + * @param n + * @return + */ + public static int randomNum(int n){ + if (n <= 0 || n > 9){ + throw new IllegalArgumentException("随机数长度必须大于0且小于9位"); + } + int temp = n - 1; + int b = 1; + while (temp > 0){ + b *= 10; + temp--; + } + return (int) ((Math.random() * 9 + 1) * b); + } + + /** + * 截取参数 + * @param param + * @param length + * @return + */ + public static String subLong(Long param, int length) { + return String.valueOf(param).substring(String.valueOf(param).length()-length, String.valueOf(param).length()); + } + + public static void main(String[] args) { + System.out.println(Utils.subLong(134564567899L, 3)); + } +} diff --git a/itools-core/itools-utils/src/main/java/com/itools/core/utils/VideoUtil.java b/itools-core/itools-utils/src/main/java/com/itools/core/utils/VideoUtil.java new file mode 100644 index 0000000000000000000000000000000000000000..63b53775651380a68ea4da8f805d8c54dd32ba49 --- /dev/null +++ b/itools-core/itools-utils/src/main/java/com/itools/core/utils/VideoUtil.java @@ -0,0 +1,135 @@ +package com.itools.core.utils; + +import java.io.IOException; +import java.io.InputStream; +import java.util.ArrayList; +import java.util.List; + +/** + * 此文件作为视频文件处理父类,提供: + * 1、查看视频时长 + * 2、校验两个视频的时长是否相等 + * + */ +public class VideoUtil { + + String ffmpeg_path = "D:\\Program Files\\ffmpeg-20180227-fa0c9d6-win64-static\\bin\\ffmpeg.exe";//ffmpeg的安装位置 + + public VideoUtil(String ffmpeg_path){ + this.ffmpeg_path = ffmpeg_path; + } + + + //检查视频时间是否一致 + public Boolean check_video_time(String source,String target) { + String source_time = get_video_time(source); + //取出时分秒 + source_time = source_time.substring(0,source_time.lastIndexOf(".")); + String target_time = get_video_time(target); + //取出时分秒 + target_time = target_time.substring(0,target_time.lastIndexOf(".")); + if(source_time == null || target_time == null){ + return false; + } + if(source_time.equals(target_time)){ + return true; + } + return false; + } + + //获取视频时间(时:分:秒:毫秒) + public String get_video_time(String video_path) { + /* + ffmpeg -i lucene.mp4 + */ + List commend = new ArrayList(); + commend.add(ffmpeg_path); + commend.add("-i"); + commend.add(video_path); + try { + ProcessBuilder builder = new ProcessBuilder(); + builder.command(commend); + //将标准输入流和错误输入流合并,通过标准输入流程读取信息 + builder.redirectErrorStream(true); + Process p = builder.start(); + String outstring = waitFor(p); + System.out.println(outstring); + int start = outstring.trim().indexOf("Duration: "); + if(start>=0){ + int end = outstring.trim().indexOf(", start:"); + if(end>=0){ + String time = outstring.substring(start+10,end); + if(time!=null && !time.equals("")){ + return time.trim(); + } + } + } + + } catch (Exception ex) { + + ex.printStackTrace(); + + } + return null; + } + + public String waitFor(Process p) { + InputStream in = null; + InputStream error = null; + String result = "error"; + int exitValue = -1; + StringBuffer outputString = new StringBuffer(); + try { + in = p.getInputStream(); + error = p.getErrorStream(); + boolean finished = false; + int maxRetry = 600;//每次休眠1秒,最长执行时间10分种 + int retry = 0; + while (!finished) { + if (retry > maxRetry) { + return "error"; + } + try { + while (in.available() > 0) { + Character c = new Character((char) in.read()); + outputString.append(c); + System.out.print(c); + } + while (error.available() > 0) { + Character c = new Character((char) in.read()); + outputString.append(c); + System.out.print(c); + } + //进程未结束时调用exitValue将抛出异常 + exitValue = p.exitValue(); + finished = true; + + } catch (IllegalThreadStateException e) { + Thread.sleep(1000);//休眠1秒 + retry++; + } + } + + } catch (Exception e) { + e.printStackTrace(); + } finally { + if (in != null) { + try { + in.close(); + } catch (IOException e) { + System.out.println(e.getMessage()); + } + } + } + return outputString.toString(); + + } + + + public static void main(String[] args) throws IOException { + String ffmpeg_path = "D:\\Program Files\\ffmpeg-20180227-fa0c9d6-win64-static\\bin\\ffmpeg.exe";//ffmpeg的安装位置 + VideoUtil videoUtil = new VideoUtil(ffmpeg_path); + String video_time = videoUtil.get_video_time("E:\\ffmpeg_test\\1.avi"); + System.out.println(video_time); + } +} diff --git a/itools-core/itools-utils/src/main/java/com/itools/core/utils/XcOauth2Util.java b/itools-core/itools-utils/src/main/java/com/itools/core/utils/XcOauth2Util.java new file mode 100644 index 0000000000000000000000000000000000000000..5500cfa565f5afb38ac66bd785beb930d790e061 --- /dev/null +++ b/itools-core/itools-utils/src/main/java/com/itools/core/utils/XcOauth2Util.java @@ -0,0 +1,34 @@ +package com.itools.core.utils; + +import lombok.Data; + +import javax.servlet.http.HttpServletRequest; +import java.util.Map; + + +public class XcOauth2Util { + + public UserJwt getUserJwtFromHeader(HttpServletRequest request){ + Map jwtClaims = Oauth2Util.getJwtClaimsFromHeader(request); + if(jwtClaims == null || StringUtils.isEmpty(jwtClaims.get("id"))){ + return null; + } + UserJwt userJwt = new UserJwt(); + userJwt.setId(jwtClaims.get("id")); + userJwt.setName(jwtClaims.get("name")); + userJwt.setCompanyId(jwtClaims.get("companyId")); + userJwt.setUtype(jwtClaims.get("utype")); + userJwt.setUserpic(jwtClaims.get("userpic")); + return userJwt; + } + + @Data + public class UserJwt{ + private String id; + private String name; + private String userpic; + private String utype; + private String companyId; + } + +} diff --git a/itools-core/itools-utils/src/main/java/com/itools/core/utils/ZipUtil.java b/itools-core/itools-utils/src/main/java/com/itools/core/utils/ZipUtil.java new file mode 100644 index 0000000000000000000000000000000000000000..234ca6fda1df6b70a20c3562efbf7d6b646da855 --- /dev/null +++ b/itools-core/itools-utils/src/main/java/com/itools/core/utils/ZipUtil.java @@ -0,0 +1,38 @@ +package com.itools.core.utils; + + +import net.lingala.zip4j.core.ZipFile; +import net.lingala.zip4j.exception.ZipException; + +public class ZipUtil { + + /** + * 解压zip文件 + * @param zipFilePath + * @param targetPath + * @throws ZipException + */ + public static void unzip(String zipFilePath,String targetPath) throws Exception{ + ZipFile zipFile = new ZipFile(zipFilePath); + zipFile.extractAll(targetPath); + } + + /** + * 解压zip文件(带密码) + * @param zipFilePath + * @param targetPath + * @param password + * @throws ZipException + */ + public static void unzip(String zipFilePath,String password,String targetPath) throws Exception{ + ZipFile zipFile = new ZipFile(zipFilePath); + if (zipFile.isEncrypted()) { + zipFile.setPassword(password); + } + zipFile.extractAll(targetPath); + } + + public static void main(String[] args) throws Exception { + ZipUtil.unzip("F:\\develop\\upload\\upload.zip","F:\\develop\\upload\\zip\\"); + } +} diff --git a/itools-core/pom.xml b/itools-core/pom.xml new file mode 100644 index 0000000000000000000000000000000000000000..932528cda8fa2339509cd591ccbf96f61aa5a20e --- /dev/null +++ b/itools-core/pom.xml @@ -0,0 +1,192 @@ + + + + itools-backend + com.itools.core + 1.0-SNAPSHOT + + 4.0.0 + + itools-core + pom + 工具集成统一异常、分布式雪花算法、参数验证、日志、统一拦截等等 + + itools-common + itools-utils + itools-model + + + + 1.8 + 8.5.28 + 2.0.1.RELEASE + 5.0.5.RELEASE + 1.3.1 + 3.4.5 + 1.1.6 + 5.1.45 + 2.6 + 1.3.2 + 1.3.3 + 1.10 + 3.6 + 3.9.1 + 8.18.0 + 1.16.16 + 2.7.0 + 1.2.30 + 1.27.0.0 + 5.1.40 + 6.2.1 + 24.0-jre + 4.1.35.Final + 6.0.13.Final + + + + + + org.springframework.cloud + spring-cloud-dependencies + Finchley.SR1 + pom + import + + + org.hibernate.validator + hibernate-validator + ${org.hibernate.validator.version} + + + mysql + mysql-connector-java + ${mysql-connector-java.version} + + + org.mybatis.spring.boot + mybatis-spring-boot-starter + ${mybatis-spring-boot.version} + + + com.github.pagehelper + pagehelper-spring-boot-starter + 1.2.4 + + + com.alibaba + druid + ${druid.version} + + + + com.squareup.okhttp3 + okhttp + ${okhttp.version} + + + com.netflix.feign + feign-okhttp + ${feign-okhttp.version} + + + commons-io + commons-io + ${commons-io.version} + + + org.apache.commons + commons-io + ${org.apache.commons.io.version} + + + commons-fileupload + commons-fileupload + ${commons-fileupload.version} + + + commons-codec + commons-codec + ${commons-codec.version} + + + org.apache.commons + commons-lang3 + ${commons-lang3.version} + + + org.projectlombok + lombok + ${lombok.version} + + + io.springfox + springfox-swagger2 + ${springfox-swagger.version} + + + io.springfox + springfox-swagger-ui + ${springfox-swagger.version} + + + com.alibaba + fastjson + ${fastjson.version} + + + net.oschina.zcx7878 + fastdfs-client-java + ${fastdfs-client-java.version} + + + + org.elasticsearch.client + elasticsearch-rest-high-level-client + ${elasticsearch.version} + + + org.elasticsearch + elasticsearch + ${elasticsearch.version} + + + com.google.guava + guava + ${guava.version} + + + io.netty + netty-all + ${netty.version} + + + + + ${project.artifactId} + + + org.apache.maven.plugins + maven-compiler-plugin + + 1.8 + 1.8 + UTF-8 + + + + org.springframework.boot + spring-boot-maven-plugin + + + + repackage + + + + + + + + \ No newline at end of file diff --git a/itools-fms/pom.xml b/itools-fms/pom.xml new file mode 100644 index 0000000000000000000000000000000000000000..89975b0c08552636e4574ef26cd6bc425a13c102 --- /dev/null +++ b/itools-fms/pom.xml @@ -0,0 +1,15 @@ + + + + itools-backend + com.itools.core + 1.0-SNAPSHOT + + 4.0.0 + + itools-fms + + + \ No newline at end of file diff --git a/itools-gms/pom.xml b/itools-gms/pom.xml new file mode 100644 index 0000000000000000000000000000000000000000..eef6669a332fae002eeea157469cb40faa582709 --- /dev/null +++ b/itools-gms/pom.xml @@ -0,0 +1,15 @@ + + + + itools-backend + com.itools.core + 1.0-SNAPSHOT + + 4.0.0 + + itools-gms + + + \ No newline at end of file diff --git a/itools-oms/pom.xml b/itools-oms/pom.xml new file mode 100644 index 0000000000000000000000000000000000000000..0f2830d07fffe0b86560d9715979d0a6c80e9324 --- /dev/null +++ b/itools-oms/pom.xml @@ -0,0 +1,15 @@ + + + + itools-backend + com.itools.core + 1.0-SNAPSHOT + + 4.0.0 + + itools-oms + + + \ No newline at end of file diff --git a/itools-sso/pom.xml b/itools-sso/pom.xml new file mode 100644 index 0000000000000000000000000000000000000000..e3e1cb54a0f430dac25064418af2fe0d18471cc6 --- /dev/null +++ b/itools-sso/pom.xml @@ -0,0 +1,15 @@ + + + + itools-backend + com.itools.core + 1.0-SNAPSHOT + + 4.0.0 + + itools-sso + + + \ No newline at end of file diff --git a/itools-ums/pom.xml b/itools-ums/pom.xml new file mode 100644 index 0000000000000000000000000000000000000000..800f1b65d75ea7b78e217c7cb84e0dd8855da701 --- /dev/null +++ b/itools-ums/pom.xml @@ -0,0 +1,15 @@ + + + + itools-backend + com.itools.core + 1.0-SNAPSHOT + + 4.0.0 + + itools-ums + + + \ No newline at end of file diff --git a/pom.xml b/pom.xml new file mode 100644 index 0000000000000000000000000000000000000000..9fb2623184bd61a4984c68a94c1a6c64184b0759 --- /dev/null +++ b/pom.xml @@ -0,0 +1,33 @@ + + + 4.0.0 + + com.itools.core + itools-backend + pom + 1.0-SNAPSHOT + + 集成的Java环境的工具集合,core是核心的工具每一个组件模块都引用的部分,其中组件核心部分包含: + 1、sso通过改造xxl-sso和整合rbac的用户认证的模块 + 2、fms文件系统包含minio/FastDFS/NIO不同策略的文件系统 + 3、ums用户权限系统,rbac用户模型 + 4、gms网关系统gateway,整合oauth授权认证 + 5、oms授权认证系统,整合oauth2,rbac的用户认证的模块 + + + itools-core + itools-sso + itools-fms + itools-ums + itools-gms + itools-oms + + + org.springframework.boot + spring-boot-starter-parent + 2.0.1.RELEASE + + + \ No newline at end of file