教师信息没有的只是返回kid

This commit is contained in:
daihh
2023-01-13 10:44:21 +08:00
parent 227bea3b08
commit 9c1f7de05c

View File

@@ -241,8 +241,13 @@ public class TeacherApi extends ApiBaseController {
if(StringUtils.isBlank(id)){
return badRequest("参数异常");
}
Account a = accountService.get(id);
if(a==null) {
return badRequest("用户不对,数据错误,请联系管理员");
}
Teacher teacher = service.get(id);
Map<String,Object> rs=new HashMap<String,Object>();
rs.put("sysId",a.getSysId());
if(teacher!=null){
rs.put("id",id);
rs.put("photo",teacher.getPhoto());