瀏覽代碼

verifyCustomer

胡轶钦 5 年之前
父節點
當前提交
4b3a252620

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

2
 
2
 
3
 
3
 
4
 import com.huiju.estateagents.base.ResponseBean;
4
 import com.huiju.estateagents.base.ResponseBean;
5
+import com.huiju.estateagents.common.CommConstant;
5
 import com.huiju.estateagents.common.JWTUtils;
6
 import com.huiju.estateagents.common.JWTUtils;
6
 import com.huiju.estateagents.entity.TaPerson;
7
 import com.huiju.estateagents.entity.TaPerson;
7
 import com.huiju.estateagents.entity.TaRecommendCustomer;
8
 import com.huiju.estateagents.entity.TaRecommendCustomer;
229
         }
230
         }
230
     }
231
     }
231
 
232
 
233
+    /**
234
+     * 修改对象
235
+     * @return
236
+     */
237
+    @RequestMapping(value="/admin/customer/recommend/verify/{id}",method= RequestMethod.PUT)
238
+    public ResponseBean taRecommendCustomerVerify(@PathVariable String id,@RequestParam Integer verifyStatus, @RequestParam String verifyRemark){
239
+        ResponseBean responseBean = new ResponseBean();
240
+        try {
241
+            TaRecommendCustomer taRecommendCustomer = taRecommendCustomerService.getById(id);
242
+            if(taRecommendCustomer.getVerifyStatus() != CommConstant.VERIFY_READY){
243
+                taRecommendCustomer.setVerifyStatus(verifyStatus);
244
+                taRecommendCustomer.setVerifyRemark(verifyRemark);
245
+                if (taRecommendCustomerService.updateById(taRecommendCustomer)){
246
+                    responseBean.addSuccess(taRecommendCustomer);
247
+                }else {
248
+                    responseBean.addError("fail");
249
+                }
250
+            } else {
251
+                responseBean.addSuccess("客户已审核");
252
+            }
253
+
254
+        }catch (Exception e){
255
+            e.printStackTrace();
256
+            responseBean.addError(e.getMessage());
257
+        }
258
+        return responseBean;
259
+    }
260
+
232
 }
261
 }

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

158
 
158
 
159
     @TableField(exist = false)
159
     @TableField(exist = false)
160
     private TaPerson consultant;
160
     private TaPerson consultant;
161
+
162
+    @TableField(exist = false)
163
+    private String recommendName;
164
+
165
+    @TableField(exist = false)
166
+    private String recommendTel;
161
 }
167
 }

+ 4
- 1
src/main/resources/mapper/TaRecommendCustomerMapper.xml 查看文件

35
         SELECT
35
         SELECT
36
 	a.*,
36
 	a.*,
37
 	b.name as consultantName,
37
 	b.name as consultantName,
38
-    b.tel as consultTel
38
+    b.tel as consultTel,
39
+    c.nickname as recommendName,
40
+    c.tel as recommendTel
39
 FROM
41
 FROM
40
 	ta_recommend_customer a
42
 	ta_recommend_customer a
41
 	LEFT JOIN ta_person b ON a.realty_consultant = b.person_id
43
 	LEFT JOIN ta_person b ON a.realty_consultant = b.person_id
44
+    LEFT JOIN ta_person c on a.person_id = c.person_id
42
 	<where>
45
 	<where>
43
         a.status > 0
46
         a.status > 0
44
         <if test="building != null and building !=''">
47
         <if test="building != null and building !=''">