PayPush.java 1.6 KB

1234567891011121314151617181920212223242526272829303132333435
  1. package com.ruoyi.app.utils;
  2. import cn.hutool.http.HttpUtil;
  3. public class PayPush {
  4. //用户端推送
  5. public void apppush(String cid,String title, String content, String body){
  6. System.out.println("用户端推送cid:"+cid);
  7. String url = "https://fc-mp-20ccbe79-10f8-41d7-a06c-c42581f351c1.next.bspapp.com/push?cid="+cid+
  8. "&title="+title+"&content="+content+"&payload="+body;
  9. String res="";
  10. res = HttpUtil.get(url);
  11. //JSONObject jsonObject = JSON.parseObject(res);
  12. System.out.println("=========================1111111111111111"+res);
  13. }
  14. //骑手端推送
  15. public void qspush(String cid,String title, String content, String body){
  16. String url = "https://fc-mp-20ccbe79-10f8-41d7-a06c-c42581f351c1.next.bspapp.com/ptpush?cid="+cid+
  17. "&title="+title+"&content="+content+"&payload="+body+"&sound=pushsound.caf";
  18. String res="";
  19. res = HttpUtil.get(url);
  20. //JSONObject jsonObject = JSON.parseObject(res);
  21. System.out.println("=========================用户推送"+res);
  22. }
  23. //商家端推送
  24. public void shpush(String cid,String title, String content, String body){
  25. System.out.println("商家cid:"+cid);
  26. String url = "https://fc-mp-20ccbe79-10f8-41d7-a06c-c42581f351c1.next.bspapp.com/sjpush?cid="+cid+
  27. "&title="+title+"&content="+content+"&payload="+body;
  28. String res="";
  29. res = HttpUtil.get(url);
  30. //JSONObject jsonObject = JSON.parseObject(res);
  31. System.out.println("=========================商家推送"+res);
  32. }
  33. }