package com.ruoyi.web.controller.sms;
|
|
import com.ruoyi.common.annotation.Anonymous;
|
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 java.util.List;
|
|
@Anonymous
|
@RestController
|
@RequestMapping("/system/notify")
|
public class NotifyController {
|
|
@Autowired
|
private IWechatTaskNotifyService wechatTaskNotifyService;
|
@Anonymous
|
@PostMapping("/sendWeiXin")
|
public String notify(@RequestBody @Validated SendTaskReq req) {
|
List<Long> userIds = new java.util.ArrayList<>();
|
userIds.add(req.getUserId());
|
Integer result=wechatTaskNotifyService.sendTaskNotifyMessage(req.getTaskId(), userIds,null);
|
System.out.println(result);
|
return "success";
|
}
|
}
|