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