浏览代码

* 新需求

顾绍勇 5 年前
父节点
当前提交
519f5e2b34

+ 143
- 0
src/main/java/com/huiju/estateagents/controller/TaQrcodeController.java 查看文件

1
+package com.huiju.estateagents.controller;
2
+
3
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
4
+import com.baomidou.mybatisplus.core.metadata.IPage;
5
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
6
+import com.huiju.estateagents.base.BaseController;
7
+import com.huiju.estateagents.base.ResponseBean;
8
+import com.huiju.estateagents.entity.TaQrcode;
9
+import com.huiju.estateagents.service.ITaQrcodeService;
10
+import org.slf4j.Logger;
11
+import org.slf4j.LoggerFactory;
12
+import org.springframework.beans.factory.annotation.Autowired;
13
+import org.springframework.web.bind.annotation.*;
14
+
15
+/**
16
+ * <p>
17
+    * 二维码管理表 前端控制器
18
+    * </p>
19
+ *
20
+ * @author fxf
21
+ * @since 2020-05-20
22
+ */
23
+@RestController
24
+@RequestMapping("/")
25
+public class TaQrcodeController extends BaseController {
26
+
27
+    private final Logger logger = LoggerFactory.getLogger(TaQrcodeController.class);
28
+
29
+    @Autowired
30
+    public ITaQrcodeService iTaQrcodeService;
31
+
32
+
33
+    /**
34
+     * 分页查询列表
35
+     * @param pageNum
36
+     * @param pageSize
37
+     * @return
38
+     */
39
+    @RequestMapping(value="/taQrcode",method= RequestMethod.GET)
40
+    public ResponseBean taQrcodeList(@RequestParam(value ="pageNum",defaultValue = "1") Integer pageNum,
41
+                                     @RequestParam(value ="pageSize",defaultValue = "10") Integer pageSize){
42
+        ResponseBean responseBean = new ResponseBean();
43
+        try {
44
+            //使用分页插件
45
+		    IPage<TaQrcode> pg = new Page<>(pageNum, pageSize);
46
+            QueryWrapper<TaQrcode> queryWrapper = new QueryWrapper<>();
47
+            queryWrapper.orderByDesc("create_date");
48
+
49
+            IPage<TaQrcode> result = iTaQrcodeService.page(pg, queryWrapper);
50
+            responseBean.addSuccess(result);
51
+        }catch (Exception e){
52
+            e.printStackTrace();
53
+            logger.error("taQrcodeList -=- {}",e.toString());
54
+            responseBean.addError(e.getMessage());
55
+        }
56
+        return responseBean;
57
+    }
58
+
59
+    /**
60
+     * 保存对象
61
+     * @param taQrcode 实体对象
62
+     * @return
63
+     */
64
+    @RequestMapping(value="/taQrcode",method= RequestMethod.POST)
65
+    public ResponseBean taQrcodeAdd(@RequestBody TaQrcode taQrcode){
66
+        ResponseBean responseBean = new ResponseBean();
67
+        try {
68
+            if (iTaQrcodeService.save(taQrcode)){
69
+                responseBean.addSuccess(taQrcode);
70
+            }else {
71
+                responseBean.addError("fail");
72
+            }
73
+        }catch (Exception e){
74
+            e.printStackTrace();
75
+            logger.error("taQrcodeAdd -=- {}",e.toString());
76
+            responseBean.addError(e.getMessage());
77
+        }
78
+        return responseBean;
79
+    }
80
+
81
+    /**
82
+     * 根据id删除对象
83
+     * @param id  实体ID
84
+     */
85
+    @ResponseBody
86
+    @RequestMapping(value="/taQrcode/{id}", method= RequestMethod.DELETE)
87
+    public ResponseBean taQrcodeDelete(@PathVariable Integer id){
88
+        ResponseBean responseBean = new ResponseBean();
89
+        try {
90
+            if(iTaQrcodeService.removeById(id)){
91
+                responseBean.addSuccess("success");
92
+            }else {
93
+                responseBean.addError("fail");
94
+            }
95
+        }catch (Exception e){
96
+            e.printStackTrace();
97
+            logger.error("taQrcodeDelete -=- {}",e.toString());
98
+            responseBean.addError(e.getMessage());
99
+        }
100
+        return responseBean;
101
+    }
102
+
103
+    /**
104
+     * 修改对象
105
+     * @param id  实体ID
106
+     * @param taQrcode 实体对象
107
+     * @return
108
+     */
109
+    @RequestMapping(value="/taQrcode/{id}",method= RequestMethod.PUT)
110
+    public ResponseBean taQrcodeUpdate(@PathVariable Integer id,
111
+                                        @RequestBody TaQrcode taQrcode){
112
+        ResponseBean responseBean = new ResponseBean();
113
+        try {
114
+            if (iTaQrcodeService.updateById(taQrcode)){
115
+                responseBean.addSuccess(taQrcode);
116
+            }else {
117
+                responseBean.addError("fail");
118
+            }
119
+        }catch (Exception e){
120
+            e.printStackTrace();
121
+            logger.error("taQrcodeUpdate -=- {}",e.toString());
122
+            responseBean.addError(e.getMessage());
123
+        }
124
+        return responseBean;
125
+    }
126
+
127
+    /**
128
+     * 根据id查询对象
129
+     * @param id  实体ID
130
+     */
131
+    @RequestMapping(value="/taQrcode/{id}",method= RequestMethod.GET)
132
+    public ResponseBean taQrcodeGet(@PathVariable Integer id){
133
+        ResponseBean responseBean = new ResponseBean();
134
+        try {
135
+            responseBean.addSuccess(iTaQrcodeService.getById(id));
136
+        }catch (Exception e){
137
+            e.printStackTrace();
138
+            logger.error("taQrcodeDelete -=- {}",e.toString());
139
+            responseBean.addError(e.getMessage());
140
+        }
141
+        return responseBean;
142
+    }
143
+}

+ 19
- 11
src/main/java/com/huiju/estateagents/controller/TaRecommendCustomerController.java 查看文件

846
                                       @RequestParam(value = "customerType") String customerType,
846
                                       @RequestParam(value = "customerType") String customerType,
847
                                       @RequestParam(value = "status", required = false) Integer status,
847
                                       @RequestParam(value = "status", required = false) Integer status,
848
                                       @RequestParam(value = "sceneType", required = false) String sceneType,
848
                                       @RequestParam(value = "sceneType", required = false) String sceneType,
849
+                                      @RequestParam(value = "startCreateDate", required = false) String startCreateDate,
850
+                                      @RequestParam(value = "endCreateDate", required = false) String endCreateDate,
849
                                       @RequestParam(value = "belongStatus", required = false) Integer belongStatus) throws IOException { // public 公  private 私
851
                                       @RequestParam(value = "belongStatus", required = false) Integer belongStatus) throws IOException { // public 公  private 私
850
 
852
 
851
         //        response.setContentType("application/vnd.ms-excel");
853
         //        response.setContentType("application/vnd.ms-excel");
874
 //            pageCount = count % pageSize == 0 ? count / pageSize : (count / pageSize) + 1;
876
 //            pageCount = count % pageSize == 0 ? count / pageSize : (count / pageSize) + 1;
875
 //            List<PublicCustomerExport> publicList = null;
877
 //            List<PublicCustomerExport> publicList = null;
876
 //            do {
878
 //            do {
877
-            List<PublicCustomerExport> publicList = taRecommendCustomerMapper.getPublicCustomerExportList(pageCode * pageSize, pageSize, buildingId, name, tel, entryType, verifyStatus, sex, orgId, consultTel, sceneType, getTaPersonBuildingListByUserId(request), belongStatus);
879
+            List<PublicCustomerExport> publicList = taRecommendCustomerMapper.getPublicCustomerExportList(pageCode * pageSize, pageSize,
880
+                    buildingId, name, tel, entryType, verifyStatus, sex, orgId, consultTel, sceneType, getTaPersonBuildingListByUserId(request),
881
+                    belongStatus, startCreateDate, endCreateDate);
878
             excelWriter.write(publicList, writeSheet);
882
             excelWriter.write(publicList, writeSheet);
879
 
883
 
880
 //                pageCode ++;
884
 //                pageCode ++;
896
 //            pageCount = count % pageSize == 0 ? count / pageSize : (count / pageSize) + 1;
900
 //            pageCount = count % pageSize == 0 ? count / pageSize : (count / pageSize) + 1;
897
 //            List<PrivateCustomerExport> privateList = null;
901
 //            List<PrivateCustomerExport> privateList = null;
898
 //            do {
902
 //            do {
899
-            List<PrivateCustomerExport> privateList = taRecommendCustomerMapper.getCustomerExportList(pageCode * pageSize, pageSize, buildingId, name, tel, consultName, consultTel, entryType, verifyStatus, sex, orgId, status, sceneType, getTaPersonBuildingListByUserId(request));
903
+            List<PrivateCustomerExport> privateList = taRecommendCustomerMapper.getCustomerExportList(pageCode * pageSize, pageSize,
904
+                    buildingId, name, tel, consultName, consultTel, entryType, verifyStatus, sex, orgId, status, sceneType, startCreateDate,
905
+                    endCreateDate, getTaPersonBuildingListByUserId(request));
900
             excelWriter.write(privateList, writeSheet);
906
             excelWriter.write(privateList, writeSheet);
901
 
907
 
902
 //                pageCode ++;
908
 //                pageCode ++;
976
 
982
 
977
     /**
983
     /**
978
      * 校验此职业顾问下有没有私客存在
984
      * 校验此职业顾问下有没有私客存在
985
+     *
979
      * @return
986
      * @return
980
      */
987
      */
981
     @GetMapping("/admin/consultant/customer/list")
988
     @GetMapping("/admin/consultant/customer/list")
982
     public ResponseBean consultantCustomerList(@RequestParam(value = "userId") Integer userId,
989
     public ResponseBean consultantCustomerList(@RequestParam(value = "userId") Integer userId,
983
                                                @RequestParam(value = "personId") String personId,
990
                                                @RequestParam(value = "personId") String personId,
984
                                                @RequestParam(value = "buildingId") String buildingId,
991
                                                @RequestParam(value = "buildingId") String buildingId,
985
-                                               HttpServletRequest request){
992
+                                               HttpServletRequest request) {
986
         Integer orgId = getOrgId(request);
993
         Integer orgId = getOrgId(request);
987
-        try{
988
-            List<TaRecommendCustomer> list = taRecommendCustomerService.getConsultantCustomerList(userId,personId,buildingId,orgId,getTaPersonBuildingListByUserId(request));
994
+        try {
995
+            List<TaRecommendCustomer> list = taRecommendCustomerService.getConsultantCustomerList(userId, personId, buildingId, orgId, getTaPersonBuildingListByUserId(request));
989
             return ResponseBean.success(list);
996
             return ResponseBean.success(list);
990
-        }catch (Exception e){
997
+        } catch (Exception e) {
991
             e.printStackTrace();
998
             e.printStackTrace();
992
-            return ResponseBean.error(e.getMessage(),ResponseBean.ERROR_UNAVAILABLE);
999
+            return ResponseBean.error(e.getMessage(), ResponseBean.ERROR_UNAVAILABLE);
993
         }
1000
         }
994
     }
1001
     }
995
 
1002
 
996
     /**
1003
     /**
997
      * 迁移私客到新的置业顾问
1004
      * 迁移私客到新的置业顾问
1005
+     *
998
      * @return
1006
      * @return
999
      */
1007
      */
1000
     @PutMapping("/admin/consultant/customer/move")
1008
     @PutMapping("/admin/consultant/customer/move")
1001
-    public ResponseBean moveConsultantCustomer(@RequestBody List<TaRecommendCustomer> list,HttpServletRequest request){
1002
-        try{
1009
+    public ResponseBean moveConsultantCustomer(@RequestBody List<TaRecommendCustomer> list, HttpServletRequest request) {
1010
+        try {
1003
             taRecommendCustomerService.updateBatchById(list);
1011
             taRecommendCustomerService.updateBatchById(list);
1004
             return ResponseBean.success(list);
1012
             return ResponseBean.success(list);
1005
-        }catch (Exception e){
1013
+        } catch (Exception e) {
1006
             e.printStackTrace();
1014
             e.printStackTrace();
1007
-            return ResponseBean.error(e.getMessage(),ResponseBean.ERROR_UNAVAILABLE);
1015
+            return ResponseBean.error(e.getMessage(), ResponseBean.ERROR_UNAVAILABLE);
1008
         }
1016
         }
1009
     }
1017
     }
1010
 }
