Commit f04d4a9b25bf784cc5379512eeef258c9d3862f9
1 parent
5a7edd48da
Exists in
master
and in
1 other branch
公众号跳转BUG
Showing 2 changed files with 10 additions and 2 deletions
talkonlineweb/src/main/java/com/lyms/talkonlineweb/task/PushArticleTask.java
View file @
f04d4a9
... | ... | @@ -40,8 +40,9 @@ |
40 | 40 | private LymsPatientService lymsPatientService; |
41 | 41 | @Autowired |
42 | 42 | private LymsPushMessagesService lymsPushMessagesService; |
43 | - | |
44 | 43 | @Autowired |
44 | + private LymsPcaseService lymsPcaseService;//病例 | |
45 | + @Autowired | |
45 | 46 | private LymsDictService lymsDictService; |
46 | 47 | @Autowired |
47 | 48 | public LymsPushAttentionRecordService lymsPushAttentionRecordService; |
... | ... | @@ -234,6 +235,8 @@ |
234 | 235 | final List<LymsPushAttentionRecord> pushAttentionRecords = lymsPushAttentionRecordService.list(queryWrapper); |
235 | 236 | for (LymsPushAttentionRecord pushAttentionRecord : pushAttentionRecords) { |
236 | 237 | Map<String,Object> mapInfo =pLoginInfo(pushAttentionRecord.getPid()); |
238 | + final List<LymsPcase> pcaseList = lymsPcaseService.list(new QueryWrapper<LymsPcase>().lambda().eq(LymsPcase::getPid, pushAttentionRecord.getPid())); | |
239 | + mapInfo.put("type", pcaseList.size()>0 ? 1 : 2);//有病例1,没有2,用于公众号跳转地址 | |
237 | 240 | Integer code= WeiXinUtil.SendWeChatMsg(pushAttentionRecord.getPGzopenid(),Constant.GZ_TEMPLATE_ID,map,mapInfo); |
238 | 241 | if(null==code||code!=0){ |
239 | 242 | //更新到 lyms_push_attention_record 记录 |
talkonlineweb/src/main/java/com/lyms/talkonlineweb/util/WeiXinUtil.java
View file @
f04d4a9
... | ... | @@ -93,7 +93,12 @@ |
93 | 93 | miniprogram.put("appid",Constant.PAT_APP_ID); |
94 | 94 | //登录数据 |
95 | 95 | if(CollectionUtils.isNotEmpty(mapInfo) && null!=mapInfo.get("plogin") && null!=mapInfo.get("passwd")){ |
96 | - miniprogram.put("pagepath","pages/news/news?plogin="+mapInfo.get("plogin")+"&passwd="+mapInfo.get("passwd"));// 注意,这里是支持传参的!!! | |
96 | + if(null==mapInfo.get("type") || 1==(int) mapInfo.get("type")) {//null是正常推送状态。 有值是亲属关注时的状态 | |
97 | + miniprogram.put("pagepath", "pages/news/news?plogin=" + mapInfo.get("plogin") + "&passwd=" + mapInfo.get("passwd"));// 注意,这里是支持传参的!!! | |
98 | + }else { | |
99 | + miniprogram.put("pagepath","pages/concernList/concernList?plogin="+mapInfo.get("plogin")+"&passwd="+mapInfo.get("passwd"));// 没有病例跳转地址 | |
100 | + } | |
101 | + | |
97 | 102 | }else { |
98 | 103 | //意外情况自行登录 |
99 | 104 | miniprogram.put("pagepath","pages/enroll/enroll");// 注意,这里是支持传参的!!! |