魏熙美 6 år sedan
förälder
incheckning
9fee67efa6

+ 14
- 2
src/main/java/com/huiju/estateagents/controller/TaRecommendCustomerController.java Visa fil

@@ -177,8 +177,20 @@ public class TaRecommendCustomerController extends BaseController {
177 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 194
         ResponseBean responseBean = new ResponseBean();
183 195
         try {
184 196
             responseBean.addSuccess(taRecommendCustomerService.getById(customerId));

+ 1
- 1
src/main/java/com/huiju/estateagents/service/impl/TaRecommendCustomerServiceImpl.java Visa fil

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