|
@@ -1,7 +1,6 @@
|
1
|
1
|
package com.huiju.estateagents.service.impl;
|
2
|
2
|
|
3
|
3
|
import cn.binarywang.wx.miniapp.bean.WxMaUserInfo;
|
4
|
|
-import com.alibaba.fastjson.JSONArray;
|
5
|
4
|
import com.alibaba.fastjson.JSONObject;
|
6
|
5
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
7
|
6
|
import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
|
|
@@ -67,6 +66,9 @@ public class TaPersonServiceImpl extends ServiceImpl<TaPersonMapper, TaPerson> i
|
67
|
66
|
@Autowired
|
68
|
67
|
private ITaRecommendCustomerService iTaRecommendCustomerService;
|
69
|
68
|
|
|
69
|
+ @Autowired
|
|
70
|
+ private TaSaveMapper taSaveMapper;
|
|
71
|
+
|
70
|
72
|
@Override
|
71
|
73
|
public TaPerson mergePersonWxInfo(WxMaUserInfo userInfo) {
|
72
|
74
|
// 先查询是否存在用户
|
|
@@ -645,4 +647,21 @@ public class TaPersonServiceImpl extends ServiceImpl<TaPersonMapper, TaPerson> i
|
645
|
647
|
public String getPersonIdByCustomerId(String customerId){
|
646
|
648
|
return taRecommendCustomerMapper.getCustomerPersonId(customerId);
|
647
|
649
|
}
|
|
650
|
+
|
|
651
|
+ @Override
|
|
652
|
+ public IPage<TaPerson> getSavedConsaultants(int pageNumber,int pageSize,String personId){
|
|
653
|
+ QueryWrapper<TaSave> savePerson = new QueryWrapper<>();
|
|
654
|
+ savePerson.eq("person_id",personId);
|
|
655
|
+ savePerson.eq("target_type",CommConstant.FAVOR_CONSULTANT);
|
|
656
|
+ List<TaSave> savedPerson = taSaveMapper.selectList(savePerson);
|
|
657
|
+ List<String> personIds = new ArrayList<>();
|
|
658
|
+ for(int i =0;i<savedPerson.size();i++){
|
|
659
|
+ personIds.add(savedPerson.get(i).getSavedTarget());
|
|
660
|
+ }
|
|
661
|
+ IPage<TaPerson> page = new Page<>(pageNumber, pageSize);
|
|
662
|
+ QueryWrapper<TaPerson> persons = new QueryWrapper<>();
|
|
663
|
+ persons.in("personId",personIds);
|
|
664
|
+ return taPersonMapper.selectPage(page,persons);
|
|
665
|
+
|
|
666
|
+ }
|
648
|
667
|
}
|