Commit edf8c4a8 by 彭祥礼

后台获取套餐信息和过学生ID查询学生信息的接口

parent 9ccb04e8
package com.winsun.controller;
import com.winsun.auth.core.common.model.ResponseData;
import com.winsun.mapper.SchoolMapper;
import com.winsun.mapper.SchoolPackageMapper;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.util.CollectionUtils;
import org.springframework.util.StringUtils;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.bind.annotation.*;
import java.util.List;
import java.util.Map;
......@@ -37,4 +35,36 @@ public class StartSelectController {
Map<String, Object> map = mapList.get(0);
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,"查询成功");
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment