feat: 钉钉消息开发

This commit is contained in:
Xiang
2026-01-04 16:54:01 +08:00
parent 04ae78e3c5
commit 4e0b4983c4
15 changed files with 670 additions and 2 deletions

View File

@@ -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 {

View File

@@ -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();
}
}

View File

@@ -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