BAOLH
2025-05-23 40482e781583abb9a9ac0fb0e5830131169d336c
eladmin-master/eladmin-system/src/main/java/me/zhengjie/modules/approval/rest/ApproveEventController.java
@@ -15,12 +15,12 @@
*/
package me.zhengjie.modules.approval.rest;
import me.zhengjie.annotation.AnonymousAccess;
import me.zhengjie.annotation.Log;
import me.zhengjie.modules.approval.domain.ApproveEvent;
import me.zhengjie.modules.approval.service.ApproveEventService;
import me.zhengjie.modules.approval.service.dto.ApproveEventQueryCriteria;
import me.zhengjie.modules.temp.event.ChangeApprovalStatusEvent;
import me.zhengjie.modules.temp.service.WechatSendHistoryService;
import org.springframework.context.ApplicationEventPublisher;
import org.springframework.data.domain.Pageable;
import lombok.RequiredArgsConstructor;
@@ -45,6 +45,7 @@
public class ApproveEventController {
    private final ApproveEventService approveEventService;
    private final WechatSendHistoryService wechatSendHistoryService;
    private final ApplicationEventPublisher applicationEventPublisher;
    @Log("导出数据")
@@ -89,11 +90,16 @@
        return new ResponseEntity<>(HttpStatus.OK);
    }
    @AnonymousAccess
    @GetMapping(value = "/test/{id}")
    public ResponseEntity<Object> test(@PathVariable Long id) {
    @GetMapping(value = "/changeById/{id}")
    public ResponseEntity<Object> changeById(@PathVariable Long id) {
        ChangeApprovalStatusEvent event = new ChangeApprovalStatusEvent(new Object(), id);
        applicationEventPublisher.publishEvent(event);
        return new ResponseEntity<>(HttpStatus.OK);
    }
    @GetMapping(value = "/changeBySpNo/{spNo}")
    public ResponseEntity<Object> changeBySpNo(@PathVariable String spNo) {
        wechatSendHistoryService.handleWechatSendHistoryBySpNo(spNo);
        return new ResponseEntity<>(HttpStatus.OK);
    }
}