1018
 }

+ 83
- 0
src/main/java/com/huiju/estateagents/entity/TaQrcode.java 查看文件

1
+package com.huiju.estateagents.entity;
2
+
3
+import com.baomidou.mybatisplus.annotation.IdType;
4
+import com.baomidou.mybatisplus.annotation.TableId;
5
+import java.time.LocalDateTime;
6
+import java.io.Serializable;
7
+import lombok.Data;
8
+import lombok.EqualsAndHashCode;
9
+import lombok.experimental.Accessors;
10
+
11
+/**
12
+ * <p>
13
+ * 二维码管理表
14
+ * </p>
15
+ *
16
+ * @author fxf
17
+ * @since 2020-05-20
18
+ */
19
+@Data
20
+@EqualsAndHashCode(callSuper = false)
21
+@Accessors(chain = true)
22
+public class TaQrcode implements Serializable {
23
+
24
+    private static final long serialVersionUID = 1L;
25
+
26
+    /**
27
+     * qr_code_id id
28
+     */
29
+    @TableId(value = "qr_code_id", type = IdType.AUTO)
30
+    private Integer qrCodeId;
31
+
32
+    /**
33
+     * org_id
34
+     */
35
+    private Integer orgId;
36
+
37
+    /**
38
+     * building_id 关联项目ID
39
+     */
40
+    private String buildingId;
41
+
42
+    /**
43
+     * channel_id 渠道ID
44
+     */
45
+    private Integer channelId;
46
+
47
+    /**
48
+     * target_type 二维码类型
49
+     */
50
+    private String targetType;
51
+
52
+    /**
53
+     * target_name 二维码内容
54
+     */
55
+    private String targetName;
56
+
57
+    /**
58
+     * target_id
59
+     */
60
+    private String targetId;
61
+
62
+    /**
63
+     * qr_code_url 二维码地址
64
+     */
65
+    private String qrCodeUrl;
66
+
67
+    /**
68
+     * status 状态
69
+     */
70
+    private Integer status;
71
+
72
+    /**
73
+     * create_date 创建时间
74
+     */
75
+    private LocalDateTime createDate;
76
+
77
+    /**
78
+     * create_user 创建人
79
+     */
80
+    private Integer createUser;
81
+
82
+
83
+}

+ 16
- 0
src/main/java/com/huiju/estateagents/mapper/TaQrcodeMapper.java 查看文件

1
+package com.huiju.estateagents.mapper;
2
+
3
+import com.huiju.estateagents.entity.TaQrcode;
4
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
5
+
6
+/**
7
+ * <p>
8
+ * 二维码管理表 Mapper 接口
9
+ * </p>
10
+ *
11
+ * @author fxf
12
+ * @since 2020-05-20
13
+ */
14
+public interface TaQrcodeMapper extends BaseMapper<TaQrcode> {
15
+
16
+}

+ 64
- 27
src/main/java/com/huiju/estateagents/mapper/TaRecommendCustomerMapper.java 查看文件

9
 import com.huiju.estateagents.excel.*;
9
 import com.huiju.estateagents.excel.*;
10
 import org.apache.ibatis.annotations.Mapper;
10
 import org.apache.ibatis.annotations.Mapper;
11
 import org.apache.ibatis.annotations.Param;
11
 import org.apache.ibatis.annotations.Param;
12
+import org.springframework.web.bind.annotation.RequestParam;
12
 
13
 
13
 import java.time.LocalDateTime;
14
 import java.time.LocalDateTime;
14
 import java.util.List;
15
 import java.util.List;
27
 
28
 
28
     Integer getMyCutsomerNum(@Param("personId") String personId);
