|
@@ -123,35 +123,41 @@ public class TaPersonVisitRecordServiceImpl extends ServiceImpl<TaPersonVisitRec
|
123
|
123
|
public IPage<TaPersonVisitRecord> getDrainageVisitRecord(IPage<TaPersonVisitRecord> pg, Integer orgId, String activityName, String eventType, String shareName, String shareTel, String buildingId, String personType, List<TaPersonBuilding> taPersonBuildingList) {
|
124
|
124
|
IPage<TaPersonVisitRecord> taPersonVisitRecordIPage = personVisitRecordMapper.getDrainageVisitRecord(pg, orgId, activityName, eventType, shareName, shareTel, buildingId, personType, taPersonBuildingList);
|
125
|
125
|
List<TaPersonVisitRecord> taPersonVisitRecords = taPersonVisitRecordIPage.getRecords();
|
126
|
|
- taPersonVisitRecords.forEach(e -> {
|
|
126
|
+ for (TaPersonVisitRecord e : taPersonVisitRecords) {
|
|
127
|
+
|
127
|
128
|
TaPerson personInfo = taPersonMapper.selectById(e.getPersonId());
|
128
|
|
- if (personInfo != null){
|
|
129
|
+ if (personInfo != null) {
|
129
|
130
|
e.setUserName(personInfo.getNickname());
|
130
|
131
|
e.setUserTel(personInfo.getPhone());
|
131
|
132
|
}
|
132
|
133
|
|
133
|
134
|
TaPerson userShareInfo = taPersonMapper.selectById(e.getSharePersonId());
|
134
|
|
- if (userShareInfo != null){
|
|
135
|
+ if (userShareInfo != null) {
|
135
|
136
|
e.setShareName(userShareInfo.getNickname());
|
136
|
137
|
e.setShareTel(userShareInfo.getPhone());
|
137
|
138
|
}
|
138
|
139
|
|
139
|
|
- if (!StringUtils.isEmpty(e.getDrainageName()) && CommConstant.EVENT_H5.equals(e.getEventType())){
|
|
140
|
+ if (CommConstant.EVENT_H5.equals(e.getEventType())) {
|
140
|
141
|
e.setActivityName(e.getDrainageName());
|
|
142
|
+ continue;
|
141
|
143
|
}
|
142
|
|
- if (!StringUtils.isEmpty(e.getBuildingName()) && CommConstant.POSTER_CONTENT_TYPE_BUILDING.equals(e.getEventType())){
|
|
144
|
+ if (CommConstant.POSTER_CONTENT_TYPE_BUILDING.equals(e.getEventType())) {
|
143
|
145
|
e.setActivityName(e.getBuildingName());
|
|
146
|
+ continue;
|
144
|
147
|
}
|
145
|
|
- if (!StringUtils.isEmpty(e.getNewsName()) && CommConstant.POSTER_CONTENT_TYPE_NEWS.equals(e.getEventType())){
|
|
148
|
+ if (CommConstant.POSTER_CONTENT_TYPE_NEWS.equals(e.getEventType())) {
|
146
|
149
|
e.setActivityName(e.getNewsName());
|
|
150
|
+ continue;
|
147
|
151
|
}
|
148
|
|
- if (!StringUtils.isEmpty(e.getHelpActivityName()) && CommConstant.POINTS_CHANGE_HELP.equals(e.getEventType())){
|
|
152
|
+ if (CommConstant.POINTS_CHANGE_HELP.equals(e.getEventType())) {
|
149
|
153
|
e.setActivityName(e.getHelpActivityName());
|
|
154
|
+ continue;
|
150
|
155
|
}
|
151
|
|
- if (!StringUtils.isEmpty(e.getGroupActivityName()) && CommConstant.POINTS_CHANGE_GROUP.equals(e.getEventType())){
|
|
156
|
+ if (CommConstant.POINTS_CHANGE_GROUP.equals(e.getEventType())) {
|
152
|
157
|
e.setActivityName(e.getGroupActivityName());
|
|
158
|
+ continue;
|
153
|
159
|
}
|
154
|
|
- });
|
|
160
|
+ }
|
155
|
161
|
taPersonVisitRecordIPage.setRecords(taPersonVisitRecords);
|
156
|
162
|
return taPersonVisitRecordIPage;
|
157
|
163
|
}
|
|
@@ -176,14 +182,14 @@ public class TaPersonVisitRecordServiceImpl extends ServiceImpl<TaPersonVisitRec
|
176
|
182
|
* @return
|
177
|
183
|
*/
|
178
|
184
|
@Override
|
179
|
|
- public IPage<TaPersonVisitRecord> getWxVisitRecordList(IPage<TaPersonVisitRecord> pg, Integer userId, Integer orgId, String targetId) {
|
|
185
|
+ public IPage<TaPersonVisitRecord> getWxVisitRecordList(IPage<TaPersonVisitRecord> pg, Integer userId, Integer orgId, String targetId, String eventType) {
|
180
|
186
|
//根据userId获取用户信息
|
181
|
187
|
QueryWrapper<TaPerson> taPersonQueryWrapper = new QueryWrapper<>();
|
182
|
188
|
taPersonQueryWrapper.eq("user_id",userId);
|
183
|
189
|
taPersonQueryWrapper.eq("org_id",orgId);
|
184
|
190
|
TaPerson taPerson = taPersonMapper.selectOne(taPersonQueryWrapper);
|
185
|
191
|
//获取我的访问客户列表
|
186
|
|
- IPage<TaPersonVisitRecord> result = personVisitRecordMapper.getWxVisitRecordList(pg,userId,orgId, targetId,taPerson.getPersonId());
|
|
192
|
+ IPage<TaPersonVisitRecord> result = personVisitRecordMapper.getWxVisitRecordList(pg,userId,orgId, targetId,taPerson.getPersonId(), eventType);
|
187
|
193
|
List<TaPersonVisitRecord> records = result.getRecords();
|
188
|
194
|
//判断是否我的客户状态
|
189
|
195
|
records.forEach(e -> {
|