| 1234567891011121314151617181920212223242526272829303132333435 |
- package com.ruoyi.app.utils;
- import cn.hutool.http.HttpUtil;
- public class PayPush {
- //用户端推送
- public void apppush(String cid,String title, String content, String body){
- System.out.println("用户端推送cid:"+cid);
- String url = "https://fc-mp-20ccbe79-10f8-41d7-a06c-c42581f351c1.next.bspapp.com/push?cid="+cid+
- "&title="+title+"&content="+content+"&payload="+body;
- String res="";
- res = HttpUtil.get(url);
- //JSONObject jsonObject = JSON.parseObject(res);
- System.out.println("=========================1111111111111111"+res);
- }
- //骑手端推送
- public void qspush(String cid,String title, String content, String body){
- String url = "https://fc-mp-20ccbe79-10f8-41d7-a06c-c42581f351c1.next.bspapp.com/ptpush?cid="+cid+
- "&title="+title+"&content="+content+"&payload="+body+"&sound=pushsound.caf";
- String res="";
- res = HttpUtil.get(url);
- //JSONObject jsonObject = JSON.parseObject(res);
- System.out.println("=========================用户推送"+res);
- }
- //商家端推送
- public void shpush(String cid,String title, String content, String body){
- System.out.println("商家cid:"+cid);
- String url = "https://fc-mp-20ccbe79-10f8-41d7-a06c-c42581f351c1.next.bspapp.com/sjpush?cid="+cid+
- "&title="+title+"&content="+content+"&payload="+body;
- String res="";
- res = HttpUtil.get(url);
- //JSONObject jsonObject = JSON.parseObject(res);
- System.out.println("=========================商家推送"+res);
- }
- }
|