傅行帆 пре 5 година
родитељ
комит
167e6bf7cd

+ 1
- 4
src/main/java/com/huiju/estateagents/service/impl/TaPersonVisitRecordServiceImpl.java Прегледај датотеку

@@ -159,11 +159,8 @@ public class TaPersonVisitRecordServiceImpl extends ServiceImpl<TaPersonVisitRec
159 159
 		List<TaPersonVisitRecord> records = result.getRecords();
160 160
 		//判断是否我的客户状态
161 161
 		records.forEach(e -> {
162
-			String data = e.getData();
163
-			JSONObject dataJson = JSONObject.parseObject(data);
164
-			String realtyConsultant = dataJson.getString("consultant");
165 162
 			QueryWrapper<TaRecommendCustomer> queryWrapper = new QueryWrapper();
166
-			queryWrapper.eq("realty_consultant",realtyConsultant);
163
+			queryWrapper.eq("realty_consultant",e.getConsultantId());
167 164
 			queryWrapper.eq("person_id",e.getPersonId());
168 165
 			TaRecommendCustomer taRecommendCustomer = taRecommendCustomerMapper.selectOne(queryWrapper);
169 166
 			if (null != taRecommendCustomer){

+ 3
- 0
src/main/java/com/huiju/estateagents/service/impl/TaRecommendCustomerServiceImpl.java Прегледај датотеку

@@ -354,6 +354,9 @@ public class TaRecommendCustomerServiceImpl extends ServiceImpl<TaRecommendCusto
354 354
         personQueryWrapper.eq("phone",params.getString("phone"));
355 355
         TaPerson currentPerson = taPersonMapper.selectOne(personQueryWrapper);
356 356
         if(null != currentPerson){
357
+            if (currentPerson.getPersonType().equals(CommConstant.PERSON_REALTY_CONSULTANT)){
358
+                return ResponseBean.error("置业顾问不可以绑定置业顾问", ResponseBean.ERROR_ILLEGAL_PARAMS);
359
+            }
357 360
             taRecommendCustomer.setPersonId(currentPerson.getPersonId());
358 361
         }
359 362