Commit 86b643f6 by 彭祥礼

修改获取套餐信息和过学生ID查询学生信息 合并sql和方法,可以适用到数数库迁移

parent a6465285
......@@ -44,6 +44,7 @@ public class StartSelectController {
/**
*通过name和身份证查询学生信息
* @param stuId 学生ID
* @param name 用户名
* @param idCard 身份证号
* @return
......@@ -64,25 +65,9 @@ public class StartSelectController {
studentWrapper.addFilter("id_card = '"+idCard+"'");
}
List<Map<String, Object>> studentMap = studentMapper.selectMaps(studentWrapper);
//Map<String,Object> studentMap = schoolMapper.selectStudentByNameAndIdCard(name,idCard);
if (studentMap == null || studentMap.size() == 0) {
return ResponseData.error("该学生信息不存在!");
}
return ResponseData.success(studentMap.get(0),"验证通过");
}
/**
*通过学生ID查询学生信息
* @param stuId 学生ID
* @return
*/
@ResponseBody
@RequestMapping(value = "getStuInfoById", method = RequestMethod.POST)
public ResponseData<Map<String, Object>> getStuInfoById(String stuId){
Map<String,Object> studentMap = studentMapper.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