| | |
| | |
|
| | | import com.alibaba.fastjson.JSONObject;
|
| | | import com.yeshi.fanli.entity.config.push.HWPushConfig;
|
| | | import com.yeshi.fanli.exception.PushException;
|
| | | import com.yeshi.fanli.exception.push.PushException;
|
| | | import com.yeshi.fanli.service.inter.config.BusinessSystemService;
|
| | | import com.yeshi.fanli.util.Constant;
|
| | | import com.yeshi.fanli.util.taobao.TaoBaoUtil;
|
| | |
| | | e.printStackTrace();
|
| | | }
|
| | | }
|
| | | |
| | |
|
| | | public static void pushUserSignInNotification(List<String> deviceTokens, String title, String content) throws PushException {
|
| | | String activity = Constant.systemCommonConfig.getAndroidBaseactivityName() + ".ui.goldtask.GoldTaskActivity";
|
| | | String intent = getIntent("signin", activity, null, null, null);
|
| | | if (intent == null)
|
| | | return;
|
| | |
|
| | | try {
|
| | | String result = sendPushHWMessageForIntent(deviceTokens, title, content, intent);
|
| | | net.sf.json.JSONObject data = net.sf.json.JSONObject.fromObject(result);
|
| | | if (!"success".equalsIgnoreCase(data.optString("msg")))
|
| | | throw new PushException(2, result);
|
| | | } catch (IOException e) {
|
| | | e.printStackTrace();
|
| | | }
|
| | | }
|
| | |
|
| | | /**
|
| | | * 推送设备消息
|