From c9f28b430799cc8d40c7a7d99fd0f0eeecff6a5c Mon Sep 17 00:00:00 2001 From: admin <weikou2014> Date: 星期五, 15 三月 2019 14:26:10 +0800 Subject: [PATCH] 删除老版密码输入错误的相关代码 --- fanli/src/main/java/com/yeshi/fanli/service/impl/push/PushServiceImpl.java | 63 +++++++++++++++++++------------ 1 files changed, 39 insertions(+), 24 deletions(-) diff --git a/fanli/src/main/java/com/yeshi/fanli/service/impl/push/PushServiceImpl.java b/fanli/src/main/java/com/yeshi/fanli/service/impl/push/PushServiceImpl.java index b936603..482a9b5 100644 --- a/fanli/src/main/java/com/yeshi/fanli/service/impl/push/PushServiceImpl.java +++ b/fanli/src/main/java/com/yeshi/fanli/service/impl/push/PushServiceImpl.java @@ -1,5 +1,7 @@ package com.yeshi.fanli.service.impl.push; +import java.util.List; + import javax.annotation.Resource; import org.springframework.scheduling.annotation.Async; @@ -19,7 +21,6 @@ import com.yeshi.fanli.service.inter.push.PushRecordService; import com.yeshi.fanli.service.inter.push.PushService; import com.yeshi.fanli.service.inter.push.XMPushService; -import com.yeshi.fanli.service.inter.user.AccountMessageService; import com.yeshi.fanli.service.inter.user.SystemZnxService; import com.yeshi.fanli.util.Constant; import com.yeshi.fanli.util.StringUtil; @@ -42,9 +43,6 @@ private SystemZnxService systemZnxService; @Resource - private AccountMessageService accountMessageService; - - @Resource private DeviceTokenHWService deviceTokenHWService; @Resource @@ -64,7 +62,7 @@ @Async("pushExecutor") @Override - public void pushGoods(Long uid, String url, String title, String content) throws PushException { + public void pushGoods(Long uid, String url, String title, String content, List<String> listVersion) throws PushException { String gids = url.split("id=")[1]; String gid = gids.split("&")[0]; if (StringUtil.isNullOrEmpty(gid)) @@ -72,7 +70,7 @@ if (StringUtil.isNullOrEmpty(title)) throw new PushException(1, "璇峰~鍐欐帹閫佹爣棰�"); if (StringUtil.isNullOrEmpty(content)) - throw new PushException(1, "璇峰~鍐欐帹閫佸唴瀹�"); + throw new PushException(1, "璇峰~鍐欐帹閫佸唴瀹�"); PushRecord pushRecord = new PushRecord(); pushRecord.setState(1); @@ -83,8 +81,8 @@ pushRecord.setAccount(1); pushRecord.setCreatetime(java.lang.System.currentTimeMillis()); - xmPushService.pushGoods(uid, Long.parseLong(gid), title, content); - iosPushService.pushGoods(uid, Long.parseLong(gid), title, content); + xmPushService.pushGoods(uid, Long.parseLong(gid), title, content, listVersion); + iosPushService.pushGoods(uid, Long.parseLong(gid), title, content, listVersion); // hwPushService.pushGoods(uid, Long.parseLong(gid), title, content); pushRecordMapper.insertSelective(pushRecord); @@ -92,7 +90,7 @@ @Async("pushExecutor") @Override - public void pushUrl(Long uid, String url, String title, String content) throws PushException { + public void pushUrl(Long uid, String url, String title, String content, List<String> listVersion) throws PushException { if (StringUtil.isNullOrEmpty(url)) throw new PushException(1, "鏃犳帹閫侀摼鎺�"); @@ -109,15 +107,15 @@ pushRecord.setAppName(Constant.systemCommonConfig.getProjectChineseName()); pushRecord.setCreatetime(java.lang.System.currentTimeMillis()); - xmPushService.pushUrl(uid, url, title, content); - iosPushService.pushUrl(uid, url, title, content); - hwPushService.pushUrl(uid, url, title, content); + xmPushService.pushUrl(uid, url, title, content, listVersion); + iosPushService.pushUrl(uid, url, title, content, listVersion); + hwPushService.pushUrl(uid, url, title, content, listVersion); pushRecordMapper.insertSelective(pushRecord); } @Async("pushExecutor") @Override - public void pushZNX(Long uId, String title, String content) throws PushException { + public void pushZNX(Long uId, String title, String content, List<String> listVersion) throws PushException { if (StringUtil.isNullOrEmpty(title)) throw new PushException(1, "鏃犳帹閫佹爣棰�"); if (StringUtil.isNullOrEmpty(content)) @@ -139,9 +137,9 @@ pushRecord.setAppName(Constant.systemCommonConfig.getProjectChineseName()); pushRecord.setCreatetime(java.lang.System.currentTimeMillis()); - xmPushService.pushZNX(uId, null, systemZnx); - iosPushService.pushZNX(uId, null, systemZnx); - hwPushService.pushZNX(uId, null, systemZnx); + xmPushService.pushZNX(uId, null, systemZnx, listVersion); + iosPushService.pushZNX(uId, null, systemZnx, listVersion); + hwPushService.pushZNX(uId, null, systemZnx, listVersion); // 鎻掑叆鎺ㄩ�佽褰� pushRecordMapper.insertSelective(pushRecord); } else { @@ -153,9 +151,9 @@ accountMessage.setContent(content); accountMessageMapper.insertSelective(accountMessage); - xmPushService.pushZNX(uId, accountMessage, null); - iosPushService.pushZNX(uId, accountMessage, null); - hwPushService.pushZNX(uId, accountMessage, null); + xmPushService.pushZNX(uId, accountMessage, null, listVersion); + iosPushService.pushZNX(uId, accountMessage, null, listVersion); + hwPushService.pushZNX(uId, accountMessage, null, listVersion); // 鎻掑叆鎺ㄩ�佽褰� PushRecord pushRecord = new PushRecord(); @@ -171,18 +169,35 @@ } @Override - public void pushWEEX(Long uid, String title, String content, String weexUrl) throws PushException { + public void pushWEEX(Long uid, String title, String content, String weexUrl, List<String> listVersion) throws PushException { if (StringUtil.isNullOrEmpty(title)) throw new PushException(1, "鏃犳帹閫佹爣棰�"); if (StringUtil.isNullOrEmpty(content)) throw new PushException(1, "鏃犳帹閫佸唴瀹�"); - iosPushService.pushWEEX(uid, title, content, weexUrl); + iosPushService.pushWEEX(uid, title, content, weexUrl, listVersion); } @Override - public void pushBaiChuanUrl(Long uid, String title, String content, String url) throws PushException { - iosPushService.pushBaiChuanUrl(uid, title, content, url); - xmPushService.pushBaiChuanUrl(uid, title, content, url); + public void pushBaiChuanUrl(Long uid, String title, String content, String url, List<String> listVersion) throws PushException { + iosPushService.pushBaiChuanUrl(uid, title, content, url, listVersion); + xmPushService.pushBaiChuanUrl(uid, title, content, url, listVersion); + + // 鎻掑叆鎺ㄩ�佽褰� + PushRecord pushRecord = new PushRecord(); + pushRecord.setTitle(title); + pushRecord.setUid(uid); + pushRecord.setState(1); // 鎴愬姛 + pushRecord.setType(PushController.BAICHUAN); // 绫诲瀷锛氱櫨宸� + pushRecord.setAppName(Constant.systemCommonConfig.getProjectChineseName()); + pushRecord.setCreatetime(java.lang.System.currentTimeMillis()); + + pushRecordMapper.insertSelective(pushRecord); + } + + @Override + public void pushWelfareCenter(Long uid, String title, String content, List<String> listVersion) throws PushException { + iosPushService.pushWelfareCenter(uid, title, content, listVersion); + xmPushService.pushWelfareCenter(uid, title, content, listVersion); } } -- Gitblit v1.8.0