| | |
| | | */ |
| | | 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; |
| | |
| | | public class ApproveEventController { |
| | | |
| | | private final ApproveEventService approveEventService; |
| | | private final WechatSendHistoryService wechatSendHistoryService; |
| | | private final ApplicationEventPublisher applicationEventPublisher; |
| | | |
| | | @Log("导出数据") |
| | |
| | | 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); |
| | | } |
| | | } |