| | |
| | | |
| | | |
| | | import com.gkhy.exam.common.annotation.Log; |
| | | import com.gkhy.exam.common.annotation.RepeatSubmit; |
| | | import com.gkhy.exam.common.api.CommonResult; |
| | | import com.gkhy.exam.common.enums.BusinessType; |
| | | import com.gkhy.exam.system.domain.ExStudent; |
| | |
| | | import io.swagger.annotations.ApiImplicitParams; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.security.access.prepost.PreAuthorize; |
| | | import org.springframework.validation.annotation.Validated; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | |
| | | return CommonResult.success(studentService.selectStudentById(studentId)); |
| | | } |
| | | |
| | | @RepeatSubmit |
| | | @Log(title = "学员管理", businessType = BusinessType.INSERT) |
| | | @ApiOperation(value = "新增学员") |
| | | @PostMapping |
| | |
| | | return CommonResult.success(studentService.insertStudent(student)); |
| | | } |
| | | |
| | | @RepeatSubmit |
| | | @Log(title = "学员管理", businessType = BusinessType.UPDATE) |
| | | @ApiOperation(value = "编辑学员") |
| | | @PutMapping |
| | |
| | | return CommonResult.success(studentService.updateStudent(student)); |
| | | } |
| | | |
| | | @Log(title = "学员管理", businessType = BusinessType.UPDATE) |
| | | @RepeatSubmit |
| | | @Log(title = "学员管理", businessType = BusinessType.DELETE) |
| | | @ApiOperation(value = "删除学员") |
| | | @DeleteMapping(value = { "/{studentId}" }) |
| | | public CommonResult delete(@PathVariable(value = "studentId", required = true) Long studentId){ |
| | | return CommonResult.success(studentService.deleteStudentById(studentId)); |
| | | } |
| | | |
| | | @RepeatSubmit |
| | | @Log(title = "学员管理", businessType = BusinessType.UPDATE) |
| | | @ApiOperation(value = "重置密码") |
| | | @PutMapping(value = "/resetPwd") |