admin
2019-11-20 8b2191df2f7d94aa299bd43dcbe97c94e5a61bbd
fanli/src/main/java/com/yeshi/fanli/util/push/HWPushUtil.java
@@ -21,7 +21,7 @@
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;
@@ -72,7 +72,7 @@
      try {
         return String.format(
               "intent://flq/selfbuyandreductionactivity?data=%s#Intent;scheme=banliapp;launchFlags=0x4000000;end",
               "intent://flq/hmpush?data=%s#Intent;scheme=banliapp;launchFlags=0x4000000;end",
               URLDecoder.decode(data.toString(), "UTF-8"));
      } catch (UnsupportedEncodingException e) {
         e.printStackTrace();
@@ -214,6 +214,23 @@
         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();
      }
   }
   /**
    * 推送设备消息