kongzy
2024-09-14 f0f00e9ba8a755e4317e029d73b69a92ad9f9df1
exam-admin/src/main/java/com/gkhy/exam/admin/controller/web/ExStudentController.java
文件名从 exam-admin/src/main/java/com/gkhy/exam/admin/web/ExStudentController.java 修改
@@ -1,4 +1,4 @@
package com.gkhy.exam.admin.web;
package com.gkhy.exam.admin.controller.web;
import com.gkhy.exam.common.annotation.Log;
@@ -12,8 +12,11 @@
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.*;
import java.util.Map;
/**
 * <p>
@@ -92,6 +95,27 @@
    @ApiOperation(value = "校验身份证是否为一")
    @PostMapping(value = "/checkIdNoUnique")
    public CommonResult checkIdNoUnique(@RequestBody ExStudent student){
        return CommonResult.success(studentService.checkIdNoUnique(student));
        return CommonResult.success(studentService.checkIdNoUnique(student.getIdNo()));
    }
    @ApiOperation(value = "学员企业归属变更")
    @ApiImplicitParams({
            @ApiImplicitParam(paramType = "body", name = "studentId", dataType = "long", required = true, value = "学员id"),
            @ApiImplicitParam(paramType = "body", name = "companyId", dataType = "long", required = true, value = "公司id")
    })
    @PreAuthorize("hasAnyAuthority('train:exam:system','train:exam:company')")
    @PostMapping(value = "/changeStudentCompany")
    public CommonResult changeStudentCompany(@RequestBody Map<String,Long> bodyMap){
        studentService.changeStudentCompany(bodyMap);
        return CommonResult.success();
    }
    @ApiOperation(value = "学员培训记录")
    @GetMapping(value = "/trainRecord")
    public CommonResult trainRecord(Long studentId){
        return CommonResult.success(studentService.trainRecord(studentId));
    }
}