29
     Integer getMyCutsomerNum(@Param("personId") String personId);
29
 
30
 
30
-    String getCustomerPersonId(@Param("customerId")String customerId);
31
+    String getCustomerPersonId(@Param("customerId") String customerId);
31
 
32
 
32
-    TaRecommendCustomer getCustomerDetail(@Param("customerId")String customerId,@Param("personId")String personId);
33
+    TaRecommendCustomer getCustomerDetail(@Param("customerId") String customerId, @Param("personId") String personId);
33
 
34
 
34
-    TaRecommendCustomer getCustomerById(@Param("customerId")String customerId);
35
+    TaRecommendCustomer getCustomerById(@Param("customerId") String customerId);
35
 
36
 
36
-    IPage<TaRecommendCustomer> getCustomerList(IPage<TaRecommendCustomer> page,@Param("building") String building, @Param("name") String name, @Param("tel") String tel, @Param("consultName") String consultName, @Param("consultTel") String consultTel,@Param("entryType") String entryType,@Param("verifyStatus") String verifyStatus,@Param("sex") Integer sex, @Param("orgId") Integer orgId,@Param("status")Integer status, @Param("personBuildingList") List<TaPersonBuilding> personBuildingList,@Param("sceneType") String sceneType, @Param("startCreateDate") String startCreateDate, @Param("endCreateDate") String endCreateDate, @Param("sharePersonName") String sharePersonName);
37
-    IPage<TaRecommendCustomer> getRecCustomerList(IPage<TaRecommendCustomer> page,@Param("building") String building, @Param("name") String name, @Param("tel") String tel, @Param("consultName") String consultName, @Param("consultTel") String consultTel,@Param("entryType") String entryType,@Param("verifyStatus") String verifyStatus,@Param("sex") Integer sex, @Param("orgId") Integer orgId, @Param("personBuildingList") List<TaPersonBuilding> personBuildingList);
38
-    IPage<TaRecommendCustomer> getRepCustomerList(IPage<TaRecommendCustomer> page,@Param("building") String building, @Param("name") String name, @Param("tel") String tel, @Param("consultName") String consultName, @Param("consultTel") String consultTel,@Param("entryType") String entryType,@Param("verifyStatus") String verifyStatus,@Param("sex") Integer sex, @Param("orgId") Integer orgId, @Param("personBuildingList") List<TaPersonBuilding> personBuildingList);
39
-    IPage<TaPerson> getIndependentAgents(IPage<TaPerson>page, @Param("name") String name, @Param("tel") String tel, @Param("channelId") String channelId, @Param("orgId") Integer orgId);
37
+    IPage<TaRecommendCustomer> getCustomerList(IPage<TaRecommendCustomer> page, @Param("building") String building, @Param("name") String name, @Param("tel") String tel, @Param("consultName") String consultName, @Param("consultTel") String consultTel, @Param("entryType") String entryType, @Param("verifyStatus") String verifyStatus, @Param("sex") Integer sex, @Param("orgId") Integer orgId, @Param("status") Integer status, @Param("personBuildingList") List<TaPersonBuilding> personBuildingList, @Param("sceneType") String sceneType, @Param("startCreateDate") String startCreateDate, @Param("endCreateDate") String endCreateDate, @Param("sharePersonName") String sharePersonName);
38
+
39
+    IPage<TaRecommendCustomer> getRecCustomerList(IPage<TaRecommendCustomer> page, @Param("building") String building, @Param("name") String name, @Param("tel") String tel, @Param("consultName") String consultName, @Param("consultTel") String consultTel, @Param("entryType") String entryType, @Param("verifyStatus") String verifyStatus, @Param("sex") Integer sex, @Param("orgId") Integer orgId, @Param("personBuildingList") List<TaPersonBuilding> personBuildingList);
40
+
41
+    IPage<TaRecommendCustomer> getRepCustomerList(IPage<TaRecommendCustomer> page, @Param("building") String building, @Param("name") String name, @Param("tel") String tel, @Param("consultName") String consultName, @Param("consultTel") String consultTel, @Param("entryType") String entryType, @Param("verifyStatus") String verifyStatus, @Param("sex") Integer sex, @Param("orgId") Integer orgId, @Param("personBuildingList") List<TaPersonBuilding> personBuildingList);
42
+
43
+    IPage<TaPerson> getIndependentAgents(IPage<TaPerson> page, @Param("name") String name, @Param("tel") String tel, @Param("channelId") String channelId, @Param("orgId") Integer orgId);
40
 
44
 
41
     /**
45
     /**
42
      * 公客
46
      * 公客
47
+     *
43
      * @param page
48
      * @param page
44
      * @param name
49
      * @param name
45
      * @param tel
50
      * @param tel
67
 
72
 
68
     /**
73
     /**
69
      * 导出数据 获取推荐用户数据
74
      * 导出数据 获取推荐用户数据
75
+     *
70
      * @param orgId
76
      * @param orgId
71
      * @return
77
      * @return
72
      */
78
      */
73
-    List<ExcelRecommendCustomer> getRecCustomerExport(@Param("orgId") Integer orgId, @Param("pageCode") Integer pageCode, @Param("pageSize") Integer pageSize,@Param("personBuildingList") List<TaPersonBuilding> personBuildingList);
79
+    List<ExcelRecommendCustomer> getRecCustomerExport(@Param("orgId") Integer orgId, @Param("pageCode") Integer pageCode, @Param("pageSize") Integer pageSize, @Param("personBuildingList") List<TaPersonBuilding> personBuildingList);
74
 
