傅行帆 5 years ago
parent
commit
30789e4fdc

+ 7
- 3
src/main/java/com/huiju/estateagents/activity/controller/ActivityController.java View File

1
 package com.huiju.estateagents.activity.controller;
1
 package com.huiju.estateagents.activity.controller;
2
 
2
 
3
 import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
3
 import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
4
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
4
 import com.huiju.estateagents.activity.service.ActivityServiceI;
5
 import com.huiju.estateagents.activity.service.ActivityServiceI;
5
 import com.huiju.estateagents.base.BaseController;
6
 import com.huiju.estateagents.base.BaseController;
6
 import com.huiju.estateagents.base.ResponseBean;
7
 import com.huiju.estateagents.base.ResponseBean;
66
 		queryWrapper.eq("customer_id",customerId);
67
 		queryWrapper.eq("customer_id",customerId);
67
 		TaRecommendCustomer taRecommendCustomer = taRecommendCustomerService.getOne(queryWrapper);
68
 		TaRecommendCustomer taRecommendCustomer = taRecommendCustomerService.getOne(queryWrapper);
68
 		if (null == taRecommendCustomer){
69
 		if (null == taRecommendCustomer){
69
-			return ResponseBean.error("验证人员信息失败",ResponseBean.ERROR_UNAVAILABLE);
70
+			//验证人员信息失败小程序端希望是空数组对象
71
+			return ResponseBean.success(new Page(pageNumber,pageSize));
70
 		}
72
 		}
71
 		if (null == taRecommendCustomer.getPersonId()){
73
 		if (null == taRecommendCustomer.getPersonId()){
72
-			return ResponseBean.error("验证人员信息失败",ResponseBean.ERROR_UNAVAILABLE);
74
+			//验证人员信息失败小程序端希望是空数组对象
75
+			return ResponseBean.success(new Page(pageNumber,pageSize));
73
 		}
76
 		}
74
 		
77
 		
75
 		QueryWrapper<TaPerson> taPersonQueryWrapper = new QueryWrapper<>();
78
 		QueryWrapper<TaPerson> taPersonQueryWrapper = new QueryWrapper<>();
76
 		taPersonQueryWrapper.eq("person_id",taRecommendCustomer.getPersonId());
79
 		taPersonQueryWrapper.eq("person_id",taRecommendCustomer.getPersonId());
77
 		TaPerson person = taPersonService.getOne(taPersonQueryWrapper);
80
 		TaPerson person = taPersonService.getOne(taPersonQueryWrapper);
78
 		if (null == person){
81
 		if (null == person){
79
-			return ResponseBean.error("验证人员信息失败",ResponseBean.ERROR_UNAVAILABLE);
82
+			//验证人员信息失败小程序端希望是空数组对象
83
+			return ResponseBean.success(new Page(pageNumber,pageSize));
80
 		}
84
 		}
81
 		responseBean = activityService.getCustomerActivityList(pageNumber,pageSize,orgId,person);
85
 		responseBean = activityService.getCustomerActivityList(pageNumber,pageSize,orgId,person);
82
 		return responseBean;
86
 		return responseBean;

+ 1
- 1
src/main/java/com/huiju/estateagents/statistic/service/impl/TsCustomerStatisticDailyServiceImpl.java View File

104
 			//合并数据
104
 			//合并数据
105
 			list.forEach(l -> {
105
 			list.forEach(l -> {
106
 				if (newDate.equals(l.getDay())){
106
 				if (newDate.equals(l.getDay())){
107
-					tsCustomerStatisticDaily.setCustomerNum(l.getCustomerNum());
107
+					tsCustomerStatisticDaily.setCustomerNum(tsCustomerStatisticDaily.getCustomerNum() + l.getCustomerNum());
108
 				}
108
 				}
109
 			});
109
 			});
110
 			newList.add(tsCustomerStatisticDaily);
110
 			newList.add(tsCustomerStatisticDaily);

+ 1
- 1
src/main/java/com/huiju/estateagents/statistic/service/impl/TsCustomerStatisticMonthlyServiceImpl.java View File

101
 			tsCustomerStatisticMonthly.setRealtyConsultant(personId);
101
 			tsCustomerStatisticMonthly.setRealtyConsultant(personId);
102
 			list.forEach(l -> {
102
 			list.forEach(l -> {
103
 				if (newDate.equals(l.getMonth())){
103
 				if (newDate.equals(l.getMonth())){
104
-					tsCustomerStatisticMonthly.setCustomerNum(l.getCustomerNum());
104
+					tsCustomerStatisticMonthly.setCustomerNum(tsCustomerStatisticMonthly.getCustomerNum() + l.getCustomerNum());
105
 				}
105
 				}
106
 			});
106
 			});
107
 			newList.add(tsCustomerStatisticMonthly);
107
 			newList.add(tsCustomerStatisticMonthly);