Explorar el Código

客户信息修改

傅行帆 hace 3 años
padre
commit
94d3c2b618
Se han modificado 18 ficheros con 676 adiciones y 9 borrados
  1. 4
    3
      src/main/java/com/yunzhi/marketing/xlk/controller/ChannelCustomerController.java
  2. 191
    0
      src/main/java/com/yunzhi/marketing/xlk/controller/CustomerInfoController.java
  3. 143
    0
      src/main/java/com/yunzhi/marketing/xlk/controller/CustomerInfoModifyRecordController.java
  4. 145
    0
      src/main/java/com/yunzhi/marketing/xlk/entity/CustomerInfo.java
  5. 61
    0
      src/main/java/com/yunzhi/marketing/xlk/entity/CustomerInfoModifyRecord.java
  6. 1
    1
      src/main/java/com/yunzhi/marketing/xlk/mapper/ChannelCustomerMapper.java
  7. 18
    0
      src/main/java/com/yunzhi/marketing/xlk/mapper/CustomerInfoMapper.java
  8. 18
    0
      src/main/java/com/yunzhi/marketing/xlk/mapper/CustomerInfoModifyRecordMapper.java
  9. 3
    2
      src/main/java/com/yunzhi/marketing/xlk/service/IChannelCustomerService.java
  10. 16
    0
      src/main/java/com/yunzhi/marketing/xlk/service/ICustomerInfoModifyRecordService.java
  11. 16
    0
      src/main/java/com/yunzhi/marketing/xlk/service/ICustomerInfoService.java
  12. 3
    3
      src/main/java/com/yunzhi/marketing/xlk/service/impl/ChannelCustomerServiceImpl.java
  13. 20
    0
      src/main/java/com/yunzhi/marketing/xlk/service/impl/CustomerInfoModifyRecordServiceImpl.java
  14. 20
    0
      src/main/java/com/yunzhi/marketing/xlk/service/impl/CustomerInfoServiceImpl.java
  15. 1
    0
      src/main/resources/mapper/TaRecommendCustomerMapper.xml
  16. 6
    0
      src/main/resources/mapper/xlk/ChannelCustomerMapper.xml
  17. 5
    0
      src/main/resources/mapper/xlk/CustomerInfoMapper.xml
  18. 5
    0
      src/main/resources/mapper/xlk/CustomerInfoModifyRecordMapper.xml

+ 4
- 3
src/main/java/com/yunzhi/marketing/xlk/controller/ChannelCustomerController.java Ver fichero

@@ -54,6 +54,7 @@ public class ChannelCustomerController extends BaseController {
54 54
                                             @RequestParam(value ="recommendPersonName", required = false) String recommendPersonName,
55 55
                                             @RequestParam(value ="recommendPhone", required = false) String recommendPhone,
56 56
                                             @RequestParam(value ="status", required = false) String status,
57
+                                            @RequestParam(value ="type") String type,
57 58
                                             HttpServletRequest request){
58 59
         Integer orgId = getOrgId(request);
59 60
         ResponseBean responseBean = new ResponseBean();
@@ -68,7 +69,7 @@ public class ChannelCustomerController extends BaseController {
68 69
                     phone,
69 70
                     recommendPersonName,
70 71
                     recommendPhone,
71
-                    status);
72
+                    status,type);
72 73
             responseBean.addSuccess(result);
