Commit c48272a96c080902d10b2d240aa0892a7b1d6479

Authored by shiyang
1 parent fecab95f93
Exists in master

登录小程序后获取小程序关联公众号的OpenId-还原

Showing 1 changed file with 6 additions and 4 deletions

talkonlineweb/src/main/java/com/lyms/talkonlineweb/controller/ArticleController.java View file @ c48272a
... ... @@ -406,11 +406,13 @@
406 406 patient.setGzopenid(openid);
407 407 //更新到登录患者的gzopenid
408 408 lymsPatientService.updateById(patient);
409   - //检查是否关注了公众号(前端判断subscribe是否是null)
  409 + //检查是否关注了公众号
410 410 String subscribe = WeiXinUtil.getIsWxGZH(openid);
411   - baseResponse.setObject(subscribe);
412   - baseResponse.setErrormsg("成功");
413   - return baseResponse;
  411 + if(StringUtil.isNotEmpty(subscribe)){
  412 + baseResponse.setObject(subscribe);
  413 + baseResponse.setErrormsg("成功");
  414 + return baseResponse;
  415 + }
414 416 }
415 417 }
416 418 } catch (Exception e) {