package com.gkhy.exam.admin.controller.app;
|
|
|
import com.gkhy.exam.common.api.CommonResult;
|
import com.gkhy.exam.system.domain.ExStudent;
|
import com.gkhy.exam.system.service.ExStudentService;
|
import io.swagger.annotations.Api;
|
import io.swagger.annotations.ApiOperation;
|
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.security.access.prepost.PreAuthorize;
|
import org.springframework.web.bind.annotation.*;
|
|
/**
|
* <p>
|
* 学员前端控制器
|
* </p>
|
*
|
* @author kzy
|
* @since 2024-06-06 13:53:17
|
*/
|
@Api(tags = "APP学员前端控制器")
|
@RestController
|
@RequestMapping("/app/student")
|
public class AppStudentController {
|
@Autowired
|
private ExStudentService studentService;
|
|
@PreAuthorize("hasAnyAuthority('train:exam:student')")
|
@ApiOperation(value = "根据id获取学员信息")
|
@GetMapping(value = { "/{studentId}" })
|
public CommonResult getStudentInfo(@PathVariable(value = "studentId", required = true) Long studentId)
|
{
|
return CommonResult.success(studentService.selectStudentById(studentId));
|
}
|
|
@PreAuthorize("hasAnyAuthority('train:exam:student')")
|
@ApiOperation(value = "重置密码")
|
@PutMapping(value = "/resetPwd")
|
public CommonResult restPwd(@RequestBody ExStudent student){
|
studentService.resetUserPwd(student);
|
return CommonResult.success();
|
}
|
}
|