屏蔽网易云信消息推送

This commit is contained in:
易焱 2019-09-25 00:00:23 +08:00
parent 55c3718489
commit c49dc9b3e5
2 changed files with 6 additions and 5 deletions

View File

@ -125,15 +125,16 @@ public class AliyunPushApi {
pushList.setIsRead(1); pushList.setIsRead(1);
pushListService.save(pushList); pushListService.save(pushList);
sendMsg(String.valueOf(pushList.getUserId()),pushList.getPushContext()); //sendMsg(String.valueOf(pushList.getUserId()),pushList.getPushContext());
} }
/** /**
* 发送普通消息 * 发送普通消息 (已废弃 网易云信)
* @param userId * @param userId
* @param msg * @param msg
* @return * @return
*/ */
/*@Deprecated
public JSONObject sendMsg(String userId, String msg){ public JSONObject sendMsg(String userId, String msg){
String appSecret = "e62f6c247b46"; String appSecret = "e62f6c247b46";
String appKey = "87b0e3315dfc2df08060bcb54246da68"; String appKey = "87b0e3315dfc2df08060bcb54246da68";
@ -171,7 +172,7 @@ public class AliyunPushApi {
log.error("refreshToken error message:{}",e); log.error("refreshToken error message:{}",e);
} }
return null; return null;
} }*/
/** /**
* 随机生成字母与数字组合 * 随机生成字母与数字组合

View File

@ -77,11 +77,11 @@ public class AliyunPushApiTest {
} }
} }
@Test /*@Test
public void testSendMsg() { public void testSendMsg() {
AliyunPushApi pushApi = new AliyunPushApi("","",""); AliyunPushApi pushApi = new AliyunPushApi("","","");
JSONObject jsonObject = pushApi.sendMsg("20731", "网易云信推送测试!"); JSONObject jsonObject = pushApi.sendMsg("20731", "网易云信推送测试!");
System.out.println(jsonObject.toJSONString()); System.out.println(jsonObject.toJSONString());
} }*/
} }