From 4d730af0447c686133130d0116a0fa3dd82c2dca Mon Sep 17 00:00:00 2001
From: BAOLH <baolh@yhzhg.cn>
Date: Tue, 10 Nov 2026 01:41:03 +0000
Subject: [PATCH] Merge branch 'wcd-2411-update' into wcd

---
 eladmin-master/eladmin-system/src/main/java/me/zhengjie/modules/temp/Temp.java |   46 ++++++++++++++++++++++++++++++++++++++++++----
 1 files changed, 42 insertions(+), 4 deletions(-)

diff --git a/eladmin-master/eladmin-system/src/main/java/me/zhengjie/modules/temp/Temp.java b/eladmin-master/eladmin-system/src/main/java/me/zhengjie/modules/temp/Temp.java
index 11efb70..3b0575e 100644
--- a/eladmin-master/eladmin-system/src/main/java/me/zhengjie/modules/temp/Temp.java
+++ b/eladmin-master/eladmin-system/src/main/java/me/zhengjie/modules/temp/Temp.java
@@ -4,20 +4,23 @@
 import io.swagger.annotations.ApiOperation;
 import lombok.RequiredArgsConstructor;
 import me.zhengjie.annotation.Log;
+import me.zhengjie.annotation.rest.AnonymousGetMapping;
+import me.zhengjie.annotation.rest.AnonymousPostMapping;
 import me.zhengjie.annotation.rest.AnonymousPutMapping;
 import me.zhengjie.modules.project.domain.Project;
 import me.zhengjie.modules.project.repository.ProjectRepository;
-import me.zhengjie.modules.project.repository.ProjectTypeRepository;
-import me.zhengjie.modules.project.service.ProjectService;
-import me.zhengjie.modules.project.service.dto.ProjectDto;
 import me.zhengjie.modules.project.service.dto.ProjectQueryCriteria;
-import me.zhengjie.modules.project.service.mapstruct.ProjectMapper;
+import me.zhengjie.modules.temp.service.WechatRobotService;
+import me.zhengjie.modules.temp.service.WechatSendHistoryService;
 import me.zhengjie.utils.QueryHelp;
 import org.springframework.http.HttpStatus;
 import org.springframework.http.ResponseEntity;
 import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RequestParam;
 import org.springframework.web.bind.annotation.RestController;
 
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
 import java.util.List;
 
 @RestController
@@ -27,6 +30,8 @@
 public class Temp {
 
     private final ProjectRepository projectRepository;
+    private final WechatSendHistoryService wechatSendHistoryService;
+    private final WechatRobotService wechatRobotService;
 
     @AnonymousPutMapping(value = "/updateProjectLiableUserId")
     @Log("修改项目责任人ID")
@@ -45,4 +50,37 @@
 
         return new ResponseEntity<>("", HttpStatus.OK);
     }
+
+    @AnonymousGetMapping(value = "/wechat/approval/backUrl")
+    @Log("企业微信验证回调URL")
+    @ApiOperation("企业微信验证回调URL")
+    public void approvalBack(@RequestParam(value = "msg_signature") String msgSignature, @RequestParam(value = "timestamp") String timestamp,
+                                               @RequestParam(value = "nonce") String nonce, @RequestParam(value = "echostr") String echostr, HttpServletResponse response){
+        wechatSendHistoryService.approvalBack(msgSignature, timestamp, nonce, echostr, response);
+    }
+
+    @AnonymousPostMapping(value = "/wechat/approval/backUrl")
+    @Log("处理企业微信审批回调事件")
+    @ApiOperation("处理企业微信审批回调事件")
+    public ResponseEntity<Object> handleApprovalCallback(@RequestParam(value = "msg_signature") String msgSignature, @RequestParam(value = "timestamp") String timestamp,
+                                                  @RequestParam(value = "nonce") String nonce, HttpServletRequest request, HttpServletResponse response){
+        wechatSendHistoryService.handleApprovalCallback(msgSignature, timestamp, nonce, request, response);
+        return new ResponseEntity<>(HttpStatus.OK);
+    }
+
+    @AnonymousGetMapping(value = "/wechat/robot/backUrl")
+    @Log("企业微信智能机器人验证回调URL")
+    @ApiOperation("企业微信智能机器人验证回调URL")
+    public void robotBack(@RequestParam(value = "msg_signature") String msgSignature, @RequestParam(value = "timestamp") String timestamp,
+                             @RequestParam(value = "nonce") String nonce, @RequestParam(value = "echostr") String echostr, HttpServletResponse response){
+        wechatRobotService.robotBack(msgSignature, timestamp, nonce, echostr, response);
+    }
+
+    @AnonymousPostMapping(value = "/wechat/robot/backUrl")
+    @Log("处理企业微信智能机器人回调事件")
+    @ApiOperation("处理企业微信智能机器人回调事件")
+    public ResponseEntity<Object> handleRobotCallback(@RequestParam(value = "msg_signature") String msgSignature, @RequestParam(value = "timestamp") String timestamp,
+                                                         @RequestParam(value = "nonce") String nonce, HttpServletRequest request, HttpServletResponse response){
+        return new ResponseEntity<>(wechatRobotService.handleRobotCallback(msgSignature, timestamp, nonce, request, response), HttpStatus.OK);
+    }
 }

--
Gitblit v1.9.3