Skip to content

Commit

Permalink
目录调整,新增 Not Equal 查询方式
Browse files Browse the repository at this point in the history
  • Loading branch information
elunez committed Nov 17, 2019
1 parent 3daa826 commit 5ab7fb5
Show file tree
Hide file tree
Showing 61 changed files with 210 additions and 175 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,8 @@ enum Type {
, LESS_THAN_NQ
// jie 2019/6/4 包含
, IN
// 不等于
,NOT_EQUAL
}

/**
Expand Down
3 changes: 3 additions & 0 deletions eladmin-common/src/main/java/me/zhengjie/utils/QueryHelp.java
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,9 @@ public static <R, Q> Predicate getPredicate(Root<R> root, Q query, CriteriaBuild
list.add(getExpression(attributeName,join,root).in((Collection<Long>) val));
}
break;
case NOT_EQUAL:
list.add(cb.notEqual(getExpression(attributeName,join,root), val));
break;
default: break;
}
}
Expand Down
39 changes: 39 additions & 0 deletions eladmin-generator/pom.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<parent>
<artifactId>eladmin</artifactId>
<groupId>me.zhengjie</groupId>
<version>2.3</version>
</parent>
<modelVersion>4.0.0</modelVersion>

<artifactId>eladmin-generator</artifactId>
<name>代码生成模块</name>

<properties>
<configuration.version>1.9</configuration.version>
</properties>

<dependencies>
<dependency>
<groupId>me.zhengjie</groupId>
<artifactId>eladmin-common</artifactId>
<version>2.3</version>
</dependency>

<!--模板引擎-->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-freemarker</artifactId>
</dependency>

<!-- https://mvnrepository.com/artifact/commons-configuration/commons-configuration -->
<dependency>
<groupId>commons-configuration</groupId>
<artifactId>commons-configuration</artifactId>
<version>${configuration.version}</version>
</dependency>
</dependencies>
</project>
Original file line number Diff line number Diff line change
@@ -1,10 +1,7 @@
package me.zhengjie.modules.generator.domain;
package me.zhengjie.domain;

import lombok.Data;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.Table;
import javax.persistence.*;

/**
* 代码生成配置
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package me.zhengjie.modules.generator.domain.vo;
package me.zhengjie.domain.vo;

import lombok.AllArgsConstructor;
import lombok.Data;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package me.zhengjie.modules.generator.domain.vo;
package me.zhengjie.domain.vo;

import lombok.AllArgsConstructor;
import lombok.Data;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package me.zhengjie.modules.generator.repository;
package me.zhengjie.repository;

import me.zhengjie.modules.generator.domain.GenConfig;
import me.zhengjie.domain.GenConfig;
import org.springframework.data.jpa.repository.JpaRepository;

/**
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
package me.zhengjie.modules.generator.rest;
package me.zhengjie.rest;

import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import me.zhengjie.modules.generator.domain.GenConfig;
import me.zhengjie.modules.generator.service.GenConfigService;
import me.zhengjie.domain.GenConfig;
import me.zhengjie.service.GenConfigService;
import org.springframework.http.HttpStatus;
import org.springframework.http.ResponseEntity;
import org.springframework.validation.annotation.Validated;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,17 +1,16 @@
package me.zhengjie.modules.generator.rest;
package me.zhengjie.rest;

import cn.hutool.core.util.PageUtil;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import me.zhengjie.domain.vo.ColumnInfo;
import me.zhengjie.exception.BadRequestException;
import me.zhengjie.modules.generator.domain.vo.ColumnInfo;
import me.zhengjie.modules.generator.service.GenConfigService;
import me.zhengjie.modules.generator.service.GeneratorService;
import me.zhengjie.service.GenConfigService;
import me.zhengjie.service.GeneratorService;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.http.HttpStatus;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.*;

import java.util.List;

/**
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package me.zhengjie.modules.generator.service;
package me.zhengjie.service;

import me.zhengjie.modules.generator.domain.GenConfig;
import me.zhengjie.domain.GenConfig;

/**
* @author Zheng Jie
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package me.zhengjie.modules.generator.service;
package me.zhengjie.service;

import me.zhengjie.modules.generator.domain.GenConfig;
import me.zhengjie.modules.generator.domain.vo.ColumnInfo;
import me.zhengjie.domain.GenConfig;
import me.zhengjie.domain.vo.ColumnInfo;
import java.util.List;

/**
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package me.zhengjie.modules.generator.service.impl;
package me.zhengjie.service.impl;

import me.zhengjie.modules.generator.domain.GenConfig;
import me.zhengjie.modules.generator.repository.GenConfigRepository;
import me.zhengjie.modules.generator.service.GenConfigService;
import me.zhengjie.domain.GenConfig;
import me.zhengjie.repository.GenConfigRepository;
import me.zhengjie.service.GenConfigService;
import org.springframework.cache.annotation.CacheConfig;
import org.springframework.cache.annotation.CacheEvict;
import org.springframework.cache.annotation.Cacheable;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
package me.zhengjie.modules.generator.service.impl;
package me.zhengjie.service.impl;

import cn.hutool.core.util.ObjectUtil;
import me.zhengjie.domain.GenConfig;
import me.zhengjie.domain.vo.ColumnInfo;
import me.zhengjie.domain.vo.TableInfo;
import me.zhengjie.exception.BadRequestException;
import me.zhengjie.modules.generator.domain.GenConfig;
import me.zhengjie.modules.generator.domain.vo.ColumnInfo;
import me.zhengjie.modules.generator.domain.vo.TableInfo;
import me.zhengjie.modules.generator.service.GeneratorService;
import me.zhengjie.modules.generator.utils.GenUtil;
import me.zhengjie.service.GeneratorService;
import me.zhengjie.utils.GenUtil;
import me.zhengjie.utils.PageUtil;
import me.zhengjie.utils.StringUtils;
import org.springframework.stereotype.Service;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
package me.zhengjie.modules.generator.utils;
package me.zhengjie.utils;

import org.apache.commons.configuration.Configuration;
import org.apache.commons.configuration.ConfigurationException;
import org.apache.commons.configuration.PropertiesConfiguration;
import org.apache.commons.configuration.*;

/**
* sql字段转java
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,10 @@
package me.zhengjie.modules.generator.utils;
package me.zhengjie.utils;

import cn.hutool.core.util.StrUtil;
import cn.hutool.extra.template.*;
import lombok.extern.slf4j.Slf4j;
import me.zhengjie.modules.generator.domain.GenConfig;
import me.zhengjie.modules.generator.domain.vo.ColumnInfo;
import me.zhengjie.utils.FileUtil;
import me.zhengjie.utils.StringUtils;
import me.zhengjie.domain.GenConfig;
import me.zhengjie.domain.vo.ColumnInfo;
import org.springframework.util.ObjectUtils;
import java.io.File;
import java.io.FileWriter;
Expand Down
12 changes: 12 additions & 0 deletions eladmin-system/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,18 @@
</properties>

<dependencies>
<!-- 代码生成模块 -->
<dependency>
<groupId>me.zhengjie</groupId>
<artifactId>eladmin-generator</artifactId>
<version>2.3</version>
<exclusions>
<exclusion>
<groupId>me.zhengjie</groupId>
<artifactId>eladmin-common</artifactId>
</exclusion>
</exclusions>
</dependency>

<!-- tools 模块包含了 common 和 logging 模块 -->
<dependency>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,15 @@
import io.swagger.annotations.ApiOperation;
import me.zhengjie.aop.log.Log;
import me.zhengjie.config.DataScope;
import me.zhengjie.modules.tools.domain.VerificationCode;
import me.zhengjie.domain.VerificationCode;
import me.zhengjie.modules.system.domain.User;
import me.zhengjie.exception.BadRequestException;
import me.zhengjie.modules.system.domain.vo.UserPassVo;
import me.zhengjie.modules.system.service.DeptService;
import me.zhengjie.modules.system.service.RoleService;
import me.zhengjie.modules.system.service.dto.RoleSmallDTO;
import me.zhengjie.modules.system.service.dto.UserQueryCriteria;
import me.zhengjie.modules.tools.service.VerificationCodeService;
import me.zhengjie.service.VerificationCodeService;
import me.zhengjie.utils.*;
import me.zhengjie.modules.system.service.UserService;
import org.springframework.data.domain.Pageable;
Expand Down
14 changes: 0 additions & 14 deletions eladmin-tools/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
<mail.version>1.4.7</mail.version>
<qiniu.version>[7.2.0, 7.2.99]</qiniu.version>
<alipay.version>3.1.0</alipay.version>
<configuration.version>1.9</configuration.version>
</properties>

<dependencies>
Expand All @@ -34,19 +33,6 @@
<version>${mail.version}</version>
</dependency>

<!--模板引擎-->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-freemarker</artifactId>
</dependency>

<!-- https://mvnrepository.com/artifact/commons-configuration/commons-configuration -->
<dependency>
<groupId>commons-configuration</groupId>
<artifactId>commons-configuration</artifactId>
<version>${configuration.version}</version>
</dependency>

<!--七牛云存储-->
<dependency>
<groupId>com.qiniu</groupId>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package me.zhengjie.modules.tools.domain;
package me.zhengjie.domain;

import lombok.Data;
import javax.persistence.*;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package me.zhengjie.modules.tools.domain;
package me.zhengjie.domain;

import lombok.Data;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package me.zhengjie.modules.tools.domain;
package me.zhengjie.domain;

import lombok.*;
import cn.hutool.core.bean.BeanUtil;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package me.zhengjie.modules.tools.domain;
package me.zhengjie.domain;

import lombok.Data;
import org.hibernate.annotations.CreationTimestamp;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package me.zhengjie.modules.tools.domain;
package me.zhengjie.domain;

import lombok.Data;
import javax.persistence.*;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package me.zhengjie.modules.tools.domain;
package me.zhengjie.domain;

import lombok.Data;
import org.hibernate.annotations.UpdateTimestamp;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package me.zhengjie.modules.tools.domain;
package me.zhengjie.domain;

import lombok.AllArgsConstructor;
import lombok.Data;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package me.zhengjie.modules.tools.domain.vo;
package me.zhengjie.domain.vo;

import lombok.AllArgsConstructor;
import lombok.Data;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package me.zhengjie.modules.tools.domain.vo;
package me.zhengjie.domain.vo;

import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package me.zhengjie.modules.tools.repository;
package me.zhengjie.repository;

import me.zhengjie.modules.tools.domain.AlipayConfig;
import me.zhengjie.domain.AlipayConfig;
import org.springframework.data.jpa.repository.JpaRepository;

/**
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package me.zhengjie.modules.tools.repository;
package me.zhengjie.repository;

import me.zhengjie.modules.tools.domain.EmailConfig;
import me.zhengjie.domain.EmailConfig;
import org.springframework.data.jpa.repository.JpaRepository;

/**
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package me.zhengjie.modules.tools.repository;
package me.zhengjie.repository;

import me.zhengjie.modules.tools.domain.LocalStorage;
import me.zhengjie.domain.LocalStorage;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package me.zhengjie.modules.tools.repository;
package me.zhengjie.repository;

import me.zhengjie.modules.tools.domain.Picture;
import me.zhengjie.domain.Picture;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package me.zhengjie.modules.tools.repository;
package me.zhengjie.repository;

import me.zhengjie.modules.tools.domain.QiniuConfig;
import me.zhengjie.domain.QiniuConfig;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Modifying;
import org.springframework.data.jpa.repository.Query;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package me.zhengjie.modules.tools.repository;
package me.zhengjie.repository;

import me.zhengjie.modules.tools.domain.QiniuContent;
import me.zhengjie.domain.QiniuContent;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package me.zhengjie.modules.tools.repository;
package me.zhengjie.repository;

import me.zhengjie.modules.tools.domain.VerificationCode;
import me.zhengjie.domain.VerificationCode;
import org.springframework.data.jpa.repository.JpaRepository;

/**
Expand Down
Loading

0 comments on commit 5ab7fb5

Please sign in to comment.