80
 
75
     /**
81
     /**
76
      * 导出数据 获取推荐用户数据 总数
82
      * 导出数据 获取推荐用户数据 总数
83
+     *
77
      * @param orgId
84
      * @param orgId
78
      * @return
85
      * @return
79
      */
86
      */
80
-    Integer getRecCustomerExportCount(@Param("orgId") Integer orgId,@Param("personBuildingList") List<TaPersonBuilding> personBuildingList);
87
+    Integer getRecCustomerExportCount(@Param("orgId") Integer orgId, @Param("personBuildingList") List<TaPersonBuilding> personBuildingList);
81
 
88
 
82
     /**
89
     /**
83
      * 导出数据 获取报备客户数据 总数
90
      * 导出数据 获取报备客户数据 总数
91
+     *
84
      * @param orgId
92
      * @param orgId
85
      * @return
93
      * @return
86
      */
94
      */
87
-    Integer getRepCustomerReportCount(@Param("building") String building, @Param("name") String name, @Param("tel") String tel, @Param("consultName") String consultName, @Param("consultTel") String consultTel,@Param("entryType") String entryType,@Param("verifyStatus") String verifyStatus,@Param("sex") Integer sex,@Param("orgId")Integer orgId,@Param("personBuildingList") List<TaPersonBuilding> personBuildingList);
95
+    Integer getRepCustomerReportCount(@Param("building") String building, @Param("name") String name, @Param("tel") String tel, @Param("consultName") String consultName, @Param("consultTel") String consultTel, @Param("entryType") String entryType, @Param("verifyStatus") String verifyStatus, @Param("sex") Integer sex, @Param("orgId") Integer orgId, @Param("personBuildingList") List<TaPersonBuilding> personBuildingList);
88
 
96
 
89
     /**
97
     /**
90
      * 导出数据 获取报备客户数据
98
      * 导出数据 获取报备客户数据
99
+     *
91
      * @param orgId
100
      * @param orgId
92
      * @return
101
      * @return
93
      */
102
      */
94
-    List<ReporRecommendCustomer> getRepCustomerReportExport(@Param("building") String building, @Param("name") String name, @Param("tel") String tel, @Param("consultName") String consultName, @Param("consultTel") String consultTel,@Param("entryType") String entryType,@Param("verifyStatus") String verifyStatus,@Param("sex") Integer sex, @Param("orgId") Integer orgId, @Param("pageCode") Integer pageCode, @Param("pageSize") Integer pageSize,@Param("personBuildingList") List<TaPersonBuilding> personBuildingList);
103
+    List<ReporRecommendCustomer> getRepCustomerReportExport(@Param("building") String building, @Param("name") String name, @Param("tel") String tel, @Param("consultName") String consultName, @Param("consultTel") String consultTel, @Param("entryType") String entryType, @Param("verifyStatus") String verifyStatus, @Param("sex") Integer sex, @Param("orgId") Integer orgId, @Param("pageCode") Integer pageCode, @Param("pageSize") Integer pageSize, @Param("personBuildingList") List<TaPersonBuilding> personBuildingList);
95
 
104
 
96
     /**
105
     /**
97
      * 导出数据 获取经纪人数据 总数
106
      * 导出数据 获取经纪人数据 总数
107
+     *
98
      * @param orgId
108
      * @param orgId
99
      * @return
109
      * @return
100
      */
110
      */
102
 
112
 
103
     /**
113
     /**
104
      * 导出数据 获取经纪人数据
114
      * 导出数据 获取经纪人数据
115
+     *
105
      * @param orgId
116
      * @param orgId
106
      * @param pageCode
117
      * @param pageCode
107
      * @param pageSize
118
      * @param pageSize
108
      * @return
119
      * @return
109
      */
120
      */
110
-    List<AgentsRecommendCustomer> getIndependentAgentsExport(@Param("name")String name, @Param("tel")String tel, @Param("channelId")String channelId, @Param("orgId") Integer orgId, @Param("pageCode") Integer pageCode, @Param("pageSize") Integer pageSize);
121
+    List<AgentsRecommendCustomer> getIndependentAgentsExport(@Param("name") String name, @Param("tel") String tel, @Param("channelId") String channelId, @Param("orgId") Integer orgId, @Param("pageCode") Integer pageCode, @Param("pageSize") Integer pageSize);
111
 
122
 
112
     /**
123
     /**
113
      * 导出数据 公客总数
124
      * 导出数据 公客总数
125
+     *
114
      * @param name
126
      * @param name
115
      * @param tel
127
      * @param tel
116
      * @param entryType
128
      * @param entryType
120
      * @param consultTel
132
      * @param consultTel
121
      * @return
133
      * @return
122
      */
134
      */
123
-    Integer getPublicCustomerExportListCount(@Param("name") String name, @Param("tel") String tel,@Param("entryType") String entryType,@Param("verifyStatus") String verifyStatus,@Param("sex") Integer sex, @Param("orgId") Integer orgId,@Param("consultTel")String consultTel);
135
+    Integer getPublicCustomerExportListCount(@Param("name") String name, @Param("tel") String tel, @Param("entryType") String entryType, @Param("verifyStatus") String verifyStatus, @Param("sex") Integer sex, @Param("orgId") Integer orgId, @Param("consultTel") String consultTel);
124
 
136
 
