puzhibing
2026-02-28 e8cd57fc46fa84b0c095f7e93cb348c014d06eb4
xp-robotaxi-push-message-boot/src/main/java/com/xiaopeng/pushMessage/controller/AliPushController.java
@@ -14,8 +14,6 @@
public class AliPushController {
    @Autowired
    private RedisService redisService;
    @Autowired
    private AliPushUtil aliPushUtil;
    /**
@@ -23,8 +21,17 @@
     * @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\":\"车辆川A12345在天府新谷发生的紧急事故即将超时,剩余时间5分钟,请及时到达现场!\",\"strategy\":2\"type\":7,\"id\":1}","NOTICE");
        return R.ok(s);
    }
    /**
     * 运维端消息推送测试
     * @return
     */
    @GetMapping("/base/v1/aliPush/test1")
    public R<String> test1(){
        String s = aliPushUtil.pushMessage(1, "13540694412", "APP版本更新提示", "{\"content\":\"新版本上线啦!请前往更新。\",\"strategy\":8\"type\":0,\"id\":0}","MESSAGE");
        return R.ok(s);
    }
@@ -34,7 +41,7 @@
     */
    @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);
    }