Selaa lähdekoodia

增加订单时间

liaoyongfei 4 vuotta sitten
vanhempi
commit
e4894bb989

+ 1 - 1
ymall/src/main/java/com/liangjian11/ymall/service/impl/DoctorServiceImpl.java

@@ -374,7 +374,7 @@ public class DoctorServiceImpl extends ServiceImpl<DoctorMapper, Doctor> impleme
       QueryWrapper<UserRole> userRoleQuery = new QueryWrapper<>();
       userRoleQuery.eq("user_role_type", 1);
       userRoleQuery.eq("mobile", enPhone);
-      UserRole userRole = userRoleService.getOne(userRoleQuery);
+      UserRole userRole = userRoleMapper.selectOne(userRoleQuery);
       if (userRole == null)
         userRoleService.addUserRole(userAccount, enPhone, userAccount.getNickname(), userAccount.getHeadimg(), doctorList.get(0).getId(), 1, 1);
       else{

+ 6 - 5
ymall/src/main/java/com/liangjian11/ymall/service/impl/UserRoleServiceImpl.java

@@ -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());