|
@@ -7,10 +7,12 @@ import com.ynfy.buss.exam.userexamresult.service.IUserExamResultService;
|
|
|
import io.swagger.annotations.Api;
|
|
|
import io.swagger.annotations.ApiOperation;
|
|
|
import lombok.extern.slf4j.Slf4j;
|
|
|
+import org.apache.shiro.SecurityUtils;
|
|
|
import org.apache.shiro.authz.annotation.RequiresPermissions;
|
|
|
import org.jeecg.common.api.vo.Result;
|
|
|
import org.jeecg.common.aspect.annotation.AutoLog;
|
|
|
import org.jeecg.common.system.base.controller.JeecgController;
|
|
|
+import org.jeecg.common.system.vo.LoginUser;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.web.bind.annotation.*;
|
|
|
import org.springframework.web.servlet.ModelAndView;
|
|
@@ -154,4 +156,16 @@ public class UserExamResultController extends JeecgController<UserExamResult, IU
|
|
|
return super.importExcel(request, response, UserExamResult.class);
|
|
|
}
|
|
|
|
|
|
+ /**
|
|
|
+ * 获取用户考试成绩
|
|
|
+ *
|
|
|
+ * @param examId
|
|
|
+ * @return
|
|
|
+ */
|
|
|
+ @GetMapping(value = "/examScore")
|
|
|
+ public Result<?> examScore(@RequestParam(name = "examId") String examId) {
|
|
|
+ LoginUser user = (LoginUser) SecurityUtils.getSubject().getPrincipal();
|
|
|
+ return Result.ok(userExamResultService.examScore(user.getId(), examId));
|
|
|
+ }
|
|
|
+
|
|
|
}
|