JPushToolUtil.java 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637
  1. package com.ruoyi.common.utils.jPush;
  2. import org.springframework.stereotype.Component;
  3. @Component
  4. public class JPushToolUtil extends AbstractJPushToolUtil {
  5. /**
  6. * 发送给指定的极光ID
  7. * @param notificationTitle 通知标题
  8. * @param msgTitle 内容标题
  9. * @param msgContent 内容
  10. * @param jPushVO 扩展的json
  11. * @param registrationId 极光id
  12. * @return
  13. */
  14. public static boolean sendToRegistrationId(
  15. String notificationTitle,
  16. String msgTitle,
  17. String msgContent,
  18. String jPushVO,
  19. String... registrationId) {
  20. return sendToRegistrationId1(notificationTitle,msgTitle,msgContent,jPushVO,registrationId);
  21. }
  22. /*public static void main(String[] args) {
  23. String num = "-0405-别名";
  24. String notificationTitle = "推送测试-通知标题" + num;
  25. String msgTitle = "推送测试-内容标题" + num;
  26. String msgContent = "我是内容" + num;
  27. String jPushVO = "我是扩展的json" + num;
  28. String[] registrationId = {"", ""};
  29. boolean b = JPushToolUtil.sendToRegistrationId(notificationTitle, msgTitle, msgContent, jPushVO, registrationId);
  30. System.out.println("i="+b);
  31. }*/
  32. }