dingxin 5 years ago
parent
commit
5f505da68b

+ 1
- 1
src/main/java/com/huiju/estateagents/center/taUser/controller/TaUserController.java View File

@@ -311,7 +311,7 @@ public class TaUserController extends BaseController {
311 311
             return ResponseBean.error("用户名或密码错误", ResponseBean.ERROR_ILLEGAL_PARAMS);
312 312
         }
313 313
     
314
-        if (taUser.getStatus() != CommConstant.STATUS_NORMAL) {
314
+        if (!taUser.getStatus().equals(CommConstant.STATUS_NORMAL) ) {
315 315
             return ResponseBean.error("用户状态异常", ResponseBean.ERROR_UNAVAILABLE);
316 316
         }
317 317
 

+ 38
- 32
src/main/java/com/huiju/estateagents/controller/TaPersonController.java View File

@@ -368,38 +368,38 @@ public class TaPersonController extends BaseController {
368 368
      * @param paramStr
369 369
      * @return
370 370
      */
371
-    @PostMapping("/admin/signin")
372
-    public ResponseBean signin(@RequestBody String paramStr) {
373
-        JSONObject params = JSONObject.parseObject(paramStr);
374
-        if (params == null) {
375
-            return ResponseBean.error("非法参数", ResponseBean.ERROR_MISSING_PARAMS);
376
-        }
377
-
378
-        String userPhone = params.getString("phone");
379
-        String userCaptcha = params.getString("captcha");
380
-
381
-        // todo
382
-        if (!"1234".equals(userCaptcha)) {
383
-            return ResponseBean.error("验证码不正确", ResponseBean.ERROR_ILLEGAL_PARAMS);
384
-        }
385
-
386
-        TaPerson taPerson = taPersonService.getPersonByTel(userPhone);
387
-        if (taPerson == null) {
388
-            return ResponseBean.error("手机号不存在", ResponseBean.ERROR_ILLEGAL_PARAMS);
389
-        }
390
-
391
-        if (taPerson.getStatus() != CommConstant.STATUS_NORMAL) {
392
-            return ResponseBean.error("用户状态异常", ResponseBean.ERROR_UNAVAILABLE);
393
-        }
394
-
395
-        String token = JWTUtils.newToken(taPerson.getPersonId());
396
-
397
-        Map<String, Object> result = new HashMap<>();
398
-        result.put("token", token);
399
-        result.put("person", taPerson);
400
-
401
-        return ResponseBean.success(result);
402
-    }
371
+//    @PostMapping("/admin/signin")
372
+//    public ResponseBean signin(@RequestBody String paramStr) {
373
+//        JSONObject params = JSONObject.parseObject(paramStr);
374
+//        if (params == null) {
375
+//            return ResponseBean.error("非法参数", ResponseBean.ERROR_MISSING_PARAMS);
376
+//        }
377
+//
378
+//        String userPhone = params.getString("phone");
379
+//        String userCaptcha = params.getString("captcha");
380
+//
381
+//        // todo
382
+//        if (!"1234".equals(userCaptcha)) {
383
+//            return ResponseBean.error("验证码不正确", ResponseBean.ERROR_ILLEGAL_PARAMS);
384
+//        }
385
+//
386
+//        TaPerson taPerson = taPersonService.getPersonByTel(userPhone);
387
+//        if (taPerson == null) {
388
+//            return ResponseBean.error("手机号不存在", ResponseBean.ERROR_ILLEGAL_PARAMS);
389
+//        }
390
+//
391
+//        if (taPerson.getStatus() != CommConstant.STATUS_NORMAL) {
392
+//            return ResponseBean.error("用户状态异常", ResponseBean.ERROR_UNAVAILABLE);
393
+//        }
394
+//
395
+//        String token = JWTUtils.newToken(taPerson.getPersonId());
396
+//
397
+//        Map<String, Object> result = new HashMap<>();
398
+//        result.put("token", token);
399
+//        result.put("person", taPerson);
400
+//
401
+//        return ResponseBean.success(result);
402
+//    }
403 403
 
404 404
     /**
405 405
      * 获取当前用户
@@ -490,6 +490,12 @@ public class TaPersonController extends BaseController {
490 490
         }
491 491
         if (!StringUtils.isEmpty(phone)){
492 492
             person.setTel(phone);
493
+            if(person.getPersonType().equals(CommConstant.PERSON_REALTY_CONSULTANT)){
494
+                TaUser user = taUserService.getById(person.getUserId());
495
+                user.setPhone(phone);
496
+                user.setLoginName(phone);
497
+                taUserService.updateById(user);
498
+            }
493 499
         }
494 500
         try{
495 501
             if(taPersonService.updateById(person)){

+ 1
- 1
src/main/java/com/huiju/estateagents/excel/ExcelRecommendCustomer.java View File

@@ -65,7 +65,7 @@ public class ExcelRecommendCustomer {
65 65
      * 审核状态名
66 66
      */
67 67
     @ColumnWidth(15)
68
-    @ExcelProperty(value = "审核状态", index = 7)
68
+    @ExcelProperty(value = "审核状态", index = 7)
69 69
     private String verifyStatusName;
70 70
 
71 71
 

+ 1
- 1
src/main/resources/application-dev.yml View File

@@ -6,7 +6,7 @@ spring:
6 6
   datasource:
7 7
     username: estateagents
8 8
     password: estateagents
9
-    url: jdbc:mysql://47.101.36.130:3306/estateagents?useUnicode=true&serverTimezone=CTT&characterEncoding=utf8&allowMultiQueries=true&autoReconnect=true&zeroDateTimeBehavior=convertToNull
9
+    url: jdbc:mysql://47.101.36.130:3306/estateagents?useUnicode=true&serverTimezone=GMT%2B8&characterEncoding=utf8&allowMultiQueries=true&autoReconnect=true&zeroDateTimeBehavior=convertToNull
10 10
     driver-class-name: com.mysql.cj.jdbc.Driver
11 11
     initial-size: 10 # 初始化连接数
12 12
     max-active: 20 # 最大连接数

+ 1
- 1
src/main/resources/mapper/TaRecommendCustomerMapper.xml View File

@@ -246,7 +246,7 @@ FROM
246 246
         if(a.sex = 1, '男',if(a.sex = 2, '女', '未知')) as sex,
247 247
         c.nickname as recommend,
248 248
         c.phone as recommendTel,
249
-        if(a.verify_status = 0, '未通过', if(a.verify_status = 1, '已通过', if(a.verify_status = 2, '已驳回', ''))) as verifyStatusName
249
+        if(a.verify_status = 0, '待审核', if(a.verify_status = 1, '已通过', if(a.verify_status = 2, '未通过', ''))) as verifyStatusName
250 250
         FROM
251 251
         ta_recommend_customer a
252 252
         LEFT JOIN ta_person c on a.recommend_person = c.person_id