73 74
         }catch (Exception e){
74 75
             e.printStackTrace();
@@ -86,7 +87,7 @@ public class ChannelCustomerController extends BaseController {
86 87
      */
87 88
     @ApiOperation(value = "admin-渠道报备客户审核", notes = "admin-渠道报备客户审核")
88 89
     @RequestMapping(value="/admin/channelCustomer/{id}",method= RequestMethod.PUT)
89
-    public ResponseBean channelCustomerUpdate(@PathVariable Integer id,
90
+    public ResponseBean channelCustomerUpdate(@PathVariable String id,
90 91
                                         @RequestBody ChannelCustomerDTO channelCustomerDTO){
91 92
         return iChannelCustomerService.auditCustomer(id,channelCustomerDTO);
92 93
     }
@@ -122,7 +123,7 @@ public class ChannelCustomerController extends BaseController {
122 123
      * @param id  实体ID
123 124
      */
124 125
     @RequestMapping(value="/admin/channelCustomer/{id}",method= RequestMethod.GET)
125
-    public ResponseBean channelCustomerGet(@PathVariable Integer id){
126
+    public ResponseBean channelCustomerGet(@PathVariable String id){
126 127
         ResponseBean responseBean = new ResponseBean();
127 128
         try {
128 129
             responseBean.addSuccess(iChannelCustomerService.getById(id));

+ 191
- 0
src/main/java/com/yunzhi/marketing/xlk/controller/CustomerInfoController.java Ver fichero

@@ -0,0 +1,191 @@
1
+package com.yunzhi.marketing.xlk.controller;
2
+
3
+import com.alibaba.fastjson.JSONObject;
4
+import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
5
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
6
+import com.baomidou.mybatisplus.core.metadata.IPage;
7
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
8
+import com.yunzhi.marketing.base.BaseController;
9
+import com.yunzhi.marketing.base.ResponseBean;
10
+import com.yunzhi.marketing.entity.TaPerson;
11
+import com.yunzhi.marketing.service.ITaPersonService;
12
+import com.yunzhi.marketing.xlk.entity.CustomerInfo;
13
+import com.yunzhi.marketing.xlk.entity.CustomerInfoModifyRecord;
14
+import com.yunzhi.marketing.xlk.service.ICustomerInfoModifyRecordService;
15
+import com.yunzhi.marketing.xlk.service.ICustomerInfoService;
16
+import io.swagger.annotations.Api;
17
+import io.swagger.annotations.ApiOperation;
18
+import org.slf4j.Logger;
19
+import org.slf4j.LoggerFactory;
20
+import org.springframework.beans.factory.annotation.Autowired;
21
+import org.springframework.web.bind.annotation.*;
22
+
23
+import javax.servlet.http.HttpServletRequest;
24
+import java.time.LocalDateTime;
25
+import java.util.List;
26
+
27
+/**
28
+ * <p>
29
+    * 客户基本信息表  前端控制器
30
+    * </p>
31
+ *
32
+ * @author jobob
33
+ * @since 2021-07-29
34
+ */
35
+@RestController
36
+@RequestMapping("/api")
37
+@Api(value = "客户基本信息表", tags = "xlk-客户基本信息表")
38
+public class CustomerInfoController extends BaseController {
39
+
40
+    private final Logger logger = LoggerFactory.getLogger(CustomerInfoController.class);
41
+
42
+    @Autowired
43
+    public ICustomerInfoService iCustomerInfoService;
44
+
45
+    @Autowired
46
+    private ICustomerInfoModifyRecordService customerInfoModifyRecordService;
47
+
48
+    @Autowired
49
+    public ITaPersonService taPersonService;
50
+
51
+    /**
52
+     * 分页查询列表
53
+     * @param pageNum
54
+     * @param pageSize
55
+     * @return
56
+     */
57
+    @RequestMapping(value="/customerInfo",method= RequestMethod.GET)
58
+    public ResponseBean customerInfoList(@RequestParam(value ="pageNum",defaultValue = "1") Integer pageNum,
59
+                                         @RequestParam(value ="pageSize",defaultValue = "10") Integer pageSize){
60
+        ResponseBean responseBean = new ResponseBean();
61
+        try {
62
+            //使用分页插件
63
+		    IPage<CustomerInfo> pg = new Page<>(pageNum, pageSize);
64
+            QueryWrapper<CustomerInfo> queryWrapper = new QueryWrapper<>();
65
+            queryWrapper.orderByDesc("create_date");
66
+
67
+            IPage<CustomerInfo> result = iCustomerInfoService.page(pg, queryWrapper);
68
+            responseBean.addSuccess(result);
69
+        }catch (Exception e){
70
+            e.printStackTrace();
71
+            logger.error("customerInfoList -=- {}",e.toString());
72
+            responseBean.addError(e.getMessage());
73
+        }
74
+        return responseBean;
75
+    }
76
+
77
+    /**
78
+     * 保存对象
79
+     * @param customerInfo 实体对象
80
+     * @return
81
+     */
82
+    @ApiOperation(value = "wx-保存客户信息", notes = "wx-保存客户信息")
83
+    @RequestMapping(value="/wx/customerInfo",method= RequestMethod.POST)
84
+    public ResponseBean customerInfoAdd(@RequestBody CustomerInfo customerInfo, @RequestHeader("authorization") String token, HttpServletRequest request){
85
+        ResponseBean responseBean = new ResponseBean();
86
+        String openid = getOpenId(request);
87
+        Integer orgId = getOrgId(request);
88
+        List<TaPerson> persons = taPersonService.getPersonsByOpenId(openid);
89
+        if (null == persons || persons.size() == 0) {
90
+            return ResponseBean.error("当前账户信息异常, 清除缓存重试", ResponseBean.ERROR_UNAVAILABLE);
91
+        }
92
+        TaPerson person = persons.get(0);
93
+        try {
94
+            customerInfo.setCreateDate(LocalDateTime.now());
95
+            customerInfo.setCretePerson(person.getPersonId());
96
+            customerInfo.setOrgId(orgId);
97
+            if (iCustomerInfoService.save(customerInfo)){
98
+                responseBean.addSuccess(customerInfo);
99
+            }else {
100
+                responseBean.addError("fail");
101
+            }
102
+        }catch (Exception e){
103
+            e.printStackTrace();
104
+            logger.error("customerInfoAdd -=- {}",e.toString());
105
+            responseBean.addError(e.getMessage());
106
+        }
107
+        return responseBean;
108
+    }
109
+
110
+    /**
111
+     * 根据id删除对象
112
+     * @param id  实体ID
113
+     */
114
+    @ResponseBody
115
+    @RequestMapping(value="/customerInfo/{id}", method= RequestMethod.DELETE)
116
+    public ResponseBean customerInfoDelete(@PathVariable Integer id){
117
+        ResponseBean responseBean = new ResponseBean();
118
+        try {
119
+            if(iCustomerInfoService.removeById(id)){
120
+                responseBean.addSuccess("success");
121
+            }else {
122
+                responseBean.addError("fail");
123
+            }
124
+        }catch (Exception e){
125
+            e.printStackTrace();
126
+            logger.error("customerInfoDelete -=- {}",e.toString());
127
+            responseBean.addError(e.getMessage());
128
+        }
129
+        return responseBean;
130
+    }
131
+
132
+    /**
133
+     * 修改对象
134
+     * @param id  实体ID
135
+     * @param customerInfo 实体对象
136
+     * @return
137
+     */
138
+    @RequestMapping(value="/customerInfo/{id}",method= RequestMethod.PUT)
139
+    public ResponseBean customerInfoUpdate(@PathVariable String id,
140
+                                        @RequestBody CustomerInfo customerInfo, @RequestHeader("authorization") String token,HttpServletRequest request){
141
+        ResponseBean responseBean = new ResponseBean();
142
+        String openid = getOpenId(request);
143
+        Integer orgId = getOrgId(request);
144
+        List<TaPerson> persons = taPersonService.getPersonsByOpenId(openid);
145
+        if (null == persons || persons.size() == 0) {
146
+            return ResponseBean.error("当前账户信息异常, 清除缓存重试", ResponseBean.ERROR_UNAVAILABLE);
147
+        }
148
+        TaPerson person = persons.get(0);
149
+        try {
150
+            customerInfo.setCustomerInfoId(id);
151
+            if (iCustomerInfoService.updateById(customerInfo)){
152
+                // 记录到修改记录表中
153
+                CustomerInfoModifyRecord customerInfoModifyRecord = new CustomerInfoModifyRecord();
154
+                customerInfoModifyRecord.setCreateDate(LocalDateTime.now());
155
+                customerInfoModifyRecord.setCustomerInfoId(id);
156
+                customerInfoModifyRecord.setModifyPersonId(person.getPersonId());
157
+                customerInfoModifyRecord.setOrgId(orgId);
158
+                customerInfoModifyRecord.setContent(JSONObject.toJSONString(customerInfo));
159
+                customerInfoModifyRecordService.save(customerInfoModifyRecord);
160
+                responseBean.addSuccess(customerInfo);
161
+            }else {
162
+                responseBean.addError("fail");
163
+            }
164
+        }catch (Exception e){
165
+            e.printStackTrace();
166
+            logger.error("customerInfoUpdate -=- {}",e.toString());
167
+            responseBean.addError(e.getMessage());
168
+        }
169
+        return responseBean;
170
+    }
171
+
172
+    /**
173
+     * 根据id查询对象
174
+     * @param
175
+     */
176
+    @ApiOperation(value = "wx-查询客户信息", notes = "wx-查询客户信息")
177
+    @RequestMapping(value="/wx/customerInfo/{customerId}",method= RequestMethod.GET)
178
+    public ResponseBean customerInfoGet(@PathVariable Integer customerId, @RequestHeader("authorization") String token){
179
+        ResponseBean responseBean = new ResponseBean();
180
+        try {
181
+            LambdaQueryWrapper<CustomerInfo> lambdaQueryWrapper = new LambdaQueryWrapper<>();
182
+            lambdaQueryWrapper.eq(CustomerInfo::getCustomerId,customerId);
183
+            responseBean.addSuccess(iCustomerInfoService.getOne(lambdaQueryWrapper));
184
+        }catch (Exception e){
185
+            e.printStackTrace();
186
+            logger.error("customerInfoDelete -=- {}",e.toString());
187
+            responseBean.addError(e.getMessage());
188
+        }
189
+        return responseBean;
190
+    }
191
+}

+ 143
- 0
src/main/java/com/yunzhi/marketing/xlk/controller/CustomerInfoModifyRecordController.java Ver fichero

@@ -0,0 +1,143 @@
1
+package com.yunzhi.marketing.xlk.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.yunzhi.marketing.base.BaseController;
7
+import com.yunzhi.marketing.base.ResponseBean;
8
+import com.yunzhi.marketing.xlk.entity.CustomerInfoModifyRecord;
9
+import com.yunzhi.marketing.xlk.service.ICustomerInfoModifyRecordService;
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 jobob
21
+ * @since 2021-07-29
22
+ */
23
+@RestController
24
+@RequestMapping("/")
25
+public class CustomerInfoModifyRecordController extends BaseController {
26
+
27
+    private final Logger logger = LoggerFactory.getLogger(CustomerInfoModifyRecordController.class);
28
+
29
+    @Autowired
30
+    public ICustomerInfoModifyRecordService iCustomerInfoModifyRecordService;
31
+
32
+
33
+    /**
34
+     * 分页查询列表
35
+     * @param pageNum
36
+     * @param pageSize
37
+     * @return
38
+     */
39
+    @RequestMapping(value="/customerInfoModifyRecord",method= RequestMethod.GET)
40
+    public ResponseBean customerInfoModifyRecordList(@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<CustomerInfoModifyRecord> pg = new Page<>(pageNum, pageSize);
46
+            QueryWrapper<CustomerInfoModifyRecord> queryWrapper = new QueryWrapper<>();
47
+            queryWrapper.orderByDesc("create_date");
48
+
49
+            IPage<CustomerInfoModifyRecord> result = iCustomerInfoModifyRecordService.page(pg, queryWrapper);
50
+            responseBean.addSuccess(result);
51
+        }catch (Exception e){
52
+            e.printStackTrace();
53
+            logger.error("customerInfoModifyRecordList -=- {}",e.toString());
54
+            responseBean.addError(e.getMessage());
55
+        }
56
+        return responseBean;
57
+    }
58
+
59
+    /**
60
+     * 保存对象
61
+     * @param customerInfoModifyRecord 实体对象
62
+     * @return
63
+     */
64
+    @RequestMapping(value="/customerInfoModifyRecord",method= RequestMethod.POST)
65
+    public ResponseBean customerInfoModifyRecordAdd(@RequestBody CustomerInfoModifyRecord customerInfoModifyRecord){
66
+        ResponseBean responseBean = new ResponseBean();
67
+        try {
68
+            if (iCustomerInfoModifyRecordService.save(customerInfoModifyRecord)){
69
+                responseBean.addSuccess(customerInfoModifyRecord);
70
+            }else {
71
+                responseBean.addError("fail");
72
+            }
73
+        }catch (Exception e){
74
+            e.printStackTrace();
75
+            logger.error("customerInfoModifyRecordAdd -=- {}",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="/customerInfoModifyRecord/{id}", method= RequestMethod.DELETE)
87
+    public ResponseBean customerInfoModifyRecordDelete(@PathVariable Integer id){
88
+        ResponseBean responseBean = new ResponseBean();
89
+        try {
90
+            if(iCustomerInfoModifyRecordService.removeById(id)){
91
+                responseBean.addSuccess("success");
92
+            }else {
93
+                responseBean.addError("fail");
94
+            }
95
+        }catch (Exception e){
96
+            e.printStackTrace();
97
+            logger.error("customerInfoModifyRecordDelete -=- {}",e.toString());
98
+            responseBean.addError(e.getMessage());
99
+        }
100
+        return responseBean;
101
+    }
102
+
103
+    /**
104
+     * 修改对象
105
+     * @param id  实体ID
106
+     * @param customerInfoModifyRecord 实体对象
107
+     * @return
108
+     */
109
+    @RequestMapping(value="/customerInfoModifyRecord/{id}",method= RequestMethod.PUT)
110
+    public ResponseBean customerInfoModifyRecordUpdate(@PathVariable Integer id,
111
+                                        @RequestBody CustomerInfoModifyRecord customerInfoModifyRecord){
112
+        ResponseBean responseBean = new ResponseBean();
113
+        try {
114
+            if (iCustomerInfoModifyRecordService.updateById(customerInfoModifyRecord)){
115
+                responseBean.addSuccess(customerInfoModifyRecord);
116
+            }else {
117
+                responseBean.addError("fail");
118
+            }
119
+        }catch (Exception e){
120
+            e.printStackTrace();
121
+            logger.error("customerInfoModifyRecordUpdate -=- {}",e.toString());
122
+            responseBean.addError(e.getMessage());
123
+        }
124
+        return responseBean;
125
+    }
126
+
127
+    /**
128
+     * 根据id查询对象
129
+     * @param id  实体ID
130
+     */
131
+    @RequestMapping(value="/customerInfoModifyRecord/{id}",method= RequestMethod.GET)
132
+    public ResponseBean customerInfoModifyRecordGet(@PathVariable Integer id){
133
+        ResponseBean responseBean = new ResponseBean();
134
+        try {
135
+            responseBean.addSuccess(iCustomerInfoModifyRecordService.getById(id));
136
+        }catch (Exception e){
137
+            e.printStackTrace();
138
+            logger.error("customerInfoModifyRecordDelete -=- {}",e.toString());
139
+            responseBean.addError(e.getMessage());
140
+        }
141
+        return responseBean;
142
+    }
143
+}

+ 145
- 0
src/main/java/com/yunzhi/marketing/xlk/entity/CustomerInfo.java Ver fichero

@@ -0,0 +1,145 @@
1
+package com.yunzhi.marketing.xlk.entity;
2
+
3
+import com.baomidou.mybatisplus.annotation.IdType;
4
+import com.baomidou.mybatisplus.annotation.TableId;
5
+import com.baomidou.mybatisplus.annotation.TableName;
6
+import lombok.Data;
7
+import lombok.EqualsAndHashCode;
8
+import lombok.experimental.Accessors;
9
+
10
+import java.io.Serializable;
11
+import java.time.LocalDateTime;
12
+
13
+/**
14
+ * <p>
15
+ * 客户基本信息表 
16
+ * </p>
17
+ *
18
+ * @author jobob
19
+ * @since 2021-07-29
20
+ */
21
+@Data
22
+@EqualsAndHashCode(callSuper = false)
23
+@Accessors(chain = true)
24
+@TableName("xlk_customer_info")
25
+public class CustomerInfo implements Serializable {
26
+
27
+    private static final long serialVersionUID = 1L;
28
+
29
+    /**
30
+     * 客户基本信息id
31
+     */
32
+    @TableId(type = IdType.UUID)
33
+    private String customerInfoId;
34
+
35
+    /**
36
+     * 客户id
37
+     */
38
+    private String customerId;
39
+
40
+    /**
41
+     * 创建时间
42
+     */
43
+    private LocalDateTime createDate;
44
+
45
+    /**
46
+     * 公司id
47
+     */
48
+    private Integer orgId;
49
+
50
+    /**
51
+     * 性别
52
+     */
53
+    private Integer sex;
54
+
55
+    /**
56
+     * 姓名
57
+     */
58
+    private String name;
59
+
60
+    /**
61
+     * 昵称
62
+     */
63
+    private String nickname;
64
+
65
+    /**
66
+     * 手机号码
67
+     */
68
+    private String phone;
69
+
70
+    /**
71
+     * 家庭住址
72
+     */
73
+    private String homeAddress;
74
+
75
+    /**
76
+     * 工作地址
77
+     */
78
+    private String firmAddress;
79
+
80
+    /**
81
+     * 年龄段
82
+     */
83
+    private String age;
84
+
85
+    /**
86
+     * 职业
87
+     */
88
+    private String career;
89
+
90
+    /**
91
+     * 家庭年收入范围
92
+     */
93
+    private String householdIncome;
94
+
95
+    /**
96
+     * 家庭成员数
97
+     */
98
+    private Integer familyNumber;
99
+
100
+    /**
101
+     * 已有房产数
102
+     */
103
+    private Integer houseNumber;
104
+
105
+    /**
106
+     * 已有车辆数
107
+     */
108
+    private Integer carNumber;
109
+
110
+    /**
111
+     * 预计购房时间
112
+     */
113
+    private String estimatedPurchaseTime;
114
+
115
+    /**
116
+     * 客户咨询重点
117
+     */
118
+    private String consultation;
119
+
120
+    /**
121
+     * 购房动机
122
+     */
123
+    private String motivation;
124
+
125
+    /**
126
+     * 客户抗性分析
127
+     */
128
+    private String resistanceAnalysis;
129
+
130
+    /**
131
+     * 客户对项目认可点
132
+     */
133
+    private String approval;
134
+
135
+    /**
136
+     * 其他备注
137
+     */
138
+    private String remark;
139
+
140
+
141
+    /**
142
+     * 创建person
143
+     */
144
+    private String cretePerson;
145
+}

+ 61
- 0
src/main/java/com/yunzhi/marketing/xlk/entity/CustomerInfoModifyRecord.java Ver fichero

@@ -0,0 +1,61 @@
1
+package com.yunzhi.marketing.xlk.entity;
2
+
3
+import com.baomidou.mybatisplus.annotation.IdType;
4
+import com.baomidou.mybatisplus.annotation.TableId;
5
+import com.baomidou.mybatisplus.annotation.TableName;
6
+import lombok.Data;
7
+import lombok.EqualsAndHashCode;
8
+import lombok.experimental.Accessors;
9
+
10
+import java.io.Serializable;
11
+import java.time.LocalDateTime;
12
+
13
+/**
14
+ * <p>
15
+ * 客户信息修改记录表 
16
+ * </p>
17
+ *
18
+ * @author jobob
19
+ * @since 2021-07-29
20
+ */
21
+@Data
22
+@EqualsAndHashCode(callSuper = false)
23
+@Accessors(chain = true)
24
+@TableName("xlk_customer_info_modify_record")
25
+public class CustomerInfoModifyRecord implements Serializable {
26
+
27
+    private static final long serialVersionUID = 1L;
28
+
29
+    /**
30
+     * 主键
31
+     */
32
+    @TableId(type = IdType.UUID)
33
+    private String customerInfoModifyRecordId;
34
+
35
+    /**
36
+     * 修改人的信息id主键
37
+     */
38
+    private String customerInfoId;
39
+
40
+    /**
41
+     * 修改人的personid
42
+     */
43
+    private String modifyPersonId;
44
+
45
+    /**
46
+     * 创建时间
47
+     */
48
+    private LocalDateTime createDate;
49
+
50
+    /**
51
+     * 公司id
52
+     */
53
+    private Integer orgId;
54
+
55
+    /**
56
+     * 修改的内容
57
+     */
58
+    private String content;
59
+
60
+
61
+}

+ 1
- 1
src/main/java/com/yunzhi/marketing/xlk/mapper/ChannelCustomerMapper.java Ver fichero

@@ -24,6 +24,6 @@ public interface ChannelCustomerMapper extends BaseMapper<ChannelCustomer> {
24 24
                                           @Param("phone") String phone,
25 25
                                           @Param("recommendPersonName") String recommendPersonName,
26 26
                                           @Param("recommendPhone") String recommendPhone,
27
-                                          @Param("status") String status);
27
+                                          @Param("status") String status,@Param("type") String type);
28 28
 
29 29
 }

+ 18
- 0
src/main/java/com/yunzhi/marketing/xlk/mapper/CustomerInfoMapper.java Ver fichero

@@ -0,0 +1,18 @@
1
+package com.yunzhi.marketing.xlk.mapper;
2
+
3
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
4
+import com.yunzhi.marketing.xlk.entity.CustomerInfo;
5
+import org.apache.ibatis.annotations.Mapper;
6
+
7
+/**
8
+ * <p>
9
+ * 客户基本信息表  Mapper 接口
10
+ * </p>
11
+ *
12
+ * @author jobob
13
+ * @since 2021-07-29
14
+ */
15
+@Mapper
16
+public interface CustomerInfoMapper extends BaseMapper<CustomerInfo> {
17
+
18
+}

+ 18
- 0
src/main/java/com/yunzhi/marketing/xlk/mapper/CustomerInfoModifyRecordMapper.java Ver fichero

@@ -0,0 +1,18 @@
1
+package com.yunzhi.marketing.xlk.mapper;
2
+
3
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
4
+import com.yunzhi.marketing.xlk.entity.CustomerInfoModifyRecord;
5
+import org.apache.ibatis.annotations.Mapper;
6
+
7
+/**
8
+ * <p>
9
+ * 客户信息修改记录表  Mapper 接口
10
+ * </p>
11
+ *
12
+ * @author jobob
13
+ * @since 2021-07-29
14
+ */
15
+@Mapper
16
+public interface CustomerInfoModifyRecordMapper extends BaseMapper<CustomerInfoModifyRecord> {
17
+
18
+}

+ 3
- 2
src/main/java/com/yunzhi/marketing/xlk/service/IChannelCustomerService.java Ver fichero

@@ -23,7 +23,7 @@ public interface IChannelCustomerService extends IService<ChannelCustomer> {
23 23
      * @param channelCustomerDTO
24 24
      * @return
25 25
      */
26
-    ResponseBean auditCustomer(Integer id, ChannelCustomerDTO channelCustomerDTO);
26
+    ResponseBean auditCustomer(String id, ChannelCustomerDTO channelCustomerDTO);
27 27
 
28 28
     /**
29 29
      * 驻场确认到访
@@ -47,5 +47,6 @@ public interface IChannelCustomerService extends IService<ChannelCustomer> {
47 47
                                           String phone,
48 48
                                           String recommendPersonName,
49 49
                                           String recommendPhone,
50
-                                          String status);
50
+                                          String status,
51
+                                          String type);
51 52
 }

+ 16
- 0
src/main/java/com/yunzhi/marketing/xlk/service/ICustomerInfoModifyRecordService.java Ver fichero

@@ -0,0 +1,16 @@
1
+package com.yunzhi.marketing.xlk.service;
2
+
3
+import com.baomidou.mybatisplus.extension.service.IService;
4
+import com.yunzhi.marketing.xlk.entity.CustomerInfoModifyRecord;
5
+
6
+/**
7
+ * <p>
8
+ * 客户信息修改记录表  服务类
9
+ * </p>
10
+ *
11
+ * @author jobob
12
+ * @since 2021-07-29
13
+ */
14
+public interface ICustomerInfoModifyRecordService extends IService<CustomerInfoModifyRecord> {
15
+
16
+}

+ 16
- 0
src/main/java/com/yunzhi/marketing/xlk/service/ICustomerInfoService.java Ver fichero

@@ -0,0 +1,16 @@
1
+package com.yunzhi.marketing.xlk.service;
2
+
3
+import com.baomidou.mybatisplus.extension.service.IService;
4
+import com.yunzhi.marketing.xlk.entity.CustomerInfo;
5
+
6
+/**
7
+ * <p>
8
+ * 客户基本信息表  服务类
9
+ * </p>
10
+ *
11
+ * @author jobob
12
+ * @since 2021-07-29
13
+ */
14
+public interface ICustomerInfoService extends IService<CustomerInfo> {
15
+
16
+}

+ 3
- 3
src/main/java/com/yunzhi/marketing/xlk/service/impl/ChannelCustomerServiceImpl.java Ver fichero

@@ -43,7 +43,7 @@ public class ChannelCustomerServiceImpl extends ServiceImpl<ChannelCustomerMappe
43 43
      * @return
44 44
      */
45 45
     @Override
46
-    public ResponseBean auditCustomer(Integer id, ChannelCustomerDTO channelCustomerDTO) {
46
+    public ResponseBean auditCustomer(String id, ChannelCustomerDTO channelCustomerDTO) {
47 47
         ChannelCustomer customer = channelCustomerMapper.selectById(id);
48 48
         if ("fail".equals(channelCustomerDTO.getAuditResult())){
49 49
             // 审核不通过
@@ -209,7 +209,7 @@ public class ChannelCustomerServiceImpl extends ServiceImpl<ChannelCustomerMappe
209 209
                                                  String phone,
210 210
                                                  String recommendPersonName,
211 211
                                                  String recommendPhone,
212
-                                                 String status) {
213
-        return channelCustomerMapper.getProfileList(pg, orgId, buildingId, name, phone, recommendPersonName, recommendPhone, status);
212
+                                                 String status,String type) {
213
+        return channelCustomerMapper.getProfileList(pg, orgId, buildingId, name, phone, recommendPersonName, recommendPhone, status, type);
214 214
     }
215 215
 }

+ 20
- 0
src/main/java/com/yunzhi/marketing/xlk/service/impl/CustomerInfoModifyRecordServiceImpl.java Ver fichero

@@ -0,0 +1,20 @@
1
+package com.yunzhi.marketing.xlk.service.impl;
2
+
3
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
4
+import com.yunzhi.marketing.xlk.entity.CustomerInfoModifyRecord;
5
+import com.yunzhi.marketing.xlk.mapper.CustomerInfoModifyRecordMapper;
6
+import com.yunzhi.marketing.xlk.service.ICustomerInfoModifyRecordService;
7
+import org.springframework.stereotype.Service;
8
+
9
+/**
10
+ * <p>
11
+ * 客户信息修改记录表  服务实现类
12
+ * </p>
13
+ *
14
+ * @author jobob
15
+ * @since 2021-07-29
16
+ */
17
+@Service
18
+public class CustomerInfoModifyRecordServiceImpl extends ServiceImpl<CustomerInfoModifyRecordMapper, CustomerInfoModifyRecord> implements ICustomerInfoModifyRecordService {
19
+
20
+}

+ 20
- 0
src/main/java/com/yunzhi/marketing/xlk/service/impl/CustomerInfoServiceImpl.java Ver fichero

@@ -0,0 +1,20 @@
1
+package com.yunzhi.marketing.xlk.service.impl;
2
+
3
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
4
+import com.yunzhi.marketing.xlk.entity.CustomerInfo;
5
+import com.yunzhi.marketing.xlk.mapper.CustomerInfoMapper;
6
+import com.yunzhi.marketing.xlk.service.ICustomerInfoService;
7
+import org.springframework.stereotype.Service;
8
+
9
+/**
10
+ * <p>
11
+ * 客户基本信息表  服务实现类
12
+ * </p>
13
+ *
14
+ * @author jobob
15
+ * @since 2021-07-29
16
+ */
17
+@Service
18
+public class CustomerInfoServiceImpl extends ServiceImpl<CustomerInfoMapper, CustomerInfo> implements ICustomerInfoService {
19
+
20
+}

+ 1
- 0
src/main/resources/mapper/TaRecommendCustomerMapper.xml Ver fichero

@@ -959,6 +959,7 @@ FROM
959 959
 --         INNER JOIN ta_person p ON t.recommend_person = p.person_id
960 960
         WHERE
961 961
             t.building_id = #{buildingId}
962
+        and t.entry_type = "verify"
962 963
         <if test="keywords != null and keywords !=''">
963 964
             and t.name like CONCAT('%',#{keywords}, '%')
964 965
         </if>

+ 6
- 0
src/main/resources/mapper/xlk/ChannelCustomerMapper.xml Ver fichero

@@ -35,6 +35,12 @@
35 35
           <if test="status == null or status == ''">
36 36
             AND t.`status` &gt; -1
37 37
           </if>
38
+            <if test="type == 'customer'">
39
+                AND t.channel_id is null
40
+            </if>
41
+            <if test="type == 'channel'">
42
+                AND t.channel_id is not null
43
+            </if>
38 44
             ORDER BY
39 45
                 t.create_date DESC
40 46
     </select>

+ 5
- 0
src/main/resources/mapper/xlk/CustomerInfoMapper.xml Ver fichero

@@ -0,0 +1,5 @@
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.yunzhi.marketing.xlk.mapper.CustomerInfoMapper">
4
+
5
+</mapper>

+ 5
- 0
src/main/resources/mapper/xlk/CustomerInfoModifyRecordMapper.xml Ver fichero

@@ -0,0 +1,5 @@
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.yunzhi.marketing.xlk.mapper.CustomerInfoModifyRecordMapper">
4
+
5
+</mapper>