Merge branch 'dev2' of http://110.42.96.64:19890/GoCo/OL-LearnPlatform-Backend into dev2
merge
This commit is contained in:
commit
341dab35d0
@ -14,7 +14,9 @@ import org.jeecg.common.api.vo.Result;
|
||||
import org.jeecg.common.system.query.QueryGenerator;
|
||||
import org.jeecg.common.system.query.QueryRuleEnum;
|
||||
import org.jeecg.common.util.oConvertUtils;
|
||||
import org.jeecg.modules.aiol.entity.AiolExamAnswer;
|
||||
import org.jeecg.modules.aiol.entity.AiolExamRecord;
|
||||
import org.jeecg.modules.aiol.service.IAiolExamAnswerService;
|
||||
import org.jeecg.modules.aiol.service.IAiolExamRecordService;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
@ -29,6 +31,7 @@ import org.jeecgframework.poi.excel.entity.ImportParams;
|
||||
import org.jeecgframework.poi.excel.view.JeecgEntityExcelView;
|
||||
import org.jeecg.common.system.base.controller.JeecgController;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
import org.springframework.web.multipart.MultipartHttpServletRequest;
|
||||
@ -51,6 +54,8 @@ import org.apache.shiro.authz.annotation.RequiresPermissions;
|
||||
public class AiolExamRecordController extends JeecgController<AiolExamRecord, IAiolExamRecordService> {
|
||||
@Autowired
|
||||
private IAiolExamRecordService aiolExamRecordService;
|
||||
@Autowired
|
||||
private IAiolExamAnswerService aiolExamAnswerService;
|
||||
|
||||
/**
|
||||
* 分页列表查询
|
||||
@ -101,7 +106,7 @@ public class AiolExamRecordController extends JeecgController<AiolExamRecord, IA
|
||||
@AutoLog(value = "考试记录-编辑")
|
||||
@Operation(summary="考试记录-编辑")
|
||||
@RequiresPermissions("aiol:aiol_exam_record:edit")
|
||||
@RequestMapping(value = "/edit", method = {RequestMethod.PUT,RequestMethod.POST})
|
||||
@RequestMapping(value = "/edit", method = {RequestMethod.POST})
|
||||
public Result<String> edit(@RequestBody AiolExamRecord aiolExamRecord) {
|
||||
aiolExamRecordService.updateById(aiolExamRecord);
|
||||
return Result.OK("编辑成功!");
|
||||
@ -136,6 +141,18 @@ public class AiolExamRecordController extends JeecgController<AiolExamRecord, IA
|
||||
this.aiolExamRecordService.removeByIds(Arrays.asList(ids.split(",")));
|
||||
return Result.OK("批量删除成功!");
|
||||
}
|
||||
|
||||
|
||||
@AutoLog(value = "考试记录-重新练习")
|
||||
@Operation(summary="考试记录-重新练习")
|
||||
@RequiresPermissions("aiol:aiol_exam_record:edit")
|
||||
@Transactional
|
||||
@RequestMapping(value = "/rePractice", method = {RequestMethod.PUT,RequestMethod.POST})
|
||||
public Result<String> rePractice(@RequestParam String userId,@RequestParam String examId) {
|
||||
aiolExamRecordService.remove(new QueryWrapper<AiolExamRecord>().eq("user_id", userId).eq("exam_id", examId));
|
||||
aiolExamAnswerService.remove(new QueryWrapper<AiolExamAnswer>().eq("user_id", userId).eq("exam_id", examId));
|
||||
return Result.OK("请返回重新练习一次吧!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过id查询
|
||||
|
Loading…
x
Reference in New Issue
Block a user