feat: 钉钉消息开发
This commit is contained in:
@@ -17,4 +17,12 @@
|
||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||
</properties>
|
||||
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>com.xiang.app</groupId>
|
||||
<artifactId>xservice-core</artifactId>
|
||||
<version>1.0-SNAPSHOT</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
</project>
|
||||
@@ -12,7 +12,8 @@ import org.springframework.boot.context.properties.ConfigurationPropertiesScan;
|
||||
*/
|
||||
@SpringBootApplication
|
||||
@ConfigurationPropertiesScan(basePackages = {
|
||||
"com.xiang.xservice.logger"
|
||||
"com.xiang.xservice.logger",
|
||||
"com.xiang.app.common.config",
|
||||
})
|
||||
public class Application {
|
||||
|
||||
|
||||
@@ -0,0 +1,29 @@
|
||||
package com.xiang.app.server.jntyzx;
|
||||
|
||||
import com.xiang.app.common.service.dingtalk.JtDingTalkFactory;
|
||||
import com.xiang.app.modules.jntyzx.service.IUserTokenInfoService;
|
||||
import com.xiang.xservice.basic.common.resp.Result;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RequestParam;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
/**
|
||||
* @Author: xiang
|
||||
* @Date: 2026-01-04 14:56
|
||||
*/
|
||||
@RestController
|
||||
@RequiredArgsConstructor
|
||||
@RequestMapping("/open/jt/token")
|
||||
public class JtTokenServer {
|
||||
|
||||
private final IUserTokenInfoService userTokenInfoService;
|
||||
|
||||
@GetMapping("/flushSingleUser")
|
||||
public Result<Void> flushSingleUser(@RequestParam("username") String username, @RequestParam("token") String token) {
|
||||
userTokenInfoService.updateTokenByName(username, token);
|
||||
return Result.success();
|
||||
}
|
||||
|
||||
}
|
||||
@@ -28,4 +28,14 @@ spring:
|
||||
max-active: 8
|
||||
max-idle: 8
|
||||
min-idle: 0
|
||||
max-wait: 1000
|
||||
max-wait: 1000
|
||||
|
||||
dingtalk:
|
||||
robot:
|
||||
properties:
|
||||
venue:
|
||||
name: 江南体育中心通知群
|
||||
token: 6a218646972c684c75832b0229ea93a234778af537d7469ce96bef290faf530e
|
||||
secret: SEC9018755ba86d3e5c1ed2fbfa1d6953d84bb2a6c8ebe7ed4e318457bfed5e0465
|
||||
users:
|
||||
- 450841600726084717
|
||||
Reference in New Issue
Block a user