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

+ 1
- 1
src/main/java/com/huiju/estateagents/center/taUser/controller/TaUserController.java 查看文件

@@ -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
 

+ 32
- 32
src/main/java/com/huiju/estateagents/controller/TaPersonController.java 查看文件

@@ -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
      * 获取当前用户