Browse Source

bug 修复

傅行帆 3 years ago
parent
commit
498ed7645f

+ 25
- 26
src/main/java/com/yunzhi/marketing/service/impl/TaPersonVisitRecordServiceImpl.java View File

@@ -9,15 +9,11 @@ import com.yunzhi.marketing.common.CommConstant;
9 9
 import com.yunzhi.marketing.common.StringUtils;
10 10
 import com.yunzhi.marketing.drainage.entity.TaDrainage;
11 11
 import com.yunzhi.marketing.drainage.mapper.TaDrainageMapper;
12
-import com.yunzhi.marketing.mapper.HelpActivityMapper;
13
-import com.yunzhi.marketing.mapper.TaBuildingDynamicMapper;
14
-import com.yunzhi.marketing.mapper.TaNewsMapper;
15
-import com.yunzhi.marketing.mapper.TaPersonMapper;
16
-import com.yunzhi.marketing.mapper.TaPersonVisitRecordMapper;
17
-import com.yunzhi.marketing.mapper.TaRecommendCustomerMapper;
18
-import com.yunzhi.marketing.mapper.TaShareActivityMapper;
12
+import com.yunzhi.marketing.mapper.*;
19 13
 import com.yunzhi.marketing.entity.*;
20 14
 import com.yunzhi.marketing.service.*;
15
+import com.yunzhi.marketing.xlk.entity.Video;
16
+import com.yunzhi.marketing.xlk.mapper.VideoMapper;
21 17
 import org.springframework.beans.factory.annotation.Autowired;
22 18
 import org.springframework.stereotype.Service;
23 19
 
@@ -43,12 +39,12 @@ public class TaPersonVisitRecordServiceImpl extends ServiceImpl<TaPersonVisitRec
43 39
 	
44 40
 	@Autowired
45 41
 	private TaBuildingDynamicMapper taBuildingDynamicMapper;
46
-	
42
+
47 43
 	@Autowired
48
-	private TaShareActivityMapper taShareActivityMapper;
49
-	
44
+	private TaLiveActivityMapper taLiveActivityMapper;
45
+
50 46
 	@Autowired
51
-	private HelpActivityMapper helpActivityMapper;
47
+	private VideoMapper videoMapper;
52 48
 	
53 49
 	@Autowired
54 50
 	private TaNewsMapper taNewsMapper;
@@ -90,39 +86,42 @@ public class TaPersonVisitRecordServiceImpl extends ServiceImpl<TaPersonVisitRec
90 86
 		IPage<TaPersonVisitRecord> result = personVisitRecordMapper.getPersonVisitRecordList(pg,taRecommendCustomer.getPersonId());
91 87
 		List<TaPersonVisitRecord> records = result.getRecords();
92 88
 		records.forEach(e -> {
89
+			if (StringUtils.isEmpty(e.getTargetId())){
90
+				return;
91
+			}
93 92
 			//获取活动标题
94
-			if ("activity".equals(e.getEventType()) && null != e.getTargetId()){
93
+			if ("activity".equals(e.getEventType()) || "house".equals(e.getEventType()) || "dymic".equals(e.getEventType()) || "look".equals(e.getEventType())) {
95 94
 				TaBuildingDynamic taBuildingDynamic = taBuildingDynamicMapper.selectById(e.getTargetId());
96
-				if (null != taBuildingDynamic){
95
+				if (null != taBuildingDynamic) {
97 96
 					e.setActivityName(taBuildingDynamic.getTitle());
98 97
 				}
99
-				
98
+
100 99
 			}
101 100
 			//获取拼团标题
102
-			if ("group".equals(e.getEventType()) && null != e.getTargetId()){
103
-				TaShareActivity taShareActivity = taShareActivityMapper.selectById(e.getTargetId());
104
-				if (null != taShareActivity){
105
-					e.setActivityName(taShareActivity.getActivityName());
101
+			if ("live".equals(e.getEventType()) && null != e.getTargetId()) {
102
+				TaLiveActivity taLiveActivity = taLiveActivityMapper.selectById(e.getTargetId());
103
+				if (null != taLiveActivity) {
104
+					e.setActivityName(taLiveActivity.getLiveActivityTitle());
106 105
 				}
107 106
 			}
108 107
 			//获取助力标题
109
-			if ("help".equals(e.getEventType()) && null != e.getTargetId()){
110
-				HelpActivity helpActivity = helpActivityMapper.selectById(e.getTargetId());
111
-				if (null != helpActivity){
112
-					e.setActivityName(helpActivity.getTitle());
108
+			if ("video".equals(e.getEventType()) && null != e.getTargetId()) {
109
+				Video video = videoMapper.selectById(e.getTargetId());
110
+				if (null != video) {
111
+					e.setActivityName(video.getName());
113 112
 				}
114 113
 			}
115 114
 			//获取咨询标题
116
-			if ("news".equals(e.getEventType()) && null != e.getTargetId()){
115
+			if ("news".equals(e.getEventType()) && null != e.getTargetId()) {
117 116
 				TaNews taNews = taNewsMapper.selectById(e.getTargetId());
118
-				if (null != taNews){
117
+				if (null != taNews) {
119 118
 					e.setActivityName(taNews.getNewsName());
120 119
 				}
121 120
 			}
122 121
 			//获取H5活动标题
123
-			if ("h5".equals(e.getEventType()) && null != e.getTargetId()){
122
+			if ("h5".equals(e.getEventType()) && null != e.getTargetId()) {
124 123
 				TaDrainage taDrainage = taDrainageMapper.selectById(e.getTargetId());
125
-				if (null != taDrainage){
124
+				if (null != taDrainage) {
126 125
 					e.setActivityName(taDrainage.getName());
127 126
 				}
128 127
 			}

+ 26
- 20
src/main/java/com/yunzhi/marketing/service/impl/TaRecommendCustomerServiceImpl.java View File

@@ -91,10 +91,10 @@ public class TaRecommendCustomerServiceImpl extends ServiceImpl<TaRecommendCusto
91 91
     private TaBuildingDynamicMapper taBuildingDynamicMapper;
92 92
 
93 93
     @Autowired
94
-    private TaShareActivityMapper taShareActivityMapper;
94
+    private TaLiveActivityMapper taLiveActivityMapper;
95 95
 
96 96
     @Autowired
97
-    private HelpActivityMapper helpActivityMapper;
97
+    private VideoMapper videoMapper;
98 98
 
99 99
     @Autowired
100 100
     private TaNewsMapper taNewsMapper;
@@ -1242,8 +1242,11 @@ public class TaRecommendCustomerServiceImpl extends ServiceImpl<TaRecommendCusto
1242 1242
             IPage<TaPersonVisitRecord> taPersonVisitRecordIPage = taPersonVisitRecordMapper.visitRecordByPersonId(page, personId, taPersonBuildingList, buildingId);
1243 1243
             List<TaPersonVisitRecord> records = taPersonVisitRecordIPage.getRecords();
1244 1244
             records.forEach(e -> {
1245
+                if (StringUtils.isEmpty(e.getTargetId())){
1246
+                    return;
1247
+                }
1245 1248
                 //获取活动标题
1246
-                if ("activity".equals(e.getEventType()) && null != e.getTargetId()) {
1249
+                if ("activity".equals(e.getEventType()) || "house".equals(e.getEventType()) || "dymic".equals(e.getEventType()) || "look".equals(e.getEventType())) {
1247 1250
                     TaBuildingDynamic taBuildingDynamic = taBuildingDynamicMapper.selectById(e.getTargetId());
1248 1251
                     if (null != taBuildingDynamic) {
1249 1252
                         e.setActivityName(taBuildingDynamic.getTitle());
@@ -1251,17 +1254,17 @@ public class TaRecommendCustomerServiceImpl extends ServiceImpl<TaRecommendCusto
1251 1254
 
1252 1255
                 }
1253 1256
                 //获取拼团标题
1254
-                if ("group".equals(e.getEventType()) && null != e.getTargetId()) {
1255
-                    TaShareActivity taShareActivity = taShareActivityMapper.selectById(e.getTargetId());
1256
-                    if (null != taShareActivity) {
1257
-                        e.setActivityName(taShareActivity.getActivityName());
1257
+                if ("live".equals(e.getEventType()) && null != e.getTargetId()) {
1258
+                    TaLiveActivity taLiveActivity = taLiveActivityMapper.selectById(e.getTargetId());
1259
+                    if (null != taLiveActivity) {
1260
+                        e.setActivityName(taLiveActivity.getLiveActivityTitle());
1258 1261
                     }
1259 1262
                 }
1260 1263
                 //获取助力标题
1261
-                if ("help".equals(e.getEventType()) && null != e.getTargetId()) {
1262
-                    HelpActivity helpActivity = helpActivityMapper.selectById(e.getTargetId());
1263
-                    if (null != helpActivity) {
1264
-                        e.setActivityName(helpActivity.getTitle());
1264
+                if ("video".equals(e.getEventType()) && null != e.getTargetId()) {
1265
+                    Video video = videoMapper.selectById(e.getTargetId());
1266
+                    if (null != video) {
1267
+                        e.setActivityName(video.getName());
1265 1268
                     }
1266 1269
                 }
1267 1270
                 //获取咨询标题
@@ -1338,8 +1341,11 @@ public class TaRecommendCustomerServiceImpl extends ServiceImpl<TaRecommendCusto
1338 1341
             IPage<TaPersonVisitRecord> taPersonVisitRecordIPage = taPersonVisitRecordMapper.visitRecordByPersonId(page, personId, taPersonBuildingList, buildingId);
1339 1342
             List<TaPersonVisitRecord> records = taPersonVisitRecordIPage.getRecords();
1340 1343
             records.forEach(e -> {
1344
+                if (StringUtils.isEmpty(e.getTargetId())){
1345
+                   return;
1346
+                }
1341 1347
                 //获取活动标题
1342
-                if ("activity".equals(e.getEventType()) && null != e.getTargetId()) {
1348
+                if ("activity".equals(e.getEventType()) || "house".equals(e.getEventType()) || "dymic".equals(e.getEventType()) || "look".equals(e.getEventType())) {
1343 1349
                     TaBuildingDynamic taBuildingDynamic = taBuildingDynamicMapper.selectById(e.getTargetId());
1344 1350
                     if (null != taBuildingDynamic) {
1345 1351
                         e.setActivityName(taBuildingDynamic.getTitle());
@@ -1347,17 +1353,17 @@ public class TaRecommendCustomerServiceImpl extends ServiceImpl<TaRecommendCusto
1347 1353
 
1348 1354
                 }
1349 1355
                 //获取拼团标题
1350
-                if ("group".equals(e.getEventType()) && null != e.getTargetId()) {
1351
-                    TaShareActivity taShareActivity = taShareActivityMapper.selectById(e.getTargetId());
1352
-                    if (null != taShareActivity) {
1353
-                        e.setActivityName(taShareActivity.getActivityName());
1356
+                if ("live".equals(e.getEventType()) && null != e.getTargetId()) {
1357
+                    TaLiveActivity taLiveActivity = taLiveActivityMapper.selectById(e.getTargetId());
1358
+                    if (null != taLiveActivity) {
1359
+                        e.setActivityName(taLiveActivity.getLiveActivityTitle());
1354 1360
                     }
1355 1361
                 }
1356 1362
                 //获取助力标题
1357
-                if ("help".equals(e.getEventType()) && null != e.getTargetId()) {
1358
-                    HelpActivity helpActivity = helpActivityMapper.selectById(e.getTargetId());
1359
-                    if (null != helpActivity) {
1360
-                        e.setActivityName(helpActivity.getTitle());
1363
+                if ("video".equals(e.getEventType()) && null != e.getTargetId()) {
1364
+                    Video video = videoMapper.selectById(e.getTargetId());
1365
+                    if (null != video) {
1366
+                        e.setActivityName(video.getName());
1361 1367
                     }
1362 1368
                 }
1363 1369
                 //获取咨询标题

+ 21
- 16
src/main/java/com/yunzhi/marketing/xlk/service/impl/CustomerInfoServiceImpl.java View File

@@ -11,7 +11,9 @@ import com.yunzhi.marketing.entity.*;
11 11
 import com.yunzhi.marketing.mapper.*;
12 12
 import com.yunzhi.marketing.service.IMiniAppService;
13 13
 import com.yunzhi.marketing.xlk.entity.CustomerInfo;
14
+import com.yunzhi.marketing.xlk.entity.Video;
14 15
 import com.yunzhi.marketing.xlk.mapper.CustomerInfoMapper;
16
+import com.yunzhi.marketing.xlk.mapper.VideoMapper;
15 17
 import com.yunzhi.marketing.xlk.service.ICustomerInfoService;
16 18
 import com.yunzhi.marketing.xlk.vo.CustomerInfoVO;
17 19
 import org.springframework.beans.factory.annotation.Autowired;
@@ -49,10 +51,10 @@ public class CustomerInfoServiceImpl extends ServiceImpl<CustomerInfoMapper, Cus
49 51
     private TaBuildingDynamicMapper taBuildingDynamicMapper;
50 52
 
51 53
     @Autowired
52
-    private TaShareActivityMapper taShareActivityMapper;
54
+    private TaLiveActivityMapper taLiveActivityMapper;
53 55
 
54 56
     @Autowired
55
-    private HelpActivityMapper helpActivityMapper;
57
+    private VideoMapper videoMapper;
56 58
 
57 59
     @Autowired
58 60
     private TaNewsMapper taNewsMapper;
@@ -79,39 +81,42 @@ public class CustomerInfoServiceImpl extends ServiceImpl<CustomerInfoMapper, Cus
79 81
         if (!StringUtils.isEmpty(personId)) {
80 82
             List<TaPersonVisitRecord> records = taPersonVisitRecordMapper.visitRecordByPersonIdNew(personId);
81 83
             records.forEach(e -> {
84
+                if (StringUtils.isEmpty(e.getTargetId())){
85
+                    return;
86
+                }
82 87
                 //获取活动标题
83
-                if ("activity".equals(e.getEventType()) && null != e.getTargetId()){
88
+                if ("activity".equals(e.getEventType()) || "house".equals(e.getEventType()) || "dymic".equals(e.getEventType()) || "look".equals(e.getEventType())) {
84 89
                     TaBuildingDynamic taBuildingDynamic = taBuildingDynamicMapper.selectById(e.getTargetId());
85
-                    if (null != taBuildingDynamic){
90
+                    if (null != taBuildingDynamic) {
86 91
                         e.setActivityName(taBuildingDynamic.getTitle());
87 92
                     }
88 93
 
89 94
                 }
90 95
                 //获取拼团标题
91
-                if ("group".equals(e.getEventType()) && null != e.getTargetId()){
92
-                    TaShareActivity taShareActivity = taShareActivityMapper.selectById(e.getTargetId());
93
-                    if (null != taShareActivity){
94
-                        e.setActivityName(taShareActivity.getActivityName());
96
+                if ("live".equals(e.getEventType()) && null != e.getTargetId()) {
97
+                    TaLiveActivity taLiveActivity = taLiveActivityMapper.selectById(e.getTargetId());
98
+                    if (null != taLiveActivity) {
99
+                        e.setActivityName(taLiveActivity.getLiveActivityTitle());
95 100
                     }
96 101
                 }
97 102
                 //获取助力标题
98
-                if ("help".equals(e.getEventType()) && null != e.getTargetId()){
99
-                    HelpActivity helpActivity = helpActivityMapper.selectById(e.getTargetId());
100
-                    if (null != helpActivity){
101
-                        e.setActivityName(helpActivity.getTitle());
103
+                if ("video".equals(e.getEventType()) && null != e.getTargetId()) {
104
+                    Video video = videoMapper.selectById(e.getTargetId());
105
+                    if (null != video) {
106
+                        e.setActivityName(video.getName());
102 107
                     }
103 108
                 }
104 109
                 //获取咨询标题
105
-                if ("news".equals(e.getEventType()) && null != e.getTargetId()){
110
+                if ("news".equals(e.getEventType()) && null != e.getTargetId()) {
106 111
                     TaNews taNews = taNewsMapper.selectById(e.getTargetId());
107
-                    if (null != taNews){
112
+                    if (null != taNews) {
108 113
                         e.setActivityName(taNews.getNewsName());
109 114
                     }
110 115
                 }
111 116
                 //获取H5活动标题
112
-                if ("h5".equals(e.getEventType()) && null != e.getTargetId()){
117
+                if ("h5".equals(e.getEventType()) && null != e.getTargetId()) {
113 118
                     TaDrainage taDrainage = taDrainageMapper.selectById(e.getTargetId());
114
-                    if (null != taDrainage){
119
+                    if (null != taDrainage) {
115 120
                         e.setActivityName(taDrainage.getName());
116 121
                     }
117 122
                 }