feat: 后台管理模块
This commit is contained in:
54
schisandra-cloud-storage-admin/pom.xml
Normal file
54
schisandra-cloud-storage-admin/pom.xml
Normal file
@@ -0,0 +1,54 @@
|
|||||||
|
<?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.schisandra</groupId>
|
||||||
|
<artifactId>schisandra-cloud-storage-admin</artifactId>
|
||||||
|
<version>1.0-SNAPSHOT</version>
|
||||||
|
<packaging>pom</packaging>
|
||||||
|
<name>schisandra-cloud-storage-admin</name>
|
||||||
|
<modules>
|
||||||
|
<module>schisandra-cloud-storage-admin-api</module>
|
||||||
|
<module>schisandra-cloud-storage-admin-application</module>
|
||||||
|
<module>schisandra-cloud-storage-admin-common</module>
|
||||||
|
<module>schisandra-cloud-storage-admin-domain</module>
|
||||||
|
<module>schisandra-cloud-storage-admin-infra</module>
|
||||||
|
<module>schisandra-cloud-storage-admin-starter</module>
|
||||||
|
</modules>
|
||||||
|
<dependencies>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.springframework.boot</groupId>
|
||||||
|
<artifactId>spring-boot-dependencies</artifactId>
|
||||||
|
<version>2.4.2</version>
|
||||||
|
<type>pom</type>
|
||||||
|
<scope>import</scope>
|
||||||
|
</dependency>
|
||||||
|
</dependencies>
|
||||||
|
<properties>
|
||||||
|
<maven.compiler.source>8</maven.compiler.source>
|
||||||
|
<maven.compiler.target>8</maven.compiler.target>
|
||||||
|
<java.version>1.8</java.version>
|
||||||
|
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||||
|
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
|
||||||
|
<spring-boot.version>2.4.2</spring-boot.version>
|
||||||
|
<spring-cloud-alibaba.version>2021.1</spring-cloud-alibaba.version>
|
||||||
|
<spring-cloud.version>2020.0.6</spring-cloud.version>
|
||||||
|
</properties>
|
||||||
|
<repositories>
|
||||||
|
<repository>
|
||||||
|
<id>central</id>
|
||||||
|
<name>aliyun maven</name>
|
||||||
|
<url>http://maven.aliyun.com/nexus/content/groups/public/</url>
|
||||||
|
<layout>default</layout>
|
||||||
|
<releases>
|
||||||
|
<enabled>true</enabled>
|
||||||
|
</releases>
|
||||||
|
<snapshots>
|
||||||
|
<enabled>true</enabled>
|
||||||
|
</snapshots>
|
||||||
|
</repository>
|
||||||
|
</repositories>
|
||||||
|
|
||||||
|
</project>
|
@@ -0,0 +1,20 @@
|
|||||||
|
<?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>
|
||||||
|
<parent>
|
||||||
|
<groupId>com.schisandra</groupId>
|
||||||
|
<artifactId>schisandra-cloud-storage-admin</artifactId>
|
||||||
|
<version>1.0-SNAPSHOT</version>
|
||||||
|
</parent>
|
||||||
|
|
||||||
|
<artifactId>schisandra-cloud-storage-admin-api</artifactId>
|
||||||
|
|
||||||
|
<properties>
|
||||||
|
<maven.compiler.source>8</maven.compiler.source>
|
||||||
|
<maven.compiler.target>8</maven.compiler.target>
|
||||||
|
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||||
|
</properties>
|
||||||
|
|
||||||
|
</project>
|
@@ -0,0 +1,26 @@
|
|||||||
|
<?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>
|
||||||
|
<parent>
|
||||||
|
<groupId>com.schisandra</groupId>
|
||||||
|
<artifactId>schisandra-cloud-storage-admin</artifactId>
|
||||||
|
<version>1.0-SNAPSHOT</version>
|
||||||
|
</parent>
|
||||||
|
|
||||||
|
<artifactId>schisandra-cloud-storage-admin-application</artifactId>
|
||||||
|
<packaging>pom</packaging>
|
||||||
|
<modules>
|
||||||
|
<module>schisandra-cloud-storage-admin-application-controller</module>
|
||||||
|
<module>schisandra-cloud-storage-admin-application-job</module>
|
||||||
|
<module>schisandra-cloud-storage-admin-application-mq</module>
|
||||||
|
</modules>
|
||||||
|
<name>schisandra-cloud-storage-admin-application</name>
|
||||||
|
<properties>
|
||||||
|
<maven.compiler.source>8</maven.compiler.source>
|
||||||
|
<maven.compiler.target>8</maven.compiler.target>
|
||||||
|
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||||
|
</properties>
|
||||||
|
|
||||||
|
</project>
|
@@ -0,0 +1,77 @@
|
|||||||
|
<?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>
|
||||||
|
<parent>
|
||||||
|
<groupId>com.schisandra.admin</groupId>
|
||||||
|
<artifactId>schisandra-cloud-storage-admin-application</artifactId>
|
||||||
|
<version>1.0-SNAPSHOT</version>
|
||||||
|
</parent>
|
||||||
|
|
||||||
|
<artifactId>schisandra-cloud-storage-admin-application-controller</artifactId>
|
||||||
|
<name>schisandra-cloud-storage-admin-application-controller</name>
|
||||||
|
<properties>
|
||||||
|
<maven.compiler.source>8</maven.compiler.source>
|
||||||
|
<maven.compiler.target>8</maven.compiler.target>
|
||||||
|
<maven.compiler.compilerVersion>1.8</maven.compiler.compilerVersion>
|
||||||
|
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||||
|
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
|
||||||
|
</properties>
|
||||||
|
<dependencies>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.springframework.boot</groupId>
|
||||||
|
<artifactId>spring-boot-starter-web</artifactId>
|
||||||
|
<version>2.4.2</version>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.schisandra</groupId>
|
||||||
|
<artifactId>schisandra-cloud-storage-auth-api</artifactId>
|
||||||
|
<version>1.0-SNAPSHOT</version>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.schisandra</groupId>
|
||||||
|
<artifactId>schisandra-cloud-storage-oss-api</artifactId>
|
||||||
|
<version>1.0-SNAPSHOT</version>
|
||||||
|
</dependency>
|
||||||
|
</dependencies>
|
||||||
|
<build>
|
||||||
|
<plugins>
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
|
<artifactId>maven-compiler-plugin</artifactId>
|
||||||
|
<version>3.13.0</version>
|
||||||
|
<configuration>
|
||||||
|
<source>1.8</source>
|
||||||
|
<target>1.8</target>
|
||||||
|
<encoding>UTF-8</encoding>
|
||||||
|
<annotationProcessorPaths>
|
||||||
|
<path>
|
||||||
|
<groupId>org.projectlombok</groupId>
|
||||||
|
<artifactId>lombok</artifactId>
|
||||||
|
<version>1.18.24</version>
|
||||||
|
</path>
|
||||||
|
<!-- 必须要加, 否则生成不了 MapperImpl 实现类 -->
|
||||||
|
<path>
|
||||||
|
<groupId>org.mapstruct</groupId>
|
||||||
|
<artifactId>mapstruct-processor</artifactId>
|
||||||
|
<version>1.4.2.Final</version>
|
||||||
|
</path>
|
||||||
|
<!-- 如果是 0.1.0 有可能出现生成了maptruct的实现类, 但该类只创建了对象, 没有进行赋值 -->
|
||||||
|
<path>
|
||||||
|
<groupId>org.projectlombok</groupId>
|
||||||
|
<artifactId>lombok-mapstruct-binding</artifactId>
|
||||||
|
<version>0.2.0</version>
|
||||||
|
</path>
|
||||||
|
<path>
|
||||||
|
<groupId>com.mybatis-flex</groupId>
|
||||||
|
<artifactId>mybatis-flex-processor</artifactId>
|
||||||
|
<version>1.9.0</version>
|
||||||
|
</path>
|
||||||
|
</annotationProcessorPaths>
|
||||||
|
</configuration>
|
||||||
|
</plugin>
|
||||||
|
</plugins>
|
||||||
|
</build>
|
||||||
|
</project>
|
@@ -0,0 +1,147 @@
|
|||||||
|
package com.schisandra.admin.application.controller;
|
||||||
|
|
||||||
|
import com.schisandra.auth.api.SchisandraAuthFeignService;
|
||||||
|
import com.schisandra.auth.entity.Result;
|
||||||
|
import com.schisandra.oss.api.SchisandraOssFeignService;
|
||||||
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
import org.springframework.stereotype.Component;
|
||||||
|
import org.springframework.stereotype.Controller;
|
||||||
|
import org.springframework.web.bind.annotation.GetMapping;
|
||||||
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
|
import org.springframework.web.bind.annotation.RestController;
|
||||||
|
|
||||||
|
import javax.annotation.Resource;
|
||||||
|
|
||||||
|
@RestController
|
||||||
|
@Slf4j
|
||||||
|
@RequestMapping("/admin/")
|
||||||
|
public class SchisandraAdminController {
|
||||||
|
@Resource
|
||||||
|
private SchisandraAuthFeignService schisandraSysUserService;
|
||||||
|
|
||||||
|
@Resource
|
||||||
|
SchisandraOssFeignService schisandraOssFeignService;
|
||||||
|
/**
|
||||||
|
* @description: 获取用户信息
|
||||||
|
* @param: []
|
||||||
|
* @return: com.schisandra.auth.entity.Result
|
||||||
|
* @author zlg
|
||||||
|
* @date: 2024/7/17 15:08
|
||||||
|
*/
|
||||||
|
@GetMapping("selectAllUserDetail")
|
||||||
|
public Result selectAllUserDetail(){
|
||||||
|
try {
|
||||||
|
return Result.ok(schisandraSysUserService.getAllUser());
|
||||||
|
}catch (Exception e){
|
||||||
|
return Result.fail("获取用户信息失败");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* @description: 获取角色信息
|
||||||
|
* @param: []
|
||||||
|
* @return: com.schisandra.auth.entity.Result
|
||||||
|
* @author zlg
|
||||||
|
* @date: 2024/7/17 15:08
|
||||||
|
*/
|
||||||
|
@GetMapping("selectRoleDetail")
|
||||||
|
public Result selectRoleDetail(){
|
||||||
|
try {
|
||||||
|
return Result.ok(schisandraSysUserService.selectAllRole());
|
||||||
|
}catch (Exception e){
|
||||||
|
return Result.fail("获取角色信息失败");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* @description: 获取权限信息
|
||||||
|
* @param: []
|
||||||
|
* @return: com.schisandra.auth.entity.Result
|
||||||
|
* @author zlg
|
||||||
|
* @date: 2024/7/17 15:08
|
||||||
|
*/
|
||||||
|
|
||||||
|
@GetMapping("selectPermissionDetail")
|
||||||
|
public Result selectPermissionDetail(){
|
||||||
|
try {
|
||||||
|
return Result.ok(schisandraSysUserService.selectAllPermission());
|
||||||
|
}catch (Exception e){
|
||||||
|
return Result.fail("获取权限信息失败");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* @description: 获取用户社会信息
|
||||||
|
* @param: []
|
||||||
|
* @return: com.schisandra.auth.entity.Result
|
||||||
|
* @author zlg
|
||||||
|
* @date: 2024/7/17 15:13
|
||||||
|
*/
|
||||||
|
@GetMapping("selectSocialDetail")
|
||||||
|
public Result selectSocialUsersDetail(){
|
||||||
|
try {
|
||||||
|
return Result.ok(schisandraSysUserService.getAllSocialUsers());
|
||||||
|
}catch (Exception e){
|
||||||
|
return Result.fail("获取用户社会信息失败");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* @description: 获取阿里云配置信息
|
||||||
|
* @param: []
|
||||||
|
* @return: com.schisandra.auth.entity.Result
|
||||||
|
* @author zlg
|
||||||
|
* @date: 2024/7/17 15:13
|
||||||
|
*/
|
||||||
|
@GetMapping("selectAliConfig")
|
||||||
|
public Result selectAliConfig(){
|
||||||
|
try {
|
||||||
|
return Result.ok(schisandraOssFeignService.returnAliAll());
|
||||||
|
}catch (Exception e){
|
||||||
|
return Result.fail("获取Ali配置信息失败");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* @description: 获取Minio配置信息
|
||||||
|
* @param: []
|
||||||
|
* @return: com.schisandra.auth.entity.Result
|
||||||
|
* @author zlg
|
||||||
|
* @date: 2024/7/17 15:13
|
||||||
|
*/
|
||||||
|
@GetMapping("selectMinioConfig")
|
||||||
|
public Result selectMinioConfig(){
|
||||||
|
try {
|
||||||
|
return Result.ok(schisandraOssFeignService.returnMinioAll());
|
||||||
|
}catch (Exception e){
|
||||||
|
return Result.fail("获取Minio配置信息失败");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* @description: 获取腾讯云配置信息
|
||||||
|
* @param: []
|
||||||
|
* @return: com.schisandra.auth.entity.Result
|
||||||
|
* @author zlg
|
||||||
|
* @date: 2024/7/17 15:13
|
||||||
|
*/
|
||||||
|
@GetMapping("selectTencentConfig")
|
||||||
|
public Result selectTencentConfig(){
|
||||||
|
try {
|
||||||
|
return Result.ok(schisandraOssFeignService.returnTencentAll());
|
||||||
|
}catch (Exception e){
|
||||||
|
return Result.fail("获取Tencent配置信息失败");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* @description: 获取Qiniu配置信息
|
||||||
|
* @param: []
|
||||||
|
* @return: com.schisandra.auth.entity.Result
|
||||||
|
* @author zlg
|
||||||
|
* @date: 2024/7/17 15:13
|
||||||
|
*/
|
||||||
|
@GetMapping("selectQiniuConfig")
|
||||||
|
public Result selectQiniuConfig(){
|
||||||
|
try {
|
||||||
|
return Result.ok(schisandraOssFeignService.returnQiniuAll());
|
||||||
|
}catch (Exception e){
|
||||||
|
return Result.fail("获取Qiniu配置信息失败");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
@@ -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>
|
||||||
|
<parent>
|
||||||
|
<groupId>com.schisandra.admin</groupId>
|
||||||
|
<artifactId>schisandra-cloud-storage-admin-application</artifactId>
|
||||||
|
<version>1.0-SNAPSHOT</version>
|
||||||
|
|
||||||
|
</parent>
|
||||||
|
|
||||||
|
<artifactId>schisandra-cloud-storage-admin-application-job</artifactId>
|
||||||
|
|
||||||
|
<properties>
|
||||||
|
<maven.compiler.source>8</maven.compiler.source>
|
||||||
|
<maven.compiler.target>8</maven.compiler.target>
|
||||||
|
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||||
|
</properties>
|
||||||
|
|
||||||
|
</project>
|
@@ -0,0 +1,20 @@
|
|||||||
|
<?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>
|
||||||
|
<parent>
|
||||||
|
<groupId>com.schisandra.admin</groupId>
|
||||||
|
<artifactId>schisandra-cloud-storage-admin-application</artifactId>
|
||||||
|
<version>1.0-SNAPSHOT</version>
|
||||||
|
</parent>
|
||||||
|
|
||||||
|
<artifactId>schisandra-cloud-storage-admin-application-mq</artifactId>
|
||||||
|
|
||||||
|
<properties>
|
||||||
|
<maven.compiler.source>8</maven.compiler.source>
|
||||||
|
<maven.compiler.target>8</maven.compiler.target>
|
||||||
|
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||||
|
</properties>
|
||||||
|
|
||||||
|
</project>
|
@@ -0,0 +1,20 @@
|
|||||||
|
<?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>
|
||||||
|
<parent>
|
||||||
|
<groupId>com.schisandra</groupId>
|
||||||
|
<artifactId>schisandra-cloud-storage-admin</artifactId>
|
||||||
|
<version>1.0-SNAPSHOT</version>
|
||||||
|
</parent>
|
||||||
|
|
||||||
|
<artifactId>schisandra-cloud-storage-admin-common</artifactId>
|
||||||
|
|
||||||
|
<properties>
|
||||||
|
<maven.compiler.source>8</maven.compiler.source>
|
||||||
|
<maven.compiler.target>8</maven.compiler.target>
|
||||||
|
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||||
|
</properties>
|
||||||
|
|
||||||
|
</project>
|
@@ -0,0 +1,20 @@
|
|||||||
|
<?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>
|
||||||
|
<parent>
|
||||||
|
<groupId>com.schisandra</groupId>
|
||||||
|
<artifactId>schisandra-cloud-storage-admin</artifactId>
|
||||||
|
<version>1.0-SNAPSHOT</version>
|
||||||
|
</parent>
|
||||||
|
|
||||||
|
<artifactId>schisandra-cloud-storage-admin-domain</artifactId>
|
||||||
|
|
||||||
|
<properties>
|
||||||
|
<maven.compiler.source>8</maven.compiler.source>
|
||||||
|
<maven.compiler.target>8</maven.compiler.target>
|
||||||
|
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||||
|
</properties>
|
||||||
|
|
||||||
|
</project>
|
@@ -0,0 +1,56 @@
|
|||||||
|
<?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>
|
||||||
|
<parent>
|
||||||
|
<groupId>com.schisandra</groupId>
|
||||||
|
<artifactId>schisandra-cloud-storage-admin</artifactId>
|
||||||
|
<version>1.0-SNAPSHOT</version>
|
||||||
|
</parent>
|
||||||
|
|
||||||
|
<artifactId>schisandra-cloud-storage-admin-infra</artifactId>
|
||||||
|
|
||||||
|
<properties>
|
||||||
|
<maven.compiler.source>8</maven.compiler.source>
|
||||||
|
<maven.compiler.target>8</maven.compiler.target>
|
||||||
|
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||||
|
</properties>
|
||||||
|
<dependencies>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.springframework.boot</groupId>
|
||||||
|
<artifactId>spring-boot-starter-jdbc</artifactId>
|
||||||
|
<version>2.4.2</version>
|
||||||
|
</dependency>
|
||||||
|
<!--druid连接池-->
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.alibaba</groupId>
|
||||||
|
<artifactId>druid-spring-boot-starter</artifactId>
|
||||||
|
<version>1.1.21</version>
|
||||||
|
</dependency>
|
||||||
|
<!--mysql-->
|
||||||
|
<dependency>
|
||||||
|
<groupId>mysql</groupId>
|
||||||
|
<artifactId>mysql-connector-java</artifactId>
|
||||||
|
<version>8.0.33</version>
|
||||||
|
</dependency>
|
||||||
|
<!--mybatis flex-->
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.mybatis-flex</groupId>
|
||||||
|
<artifactId>mybatis-flex-spring-boot-starter</artifactId>
|
||||||
|
<version>1.9.3</version>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.mybatis-flex</groupId>
|
||||||
|
<artifactId>mybatis-flex-processor</artifactId>
|
||||||
|
<version>1.9.3</version>
|
||||||
|
<scope>provided</scope>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.schisandra.system</groupId>
|
||||||
|
<artifactId>schisandra-cloud-storage-system-common</artifactId>
|
||||||
|
<version>1.0-SNAPSHOT</version>
|
||||||
|
</dependency>
|
||||||
|
</dependencies>
|
||||||
|
|
||||||
|
</project>
|
@@ -0,0 +1,150 @@
|
|||||||
|
<?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>
|
||||||
|
<parent>
|
||||||
|
<groupId>com.schisandra</groupId>
|
||||||
|
<artifactId>schisandra-cloud-storage-admin</artifactId>
|
||||||
|
<version>1.0-SNAPSHOT</version>
|
||||||
|
</parent>
|
||||||
|
|
||||||
|
<artifactId>schisandra-cloud-storage-admin-starter</artifactId>
|
||||||
|
<packaging>jar</packaging>
|
||||||
|
|
||||||
|
<name>schisandra-cloud-storage-admin-starter</name>
|
||||||
|
<dependencies>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.springframework.boot</groupId>
|
||||||
|
<artifactId>spring-boot-starter-web</artifactId>
|
||||||
|
<version>2.4.2</version>
|
||||||
|
<exclusions>
|
||||||
|
<exclusion>
|
||||||
|
<artifactId>spring-boot-starter-logging</artifactId>
|
||||||
|
<groupId>org.springframework.boot</groupId>
|
||||||
|
</exclusion>
|
||||||
|
</exclusions>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.springframework.cloud</groupId>
|
||||||
|
<artifactId>spring-cloud-starter-bootstrap</artifactId>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.alibaba.cloud</groupId>
|
||||||
|
<artifactId>spring-cloud-starter-alibaba-nacos-config</artifactId>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.alibaba.cloud</groupId>
|
||||||
|
<artifactId>spring-cloud-starter-alibaba-nacos-discovery</artifactId>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.schisandra.admin</groupId>
|
||||||
|
<artifactId>schisandra-cloud-storage-admin-application-controller</artifactId>
|
||||||
|
<version>1.0-SNAPSHOT</version>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.schisandra.admin</groupId>
|
||||||
|
<artifactId>schisandra-cloud-storage-admin-infra</artifactId>
|
||||||
|
<version>1.0-SNAPSHOT</version>
|
||||||
|
</dependency>
|
||||||
|
</dependencies>
|
||||||
|
|
||||||
|
<properties>
|
||||||
|
<maven.compiler.source>8</maven.compiler.source>
|
||||||
|
<maven.compiler.target>8</maven.compiler.target>
|
||||||
|
<java.version>1.8</java.version>
|
||||||
|
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||||
|
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
|
||||||
|
<spring-boot.version>2.4.2</spring-boot.version>
|
||||||
|
<spring-cloud-alibaba.version>2021.1</spring-cloud-alibaba.version>
|
||||||
|
<spring-cloud.version>2020.0.6</spring-cloud.version>
|
||||||
|
</properties>
|
||||||
|
<dependencyManagement>
|
||||||
|
<dependencies>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.springframework.cloud</groupId>
|
||||||
|
<artifactId>spring-cloud-dependencies</artifactId>
|
||||||
|
<version>${spring-cloud.version}</version>
|
||||||
|
<type>pom</type>
|
||||||
|
<scope>import</scope>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.springframework.boot</groupId>
|
||||||
|
<artifactId>spring-boot-dependencies</artifactId>
|
||||||
|
<version>${spring-boot.version}</version>
|
||||||
|
<type>pom</type>
|
||||||
|
<scope>import</scope>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.alibaba.cloud</groupId>
|
||||||
|
<artifactId>spring-cloud-alibaba-dependencies</artifactId>
|
||||||
|
<version>${spring-cloud-alibaba.version}</version>
|
||||||
|
<type>pom</type>
|
||||||
|
<scope>import</scope>
|
||||||
|
</dependency>
|
||||||
|
</dependencies>
|
||||||
|
</dependencyManagement>
|
||||||
|
<build>
|
||||||
|
<finalName>${project.artifactId}</finalName>
|
||||||
|
<!--打包成jar包时的名字-->
|
||||||
|
<plugins>
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.springframework.boot</groupId>
|
||||||
|
<artifactId>spring-boot-maven-plugin</artifactId>
|
||||||
|
<version>2.3.0.RELEASE</version>
|
||||||
|
<executions>
|
||||||
|
<execution>
|
||||||
|
<goals>
|
||||||
|
<goal>repackage</goal>
|
||||||
|
</goals>
|
||||||
|
</execution>
|
||||||
|
</executions>
|
||||||
|
<configuration>
|
||||||
|
<excludes>
|
||||||
|
<!-- 打包的时候忽略lombok,因为lombok值在编译器起作用 -->
|
||||||
|
<exclude>
|
||||||
|
<groupId>org.projectlombok</groupId>
|
||||||
|
<artifactId>lombok</artifactId>
|
||||||
|
</exclude>
|
||||||
|
</excludes>
|
||||||
|
</configuration>
|
||||||
|
</plugin>
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
|
<artifactId>maven-compiler-plugin</artifactId>
|
||||||
|
<version>3.13.0</version>
|
||||||
|
<configuration>
|
||||||
|
<source>1.8</source>
|
||||||
|
<target>1.8</target>
|
||||||
|
<encoding>UTF-8</encoding>
|
||||||
|
<annotationProcessorPaths>
|
||||||
|
<path>
|
||||||
|
<groupId>org.projectlombok</groupId>
|
||||||
|
<artifactId>lombok</artifactId>
|
||||||
|
<version>1.18.24</version>
|
||||||
|
</path>
|
||||||
|
<!-- 必须要加, 否则生成不了 MapperImpl 实现类 -->
|
||||||
|
<path>
|
||||||
|
<groupId>org.mapstruct</groupId>
|
||||||
|
<artifactId>mapstruct-processor</artifactId>
|
||||||
|
<version>1.4.2.Final</version>
|
||||||
|
</path>
|
||||||
|
<!-- 如果是 0.1.0 有可能出现生成了maptruct的实现类, 但该类只创建了对象, 没有进行赋值 -->
|
||||||
|
<path>
|
||||||
|
<groupId>org.projectlombok</groupId>
|
||||||
|
<artifactId>lombok-mapstruct-binding</artifactId>
|
||||||
|
<version>0.2.0</version>
|
||||||
|
</path>
|
||||||
|
<path>
|
||||||
|
<groupId>com.mybatis-flex</groupId>
|
||||||
|
<artifactId>mybatis-flex-processor</artifactId>
|
||||||
|
<version>1.9.0</version>
|
||||||
|
</path>
|
||||||
|
</annotationProcessorPaths>
|
||||||
|
</configuration>
|
||||||
|
</plugin>
|
||||||
|
</plugins>
|
||||||
|
</build>
|
||||||
|
</project>
|
@@ -0,0 +1,25 @@
|
|||||||
|
package com.schisandra.admin;
|
||||||
|
|
||||||
|
|
||||||
|
import org.mybatis.spring.annotation.MapperScan;
|
||||||
|
import org.springframework.boot.SpringApplication;
|
||||||
|
import org.springframework.boot.autoconfigure.SpringBootApplication;
|
||||||
|
import org.springframework.cloud.openfeign.EnableFeignClients;
|
||||||
|
import org.springframework.context.annotation.ComponentScan;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @description: 管理员启动类
|
||||||
|
* @param:
|
||||||
|
* @return:
|
||||||
|
* @author zlg
|
||||||
|
* @date: 2024/7/17 16:54
|
||||||
|
*/
|
||||||
|
@SpringBootApplication
|
||||||
|
@ComponentScan("com.schisandra")
|
||||||
|
@EnableFeignClients(basePackages = "com.schisandra")
|
||||||
|
//@MapperScan("com.schisandra.admin.**.dao")
|
||||||
|
public class AdminApplication {
|
||||||
|
public static void main(String[] args) {
|
||||||
|
SpringApplication.run(AdminApplication.class);
|
||||||
|
}
|
||||||
|
}
|
@@ -0,0 +1,98 @@
|
|||||||
|
server:
|
||||||
|
port: 6000
|
||||||
|
spring:
|
||||||
|
datasource:
|
||||||
|
username: root
|
||||||
|
password: BZbVbGDBePiA2q8/mt0eMxKNpHniDzxBtOxFadQiAOTDzCDlopC4qOKwwBEi9CAZcuFsCrRJdwn0wP6jwsnzxw==
|
||||||
|
driver-class-name: com.mysql.cj.jdbc.Driver
|
||||||
|
url: jdbc:mysql://1.95.0.111:3306/schisandra-cloud-storage?serverTimezone=Asia/Shanghai&useUnicode=true&characterEncoding=utf8&useSSL=true
|
||||||
|
type: com.alibaba.druid.pool.DruidDataSource
|
||||||
|
druid:
|
||||||
|
initial-size: 20
|
||||||
|
min-idle: 20
|
||||||
|
max-active: 100
|
||||||
|
max-wait: 60000
|
||||||
|
connectionProperties: config.decrypt=true;config.decrypt.key=${publicKey};
|
||||||
|
stat-view-servlet:
|
||||||
|
enabled: true
|
||||||
|
url-pattern: /druid/*
|
||||||
|
login-username: admin
|
||||||
|
login-password: 123456
|
||||||
|
filter:
|
||||||
|
stat:
|
||||||
|
enabled: true
|
||||||
|
slow-sql-millis: 2000
|
||||||
|
log-slow-sql: true
|
||||||
|
wall:
|
||||||
|
enabled: true
|
||||||
|
config:
|
||||||
|
enabled: true
|
||||||
|
# redis配置
|
||||||
|
redis:
|
||||||
|
# Redis数据库索引(默认为0)
|
||||||
|
database: 1
|
||||||
|
# Redis服务器地址
|
||||||
|
host: 1.95.0.111
|
||||||
|
# Redis服务器连接端口
|
||||||
|
port: 6379
|
||||||
|
# Redis服务器连接密码(默认为空)
|
||||||
|
password: LDQ20020618xxx
|
||||||
|
# 连接超时时间
|
||||||
|
timeout: 2s
|
||||||
|
lettuce:
|
||||||
|
pool:
|
||||||
|
# 连接池最大连接数
|
||||||
|
max-active: 200
|
||||||
|
# 连接池最大阻塞等待时间(使用负值表示没有限制)
|
||||||
|
max-wait: -1ms
|
||||||
|
# 连接池中的最大空闲连接
|
||||||
|
max-idle: 10
|
||||||
|
# 连接池中的最小空闲连接
|
||||||
|
min-idle: 0
|
||||||
|
publicKey: MFwwDQYJKoZIhvcNAQEBBQADSwAwSAJBANUVxjcrVoirBZaNmDrUqatHEW4FOHbO5ynW6zvhIbRMo6hEFGgglbURkjuHOlgEduxJVz6Xa+sG+FMrxTguOJECAwEAAQ==
|
||||||
|
logging:
|
||||||
|
config: classpath:log4j2-spring.xml
|
||||||
|
############## Sa-Token 配置 (文档: https://sa-token.cc) ##############
|
||||||
|
sa-token:
|
||||||
|
# token 名称(同时也是 cookie 名称)
|
||||||
|
token-name: token
|
||||||
|
# token 有效期(单位:秒) 默认30天,-1 代表永久有效
|
||||||
|
timeout: 2592000
|
||||||
|
# token 最低活跃频率(单位:秒),如果 token 超过此时间没有访问系统就会被冻结,默认-1 代表不限制,永不冻结
|
||||||
|
active-timeout: -1
|
||||||
|
# 是否允许同一账号多地同时登录 (为 true 时允许一起登录, 为 false 时新登录挤掉旧登录)
|
||||||
|
is-concurrent: true
|
||||||
|
# 在多人登录同一账号时,是否共用一个 token (为 true 时所有登录共用一个 token, 为 false 时每次登录新建一个 token)
|
||||||
|
is-share: true
|
||||||
|
# token 风格(默认可取值:uuid、simple-uuid、random-32、random-64、random-128、tik)
|
||||||
|
token-style: random-32
|
||||||
|
# 是否输出操作日志
|
||||||
|
is-log: false
|
||||||
|
token-prefix: schisandra
|
||||||
|
is-print: false
|
||||||
|
|
||||||
|
mybatis-flex:
|
||||||
|
global-config:
|
||||||
|
print-banner: false
|
||||||
|
key-config:
|
||||||
|
key-type: generator
|
||||||
|
normal-value-of-logic-delete: 0
|
||||||
|
deleted-value-of-logic-delete: 1
|
||||||
|
logic-delete-column: is_deleted
|
||||||
|
mapper-locations:
|
||||||
|
- "classpath*:/mapper/**/*.xml"
|
||||||
|
|
||||||
|
# xxl-job配置
|
||||||
|
xxl:
|
||||||
|
job:
|
||||||
|
admin:
|
||||||
|
addresses: http://1.95.0.111:8088/xxl-job-admin
|
||||||
|
accessToken: default_token
|
||||||
|
executor:
|
||||||
|
appname: schisandra-cloud-storage-system
|
||||||
|
address:
|
||||||
|
ip: 1.95.0.111
|
||||||
|
port: 9999
|
||||||
|
logpath: /data/applogs/xxl-job/jobhandler
|
||||||
|
logretentiondays: 30
|
||||||
|
|
@@ -0,0 +1,18 @@
|
|||||||
|
|
||||||
|
|
||||||
|
,---,
|
||||||
|
,--.' | ,--, ,---,
|
||||||
|
| | : ,--.'| ,---, ,---.'| __ ,-.
|
||||||
|
.--.--. : : : | |, .--.--. ,-+-. / | | | :,' ,'/ /|
|
||||||
|
/ / ' ,---. : | |,--.`--'_ / / ' ,--.--. ,--.'|' | | | |' | |' | ,--.--.
|
||||||
|
| : /`./ / \ | : ' |,' ,'| | : /`./ / \ | | ,"' | ,--.__| || | ,'/ \
|
||||||
|
| : ;_ / / ' | | /' :' | | | : ;_ .--. .-. | | | / | | / ,' |' : / .--. .-. |
|
||||||
|
\ \ `. . ' / ' : | | || | : \ \ `. \__\/: . . | | | | |. ' / || | ' \__\/: . .
|
||||||
|
`----. \' ; :__ | | ' | :' : |__ `----. \ ," .--.; | | | | |/ ' ; |: |; : | ," .--.; |
|
||||||
|
/ /`--' /' | '.'|| : :_:,'| | '.'| / /`--' // / ,. | | | |--' | | '/ '| , ; / / ,. |
|
||||||
|
'--'. / | : :| | ,' ; : ;'--'. /; : .' \| |/ | : :| ---' ; : .' \
|
||||||
|
`--'---' \ \ / `--'' | , / `--'---' | , .-./'---' \ \ / | , .-./
|
||||||
|
`----' ---`-' `--`---' `----' `--`---'
|
||||||
|
|
||||||
|
Spring Boot: ${spring-boot.formatted-version}
|
||||||
|
五味子云存储
|
@@ -0,0 +1,16 @@
|
|||||||
|
spring:
|
||||||
|
application:
|
||||||
|
name: schisandra-cloud-storage-admin
|
||||||
|
cloud:
|
||||||
|
nacos:
|
||||||
|
config:
|
||||||
|
server-addr: 1.95.0.111:8848
|
||||||
|
prefix: ${spring.application.name}
|
||||||
|
group: DEFAULT_GROUP
|
||||||
|
namespace:
|
||||||
|
file-extension: yaml
|
||||||
|
timeout: 60000
|
||||||
|
discovery:
|
||||||
|
enabled: true
|
||||||
|
server-addr: 1.95.0.111:8848
|
||||||
|
|
@@ -0,0 +1,87 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<!--Configuration后面的status,这个用于设置log4j2自身内部的信息输出,可以不设置,当设置成trace时,你会看到log4j2内部各种详细输出-->
|
||||||
|
<!--monitorInterval:Log4j能够自动检测修改配置 文件和重新配置本身,设置间隔秒数-->
|
||||||
|
<configuration status="INFO" monitorInterval="5">
|
||||||
|
<!--日志级别以及优先级排序: OFF > FATAL > ERROR > WARN > INFO > DEBUG > TRACE > ALL -->
|
||||||
|
<!--变量配置-->
|
||||||
|
<Properties>
|
||||||
|
<!-- 格式化输出:%date表示日期,%thread表示线程名,%-5level:级别从左显示5个字符宽度 %msg:日志消息,%n是换行符-->
|
||||||
|
<!-- %logger{36} 表示 Logger 名字最长36个字符 -->
|
||||||
|
<property name="LOG_PATTERN" value="%clr{%d{yyyy-MM-dd HH:mm:ss.SSS}}{faint} %clr{%5p} %clr{${sys:PID}}{magenta} %clr{---}{faint} %clr{[%thread]}{faint} %clr{%-40.40c{1.}}{cyan} %clr{:}{faint} %m%n%xwEx" />
|
||||||
|
<!-- 定义日志存储的路径 -->
|
||||||
|
<property name="FILE_PATH" value="../log" />
|
||||||
|
<property name="FILE_NAME" value="schisandra-cloud-storage-system.log" />
|
||||||
|
</Properties>
|
||||||
|
|
||||||
|
<!--https://logging.apache.org/log4j/2.x/manual/appenders.html-->
|
||||||
|
<appenders>
|
||||||
|
|
||||||
|
<console name="Console" target="SYSTEM_OUT">
|
||||||
|
<!--输出日志的格式-->
|
||||||
|
<PatternLayout pattern="${LOG_PATTERN}"/>
|
||||||
|
<!--控制台只输出level及其以上级别的信息(onMatch),其他的直接拒绝(onMismatch)-->
|
||||||
|
<ThresholdFilter level="info" onMatch="ACCEPT" onMismatch="DENY"/>
|
||||||
|
</console>
|
||||||
|
|
||||||
|
<!--文件会打印出所有信息,这个log每次运行程序会自动清空,由append属性决定,适合临时测试用-->
|
||||||
|
<File name="fileLog" fileName="${FILE_PATH}/temp.log" append="false">
|
||||||
|
<PatternLayout pattern="${LOG_PATTERN}"/>
|
||||||
|
</File>
|
||||||
|
|
||||||
|
<!-- 这个会打印出所有的info及以下级别的信息,每次大小超过size,则这size大小的日志会自动存入按年份-月份建立的文件夹下面并进行压缩,作为存档-->
|
||||||
|
<RollingFile name="RollingFileInfo" fileName="${FILE_PATH}/info.log" filePattern="${FILE_PATH}/${FILE_NAME}-INFO-%d{yyyy-MM-dd}_%i.log.gz">
|
||||||
|
<!--控制台只输出level及以上级别的信息(onMatch),其他的直接拒绝(onMismatch)-->
|
||||||
|
<ThresholdFilter level="info" onMatch="ACCEPT" onMismatch="DENY"/>
|
||||||
|
<PatternLayout pattern="${LOG_PATTERN}"/>
|
||||||
|
<Policies>
|
||||||
|
<!--interval属性用来指定多久滚动一次,默认是1 hour-->
|
||||||
|
<TimeBasedTriggeringPolicy interval="1"/>
|
||||||
|
<SizeBasedTriggeringPolicy size="10MB"/>
|
||||||
|
</Policies>
|
||||||
|
<!-- DefaultRolloverStrategy属性如不设置,则默认为最多同一文件夹下7个文件开始覆盖-->
|
||||||
|
<DefaultRolloverStrategy max="15"/>
|
||||||
|
</RollingFile>
|
||||||
|
|
||||||
|
<!-- 这个会打印出所有的warn及以下级别的信息,每次大小超过size,则这size大小的日志会自动存入按年份-月份建立的文件夹下面并进行压缩,作为存档-->
|
||||||
|
<RollingFile name="RollingFileWarn" fileName="${FILE_PATH}/warn.log" filePattern="${FILE_PATH}/${FILE_NAME}-WARN-%d{yyyy-MM-dd}_%i.log.gz">
|
||||||
|
<!--控制台只输出level及以上级别的信息(onMatch),其他的直接拒绝(onMismatch)-->
|
||||||
|
<ThresholdFilter level="warn" onMatch="ACCEPT" onMismatch="DENY"/>
|
||||||
|
<PatternLayout pattern="${LOG_PATTERN}"/>
|
||||||
|
<Policies>
|
||||||
|
<!--interval属性用来指定多久滚动一次,默认是1 hour-->
|
||||||
|
<TimeBasedTriggeringPolicy interval="1"/>
|
||||||
|
<SizeBasedTriggeringPolicy size="10MB"/>
|
||||||
|
</Policies>
|
||||||
|
<!-- DefaultRolloverStrategy属性如不设置,则默认为最多同一文件夹下7个文件开始覆盖-->
|
||||||
|
<DefaultRolloverStrategy max="15"/>
|
||||||
|
</RollingFile>
|
||||||
|
|
||||||
|
<!-- 这个会打印出所有的error及以下级别的信息,每次大小超过size,则这size大小的日志会自动存入按年份-月份建立的文件夹下面并进行压缩,作为存档-->
|
||||||
|
<RollingFile name="RollingFileError" fileName="${FILE_PATH}/error.log" filePattern="${FILE_PATH}/${FILE_NAME}-ERROR-%d{yyyy-MM-dd}_%i.log.gz">
|
||||||
|
<!--控制台只输出level及以上级别的信息(onMatch),其他的直接拒绝(onMismatch)-->
|
||||||
|
<ThresholdFilter level="error" onMatch="ACCEPT" onMismatch="DENY"/>
|
||||||
|
<PatternLayout pattern="${LOG_PATTERN}"/>
|
||||||
|
<Policies>
|
||||||
|
<!--interval属性用来指定多久滚动一次,默认是1 hour-->
|
||||||
|
<TimeBasedTriggeringPolicy interval="1"/>
|
||||||
|
<SizeBasedTriggeringPolicy size="10MB"/>
|
||||||
|
</Policies>
|
||||||
|
<!-- DefaultRolloverStrategy属性如不设置,则默认为最多同一文件夹下7个文件开始覆盖-->
|
||||||
|
<DefaultRolloverStrategy max="15"/>
|
||||||
|
</RollingFile>
|
||||||
|
|
||||||
|
</appenders>
|
||||||
|
|
||||||
|
<!--Logger节点用来单独指定日志的形式,比如要为指定包下的class指定不同的日志级别等。-->
|
||||||
|
<!--然后定义loggers,只有定义了logger并引入的appender,appender才会生效-->
|
||||||
|
<loggers>
|
||||||
|
<root level="info">
|
||||||
|
<appender-ref ref="Console"/>
|
||||||
|
<appender-ref ref="RollingFileInfo"/>
|
||||||
|
<appender-ref ref="RollingFileWarn"/>
|
||||||
|
<appender-ref ref="RollingFileError"/>
|
||||||
|
<appender-ref ref="fileLog"/>
|
||||||
|
</root>
|
||||||
|
</loggers>
|
||||||
|
|
||||||
|
</configuration>
|
@@ -0,0 +1,3 @@
|
|||||||
|
processor.enable=true
|
||||||
|
processor.allInTables.enable=false
|
||||||
|
processor.allInTables.package=com.schisandra.admin
|
@@ -14,9 +14,9 @@
|
|||||||
<module>schisandra-cloud-storage-auth-domain</module>
|
<module>schisandra-cloud-storage-auth-domain</module>
|
||||||
<module>schisandra-cloud-storage-auth-infra</module>
|
<module>schisandra-cloud-storage-auth-infra</module>
|
||||||
<module>schisandra-cloud-storage-auth-starter</module>
|
<module>schisandra-cloud-storage-auth-starter</module>
|
||||||
<module>schisandra-cloud-storage-auth-application/schisandra-cloud-storage-auth-application-controller</module>
|
<!-- <module>schisandra-cloud-storage-auth-application/schisandra-cloud-storage-auth-application-controller</module>-->
|
||||||
<module>schisandra-cloud-storage-auth-application/schisandra-cloud-storage-auth-application-job</module>
|
<!-- <module>schisandra-cloud-storage-auth-application/schisandra-cloud-storage-auth-application-job</module>-->
|
||||||
<module>schisandra-cloud-storage-auth-application/schisandra-cloud-storage-auth-application-mq</module>
|
<!-- <module>schisandra-cloud-storage-auth-application/schisandra-cloud-storage-auth-application-mq</module>-->
|
||||||
</modules>
|
</modules>
|
||||||
|
|
||||||
<properties>
|
<properties>
|
||||||
|
@@ -7,6 +7,7 @@
|
|||||||
<version>1.0-SNAPSHOT</version>
|
<version>1.0-SNAPSHOT</version>
|
||||||
</parent>
|
</parent>
|
||||||
<artifactId>schisandra-cloud-storage-auth-api</artifactId>
|
<artifactId>schisandra-cloud-storage-auth-api</artifactId>
|
||||||
|
<packaging>jar</packaging>
|
||||||
<name>schisandra-cloud-storage-auth-api</name>
|
<name>schisandra-cloud-storage-auth-api</name>
|
||||||
|
|
||||||
<properties>
|
<properties>
|
||||||
|
@@ -7,6 +7,8 @@ import org.springframework.web.bind.annotation.GetMapping;
|
|||||||
import org.springframework.web.bind.annotation.PostMapping;
|
import org.springframework.web.bind.annotation.PostMapping;
|
||||||
import org.springframework.web.bind.annotation.RequestParam;
|
import org.springframework.web.bind.annotation.RequestParam;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
@FeignClient("schisandra-cloud-storage-auth")
|
@FeignClient("schisandra-cloud-storage-auth")
|
||||||
public interface SchisandraAuthFeignService {
|
public interface SchisandraAuthFeignService {
|
||||||
@PostMapping("/auth/user/wechatRegister")
|
@PostMapping("/auth/user/wechatRegister")
|
||||||
@@ -14,4 +16,19 @@ public interface SchisandraAuthFeignService {
|
|||||||
|
|
||||||
@GetMapping("/auth/user/getUserInfo")
|
@GetMapping("/auth/user/getUserInfo")
|
||||||
Result<SchisandraAuthUserDTO> getUserInfo(@RequestParam("userId") String userId);
|
Result<SchisandraAuthUserDTO> getUserInfo(@RequestParam("userId") String userId);
|
||||||
|
|
||||||
|
@GetMapping("/auth/user/getAllUser")
|
||||||
|
Result getAllUser();
|
||||||
|
|
||||||
|
@GetMapping("/auth/role/selectAllRole")
|
||||||
|
Result selectAllRole();
|
||||||
|
|
||||||
|
@GetMapping("/auth/permission/selectAllPermission")
|
||||||
|
Result selectAllPermission();
|
||||||
|
|
||||||
|
@GetMapping("/auth/social/getAllSocialUsers")
|
||||||
|
Result getAllSocialUsers();
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@@ -6,13 +6,18 @@
|
|||||||
<artifactId>schisandra-cloud-storage-auth</artifactId>
|
<artifactId>schisandra-cloud-storage-auth</artifactId>
|
||||||
<version>1.0-SNAPSHOT</version>
|
<version>1.0-SNAPSHOT</version>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
<artifactId>schisandra-cloud-storage-auth-application</artifactId>
|
<artifactId>schisandra-cloud-storage-auth-application</artifactId>
|
||||||
<name>schisandra-cloud-storage-auth-application</name>
|
<name>schisandra-cloud-storage-auth-application</name>
|
||||||
|
<packaging>pom</packaging>
|
||||||
<properties>
|
<properties>
|
||||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||||
</properties>
|
</properties>
|
||||||
|
<modules>
|
||||||
|
<module>schisandra-cloud-storage-auth-application-controller</module>
|
||||||
|
<module>schisandra-cloud-storage-auth-application-job</module>
|
||||||
|
<module>schisandra-cloud-storage-auth-application-mq</module>
|
||||||
|
</modules>
|
||||||
<dependencies>
|
<dependencies>
|
||||||
|
|
||||||
</dependencies>
|
</dependencies>
|
||||||
|
@@ -3,12 +3,12 @@
|
|||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
<parent>
|
<parent>
|
||||||
<groupId>com.schisandra</groupId>
|
<groupId>com.schisandra</groupId>
|
||||||
<artifactId>schisandra-cloud-storage-auth</artifactId>
|
<artifactId>schisandra-cloud-storage-auth-application</artifactId>
|
||||||
<version>1.0-SNAPSHOT</version>
|
<version>1.0-SNAPSHOT</version>
|
||||||
<relativePath>../../pom.xml</relativePath>
|
|
||||||
</parent>
|
</parent>
|
||||||
<artifactId>schisandra-cloud-storage-auth-application-controller</artifactId>
|
<artifactId>schisandra-cloud-storage-auth-application-controller</artifactId>
|
||||||
<name>schisandra-cloud-storage-auth-application-controller</name>
|
<name>schisandra-cloud-storage-auth-application-controller</name>
|
||||||
|
<packaging>jar</packaging>
|
||||||
<build>
|
<build>
|
||||||
<plugins>
|
<plugins>
|
||||||
<plugin>
|
<plugin>
|
||||||
|
@@ -134,6 +134,17 @@ public class SchisandraAuthPermissionController {
|
|||||||
}
|
}
|
||||||
return schisandraAuthPermissionDomainService.selectUserPermissionTree(userId);
|
return schisandraAuthPermissionDomainService.selectUserPermissionTree(userId);
|
||||||
}
|
}
|
||||||
|
@GetMapping("selectAllPermission")
|
||||||
|
public Result selectAllPermission() {
|
||||||
|
try {
|
||||||
|
return Result.ok(SchisandraAuthPermissionDTOConvert.INSTANCE.convertBOListToDTOList(schisandraAuthPermissionDomainService.selectAllUserList()));
|
||||||
|
}catch (Exception e){
|
||||||
|
log.error("authPermissionController.select.error:{}", e.getMessage(), e);
|
||||||
|
return Result.fail("查询权限信息失败");
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
private void checkRoleInfo(@RequestBody SchisandraAuthPermissionDTO schisandraAuthPermissionDTO) {
|
private void checkRoleInfo(@RequestBody SchisandraAuthPermissionDTO schisandraAuthPermissionDTO) {
|
||||||
Preconditions.checkArgument(!StringUtils.isBlank(schisandraAuthPermissionDTO.getId().toString()), "角色名不能为空");
|
Preconditions.checkArgument(!StringUtils.isBlank(schisandraAuthPermissionDTO.getId().toString()), "角色名不能为空");
|
||||||
|
@@ -23,7 +23,7 @@ import javax.annotation.Resource;
|
|||||||
* @Version: v1.0
|
* @Version: v1.0
|
||||||
*/
|
*/
|
||||||
@RestController
|
@RestController
|
||||||
@RequestMapping("/role/")
|
@RequestMapping("auth/role/")
|
||||||
@Slf4j
|
@Slf4j
|
||||||
public class SchisandraAuthRoleController {
|
public class SchisandraAuthRoleController {
|
||||||
@Resource
|
@Resource
|
||||||
@@ -58,9 +58,9 @@ public class SchisandraAuthRoleController {
|
|||||||
* @date 2024/4/3 22:05
|
* @date 2024/4/3 22:05
|
||||||
*/
|
*/
|
||||||
@PostMapping("query")
|
@PostMapping("query")
|
||||||
public Result query(@RequestBody SchisandraAuthRoleDTO schisandraAuthRoleDTO){
|
public Result query(@RequestBody SchisandraAuthRoleDTO schisandraAuthRoleDTO) {
|
||||||
try{
|
try {
|
||||||
if(log.isInfoEnabled()){
|
if (log.isInfoEnabled()) {
|
||||||
log.info("RoleController.select.dto:{}", JSON.toJSONString(schisandraAuthRoleDTO));
|
log.info("RoleController.select.dto:{}", JSON.toJSONString(schisandraAuthRoleDTO));
|
||||||
}
|
}
|
||||||
checkRoleInfo(schisandraAuthRoleDTO);
|
checkRoleInfo(schisandraAuthRoleDTO);
|
||||||
@@ -111,6 +111,21 @@ public class SchisandraAuthRoleController {
|
|||||||
return Result.fail("删除角色信息失败");
|
return Result.fail("删除角色信息失败");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@GetMapping("selectAllRole")
|
||||||
|
public Result selectAllRole() {
|
||||||
|
try {
|
||||||
|
if (log.isInfoEnabled()) {
|
||||||
|
log.info("RoleController.selectAllRole.dto:{}", JSON.toJSONString(null));
|
||||||
|
}
|
||||||
|
return Result.ok(SchisandraAuthRoleDTOConverter.INSTANCE.convertBOListToDTOList(schisandraAuthRoleDomainService.selectAllRole()));
|
||||||
|
} catch (Exception e) {
|
||||||
|
log.error("RoleController.selectAllRole.error:{}", e.getMessage(), e);
|
||||||
|
return Result.fail("查询角色信息失败");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
private void checkRoleInfo(@RequestBody SchisandraAuthRoleDTO schisandraAuthRoleDTO) {
|
private void checkRoleInfo(@RequestBody SchisandraAuthRoleDTO schisandraAuthRoleDTO) {
|
||||||
Preconditions.checkArgument(!StringUtils.isBlank(schisandraAuthRoleDTO.getRoleName()), "角色名不能为空");
|
Preconditions.checkArgument(!StringUtils.isBlank(schisandraAuthRoleDTO.getRoleName()), "角色名不能为空");
|
||||||
Preconditions.checkArgument(!StringUtils.isBlank(schisandraAuthRoleDTO.getRoleKey()), "角色key值不能为空");
|
Preconditions.checkArgument(!StringUtils.isBlank(schisandraAuthRoleDTO.getRoleKey()), "角色key值不能为空");
|
||||||
|
@@ -1,7 +1,6 @@
|
|||||||
package com.schisandra.auth.application.controller;
|
package com.schisandra.auth.application.controller;
|
||||||
|
|
||||||
import cn.dev33.satoken.stp.StpUtil;
|
import cn.dev33.satoken.stp.StpUtil;
|
||||||
import cn.hutool.core.util.ObjectUtil;
|
|
||||||
import com.alibaba.fastjson.JSON;
|
import com.alibaba.fastjson.JSON;
|
||||||
import com.alibaba.fastjson.JSONObject;
|
import com.alibaba.fastjson.JSONObject;
|
||||||
import com.google.common.base.Preconditions;
|
import com.google.common.base.Preconditions;
|
||||||
@@ -23,20 +22,14 @@ import com.schisandra.auth.domain.service.SchisandraAuthRolePermissionDomainServ
|
|||||||
import com.schisandra.auth.domain.service.SchisandraAuthUserDomainService;
|
import com.schisandra.auth.domain.service.SchisandraAuthUserDomainService;
|
||||||
import com.schisandra.auth.infra.basic.entity.SchisandraAuthPermission;
|
import com.schisandra.auth.infra.basic.entity.SchisandraAuthPermission;
|
||||||
import com.schisandra.auth.infra.basic.entity.SchisandraAuthRole;
|
import com.schisandra.auth.infra.basic.entity.SchisandraAuthRole;
|
||||||
import com.schisandra.auth.infra.basic.entity.SchisandraAuthRolePermission;
|
|
||||||
import com.schisandra.auth.infra.basic.entity.SchisandraAuthUser;
|
import com.schisandra.auth.infra.basic.entity.SchisandraAuthUser;
|
||||||
import lombok.SneakyThrows;
|
import lombok.SneakyThrows;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
import org.apache.commons.lang3.ObjectUtils;
|
import org.apache.commons.lang3.ObjectUtils;
|
||||||
import org.apache.commons.lang3.StringUtils;
|
import org.apache.commons.lang3.StringUtils;
|
||||||
import org.springframework.beans.factory.annotation.Value;
|
|
||||||
import org.springframework.cache.annotation.Cacheable;
|
|
||||||
import org.springframework.http.HttpRequest;
|
|
||||||
import org.springframework.web.bind.annotation.*;
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
import javax.annotation.Resource;
|
import javax.annotation.Resource;
|
||||||
import javax.servlet.http.HttpServletRequest;
|
|
||||||
import javax.servlet.http.HttpSession;
|
|
||||||
import java.util.*;
|
import java.util.*;
|
||||||
import java.util.concurrent.TimeUnit;
|
import java.util.concurrent.TimeUnit;
|
||||||
import java.util.stream.Collectors;
|
import java.util.stream.Collectors;
|
||||||
@@ -54,27 +47,19 @@ import java.util.stream.Collectors;
|
|||||||
@RequestMapping("/auth/user/")
|
@RequestMapping("/auth/user/")
|
||||||
@Slf4j
|
@Slf4j
|
||||||
public class SchisandraAuthUserController {
|
public class SchisandraAuthUserController {
|
||||||
|
private final String AUTH_PHONE_PREFIX = "auth:user:phone";
|
||||||
|
private final String AUTH_PERMISSION_PREFIX = "auth:user:permission";
|
||||||
|
private final String AUTH_ROLE_PREFIX = "auth:user:role";
|
||||||
|
private final String WX_LOGIN_TEMPORARY_CLIENT_ID = "wechat:client:id";
|
||||||
|
private final String WX_LOGIN_TOKEN = "wechat:login:token";
|
||||||
@Resource
|
@Resource
|
||||||
RedisUtil redisUtil;
|
RedisUtil redisUtil;
|
||||||
@Resource
|
@Resource
|
||||||
private SchisandraAuthUserDomainService schisandraAuthUserDomainService;
|
private SchisandraAuthUserDomainService schisandraAuthUserDomainService;
|
||||||
|
|
||||||
private final String AUTH_PHONE_PREFIX = "auth:user:phone";
|
|
||||||
|
|
||||||
@Resource
|
@Resource
|
||||||
private CheckRouteCaptcha checkRouteCaptcha;
|
private CheckRouteCaptcha checkRouteCaptcha;
|
||||||
|
|
||||||
@Resource
|
@Resource
|
||||||
private SchisandraAuthRoleDomainService schisandraAuthRoleDomainService;
|
private SchisandraAuthRoleDomainService schisandraAuthRoleDomainService;
|
||||||
|
|
||||||
private final String AUTH_PERMISSION_PREFIX = "auth:user:permission";
|
|
||||||
|
|
||||||
private final String AUTH_ROLE_PREFIX = "auth:user:role";
|
|
||||||
|
|
||||||
private final String WX_LOGIN_TEMPORARY_CLIENT_ID = "wechat:client:id";
|
|
||||||
|
|
||||||
private final String WX_LOGIN_TOKEN = "wechat:login:token";
|
|
||||||
|
|
||||||
@Resource
|
@Resource
|
||||||
private SchisandraAuthRolePermissionDomainService schisandraAuthRolePermissionDomainService;
|
private SchisandraAuthRolePermissionDomainService schisandraAuthRolePermissionDomainService;
|
||||||
|
|
||||||
@@ -374,6 +359,7 @@ public class SchisandraAuthUserController {
|
|||||||
}
|
}
|
||||||
return Result.ok(JSONObject.parseObject(result));
|
return Result.ok(JSONObject.parseObject(result));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @description: 获取用户信息
|
* @description: 获取用户信息
|
||||||
* @param: [userId]
|
* @param: [userId]
|
||||||
@@ -384,13 +370,19 @@ public class SchisandraAuthUserController {
|
|||||||
@GetMapping("getUserInfo")
|
@GetMapping("getUserInfo")
|
||||||
public Result<SchisandraAuthUserDTO> getUserInfo(@RequestParam("userId") String userId) {
|
public Result<SchisandraAuthUserDTO> getUserInfo(@RequestParam("userId") String userId) {
|
||||||
SchisandraAuthUserDTO schisandraAuthUserDTO = SchisandraAuthUserDTOConverter.INSTANCE.convertBOToDTO(schisandraAuthUserDomainService.queryById(userId));
|
SchisandraAuthUserDTO schisandraAuthUserDTO = SchisandraAuthUserDTOConverter.INSTANCE.convertBOToDTO(schisandraAuthUserDomainService.queryById(userId));
|
||||||
if ( schisandraAuthUserDTO== null) {
|
if (schisandraAuthUserDTO == null) {
|
||||||
return Result.fail("该用户不存在");
|
return Result.fail("该用户不存在");
|
||||||
}else {
|
} else {
|
||||||
return Result.ok(schisandraAuthUserDTO);
|
return Result.ok(schisandraAuthUserDTO);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@GetMapping("getAllUser")
|
||||||
|
public Result<List<SchisandraAuthUserDTO>> getAllUser() {
|
||||||
|
List<SchisandraAuthUserBO> listUsers = schisandraAuthUserDomainService.listAllUsers();
|
||||||
|
List<SchisandraAuthUserDTO> schisandraAuthUserDTOList = SchisandraAuthUserDTOConverter.INSTANCE.convertBOListToDTOList(listUsers);
|
||||||
|
return Result.ok(schisandraAuthUserDTOList);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@@ -0,0 +1,176 @@
|
|||||||
|
package com.schisandra.auth.application.controller;
|
||||||
|
|
||||||
|
import com.alibaba.fastjson.JSON;
|
||||||
|
import com.google.common.base.Preconditions;
|
||||||
|
import com.schisandra.auth.application.convert.SchisandraSocialUserDTOConverter;
|
||||||
|
import com.schisandra.auth.application.dto.SchisandraSocialUserDTO;
|
||||||
|
import com.schisandra.auth.common.entity.Result;
|
||||||
|
import com.schisandra.auth.domain.bo.SchisandraSocialUserBO;
|
||||||
|
import com.schisandra.auth.domain.service.SchisandraSocialUserDomainService;
|
||||||
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
import org.springframework.web.bind.annotation.GetMapping;
|
||||||
|
import org.springframework.web.bind.annotation.RequestBody;
|
||||||
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
|
import org.springframework.web.bind.annotation.RestController;
|
||||||
|
|
||||||
|
import javax.annotation.Resource;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 社会用户信息表 controller
|
||||||
|
*
|
||||||
|
* @author zlg
|
||||||
|
* @since 2024-07-17 11:53:29
|
||||||
|
*/
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("/auth/social/")
|
||||||
|
@Slf4j
|
||||||
|
public class SchisandraSocialUserController {
|
||||||
|
|
||||||
|
@Resource
|
||||||
|
private SchisandraSocialUserDomainService schisandraSocialUserDomainService;
|
||||||
|
|
||||||
|
|
||||||
|
@GetMapping("getAllSocialUsers")
|
||||||
|
public Result getAllSocialUsers() {
|
||||||
|
try {
|
||||||
|
return Result.ok(schisandraSocialUserDomainService.queryAll());
|
||||||
|
}catch (Exception e) {
|
||||||
|
return Result.fail();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增社会用户信息表
|
||||||
|
*/
|
||||||
|
@RequestMapping("add")
|
||||||
|
public Result<Boolean> add(@RequestBody SchisandraSocialUserDTO schisandraSocialUserDTO) {
|
||||||
|
|
||||||
|
try {
|
||||||
|
if (log.isInfoEnabled()) {
|
||||||
|
log.info("SchisandraSocialUserController.add.dto:{}", JSON.toJSONString(schisandraSocialUserDTO));
|
||||||
|
}
|
||||||
|
Preconditions.checkNotNull(schisandraSocialUserDTO.getId(), "不能为空");
|
||||||
|
Preconditions.checkNotNull(schisandraSocialUserDTO.getUuid(), "第三方系统的唯一ID不能为空");
|
||||||
|
Preconditions.checkNotNull(schisandraSocialUserDTO.getSource(), "第三方用户来源不能为空");
|
||||||
|
Preconditions.checkNotNull(schisandraSocialUserDTO.getAccessToken(), "用户的授权令牌不能为空");
|
||||||
|
Preconditions.checkNotNull(schisandraSocialUserDTO.getExpireIn(), "第三方用户的授权令牌的有效期不能为空");
|
||||||
|
Preconditions.checkNotNull(schisandraSocialUserDTO.getRefreshToken(), "刷新令牌不能为空");
|
||||||
|
Preconditions.checkNotNull(schisandraSocialUserDTO.getOpenId(), "第三方用户的 open id不能为空");
|
||||||
|
Preconditions.checkNotNull(schisandraSocialUserDTO.getUid(), "第三方用户的 ID不能为空");
|
||||||
|
Preconditions.checkNotNull(schisandraSocialUserDTO.getAccessCode(), "个别平台的授权信息不能为空");
|
||||||
|
Preconditions.checkNotNull(schisandraSocialUserDTO.getUnionId(), "第三方用户的 union id不能为空");
|
||||||
|
Preconditions.checkNotNull(schisandraSocialUserDTO.getScope(), "第三方用户授予的权限不能为空");
|
||||||
|
Preconditions.checkNotNull(schisandraSocialUserDTO.getTokenType(), "个别平台的授权信息不能为空");
|
||||||
|
Preconditions.checkNotNull(schisandraSocialUserDTO.getIdToken(), "id token不能为空");
|
||||||
|
Preconditions.checkNotNull(schisandraSocialUserDTO.getMacAlgorithm(), "小米平台用户的附带属性不能为空");
|
||||||
|
Preconditions.checkNotNull(schisandraSocialUserDTO.getMacKey(), "小米平台用户的附带属性不能为空");
|
||||||
|
Preconditions.checkNotNull(schisandraSocialUserDTO.getCode(), "用户的授权code不能为空");
|
||||||
|
Preconditions.checkNotNull(schisandraSocialUserDTO.getOauthToken(), "Twitter平台用户的附带属性不能为空");
|
||||||
|
Preconditions.checkNotNull(schisandraSocialUserDTO.getOauthTokenSecret(), "Twitter平台用户的附带属性不能为空");
|
||||||
|
Preconditions.checkNotNull(schisandraSocialUserDTO.getStatus(), "状态不能为空");
|
||||||
|
Preconditions.checkNotNull(schisandraSocialUserDTO.getExtJson(), "不能为空");
|
||||||
|
Preconditions.checkNotNull(schisandraSocialUserDTO.getCreatedBy(), "创建人不能为空");
|
||||||
|
Preconditions.checkNotNull(schisandraSocialUserDTO.getCreatedTime(), "创建时间不能为空");
|
||||||
|
Preconditions.checkNotNull(schisandraSocialUserDTO.getUpdateBy(), "更新人不能为空");
|
||||||
|
Preconditions.checkNotNull(schisandraSocialUserDTO.getUpdateTime(), "更新时间不能为空");
|
||||||
|
Preconditions.checkNotNull(schisandraSocialUserDTO.getIsDeleted(), "不能为空");
|
||||||
|
SchisandraSocialUserBO SchisandraSocialUserBO = SchisandraSocialUserDTOConverter.INSTANCE.convertDTOToBO(schisandraSocialUserDTO);
|
||||||
|
return Result.ok(schisandraSocialUserDomainService.add(SchisandraSocialUserBO));
|
||||||
|
} catch (Exception e) {
|
||||||
|
log.error("SchisandraSocialUserController.register.error:{}", e.getMessage(), e);
|
||||||
|
return Result.fail("新增社会用户信息表失败");
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改社会用户信息表
|
||||||
|
*/
|
||||||
|
@RequestMapping("update")
|
||||||
|
public Result<Boolean> update(@RequestBody SchisandraSocialUserDTO schisandraSocialUserDTO) {
|
||||||
|
|
||||||
|
try {
|
||||||
|
if (log.isInfoEnabled()) {
|
||||||
|
log.info("SchisandraSocialUserController.update.dto:{}", JSON.toJSONString(schisandraSocialUserDTO));
|
||||||
|
}
|
||||||
|
Preconditions.checkNotNull(schisandraSocialUserDTO.getId(), "不能为空");
|
||||||
|
Preconditions.checkNotNull(schisandraSocialUserDTO.getUuid(), "第三方系统的唯一ID不能为空");
|
||||||
|
Preconditions.checkNotNull(schisandraSocialUserDTO.getSource(), "第三方用户来源不能为空");
|
||||||
|
Preconditions.checkNotNull(schisandraSocialUserDTO.getAccessToken(), "用户的授权令牌不能为空");
|
||||||
|
Preconditions.checkNotNull(schisandraSocialUserDTO.getExpireIn(), "第三方用户的授权令牌的有效期不能为空");
|
||||||
|
Preconditions.checkNotNull(schisandraSocialUserDTO.getRefreshToken(), "刷新令牌不能为空");
|
||||||
|
Preconditions.checkNotNull(schisandraSocialUserDTO.getOpenId(), "第三方用户的 open id不能为空");
|
||||||
|
Preconditions.checkNotNull(schisandraSocialUserDTO.getUid(), "第三方用户的 ID不能为空");
|
||||||
|
Preconditions.checkNotNull(schisandraSocialUserDTO.getAccessCode(), "个别平台的授权信息不能为空");
|
||||||
|
Preconditions.checkNotNull(schisandraSocialUserDTO.getUnionId(), "第三方用户的 union id不能为空");
|
||||||
|
Preconditions.checkNotNull(schisandraSocialUserDTO.getScope(), "第三方用户授予的权限不能为空");
|
||||||
|
Preconditions.checkNotNull(schisandraSocialUserDTO.getTokenType(), "个别平台的授权信息不能为空");
|
||||||
|
Preconditions.checkNotNull(schisandraSocialUserDTO.getIdToken(), "id token不能为空");
|
||||||
|
Preconditions.checkNotNull(schisandraSocialUserDTO.getMacAlgorithm(), "小米平台用户的附带属性不能为空");
|
||||||
|
Preconditions.checkNotNull(schisandraSocialUserDTO.getMacKey(), "小米平台用户的附带属性不能为空");
|
||||||
|
Preconditions.checkNotNull(schisandraSocialUserDTO.getCode(), "用户的授权code不能为空");
|
||||||
|
Preconditions.checkNotNull(schisandraSocialUserDTO.getOauthToken(), "Twitter平台用户的附带属性不能为空");
|
||||||
|
Preconditions.checkNotNull(schisandraSocialUserDTO.getOauthTokenSecret(), "Twitter平台用户的附带属性不能为空");
|
||||||
|
Preconditions.checkNotNull(schisandraSocialUserDTO.getStatus(), "状态不能为空");
|
||||||
|
Preconditions.checkNotNull(schisandraSocialUserDTO.getExtJson(), "不能为空");
|
||||||
|
Preconditions.checkNotNull(schisandraSocialUserDTO.getCreatedBy(), "创建人不能为空");
|
||||||
|
Preconditions.checkNotNull(schisandraSocialUserDTO.getCreatedTime(), "创建时间不能为空");
|
||||||
|
Preconditions.checkNotNull(schisandraSocialUserDTO.getUpdateBy(), "更新人不能为空");
|
||||||
|
Preconditions.checkNotNull(schisandraSocialUserDTO.getUpdateTime(), "更新时间不能为空");
|
||||||
|
Preconditions.checkNotNull(schisandraSocialUserDTO.getIsDeleted(), "不能为空");
|
||||||
|
SchisandraSocialUserBO schisandraSocialUserBO = SchisandraSocialUserDTOConverter.INSTANCE.convertDTOToBO(schisandraSocialUserDTO);
|
||||||
|
return Result.ok(schisandraSocialUserDomainService.update(schisandraSocialUserBO));
|
||||||
|
} catch (Exception e) {
|
||||||
|
log.error("SchisandraSocialUserController.update.error:{}", e.getMessage(), e);
|
||||||
|
return Result.fail("更新社会用户信息表信息失败");
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除社会用户信息表
|
||||||
|
*/
|
||||||
|
@RequestMapping("delete")
|
||||||
|
public Result<Boolean> delete(@RequestBody SchisandraSocialUserDTO schisandraSocialUserDTO) {
|
||||||
|
|
||||||
|
try {
|
||||||
|
if (log.isInfoEnabled()) {
|
||||||
|
log.info("SchisandraSocialUserController.delete.dto:{}", JSON.toJSONString(schisandraSocialUserDTO));
|
||||||
|
}
|
||||||
|
Preconditions.checkNotNull(schisandraSocialUserDTO.getId(), "不能为空");
|
||||||
|
Preconditions.checkNotNull(schisandraSocialUserDTO.getUuid(), "第三方系统的唯一ID不能为空");
|
||||||
|
Preconditions.checkNotNull(schisandraSocialUserDTO.getSource(), "第三方用户来源不能为空");
|
||||||
|
Preconditions.checkNotNull(schisandraSocialUserDTO.getAccessToken(), "用户的授权令牌不能为空");
|
||||||
|
Preconditions.checkNotNull(schisandraSocialUserDTO.getExpireIn(), "第三方用户的授权令牌的有效期不能为空");
|
||||||
|
Preconditions.checkNotNull(schisandraSocialUserDTO.getRefreshToken(), "刷新令牌不能为空");
|
||||||
|
Preconditions.checkNotNull(schisandraSocialUserDTO.getOpenId(), "第三方用户的 open id不能为空");
|
||||||
|
Preconditions.checkNotNull(schisandraSocialUserDTO.getUid(), "第三方用户的 ID不能为空");
|
||||||
|
Preconditions.checkNotNull(schisandraSocialUserDTO.getAccessCode(), "个别平台的授权信息不能为空");
|
||||||
|
Preconditions.checkNotNull(schisandraSocialUserDTO.getUnionId(), "第三方用户的 union id不能为空");
|
||||||
|
Preconditions.checkNotNull(schisandraSocialUserDTO.getScope(), "第三方用户授予的权限不能为空");
|
||||||
|
Preconditions.checkNotNull(schisandraSocialUserDTO.getTokenType(), "个别平台的授权信息不能为空");
|
||||||
|
Preconditions.checkNotNull(schisandraSocialUserDTO.getIdToken(), "id token不能为空");
|
||||||
|
Preconditions.checkNotNull(schisandraSocialUserDTO.getMacAlgorithm(), "小米平台用户的附带属性不能为空");
|
||||||
|
Preconditions.checkNotNull(schisandraSocialUserDTO.getMacKey(), "小米平台用户的附带属性不能为空");
|
||||||
|
Preconditions.checkNotNull(schisandraSocialUserDTO.getCode(), "用户的授权code不能为空");
|
||||||
|
Preconditions.checkNotNull(schisandraSocialUserDTO.getOauthToken(), "Twitter平台用户的附带属性不能为空");
|
||||||
|
Preconditions.checkNotNull(schisandraSocialUserDTO.getOauthTokenSecret(), "Twitter平台用户的附带属性不能为空");
|
||||||
|
Preconditions.checkNotNull(schisandraSocialUserDTO.getStatus(), "状态不能为空");
|
||||||
|
Preconditions.checkNotNull(schisandraSocialUserDTO.getExtJson(), "不能为空");
|
||||||
|
Preconditions.checkNotNull(schisandraSocialUserDTO.getCreatedBy(), "创建人不能为空");
|
||||||
|
Preconditions.checkNotNull(schisandraSocialUserDTO.getCreatedTime(), "创建时间不能为空");
|
||||||
|
Preconditions.checkNotNull(schisandraSocialUserDTO.getUpdateBy(), "更新人不能为空");
|
||||||
|
Preconditions.checkNotNull(schisandraSocialUserDTO.getUpdateTime(), "更新时间不能为空");
|
||||||
|
Preconditions.checkNotNull(schisandraSocialUserDTO.getIsDeleted(), "不能为空");
|
||||||
|
SchisandraSocialUserBO schisandraSocialUserBO = SchisandraSocialUserDTOConverter.INSTANCE.convertDTOToBO(schisandraSocialUserDTO);
|
||||||
|
return Result.ok(schisandraSocialUserDomainService.delete(schisandraSocialUserBO));
|
||||||
|
} catch (Exception e) {
|
||||||
|
log.error("SchisandraSocialUserController.delete.error:{}", e.getMessage(), e);
|
||||||
|
return Result.fail("删除社会用户信息表信息失败");
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
@@ -5,6 +5,9 @@ import com.schisandra.auth.application.dto.SchisandraAuthPermissionDTO;
|
|||||||
import com.schisandra.auth.domain.bo.SchisandraAuthPermissionBO;
|
import com.schisandra.auth.domain.bo.SchisandraAuthPermissionBO;
|
||||||
import org.mapstruct.Mapper;
|
import org.mapstruct.Mapper;
|
||||||
import org.mapstruct.factory.Mappers;
|
import org.mapstruct.factory.Mappers;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @description: 权限转换类
|
* @description: 权限转换类
|
||||||
* @author: landaiqing
|
* @author: landaiqing
|
||||||
@@ -33,4 +36,6 @@ public interface SchisandraAuthPermissionDTOConvert {
|
|||||||
*/
|
*/
|
||||||
SchisandraAuthPermissionDTO convertBOToDTO(SchisandraAuthPermissionBO authRoleBO);
|
SchisandraAuthPermissionDTO convertBOToDTO(SchisandraAuthPermissionBO authRoleBO);
|
||||||
|
|
||||||
|
List<SchisandraAuthPermissionDTO> convertBOListToDTOList(List<SchisandraAuthPermissionBO> authRoleBOList);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@@ -7,6 +7,8 @@ import com.schisandra.auth.domain.bo.SchisandraAuthUserBO;
|
|||||||
import org.mapstruct.Mapper;
|
import org.mapstruct.Mapper;
|
||||||
import org.mapstruct.factory.Mappers;
|
import org.mapstruct.factory.Mappers;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* ClassName:SchisandraAuthRoleDTOConvert
|
* ClassName:SchisandraAuthRoleDTOConvert
|
||||||
* Package:com.schisandra.auth.application.convert
|
* Package:com.schisandra.auth.application.convert
|
||||||
@@ -16,7 +18,7 @@ import org.mapstruct.factory.Mappers;
|
|||||||
* @Create:2024/4/4 - 21:40
|
* @Create:2024/4/4 - 21:40
|
||||||
* @Version: v1.0
|
* @Version: v1.0
|
||||||
*/
|
*/
|
||||||
@Mapper(componentModel = "spring")
|
@Mapper
|
||||||
public interface SchisandraAuthRoleDTOConverter {
|
public interface SchisandraAuthRoleDTOConverter {
|
||||||
|
|
||||||
SchisandraAuthRoleDTOConverter INSTANCE = Mappers.getMapper(SchisandraAuthRoleDTOConverter.class);
|
SchisandraAuthRoleDTOConverter INSTANCE = Mappers.getMapper(SchisandraAuthRoleDTOConverter.class);
|
||||||
@@ -39,5 +41,6 @@ public interface SchisandraAuthRoleDTOConverter {
|
|||||||
* @date: 2024/3/21 23:26
|
* @date: 2024/3/21 23:26
|
||||||
*/
|
*/
|
||||||
SchisandraAuthRoleDTO convertBOToDTO(SchisandraAuthRoleBO authRoleBO);
|
SchisandraAuthRoleDTO convertBOToDTO(SchisandraAuthRoleBO authRoleBO);
|
||||||
|
List<SchisandraAuthRoleDTO> convertBOListToDTOList(List<SchisandraAuthRoleBO> authRoleBOList);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@@ -6,6 +6,8 @@ import com.schisandra.auth.domain.bo.SchisandraAuthUserBO;
|
|||||||
import org.mapstruct.Mapper;
|
import org.mapstruct.Mapper;
|
||||||
import org.mapstruct.factory.Mappers;
|
import org.mapstruct.factory.Mappers;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* dto转换器
|
* dto转换器
|
||||||
*
|
*
|
||||||
@@ -34,5 +36,13 @@ public interface SchisandraAuthUserDTOConverter {
|
|||||||
* @date: 2024/6/6 22:09
|
* @date: 2024/6/6 22:09
|
||||||
*/
|
*/
|
||||||
SchisandraAuthUserDTO convertBOToDTO(SchisandraAuthUserBO schisandraAuthUserBO);
|
SchisandraAuthUserDTO convertBOToDTO(SchisandraAuthUserBO schisandraAuthUserBO);
|
||||||
|
/**
|
||||||
|
* @description: BO列表转DTO列表
|
||||||
|
* @param: [schisandraAuthUserBOList]
|
||||||
|
* @return: java.util.List<com.schisandra.auth.application.dto.SchisandraAuthUserDTO>
|
||||||
|
* @author zlg
|
||||||
|
* @date: 2024/7/17 11:14
|
||||||
|
*/
|
||||||
|
List<SchisandraAuthUserDTO> convertBOListToDTOList(List<SchisandraAuthUserBO> schisandraAuthUserBOList);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@@ -5,11 +5,13 @@ import com.schisandra.auth.domain.bo.SchisandraSocialUserBO;
|
|||||||
import org.mapstruct.Mapper;
|
import org.mapstruct.Mapper;
|
||||||
import org.mapstruct.factory.Mappers;
|
import org.mapstruct.factory.Mappers;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* dto转换器
|
* 社会用户信息表 dto转换器
|
||||||
*
|
*
|
||||||
* @author landaiqing
|
* @author zlg
|
||||||
* @since 2024-06-24 11:07:49
|
* @since 2024-07-17 11:53:29
|
||||||
*/
|
*/
|
||||||
@Mapper
|
@Mapper
|
||||||
public interface SchisandraSocialUserDTOConverter {
|
public interface SchisandraSocialUserDTOConverter {
|
||||||
@@ -18,5 +20,6 @@ public interface SchisandraSocialUserDTOConverter {
|
|||||||
|
|
||||||
SchisandraSocialUserBO convertDTOToBO(SchisandraSocialUserDTO schisandraSocialUserDTO);
|
SchisandraSocialUserBO convertDTOToBO(SchisandraSocialUserDTO schisandraSocialUserDTO);
|
||||||
SchisandraSocialUserDTO convertBOToDTO(SchisandraSocialUserBO schisandraSocialUserBO);
|
SchisandraSocialUserDTO convertBOToDTO(SchisandraSocialUserBO schisandraSocialUserBO);
|
||||||
|
List<SchisandraSocialUserDTO> convertBOToDTOList(List<SchisandraSocialUserBO> schisandraSocialUserBOList);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@@ -6,10 +6,10 @@ import java.io.Serializable;
|
|||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* dto
|
* 社会用户信息表 dto
|
||||||
*
|
*
|
||||||
* @author landaiqing
|
* @author zlg
|
||||||
* @since 2024-06-24 11:07:49
|
* @since 2024-07-17 11:53:29
|
||||||
*/
|
*/
|
||||||
@Data
|
@Data
|
||||||
public class SchisandraSocialUserDTO implements Serializable {
|
public class SchisandraSocialUserDTO implements Serializable {
|
||||||
|
@@ -3,9 +3,8 @@
|
|||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
<parent>
|
<parent>
|
||||||
<groupId>com.schisandra</groupId>
|
<groupId>com.schisandra</groupId>
|
||||||
<artifactId>schisandra-cloud-storage-auth</artifactId>
|
<artifactId>schisandra-cloud-storage-auth-application</artifactId>
|
||||||
<version>1.0-SNAPSHOT</version>
|
<version>1.0-SNAPSHOT</version>
|
||||||
<relativePath>../../pom.xml</relativePath>
|
|
||||||
</parent>
|
</parent>
|
||||||
<artifactId>schisandra-cloud-storage-auth-application-job</artifactId>
|
<artifactId>schisandra-cloud-storage-auth-application-job</artifactId>
|
||||||
<name>schisandra-cloud-storage-auth-application-job</name>
|
<name>schisandra-cloud-storage-auth-application-job</name>
|
||||||
|
@@ -3,9 +3,9 @@
|
|||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
<parent>
|
<parent>
|
||||||
<groupId>com.schisandra</groupId>
|
<groupId>com.schisandra</groupId>
|
||||||
<artifactId>schisandra-cloud-storage-auth</artifactId>
|
<artifactId>schisandra-cloud-storage-auth-application</artifactId>
|
||||||
<version>1.0-SNAPSHOT</version>
|
<version>1.0-SNAPSHOT</version>
|
||||||
<relativePath>../../pom.xml</relativePath>
|
<!-- <relativePath>../../pom.xml</relativePath>-->
|
||||||
</parent>
|
</parent>
|
||||||
<artifactId>schisandra-cloud-storage-auth-application-mq</artifactId>
|
<artifactId>schisandra-cloud-storage-auth-application-mq</artifactId>
|
||||||
<name>schisandra-cloud-storage-auth-application-mq</name>
|
<name>schisandra-cloud-storage-auth-application-mq</name>
|
||||||
|
@@ -5,10 +5,10 @@ import lombok.Data;
|
|||||||
import java.io.Serializable;
|
import java.io.Serializable;
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
/**
|
/**
|
||||||
* bo
|
* 社会用户信息表 bo
|
||||||
*
|
*
|
||||||
* @author landaiqing
|
* @author zlg
|
||||||
* @since 2024-06-24 11:07:49
|
* @since 2024-07-17 11:53:29
|
||||||
*/
|
*/
|
||||||
@Data
|
@Data
|
||||||
public class SchisandraSocialUserBO implements Serializable {
|
public class SchisandraSocialUserBO implements Serializable {
|
||||||
|
@@ -4,6 +4,9 @@ import com.schisandra.auth.domain.bo.SchisandraAuthPermissionBO;
|
|||||||
import com.schisandra.auth.infra.basic.entity.SchisandraAuthPermission;
|
import com.schisandra.auth.infra.basic.entity.SchisandraAuthPermission;
|
||||||
import org.mapstruct.Mapper;
|
import org.mapstruct.Mapper;
|
||||||
import org.mapstruct.factory.Mappers;
|
import org.mapstruct.factory.Mappers;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
@Mapper(componentModel = "spring")
|
@Mapper(componentModel = "spring")
|
||||||
public interface SchisandraAuthPermissionBOConverter {
|
public interface SchisandraAuthPermissionBOConverter {
|
||||||
SchisandraAuthPermissionBOConverter INSTANCE = Mappers.getMapper(SchisandraAuthPermissionBOConverter.class);
|
SchisandraAuthPermissionBOConverter INSTANCE = Mappers.getMapper(SchisandraAuthPermissionBOConverter.class);
|
||||||
@@ -23,4 +26,6 @@ public interface SchisandraAuthPermissionBOConverter {
|
|||||||
* @date: 2024/4/17 17:00
|
* @date: 2024/4/17 17:00
|
||||||
*/
|
*/
|
||||||
SchisandraAuthPermissionBO convertEntityToBO(SchisandraAuthPermission schisandraAuthPermission);
|
SchisandraAuthPermissionBO convertEntityToBO(SchisandraAuthPermission schisandraAuthPermission);
|
||||||
|
|
||||||
|
List<SchisandraAuthPermissionBO> convertEntityListToBOList(List<SchisandraAuthPermission> schisandraAuthPermissionList);
|
||||||
}
|
}
|
||||||
|
@@ -5,6 +5,8 @@ import com.schisandra.auth.infra.basic.entity.SchisandraAuthRole;
|
|||||||
import org.mapstruct.Mapper;
|
import org.mapstruct.Mapper;
|
||||||
import org.mapstruct.factory.Mappers;
|
import org.mapstruct.factory.Mappers;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* ClassName:SchisandraAuthRoleBOConverter
|
* ClassName:SchisandraAuthRoleBOConverter
|
||||||
* Package:com.schisandra.auth.domain.convert
|
* Package:com.schisandra.auth.domain.convert
|
||||||
@@ -35,4 +37,6 @@ public interface SchisandraAuthRoleBOConverter {
|
|||||||
* @date 2024/3/21 23:13
|
* @date 2024/3/21 23:13
|
||||||
*/
|
*/
|
||||||
SchisandraAuthRoleBO convertEntityToBO(SchisandraAuthRole schisandraAuthRole);
|
SchisandraAuthRoleBO convertEntityToBO(SchisandraAuthRole schisandraAuthRole);
|
||||||
|
|
||||||
|
List<SchisandraAuthRoleBO> convertEntityListToBOList(List<SchisandraAuthRole> schisandraAuthRoles);
|
||||||
}
|
}
|
||||||
|
@@ -6,6 +6,8 @@ import com.schisandra.auth.infra.basic.entity.SchisandraAuthUser;
|
|||||||
import org.mapstruct.Mapper;
|
import org.mapstruct.Mapper;
|
||||||
import org.mapstruct.factory.Mappers;
|
import org.mapstruct.factory.Mappers;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* bo转换器
|
* bo转换器
|
||||||
*
|
*
|
||||||
@@ -21,4 +23,5 @@ public interface SchisandraAuthUserBOConverter {
|
|||||||
|
|
||||||
SchisandraAuthUserBO convertEntityToBO(SchisandraAuthUser schisandraAuthUser);
|
SchisandraAuthUserBO convertEntityToBO(SchisandraAuthUser schisandraAuthUser);
|
||||||
|
|
||||||
|
List<SchisandraAuthUserBO>convertEntityListToBOList(List<SchisandraAuthUser> schisandraAuthUserList);
|
||||||
}
|
}
|
||||||
|
@@ -5,11 +5,13 @@ import com.schisandra.auth.infra.basic.entity.SchisandraSocialUser;
|
|||||||
import org.mapstruct.Mapper;
|
import org.mapstruct.Mapper;
|
||||||
import org.mapstruct.factory.Mappers;
|
import org.mapstruct.factory.Mappers;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* bo转换器
|
* 社会用户信息表 bo转换器
|
||||||
*
|
*
|
||||||
* @author landaiqing
|
* @author zlg
|
||||||
* @since 2024-06-24 11:07:49
|
* @since 2024-07-17 11:53:29
|
||||||
*/
|
*/
|
||||||
@Mapper
|
@Mapper
|
||||||
public interface SchisandraSocialUserBOConverter {
|
public interface SchisandraSocialUserBOConverter {
|
||||||
@@ -19,4 +21,6 @@ public interface SchisandraSocialUserBOConverter {
|
|||||||
SchisandraSocialUser convertBOToEntity(SchisandraSocialUserBO schisandraSocialUserBO);
|
SchisandraSocialUser convertBOToEntity(SchisandraSocialUserBO schisandraSocialUserBO);
|
||||||
SchisandraSocialUserBO convertEntityToBO(SchisandraSocialUser schisandraSocialUser);
|
SchisandraSocialUserBO convertEntityToBO(SchisandraSocialUser schisandraSocialUser);
|
||||||
|
|
||||||
|
List<SchisandraSocialUserBO> convertEntityListToBOList(List<SchisandraSocialUser> schisandraSocialUserList);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@@ -18,4 +18,7 @@ public interface SchisandraAuthPermissionDomainService {
|
|||||||
SchisandraAuthPermissionBO select(SchisandraAuthPermissionBO schisandraAuthPermissionBO);
|
SchisandraAuthPermissionBO select(SchisandraAuthPermissionBO schisandraAuthPermissionBO);
|
||||||
|
|
||||||
List<SchisandraAuthPermission> queryListByIds(List<String> permissionIdList);
|
List<SchisandraAuthPermission> queryListByIds(List<String> permissionIdList);
|
||||||
|
|
||||||
|
List<SchisandraAuthPermissionBO> selectAllUserList();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@@ -3,6 +3,8 @@ package com.schisandra.auth.domain.service;
|
|||||||
import com.schisandra.auth.domain.bo.SchisandraAuthRoleBO;
|
import com.schisandra.auth.domain.bo.SchisandraAuthRoleBO;
|
||||||
import com.schisandra.auth.infra.basic.entity.SchisandraAuthRole;
|
import com.schisandra.auth.infra.basic.entity.SchisandraAuthRole;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* ClassName:SchisandraAuthRoleDomainService
|
* ClassName:SchisandraAuthRoleDomainService
|
||||||
* Package:com.schisandra.auth.domain.service
|
* Package:com.schisandra.auth.domain.service
|
||||||
@@ -53,4 +55,13 @@ public interface SchisandraAuthRoleDomainService {
|
|||||||
Object select(SchisandraAuthRoleBO schisandraAuthRoleBO);
|
Object select(SchisandraAuthRoleBO schisandraAuthRoleBO);
|
||||||
|
|
||||||
SchisandraAuthRole queryByRoleId(String code);
|
SchisandraAuthRole queryByRoleId(String code);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @description:
|
||||||
|
* @param:
|
||||||
|
* @return:
|
||||||
|
* @author zlg
|
||||||
|
* @date: 2024/7/17 11:18
|
||||||
|
*/
|
||||||
|
List<SchisandraAuthRoleBO> selectAllRole();
|
||||||
}
|
}
|
||||||
|
@@ -10,6 +10,7 @@ import org.springframework.cache.annotation.CachePut;
|
|||||||
import org.springframework.cache.annotation.Cacheable;
|
import org.springframework.cache.annotation.Cacheable;
|
||||||
|
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 用户领域service
|
* 用户领域service
|
||||||
@@ -20,6 +21,7 @@ import java.util.HashMap;
|
|||||||
public interface SchisandraAuthUserDomainService {
|
public interface SchisandraAuthUserDomainService {
|
||||||
|
|
||||||
|
|
||||||
|
List<SchisandraAuthUserBO> listAllUsers();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @description: 找回密码
|
* @description: 找回密码
|
||||||
|
@@ -2,6 +2,8 @@ package com.schisandra.auth.domain.service;
|
|||||||
|
|
||||||
import com.schisandra.auth.domain.bo.SchisandraSocialUserBO;
|
import com.schisandra.auth.domain.bo.SchisandraSocialUserBO;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 领域service
|
* 领域service
|
||||||
*
|
*
|
||||||
@@ -24,5 +26,13 @@ public interface SchisandraSocialUserDomainService {
|
|||||||
* 删除 信息
|
* 删除 信息
|
||||||
*/
|
*/
|
||||||
Boolean delete(SchisandraSocialUserBO schisandraSocialUserBO);
|
Boolean delete(SchisandraSocialUserBO schisandraSocialUserBO);
|
||||||
|
/**
|
||||||
|
* @description: 查询全部social
|
||||||
|
* @param:
|
||||||
|
* @return:
|
||||||
|
* @author zlg
|
||||||
|
* @date: 2024/7/17 12:07
|
||||||
|
*/
|
||||||
|
public List<SchisandraSocialUserBO> queryAll();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@@ -133,6 +133,11 @@ public class SchisandraAuthPermissionDomainServiceImpl implements SchisandraAuth
|
|||||||
return schisandraAuthPermissionBO1;
|
return schisandraAuthPermissionBO1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<SchisandraAuthPermissionBO> selectAllUserList() {
|
||||||
|
return SchisandraAuthPermissionBOConverter.INSTANCE.convertEntityListToBOList(schisandraAuthPermissionService.queryAll());
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<SchisandraAuthPermission> queryListByIds(List<String> permissionIdList) {
|
public List<SchisandraAuthPermission> queryListByIds(List<String> permissionIdList) {
|
||||||
return schisandraAuthPermissionService.queryListByIds(permissionIdList);
|
return schisandraAuthPermissionService.queryListByIds(permissionIdList);
|
||||||
|
@@ -9,6 +9,7 @@ import lombok.extern.slf4j.Slf4j;
|
|||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
import javax.annotation.Resource;
|
import javax.annotation.Resource;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* ClassName:SchisandraAuthRoleDomainServiceImpl
|
* ClassName:SchisandraAuthRoleDomainServiceImpl
|
||||||
@@ -58,4 +59,10 @@ public class SchisandraAuthRoleDomainServiceImpl implements SchisandraAuthRoleDo
|
|||||||
public SchisandraAuthRole queryByRoleId(String code) {
|
public SchisandraAuthRole queryByRoleId(String code) {
|
||||||
return schisandraAuthRoleService.queryByRoleId(code);
|
return schisandraAuthRoleService.queryByRoleId(code);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<SchisandraAuthRoleBO> selectAllRole() {
|
||||||
|
List<SchisandraAuthRole> schisandraAuthRoles = schisandraAuthRoleService.selectAllRole();
|
||||||
|
return SchisandraAuthRoleBOConverter.INSTANCE.convertEntityListToBOList(schisandraAuthRoles);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@@ -71,6 +71,12 @@ public class SchisandraAuthUserDomainServiceImpl implements SchisandraAuthUserDo
|
|||||||
private SchisandraAuthPermissionService schisandraAuthPermissionService;
|
private SchisandraAuthPermissionService schisandraAuthPermissionService;
|
||||||
|
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<SchisandraAuthUserBO> listAllUsers() {
|
||||||
|
List<SchisandraAuthUser> schisandraAuthUsers = schisandraAuthUserService.listAllUsers();
|
||||||
|
return SchisandraAuthUserBOConverter.INSTANCE.convertEntityListToBOList(schisandraAuthUsers);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @description: 找回密码
|
* @description: 找回密码
|
||||||
* @param: [schisandraAuthUserBO]
|
* @param: [schisandraAuthUserBO]
|
||||||
|
@@ -10,6 +10,7 @@ import lombok.extern.slf4j.Slf4j;
|
|||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
import javax.annotation.Resource;
|
import javax.annotation.Resource;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 领域service实现了
|
* 领域service实现了
|
||||||
@@ -45,4 +46,10 @@ public class SchisandraSocialUserDomainServiceImpl implements SchisandraSocialUs
|
|||||||
return schisandraSocialUserService.update(schisandraSocialUser) > 0;
|
return schisandraSocialUserService.update(schisandraSocialUser) > 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<SchisandraSocialUserBO> queryAll() {
|
||||||
|
List<SchisandraSocialUser> schisandraSocialUsers = schisandraSocialUserService.queryAll();
|
||||||
|
return SchisandraSocialUserBOConverter.INSTANCE.convertEntityListToBOList(schisandraSocialUsers);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@@ -44,6 +44,7 @@ public interface SchisandraAuthPermissionService {
|
|||||||
* @return 是否成功
|
* @return 是否成功
|
||||||
*/
|
*/
|
||||||
boolean deleteById(Long id);
|
boolean deleteById(Long id);
|
||||||
|
List<SchisandraAuthPermission> queryAll();
|
||||||
|
|
||||||
List<SchisandraAuthPermission> queryListByIds(List<String> permissionIdList);
|
List<SchisandraAuthPermission> queryListByIds(List<String> permissionIdList);
|
||||||
}
|
}
|
||||||
|
@@ -4,6 +4,8 @@ import com.schisandra.auth.infra.basic.entity.SchisandraAuthRole;
|
|||||||
import org.springframework.data.domain.Page;
|
import org.springframework.data.domain.Page;
|
||||||
import org.springframework.data.domain.PageRequest;
|
import org.springframework.data.domain.PageRequest;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* (SchisandraAuthRole)表服务接口
|
* (SchisandraAuthRole)表服务接口
|
||||||
*
|
*
|
||||||
@@ -45,5 +47,7 @@ public interface SchisandraAuthRoleService {
|
|||||||
*/
|
*/
|
||||||
boolean deleteById(String id);
|
boolean deleteById(String id);
|
||||||
|
|
||||||
|
|
||||||
|
List<SchisandraAuthRole> selectAllRole();
|
||||||
SchisandraAuthRole queryByRoleId(String code);
|
SchisandraAuthRole queryByRoleId(String code);
|
||||||
}
|
}
|
||||||
|
@@ -2,6 +2,8 @@ package com.schisandra.auth.infra.basic.service;
|
|||||||
|
|
||||||
import com.schisandra.auth.infra.basic.entity.SchisandraAuthUser;
|
import com.schisandra.auth.infra.basic.entity.SchisandraAuthUser;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* (SchisandraAuthUser)表服务接口
|
* (SchisandraAuthUser)表服务接口
|
||||||
*
|
*
|
||||||
@@ -11,6 +13,7 @@ import com.schisandra.auth.infra.basic.entity.SchisandraAuthUser;
|
|||||||
public interface SchisandraAuthUserService {
|
public interface SchisandraAuthUserService {
|
||||||
|
|
||||||
|
|
||||||
|
List<SchisandraAuthUser> listAllUsers();
|
||||||
|
|
||||||
SchisandraAuthUser queryByEmail(String email);
|
SchisandraAuthUser queryByEmail(String email);
|
||||||
SchisandraAuthUser queryByPhone(String phone);
|
SchisandraAuthUser queryByPhone(String phone);
|
||||||
|
@@ -2,6 +2,8 @@ package com.schisandra.auth.infra.basic.service;
|
|||||||
|
|
||||||
import com.schisandra.auth.infra.basic.entity.SchisandraSocialUser;
|
import com.schisandra.auth.infra.basic.entity.SchisandraSocialUser;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 表服务接口
|
* 表服务接口
|
||||||
*
|
*
|
||||||
@@ -10,6 +12,8 @@ import com.schisandra.auth.infra.basic.entity.SchisandraSocialUser;
|
|||||||
*/
|
*/
|
||||||
public interface SchisandraSocialUserService {
|
public interface SchisandraSocialUserService {
|
||||||
|
|
||||||
|
List<SchisandraSocialUser> queryAll();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 通过ID查询单条数据
|
* 通过ID查询单条数据
|
||||||
*
|
*
|
||||||
|
@@ -70,6 +70,11 @@ public class SchisandraAuthPermissionServiceImpl extends CacheableServiceImpl<Sc
|
|||||||
return this.schisandraAuthPermissionDao.deleteById(id) > 0;
|
return this.schisandraAuthPermissionDao.deleteById(id) > 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<SchisandraAuthPermission> queryAll() {
|
||||||
|
return this.schisandraAuthPermissionDao.selectAll();
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<SchisandraAuthPermission> queryListByIds(List<String> permissionIdList) {
|
public List<SchisandraAuthPermission> queryListByIds(List<String> permissionIdList) {
|
||||||
return schisandraAuthPermissionDao.selectListByIds(permissionIdList);
|
return schisandraAuthPermissionDao.selectListByIds(permissionIdList);
|
||||||
|
@@ -7,6 +7,7 @@ import com.schisandra.auth.infra.basic.service.SchisandraAuthRoleService;
|
|||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
import javax.annotation.Resource;
|
import javax.annotation.Resource;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* (SchisandraAuthRole)表服务实现类
|
* (SchisandraAuthRole)表服务实现类
|
||||||
@@ -72,4 +73,9 @@ public class SchisandraAuthRoleServiceImpl implements SchisandraAuthRoleService
|
|||||||
public SchisandraAuthRole queryByRoleId(String code) {
|
public SchisandraAuthRole queryByRoleId(String code) {
|
||||||
return schisandraAuthRoleDao.selectOneByCondition(SchisandraAuthRoleTableDef.SCHISANDRA_AUTH_ROLE.ID.eq(code));
|
return schisandraAuthRoleDao.selectOneByCondition(SchisandraAuthRoleTableDef.SCHISANDRA_AUTH_ROLE.ID.eq(code));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<SchisandraAuthRole> selectAllRole() {
|
||||||
|
return schisandraAuthRoleDao.selectAll();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@@ -9,6 +9,7 @@ import com.schisandra.auth.infra.basic.service.SchisandraAuthUserService;
|
|||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
import javax.annotation.Resource;
|
import javax.annotation.Resource;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* (SchisandraAuthUser)表服务实现类
|
* (SchisandraAuthUser)表服务实现类
|
||||||
@@ -22,6 +23,11 @@ public class SchisandraAuthUserServiceImpl implements SchisandraAuthUserService
|
|||||||
@Resource
|
@Resource
|
||||||
private SchisandraAuthUserDao schisandraAuthUserDao;
|
private SchisandraAuthUserDao schisandraAuthUserDao;
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<SchisandraAuthUser> listAllUsers() {
|
||||||
|
return schisandraAuthUserDao.selectAll();
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public SchisandraAuthUser queryByEmail(String email) {
|
public SchisandraAuthUser queryByEmail(String email) {
|
||||||
return schisandraAuthUserDao.selectOneByCondition(SchisandraAuthUserTableDef.SCHISANDRA_AUTH_USER.EMAIL.eq(email)
|
return schisandraAuthUserDao.selectOneByCondition(SchisandraAuthUserTableDef.SCHISANDRA_AUTH_USER.EMAIL.eq(email)
|
||||||
|
@@ -7,6 +7,7 @@ import com.schisandra.auth.infra.basic.service.SchisandraSocialUserService;
|
|||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
import javax.annotation.Resource;
|
import javax.annotation.Resource;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 表服务实现类
|
* 表服务实现类
|
||||||
@@ -20,6 +21,11 @@ public class SchisandraSocialUserServiceImpl implements SchisandraSocialUserServ
|
|||||||
@Resource
|
@Resource
|
||||||
private SchisandraSocialUserDao schisandraSocialUserDao;
|
private SchisandraSocialUserDao schisandraSocialUserDao;
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<SchisandraSocialUser> queryAll() {
|
||||||
|
return schisandraSocialUserDao.selectAll();
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 通过ID查询单条数据
|
* 通过ID查询单条数据
|
||||||
*
|
*
|
||||||
|
@@ -0,0 +1,22 @@
|
|||||||
|
package com.schisandra.oss.api;
|
||||||
|
import com.schisandra.oss.entity.Result;
|
||||||
|
import org.springframework.cloud.openfeign.FeignClient;
|
||||||
|
import org.springframework.web.bind.annotation.GetMapping;
|
||||||
|
import org.springframework.web.bind.annotation.PostMapping;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
|
||||||
|
@FeignClient("schisandra-cloud-storage-oss")
|
||||||
|
public interface SchisandraOssFeignService {
|
||||||
|
@GetMapping("/oss/ali/returnAll")
|
||||||
|
Result returnAliAll();
|
||||||
|
|
||||||
|
@GetMapping("/oss/minio/returnAll")
|
||||||
|
Result returnMinioAll();
|
||||||
|
|
||||||
|
@GetMapping("/oss/tencent/returnAll")
|
||||||
|
Result returnTencentAll();
|
||||||
|
|
||||||
|
@GetMapping("/oss/qiniu/returnAll")
|
||||||
|
Result returnQiniuAll();
|
||||||
|
}
|
Reference in New Issue
Block a user