125
     /**
137
     /**
126
      * 导出数据 公客
138
      * 导出数据 公客
139
+     *
127
      * @param name
140
      * @param name
128
      * @param tel
141
      * @param tel
129
      * @param entryType
142
      * @param entryType
135
      */
148
      */
136
     List<PublicCustomerExport> getPublicCustomerExportList(@Param("pageCode") Integer pageCode,
149
     List<PublicCustomerExport> getPublicCustomerExportList(@Param("pageCode") Integer pageCode,
137
                                                            @Param("pageSize") Integer pageSize,
150
                                                            @Param("pageSize") Integer pageSize,
138
-                                                           @Param("buildingId")String buildingId,
151
+                                                           @Param("buildingId") String buildingId,
139
                                                            @Param("name") String name,
152
                                                            @Param("name") String name,
140
                                                            @Param("tel") String tel,
153
                                                            @Param("tel") String tel,
141
                                                            @Param("entryType") String entryType,
154
                                                            @Param("entryType") String entryType,
142
                                                            @Param("verifyStatus") String verifyStatus,
155
                                                            @Param("verifyStatus") String verifyStatus,
143
                                                            @Param("sex") Integer sex,
156
                                                            @Param("sex") Integer sex,
144
                                                            @Param("orgId") Integer orgId,
157
                                                            @Param("orgId") Integer orgId,
145
-                                                           @Param("consultTel")String consultTel,
146
-                                                           @Param("sceneType")String sceneType,
158
+                                                           @Param("consultTel") String consultTel,
159
+                                                           @Param("sceneType") String sceneType,
147
                                                            @Param("personBuildingList") List<TaPersonBuilding> personBuildingList,
160
                                                            @Param("personBuildingList") List<TaPersonBuilding> personBuildingList,
148
-                                                           @Param("belongStatus") Integer belongStatus);
161
+                                                           @Param("belongStatus") Integer belongStatus,
162
+                                                           @Param("startCreateDate") String startCreateDate,
163
+                                                           @Param("endCreateDate") String endCreateDate);
149
 
164
 
150
     /**
165
     /**
151
      * 导出数据 私客总数
166
      * 导出数据 私客总数
167
+     *
152
      * @param buildingId
168
      * @param buildingId
153
      * @param name
169
      * @param name
154
      * @param tel
170
      * @param tel
161
      * @param status
177
      * @param status
162
      * @return
178
      * @return
163
      */
179
      */
164
-    Integer getCustomerExportListCount(@Param("building") String buildingId, @Param("name") String name, @Param("tel") String tel, @Param("consultName") String consultName, @Param("consultTel") String consultTel,@Param("entryType") String entryType,@Param("verifyStatus") String verifyStatus,@Param("sex") Integer sex, @Param("orgId") Integer orgId,@Param("status")Integer status,@Param("personBuildingList") List<TaPersonBuilding> personBuildingList);
180
+    Integer getCustomerExportListCount(@Param("building") String buildingId, @Param("name") String name, @Param("tel") String tel, @Param("consultName") String consultName, @Param("consultTel") String consultTel, @Param("entryType") String entryType, @Param("verifyStatus") String verifyStatus, @Param("sex") Integer sex, @Param("orgId") Integer orgId, @Param("status") Integer status, @Param("personBuildingList") List<TaPersonBuilding> personBuildingList);
165
 
181
 
166
     /**
182
     /**
167
      * 导出数据 私客
183
      * 导出数据 私客
184
+     *
168
      * @param pageCode
185
      * @param pageCode
169
      * @param pageSize
186
      * @param pageSize
170
      * @param buildingId
187
      * @param buildingId
179
      * @param status
196
      * @param status
180
      * @return
197
      * @return
181
      */
198
      */
182
-    List<PrivateCustomerExport> getCustomerExportList(@Param("pageCode") Integer pageCode, @Param("pageSize") Integer pageSize, @Param("building") String buildingId, @Param("name") String name, @Param("tel") String tel, @Param("consultName") String consultName, @Param("consultTel") String consultTel, @Param("entryType") String entryType, @Param("verifyStatus") String verifyStatus, @Param("sex") Integer sex, @Param("orgId") Integer orgId, @Param("status")Integer status,@Param("sceneType") String sceneType,@Param("personBuildingList") List<TaPersonBuilding> personBuildingList);
183
-    
199
+    List<PrivateCustomerExport> getCustomerExportList(@Param("pageCode") Integer pageCode,
200
+                                                      @Param("pageSize") Integer pageSize,
201
+                                                      @Param("building") String buildingId,
202
+                                                      @Param("name") String name,
203
+                                                      @Param("tel") String tel,
204
+                                                      @Param("consultName") String consultName,
205
+                                                      @Param("consultTel") String consultTel,
206
+                                                      @Param("entryType") String entryType,
207
+                                                      @Param("verifyStatus") String verifyStatus,
208
+                                                      @Param("sex") Integer sex,
209
+                                                      @Param("orgId") Integer orgId,
210
+                                                      @Param("status") Integer status,
211
+                                                      @Param("sceneType") String sceneType,
212
+                                                      @Param("startCreateDate") String startCreateDate,
213
+                                                      @Param("endCreateDate") String endCreateDate,
214
+                                                      @Param("personBuildingList") List<TaPersonBuilding> personBuildingList);
215
+
184
     /**
216
     /**
185
      * 获取我的客户的人数统计
217
      * 获取我的客户的人数统计
218
+     *
186
      * @param personId
219
      * @param personId
187
      * @param userId
220
      * @param userId
188
      * @return
221
      * @return
189
      */
