魏熙美 6 years ago
parent
commit
9fee67efa6

+ 14
- 2
src/main/java/com/huiju/estateagents/controller/TaRecommendCustomerController.java View File

177
         return responseBean;
177
         return responseBean;
178
     }
178
     }
179
 
179
 
180
-    @RequestMapping(value = "/wx/customer/recommend/get/{id}")
181
-    public ResponseBean getSingleCustomer(String customerId) {
180
+    @RequestMapping(value = "/wx/customer/recommend/get/{id}", method = RequestMethod.GET)
181
+    public ResponseBean getSingleCustomer(@PathVariable(value = "id") String customerId) {
182
+        ResponseBean responseBean = new ResponseBean();
183
+        try {
184
+            responseBean.addSuccess(taRecommendCustomerService.getById(customerId));
185
+        }catch (Exception e){
186
+            e.printStackTrace();
187
+            responseBean.addError(e.getMessage());
188
+        }
189
+        return responseBean;
190
+    }
191
+
192
+    @RequestMapping(value = "/admin/customer/recommend/getById/{id}", method = RequestMethod.GET)
193
+    public ResponseBean getRecommendCustomerById(@PathVariable(value = "id") String customerId) {
182
         ResponseBean responseBean = new ResponseBean();
194
         ResponseBean responseBean = new ResponseBean();
183
         try {
195
         try {
184
             responseBean.addSuccess(taRecommendCustomerService.getById(customerId));
196
             responseBean.addSuccess(taRecommendCustomerService.getById(customerId));

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

255
     public TaRecommendCustomer getCustomerDetail(String customerId){
255
     public TaRecommendCustomer getCustomerDetail(String customerId){
256
         String personId = taRecommendCustomerMapper.getCustomerPersonId(customerId);
256
         String personId = taRecommendCustomerMapper.getCustomerPersonId(customerId);
257
         TaRecommendCustomer taRecommendCustomer = taRecommendCustomerMapper.getCustomerDetail(customerId);
257
         TaRecommendCustomer taRecommendCustomer = taRecommendCustomerMapper.getCustomerDetail(customerId);
258
-        if(!personId.equals("")&& null != personId){
258
+        if(org.apache.commons.lang3.StringUtils.isNotBlank(personId)){
259
             taRecommendCustomer.setVisitRecords(taPersonVisitRecordMapper.visitRecordByPersonId(personId));
259
             taRecommendCustomer.setVisitRecords(taPersonVisitRecordMapper.visitRecordByPersonId(personId));
260
         }
260
         }
261
         if(!taRecommendCustomer.getRealtyConsultant().equals("")&&null != taRecommendCustomer.getRealtyConsultant()){
261
         if(!taRecommendCustomer.getRealtyConsultant().equals("")&&null != taRecommendCustomer.getRealtyConsultant()){