Initial commit
This commit is contained in:
@@ -0,0 +1,124 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<module org.jetbrains.idea.maven.project.MavenProjectsManager.isMavenModule="true" type="JAVA_MODULE" version="4">
|
||||
<component name="FacetManager">
|
||||
<facet type="Spring" name="Spring">
|
||||
<configuration />
|
||||
</facet>
|
||||
<facet type="web" name="Web">
|
||||
<configuration>
|
||||
<webroots />
|
||||
<sourceRoots>
|
||||
<root url="file://$MODULE_DIR$/src/main/java" />
|
||||
<root url="file://$MODULE_DIR$/src/main/resources" />
|
||||
</sourceRoots>
|
||||
</configuration>
|
||||
</facet>
|
||||
</component>
|
||||
<component name="NewModuleRootManager" LANGUAGE_LEVEL="JDK_1_8">
|
||||
<output url="file://$MODULE_DIR$/target/classes" />
|
||||
<output-test url="file://$MODULE_DIR$/target/test-classes" />
|
||||
<content url="file://$MODULE_DIR$">
|
||||
<sourceFolder url="file://$MODULE_DIR$/src/main/java" isTestSource="false" />
|
||||
<sourceFolder url="file://$MODULE_DIR$/src/main/resources" type="java-resource" />
|
||||
<sourceFolder url="file://$MODULE_DIR$/src/test/java" isTestSource="true" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/target" />
|
||||
</content>
|
||||
<orderEntry type="jdk" jdkName="1.8" jdkType="JavaSDK" />
|
||||
<orderEntry type="sourceFolder" forTests="false" />
|
||||
<orderEntry type="module" module-name="common" />
|
||||
<orderEntry type="module" module-name="system" />
|
||||
<orderEntry type="module" module-name="excel" />
|
||||
<orderEntry type="library" name="Maven: org.apache.poi:poi-ooxml:4.0.0" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.apache.poi:poi:4.0.0" level="project" />
|
||||
<orderEntry type="library" name="Maven: commons-codec:commons-codec:1.11" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.apache.commons:commons-collections4:4.2" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.apache.poi:poi-ooxml-schemas:4.0.0" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.apache.xmlbeans:xmlbeans:3.0.1" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.apache.commons:commons-compress:1.18" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.github.virtuald:curvesapi:1.04" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-web:2.1.4.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter:2.1.4.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-logging:2.1.4.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: ch.qos.logback:logback-classic:1.2.3" level="project" />
|
||||
<orderEntry type="library" name="Maven: ch.qos.logback:logback-core:1.2.3" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.apache.logging.log4j:log4j-to-slf4j:2.11.2" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.apache.logging.log4j:log4j-api:2.11.2" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.slf4j:jul-to-slf4j:1.7.26" level="project" />
|
||||
<orderEntry type="library" name="Maven: javax.annotation:javax.annotation-api:1.3.2" level="project" />
|
||||
<orderEntry type="library" scope="RUNTIME" name="Maven: org.yaml:snakeyaml:1.23" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-json:2.1.4.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.fasterxml.jackson.core:jackson-databind:2.9.8" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.fasterxml.jackson.core:jackson-annotations:2.9.0" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.fasterxml.jackson.core:jackson-core:2.9.8" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.fasterxml.jackson.datatype:jackson-datatype-jdk8:2.9.8" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.fasterxml.jackson.datatype:jackson-datatype-jsr310:2.9.8" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.fasterxml.jackson.module:jackson-module-parameter-names:2.9.8" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-tomcat:2.1.4.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.apache.tomcat.embed:tomcat-embed-core:9.0.17" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.apache.tomcat.embed:tomcat-embed-el:9.0.17" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.apache.tomcat.embed:tomcat-embed-websocket:9.0.17" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.hibernate.validator:hibernate-validator:6.0.16.Final" level="project" />
|
||||
<orderEntry type="library" name="Maven: javax.validation:validation-api:2.0.1.Final" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.jboss.logging:jboss-logging:3.3.2.Final" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.fasterxml:classmate:1.4.0" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework:spring-web:5.1.6.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework:spring-beans:5.1.6.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework:spring-webmvc:5.1.6.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework:spring-aop:5.1.6.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework:spring-context:5.1.6.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework:spring-expression:5.1.6.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-data-jpa:2.1.4.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-aop:2.1.4.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.aspectj:aspectjweaver:1.9.2" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-jdbc:2.1.4.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.zaxxer:HikariCP:3.2.0" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework:spring-jdbc:5.1.6.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: javax.transaction:javax.transaction-api:1.3" level="project" />
|
||||
<orderEntry type="library" name="Maven: javax.xml.bind:jaxb-api:2.3.1" level="project" />
|
||||
<orderEntry type="library" name="Maven: javax.activation:javax.activation-api:1.2.0" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.hibernate:hibernate-core:5.3.9.Final" level="project" />
|
||||
<orderEntry type="library" name="Maven: javax.persistence:javax.persistence-api:2.2" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.javassist:javassist:3.23.1-GA" level="project" />
|
||||
<orderEntry type="library" name="Maven: net.bytebuddy:byte-buddy:1.9.12" level="project" />
|
||||
<orderEntry type="library" name="Maven: antlr:antlr:2.7.7" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.jboss:jandex:2.0.5.Final" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.dom4j:dom4j:2.1.1" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.hibernate.common:hibernate-commons-annotations:5.0.4.Final" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework.data:spring-data-jpa:2.1.6.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework.data:spring-data-commons:2.1.6.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework:spring-orm:5.1.6.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework:spring-tx:5.1.6.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework:spring-aspects:5.1.6.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-configuration-processor:2.1.4.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-cache:2.1.4.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework:spring-context-support:5.1.6.RELEASE" level="project" />
|
||||
<orderEntry type="library" scope="RUNTIME" name="Maven: org.springframework.boot:spring-boot-devtools:2.1.4.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework.boot:spring-boot:2.1.4.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-autoconfigure:2.1.4.RELEASE" level="project" />
|
||||
<orderEntry type="library" scope="TEST" name="Maven: org.springframework.boot:spring-boot-starter-test:2.1.4.RELEASE" level="project" />
|
||||
<orderEntry type="library" scope="TEST" name="Maven: org.springframework.boot:spring-boot-test:2.1.4.RELEASE" level="project" />
|
||||
<orderEntry type="library" scope="TEST" name="Maven: org.springframework.boot:spring-boot-test-autoconfigure:2.1.4.RELEASE" level="project" />
|
||||
<orderEntry type="library" scope="TEST" name="Maven: com.jayway.jsonpath:json-path:2.4.0" level="project" />
|
||||
<orderEntry type="library" scope="TEST" name="Maven: net.minidev:json-smart:2.3" level="project" />
|
||||
<orderEntry type="library" scope="TEST" name="Maven: net.minidev:accessors-smart:1.2" level="project" />
|
||||
<orderEntry type="library" scope="TEST" name="Maven: org.ow2.asm:asm:5.0.4" level="project" />
|
||||
<orderEntry type="library" scope="TEST" name="Maven: junit:junit:4.12" level="project" />
|
||||
<orderEntry type="library" scope="TEST" name="Maven: org.assertj:assertj-core:3.11.1" level="project" />
|
||||
<orderEntry type="library" scope="TEST" name="Maven: org.mockito:mockito-core:2.23.4" level="project" />
|
||||
<orderEntry type="library" scope="TEST" name="Maven: net.bytebuddy:byte-buddy-agent:1.9.12" level="project" />
|
||||
<orderEntry type="library" scope="TEST" name="Maven: org.objenesis:objenesis:2.6" level="project" />
|
||||
<orderEntry type="library" scope="TEST" name="Maven: org.hamcrest:hamcrest-core:1.3" level="project" />
|
||||
<orderEntry type="library" scope="TEST" name="Maven: org.hamcrest:hamcrest-library:1.3" level="project" />
|
||||
<orderEntry type="library" scope="TEST" name="Maven: org.skyscreamer:jsonassert:1.5.0" level="project" />
|
||||
<orderEntry type="library" scope="TEST" name="Maven: com.vaadin.external.google:android-json:0.0.20131108.vaadin1" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework:spring-core:5.1.6.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework:spring-jcl:5.1.6.RELEASE" level="project" />
|
||||
<orderEntry type="library" scope="TEST" name="Maven: org.springframework:spring-test:5.1.6.RELEASE" level="project" />
|
||||
<orderEntry type="library" scope="TEST" name="Maven: org.xmlunit:xmlunit-core:2.6.2" level="project" />
|
||||
<orderEntry type="library" scope="RUNTIME" name="Maven: mysql:mysql-connector-java:5.1.46" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.projectlombok:lombok:1.18.2" level="project" />
|
||||
<orderEntry type="library" name="Maven: net.sf.ehcache:ehcache:2.10.5" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.slf4j:slf4j-api:1.7.26" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.jsoup:jsoup:1.11.3" level="project" />
|
||||
</component>
|
||||
</module>
|
||||
@@ -0,0 +1,36 @@
|
||||
<?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">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
<groupId>com.cwhelp.modules</groupId>
|
||||
<artifactId>business</artifactId>
|
||||
<packaging>jar</packaging>
|
||||
<name>业务</name>
|
||||
|
||||
<parent>
|
||||
<groupId>com.cwhelp</groupId>
|
||||
<artifactId>modules</artifactId>
|
||||
<version>2.0.1</version>
|
||||
</parent>
|
||||
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>com.cwhelp</groupId>
|
||||
<artifactId>common</artifactId>
|
||||
<version>${project.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.cwhelp.modules</groupId>
|
||||
<artifactId>system</artifactId>
|
||||
<version>${project.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.cwhelp.component</groupId>
|
||||
<artifactId>excel</artifactId>
|
||||
<version>${project.version}</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
</project>
|
||||
@@ -0,0 +1,73 @@
|
||||
package com.cwhelp.modules.business.domain;
|
||||
|
||||
import com.cwhelp.common.enums.StatusEnum;
|
||||
import com.cwhelp.common.utils.StatusUtil;
|
||||
import com.cwhelp.modules.system.domain.User;
|
||||
import com.fasterxml.jackson.annotation.JsonIgnore;
|
||||
import lombok.Data;
|
||||
import org.hibernate.annotations.NotFound;
|
||||
import org.hibernate.annotations.NotFoundAction;
|
||||
import org.hibernate.annotations.Where;
|
||||
import org.springframework.data.annotation.CreatedBy;
|
||||
import org.springframework.data.annotation.CreatedDate;
|
||||
import org.springframework.data.annotation.LastModifiedBy;
|
||||
import org.springframework.data.annotation.LastModifiedDate;
|
||||
import org.springframework.data.jpa.domain.support.AuditingEntityListener;
|
||||
|
||||
import javax.persistence.*;
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
|
||||
|
||||
/**
|
||||
* @author yan.y
|
||||
* @date 2019/07/29
|
||||
*/
|
||||
@Data
|
||||
@Entity
|
||||
@Table(name="bss_dept")
|
||||
@EntityListeners(AuditingEntityListener.class)
|
||||
@Where(clause = StatusUtil.notDelete)
|
||||
public class BssDept implements Serializable {
|
||||
// 主键ID
|
||||
@Id
|
||||
@GeneratedValue(strategy=GenerationType.IDENTITY)
|
||||
private Long id;
|
||||
private String name;
|
||||
// 描述
|
||||
private String description;
|
||||
// 平台ID
|
||||
//@Column(name = "platform_id")
|
||||
//private Long platformId;
|
||||
|
||||
@ManyToOne(fetch=FetchType.LAZY)
|
||||
@NotFound(action=NotFoundAction.IGNORE)
|
||||
@JoinColumn(name="platform_id")
|
||||
@JsonIgnore
|
||||
private BssPlatform bssPlatform;
|
||||
|
||||
// 备注
|
||||
private String remark;
|
||||
// 创建时间
|
||||
@CreatedDate
|
||||
private Date createDate;
|
||||
// 更新时间
|
||||
@LastModifiedDate
|
||||
private Date updateDate;
|
||||
// 创建者
|
||||
@CreatedBy
|
||||
@ManyToOne(fetch=FetchType.LAZY)
|
||||
@NotFound(action=NotFoundAction.IGNORE)
|
||||
@JoinColumn(name="create_by")
|
||||
@JsonIgnore
|
||||
private User createBy;
|
||||
// 更新者
|
||||
@LastModifiedBy
|
||||
@ManyToOne(fetch=FetchType.LAZY)
|
||||
@NotFound(action=NotFoundAction.IGNORE)
|
||||
@JoinColumn(name="update_by")
|
||||
@JsonIgnore
|
||||
private User updateBy;
|
||||
// 数据状态
|
||||
private Byte status = StatusEnum.OK.getCode();
|
||||
}
|
||||
@@ -0,0 +1,73 @@
|
||||
package com.cwhelp.modules.business.domain;
|
||||
|
||||
import com.cwhelp.common.enums.StatusEnum;
|
||||
import com.cwhelp.common.utils.StatusUtil;
|
||||
import com.cwhelp.modules.system.domain.User;
|
||||
import com.fasterxml.jackson.annotation.JsonIgnore;
|
||||
import lombok.Data;
|
||||
import org.hibernate.annotations.NotFound;
|
||||
import org.hibernate.annotations.NotFoundAction;
|
||||
import org.hibernate.annotations.Where;
|
||||
import org.springframework.data.annotation.CreatedBy;
|
||||
import org.springframework.data.annotation.CreatedDate;
|
||||
import org.springframework.data.annotation.LastModifiedBy;
|
||||
import org.springframework.data.annotation.LastModifiedDate;
|
||||
import org.springframework.data.jpa.domain.support.AuditingEntityListener;
|
||||
|
||||
import javax.persistence.*;
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
|
||||
|
||||
/**
|
||||
* @author yan.y
|
||||
* @date 2019/07/28
|
||||
*/
|
||||
@Data
|
||||
@Entity
|
||||
@Table(name="bss_platform")
|
||||
@EntityListeners(AuditingEntityListener.class)
|
||||
@Where(clause = StatusUtil.notDelete)
|
||||
public class BssPlatform implements Serializable {
|
||||
// 主键ID
|
||||
@Id
|
||||
@GeneratedValue(strategy= GenerationType.IDENTITY)
|
||||
private Long id;
|
||||
private String name;
|
||||
// 联系人
|
||||
private String contact;
|
||||
// 联系人电话
|
||||
@Column(name = "contact_tel")
|
||||
private String contactTel;
|
||||
// 联系人身份证号码
|
||||
@Column(name = "contact_card")
|
||||
private String contactCard;
|
||||
// 邮箱
|
||||
private String email;
|
||||
// 类型
|
||||
private Integer type;
|
||||
// 备注
|
||||
private String remark;
|
||||
// 创建时间
|
||||
@CreatedDate
|
||||
private Date createDate;
|
||||
// 更新时间
|
||||
@LastModifiedDate
|
||||
private Date updateDate;
|
||||
// 创建者
|
||||
@CreatedBy
|
||||
@ManyToOne(fetch= FetchType.LAZY)
|
||||
@NotFound(action=NotFoundAction.IGNORE)
|
||||
@JoinColumn(name="create_by")
|
||||
@JsonIgnore
|
||||
private User createBy;
|
||||
// 更新者
|
||||
@LastModifiedBy
|
||||
@ManyToOne(fetch=FetchType.LAZY)
|
||||
@NotFound(action=NotFoundAction.IGNORE)
|
||||
@JoinColumn(name="update_by")
|
||||
@JsonIgnore
|
||||
private User updateBy;
|
||||
// 数据状态
|
||||
private Byte status = StatusEnum.OK.getCode();
|
||||
}
|
||||
+12
@@ -0,0 +1,12 @@
|
||||
package com.cwhelp.modules.business.repository;
|
||||
|
||||
import com.cwhelp.modules.business.domain.BssDept;
|
||||
import com.cwhelp.modules.system.repository.BaseRepository;
|
||||
|
||||
|
||||
/**
|
||||
* @author yan.y
|
||||
* @date 2019/07/29
|
||||
*/
|
||||
public interface BssDeptRepository extends BaseRepository<BssDept, Long> {
|
||||
}
|
||||
+12
@@ -0,0 +1,12 @@
|
||||
package com.cwhelp.modules.business.repository;
|
||||
|
||||
import com.cwhelp.modules.business.domain.BssPlatform;
|
||||
import com.cwhelp.modules.system.repository.BaseRepository;
|
||||
|
||||
|
||||
/**
|
||||
* @author yan.y
|
||||
* @date 2019/07/28
|
||||
*/
|
||||
public interface BssPlatformRepository extends BaseRepository<BssPlatform, Long> {
|
||||
}
|
||||
+41
@@ -0,0 +1,41 @@
|
||||
package com.cwhelp.modules.business.service;
|
||||
|
||||
import com.cwhelp.common.enums.StatusEnum;
|
||||
import com.cwhelp.modules.business.domain.BssDept;
|
||||
import org.springframework.data.domain.Example;
|
||||
import org.springframework.data.domain.Page;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author yan.y
|
||||
* @date 2019/07/29
|
||||
*/
|
||||
public interface BssDeptService {
|
||||
|
||||
/**
|
||||
* 获取分页列表数据
|
||||
* @param example 查询实例
|
||||
* @return 返回分页数据
|
||||
*/
|
||||
Page<BssDept> getPageList(Example<BssDept> example);
|
||||
|
||||
/**
|
||||
* 根据ID查询数据
|
||||
* @param id 主键ID
|
||||
*/
|
||||
BssDept getById(Long id);
|
||||
|
||||
/**
|
||||
* 保存数据
|
||||
* @param bssDept 实体对象
|
||||
*/
|
||||
BssDept save(BssDept bssDept);
|
||||
|
||||
/**
|
||||
* 状态(启用,冻结,删除)/批量状态处理
|
||||
*/
|
||||
@Transactional
|
||||
Boolean updateStatus(StatusEnum statusEnum, List<Long> idList);
|
||||
}
|
||||
+50
@@ -0,0 +1,50 @@
|
||||
package com.cwhelp.modules.business.service;
|
||||
|
||||
import com.cwhelp.common.enums.StatusEnum;
|
||||
import com.cwhelp.modules.business.domain.BssPlatform;
|
||||
import org.springframework.data.domain.Example;
|
||||
import org.springframework.data.domain.Page;
|
||||
import org.springframework.data.domain.Sort;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
|
||||
/**
|
||||
* @author yan.y
|
||||
* @date 2019/07/28
|
||||
*/
|
||||
public interface BssPlatformService {
|
||||
|
||||
/**
|
||||
* 获取分页列表数据
|
||||
* @param example 查询实例
|
||||
* @return 返回分页数据
|
||||
*/
|
||||
Page<BssPlatform> getPageList(Example<BssPlatform> example);
|
||||
|
||||
/**
|
||||
* 根据ID查询数据
|
||||
* @param id 主键ID
|
||||
*/
|
||||
BssPlatform getById(Long id);
|
||||
|
||||
/**
|
||||
* 保存数据
|
||||
* @param bssPlatform 实体对象
|
||||
*/
|
||||
BssPlatform save(BssPlatform bssPlatform);
|
||||
|
||||
/**
|
||||
* 状态(启用,冻结,删除)/批量状态处理
|
||||
*/
|
||||
@Transactional
|
||||
Boolean updateStatus(StatusEnum statusEnum, List<Long> idList);
|
||||
|
||||
/**
|
||||
* 获取平台列表数据
|
||||
* @param example 查询实例
|
||||
* @param sort 排序对象
|
||||
*/
|
||||
List<BssPlatform> getListByExample(Example<BssPlatform> example, Sort sort);
|
||||
}
|
||||
+66
@@ -0,0 +1,66 @@
|
||||
package com.cwhelp.modules.business.service.impl;
|
||||
|
||||
import com.cwhelp.common.data.PageSort;
|
||||
import com.cwhelp.common.enums.StatusEnum;
|
||||
import com.cwhelp.modules.business.domain.BssDept;
|
||||
import com.cwhelp.modules.business.repository.BssDeptRepository;
|
||||
import com.cwhelp.modules.business.service.BssDeptService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.data.domain.Example;
|
||||
import org.springframework.data.domain.Page;
|
||||
import org.springframework.data.domain.PageRequest;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author yan.y
|
||||
* @date 2019/07/29
|
||||
*/
|
||||
@Service
|
||||
public class BssDeptServiceImpl implements BssDeptService {
|
||||
|
||||
@Autowired
|
||||
private BssDeptRepository bssDeptRepository;
|
||||
|
||||
/**
|
||||
* 根据ID查询数据
|
||||
* @param id 主键ID
|
||||
*/
|
||||
@Override
|
||||
@Transactional
|
||||
public BssDept getById(Long id) {
|
||||
return bssDeptRepository.findById(id).orElse(null);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取分页列表数据
|
||||
* @param example 查询实例
|
||||
* @return 返回分页数据
|
||||
*/
|
||||
@Override
|
||||
public Page<BssDept> getPageList(Example<BssDept> example) {
|
||||
// 创建分页对象
|
||||
PageRequest page = PageSort.pageRequest();
|
||||
return bssDeptRepository.findAll(example, page);
|
||||
}
|
||||
|
||||
/**
|
||||
* 保存数据
|
||||
* @param bssDept 实体对象
|
||||
*/
|
||||
@Override
|
||||
public BssDept save(BssDept bssDept) {
|
||||
return bssDeptRepository.save(bssDept);
|
||||
}
|
||||
|
||||
/**
|
||||
* 状态(启用,冻结,删除)/批量状态处理
|
||||
*/
|
||||
@Override
|
||||
@Transactional
|
||||
public Boolean updateStatus(StatusEnum statusEnum, List<Long> idList) {
|
||||
return bssDeptRepository.updateStatus(statusEnum.getCode(), idList) > 0;
|
||||
}
|
||||
}
|
||||
+78
@@ -0,0 +1,78 @@
|
||||
package com.cwhelp.modules.business.service.impl;
|
||||
|
||||
import com.cwhelp.common.data.PageSort;
|
||||
import com.cwhelp.common.enums.StatusEnum;
|
||||
import com.cwhelp.modules.business.domain.BssPlatform;
|
||||
import com.cwhelp.modules.business.repository.BssPlatformRepository;
|
||||
import com.cwhelp.modules.business.service.BssPlatformService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.data.domain.Example;
|
||||
import org.springframework.data.domain.Page;
|
||||
import org.springframework.data.domain.PageRequest;
|
||||
import org.springframework.data.domain.Sort;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
|
||||
/**
|
||||
* @author yan.y
|
||||
* @date 2019/07/28
|
||||
*/
|
||||
@Service
|
||||
public class BssPlatformServiceImpl implements BssPlatformService {
|
||||
|
||||
@Autowired
|
||||
private BssPlatformRepository bssPlatformRepository;
|
||||
|
||||
/**
|
||||
* 根据ID查询数据
|
||||
* @param id 主键ID
|
||||
*/
|
||||
@Override
|
||||
@Transactional
|
||||
public BssPlatform getById(Long id) {
|
||||
return bssPlatformRepository.findById(id).orElse(null);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取分页列表数据
|
||||
* @param example 查询实例
|
||||
* @return 返回分页数据
|
||||
*/
|
||||
@Override
|
||||
public Page<BssPlatform> getPageList(Example<BssPlatform> example) {
|
||||
// 创建分页对象
|
||||
PageRequest page = PageSort.pageRequest();
|
||||
return bssPlatformRepository.findAll(example, page);
|
||||
}
|
||||
|
||||
/**
|
||||
* 保存数据
|
||||
* @param bssPlatform 实体对象
|
||||
*/
|
||||
@Override
|
||||
public BssPlatform save(BssPlatform bssPlatform) {
|
||||
return bssPlatformRepository.save(bssPlatform);
|
||||
}
|
||||
|
||||
/**
|
||||
* 状态(启用,冻结,删除)/批量状态处理
|
||||
*/
|
||||
@Override
|
||||
@Transactional
|
||||
public Boolean updateStatus(StatusEnum statusEnum, List<Long> idList) {
|
||||
return bssPlatformRepository.updateStatus(statusEnum.getCode(), idList) > 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取部门列表数据
|
||||
* @param example 查询实例
|
||||
* @param sort 排序对象
|
||||
*/
|
||||
@Override
|
||||
public List<BssPlatform> getListByExample(Example<BssPlatform> example, Sort sort) {
|
||||
return bssPlatformRepository.findAll(example, sort);
|
||||
}
|
||||
}
|
||||
Binary file not shown.
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
@@ -0,0 +1,96 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<module org.jetbrains.idea.maven.project.MavenProjectsManager.isMavenModule="true" type="JAVA_MODULE" version="4">
|
||||
<component name="NewModuleRootManager" LANGUAGE_LEVEL="JDK_1_8">
|
||||
<output url="file://$MODULE_DIR$/target/classes" />
|
||||
<output-test url="file://$MODULE_DIR$/target/test-classes" />
|
||||
<content url="file://$MODULE_DIR$">
|
||||
<excludeFolder url="file://$MODULE_DIR$/target" />
|
||||
</content>
|
||||
<orderEntry type="inheritedJdk" />
|
||||
<orderEntry type="sourceFolder" forTests="false" />
|
||||
<orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-web:2.1.4.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter:2.1.4.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-logging:2.1.4.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: ch.qos.logback:logback-classic:1.2.3" level="project" />
|
||||
<orderEntry type="library" name="Maven: ch.qos.logback:logback-core:1.2.3" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.apache.logging.log4j:log4j-to-slf4j:2.11.2" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.apache.logging.log4j:log4j-api:2.11.2" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.slf4j:jul-to-slf4j:1.7.26" level="project" />
|
||||
<orderEntry type="library" name="Maven: javax.annotation:javax.annotation-api:1.3.2" level="project" />
|
||||
<orderEntry type="library" scope="RUNTIME" name="Maven: org.yaml:snakeyaml:1.23" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-json:2.1.4.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.fasterxml.jackson.core:jackson-databind:2.9.8" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.fasterxml.jackson.core:jackson-annotations:2.9.0" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.fasterxml.jackson.core:jackson-core:2.9.8" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.fasterxml.jackson.datatype:jackson-datatype-jdk8:2.9.8" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.fasterxml.jackson.datatype:jackson-datatype-jsr310:2.9.8" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.fasterxml.jackson.module:jackson-module-parameter-names:2.9.8" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-tomcat:2.1.4.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.apache.tomcat.embed:tomcat-embed-core:9.0.17" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.apache.tomcat.embed:tomcat-embed-el:9.0.17" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.apache.tomcat.embed:tomcat-embed-websocket:9.0.17" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.hibernate.validator:hibernate-validator:6.0.16.Final" level="project" />
|
||||
<orderEntry type="library" name="Maven: javax.validation:validation-api:2.0.1.Final" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.jboss.logging:jboss-logging:3.3.2.Final" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.fasterxml:classmate:1.4.0" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework:spring-web:5.1.6.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework:spring-beans:5.1.6.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework:spring-webmvc:5.1.6.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework:spring-aop:5.1.6.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework:spring-context:5.1.6.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework:spring-expression:5.1.6.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-data-jpa:2.1.4.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-aop:2.1.4.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.aspectj:aspectjweaver:1.9.2" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-jdbc:2.1.4.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.zaxxer:HikariCP:3.2.0" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework:spring-jdbc:5.1.6.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: javax.transaction:javax.transaction-api:1.3" level="project" />
|
||||
<orderEntry type="library" name="Maven: javax.xml.bind:jaxb-api:2.3.1" level="project" />
|
||||
<orderEntry type="library" name="Maven: javax.activation:javax.activation-api:1.2.0" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.hibernate:hibernate-core:5.3.9.Final" level="project" />
|
||||
<orderEntry type="library" name="Maven: javax.persistence:javax.persistence-api:2.2" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.javassist:javassist:3.23.1-GA" level="project" />
|
||||
<orderEntry type="library" name="Maven: net.bytebuddy:byte-buddy:1.9.12" level="project" />
|
||||
<orderEntry type="library" name="Maven: antlr:antlr:2.7.7" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.jboss:jandex:2.0.5.Final" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.dom4j:dom4j:2.1.1" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.hibernate.common:hibernate-commons-annotations:5.0.4.Final" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework.data:spring-data-jpa:2.1.6.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework.data:spring-data-commons:2.1.6.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework:spring-orm:5.1.6.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework:spring-tx:5.1.6.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework:spring-aspects:5.1.6.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-configuration-processor:2.1.4.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-cache:2.1.4.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework:spring-context-support:5.1.6.RELEASE" level="project" />
|
||||
<orderEntry type="library" scope="RUNTIME" name="Maven: org.springframework.boot:spring-boot-devtools:2.1.4.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework.boot:spring-boot:2.1.4.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-autoconfigure:2.1.4.RELEASE" level="project" />
|
||||
<orderEntry type="library" scope="TEST" name="Maven: org.springframework.boot:spring-boot-starter-test:2.1.4.RELEASE" level="project" />
|
||||
<orderEntry type="library" scope="TEST" name="Maven: org.springframework.boot:spring-boot-test:2.1.4.RELEASE" level="project" />
|
||||
<orderEntry type="library" scope="TEST" name="Maven: org.springframework.boot:spring-boot-test-autoconfigure:2.1.4.RELEASE" level="project" />
|
||||
<orderEntry type="library" scope="TEST" name="Maven: com.jayway.jsonpath:json-path:2.4.0" level="project" />
|
||||
<orderEntry type="library" scope="TEST" name="Maven: net.minidev:json-smart:2.3" level="project" />
|
||||
<orderEntry type="library" scope="TEST" name="Maven: net.minidev:accessors-smart:1.2" level="project" />
|
||||
<orderEntry type="library" scope="TEST" name="Maven: org.ow2.asm:asm:5.0.4" level="project" />
|
||||
<orderEntry type="library" scope="TEST" name="Maven: junit:junit:4.12" level="project" />
|
||||
<orderEntry type="library" scope="TEST" name="Maven: org.assertj:assertj-core:3.11.1" level="project" />
|
||||
<orderEntry type="library" scope="TEST" name="Maven: org.mockito:mockito-core:2.23.4" level="project" />
|
||||
<orderEntry type="library" scope="TEST" name="Maven: net.bytebuddy:byte-buddy-agent:1.9.12" level="project" />
|
||||
<orderEntry type="library" scope="TEST" name="Maven: org.objenesis:objenesis:2.6" level="project" />
|
||||
<orderEntry type="library" scope="TEST" name="Maven: org.hamcrest:hamcrest-core:1.3" level="project" />
|
||||
<orderEntry type="library" scope="TEST" name="Maven: org.hamcrest:hamcrest-library:1.3" level="project" />
|
||||
<orderEntry type="library" scope="TEST" name="Maven: org.skyscreamer:jsonassert:1.5.0" level="project" />
|
||||
<orderEntry type="library" scope="TEST" name="Maven: com.vaadin.external.google:android-json:0.0.20131108.vaadin1" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework:spring-core:5.1.6.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework:spring-jcl:5.1.6.RELEASE" level="project" />
|
||||
<orderEntry type="library" scope="TEST" name="Maven: org.springframework:spring-test:5.1.6.RELEASE" level="project" />
|
||||
<orderEntry type="library" scope="TEST" name="Maven: org.xmlunit:xmlunit-core:2.6.2" level="project" />
|
||||
<orderEntry type="library" scope="RUNTIME" name="Maven: mysql:mysql-connector-java:5.1.46" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.projectlombok:lombok:1.18.2" level="project" />
|
||||
<orderEntry type="library" name="Maven: net.sf.ehcache:ehcache:2.10.5" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.slf4j:slf4j-api:1.7.26" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.jsoup:jsoup:1.11.3" level="project" />
|
||||
</component>
|
||||
</module>
|
||||
@@ -0,0 +1,21 @@
|
||||
<?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">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
<artifactId>modules</artifactId>
|
||||
<packaging>pom</packaging>
|
||||
<name>业务模块</name>
|
||||
|
||||
<parent>
|
||||
<groupId>com.cwhelp</groupId>
|
||||
<artifactId>cwhelp</artifactId>
|
||||
<version>2.0.1</version>
|
||||
</parent>
|
||||
|
||||
<modules>
|
||||
<module>system</module>
|
||||
<module>business</module>
|
||||
</modules>
|
||||
</project>
|
||||
@@ -0,0 +1,30 @@
|
||||
<?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">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
<groupId>com.cwhelp.modules</groupId>
|
||||
<artifactId>system</artifactId>
|
||||
<packaging>jar</packaging>
|
||||
<name>系统</name>
|
||||
|
||||
<parent>
|
||||
<groupId>com.cwhelp</groupId>
|
||||
<artifactId>modules</artifactId>
|
||||
<version>2.0.1</version>
|
||||
</parent>
|
||||
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>com.cwhelp</groupId>
|
||||
<artifactId>common</artifactId>
|
||||
<version>${project.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.cwhelp.component</groupId>
|
||||
<artifactId>excel</artifactId>
|
||||
<version>${project.version}</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
</project>
|
||||
@@ -0,0 +1,50 @@
|
||||
package com.cwhelp.modules.system.domain;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonIgnore;
|
||||
import lombok.Data;
|
||||
import org.hibernate.annotations.NotFound;
|
||||
import org.hibernate.annotations.NotFoundAction;
|
||||
import org.springframework.data.annotation.CreatedDate;
|
||||
import org.springframework.data.jpa.domain.support.AuditingEntityListener;
|
||||
|
||||
import javax.persistence.*;
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
|
||||
@Data
|
||||
@Entity
|
||||
@Table(name="sys_action_log")
|
||||
@EntityListeners(AuditingEntityListener.class)
|
||||
public class ActionLog implements Serializable {
|
||||
@Id
|
||||
@GeneratedValue(strategy = GenerationType.IDENTITY)
|
||||
private Long id;
|
||||
private String name;
|
||||
private Byte type;
|
||||
private String ipaddr;
|
||||
private String clazz;
|
||||
private String method;
|
||||
private String model;
|
||||
private Long recordId;
|
||||
@Lob @Column(columnDefinition="TEXT")
|
||||
private String message;
|
||||
@CreatedDate
|
||||
private Date createDate;
|
||||
@ManyToOne(fetch=FetchType.LAZY)
|
||||
@NotFound(action=NotFoundAction.IGNORE)
|
||||
@JoinColumn(name="oper_by")
|
||||
@JsonIgnore
|
||||
private User operBy;
|
||||
private String operName;
|
||||
|
||||
public ActionLog(){}
|
||||
/**
|
||||
* 封装日志对象
|
||||
* @param name 日志名称
|
||||
* @param message 日志消息
|
||||
*/
|
||||
public ActionLog(String name, String message){
|
||||
this.name = name;
|
||||
this.message = message;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,64 @@
|
||||
package com.cwhelp.modules.system.domain;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonIgnore;
|
||||
import com.cwhelp.common.enums.StatusEnum;
|
||||
import com.cwhelp.common.utils.StatusUtil;
|
||||
import lombok.Data;
|
||||
import org.hibernate.annotations.NotFound;
|
||||
import org.hibernate.annotations.NotFoundAction;
|
||||
import org.hibernate.annotations.Where;
|
||||
import org.springframework.data.annotation.CreatedBy;
|
||||
import org.springframework.data.annotation.CreatedDate;
|
||||
import org.springframework.data.annotation.LastModifiedBy;
|
||||
import org.springframework.data.annotation.LastModifiedDate;
|
||||
import org.springframework.data.jpa.domain.support.AuditingEntityListener;
|
||||
|
||||
import javax.persistence.*;
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* @author yan.y
|
||||
*/
|
||||
@Data
|
||||
@Entity
|
||||
@Table(name="sys_dept")
|
||||
@EntityListeners(AuditingEntityListener.class)
|
||||
@Where(clause = StatusUtil.notDelete)
|
||||
public class Dept implements Serializable {
|
||||
@Id
|
||||
@GeneratedValue(strategy = GenerationType.IDENTITY)
|
||||
private Long id;
|
||||
// 部门名称
|
||||
private String title;
|
||||
// 父级编号
|
||||
private Long pid;
|
||||
// 所有父级编号
|
||||
private String pids;
|
||||
// 排序
|
||||
private Integer sort;
|
||||
// 备注
|
||||
private String remark;
|
||||
// 创建时间
|
||||
@CreatedDate
|
||||
private Date createDate;
|
||||
// 更新时间
|
||||
@LastModifiedDate
|
||||
private Date updateDate;
|
||||
// 创建者
|
||||
@CreatedBy
|
||||
@ManyToOne(fetch=FetchType.LAZY)
|
||||
@NotFound(action= NotFoundAction.IGNORE)
|
||||
@JoinColumn(name="create_by")
|
||||
@JsonIgnore
|
||||
private User createBy;
|
||||
// 更新者
|
||||
@LastModifiedBy
|
||||
@ManyToOne(fetch=FetchType.LAZY)
|
||||
@NotFound(action=NotFoundAction.IGNORE)
|
||||
@JoinColumn(name="update_by")
|
||||
@JsonIgnore
|
||||
private User updateBy;
|
||||
// 数据状态
|
||||
private Byte status = StatusEnum.OK.getCode();
|
||||
}
|
||||
@@ -0,0 +1,55 @@
|
||||
package com.cwhelp.modules.system.domain;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonIgnore;
|
||||
import com.cwhelp.common.enums.StatusEnum;
|
||||
import com.cwhelp.common.utils.StatusUtil;
|
||||
import lombok.Data;
|
||||
import org.hibernate.annotations.NotFound;
|
||||
import org.hibernate.annotations.NotFoundAction;
|
||||
import org.hibernate.annotations.Where;
|
||||
import org.springframework.data.annotation.CreatedBy;
|
||||
import org.springframework.data.annotation.CreatedDate;
|
||||
import org.springframework.data.annotation.LastModifiedBy;
|
||||
import org.springframework.data.annotation.LastModifiedDate;
|
||||
import org.springframework.data.jpa.domain.support.AuditingEntityListener;
|
||||
|
||||
import javax.persistence.*;
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* @author yan.y
|
||||
*/
|
||||
@Data
|
||||
@Entity
|
||||
@Table(name="sys_dict")
|
||||
@EntityListeners(AuditingEntityListener.class)
|
||||
@Where(clause = StatusUtil.notDelete)
|
||||
public class Dict implements Serializable {
|
||||
@Id
|
||||
@GeneratedValue(strategy=GenerationType.IDENTITY)
|
||||
private Long id;
|
||||
private String name;
|
||||
private String title;
|
||||
private Byte type;
|
||||
@Lob @Column(columnDefinition="TEXT")
|
||||
private String value;
|
||||
private String remark;
|
||||
@CreatedDate
|
||||
private Date createDate;
|
||||
@LastModifiedDate
|
||||
private Date updateDate;
|
||||
@CreatedBy
|
||||
@ManyToOne(fetch=FetchType.LAZY)
|
||||
@NotFound(action=NotFoundAction.IGNORE)
|
||||
@JoinColumn(name="create_by")
|
||||
@JsonIgnore
|
||||
private User createBy;
|
||||
@LastModifiedBy
|
||||
@ManyToOne(fetch=FetchType.LAZY)
|
||||
@NotFound(action=NotFoundAction.IGNORE)
|
||||
@JoinColumn(name="update_by")
|
||||
@JsonIgnore
|
||||
private User updateBy;
|
||||
private Byte status = StatusEnum.OK.getCode();
|
||||
}
|
||||
@@ -0,0 +1,84 @@
|
||||
package com.cwhelp.modules.system.domain;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonIgnore;
|
||||
import com.cwhelp.common.enums.StatusEnum;
|
||||
import com.cwhelp.common.utils.StatusUtil;
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
import org.hibernate.annotations.NotFound;
|
||||
import org.hibernate.annotations.NotFoundAction;
|
||||
import org.hibernate.annotations.Where;
|
||||
import org.springframework.data.annotation.CreatedBy;
|
||||
import org.springframework.data.annotation.CreatedDate;
|
||||
import org.springframework.data.annotation.LastModifiedBy;
|
||||
import org.springframework.data.annotation.LastModifiedDate;
|
||||
import org.springframework.data.jpa.domain.support.AuditingEntityListener;
|
||||
|
||||
import javax.persistence.*;
|
||||
import java.io.Serializable;
|
||||
import java.util.*;
|
||||
|
||||
/**
|
||||
* @author yan.y
|
||||
*/
|
||||
@Getter
|
||||
@Setter
|
||||
@Entity
|
||||
@Table(name = "sys_menu")
|
||||
@EntityListeners(AuditingEntityListener.class)
|
||||
@Where(clause = StatusUtil.notDelete)
|
||||
public class Menu implements Serializable {
|
||||
@Id
|
||||
@GeneratedValue(strategy = GenerationType.IDENTITY)
|
||||
private Long id;
|
||||
private Long pid;
|
||||
private String pids;
|
||||
private String title;
|
||||
private String url;
|
||||
private String perms;
|
||||
private String icon;
|
||||
private Byte type;
|
||||
private Integer sort;
|
||||
private String remark;
|
||||
@CreatedDate
|
||||
private Date createDate;
|
||||
@LastModifiedDate
|
||||
private Date updateDate;
|
||||
@CreatedBy
|
||||
@ManyToOne(fetch = FetchType.LAZY)
|
||||
@NotFound(action = NotFoundAction.IGNORE)
|
||||
@JoinColumn(name = "create_by")
|
||||
@JsonIgnore
|
||||
private User createBy;
|
||||
@LastModifiedBy
|
||||
@ManyToOne(fetch = FetchType.LAZY)
|
||||
@NotFound(action = NotFoundAction.IGNORE)
|
||||
@JoinColumn(name = "update_by")
|
||||
@JsonIgnore
|
||||
private User updateBy;
|
||||
private Byte status = StatusEnum.OK.getCode();
|
||||
|
||||
@ManyToMany(mappedBy = "menus")
|
||||
@JsonIgnore
|
||||
private Set<Role> roles = new HashSet<>(0);
|
||||
|
||||
@Transient
|
||||
@JsonIgnore
|
||||
private Map<Long, Menu> children = new HashMap<>();
|
||||
|
||||
public Menu() {
|
||||
}
|
||||
|
||||
public Menu(Long id, String title, String pids) {
|
||||
this.id = id;
|
||||
this.title = title;
|
||||
this.pids = pids;
|
||||
}
|
||||
|
||||
public void setPids(String pids) {
|
||||
if (pids.startsWith(",")){
|
||||
pids = pids.substring(1);
|
||||
}
|
||||
this.pids = pids;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,69 @@
|
||||
package com.cwhelp.modules.system.domain;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonIgnore;
|
||||
import com.cwhelp.common.enums.StatusEnum;
|
||||
import com.cwhelp.common.utils.StatusUtil;
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
import org.hibernate.annotations.*;
|
||||
import org.springframework.data.annotation.CreatedBy;
|
||||
import org.springframework.data.annotation.CreatedDate;
|
||||
import org.springframework.data.annotation.LastModifiedBy;
|
||||
import org.springframework.data.annotation.LastModifiedDate;
|
||||
import org.springframework.data.jpa.domain.support.AuditingEntityListener;
|
||||
|
||||
import javax.persistence.*;
|
||||
import javax.persistence.CascadeType;
|
||||
import javax.persistence.Entity;
|
||||
import javax.persistence.Table;
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
import java.util.HashSet;
|
||||
import java.util.Set;
|
||||
|
||||
/**
|
||||
* @author yan.y
|
||||
*/
|
||||
@Entity
|
||||
@Table(name = "sys_role")
|
||||
@Getter
|
||||
@Setter
|
||||
@EntityListeners(AuditingEntityListener.class)
|
||||
@SQLDelete(sql = "update sys_role" + StatusUtil.sliceDelete)
|
||||
@Where(clause = StatusUtil.notDelete)
|
||||
public class Role implements Serializable {
|
||||
@Id
|
||||
@GeneratedValue(strategy = GenerationType.IDENTITY)
|
||||
private Long id;
|
||||
private String name;
|
||||
private String title;
|
||||
private String remark;
|
||||
@CreatedDate
|
||||
private Date createDate;
|
||||
@LastModifiedDate
|
||||
private Date updateDate;
|
||||
@CreatedBy
|
||||
@ManyToOne(fetch = FetchType.LAZY)
|
||||
@NotFound(action = NotFoundAction.IGNORE)
|
||||
@JoinColumn(name = "create_by")
|
||||
@JsonIgnore
|
||||
private User createBy;
|
||||
@LastModifiedBy
|
||||
@ManyToOne(fetch = FetchType.LAZY)
|
||||
@NotFound(action = NotFoundAction.IGNORE)
|
||||
@JoinColumn(name = "update_by")
|
||||
@JsonIgnore
|
||||
private User updateBy;
|
||||
private Byte status = StatusEnum.OK.getCode();
|
||||
|
||||
@ManyToMany(mappedBy = "roles", cascade = {CascadeType.PERSIST, CascadeType.MERGE})
|
||||
@JsonIgnore
|
||||
private Set<User> users = new HashSet<>(0);
|
||||
|
||||
@ManyToMany(fetch = FetchType.LAZY)
|
||||
@JoinTable(name = "sys_role_menu",
|
||||
joinColumns = @JoinColumn(name = "role_id"),
|
||||
inverseJoinColumns = @JoinColumn(name = "menu_id"))
|
||||
@JsonIgnore
|
||||
private Set<Menu> menus = new HashSet<>(0);
|
||||
}
|
||||
@@ -0,0 +1,48 @@
|
||||
package com.cwhelp.modules.system.domain;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonIgnore;
|
||||
import lombok.Data;
|
||||
import org.hibernate.annotations.NotFound;
|
||||
import org.hibernate.annotations.NotFoundAction;
|
||||
import org.springframework.data.annotation.CreatedBy;
|
||||
import org.springframework.data.annotation.CreatedDate;
|
||||
import org.springframework.data.jpa.domain.support.AuditingEntityListener;
|
||||
|
||||
import javax.persistence.*;
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* @author yan.y
|
||||
*/
|
||||
@Entity
|
||||
@Table(name="sys_file")
|
||||
@Data
|
||||
@EntityListeners(AuditingEntityListener.class)
|
||||
public class Upload implements Serializable {
|
||||
@Id
|
||||
@GeneratedValue(strategy = GenerationType.IDENTITY)
|
||||
private Long id;
|
||||
// 文件名
|
||||
private String name;
|
||||
// 文件路径
|
||||
private String path;
|
||||
// 文件类型
|
||||
private String mime;
|
||||
// 文件大小
|
||||
private Long size;
|
||||
// 文件md5值
|
||||
private String md5;
|
||||
// 文件sha1值
|
||||
private String sha1;
|
||||
// 创建时间
|
||||
@CreatedDate
|
||||
private Date createDate;
|
||||
// 创建者
|
||||
@CreatedBy
|
||||
@ManyToOne(fetch=FetchType.LAZY)
|
||||
@NotFound(action= NotFoundAction.IGNORE)
|
||||
@JoinColumn(name="create_by")
|
||||
@JsonIgnore
|
||||
private User createBy;
|
||||
}
|
||||
@@ -0,0 +1,73 @@
|
||||
package com.cwhelp.modules.system.domain;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonIgnore;
|
||||
import com.cwhelp.common.enums.StatusEnum;
|
||||
import com.cwhelp.common.utils.StatusUtil;
|
||||
import com.cwhelp.component.excel.annotation.Excel;
|
||||
import com.cwhelp.component.excel.enums.ExcelType;
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
import org.hibernate.annotations.SQLDelete;
|
||||
import org.hibernate.annotations.Where;
|
||||
import org.springframework.data.annotation.CreatedDate;
|
||||
import org.springframework.data.annotation.LastModifiedDate;
|
||||
import org.springframework.data.jpa.domain.support.AuditingEntityListener;
|
||||
|
||||
import javax.persistence.*;
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
import java.util.HashSet;
|
||||
import java.util.Set;
|
||||
|
||||
/**
|
||||
* @author yan.y
|
||||
*/
|
||||
@Entity
|
||||
@Table(name="sys_user")
|
||||
@Getter
|
||||
@Setter
|
||||
@EntityListeners(AuditingEntityListener.class)
|
||||
@SQLDelete(sql = "update sys_user" + StatusUtil.sliceDelete)
|
||||
@Where(clause = StatusUtil.notDelete)
|
||||
@Excel("用户数据")
|
||||
public class User implements Serializable {
|
||||
@Id
|
||||
@GeneratedValue(strategy=GenerationType.IDENTITY)
|
||||
@Excel(value = "用户ID", type = ExcelType.EXPORT)
|
||||
private Long id;
|
||||
@Excel("用户名")
|
||||
private String username;
|
||||
private String password;
|
||||
private String salt;
|
||||
@Excel("昵称")
|
||||
private String nickname;
|
||||
private String picture;
|
||||
@Excel(value = "性别", dict = "USER_SEX")
|
||||
private String sex;
|
||||
@Excel("手机号码")
|
||||
private String phone;
|
||||
@Excel("电子邮箱")
|
||||
private String email;
|
||||
@CreatedDate
|
||||
@Excel("创建时间")
|
||||
private Date createDate;
|
||||
@LastModifiedDate
|
||||
@Excel("更新时间")
|
||||
private Date updateDate;
|
||||
@Excel("备注")
|
||||
private String remark;
|
||||
@Excel(value = "状态", dict = "DATA_STATUS")
|
||||
private Byte status = StatusEnum.OK.getCode();
|
||||
|
||||
@ManyToOne(fetch=FetchType.EAGER)
|
||||
@JoinColumn(name="dept_id")
|
||||
@JsonIgnore
|
||||
private Dept dept;
|
||||
|
||||
@ManyToMany(fetch = FetchType.LAZY)
|
||||
@JoinTable(name = "sys_user_role",
|
||||
joinColumns = @JoinColumn(name="user_id"),
|
||||
inverseJoinColumns = @JoinColumn(name = "role_id"))
|
||||
@JsonIgnore
|
||||
private Set<Role> roles = new HashSet<>(0);
|
||||
}
|
||||
@@ -0,0 +1,23 @@
|
||||
package com.cwhelp.modules.system.enums;
|
||||
|
||||
import lombok.Getter;
|
||||
|
||||
/**
|
||||
* @author yan.y
|
||||
*/
|
||||
@Getter
|
||||
public enum ActionLogEnum {
|
||||
|
||||
BUSINESS((byte)1, "业务"),
|
||||
LOGIN((byte)2, "登录"),
|
||||
SYSTEM((byte)3, "系统");
|
||||
|
||||
private Byte code;
|
||||
|
||||
private String message;
|
||||
|
||||
ActionLogEnum(Byte code, String message) {
|
||||
this.code = code;
|
||||
this.message = message;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,25 @@
|
||||
package com.cwhelp.modules.system.enums;
|
||||
|
||||
import lombok.Getter;
|
||||
|
||||
/**
|
||||
* 数据库字段状态枚举
|
||||
* @author yan.y
|
||||
*/
|
||||
@Getter
|
||||
public enum DictTypeEnum {
|
||||
|
||||
VALUE((byte)1, "字符值"),
|
||||
KEY_VALUE((byte)2, "键值对"),
|
||||
ENUM_VALUE((byte)3, "枚举类");
|
||||
|
||||
private Byte code;
|
||||
|
||||
private String message;
|
||||
|
||||
DictTypeEnum(Byte code, String message) {
|
||||
this.code = code;
|
||||
this.message = message;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,25 @@
|
||||
package com.cwhelp.modules.system.enums;
|
||||
|
||||
import lombok.Getter;
|
||||
|
||||
/**
|
||||
* 数据库字段状态枚举
|
||||
* @author yan.y
|
||||
*/
|
||||
@Getter
|
||||
public enum MenuTypeEnum {
|
||||
|
||||
TOP_LEVEL((byte)1, "一级菜单"),
|
||||
SUB_LEVEL((byte)2, "子级菜单"),
|
||||
NOT_MENU((byte)3, "不是菜单");
|
||||
|
||||
private Byte code;
|
||||
|
||||
private String message;
|
||||
|
||||
MenuTypeEnum(Byte code, String message) {
|
||||
this.code = code;
|
||||
this.message = message;
|
||||
}
|
||||
}
|
||||
|
||||
+16
@@ -0,0 +1,16 @@
|
||||
package com.cwhelp.modules.system.repository;
|
||||
|
||||
import com.cwhelp.modules.system.domain.ActionLog;
|
||||
import org.springframework.data.jpa.repository.JpaRepository;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public interface ActionLogRepository extends JpaRepository<ActionLog, Long> {
|
||||
|
||||
/**
|
||||
* 根据模型和数据ID查询日志列表
|
||||
* @param model 模型(表名)
|
||||
* @param recordId 数据ID
|
||||
*/
|
||||
public List<ActionLog> findByModelAndRecordId(String model, Long recordId);
|
||||
}
|
||||
@@ -0,0 +1,36 @@
|
||||
package com.cwhelp.modules.system.repository;
|
||||
|
||||
import com.cwhelp.common.constant.StatusConst;
|
||||
import org.springframework.data.jpa.repository.JpaRepository;
|
||||
import org.springframework.data.jpa.repository.Modifying;
|
||||
import org.springframework.data.jpa.repository.Query;
|
||||
import org.springframework.data.repository.NoRepositoryBean;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author yan.y
|
||||
*/
|
||||
@NoRepositoryBean
|
||||
public interface BaseRepository<T, ID> extends JpaRepository<T,ID> {
|
||||
|
||||
/**
|
||||
* 查找ID且状态正常
|
||||
* @param id 主键ID
|
||||
* @param status 状态
|
||||
*/
|
||||
public T findByIdAndStatus(Long id, Byte status);
|
||||
|
||||
/**
|
||||
* 批量更新数据状态
|
||||
* #{#entityName} 实体类对象
|
||||
* @param status 状态
|
||||
* @param id ID列表
|
||||
* @return 更新数量
|
||||
*/
|
||||
@Modifying
|
||||
@Transactional
|
||||
@Query("update #{#entityName} set status = ?1 where id in ?2 and status <> " + StatusConst.DELETE)
|
||||
public Integer updateStatus(Byte status, List<Long> id);
|
||||
}
|
||||
@@ -0,0 +1,42 @@
|
||||
package com.cwhelp.modules.system.repository;
|
||||
|
||||
import com.cwhelp.common.constant.StatusConst;
|
||||
import com.cwhelp.modules.system.domain.Dept;
|
||||
import org.springframework.data.domain.Sort;
|
||||
import org.springframework.data.jpa.repository.Query;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author yan.y
|
||||
*/
|
||||
public interface DeptRepository extends BaseRepository<Dept, Long> {
|
||||
|
||||
/**
|
||||
* 查找多个部门
|
||||
* @param ids id列表
|
||||
*/
|
||||
public List<Dept> findByIdIn(List<Long> ids);
|
||||
|
||||
/**
|
||||
* 获取排序最大值
|
||||
* @param pid 父部门ID
|
||||
*/
|
||||
@Query("select max(sort) from Menu m where m.pid = ?1 and m.status <> " + StatusConst.DELETE)
|
||||
public Integer findSortMax(long pid);
|
||||
|
||||
/**
|
||||
* 根据父ID查找子孙部门
|
||||
* @param pids pid列表
|
||||
*/
|
||||
public List<Dept> findByPidsLikeAndStatus(String pids, Byte status);
|
||||
|
||||
/**
|
||||
* 根据父级部门ID获取本级全部部门
|
||||
* @param sort 排序对象
|
||||
* @param pid 父部门ID
|
||||
* @param notId 需要排除的部门ID
|
||||
*/
|
||||
public List<Dept> findByPidAndIdNot(Sort sort, long pid, long notId);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,23 @@
|
||||
package com.cwhelp.modules.system.repository;
|
||||
|
||||
import com.cwhelp.modules.system.domain.Dict;
|
||||
|
||||
/**
|
||||
* @author yan.y
|
||||
*/
|
||||
public interface DictRepository extends BaseRepository<Dict, Long> {
|
||||
|
||||
/**
|
||||
* 根据字典标识查询
|
||||
* @param name 字典标识
|
||||
* @param status 状态
|
||||
*/
|
||||
public Dict findByNameAndStatus(String name, Byte status);
|
||||
|
||||
/**
|
||||
* 根据标识查询字典数据,且排查指定ID的字典
|
||||
* @param name 字典标识
|
||||
* @param id 字典ID
|
||||
*/
|
||||
public Dict findByNameAndIdNot(String name, Long id);
|
||||
}
|
||||
@@ -0,0 +1,64 @@
|
||||
package com.cwhelp.modules.system.repository;
|
||||
|
||||
import com.cwhelp.common.constant.StatusConst;
|
||||
import com.cwhelp.modules.system.domain.Menu;
|
||||
import org.springframework.data.domain.Sort;
|
||||
import org.springframework.data.jpa.repository.Modifying;
|
||||
import org.springframework.data.jpa.repository.Query;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author yan.y
|
||||
*/
|
||||
public interface MenuRepository extends BaseRepository<Menu, Long> {
|
||||
|
||||
/**
|
||||
* 查找多个菜单
|
||||
* @param ids id列表
|
||||
*/
|
||||
public List<Menu> findByIdIn(List<Long> ids);
|
||||
|
||||
/**
|
||||
* 查找响应状态的菜单
|
||||
* @param sort 排序对象
|
||||
*/
|
||||
public List<Menu> findAllByStatus(Sort sort, Byte status);
|
||||
|
||||
/**
|
||||
* 查询菜单URL
|
||||
* @param url id列表
|
||||
*/
|
||||
public Menu findByUrl(String url);
|
||||
|
||||
/**
|
||||
* 根据父ID查找子菜单
|
||||
* @param pids pid列表
|
||||
*/
|
||||
public List<Menu> findByPidsLikeAndStatus(String pids, Byte status);
|
||||
|
||||
/**
|
||||
* 获取排序最大值
|
||||
* @param pid 父菜单ID
|
||||
*/
|
||||
@Query("select max(sort) from Menu m where m.pid = ?1 and m.status <> " + StatusConst.DELETE)
|
||||
public Integer findSortMax(long pid);
|
||||
|
||||
/**
|
||||
* 根据父级菜单ID获取本级全部菜单
|
||||
* @param sort 排序对象
|
||||
* @param pid 父菜单ID
|
||||
* @param notId 需要排除的菜单ID
|
||||
*/
|
||||
public List<Menu> findByPidAndIdNot(Sort sort, long pid, long notId);
|
||||
|
||||
/**
|
||||
* 取消菜单与角色之间的关系
|
||||
* @param id 菜单ID
|
||||
*/
|
||||
@Modifying
|
||||
@Transactional
|
||||
@Query(value = "DELETE FROM sys_role_menu WHERE menu_id = ?1", nativeQuery = true)
|
||||
public Integer cancelRoleJoin(Long id);
|
||||
}
|
||||
@@ -0,0 +1,68 @@
|
||||
package com.cwhelp.modules.system.repository;
|
||||
|
||||
import com.cwhelp.modules.system.domain.Role;
|
||||
import org.springframework.data.domain.Sort;
|
||||
import org.springframework.data.jpa.repository.Modifying;
|
||||
import org.springframework.data.jpa.repository.Query;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Set;
|
||||
|
||||
/**
|
||||
* @author yan.y
|
||||
*/
|
||||
public interface RoleRepository extends BaseRepository<Role,Long> {
|
||||
|
||||
/**
|
||||
* 查找多个角色
|
||||
* @param ids id列表
|
||||
*/
|
||||
public List<Role> findByIdIn(List<Long> ids);
|
||||
|
||||
/**
|
||||
* 查找相应状态的角色
|
||||
* @param sort 排序对象
|
||||
*/
|
||||
public List<Role> findAllByStatus(Sort sort, Byte status);
|
||||
|
||||
/**
|
||||
* 查询指定用户的角色列表
|
||||
* @param id 用户ID
|
||||
* @param status 角色状态
|
||||
*/
|
||||
public Set<Role> findByUsers_IdAndStatus(Long id, Byte status);
|
||||
|
||||
/**
|
||||
* 根据标识查询角色数据,且排查指定ID的角色
|
||||
* @param name 角色标识
|
||||
* @param id 角色ID
|
||||
*/
|
||||
public Role findByNameAndIdNot(String name, Long id);
|
||||
|
||||
/**
|
||||
* 判断指定的用户是否存在角色
|
||||
* @param id 用户ID
|
||||
* @param status 角色状态
|
||||
*/
|
||||
public Boolean existsByUsers_IdAndStatus(Long id, Byte status);
|
||||
|
||||
/**
|
||||
* 取消角色与用户之间的关系
|
||||
* @param ids 角色ID
|
||||
*/
|
||||
@Modifying
|
||||
@Transactional
|
||||
@Query(value = "DELETE FROM sys_user_role WHERE role_id in ?1", nativeQuery = true)
|
||||
public Integer cancelUserJoin(List<Long> ids);
|
||||
|
||||
/**
|
||||
* 取消角色与菜单之间的关系
|
||||
* @param ids 角色ID
|
||||
*/
|
||||
@Modifying
|
||||
@Transactional
|
||||
@Query(value = "DELETE FROM sys_role_menu WHERE role_id in ?1", nativeQuery = true)
|
||||
public Integer cancelMenuJoin(List<Long> ids);
|
||||
|
||||
}
|
||||
+17
@@ -0,0 +1,17 @@
|
||||
package com.cwhelp.modules.system.repository;
|
||||
|
||||
import com.cwhelp.modules.system.domain.Upload;
|
||||
import org.springframework.data.jpa.repository.JpaRepository;
|
||||
|
||||
/**
|
||||
* @author yan.y
|
||||
*/
|
||||
public interface UploadRepository extends JpaRepository<Upload, Long> {
|
||||
|
||||
/**
|
||||
* 查找指定文件sha1记录
|
||||
* @param sha1 文件sha1值
|
||||
*/
|
||||
public Upload findBySha1(String sha1);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,39 @@
|
||||
package com.cwhelp.modules.system.repository;
|
||||
|
||||
import com.cwhelp.modules.system.domain.Dept;
|
||||
import com.cwhelp.modules.system.domain.User;
|
||||
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author yan.y
|
||||
*/
|
||||
public interface UserRepository extends BaseRepository<User, Long>, JpaSpecificationExecutor<User> {
|
||||
|
||||
/**
|
||||
* 根据用户名查询用户数据
|
||||
* @param username 用户名
|
||||
* @return 用户数据
|
||||
*/
|
||||
public User findByUsername(String username);
|
||||
|
||||
/**
|
||||
* 根据用户名查询用户数据,且排查指定ID的用户
|
||||
* @param username 用户名
|
||||
* @param id 排除的用户ID
|
||||
* @return 用户数据
|
||||
*/
|
||||
public User findByUsernameAndIdNot(String username, Long id);
|
||||
|
||||
/**
|
||||
* 查找多个相应部门的用户列表
|
||||
*/
|
||||
public List<User> findByDept(Dept dept);
|
||||
|
||||
/**
|
||||
* 删除多条数据
|
||||
* @param ids ID列表
|
||||
*/
|
||||
public Integer deleteByIdIn(List<Long> ids);
|
||||
}
|
||||
@@ -0,0 +1,49 @@
|
||||
package com.cwhelp.modules.system.service;
|
||||
|
||||
import com.cwhelp.modules.system.domain.ActionLog;
|
||||
import org.springframework.data.domain.Example;
|
||||
import org.springframework.data.domain.Page;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public interface ActionLogService {
|
||||
|
||||
/**
|
||||
* 获取分页列表数据
|
||||
* @param example 查询实例
|
||||
* @return 返回分页数据
|
||||
*/
|
||||
Page<ActionLog> getPageList(Example<ActionLog> example);
|
||||
|
||||
/**
|
||||
* 根据日志ID查询日志数据
|
||||
* @param id 日志ID
|
||||
*/
|
||||
ActionLog getById(Long id);
|
||||
|
||||
/**
|
||||
* 获取数据的日志列表
|
||||
* @param model 模型(表名)
|
||||
* @param recordId 数据ID
|
||||
*/
|
||||
List<ActionLog> getDataLogList(String model, Long recordId);
|
||||
|
||||
/**
|
||||
* 保存日志
|
||||
* @param actionLog 日志实体类
|
||||
*/
|
||||
ActionLog save(ActionLog actionLog);
|
||||
|
||||
/**
|
||||
* 删除指指定ID日志
|
||||
*/
|
||||
@Transactional
|
||||
void deleteId(Long id);
|
||||
|
||||
/**
|
||||
* 清空日志
|
||||
*/
|
||||
@Transactional
|
||||
void emptyLog();
|
||||
}
|
||||
@@ -0,0 +1,66 @@
|
||||
package com.cwhelp.modules.system.service;
|
||||
|
||||
import com.cwhelp.common.enums.StatusEnum;
|
||||
import com.cwhelp.modules.system.domain.Dept;
|
||||
import org.springframework.data.domain.Example;
|
||||
import org.springframework.data.domain.Sort;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author yan.y
|
||||
*/
|
||||
public interface DeptService {
|
||||
|
||||
/**
|
||||
* 获取部门列表数据
|
||||
* @param example 查询实例
|
||||
* @param sort 排序对象
|
||||
*/
|
||||
List<Dept> getListByExample(Example<Dept> example, Sort sort);
|
||||
|
||||
/**
|
||||
* 获取排序最大值
|
||||
* @param pid 父菜单ID
|
||||
*/
|
||||
Integer getSortMax(Long pid);
|
||||
|
||||
/**
|
||||
* 根据父级部门ID获取本级全部部门
|
||||
* @param pid 父部门ID
|
||||
* @param notId 需要排除的部门ID
|
||||
*/
|
||||
List<Dept> getListByPid(Long pid, Long notId);
|
||||
|
||||
/**
|
||||
* 保存多个部门
|
||||
* @param deptList 部门实体类列表
|
||||
*/
|
||||
List<Dept> save(List<Dept> deptList);
|
||||
|
||||
/**
|
||||
* 根据部门管理ID查询部门管理数据
|
||||
* @param id 部门管理ID
|
||||
*/
|
||||
Dept getById(Long id);
|
||||
|
||||
/**
|
||||
* 根据ID查找子孙部门
|
||||
* @param id [id]形式
|
||||
*/
|
||||
List<Dept> getListByPidLikeOk(Long id);
|
||||
|
||||
/**
|
||||
* 保存部门管理
|
||||
* @param dept 部门管理实体类
|
||||
*/
|
||||
Dept save(Dept dept);
|
||||
|
||||
/**
|
||||
* 状态(启用,冻结,删除)/批量状态处理
|
||||
*/
|
||||
@Transactional
|
||||
Boolean updateStatus(StatusEnum statusEnum, List<Long> idList);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,52 @@
|
||||
package com.cwhelp.modules.system.service;
|
||||
|
||||
import com.cwhelp.common.enums.StatusEnum;
|
||||
import com.cwhelp.modules.system.domain.Dict;
|
||||
import org.springframework.data.domain.Example;
|
||||
import org.springframework.data.domain.Page;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author yan.y
|
||||
*/
|
||||
public interface DictService {
|
||||
|
||||
/**
|
||||
* 根据字典标识获取字典数据
|
||||
* @param name 字典标识
|
||||
*/
|
||||
Dict getByNameOk(String name);
|
||||
|
||||
/**
|
||||
* 获取分页列表数据
|
||||
* @param example 查询实例
|
||||
* @return 返回分页数据
|
||||
*/
|
||||
Page<Dict> getPageList(Example<Dict> example);
|
||||
|
||||
/**
|
||||
* 根据字典ID查询字典数据
|
||||
* @param id 字典ID
|
||||
*/
|
||||
Dict getById(Long id);
|
||||
|
||||
/**
|
||||
* 字典标识是否重复
|
||||
* @param dict 字典实体类
|
||||
*/
|
||||
boolean repeatByName(Dict dict);
|
||||
|
||||
/**
|
||||
* 保存字典
|
||||
* @param dict 字典实体类
|
||||
*/
|
||||
Dict save(Dict dict);
|
||||
|
||||
/**
|
||||
* 状态(启用,冻结,删除)/批量状态处理
|
||||
*/
|
||||
@Transactional
|
||||
Boolean updateStatus(StatusEnum statusEnum, List<Long> idList);
|
||||
}
|
||||
@@ -0,0 +1,76 @@
|
||||
package com.cwhelp.modules.system.service;
|
||||
|
||||
import com.cwhelp.common.enums.StatusEnum;
|
||||
import com.cwhelp.modules.system.domain.Menu;
|
||||
import org.springframework.data.domain.Example;
|
||||
import org.springframework.data.domain.Sort;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author yan.y
|
||||
*/
|
||||
public interface MenuService {
|
||||
|
||||
/**
|
||||
* 获取菜单列表数据
|
||||
* @param example 查询实例
|
||||
* @param sort 排序对象
|
||||
*/
|
||||
List<Menu> getListByExample(Example<Menu> example, Sort sort);
|
||||
|
||||
/**
|
||||
* 根据菜单对象的Example判断是否存在
|
||||
* @param menu 菜单对象
|
||||
*/
|
||||
Menu getByMenuToExample(Menu menu);
|
||||
|
||||
/**
|
||||
* 根据菜单ID查询菜单数据
|
||||
* @param id 菜单ID
|
||||
*/
|
||||
Menu getById(Long id);
|
||||
|
||||
/**
|
||||
* 根据菜单url查询菜单数据
|
||||
* @param url 菜单url
|
||||
*/
|
||||
Menu getByUrl(String url);
|
||||
|
||||
/**
|
||||
* 获取菜单列表数据
|
||||
*/
|
||||
List<Menu> getListBySortOk();
|
||||
|
||||
/**
|
||||
* 获取排序最大值
|
||||
* @param pid 父菜单ID
|
||||
*/
|
||||
Integer getSortMax(Long pid);
|
||||
|
||||
/**
|
||||
* 根据父级菜单ID获取本级全部菜单
|
||||
* @param pid 父菜单ID
|
||||
* @param notId 需要排除的菜单ID
|
||||
*/
|
||||
List<Menu> getListByPid(Long pid, Long notId);
|
||||
|
||||
/**
|
||||
* 保存菜单
|
||||
* @param menu 菜单实体类
|
||||
*/
|
||||
Menu save(Menu menu);
|
||||
|
||||
/**
|
||||
* 保存多个菜单
|
||||
* @param menuList 菜单实体类列表
|
||||
*/
|
||||
List<Menu> save(List<Menu> menuList);
|
||||
|
||||
/**
|
||||
* 状态(启用,冻结,删除)/批量状态处理
|
||||
*/
|
||||
@Transactional
|
||||
Boolean updateStatus(StatusEnum statusEnum, List<Long> idList);
|
||||
}
|
||||
@@ -0,0 +1,68 @@
|
||||
package com.cwhelp.modules.system.service;
|
||||
|
||||
import com.cwhelp.common.enums.StatusEnum;
|
||||
import com.cwhelp.modules.system.domain.Role;
|
||||
import org.springframework.data.domain.Example;
|
||||
import org.springframework.data.domain.Page;
|
||||
import org.springframework.data.domain.Sort;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Set;
|
||||
|
||||
/**
|
||||
* @author yan.y
|
||||
*/
|
||||
public interface RoleService {
|
||||
|
||||
/**
|
||||
* 获取用户角色列表
|
||||
* @param id 用户ID
|
||||
*/
|
||||
@Transactional
|
||||
Set<Role> getUserOkRoleList(Long id);
|
||||
|
||||
/**
|
||||
* 判断指定的用户是否存在角色
|
||||
* @param id 用户ID
|
||||
*/
|
||||
Boolean existsUserOk(Long id);
|
||||
|
||||
/**
|
||||
* 根据角色ID查询角色数据
|
||||
* @param id 角色ID
|
||||
*/
|
||||
@Transactional
|
||||
Role getById(Long id);
|
||||
|
||||
/**
|
||||
* 获取分页列表数据
|
||||
* @param example 查询实例
|
||||
* @return 返回分页数据
|
||||
*/
|
||||
Page<Role> getPageList(Example<Role> example);
|
||||
|
||||
/**
|
||||
* 获取角色列表数据
|
||||
* @param sort 排序对象
|
||||
*/
|
||||
List<Role> getListBySortOk(Sort sort);
|
||||
|
||||
/**
|
||||
* 角色标识是否重复
|
||||
* @param role 角色实体类
|
||||
*/
|
||||
boolean repeatByName(Role role);
|
||||
|
||||
/**
|
||||
* 保存角色
|
||||
* @param role 角色实体类
|
||||
*/
|
||||
Role save(Role role);
|
||||
|
||||
/**
|
||||
* 状态(启用,冻结,删除)/批量状态处理
|
||||
*/
|
||||
@Transactional
|
||||
Boolean updateStatus(StatusEnum statusEnum, List<Long> idList);
|
||||
}
|
||||
@@ -0,0 +1,21 @@
|
||||
package com.cwhelp.modules.system.service;
|
||||
|
||||
import com.cwhelp.modules.system.domain.Upload;
|
||||
|
||||
/**
|
||||
* @author yan.y
|
||||
*/
|
||||
public interface UploadService {
|
||||
|
||||
/**
|
||||
* 获取文件sha1值的记录
|
||||
*/
|
||||
Upload getBySha1(String sha1);
|
||||
|
||||
/**
|
||||
* 保存文件上传
|
||||
* @param upload 文件上传实体类
|
||||
*/
|
||||
Upload save(Upload upload);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,59 @@
|
||||
package com.cwhelp.modules.system.service;
|
||||
|
||||
import com.cwhelp.common.enums.StatusEnum;
|
||||
import com.cwhelp.modules.system.domain.User;
|
||||
import org.springframework.data.domain.Page;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author yan.y
|
||||
*/
|
||||
public interface UserService {
|
||||
|
||||
/**
|
||||
* 获取分页列表数据
|
||||
* @param user 实体对象
|
||||
* @return 返回分页数据
|
||||
*/
|
||||
Page<User> getPageList(User user);
|
||||
|
||||
/**
|
||||
* 保存用户
|
||||
* @param user 用户实体类
|
||||
*/
|
||||
User save(User user);
|
||||
|
||||
/**
|
||||
* 保存用户列表
|
||||
* @param userList 用户实体类
|
||||
*/
|
||||
List<User> save(List<User> userList);
|
||||
|
||||
/**
|
||||
* 根据用户名查询用户数据
|
||||
* @param username 用户名
|
||||
* @return 用户数据
|
||||
*/
|
||||
User getByName(String username);
|
||||
|
||||
/**
|
||||
* 用户名是否重复
|
||||
* @param user 用户对象
|
||||
* @return 用户数据
|
||||
*/
|
||||
Boolean repeatByUsername(User user);
|
||||
|
||||
/**
|
||||
* 根据用户ID查询用户数据
|
||||
* @param id 用户ID
|
||||
*/
|
||||
User getById(Long id);
|
||||
|
||||
/**
|
||||
* 状态(启用,冻结,删除)/批量状态处理
|
||||
*/
|
||||
@Transactional
|
||||
Boolean updateStatus(StatusEnum statusEnum, List<Long> idList);
|
||||
}
|
||||
+80
@@ -0,0 +1,80 @@
|
||||
package com.cwhelp.modules.system.service.impl;
|
||||
|
||||
import com.cwhelp.common.data.PageSort;
|
||||
import com.cwhelp.modules.system.domain.ActionLog;
|
||||
import com.cwhelp.modules.system.repository.ActionLogRepository;
|
||||
import com.cwhelp.modules.system.service.ActionLogService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.data.domain.Example;
|
||||
import org.springframework.data.domain.Page;
|
||||
import org.springframework.data.domain.PageRequest;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Service
|
||||
public class ActionLogServiceImpl implements ActionLogService {
|
||||
|
||||
@Autowired
|
||||
private ActionLogRepository actionLogRepository;
|
||||
|
||||
/**
|
||||
* 根据日志ID查询日志数据
|
||||
* @param id 日志ID
|
||||
*/
|
||||
@Override
|
||||
@Transactional
|
||||
public ActionLog getById(Long id) {
|
||||
return actionLogRepository.findById(id).orElse(null);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取分页列表数据
|
||||
* @param example 查询实例
|
||||
* @return 返回分页数据
|
||||
*/
|
||||
@Override
|
||||
public Page<ActionLog> getPageList(Example<ActionLog> example) {
|
||||
// 创建分页对象
|
||||
PageRequest page = PageSort.pageRequest();
|
||||
return actionLogRepository.findAll(example, page);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取数据的日志列表
|
||||
* @param model 模型(表名)
|
||||
* @param recordId 数据ID
|
||||
*/
|
||||
@Override
|
||||
public List<ActionLog> getDataLogList(String model, Long recordId){
|
||||
return actionLogRepository.findByModelAndRecordId(model, recordId);
|
||||
}
|
||||
|
||||
/**
|
||||
* 保存日志
|
||||
* @param actionLog 日志实体类
|
||||
*/
|
||||
@Override
|
||||
public ActionLog save(ActionLog actionLog){
|
||||
return actionLogRepository.save(actionLog);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除指指定ID日志
|
||||
*/
|
||||
@Override
|
||||
@Transactional
|
||||
public void deleteId(Long id){
|
||||
actionLogRepository.deleteById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 清空日志
|
||||
*/
|
||||
@Override
|
||||
@Transactional
|
||||
public void emptyLog(){
|
||||
actionLogRepository.deleteAll();
|
||||
}
|
||||
}
|
||||
+128
@@ -0,0 +1,128 @@
|
||||
package com.cwhelp.modules.system.service.impl;
|
||||
|
||||
import com.cwhelp.common.enums.ResultEnum;
|
||||
import com.cwhelp.common.enums.StatusEnum;
|
||||
import com.cwhelp.common.exception.ResultException;
|
||||
import com.cwhelp.modules.system.domain.Dept;
|
||||
import com.cwhelp.modules.system.domain.User;
|
||||
import com.cwhelp.modules.system.repository.DeptRepository;
|
||||
import com.cwhelp.modules.system.repository.UserRepository;
|
||||
import com.cwhelp.modules.system.service.DeptService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.data.domain.Example;
|
||||
import org.springframework.data.domain.Sort;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import java.util.HashSet;
|
||||
import java.util.List;
|
||||
import java.util.Set;
|
||||
|
||||
/**
|
||||
* @author yan.y
|
||||
*/
|
||||
@Service
|
||||
public class DeptServiceImpl implements DeptService {
|
||||
|
||||
@Autowired
|
||||
private DeptRepository deptRepository;
|
||||
|
||||
@Autowired
|
||||
private UserRepository userRepository;
|
||||
|
||||
/**
|
||||
* 根据部门管理ID查询部门管理数据
|
||||
* @param id 部门管理ID
|
||||
*/
|
||||
@Override
|
||||
@Transactional
|
||||
public Dept getById(Long id) {
|
||||
return deptRepository.findById(id).orElse(null);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取部门列表数据
|
||||
* @param example 查询实例
|
||||
* @param sort 排序对象
|
||||
*/
|
||||
@Override
|
||||
public List<Dept> getListByExample(Example<Dept> example, Sort sort) {
|
||||
return deptRepository.findAll(example, sort);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取排序最大值
|
||||
* @param pid 父菜单ID
|
||||
*/
|
||||
@Override
|
||||
public Integer getSortMax(Long pid){
|
||||
return deptRepository.findSortMax(pid);
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据父级部门ID获取本级全部部门
|
||||
* @param pid 父部门ID
|
||||
* @param notId 需要排除的部门ID
|
||||
*/
|
||||
@Override
|
||||
public List<Dept> getListByPid(Long pid, Long notId){
|
||||
Sort sort = new Sort(Sort.Direction.ASC, "sort");
|
||||
return deptRepository.findByPidAndIdNot(sort, pid, notId);
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据ID查找子孙部门
|
||||
* @param id [id]形式
|
||||
*/
|
||||
@Override
|
||||
public List<Dept> getListByPidLikeOk(Long id){
|
||||
return deptRepository.findByPidsLikeAndStatus("%["+id+"]%", StatusEnum.OK.getCode());
|
||||
}
|
||||
|
||||
/**
|
||||
* 保存部门管理
|
||||
* @param dept 部门管理实体类
|
||||
*/
|
||||
@Override
|
||||
public Dept save(Dept dept){
|
||||
return deptRepository.save(dept);
|
||||
}
|
||||
|
||||
/**
|
||||
* 保存多个部门
|
||||
* @param deptList 部门实体类列表
|
||||
*/
|
||||
@Override
|
||||
public List<Dept> save(List<Dept> deptList){
|
||||
return deptRepository.saveAll(deptList);
|
||||
}
|
||||
|
||||
/**
|
||||
* 状态(启用,冻结,删除)/批量状态处理
|
||||
*/
|
||||
@Override
|
||||
@Transactional
|
||||
public Boolean updateStatus(StatusEnum statusEnum, List<Long> ids){
|
||||
// 获取与之关联的所有部门
|
||||
Set<Dept> treeDepts = new HashSet<>();
|
||||
List<Dept> depts = deptRepository.findByIdIn(ids);
|
||||
depts.forEach(dept -> {
|
||||
treeDepts.add(dept);
|
||||
treeDepts.addAll(deptRepository.findByPidsLikeAndStatus("%[" + dept.getId() + "]%", dept.getStatus()));
|
||||
});
|
||||
|
||||
treeDepts.forEach(dept -> {
|
||||
if(statusEnum == StatusEnum.DELETE){
|
||||
List<User> Depts = userRepository.findByDept(dept);
|
||||
if(Depts.size() > 0){
|
||||
throw new ResultException(ResultEnum.DEPT_EXIST_USER);
|
||||
}
|
||||
}
|
||||
// 更新关联的所有部门状态
|
||||
dept.setStatus(statusEnum.getCode());
|
||||
});
|
||||
|
||||
return treeDepts.size() > 0;
|
||||
}
|
||||
}
|
||||
|
||||
+86
@@ -0,0 +1,86 @@
|
||||
package com.cwhelp.modules.system.service.impl;
|
||||
|
||||
import com.cwhelp.common.enums.StatusEnum;
|
||||
import com.cwhelp.common.data.PageSort;
|
||||
import com.cwhelp.modules.system.domain.Dict;
|
||||
import com.cwhelp.modules.system.repository.DictRepository;
|
||||
import com.cwhelp.modules.system.service.DictService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.data.domain.Example;
|
||||
import org.springframework.data.domain.Page;
|
||||
import org.springframework.data.domain.PageRequest;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author yan.y
|
||||
*/
|
||||
@Service
|
||||
public class DictServiceImpl implements DictService {
|
||||
|
||||
@Autowired
|
||||
private DictRepository dictRepository;
|
||||
|
||||
/**
|
||||
* 根据字典ID查询字典数据
|
||||
* @param id 字典ID
|
||||
*/
|
||||
@Override
|
||||
@Transactional
|
||||
public Dict getById(Long id) {
|
||||
return dictRepository.findById(id).orElse(null);
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据字典标识获取字典数据
|
||||
* @param name 字典标识
|
||||
*/
|
||||
@Override
|
||||
public Dict getByNameOk(String name){
|
||||
return dictRepository.findByNameAndStatus(name, StatusEnum.OK.getCode());
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取分页列表数据
|
||||
* @param example 查询实例
|
||||
* @return 返回分页数据
|
||||
*/
|
||||
@Override
|
||||
public Page<Dict> getPageList(Example<Dict> example) {
|
||||
// 创建分页对象
|
||||
PageRequest page = PageSort.pageRequest();
|
||||
return dictRepository.findAll(example, page);
|
||||
}
|
||||
|
||||
/**
|
||||
* 字典标识是否重复
|
||||
* @param dict 字典实体类
|
||||
*/
|
||||
@Override
|
||||
public boolean repeatByName(Dict dict) {
|
||||
Long id = dict.getId() != null ? dict.getId() : Long.MIN_VALUE;
|
||||
return dictRepository.findByNameAndIdNot(dict.getName(), id) != null;
|
||||
}
|
||||
|
||||
/**
|
||||
* 保存字典
|
||||
* @param dict 字典实体类
|
||||
*/
|
||||
@Override
|
||||
public Dict save(Dict dict){
|
||||
return dictRepository.save(dict);
|
||||
}
|
||||
|
||||
/**
|
||||
* 状态(启用,冻结,删除)/批量状态处理
|
||||
*/
|
||||
@Override
|
||||
@Transactional
|
||||
public Boolean updateStatus(StatusEnum statusEnum, List<Long> idList){
|
||||
return dictRepository.updateStatus(statusEnum.getCode(),idList) > 0;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
+144
@@ -0,0 +1,144 @@
|
||||
package com.cwhelp.modules.system.service.impl;
|
||||
|
||||
import com.cwhelp.common.enums.StatusEnum;
|
||||
import com.cwhelp.modules.system.domain.Menu;
|
||||
import com.cwhelp.modules.system.repository.MenuRepository;
|
||||
import com.cwhelp.modules.system.service.MenuService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.data.domain.Example;
|
||||
import org.springframework.data.domain.Sort;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import java.util.HashSet;
|
||||
import java.util.List;
|
||||
import java.util.Set;
|
||||
|
||||
/**
|
||||
* @author yan.y
|
||||
*/
|
||||
@Service
|
||||
public class MenuServiceImpl implements MenuService {
|
||||
|
||||
@Autowired
|
||||
private MenuRepository menuRepository;
|
||||
|
||||
/**
|
||||
* 根据菜单ID查询菜单数据
|
||||
* @param id 菜单ID
|
||||
*/
|
||||
@Override
|
||||
@Transactional
|
||||
public Menu getById(Long id) {
|
||||
if (id == 0L){
|
||||
return new Menu(id, "顶级菜单", "");
|
||||
}
|
||||
return menuRepository.findById(id).orElse(null);
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据菜单url查询菜单数据
|
||||
* @param url 菜单url
|
||||
*/
|
||||
@Override
|
||||
@Transactional
|
||||
public Menu getByUrl(String url){
|
||||
return menuRepository.findByUrl(url);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取菜单列表数据
|
||||
* @param example 查询实例
|
||||
* @param sort 排序对象
|
||||
*/
|
||||
@Override
|
||||
public List<Menu> getListByExample(Example<Menu> example, Sort sort) {
|
||||
return menuRepository.findAll(example, sort);
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据菜单对象的Example判断是否存在
|
||||
* @param menu 菜单对象
|
||||
*/
|
||||
@Override
|
||||
public Menu getByMenuToExample(Menu menu) {
|
||||
return menuRepository.findOne(Example.of(menu)).orElse(null);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取菜单列表数据
|
||||
*/
|
||||
@Override
|
||||
public List<Menu> getListBySortOk() {
|
||||
Sort sort = new Sort(Sort.Direction.ASC, "type", "sort");
|
||||
return menuRepository.findAllByStatus(sort, StatusEnum.OK.getCode());
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取排序最大值
|
||||
* @param pid 父菜单ID
|
||||
*/
|
||||
@Override
|
||||
public Integer getSortMax(Long pid){
|
||||
return menuRepository.findSortMax(pid);
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据父级菜单ID获取本级全部菜单
|
||||
* @param pid 父菜单ID
|
||||
* @param notId 需要排除的菜单ID
|
||||
*/
|
||||
@Override
|
||||
public List<Menu> getListByPid(Long pid, Long notId){
|
||||
Sort sort = new Sort(Sort.Direction.ASC, "sort");
|
||||
return menuRepository.findByPidAndIdNot(sort, pid, notId);
|
||||
}
|
||||
|
||||
/**
|
||||
* 保存菜单
|
||||
* @param menu 菜单实体类
|
||||
*/
|
||||
@Override
|
||||
public Menu save(Menu menu){
|
||||
return menuRepository.save(menu);
|
||||
}
|
||||
|
||||
/**
|
||||
* 保存多个菜单
|
||||
* @param menuList 菜单实体类列表
|
||||
*/
|
||||
@Override
|
||||
public List<Menu> save(List<Menu> menuList){
|
||||
return menuRepository.saveAll(menuList);
|
||||
}
|
||||
|
||||
/**
|
||||
* 状态(启用,冻结,删除)/批量状态处理
|
||||
*/
|
||||
@Override
|
||||
@Transactional
|
||||
public Boolean updateStatus(StatusEnum statusEnum, List<Long> ids){
|
||||
// 获取与之关联的所有菜单
|
||||
Set<Menu> treeMenus = new HashSet<>();
|
||||
List<Menu> menus = menuRepository.findByIdIn(ids);
|
||||
menus.forEach(menu -> {
|
||||
treeMenus.add(menu);
|
||||
treeMenus.addAll(menuRepository.findByPidsLikeAndStatus("%[" + menu.getId() + "]%", menu.getStatus()));
|
||||
});
|
||||
|
||||
treeMenus.forEach(menu -> {
|
||||
// 删除菜单状态时,同时更新角色的权限
|
||||
if(statusEnum == StatusEnum.DELETE){
|
||||
/*menu.getRoles().forEach(role -> {
|
||||
role.getMenus().remove(menu);
|
||||
});*/
|
||||
// 非规范的Jpa操作,直接采用SQL语句
|
||||
menuRepository.cancelRoleJoin(menu.getId());
|
||||
}
|
||||
// 更新关联的所有菜单状态
|
||||
menu.setStatus(statusEnum.getCode());
|
||||
});
|
||||
|
||||
return treeMenus.size() > 0;
|
||||
}
|
||||
}
|
||||
+119
@@ -0,0 +1,119 @@
|
||||
package com.cwhelp.modules.system.service.impl;
|
||||
|
||||
import com.cwhelp.common.data.PageSort;
|
||||
import com.cwhelp.common.enums.StatusEnum;
|
||||
import com.cwhelp.modules.system.domain.Role;
|
||||
import com.cwhelp.modules.system.repository.RoleRepository;
|
||||
import com.cwhelp.modules.system.service.RoleService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.data.domain.Example;
|
||||
import org.springframework.data.domain.Page;
|
||||
import org.springframework.data.domain.PageRequest;
|
||||
import org.springframework.data.domain.Sort;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Set;
|
||||
|
||||
/**
|
||||
* @author yan.y
|
||||
*/
|
||||
@Service
|
||||
public class RoleServiceImpl implements RoleService {
|
||||
|
||||
@Autowired
|
||||
private RoleRepository roleRepository;
|
||||
|
||||
/**
|
||||
* 获取用户角色列表
|
||||
* @param id 用户ID
|
||||
*/
|
||||
@Override
|
||||
@Transactional
|
||||
public Set<Role> getUserOkRoleList(Long id) {
|
||||
Byte status = StatusEnum.OK.getCode();
|
||||
return roleRepository.findByUsers_IdAndStatus(id, status);
|
||||
}
|
||||
|
||||
/**
|
||||
* 判断指定的用户是否存在角色
|
||||
* @param id 用户ID
|
||||
*/
|
||||
@Override
|
||||
public Boolean existsUserOk(Long id) {
|
||||
Byte status = StatusEnum.OK.getCode();
|
||||
return roleRepository.existsByUsers_IdAndStatus(id, status);
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据角色ID查询角色数据
|
||||
* @param id 角色ID
|
||||
*/
|
||||
@Override
|
||||
@Transactional
|
||||
public Role getById(Long id) {
|
||||
return roleRepository.findById(id).orElse(null);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取分页列表数据
|
||||
* @param example 查询实例
|
||||
* @return 返回分页数据
|
||||
*/
|
||||
@Override
|
||||
public Page<Role> getPageList(Example<Role> example) {
|
||||
// 创建分页对象
|
||||
PageRequest page = PageSort.pageRequest(Sort.Direction.ASC);
|
||||
return roleRepository.findAll(example, page);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取角色列表数据
|
||||
* @param sort 排序对象
|
||||
*/
|
||||
@Override
|
||||
public List<Role> getListBySortOk(Sort sort) {
|
||||
return roleRepository.findAllByStatus(sort, StatusEnum.OK.getCode());
|
||||
}
|
||||
|
||||
/**
|
||||
* 角色标识是否重复
|
||||
* @param role 角色实体类
|
||||
*/
|
||||
@Override
|
||||
public boolean repeatByName(Role role) {
|
||||
Long id = role.getId() != null ? role.getId() : Long.MIN_VALUE;
|
||||
return roleRepository.findByNameAndIdNot(role.getName(), id) != null;
|
||||
}
|
||||
|
||||
/**
|
||||
* 保存角色
|
||||
* @param role 角色实体类
|
||||
*/
|
||||
@Override
|
||||
public Role save(Role role){
|
||||
return roleRepository.save(role);
|
||||
}
|
||||
|
||||
/**
|
||||
* 状态(启用,冻结,删除)/批量状态处理
|
||||
*/
|
||||
@Override
|
||||
@Transactional
|
||||
public Boolean updateStatus(StatusEnum statusEnum, List<Long> ids){
|
||||
// 删除角色时取消与角色和菜单的关联
|
||||
if(statusEnum == StatusEnum.DELETE){
|
||||
/*List<Role> roles = roleRepository.findByIdIn(ids);
|
||||
roles.forEach(role -> {
|
||||
role.setMenus(null);
|
||||
role.getUsers().forEach(user -> user.getRoles().remove(role));
|
||||
});*/
|
||||
|
||||
// 非规范的Jpa操作,直接采用SQL语句
|
||||
roleRepository.cancelUserJoin(ids);
|
||||
roleRepository.cancelMenuJoin(ids);
|
||||
}
|
||||
return roleRepository.updateStatus(statusEnum.getCode(), ids) > 0;
|
||||
}
|
||||
}
|
||||
+35
@@ -0,0 +1,35 @@
|
||||
package com.cwhelp.modules.system.service.impl;
|
||||
|
||||
import com.cwhelp.modules.system.domain.Upload;
|
||||
import com.cwhelp.modules.system.repository.UploadRepository;
|
||||
import com.cwhelp.modules.system.service.UploadService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
/**
|
||||
* @author yan.y
|
||||
*/
|
||||
@Service
|
||||
public class UploadServiceImpl implements UploadService {
|
||||
|
||||
@Autowired
|
||||
private UploadRepository uploadRepository;
|
||||
|
||||
/**
|
||||
* 获取文件sha1值的记录
|
||||
*/
|
||||
@Override
|
||||
public Upload getBySha1(String sha1) {
|
||||
return uploadRepository.findBySha1(sha1);
|
||||
}
|
||||
|
||||
/**
|
||||
* 保存文件上传
|
||||
* @param upload 文件上传实体类
|
||||
*/
|
||||
@Override
|
||||
public Upload save(Upload upload){
|
||||
return uploadRepository.save(upload);
|
||||
}
|
||||
}
|
||||
|
||||
+147
@@ -0,0 +1,147 @@
|
||||
package com.cwhelp.modules.system.service.impl;
|
||||
|
||||
import com.cwhelp.common.data.PageSort;
|
||||
import com.cwhelp.common.enums.StatusEnum;
|
||||
import com.cwhelp.modules.system.domain.Dept;
|
||||
import com.cwhelp.modules.system.domain.User;
|
||||
import com.cwhelp.modules.system.repository.UserRepository;
|
||||
import com.cwhelp.modules.system.service.DeptService;
|
||||
import com.cwhelp.modules.system.service.UserService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.data.domain.Page;
|
||||
import org.springframework.data.domain.PageRequest;
|
||||
import org.springframework.data.domain.Sort;
|
||||
import org.springframework.data.jpa.domain.Specification;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import javax.persistence.criteria.*;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author yan.y
|
||||
*/
|
||||
@Service
|
||||
public class UserServiceImpl implements UserService {
|
||||
|
||||
@Autowired
|
||||
private UserRepository userRepository;
|
||||
|
||||
@Autowired
|
||||
private DeptService deptService;
|
||||
|
||||
/**
|
||||
* 根据用户名查询用户数据
|
||||
* @param username 用户名
|
||||
* @return 用户数据
|
||||
*/
|
||||
@Override
|
||||
public User getByName(String username) {
|
||||
return userRepository.findByUsername(username);
|
||||
}
|
||||
|
||||
/**
|
||||
* 用户名是否存在
|
||||
* @param user 用户对象
|
||||
* @return 用户数据
|
||||
*/
|
||||
@Override
|
||||
public Boolean repeatByUsername(User user) {
|
||||
Long id = user.getId() != null ? user.getId() : Long.MIN_VALUE;
|
||||
return userRepository.findByUsernameAndIdNot(user.getUsername(), id) != null;
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据用户ID获取用户信息
|
||||
* @param id 用户ID
|
||||
*/
|
||||
@Override
|
||||
public User getById(Long id) {
|
||||
return userRepository.findById(id).orElse(null);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取分页列表数据
|
||||
* @param user 实体对象
|
||||
* @return 返回分页数据
|
||||
*/
|
||||
@Override
|
||||
@Transactional
|
||||
public Page<User> getPageList(User user) {
|
||||
// 创建分页对象
|
||||
PageRequest page = PageSort.pageRequest(Sort.Direction.ASC);
|
||||
|
||||
// 使用Specification复杂查询
|
||||
return userRepository.findAll(new Specification<User>(){
|
||||
|
||||
@Override
|
||||
public Predicate toPredicate(Root<User> root, CriteriaQuery<?> query, CriteriaBuilder cb) {
|
||||
List<Predicate> preList = new ArrayList<>();
|
||||
if(user.getId() != null){
|
||||
preList.add(cb.equal(root.get("id").as(Long.class), user.getId()));
|
||||
}
|
||||
if(user.getUsername() != null){
|
||||
preList.add(cb.equal(root.get("username").as(String.class), user.getUsername()));
|
||||
}
|
||||
if(user.getNickname() != null){
|
||||
preList.add(cb.like(root.get("nickname").as(String.class), "%"+ user.getNickname() + "%"));
|
||||
}
|
||||
if(user.getDept() != null){
|
||||
// 联级查询部门
|
||||
Dept dept = user.getDept();
|
||||
List<Long> deptIn = new ArrayList<>();
|
||||
deptIn.add(dept.getId());
|
||||
List<Dept> deptList = deptService.getListByPidLikeOk(dept.getId());
|
||||
deptList.forEach(item -> deptIn.add(item.getId()));
|
||||
|
||||
Join<User, Dept> join = root.join("dept", JoinType.INNER);
|
||||
CriteriaBuilder.In<Long> in = cb.in(join.get("id").as(Long.class));
|
||||
deptIn.forEach(in::value);
|
||||
preList.add(in);
|
||||
}
|
||||
|
||||
// 数据状态
|
||||
if(user.getStatus() != null){
|
||||
preList.add(cb.equal(root.get("status").as(Byte.class), user.getStatus()));
|
||||
}
|
||||
|
||||
Predicate[] pres = new Predicate[preList.size()];
|
||||
return query.where(preList.toArray(pres)).getRestriction();
|
||||
}
|
||||
|
||||
}, page);
|
||||
}
|
||||
|
||||
/**
|
||||
* 保存用户
|
||||
* @param user 用户实体类
|
||||
*/
|
||||
@Override
|
||||
public User save(User user){
|
||||
return userRepository.save(user);
|
||||
}
|
||||
|
||||
/**
|
||||
* 保存用户列表
|
||||
* @param userList 用户实体类
|
||||
*/
|
||||
@Override
|
||||
@Transactional
|
||||
public List<User> save(List<User> userList){
|
||||
return userRepository.saveAll(userList);
|
||||
}
|
||||
|
||||
/**
|
||||
* 状态(启用,冻结,删除)/批量状态处理
|
||||
*/
|
||||
@Override
|
||||
@Transactional
|
||||
public Boolean updateStatus(StatusEnum statusEnum, List<Long> ids){
|
||||
// 联级删除与角色之间的关联
|
||||
if(statusEnum == StatusEnum.DELETE){
|
||||
return userRepository.deleteByIdIn(ids) > 0;
|
||||
}
|
||||
return userRepository.updateStatus(statusEnum.getCode(), ids) > 0;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,117 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<module org.jetbrains.idea.maven.project.MavenProjectsManager.isMavenModule="true" type="JAVA_MODULE" version="4">
|
||||
<component name="FacetManager">
|
||||
<facet type="Spring" name="Spring">
|
||||
<configuration />
|
||||
</facet>
|
||||
<facet type="web" name="Web">
|
||||
<configuration>
|
||||
<webroots />
|
||||
</configuration>
|
||||
</facet>
|
||||
</component>
|
||||
<component name="NewModuleRootManager" LANGUAGE_LEVEL="JDK_1_8">
|
||||
<output url="file://$MODULE_DIR$/target/classes" />
|
||||
<output-test url="file://$MODULE_DIR$/target/test-classes" />
|
||||
<content url="file://$MODULE_DIR$">
|
||||
<sourceFolder url="file://$MODULE_DIR$/src/main/java" isTestSource="false" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/target" />
|
||||
</content>
|
||||
<orderEntry type="inheritedJdk" />
|
||||
<orderEntry type="sourceFolder" forTests="false" />
|
||||
<orderEntry type="module" module-name="common" />
|
||||
<orderEntry type="module" module-name="excel" />
|
||||
<orderEntry type="library" name="Maven: org.apache.poi:poi-ooxml:4.0.0" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.apache.poi:poi:4.0.0" level="project" />
|
||||
<orderEntry type="library" name="Maven: commons-codec:commons-codec:1.11" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.apache.commons:commons-collections4:4.2" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.apache.poi:poi-ooxml-schemas:4.0.0" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.apache.xmlbeans:xmlbeans:3.0.1" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.apache.commons:commons-compress:1.18" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.github.virtuald:curvesapi:1.04" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-web:2.1.4.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter:2.1.4.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-logging:2.1.4.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: ch.qos.logback:logback-classic:1.2.3" level="project" />
|
||||
<orderEntry type="library" name="Maven: ch.qos.logback:logback-core:1.2.3" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.apache.logging.log4j:log4j-to-slf4j:2.11.2" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.apache.logging.log4j:log4j-api:2.11.2" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.slf4j:jul-to-slf4j:1.7.26" level="project" />
|
||||
<orderEntry type="library" name="Maven: javax.annotation:javax.annotation-api:1.3.2" level="project" />
|
||||
<orderEntry type="library" scope="RUNTIME" name="Maven: org.yaml:snakeyaml:1.23" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-json:2.1.4.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.fasterxml.jackson.core:jackson-databind:2.9.8" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.fasterxml.jackson.core:jackson-annotations:2.9.0" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.fasterxml.jackson.core:jackson-core:2.9.8" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.fasterxml.jackson.datatype:jackson-datatype-jdk8:2.9.8" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.fasterxml.jackson.datatype:jackson-datatype-jsr310:2.9.8" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.fasterxml.jackson.module:jackson-module-parameter-names:2.9.8" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-tomcat:2.1.4.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.apache.tomcat.embed:tomcat-embed-core:9.0.17" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.apache.tomcat.embed:tomcat-embed-el:9.0.17" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.apache.tomcat.embed:tomcat-embed-websocket:9.0.17" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.hibernate.validator:hibernate-validator:6.0.16.Final" level="project" />
|
||||
<orderEntry type="library" name="Maven: javax.validation:validation-api:2.0.1.Final" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.jboss.logging:jboss-logging:3.3.2.Final" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.fasterxml:classmate:1.4.0" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework:spring-web:5.1.6.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework:spring-beans:5.1.6.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework:spring-webmvc:5.1.6.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework:spring-aop:5.1.6.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework:spring-context:5.1.6.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework:spring-expression:5.1.6.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-data-jpa:2.1.4.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-aop:2.1.4.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.aspectj:aspectjweaver:1.9.2" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-jdbc:2.1.4.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.zaxxer:HikariCP:3.2.0" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework:spring-jdbc:5.1.6.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: javax.transaction:javax.transaction-api:1.3" level="project" />
|
||||
<orderEntry type="library" name="Maven: javax.xml.bind:jaxb-api:2.3.1" level="project" />
|
||||
<orderEntry type="library" name="Maven: javax.activation:javax.activation-api:1.2.0" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.hibernate:hibernate-core:5.3.9.Final" level="project" />
|
||||
<orderEntry type="library" name="Maven: javax.persistence:javax.persistence-api:2.2" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.javassist:javassist:3.23.1-GA" level="project" />
|
||||
<orderEntry type="library" name="Maven: net.bytebuddy:byte-buddy:1.9.12" level="project" />
|
||||
<orderEntry type="library" name="Maven: antlr:antlr:2.7.7" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.jboss:jandex:2.0.5.Final" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.dom4j:dom4j:2.1.1" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.hibernate.common:hibernate-commons-annotations:5.0.4.Final" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework.data:spring-data-jpa:2.1.6.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework.data:spring-data-commons:2.1.6.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework:spring-orm:5.1.6.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework:spring-tx:5.1.6.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework:spring-aspects:5.1.6.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-configuration-processor:2.1.4.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-cache:2.1.4.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework:spring-context-support:5.1.6.RELEASE" level="project" />
|
||||
<orderEntry type="library" scope="RUNTIME" name="Maven: org.springframework.boot:spring-boot-devtools:2.1.4.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework.boot:spring-boot:2.1.4.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-autoconfigure:2.1.4.RELEASE" level="project" />
|
||||
<orderEntry type="library" scope="TEST" name="Maven: org.springframework.boot:spring-boot-starter-test:2.1.4.RELEASE" level="project" />
|
||||
<orderEntry type="library" scope="TEST" name="Maven: org.springframework.boot:spring-boot-test:2.1.4.RELEASE" level="project" />
|
||||
<orderEntry type="library" scope="TEST" name="Maven: org.springframework.boot:spring-boot-test-autoconfigure:2.1.4.RELEASE" level="project" />
|
||||
<orderEntry type="library" scope="TEST" name="Maven: com.jayway.jsonpath:json-path:2.4.0" level="project" />
|
||||
<orderEntry type="library" scope="TEST" name="Maven: net.minidev:json-smart:2.3" level="project" />
|
||||
<orderEntry type="library" scope="TEST" name="Maven: net.minidev:accessors-smart:1.2" level="project" />
|
||||
<orderEntry type="library" scope="TEST" name="Maven: org.ow2.asm:asm:5.0.4" level="project" />
|
||||
<orderEntry type="library" scope="TEST" name="Maven: junit:junit:4.12" level="project" />
|
||||
<orderEntry type="library" scope="TEST" name="Maven: org.assertj:assertj-core:3.11.1" level="project" />
|
||||
<orderEntry type="library" scope="TEST" name="Maven: org.mockito:mockito-core:2.23.4" level="project" />
|
||||
<orderEntry type="library" scope="TEST" name="Maven: net.bytebuddy:byte-buddy-agent:1.9.12" level="project" />
|
||||
<orderEntry type="library" scope="TEST" name="Maven: org.objenesis:objenesis:2.6" level="project" />
|
||||
<orderEntry type="library" scope="TEST" name="Maven: org.hamcrest:hamcrest-core:1.3" level="project" />
|
||||
<orderEntry type="library" scope="TEST" name="Maven: org.hamcrest:hamcrest-library:1.3" level="project" />
|
||||
<orderEntry type="library" scope="TEST" name="Maven: org.skyscreamer:jsonassert:1.5.0" level="project" />
|
||||
<orderEntry type="library" scope="TEST" name="Maven: com.vaadin.external.google:android-json:0.0.20131108.vaadin1" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework:spring-core:5.1.6.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework:spring-jcl:5.1.6.RELEASE" level="project" />
|
||||
<orderEntry type="library" scope="TEST" name="Maven: org.springframework:spring-test:5.1.6.RELEASE" level="project" />
|
||||
<orderEntry type="library" scope="TEST" name="Maven: org.xmlunit:xmlunit-core:2.6.2" level="project" />
|
||||
<orderEntry type="library" scope="RUNTIME" name="Maven: mysql:mysql-connector-java:5.1.46" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.projectlombok:lombok:1.18.2" level="project" />
|
||||
<orderEntry type="library" name="Maven: net.sf.ehcache:ehcache:2.10.5" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.slf4j:slf4j-api:1.7.26" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.jsoup:jsoup:1.11.3" level="project" />
|
||||
</component>
|
||||
</module>
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
Reference in New Issue
Block a user