|
@ -3,7 +3,6 @@ package com.yihu.jw.entrance.controller;
|
|
|
|
|
|
import com.yihu.jw.entity.base.dict.DictHospitalDeptDO;
|
|
|
import com.yihu.jw.entity.hospital.dict.WlyyChargeDictDO;
|
|
|
import com.yihu.jw.entity.hospital.mapping.HospitalDeptMappingDO;
|
|
|
import com.yihu.jw.hospital.prescription.service.entrance.EntranceService;
|
|
|
import com.yihu.jw.restmodel.hospital.prescription.WlyyOutpatientVO;
|
|
|
import com.yihu.jw.restmodel.hospital.prescription.WlyyPrescriptionVO;
|
|
@ -358,5 +357,34 @@ public class MqSdkController extends EnvelopRestEndpoint {
|
|
|
return ObjEnvelop.getError(object1.get("respMsg").toString());
|
|
|
}
|
|
|
}
|
|
|
@GetMapping(value = "/getUserInfoByOpenid")
|
|
|
@ApiOperation(value = "获取用户信息")
|
|
|
public ObjEnvelop getUserInfoByOpenid(
|
|
|
@ApiParam(name = "openId", value = "用户openId")
|
|
|
@RequestParam(value = "openId", required = true) String openId) throws Exception {
|
|
|
String responseMsg = entranceService.getUserInfoByOpenid(openId);
|
|
|
JSONObject object1 = JSONObject.fromObject(responseMsg);
|
|
|
if (null != object1&&null!=object1.get("status") && "200".equals(object1.get("status").toString())) {
|
|
|
return success(object1.get("userinfo"));
|
|
|
} else {
|
|
|
return ObjEnvelop.getError(null!=object1.get("message")?object1.get("message").toString():"无效openId");
|
|
|
}
|
|
|
}
|
|
|
|
|
|
@GetMapping(value = "/getAccessToken")
|
|
|
@ApiOperation(value = "获取accessToken")
|
|
|
public ObjEnvelop getAccessToken(
|
|
|
@ApiParam(name = "interfaceid", value = "校验码,默认:100033")
|
|
|
@RequestParam(value = "interfaceid", required = true,defaultValue = "100033") String interfaceid) throws Exception {
|
|
|
String responseMsg = entranceService.getAccessToken(interfaceid);
|
|
|
JSONObject object1 = JSONObject.fromObject(responseMsg);
|
|
|
if (null != object1&&null!=object1.get("respCode") && "00".equals(object1.get("respCode"))) {
|
|
|
return success(object1.get("respEntity"));
|
|
|
} else {
|
|
|
return ObjEnvelop.getError(object1.get("respMsg").toString());
|
|
|
}
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
}
|