|
@@ -141,6 +141,7 @@ public class IntellectPushServiceImpl implements IntellectPushService {
|
|
|
|
|
|
@Override
|
|
@Override
|
|
public void pushBySubscribe(Integer platformId, String appid, Long userId) {
|
|
public void pushBySubscribe(Integer platformId, String appid, Long userId) {
|
|
|
|
+ try {
|
|
Integer second = afterNow();
|
|
Integer second = afterNow();
|
|
if (second > 0) {
|
|
if (second > 0) {
|
|
redisService.set(redisService.getKeyListener().getKeyMpSubscribe(platformId, appid, userId), userId + "", second);
|
|
redisService.set(redisService.getKeyListener().getKeyMpSubscribe(platformId, appid, userId), userId + "", second);
|
|
@@ -151,17 +152,18 @@ public class IntellectPushServiceImpl implements IntellectPushService {
|
|
|
|
|
|
WxOpenService wxOpenService = wxThirdPartService.getWxOpenServiceByPlatFormId(platformId);
|
|
WxOpenService wxOpenService = wxThirdPartService.getWxOpenServiceByPlatFormId(platformId);
|
|
WxOpenMpService wxMpService = wxOpenService.getWxOpenComponentService().getWxMpServiceByAppid(appid);
|
|
WxOpenMpService wxMpService = wxOpenService.getWxOpenComponentService().getWxMpServiceByAppid(appid);
|
|
- try {
|
|
|
|
|
|
+
|
|
wxMpService.getKefuService().sendKefuMessage(signMessage);
|
|
wxMpService.getKefuService().sendKefuMessage(signMessage);
|
|
} catch (WxErrorException e) {
|
|
} catch (WxErrorException e) {
|
|
e.printStackTrace();
|
|
e.printStackTrace();
|
|
- log.error("签到智能推送失败");
|
|
|
|
|
|
+ log.error("签到智能推送失败",e);
|
|
}
|
|
}
|
|
|
|
|
|
}
|
|
}
|
|
|
|
|
|
@Override
|
|
@Override
|
|
public void pushBySign(Integer platformId, String appid, Long userId) {
|
|
public void pushBySign(Integer platformId, String appid, Long userId) {
|
|
|
|
+ try {
|
|
Integer second = afterNow();
|
|
Integer second = afterNow();
|
|
if (second > 0) {
|
|
if (second > 0) {
|
|
redisService.set(redisService.getKeyListener().getKeyMpSign(platformId, appid, userId), userId + "", second);
|
|
redisService.set(redisService.getKeyListener().getKeyMpSign(platformId, appid, userId), userId + "", second);
|
|
@@ -172,11 +174,11 @@ public class IntellectPushServiceImpl implements IntellectPushService {
|
|
|
|
|
|
WxOpenService wxOpenService = wxThirdPartService.getWxOpenServiceByPlatFormId(platformId);
|
|
WxOpenService wxOpenService = wxThirdPartService.getWxOpenServiceByPlatFormId(platformId);
|
|
WxOpenMpService wxMpService = wxOpenService.getWxOpenComponentService().getWxMpServiceByAppid(appid);
|
|
WxOpenMpService wxMpService = wxOpenService.getWxOpenComponentService().getWxMpServiceByAppid(appid);
|
|
- try {
|
|
|
|
|
|
+
|
|
wxMpService.getKefuService().sendKefuMessage(signMessage);
|
|
wxMpService.getKefuService().sendKefuMessage(signMessage);
|
|
} catch (WxErrorException e) {
|
|
} catch (WxErrorException e) {
|
|
e.printStackTrace();
|
|
e.printStackTrace();
|
|
- log.error("签到智能推送失败");
|
|
|
|
|
|
+ log.error("签到智能推送失败",e);
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
@@ -185,6 +187,7 @@ public class IntellectPushServiceImpl implements IntellectPushService {
|
|
|
|
|
|
@Override
|
|
@Override
|
|
public void pushByContinueRead(Integer platformId, String appid, Integer id) {
|
|
public void pushByContinueRead(Integer platformId, String appid, Integer id) {
|
|
|
|
+ try {
|
|
Integer second = afterNow();
|
|
Integer second = afterNow();
|
|
if (second > 0) {
|
|
if (second > 0) {
|
|
redisService.set(redisService.getKeyListener().getKeyPrefixBookContinueRead(platformId, appid, id), id + "", second);
|
|
redisService.set(redisService.getKeyListener().getKeyPrefixBookContinueRead(platformId, appid, id), id + "", second);
|
|
@@ -195,31 +198,33 @@ public class IntellectPushServiceImpl implements IntellectPushService {
|
|
|
|
|
|
WxOpenService wxOpenService = wxThirdPartService.getWxOpenServiceByPlatFormId(platformId);
|
|
WxOpenService wxOpenService = wxThirdPartService.getWxOpenServiceByPlatFormId(platformId);
|
|
WxOpenMpService wxMpService = wxOpenService.getWxOpenComponentService().getWxMpServiceByAppid(appid);
|
|
WxOpenMpService wxMpService = wxOpenService.getWxOpenComponentService().getWxMpServiceByAppid(appid);
|
|
- try {
|
|
|
|
|
|
+
|
|
wxMpService.getKefuService().sendKefuMessage(signMessage);
|
|
wxMpService.getKefuService().sendKefuMessage(signMessage);
|
|
} catch (WxErrorException e) {
|
|
} catch (WxErrorException e) {
|
|
e.printStackTrace();
|
|
e.printStackTrace();
|
|
- log.error("继续阅读智能推送失败");
|
|
|
|
|
|
+ log.error("继续阅读智能推送失败",e);
|
|
}
|
|
}
|
|
|
|
|
|
}
|
|
}
|
|
|
|
|
|
@Override
|
|
@Override
|
|
public void pushByNopay(Integer platformId, String appid, Integer id) {
|
|
public void pushByNopay(Integer platformId, String appid, Integer id) {
|
|
|
|
+ try {
|
|
WxMpKefuMessage signMessage = createNopayMessage(platformId, appid, id);
|
|
WxMpKefuMessage signMessage = createNopayMessage(platformId, appid, id);
|
|
|
|
|
|
WxOpenService wxOpenService = wxThirdPartService.getWxOpenServiceByPlatFormId(platformId);
|
|
WxOpenService wxOpenService = wxThirdPartService.getWxOpenServiceByPlatFormId(platformId);
|
|
WxOpenMpService wxMpService = wxOpenService.getWxOpenComponentService().getWxMpServiceByAppid(appid);
|
|
WxOpenMpService wxMpService = wxOpenService.getWxOpenComponentService().getWxMpServiceByAppid(appid);
|
|
- try {
|
|
|
|
|
|
+
|
|
wxMpService.getKefuService().sendKefuMessage(signMessage);
|
|
wxMpService.getKefuService().sendKefuMessage(signMessage);
|
|
} catch (WxErrorException e) {
|
|
} catch (WxErrorException e) {
|
|
e.printStackTrace();
|
|
e.printStackTrace();
|
|
- log.error("未支付提醒智能推送失败");
|
|
|
|
|
|
+ log.error("未支付提醒智能推送失败",e);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
@Override
|
|
@Override
|
|
public void pushByNoSign(Integer platformId, String appid, Long userId) {
|
|
public void pushByNoSign(Integer platformId, String appid, Long userId) {
|
|
|
|
+ try {
|
|
Integer second = afterNow();
|
|
Integer second = afterNow();
|
|
if (second > 0) {
|
|
if (second > 0) {
|
|
redisService.set(redisService.getKeyListener().getKeyMpNosign(platformId, appid, userId), userId + "", second);
|
|
redisService.set(redisService.getKeyListener().getKeyMpNosign(platformId, appid, userId), userId + "", second);
|
|
@@ -229,11 +234,11 @@ public class IntellectPushServiceImpl implements IntellectPushService {
|
|
|
|
|
|
WxOpenService wxOpenService = wxThirdPartService.getWxOpenServiceByPlatFormId(platformId);
|
|
WxOpenService wxOpenService = wxThirdPartService.getWxOpenServiceByPlatFormId(platformId);
|
|
WxOpenMpService wxMpService = wxOpenService.getWxOpenComponentService().getWxMpServiceByAppid(appid);
|
|
WxOpenMpService wxMpService = wxOpenService.getWxOpenComponentService().getWxMpServiceByAppid(appid);
|
|
- try {
|
|
|
|
|
|
+
|
|
wxMpService.getKefuService().sendKefuMessage(signMessage);
|
|
wxMpService.getKefuService().sendKefuMessage(signMessage);
|
|
} catch (WxErrorException e) {
|
|
} catch (WxErrorException e) {
|
|
e.printStackTrace();
|
|
e.printStackTrace();
|
|
- log.error("未签到提醒智能推送失败");
|
|
|
|
|
|
+ log.error("未签到提醒智能推送失败",e);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|