|
@@ -348,7 +348,7 @@ public class DoctorServiceImpl extends ServiceImpl<DoctorMapper, Doctor> impleme
|
|
|
UpdateWrapper<UserAccount> wrapper = new UpdateWrapper<>();
|
|
|
wrapper.eq("wxopenid", openid);
|
|
|
UserAccount userAccount = userAccountMapper.selectOne(wrapper);
|
|
|
- QueryWrapper wrapperD = new QueryWrapper() {{
|
|
|
+ QueryWrapper<Doctor> wrapperD = new QueryWrapper() {{
|
|
|
eq("phone", enPhone);
|
|
|
}};
|
|
|
QueryWrapper wrapperP = new QueryWrapper() {{
|
|
@@ -356,8 +356,8 @@ public class DoctorServiceImpl extends ServiceImpl<DoctorMapper, Doctor> impleme
|
|
|
}};
|
|
|
// 默认是医生的用户手机号绑定
|
|
|
if (StringUtils.isBlank(redirectCode) || "personalInfo".equals(redirectCode)) {
|
|
|
- List list = doctorMapper.selectList(wrapperD);
|
|
|
- if (list.size() > 0) {
|
|
|
+ List<Doctor> doctorList = doctorMapper.selectList(wrapperD);
|
|
|
+ if (doctorList.size() > 0) {
|
|
|
UpdateWrapper<UserAccount> wp = new UpdateWrapper<>();
|
|
|
wp.setSql("mobile = null ");
|
|
|
wp.eq("mobile", enPhone);
|
|
@@ -371,6 +371,9 @@ public class DoctorServiceImpl extends ServiceImpl<DoctorMapper, Doctor> impleme
|
|
|
doctor.setUnionid(userAccount.getUnionid());
|
|
|
doctor.setPhone(enPhone);
|
|
|
doctorMapper.updateOne(doctor);
|
|
|
+
|
|
|
+ userRoleService.addUserRole(userAccount, userAccount.getNickname(),
|
|
|
+ userAccount.getHeadimg(), doctorList.get(0).getId(), 1, 1);
|
|
|
}
|
|
|
}
|
|
|
Partner countPart = partnerMapper.selectOne(wrapperP);
|