| | |
| | | package com.ruoyi.web.controller.sms; |
| | | |
| | | import com.ruoyi.common.annotation.Anonymous; |
| | | import com.ruoyi.common.core.domain.AjaxResult; |
| | | import com.ruoyi.system.service.IQyWechatService; |
| | | import com.ruoyi.system.service.ISysTaskService; |
| | | import com.ruoyi.system.service.IWechatTaskNotifyService; |
| | | import org.apache.ibatis.annotations.Param; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.validation.annotation.Validated; |
| | | import org.springframework.web.bind.annotation.PostMapping; |
| | | import org.springframework.web.bind.annotation.RequestBody; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import java.util.List; |
| | | |
| | |
| | | |
| | | @Autowired |
| | | private IWechatTaskNotifyService wechatTaskNotifyService; |
| | | |
| | | @Autowired |
| | | private IQyWechatService qyWechatService; |
| | | |
| | | @Autowired |
| | | private ISysTaskService taskService; |
| | | @Anonymous |
| | | @PostMapping("/sendWeiXin") |
| | | public String notify(@RequestBody @Validated SendTaskReq req) { |
| | |
| | | System.out.println(result); |
| | | return "success"; |
| | | } |
| | | |
| | | @Anonymous() |
| | | @GetMapping("/dispatchSyncEvent") |
| | | public Boolean dispatchSyncEvent(@RequestParam Long taskId) { |
| | | return taskService.dispatchSyncEvent(taskId); |
| | | } |
| | | |
| | | @Anonymous() |
| | | @PostMapping("sendQyWeiXin") |
| | | public String sendQyWeiXin(@RequestBody @Validated SendTaskReq req) { |
| | | |
| | | |
| | | String title="医疗运转单派送"; |
| | | String content="您有新的医疗运转单派送,请及时处理"; |
| | | String notifyUrl="https://sys.966120.com.cn/m_DispatchOrder.gds?dispatchId=102311"; |
| | | java.lang.Boolean result =qyWechatService.sendNotifyMessage(req.getUserId(), title,content,notifyUrl); |
| | | System.out.println(result); |
| | | return "success"; |
| | | |
| | | } |
| | | } |