| | |
| | | /** |
| | | * 方法说明: IOS 多推 |
| | | * |
| | | * @param deviceToken |
| | | * @param packages |
| | | * @param alert |
| | | * @return |
| | | * @throws Exception |
| | | * @author mawurui createTime 2018年5月8日 上午10:19:57 |
| | |
| | | |
| | | JSONObject json = null; |
| | | if (type == PushTypeEnum.goodsdetail.getCode()) { |
| | | Long auctionId = null; |
| | | String auctionId = null; |
| | | if (url.contains("id=")) { |
| | | String[] sts = url.split("\\?")[1].split("&"); |
| | | for (String st : sts) { |
| | | if (st.contains("id=")) { |
| | | auctionId = Long.parseLong(st.replace("id=", "").trim()); |
| | | auctionId = (st.replace("id=", "").trim()); |
| | | } |
| | | } |
| | | } |
| | |
| | | } |
| | | |
| | | /** |
| | | * @param info |
| | | * @param json |
| | | * @param pushRecord |
| | | * @return |
| | | * @throws Exception |
| | |
| | | } |
| | | |
| | | /** |
| | | * @param info |
| | | * @param params |
| | | * @param pushRecord |
| | | * @return 1:都成功 2:仅android 成功 3.仅IOS成功 4.都失败 |
| | | * @throws Exception |
| | |
| | | */ |
| | | public static void executePushIOS(List<String> tokenList, JSONObject json, String pwd) throws Exception { |
| | | InputStream certificate = IOSPushUtil.class.getClassLoader() |
| | | .getResourceAsStream("certificate/pushCertificate.p12"); // 读取.p12文件 |
| | | .getResourceAsStream("certificate/push_certification_2025216.p12"); // 读取.p12文件 |
| | | String certificatePassword = pwd; |
| | | pushIOS(tokenList, json, certificate, certificatePassword); |
| | | } |
| | |
| | | /** |
| | | * 方法说明: IOS 多推 |
| | | * |
| | | * @param deviceToken |
| | | * @param packages |
| | | * @param alert |
| | | * @return |
| | | * @throws Exception |
| | | * @author mawurui createTime 2018年5月8日 上午10:19:57 |
| | |
| | | // json自定义传值 |
| | | JSONObject json = null; |
| | | if (type == PushTypeEnum.goodsdetail.getCode()) { |
| | | Long auctionId = null; |
| | | String auctionId = null; |
| | | if (url.contains("id=")) { |
| | | String[] sts = url.split("\\?")[1].split("&"); |
| | | for (String st : sts) { |
| | | if (st.contains("id=")) { |
| | | auctionId = Long.parseLong(st.replace("id=", "").trim()); |
| | | auctionId = (st.replace("id=", "").trim()); |
| | | } |
| | | } |
| | | } |