| | |
| | | public class AliPushController { |
| | | |
| | | @Autowired |
| | | private RedisService redisService; |
| | | @Autowired |
| | | private AliPushUtil aliPushUtil; |
| | | |
| | | /** |
| | |
| | | * @return |
| | | */ |
| | | @GetMapping("/base/v1/aliPush/test") |
| | | public R<String> test() throws Exception { |
| | | String s = aliPushUtil.pushMessage(1, "13540694412", "测试", "{\"content\":\"测试消息\",\"strategy\":1\"type\":1,\"id\":1}"); |
| | | public R<String> test(){ |
| | | String s = aliPushUtil.pushMessage(1, "13540694412", "测试", "{\"content\":\"测试消息\",\"strategy\":1\"type\":1,\"id\":1}","NOTICE"); |
| | | return R.ok(s); |
| | | } |
| | | |
| | |
| | | */ |
| | | @PostMapping("/inner/v1/aliPush/pushMessage") |
| | | public R<String> pushMessage(@RequestBody AliPushMessageDTO dto) { |
| | | String result = aliPushUtil.pushMessage(dto.getDeviceType(), dto.getAccount(), dto.getTitle(), dto.getBody()); |
| | | String result = aliPushUtil.pushMessage(dto.getDeviceType(), dto.getAccount(), dto.getTitle(), dto.getBody(),dto.getPushType()); |
| | | return R.ok(result); |
| | | } |
| | | |