|
@@ -91,7 +91,6 @@ public class WxAppletOauth2UserOperator extends AbstractOAuth2PswUserOperator {
|
|
|
try {
|
|
try {
|
|
|
sessionInfo = wxMaService.getUserService().getSessionInfo(wxAppletCode);
|
|
sessionInfo = wxMaService.getUserService().getSessionInfo(wxAppletCode);
|
|
|
} catch (Exception e) {
|
|
} catch (Exception e) {
|
|
|
- e.printStackTrace();
|
|
|
|
|
log.error("微信服务调用失败 | appId:{} | code:{} | 错误:{}",
|
|
log.error("微信服务调用失败 | appId:{} | code:{} | 错误:{}",
|
|
|
source.getAppId(), source.getWxAppletCode(), e.getMessage(), e);
|
|
source.getAppId(), source.getWxAppletCode(), e.getMessage(), e);
|
|
|
throw new ServiceException(TRExcCode.SYSTEM_ERROR_B0001, "微信授权失败: " + e.getMessage());
|
|
throw new ServiceException(TRExcCode.SYSTEM_ERROR_B0001, "微信授权失败: " + e.getMessage());
|
|
@@ -155,6 +154,7 @@ public class WxAppletOauth2UserOperator extends AbstractOAuth2PswUserOperator {
|
|
|
.eq(BizWxUserHospitalPO::getTenantId, source.getTenantId())
|
|
.eq(BizWxUserHospitalPO::getTenantId, source.getTenantId())
|
|
|
.last("limit 1"));
|
|
.last("limit 1"));
|
|
|
if (ObjectUtil.isNull(wxUserHospital)) {
|
|
if (ObjectUtil.isNull(wxUserHospital)) {
|
|
|
|
|
+ wxUserHospital=new BizWxUserHospitalPO();
|
|
|
wxUserHospital.setWxUserId(wxUser.getId());
|
|
wxUserHospital.setWxUserId(wxUser.getId());
|
|
|
wxUserHospital.setTenantId(source.getTenantId());
|
|
wxUserHospital.setTenantId(source.getTenantId());
|
|
|
wxUserHospitalRepository.insert(wxUserHospital);
|
|
wxUserHospitalRepository.insert(wxUserHospital);
|