|
@ -3,6 +3,7 @@ package com.yihu.jw.wechat.service;
|
|
|
import com.yihu.jw.entity.base.wx.JsApiTicket;
|
|
|
import com.yihu.jw.entity.base.wx.WxWechatDO;
|
|
|
import com.yihu.jw.hospital.prescription.service.entrance.EntranceService;
|
|
|
import com.yihu.jw.hospital.prescription.service.entrance.XzzxEntranceService;
|
|
|
import com.yihu.jw.util.wechat.wxhttp.HttpUtil;
|
|
|
import com.yihu.jw.wechat.dao.WechatDao;
|
|
|
import org.json.JSONObject;
|
|
@ -19,6 +20,8 @@ public class WechatInfoService {
|
|
|
private WxAccessTokenService wxAccessTokenService;
|
|
|
@Autowired
|
|
|
private EntranceService entranceService;
|
|
|
@Autowired
|
|
|
private XzzxEntranceService xzzxEntranceService;
|
|
|
|
|
|
/**
|
|
|
* 通过code获取判断openid
|
|
@ -63,7 +66,7 @@ public class WechatInfoService {
|
|
|
WxWechatDO wxWechat = null;
|
|
|
|
|
|
//中山医院互联网医院
|
|
|
if("xm_zsyy_wx".equals(wxId)){
|
|
|
if("xm_zsyy_wx".equals(wxId) || "xm_xzzx_wx".equals(wxId)){
|
|
|
jsapiTickets = wxAccessTokenService.findJsapiTicket(wxId);
|
|
|
}else{
|
|
|
wxWechat = wxAccessTokenService.getWxInfo(wxId);
|
|
@ -83,8 +86,10 @@ public class WechatInfoService {
|
|
|
String token = "";
|
|
|
|
|
|
//中山医院互联网医院
|
|
|
if("xm_zsyy_wx".equals(wxId)){
|
|
|
if("xm_zsyy_wx".equals(wxId)) {
|
|
|
token = entranceService.getAccessToken("100033");
|
|
|
}else if("xm_xzzx_wx".equals(wxId)){
|
|
|
token = xzzxEntranceService.getXzToken();
|
|
|
}else{
|
|
|
token = wxAccessTokenService.getWxAccessTokenById(wxId).getAccessToken();
|
|
|
}
|