注册返回绑定城市
This commit is contained in:
parent
8b022ad013
commit
3bf848721f
@ -95,5 +95,5 @@ public interface ResidentPatientInfoMapper {
|
||||
**/
|
||||
PatientInfo getByCardNo(String cardNo);
|
||||
|
||||
int selectPatientInfoByPhone(String phone);
|
||||
List<PatientInfo> selectPatientInfoByPhone(String phone);
|
||||
}
|
||||
|
||||
@ -154,7 +154,7 @@ public class ResidentPatientInfoServiceImpl implements IResidentPatientInfoServi
|
||||
if(!StringUtils.isBlank(body.getPatientCode())) {
|
||||
PatientInfo patientInfo = residentPatientInfoMapper.getByCardNo(body.getCardNo());
|
||||
BeanUtils.copyBeanProp(patientInfo, body);
|
||||
if(body.getDiseaseList() != null) {
|
||||
if (body.getDiseaseList() != null) {
|
||||
patientInfo.setDisease(body.getDiseaseList().stream().collect(Collectors.joining(",")));
|
||||
}
|
||||
patientInfo.setLoginFlag(Long.valueOf(1));
|
||||
@ -318,6 +318,7 @@ public class ResidentPatientInfoServiceImpl implements IResidentPatientInfoServi
|
||||
@Override
|
||||
public HashMap<String, String> login(String loginCode,String phoneCode) throws Exception {
|
||||
HashMap<String, String> HashMap = new HashMap<>();
|
||||
//获取openId
|
||||
try {
|
||||
SslUtils.ignoreSsl();
|
||||
String params = "appid=" + appletChatConfig.getAppletId() + "&secret=" + appletChatConfig.getSecret() + "&js_code=" + loginCode + "&grant_type=" + appletChatConfig.getGrantType();
|
||||
@ -334,12 +335,23 @@ public class ResidentPatientInfoServiceImpl implements IResidentPatientInfoServi
|
||||
} catch (Exception e) {
|
||||
throw new ServiceException(e.getMessage());
|
||||
}
|
||||
//获取手机号
|
||||
String code;
|
||||
String cityCode = "";
|
||||
AppletPhoneVO phone = getPhone(phoneCode);
|
||||
String phoneNumber = phone.getPhoneInfo().getPhoneNumber();
|
||||
HashMap.put("phone",phoneNumber);
|
||||
code = residentPatientInfoMapper.selectPatientInfoByPhone(phoneNumber) == 0 ? "0" : "1";
|
||||
//code = residentPatientInfoMapper.selectPatientInfoByPhone(phoneNumber) == 0 ? "0" : "1";
|
||||
List<PatientInfo> infoList = residentPatientInfoMapper.selectPatientInfoByPhone(phoneNumber);
|
||||
code = infoList.size()== 0 ? "0" : "1";
|
||||
//返回绑定城市
|
||||
if ("1".equals(code)){
|
||||
for (PatientInfo patientInfo : infoList) {
|
||||
cityCode = patientInfo.getCityCode();
|
||||
}
|
||||
}
|
||||
HashMap.put("code",code);
|
||||
HashMap.put("cityCode",cityCode);
|
||||
return HashMap;
|
||||
}
|
||||
}
|
||||
|
||||
@ -453,8 +453,8 @@
|
||||
|
||||
|
||||
<!-- 获取注册详细信息 -->
|
||||
<select id="selectPatientInfoByPhone" parameterType="String" resultType="java.lang.Integer">
|
||||
select count(1) from patient_info
|
||||
<select id="selectPatientInfoByPhone" parameterType="String" resultMap="PatientInfoResult">
|
||||
<include refid="selectPatientInfoVo"/>
|
||||
where phone = #{pnone}
|
||||
and login_flag = '1'
|
||||
</select>
|
||||
|
||||
Loading…
Reference in New Issue
Block a user