|
@@ -39,30 +39,30 @@ public class TaPersonController extends BaseController {
|
39
|
39
|
@Autowired
|
40
|
40
|
public ITaPersonService iTaPersonService;
|
41
|
41
|
|
42
|
|
- @PostMapping("/ma/login")
|
43
|
|
- public ResponseBean login(String code) {
|
44
|
|
-
|
45
|
|
- String openid = "";
|
46
|
|
-
|
47
|
|
-
|
48
|
|
- TaPerson taPerson = iTaPersonService.getByOpenId(openid);
|
49
|
|
-
|
50
|
|
-
|
51
|
|
- if (null == taPerson) {
|
52
|
|
- taPerson = new TaPerson();
|
53
|
|
- taPerson.setOpenid(openid);
|
54
|
|
- iTaPersonService.save(taPerson);
|
55
|
|
-
|
56
|
|
- }
|
57
|
|
-
|
58
|
|
-
|
59
|
|
- Map<String, Object> claims = new HashMap<>();
|
60
|
|
- claims.put("personId", taPerson.getPersonId());
|
61
|
|
- String token = JWTUtils.encode(claims);
|
62
|
|
- taPerson.setToken(token);
|
63
|
|
-
|
64
|
|
- return ResponseBean.success(taPerson);
|
65
|
|
- }
|
|
42
|
+
|
|
43
|
+
|
|
44
|
+
|
|
45
|
+
|
|
46
|
+
|
|
47
|
+
|
|
48
|
+
|
|
49
|
+
|
|
50
|
+
|
|
51
|
+
|
|
52
|
+
|
|
53
|
+
|
|
54
|
+
|
|
55
|
+
|
|
56
|
+
|
|
57
|
+
|
|
58
|
+
|
|
59
|
+
|
|
60
|
+
|
|
61
|
+
|
|
62
|
+
|
|
63
|
+
|
|
64
|
+
|
|
65
|
+
|
66
|
66
|
|
67
|
67
|
|
68
|
68
|
|