Преглед изворни кода

fix(账密登录):
账密登录时生成多个token
feat(任务调度):
新增任务调度

18339543638 пре 2 година
родитељ
комит
5eab24aef3

+ 67 - 0
tr-modules/tr-module-quartz/pom.xml

@@ -0,0 +1,67 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+    <parent>
+        <artifactId>tr-modules</artifactId>
+        <groupId>cn.tr</groupId>
+        <version>${revision}</version>
+    </parent>
+    <modelVersion>4.0.0</modelVersion>
+    <version>${revision}</version>
+
+    <artifactId>tr-module-quartz</artifactId>
+
+    <description>任务调度模块</description>
+
+    <dependencies>
+        <dependency>
+            <groupId>cn.tr</groupId>
+            <artifactId>tr-framework</artifactId>
+        </dependency>
+
+        <dependency>
+            <groupId>cn.tr</groupId>
+            <artifactId>tr-spring-boot-starter-plugin-doc</artifactId>
+        </dependency>
+
+        <dependency>
+            <groupId>cn.tr</groupId>
+            <artifactId>tr-spring-boot-starter-plugin-web</artifactId>
+        </dependency>
+
+        <dependency>
+            <groupId>cn.tr</groupId>
+            <artifactId>tr-spring-boot-starter-plugin-mybatis</artifactId>
+        </dependency>
+
+
+        <dependency>
+            <groupId>cn.tr</groupId>
+            <artifactId>tr-spring-boot-starter-plugin-satoken</artifactId>
+        </dependency>
+
+        <dependency>
+            <groupId>cn.tr</groupId>
+            <artifactId>tr-spring-boot-starter-plugin-operatelog</artifactId>
+        </dependency>
+
+        <dependency>
+            <groupId>org.apache.commons</groupId>
+            <artifactId>commons-lang3</artifactId>
+        </dependency>
+
+        <dependency>
+            <groupId>org.springframework.cloud</groupId>
+            <artifactId>spring-cloud-starter-bus-amqp</artifactId>
+        </dependency>
+
+        <!-- 定时任务 -->
+        <!-- 引入 Quartz 依赖-->
+        <dependency>
+            <groupId>org.springframework.boot</groupId>
+            <artifactId>spring-boot-starter-quartz</artifactId>
+        </dependency>
+
+    </dependencies>
+</project>

+ 28 - 0
tr-modules/tr-module-quartz/src/main/java/cn/tr/module/quartz/mapper/SysJobMapper.java

@@ -0,0 +1,28 @@
+package cn.tr.module.quartz.mapper;
+
+import cn.tr.module.quartz.job.po.SysJobPO;
+import cn.tr.module.quartz.job.dto.SysJobDTO;
+import org.mapstruct.Mapper;
+import org.mapstruct.factory.Mappers;
+
+import java.util.List;
+
+/**
+* 定时任务调度表映射工具
+*
+* @author lf
+* @date  2023/05/05 10:55
+**/
+@Mapper
+public interface SysJobMapper {
+    SysJobMapper INSTANCE = Mappers.getMapper(SysJobMapper.class);
+
+    SysJobPO convertPO(SysJobDTO source);
+
+    SysJobDTO convertDto(SysJobPO source);
+
+    List<SysJobDTO> convertDtoList(List<SysJobPO> source);
+
+    List<SysJobPO> convertPOList(List<SysJobDTO> source);
+
+}

+ 0 - 1
tr-modules/tr-module-system/src/main/java/cn/tr/module/sys/oauth2/controller/CurrentUserController.java

@@ -17,7 +17,6 @@ import lombok.AllArgsConstructor;
 import org.springframework.web.bind.annotation.GetMapping;
 import org.springframework.web.bind.annotation.GetMapping;
 import org.springframework.web.bind.annotation.RequestMapping;
 import org.springframework.web.bind.annotation.RequestMapping;
 import org.springframework.web.bind.annotation.RestController;
 import org.springframework.web.bind.annotation.RestController;
-
 import java.util.Collection;
 import java.util.Collection;
 import java.util.List;
 import java.util.List;