222
      */
190
-	Map<String, Object> getMyCustStatistics(@Param("personId") String personId,@Param("userId") Integer userId,@Param("orgId") Integer orgId);
191
-    
223
+    Map<String, Object> getMyCustStatistics(@Param("personId") String personId, @Param("userId") Integer userId, @Param("orgId") Integer orgId);
224
+
192
     /**
225
     /**
193
      * 获取我的跟进客户数据
226
      * 获取我的跟进客户数据
227
+     *
194
      * @param page
228
      * @param page
195
      * @param personId
229
      * @param personId
196
      * @param userId
230
      * @param userId
205
      * @param endArrivalDate
239
      * @param endArrivalDate
206
      * @return
240
      * @return
207
      */
241
      */
208
-    IPage<TaRecommendCustomer> getMyCustFollowOrClinch(IPage<TaRecommendCustomer> page, @Param("personId") String personId, @Param("userId") Integer userId, @Param("orgId") Integer orgId, @Param("type") String type, @Param("name") String name, @Param("phone") String phone, @Param("status") Integer status,@Param("startReportDate") String startReportDate,@Param("endReportDate") String endReportDate,@Param("startArrivalDate") String startArrivalDate,@Param("endArrivalDate") String endArrivalDate);
209
-    
242
+    IPage<TaRecommendCustomer> getMyCustFollowOrClinch(IPage<TaRecommendCustomer> page, @Param("personId") String personId, @Param("userId") Integer userId, @Param("orgId") Integer orgId, @Param("type") String type, @Param("name") String name, @Param("phone") String phone, @Param("status") Integer status, @Param("startReportDate") String startReportDate, @Param("endReportDate") String endReportDate, @Param("startArrivalDate") String startArrivalDate, @Param("endArrivalDate") String endArrivalDate);
243
+
210
     /**
244
     /**
211
      * 获取我的客户详情数据
245
      * 获取我的客户详情数据
246
+     *
212
      * @param customerId
247
      * @param customerId
213
      * @return
248
      * @return
214
      */
249
      */
215
     TaRecommendCustomer getMyCustDetailById(String customerId);
250
     TaRecommendCustomer getMyCustDetailById(String customerId);
216
 
251
 
217
-    List<PersonIntention> getCustomerIntentions(@Param("personId")String personId,@Param("personBuildingList") List<TaPersonBuilding> personBuildingList);
252
+    List<PersonIntention> getCustomerIntentions(@Param("personId") String personId, @Param("personBuildingList") List<TaPersonBuilding> personBuildingList);
218
 
253
 
219
-    IPage<TaRecommendCustomer>getCustomersIRecommended(IPage<TaRecommendCustomer> page,@Param("customerId")String customerId,@Param("status")Integer status,@Param("orgId") Integer orgId,@Param("personBuildingList") List<TaPersonBuilding> personBuildingList);
254
+    IPage<TaRecommendCustomer> getCustomersIRecommended(IPage<TaRecommendCustomer> page, @Param("customerId") String customerId, @Param("status") Integer status, @Param("orgId") Integer orgId, @Param("personBuildingList") List<TaPersonBuilding> personBuildingList);
220
 
255
 
221
     IPage<TaRecommendCustomer> getCustomerListOfConsultant(IPage<TaRecommendCustomer> page,
256
     IPage<TaRecommendCustomer> getCustomerListOfConsultant(IPage<TaRecommendCustomer> page,
222
                                                            @Param("orgId") Integer orgId,
257
                                                            @Param("orgId") Integer orgId,
230
      * 查询 person 对应 楼盘 的客户
265
      * 查询 person 对应 楼盘 的客户
231
      * 如果对应的楼盘没有客户, 则返回无楼盘的, 小程序级别的客户信息
266
      * 如果对应的楼盘没有客户, 则返回无楼盘的, 小程序级别的客户信息
232
      * 如果没有无小程序级别客户, 则返回最早的一条
267
      * 如果没有无小程序级别客户, 则返回最早的一条
268
+     *
233
      * @param orgId
269
      * @param orgId
234
      * @param personId
270
      * @param personId
235
      * @param buildingId
271
      * @param buildingId
239
 
275
 
240
     /**
276
     /**
241
      * 获取置业福问下的客户
277
      * 获取置业福问下的客户
278
+     *
242
      * @param userId
279
      * @param userId
243
      * @param personId
280
      * @param personId
244
      * @param buildingId
281
      * @param buildingId
245
      * @param orgId
282
      * @param orgId
246
      * @return
283
      * @return
247
      */
284
      */
248
-    List<TaRecommendCustomer> getConsultantCustomerList(@Param("userId") Integer userId,@Param("personId") String personId,@Param("buildingId") String buildingId,@Param("orgId") Integer orgId);
285
+    List<TaRecommendCustomer> getConsultantCustomerList(@Param("userId") Integer userId, @Param("personId") String personId, @Param("buildingId") String buildingId, @Param("orgId") Integer orgId);
249
 
286
 
250
 }
287
 }

+ 16
- 0
src/main/java/com/huiju/estateagents/service/ITaQrcodeService.java 查看文件

1
+package com.huiju.estateagents.service;
2
+
3
+import com.huiju.estateagents.entity.TaQrcode;
4
+import com.baomidou.mybatisplus.extension.service.IService;
5
+
6
+/**
7
+ * <p>
8
+ * 二维码管理表 服务类
9
+ * </p>
10
+ *
11
+ * @author fxf
12
+ * @since 2020-05-20
13
+ */
14
+public interface ITaQrcodeService extends IService<TaQrcode> {
15
+
16
+}

