解决patient_info表中openid唯一性问题,修改注册、切换账号等接口;
This commit is contained in:
parent
7bce05f186
commit
fb74d33304
@ -104,4 +104,13 @@ public interface ResidentPatientInfoMapper {
|
|||||||
**/
|
**/
|
||||||
PatientInfo getPatientInfoByPatientCode(String patientCode);
|
PatientInfo getPatientInfoByPatientCode(String patientCode);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Author mengkuiliang
|
||||||
|
* @Description 查询已登录的居民信息
|
||||||
|
* @Date 2023-10-30 030 16:39
|
||||||
|
* @Param [openid]
|
||||||
|
* @return com.xinelu.familydoctor.applet.pojo.entity.PatientInfo
|
||||||
|
**/
|
||||||
|
PatientInfo getLoginByOpenId(String openid);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -80,6 +80,13 @@ public class PatientInfoBody extends BaseEntity {
|
|||||||
@ApiModelProperty(value = "用户微信openid")
|
@ApiModelProperty(value = "用户微信openid")
|
||||||
private String openid;
|
private String openid;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 同一微信绑定标识openid,用于区分同一账号绑定的居民
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "同一微信绑定标识openid,用于区分同一账号绑定的居民")
|
||||||
|
@Excel(name = "同一微信绑定标识openid,用于区分同一账号绑定的居民")
|
||||||
|
private String bindOpenid;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 手机号码
|
* 手机号码
|
||||||
*/
|
*/
|
||||||
|
|||||||
@ -92,6 +92,13 @@ public class PatientInfo extends BaseEntity {
|
|||||||
@Excel(name = "用户微信openid")
|
@Excel(name = "用户微信openid")
|
||||||
private String openid;
|
private String openid;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 同一微信绑定标识openid,用于区分同一账号绑定的居民
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "同一微信绑定标识openid,用于区分同一账号绑定的居民")
|
||||||
|
@Excel(name = "同一微信绑定标识openid,用于区分同一账号绑定的居民")
|
||||||
|
private String bindOpenid;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 手机号码
|
* 手机号码
|
||||||
*/
|
*/
|
||||||
|
|||||||
@ -14,6 +14,7 @@ import com.xinelu.common.utils.uuid.IdUtils;
|
|||||||
import com.xinelu.familydoctor.applet.mapper.ResidentPatientInfoMapper;
|
import com.xinelu.familydoctor.applet.mapper.ResidentPatientInfoMapper;
|
||||||
import com.xinelu.familydoctor.applet.pojo.body.PatientInfoBody;
|
import com.xinelu.familydoctor.applet.pojo.body.PatientInfoBody;
|
||||||
import com.xinelu.familydoctor.applet.pojo.entity.PatientInfo;
|
import com.xinelu.familydoctor.applet.pojo.entity.PatientInfo;
|
||||||
|
import com.xinelu.familydoctor.applet.pojo.query.PatientInfoQuery;
|
||||||
import com.xinelu.familydoctor.applet.pojo.vo.SignInfoDetailVo;
|
import com.xinelu.familydoctor.applet.pojo.vo.SignInfoDetailVo;
|
||||||
import com.xinelu.familydoctor.applet.service.IResidentPatientInfoService;
|
import com.xinelu.familydoctor.applet.service.IResidentPatientInfoService;
|
||||||
import com.xinelu.familydoctor.applet.utils.AppletAccessTokenUtils;
|
import com.xinelu.familydoctor.applet.utils.AppletAccessTokenUtils;
|
||||||
@ -25,6 +26,7 @@ import org.apache.commons.lang3.StringUtils;
|
|||||||
import org.springframework.data.redis.core.RedisTemplate;
|
import org.springframework.data.redis.core.RedisTemplate;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
import org.springframework.transaction.annotation.Transactional;
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
|
import org.springframework.util.CollectionUtils;
|
||||||
|
|
||||||
import javax.annotation.Resource;
|
import javax.annotation.Resource;
|
||||||
import java.time.LocalDateTime;
|
import java.time.LocalDateTime;
|
||||||
@ -161,51 +163,51 @@ public class ResidentPatientInfoServiceImpl implements IResidentPatientInfoServi
|
|||||||
@Override
|
@Override
|
||||||
@Transactional(rollbackFor = Exception.class)
|
@Transactional(rollbackFor = Exception.class)
|
||||||
public void register(PatientInfoBody body) {
|
public void register(PatientInfoBody body) {
|
||||||
if (ObjectUtils.isNotEmpty(body.getCardNo())) {
|
if(StringUtils.isBlank(body.getCardNo())) {
|
||||||
|
throw new ServiceException("请求参数有误");
|
||||||
|
}
|
||||||
|
// 查询已登录的居民信息
|
||||||
|
PatientInfo loginPatientInfo = residentPatientInfoMapper.getLoginByOpenId(body.getOpenid());
|
||||||
|
|
||||||
PatientInfo patientInfo;
|
PatientInfo patientInfo;
|
||||||
// 修改
|
// 更新
|
||||||
if (!StringUtils.isBlank(body.getPatientCode())) {
|
if (!StringUtils.isBlank(body.getPatientCode())) {
|
||||||
patientInfo = residentPatientInfoMapper.getPatientInfoByPatientCode(body.getPatientCode());
|
patientInfo = residentPatientInfoMapper.getPatientInfoByPatientCode(body.getPatientCode());
|
||||||
if (ObjectUtils.isNotEmpty(patientInfo)) {
|
if(patientInfo == null) {
|
||||||
|
throw new ServiceException("未查询到居民注册信息");
|
||||||
|
}
|
||||||
|
if(patientInfo.getDelFlag() != null && patientInfo.getDelFlag() == 1) {
|
||||||
|
throw new ServiceException("居民已解绑,不能更新数据");
|
||||||
|
}
|
||||||
|
if(!body.getOpenid().equals(patientInfo.getBindOpenid())) {
|
||||||
|
throw new ServiceException("该居民非当前账号绑定,不允许修改");
|
||||||
|
}
|
||||||
BeanUtils.copyBeanProp(patientInfo, body);
|
BeanUtils.copyBeanProp(patientInfo, body);
|
||||||
|
// 已绑定openid,将该值置空
|
||||||
|
if(loginPatientInfo != null) {
|
||||||
|
patientInfo.setOpenid(null);
|
||||||
|
}
|
||||||
if (body.getDiseaseList() != null) {
|
if (body.getDiseaseList() != null) {
|
||||||
patientInfo.setDisease(body.getDiseaseList().stream().collect(Collectors.joining(",")));
|
patientInfo.setDisease(body.getDiseaseList().stream().collect(Collectors.joining(",")));
|
||||||
} else {
|
} else {
|
||||||
patientInfo.setDisease("0");
|
patientInfo.setDisease("0");
|
||||||
}
|
}
|
||||||
patientInfo.setLoginFlag(Long.valueOf(1));
|
patientInfo.setLoginFlag(Long.valueOf(1));
|
||||||
|
patientInfo.setBindOpenid(body.getOpenid());
|
||||||
updatePatientInfo(patientInfo);
|
updatePatientInfo(patientInfo);
|
||||||
}
|
|
||||||
// 注册
|
// 新增
|
||||||
} else {
|
} else {
|
||||||
// 获取当前微信绑定的居民
|
|
||||||
List<PatientInfo> list = residentPatientInfoMapper.getList(body.getOpenid(), body.getCityCode());
|
|
||||||
patientInfo = residentPatientInfoMapper.isRegisterByCardNo(body.getCardNo());
|
patientInfo = residentPatientInfoMapper.isRegisterByCardNo(body.getCardNo());
|
||||||
if (patientInfo == null) {
|
if (patientInfo != null) {
|
||||||
PatientInfo entity = new PatientInfo();
|
if(patientInfo.getDelFlag() == null || patientInfo.getDelFlag() == 0) {
|
||||||
BeanUtils.copyBeanProp(entity, body);
|
|
||||||
if (body.getDiseaseList() != null) {
|
|
||||||
entity.setDisease(body.getDiseaseList().stream().collect(Collectors.joining(",")));
|
|
||||||
} else {
|
|
||||||
entity.setDisease("0");
|
|
||||||
}
|
|
||||||
entity.setPatientCode(IdUtils.fastSimpleUUID());
|
|
||||||
entity.setBindingTime(new Date());
|
|
||||||
entity.setIsChecked((list == null || list.size() == 0) ? "1" : "0");
|
|
||||||
entity.setCreateTime(new Date());
|
|
||||||
entity.setCreateBy(body.getCardNo());
|
|
||||||
entity.setLoginFlag(Long.valueOf(1));
|
|
||||||
residentPatientInfoMapper.insertPatientInfo(entity);
|
|
||||||
|
|
||||||
// 新增的话重新查询居民信息获取patientId
|
|
||||||
patientInfo = residentPatientInfoMapper.getPatientInfoByPatientCode(entity.getPatientCode());
|
|
||||||
|
|
||||||
} else {
|
|
||||||
if (!StringUtils.isBlank(patientInfo.getOpenid())) {
|
|
||||||
throw new ServiceException("该身份证号已被注册");
|
throw new ServiceException("该身份证号已被注册");
|
||||||
}
|
} else {
|
||||||
patientInfo.setIsChecked((list == null || list.size() == 0) ? "1" : "0");
|
// 已解绑状态的更新
|
||||||
patientInfo.setOpenid(body.getOpenid());
|
if(patientInfo.getDelFlag() == 1) {
|
||||||
|
patientInfo.setIsChecked("0");
|
||||||
|
// 已绑定openid,将该值置空
|
||||||
|
patientInfo.setOpenid(loginPatientInfo != null? null: body.getOpenid());
|
||||||
patientInfo.setUnionid(body.getUnionid());
|
patientInfo.setUnionid(body.getUnionid());
|
||||||
patientInfo.setPatientName(body.getPatientName());
|
patientInfo.setPatientName(body.getPatientName());
|
||||||
patientInfo.setPhone(body.getPhone());
|
patientInfo.setPhone(body.getPhone());
|
||||||
@ -220,13 +222,47 @@ public class ResidentPatientInfoServiceImpl implements IResidentPatientInfoServi
|
|||||||
} else {
|
} else {
|
||||||
patientInfo.setDisease("0");
|
patientInfo.setDisease("0");
|
||||||
}
|
}
|
||||||
|
patientInfo.setBindOpenid(body.getOpenid());
|
||||||
|
patientInfo.setBindingTime(new Date());
|
||||||
residentPatientInfoMapper.updatePatientInfo(patientInfo);
|
residentPatientInfoMapper.updatePatientInfo(patientInfo);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if(patientInfo != null) {
|
// 注册
|
||||||
// 记录收货地址信息
|
} else {
|
||||||
this.insertReceiveAddress(patientInfo);
|
PatientInfo entity = new PatientInfo();
|
||||||
|
BeanUtils.copyBeanProp(entity, body);
|
||||||
|
// 已绑定openid,将该值置空
|
||||||
|
if(loginPatientInfo != null) {
|
||||||
|
entity.setOpenid(null);
|
||||||
}
|
}
|
||||||
|
if (body.getDiseaseList() != null) {
|
||||||
|
entity.setDisease(body.getDiseaseList().stream().collect(Collectors.joining(",")));
|
||||||
|
} else {
|
||||||
|
entity.setDisease("0");
|
||||||
|
}
|
||||||
|
entity.setPatientCode(IdUtils.fastSimpleUUID());
|
||||||
|
entity.setBindingTime(new Date());
|
||||||
|
entity.setIsChecked("0");
|
||||||
|
entity.setCreateTime(new Date());
|
||||||
|
entity.setCreateBy(body.getCardNo());
|
||||||
|
entity.setLoginFlag(Long.valueOf(1));
|
||||||
|
entity.setDelFlag(0);
|
||||||
|
entity.setBindOpenid(body.getOpenid());
|
||||||
|
residentPatientInfoMapper.insertPatientInfo(entity);
|
||||||
|
|
||||||
|
// 新增的话重新查询居民信息获取patientId
|
||||||
|
patientInfo = residentPatientInfoMapper.getPatientInfoByPatientCode(entity.getPatientCode());
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// 记录收货地址信息
|
||||||
|
if(patientInfo != null) {
|
||||||
|
// 如果置空了,重新赋值
|
||||||
|
if(StringUtils.isBlank(patientInfo.getOpenid())) {
|
||||||
|
patientInfo.setOpenid(body.getOpenid());
|
||||||
|
}
|
||||||
|
this.insertReceiveAddress(patientInfo);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -254,28 +290,6 @@ public class ResidentPatientInfoServiceImpl implements IResidentPatientInfoServi
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// 获取签约信息
|
|
||||||
private String getSignInfo(String region, String identity) {
|
|
||||||
if (!StringUtils.isBlank(region)) {
|
|
||||||
try {
|
|
||||||
// 查询签约信息
|
|
||||||
String result = (String) httpService.get(SpringUtils.getFdUrl(region) + "/resident/signinfo/detail/" + identity, null, String.class);
|
|
||||||
JSONObject jsonObject = JSONObject.parseObject(result);
|
|
||||||
if ("1".equals(jsonObject.get("code"))) {
|
|
||||||
if (jsonObject.getJSONObject("data") != null) {
|
|
||||||
SignInfoDetailVo signInfo = JSONObject.parseObject(jsonObject.getJSONObject("data").toJSONString(), SignInfoDetailVo.class);
|
|
||||||
if (signInfo != null) {
|
|
||||||
return signInfo.getSignNo();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
} catch (Exception e) {
|
|
||||||
log.error("注册完善信息-更新签约标识出错:{}", e.getMessage());
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @return void
|
* @return void
|
||||||
* @Author mengkuiliang
|
* @Author mengkuiliang
|
||||||
@ -286,13 +300,13 @@ public class ResidentPatientInfoServiceImpl implements IResidentPatientInfoServi
|
|||||||
@Override
|
@Override
|
||||||
public void unbinding(String patientCode) {
|
public void unbinding(String patientCode) {
|
||||||
PatientInfo register = residentPatientInfoMapper.selectPatientInfoByCode(patientCode);
|
PatientInfo register = residentPatientInfoMapper.selectPatientInfoByCode(patientCode);
|
||||||
if (register == null || StringUtils.isBlank(register.getOpenid())) {
|
if (register == null || String.valueOf(register.getDelFlag()).equals("1")) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
register.setIsChecked("0");
|
register.setIsChecked("0");
|
||||||
register.setOpenid("");
|
register.setOpenid(null);
|
||||||
register.setUpdateTime(new Date());
|
register.setDelFlag(1);
|
||||||
register.setUpdateBy(register.getCreateBy());
|
register.setBindOpenid("");
|
||||||
residentPatientInfoMapper.updatePatientInfo(register);
|
residentPatientInfoMapper.updatePatientInfo(register);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -322,15 +336,19 @@ public class ResidentPatientInfoServiceImpl implements IResidentPatientInfoServi
|
|||||||
if (register == null) {
|
if (register == null) {
|
||||||
throw new ServiceException("该账号未注册不能切换");
|
throw new ServiceException("该账号未注册不能切换");
|
||||||
} else {
|
} else {
|
||||||
if (StringUtils.isBlank(register.getOpenid())) {
|
if (StringUtils.isBlank(register.getBindOpenid())) {
|
||||||
throw new ServiceException("该账号未注册不能切换");
|
throw new ServiceException("该账号未注册不能切换");
|
||||||
}
|
}
|
||||||
if (!openid.equals(register.getOpenid())) {
|
if (!openid.equals(register.getBindOpenid())) {
|
||||||
throw new ServiceException("该账号已被其他人绑定不能切换");
|
throw new ServiceException("该账号已被其他人绑定不能切换");
|
||||||
}
|
}
|
||||||
residentPatientInfoMapper.switchResident(openid, patientCode);
|
residentPatientInfoMapper.switchResident(openid, patientCode);
|
||||||
}
|
}
|
||||||
return residentPatientInfoMapper.selectPatientInfoByCode(patientCode);
|
PatientInfo patientInfo = residentPatientInfoMapper.selectPatientInfoByCode(patientCode);
|
||||||
|
if(patientInfo != null && StringUtils.isBlank(patientInfo.getOpenid())) {
|
||||||
|
patientInfo.setOpenid(openid);
|
||||||
|
}
|
||||||
|
return patientInfo;
|
||||||
}
|
}
|
||||||
|
|
||||||
/** 判断2个参数是否一样 */
|
/** 判断2个参数是否一样 */
|
||||||
@ -349,7 +367,7 @@ public class ResidentPatientInfoServiceImpl implements IResidentPatientInfoServi
|
|||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
PatientInfo patientInfo = null;
|
PatientInfo patientInfo = null;
|
||||||
// 获取当前选中的
|
// 获取当前登录的居民
|
||||||
List<PatientInfo> currentList = list.stream().filter(p -> p.getIsChecked().equals("1")).collect(Collectors.toList());
|
List<PatientInfo> currentList = list.stream().filter(p -> p.getIsChecked().equals("1")).collect(Collectors.toList());
|
||||||
if (currentList.size() > 0) {
|
if (currentList.size() > 0) {
|
||||||
if (!StringUtils.isBlank(currentList.get(0).getDisease())) {
|
if (!StringUtils.isBlank(currentList.get(0).getDisease())) {
|
||||||
@ -366,6 +384,7 @@ public class ResidentPatientInfoServiceImpl implements IResidentPatientInfoServi
|
|||||||
list.get(0).setDiseaseList(Arrays.asList(list.get(0).getDisease().split(",")));
|
list.get(0).setDiseaseList(Arrays.asList(list.get(0).getDisease().split(",")));
|
||||||
}
|
}
|
||||||
list.get(0).setIsChecked("1");
|
list.get(0).setIsChecked("1");
|
||||||
|
list.get(0).setOpenid(openid);
|
||||||
patientInfo = list.get(0);
|
patientInfo = list.get(0);
|
||||||
}
|
}
|
||||||
return patientInfo;
|
return patientInfo;
|
||||||
|
|||||||
@ -14,6 +14,7 @@
|
|||||||
<result property="userId" column="user_id"/>
|
<result property="userId" column="user_id"/>
|
||||||
<result property="unionid" column="unionid"/>
|
<result property="unionid" column="unionid"/>
|
||||||
<result property="openid" column="openid"/>
|
<result property="openid" column="openid"/>
|
||||||
|
<result property="bindOpenid" column="bind_openid"/>
|
||||||
<result property="phone" column="phone"/>
|
<result property="phone" column="phone"/>
|
||||||
<result property="address" column="address"/>
|
<result property="address" column="address"/>
|
||||||
<result property="urgentContactName" column="urgent_contact_name"/>
|
<result property="urgentContactName" column="urgent_contact_name"/>
|
||||||
@ -60,6 +61,7 @@
|
|||||||
user_id,
|
user_id,
|
||||||
unionid,
|
unionid,
|
||||||
openid,
|
openid,
|
||||||
|
bind_openid,
|
||||||
phone,
|
phone,
|
||||||
address,
|
address,
|
||||||
urgent_contact_name,
|
urgent_contact_name,
|
||||||
@ -110,6 +112,9 @@
|
|||||||
<if test="openid != null and openid != ''">
|
<if test="openid != null and openid != ''">
|
||||||
and openid = #{openid}
|
and openid = #{openid}
|
||||||
</if>
|
</if>
|
||||||
|
<if test="bindOpenid != null and bindOpenid != ''">
|
||||||
|
and bind_openid = #{bindOpenid}
|
||||||
|
</if>
|
||||||
<if test="phone != null and phone != ''">
|
<if test="phone != null and phone != ''">
|
||||||
and phone = #{phone}
|
and phone = #{phone}
|
||||||
</if>
|
</if>
|
||||||
@ -153,6 +158,9 @@
|
|||||||
</if>
|
</if>
|
||||||
<if test="openid != null">openid,
|
<if test="openid != null">openid,
|
||||||
</if>
|
</if>
|
||||||
|
<if test="bindOpenid != null">
|
||||||
|
bind_openid,
|
||||||
|
</if>
|
||||||
<if test="phone != null">phone,
|
<if test="phone != null">phone,
|
||||||
</if>
|
</if>
|
||||||
<if test="address != null">address,
|
<if test="address != null">address,
|
||||||
@ -243,6 +251,9 @@
|
|||||||
</if>
|
</if>
|
||||||
<if test="openid != null">#{openid},
|
<if test="openid != null">#{openid},
|
||||||
</if>
|
</if>
|
||||||
|
<if test="bindOpenid != null">
|
||||||
|
#{bindOpenid},
|
||||||
|
</if>
|
||||||
<if test="phone != null">#{phone},
|
<if test="phone != null">#{phone},
|
||||||
</if>
|
</if>
|
||||||
<if test="address != null">#{address},
|
<if test="address != null">#{address},
|
||||||
@ -340,6 +351,9 @@
|
|||||||
<if test="openid != null">openid =
|
<if test="openid != null">openid =
|
||||||
#{openid},
|
#{openid},
|
||||||
</if>
|
</if>
|
||||||
|
<if test="bindOpenid != null">
|
||||||
|
bind_openid = #{bindOpenid},
|
||||||
|
</if>
|
||||||
<if test="phone != null">phone =
|
<if test="phone != null">phone =
|
||||||
#{phone},
|
#{phone},
|
||||||
</if>
|
</if>
|
||||||
@ -462,7 +476,7 @@
|
|||||||
<!-- 获取已注册列表 -->
|
<!-- 获取已注册列表 -->
|
||||||
<select id="getList" resultType="com.xinelu.familydoctor.applet.pojo.entity.PatientInfo">
|
<select id="getList" resultType="com.xinelu.familydoctor.applet.pojo.entity.PatientInfo">
|
||||||
<include refid="selectPatientInfoVo"/>
|
<include refid="selectPatientInfoVo"/>
|
||||||
where openid = #{openid} and del_flag = 0
|
where bind_openid = #{openid} and del_flag = 0
|
||||||
<if test="cityCode != null and cityCode != '' and cityCode != 'null'">
|
<if test="cityCode != null and cityCode != '' and cityCode != 'null'">
|
||||||
and city_code = #{cityCode}
|
and city_code = #{cityCode}
|
||||||
</if>
|
</if>
|
||||||
@ -479,19 +493,20 @@
|
|||||||
<update id="switchResident">
|
<update id="switchResident">
|
||||||
update patient_info
|
update patient_info
|
||||||
set is_checked = (case when patient_code = #{patientCode} then '1' else '0' end)
|
set is_checked = (case when patient_code = #{patientCode} then '1' else '0' end)
|
||||||
where openid = #{openid}
|
where bind_openid = #{openid} and del_flag = 0
|
||||||
</update>
|
</update>
|
||||||
|
|
||||||
<!-- 更新选中标识 -->
|
<!-- 更新选中标识 -->
|
||||||
<update id="updateChecked">
|
<update id="updateChecked">
|
||||||
update patient_info set is_checked = #{isChecked} where patient_code = #{patientCode}
|
update patient_info set is_checked = #{isChecked}
|
||||||
|
where patient_code = #{patientCode}
|
||||||
</update>
|
</update>
|
||||||
|
|
||||||
<!-- 获取注册详细信息 -->
|
<!-- 获取注册详细信息 -->
|
||||||
<select id="selectPatientInfoByPhone" parameterType="String" resultMap="PatientInfoResult">
|
<select id="selectPatientInfoByPhone" parameterType="String" resultMap="PatientInfoResult">
|
||||||
<include refid="selectPatientInfoVo"/>
|
<include refid="selectPatientInfoVo"/>
|
||||||
where phone = #{pnone}
|
where phone = #{pnone}
|
||||||
and login_flag = '1'
|
and login_flag = '1' and del_flag = 0
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<select id="getPatientInfoByPatientCode" resultMap="PatientInfoResult">
|
<select id="getPatientInfoByPatientCode" resultMap="PatientInfoResult">
|
||||||
@ -499,4 +514,10 @@
|
|||||||
where patient_code = #{patientCode}
|
where patient_code = #{patientCode}
|
||||||
and del_flag = 0
|
and del_flag = 0
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
<!-- 查询已登录的居民信息 -->
|
||||||
|
<select id="getLoginByOpenId" resultType="com.xinelu.familydoctor.applet.pojo.entity.PatientInfo">
|
||||||
|
<include refid="selectPatientInfoVo"/>
|
||||||
|
where openid = #{openid} limit 1
|
||||||
|
</select>
|
||||||
</mapper>
|
</mapper>
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user