Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gdtel-gztel-school-center
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
吴学德
gdtel-gztel-school-center
Commits
edf8c4a8
Commit
edf8c4a8
authored
Mar 31, 2020
by
彭祥礼
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
后台获取套餐信息和过学生ID查询学生信息的接口
parent
9ccb04e8
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
34 additions
and
4 deletions
+34
-4
new-user/src/main/java/com/winsun/controller/StartSelectController.java
+34
-4
No files found.
new-user/src/main/java/com/winsun/controller/StartSelectController.java
View file @
edf8c4a8
package
com
.
winsun
.
controller
;
package
com
.
winsun
.
controller
;
import
com.winsun.auth.core.common.model.ResponseData
;
import
com.winsun.auth.core.common.model.ResponseData
;
import
com.winsun.mapper.SchoolMapper
;
import
com.winsun.mapper.SchoolMapper
;
import
com.winsun.mapper.SchoolPackageMapper
;
import
lombok.extern.slf4j.Slf4j
;
import
lombok.extern.slf4j.Slf4j
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.util.CollectionUtils
;
import
org.springframework.util.CollectionUtils
;
import
org.springframework.util.StringUtils
;
import
org.springframework.util.StringUtils
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.*
;
import
org.springframework.web.bind.annotation.RequestParam
;
import
org.springframework.web.bind.annotation.RestController
;
import
java.util.List
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.Map
;
...
@@ -37,4 +35,36 @@ public class StartSelectController {
...
@@ -37,4 +35,36 @@ public class StartSelectController {
Map
<
String
,
Object
>
map
=
mapList
.
get
(
0
);
Map
<
String
,
Object
>
map
=
mapList
.
get
(
0
);
return
ResponseData
.
success
(
map
);
return
ResponseData
.
success
(
map
);
}
}
/**
*通过name和身份证查询学生信息
* @param name 用户名
* @param idCard 身份证号
* @return
*/
@ResponseBody
@RequestMapping
(
value
=
"checkStudent"
,
method
=
RequestMethod
.
POST
)
public
ResponseData
<
Map
<
String
,
Object
>>
checkStudent
(
String
stuId
,
String
name
,
String
idCard
){
Map
<
String
,
Object
>
studentMap
=
schoolMapper
.
selectStudentByNameAndIdCard
(
name
,
idCard
);
if
(
studentMap
==
null
||
studentMap
.
size
()
==
0
)
{
return
ResponseData
.
error
(
"该学生信息不存在!"
);
}
return
ResponseData
.
success
(
studentMap
,
"验证通过"
);
}
/**
*通过学生ID查询学生信息
* @param stuId 学生ID
* @return
*/
@ResponseBody
@RequestMapping
(
value
=
"getStuInfoById"
,
method
=
RequestMethod
.
POST
)
public
ResponseData
<
Map
<
String
,
Object
>>
getStuInfoById
(
String
stuId
){
Map
<
String
,
Object
>
studentMap
=
schoolMapper
.
getStuById
(
stuId
);
if
(
studentMap
==
null
||
studentMap
.
size
()
==
0
)
{
return
ResponseData
.
error
(
"该学生信息不存在!"
);
}
return
ResponseData
.
success
(
studentMap
,
"查询成功"
);
}
}
}
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