|
@@ -1,10 +1,13 @@
|
1
|
1
|
package com.huiju.estateagents.activity.controller;
|
2
|
2
|
|
|
3
|
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
3
|
4
|
import com.huiju.estateagents.activity.service.ActivityServiceI;
|
4
|
5
|
import com.huiju.estateagents.base.BaseController;
|
5
|
6
|
import com.huiju.estateagents.base.ResponseBean;
|
6
|
7
|
import com.huiju.estateagents.entity.TaPerson;
|
|
8
|
+import com.huiju.estateagents.entity.TaRecommendCustomer;
|
7
|
9
|
import com.huiju.estateagents.service.ITaPersonService;
|
|
10
|
+import com.huiju.estateagents.service.ITaRecommendCustomerService;
|
8
|
11
|
import io.swagger.annotations.Api;
|
9
|
12
|
import org.springframework.beans.factory.annotation.Autowired;
|
10
|
13
|
import org.springframework.web.bind.annotation.RequestMapping;
|
|
@@ -30,6 +33,9 @@ public class ActivityController extends BaseController {
|
30
|
33
|
@Autowired
|
31
|
34
|
private ITaPersonService taPersonService;
|
32
|
35
|
|
|
36
|
+ @Autowired
|
|
37
|
+ ITaRecommendCustomerService taRecommendCustomerService;
|
|
38
|
+
|
33
|
39
|
@RequestMapping(value = "/wx/activity/list", method = RequestMethod.GET)
|
34
|
40
|
public ResponseBean wxBuildingDynamiceList(@RequestParam(value = "pageNumber",defaultValue = "1")Integer pageNumber,
|
35
|
41
|
@RequestParam(value = "pageSize",defaultValue = "10")Integer pageSize,
|
|
@@ -47,4 +53,29 @@ public class ActivityController extends BaseController {
|
47
|
53
|
|
48
|
54
|
return responseBean;
|
49
|
55
|
}
|
|
56
|
+
|
|
57
|
+ @RequestMapping(value = "/wx/customer/activity/list", method = RequestMethod.GET)
|
|
58
|
+ public ResponseBean wxActivityList(@RequestParam(value = "pageNumber",defaultValue = "1")Integer pageNumber,
|
|
59
|
+ @RequestParam(value = "pageSize",defaultValue = "10")Integer pageSize,
|
|
60
|
+ @RequestParam(value = "customerId") String customerId,
|
|
61
|
+ HttpServletRequest request){
|
|
62
|
+ ResponseBean responseBean = new ResponseBean();
|
|
63
|
+ Integer orgId = getOrgId(request);
|
|
64
|
+ //查找客户信息
|
|
65
|
+ QueryWrapper<TaRecommendCustomer> queryWrapper = new QueryWrapper<>();
|
|
66
|
+ queryWrapper.eq("customer_id",customerId);
|
|
67
|
+ TaRecommendCustomer taRecommendCustomer = taRecommendCustomerService.getOne(queryWrapper);
|
|
68
|
+ if (null == taRecommendCustomer){
|
|
69
|
+ return ResponseBean.error("验证人员信息失败",ResponseBean.ERROR_UNAVAILABLE);
|
|
70
|
+ }
|
|
71
|
+ if (null == taRecommendCustomer.getPersonId()){
|
|
72
|
+ return ResponseBean.error("验证人员信息失败",ResponseBean.ERROR_UNAVAILABLE);
|
|
73
|
+ }
|
|
74
|
+
|
|
75
|
+ QueryWrapper<TaPerson> taPersonQueryWrapper = new QueryWrapper<>();
|
|
76
|
+ taPersonQueryWrapper.eq("person_id",taRecommendCustomer.getPersonId());
|
|
77
|
+ TaPerson person = taPersonService.getOne(taPersonQueryWrapper);
|
|
78
|
+ responseBean = activityService.getCustomerActivityList(pageNumber,pageSize,orgId,person);
|
|
79
|
+ return responseBean;
|
|
80
|
+ }
|
50
|
81
|
}
|