Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
H
HaiNaAIFaceToFace
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
霍传世
HaiNaAIFaceToFace
Commits
b8dbfb9f
Commit
b8dbfb9f
authored
Jan 15, 2025
by
霍传世
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
HaiNaAi测试小程序
parent
e2a89fa2
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
41 additions
and
1 deletion
+41
-1
src/main/java/com/yuda/hainafacetofaceai/controller/LoginController.java
...om/yuda/hainafacetofaceai/controller/LoginController.java
+41
-1
No files found.
src/main/java/com/yuda/hainafacetofaceai/controller/LoginController.java
View file @
b8dbfb9f
...
...
@@ -26,7 +26,7 @@ public class LoginController {
@PostMapping
public
ResponseEntity
LoginGo
(
@RequestBody
ExamStudent
examStudent
){
if
(
(
examStudent
.
getZkzNum
().
equals
(
"111"
)&&
examStudent
.
getIdCard
().
equals
(
"111"
))||(
examStudent
.
getZkzNum
().
equals
(
"222"
)&&
examStudent
.
getIdCard
().
equals
(
"222"
))||(
examStudent
.
getZkzNum
().
equals
(
"333"
)&&
examStudent
.
getIdCard
().
equals
(
"333"
)
)){
if
(
examStudent
.
getZkzNum
().
equals
(
"111"
)&&
examStudent
.
getIdCard
().
equals
(
"111"
)){
redisTemplate
.
opsForValue
().
set
(
"51096606163"
,
new
JSONObject
(
examStudent
).
toString
(),
2
*
60
*
60
,
TimeUnit
.
SECONDS
);
JSONObject
jsonObject
=
new
JSONObject
();
jsonObject
.
put
(
"Token"
,
"51096606163"
);
...
...
@@ -34,6 +34,46 @@ public class LoginController {
jsonObject
.
put
(
"message"
,
"登录成功"
);
return
ResponseEntity
.
ok
(
jsonObject
.
toString
());
}
if
(
examStudent
.
getZkzNum
().
equals
(
"222"
)&&
examStudent
.
getIdCard
().
equals
(
"222"
)){
redisTemplate
.
opsForValue
().
set
(
"51069292339"
,
new
JSONObject
(
examStudent
).
toString
(),
2
*
60
*
60
,
TimeUnit
.
SECONDS
);
JSONObject
jsonObject
=
new
JSONObject
();
jsonObject
.
put
(
"Token"
,
"51069292339"
);
jsonObject
.
put
(
"code"
,
200
);
jsonObject
.
put
(
"message"
,
"登录成功"
);
return
ResponseEntity
.
ok
(
jsonObject
.
toString
());
}
if
(
examStudent
.
getZkzNum
().
equals
(
"333"
)&&
examStudent
.
getIdCard
().
equals
(
"333"
)){
redisTemplate
.
opsForValue
().
set
(
"51027367515"
,
new
JSONObject
(
examStudent
).
toString
(),
2
*
60
*
60
,
TimeUnit
.
SECONDS
);
JSONObject
jsonObject
=
new
JSONObject
();
jsonObject
.
put
(
"Token"
,
"51027367515"
);
jsonObject
.
put
(
"code"
,
200
);
jsonObject
.
put
(
"message"
,
"登录成功"
);
return
ResponseEntity
.
ok
(
jsonObject
.
toString
());
}
if
(
examStudent
.
getZkzNum
().
equals
(
"444"
)&&
examStudent
.
getIdCard
().
equals
(
"444"
)){
redisTemplate
.
opsForValue
().
set
(
"51010817155"
,
new
JSONObject
(
examStudent
).
toString
(),
2
*
60
*
60
,
TimeUnit
.
SECONDS
);
JSONObject
jsonObject
=
new
JSONObject
();
jsonObject
.
put
(
"Token"
,
"51010817155"
);
jsonObject
.
put
(
"code"
,
200
);
jsonObject
.
put
(
"message"
,
"登录成功"
);
return
ResponseEntity
.
ok
(
jsonObject
.
toString
());
}
if
(
examStudent
.
getZkzNum
().
equals
(
"555"
)&&
examStudent
.
getIdCard
().
equals
(
"555"
)){
redisTemplate
.
opsForValue
().
set
(
"51021560057"
,
new
JSONObject
(
examStudent
).
toString
(),
2
*
60
*
60
,
TimeUnit
.
SECONDS
);
JSONObject
jsonObject
=
new
JSONObject
();
jsonObject
.
put
(
"Token"
,
"51021560057"
);
jsonObject
.
put
(
"code"
,
200
);
jsonObject
.
put
(
"message"
,
"登录成功"
);
return
ResponseEntity
.
ok
(
jsonObject
.
toString
());
}
if
(
examStudent
.
getZkzNum
().
equals
(
"666"
)&&
examStudent
.
getIdCard
().
equals
(
"666"
)){
redisTemplate
.
opsForValue
().
set
(
"51007580358"
,
new
JSONObject
(
examStudent
).
toString
(),
2
*
60
*
60
,
TimeUnit
.
SECONDS
);
JSONObject
jsonObject
=
new
JSONObject
();
jsonObject
.
put
(
"Token"
,
"51007580358"
);
jsonObject
.
put
(
"code"
,
200
);
jsonObject
.
put
(
"message"
,
"登录成功"
);
return
ResponseEntity
.
ok
(
jsonObject
.
toString
());
}
JSONObject
jsonObject
=
new
JSONObject
();
jsonObject
.
put
(
"code"
,
500
);
jsonObject
.
put
(
"message"
,
"账号密码错误"
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment