|
@@ -3,6 +3,7 @@ package com.liangjian11.ymall.service.impl;
|
|
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
|
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
|
|
import com.liangjian11.ymall.config.RedirectPathSource;
|
|
|
+import com.liangjian11.ymall.mapper.DoctorMapper;
|
|
|
import com.liangjian11.ymall.mapper.PartnerMapper;
|
|
|
import com.liangjian11.ymall.mapper.UserRoleMapper;
|
|
|
import com.liangjian11.ymall.model.*;
|
|
@@ -25,15 +26,15 @@ public class UserRoleServiceImpl extends ServiceImpl<UserRoleMapper, UserRole> i
|
|
|
|
|
|
private final UserRoleMapper userRoleMapper;
|
|
|
private final RedirectPathSource redirectPathSource;
|
|
|
- private final DoctorService doctorService;
|
|
|
+ private final DoctorMapper doctorMapper;
|
|
|
private final PartnerMapper partnerMapper;
|
|
|
private final PartnerRecommendService partnerRecommendService;
|
|
|
|
|
|
- public UserRoleServiceImpl(UserRoleMapper userRoleMapper, RedirectPathSource redirectPathSource, DoctorService doctorService, PartnerMapper partnerMapper,
|
|
|
+ public UserRoleServiceImpl(UserRoleMapper userRoleMapper, RedirectPathSource redirectPathSource, DoctorMapper doctorMapper, PartnerMapper partnerMapper,
|
|
|
PartnerRecommendService partnerRecommendService) {
|
|
|
this.userRoleMapper = userRoleMapper;
|
|
|
this.redirectPathSource = redirectPathSource;
|
|
|
- this.doctorService = doctorService;
|
|
|
+ this.doctorMapper = doctorMapper;
|
|
|
this.partnerMapper = partnerMapper;
|
|
|
this.partnerRecommendService = partnerRecommendService;
|
|
|
}
|
|
@@ -48,7 +49,7 @@ public class UserRoleServiceImpl extends ServiceImpl<UserRoleMapper, UserRole> i
|
|
|
QueryWrapper<Doctor> doctorQuery = new QueryWrapper<>();
|
|
|
if (StringUtils.isNotBlank(account.getMobile())) {
|
|
|
doctorQuery.eq("phone", account.getMobile());
|
|
|
- doctor = doctorService.getOne(doctorQuery);
|
|
|
+ doctor = doctorMapper.selectOne(doctorQuery);
|
|
|
}
|
|
|
if (list == null || list.size() == 0) {
|
|
|
if(type == 1 ) {
|
|
@@ -135,7 +136,7 @@ public class UserRoleServiceImpl extends ServiceImpl<UserRoleMapper, UserRole> i
|
|
|
doctor.setAccountID(account.getId());
|
|
|
doctor.setUnionid(account.getUnionid());
|
|
|
doctor.setWxOpenID(account.getWxopenid());
|
|
|
- doctorService.update(doctor,doctorQuery);
|
|
|
+ doctorMapper.update(doctor,doctorQuery);
|
|
|
if (StringUtils.isNotBlank(id)) {
|
|
|
QueryWrapper<PartnerRecommend> partnerRecommendQuery = new QueryWrapper<>();
|
|
|
partnerRecommendQuery.eq("subordinate_id", doctor.getId());
|