Переглянути джерело

去除上级合伙人固定小写

liaoyongfei 4 роки тому
батько
коміт
97875304b5

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

@@ -157,7 +157,7 @@ public class DoctorServiceImpl extends ServiceImpl<DoctorMapper, Doctor> impleme
       recQuery.eq("subordinate_id", doctor.getId());
       int reci = partnerRecommendService.count(recQuery);
       if (reci == 0) {
-        PartnerRecommend partnerRecommend = new PartnerRecommend(doctor.getId(), doctor.getPartnerID().toLowerCase(), 1);
+        PartnerRecommend partnerRecommend = new PartnerRecommend(doctor.getId(), doctor.getPartnerID(), 1);
         partnerRecommendService.insertOne(partnerRecommend);
       }
     }
@@ -209,7 +209,7 @@ public class DoctorServiceImpl extends ServiceImpl<DoctorMapper, Doctor> impleme
       recQuery.eq("subordinate_id", doctor.getId());
       int reci = partnerRecommendService.count(recQuery);
       if (reci == 0) {
-        PartnerRecommend partnerRecommend = new PartnerRecommend(doctor.getId(), doctor.getPartnerID().toLowerCase(), 1);
+        PartnerRecommend partnerRecommend = new PartnerRecommend(doctor.getId(), doctor.getPartnerID(), 1);
         partnerRecommendService.insertOne(partnerRecommend);
       }
     }

+ 4 - 4
ymall/src/main/java/com/liangjian11/ymall/service/impl/PartnerServiceImpl.java

@@ -334,7 +334,7 @@ public class PartnerServiceImpl extends ServiceImpl<PartnerMapper, Partner> impl
       partnerQuery.eq("mobile",roleBinding.getMobile());
       Partner partner=partnerMapper.selectOne(partnerQuery);
       if(StringUtils.isNotBlank(roleBinding.getSuperiorPartnerID())){
-        Partner supPartner=partnerMapper.selectById(roleBinding.getSuperiorPartnerID().toLowerCase());
+        Partner supPartner=partnerMapper.selectById(roleBinding.getSuperiorPartnerID());
         if(supPartner==null)
           return ResultUtil.createFail("该上级合伙人已经失效");
         if(supPartner.getPartnerType().equals(1))
@@ -359,7 +359,7 @@ public class PartnerServiceImpl extends ServiceImpl<PartnerMapper, Partner> impl
         partner.setPartnerHeadImg(userAccount.getHeadimg());
         partner.setPartnerName(userAccount.getNickname());
         if(StringUtils.isNotBlank(roleBinding.getSuperiorPartnerID())){
-          Partner superpartner = partnerMapper.selectById(roleBinding.getSuperiorPartnerID().toLowerCase());
+          Partner superpartner = partnerMapper.selectById(roleBinding.getSuperiorPartnerID());
           if(superpartner!=null)
              partner.setRegion(superpartner.getRegion());
         }
@@ -371,7 +371,7 @@ public class PartnerServiceImpl extends ServiceImpl<PartnerMapper, Partner> impl
           recQuery.eq("status",1);
           int reci = partnerRecommendService.count(recQuery);
           if(reci == 0 ) {
-            PartnerRecommend partnerRecommend = new PartnerRecommend(partner.getId(), roleBinding.getSuperiorPartnerID().toLowerCase(), 1);
+            PartnerRecommend partnerRecommend = new PartnerRecommend(partner.getId(), roleBinding.getSuperiorPartnerID(), 1);
             partnerRecommendService.insertOne(partnerRecommend);
           }
         }
@@ -390,7 +390,7 @@ public class PartnerServiceImpl extends ServiceImpl<PartnerMapper, Partner> impl
           recQuery.eq("status",1);
           int reci = partnerRecommendService.count(recQuery);
           if(reci == 0 ) {
-            PartnerRecommend partnerRecommend = new PartnerRecommend(partner.getId(), roleBinding.getSuperiorPartnerID().toLowerCase(), 1);
+            PartnerRecommend partnerRecommend = new PartnerRecommend(partner.getId(), roleBinding.getSuperiorPartnerID(), 1);
             partnerRecommendService.insertOne(partnerRecommend);
           }
         }

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

@@ -142,7 +142,7 @@ public class UserRoleServiceImpl extends ServiceImpl<UserRoleMapper, UserRole> i
           partnerRecommendQuery.eq("superior_id", id);
           PartnerRecommend partnerRecommend1 = partnerRecommendService.getOne(partnerRecommendQuery);
           if (partnerRecommend1 == null) {
-            PartnerRecommend partnerRecommend = new PartnerRecommend(doctor.getId(), id.toLowerCase(), 1);
+            PartnerRecommend partnerRecommend = new PartnerRecommend(doctor.getId(), id, 1);
             partnerRecommendService.insertOne(partnerRecommend);
           }
         }
@@ -228,7 +228,7 @@ public class UserRoleServiceImpl extends ServiceImpl<UserRoleMapper, UserRole> i
       partner.setPartnerHeadImg(account.getHeadimg());
       partnerMapper.updateById(partner);
       if (StringUtils.isNotBlank(id)) {
-        PartnerRecommend partnerRecommend = new PartnerRecommend(partner.getId(), id.toLowerCase(), 1);
+        PartnerRecommend partnerRecommend = new PartnerRecommend(partner.getId(), id, 1);
         partnerRecommendService.insertOne(partnerRecommend);
       }
       res.sendRedirect(redirectPathSource.getSignUp());