教授修改

This commit is contained in:
86182
2022-12-14 18:20:00 +08:00
parent 01bb604988
commit 5f83b179bd
3 changed files with 34 additions and 0 deletions

View File

@@ -272,6 +272,26 @@ public class TeacherApi extends ApiBaseController {
return success(teacher);
}
/**
* 修改
*
* @param teacher
* @return
*/
@PostMapping("/update-teacher")
public JsonResponse<TeacherVo> updateTeacher(@RequestBody Teacher teacher) {
if (teacher == null) {
return error("缺少必要参数");
}
try {
service.update(teacher);
} catch (XaskException e) {
return error(e.getMessage());
}
return success(teacher);
}
/**
* 删除
*

View File

@@ -59,6 +59,15 @@ public interface ITeacherService {
* @throws XaskException
*/
void update(TeacherVo entity) throws XaskException;
/**
* 修改
*
* @param entity
* @throws XaskException
*/
void update(Teacher entity);
/*
* 更新同步信息

View File

@@ -204,6 +204,11 @@ public class TeacherServiceImpl implements ITeacherService {
// accountService.update(account);
}
@Override
public void update(Teacher entity) {
dao.update(entity);
}
@Override
public void delete(String id) {
dao.deleteById(id);