+ 20
- 0
src/main/java/com/huiju/estateagents/service/impl/TaQrcodeServiceImpl.java 查看文件

1
+package com.huiju.estateagents.service.impl;
2
+
3
+import com.huiju.estateagents.entity.TaQrcode;
4
+import com.huiju.estateagents.mapper.TaQrcodeMapper;
5
+import com.huiju.estateagents.service.ITaQrcodeService;
6
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
7
+import org.springframework.stereotype.Service;
8
+
9
+/**
10
+ * <p>
11
+ * 二维码管理表 服务实现类
12
+ * </p>
13
+ *
14
+ * @author fxf
15
+ * @since 2020-05-20
16
+ */
17
+@Service
18
+public class TaQrcodeServiceImpl extends ServiceImpl<TaQrcodeMapper, TaQrcode> implements ITaQrcodeService {
19
+
20
+}

+ 5
- 0
src/main/resources/mapper/TaQrcodeMapper.xml 查看文件

1
+<?xml version="1.0" encoding="UTF-8"?>
2
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
3
+<mapper namespace="com.huiju.estateagents.mapper.TaQrcodeMapper">
4
+
5
+</mapper>

+ 18
- 3
src/main/resources/mapper/TaRecommendCustomerMapper.xml 查看文件

622
         <if test="sex != null and sex !=''">
622
         <if test="sex != null and sex !=''">
623
             and t.sex = #{sex}
623
             and t.sex = #{sex}
624
         </if>
624
         </if>
625
+        <if test="startCreateDate != null and startCreateDate !=''">
626
+            and t.create_Date >= #{startCreateDate}
627
+        </if>
628
+        <if test="endCreateDate != null and endCreateDate !=''">
629
+            and t.create_Date &lt;= #{endCreateDate}
630
+        </if>
625
         <if test="personBuildingList != null and personBuildingList.size > 0">
631
         <if test="personBuildingList != null and personBuildingList.size > 0">
626
             AND t.building_id in
632
             AND t.building_id in
627
             <foreach collection="personBuildingList" item="personBuilding" open="(" close=")" separator=",">
633
             <foreach collection="personBuildingList" item="personBuilding" open="(" close=")" separator=",">
682
             <if test="sex != null and sex !=''">
688
             <if test="sex != null and sex !=''">
683
                 and a.sex = #{sex}
689
                 and a.sex = #{sex}
684
             </if>
690
             </if>
691
+            <if test="startCreateDate != null and startCreateDate !=''">
692
+                and a.create_Date >= #{startCreateDate}
693
+            </if>
694
+            <if test="endCreateDate != null and endCreateDate !=''">
695
+                and a.create_Date &lt;= #{endCreateDate}
696
+            </if>
685
             <if test="personBuildingList != null and personBuildingList.size > 0">
697
             <if test="personBuildingList != null and personBuildingList.size > 0">
686
                 AND a.building_id in
698
                 AND a.building_id in
687
                 <foreach collection="personBuildingList" item="personBuilding" open="(" close=")" separator=",">
699
                 <foreach collection="personBuildingList" item="personBuilding" open="(" close=")" separator=",">
723
         LEFT JOIN ta_person p2 ON a.person_id = p2.person_id
735
         LEFT JOIN ta_person p2 ON a.person_id = p2.person_id
724
         LEFT JOIN ta_person c ON p2.recommend_person = c.person_id
736
         LEFT JOIN ta_person c ON p2.recommend_person = c.person_id
725
         left join ta_building t on a.building_id = t.building_id
737
         left join ta_building t on a.building_id = t.building_id
726
-        --         LEFT JOIN ta_person c ON p.share_person_id = c.person_id
727
-        --         left join ta_building t on a.building_id = t.building_id
728
-        --         LEFT JOIN td_wx_dict w ON p.scene_id = w.scene_id
729
         left JOIN (select sum(points_amount) as points,person_id from ta_points_records where org_id = #{orgId} GROUP BY
738
         left JOIN (select sum(points_amount) as points,person_id from ta_points_records where org_id = #{orgId} GROUP BY
730
         person_id) s on a.person_id = s.person_id
739
         person_id) s on a.person_id = s.person_id
731
         left join (select sum(t.intention) as intention,t.person_id From ta_person_intention_record t where t.org_id =
740
         left join (select sum(t.intention) as intention,t.person_id From ta_person_intention_record t where t.org_id =
765
             <if test="sex != null and sex !=''">
774
             <if test="sex != null and sex !=''">
766
                 and a.sex = #{sex}
775
                 and a.sex = #{sex}
767
             </if>
776
             </if>
777
+            <if test="startCreateDate != null and startCreateDate !=''">
778
+                and a.create_Date >= #{startCreateDate}
779
+            </if>
780
+            <if test="endCreateDate != null and endCreateDate !=''">
781
+                and a.create_Date &lt;= #{endCreateDate}
782
+            </if>
768
             <if test="personBuildingList != null and personBuildingList.size > 0">
783
             <if test="personBuildingList != null and personBuildingList.size > 0">
769
                 AND a.building_id in
784
                 AND a.building_id in
770
                 <foreach collection="personBuildingList" item="personBuilding" open="(" close=")" separator=",">
785
                 <foreach collection="personBuildingList" item="personBuilding" open="(" close=")" separator=",">