Compare commits

..

No commits in common. "53f6de63ce74054adbdcf1cb49b437b97d77f853" and "61e35598b373ac1a736d3198f4eeeecc732f13fa" have entirely different histories.

View File

@ -14,9 +14,7 @@ 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;
@ -31,7 +29,6 @@ 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;
@ -54,8 +51,6 @@ import org.apache.shiro.authz.annotation.RequiresPermissions;
public class AiolExamRecordController extends JeecgController<AiolExamRecord, IAiolExamRecordService> {
@Autowired
private IAiolExamRecordService aiolExamRecordService;
@Autowired
private IAiolExamAnswerService aiolExamAnswerService;
/**
* 分页列表查询
@ -106,7 +101,7 @@ public class AiolExamRecordController extends JeecgController<AiolExamRecord, IA
@AutoLog(value = "考试记录-编辑")
@Operation(summary="考试记录-编辑")
@RequiresPermissions("aiol:aiol_exam_record:edit")
@RequestMapping(value = "/edit", method = {RequestMethod.POST})
@RequestMapping(value = "/edit", method = {RequestMethod.PUT,RequestMethod.POST})
public Result<String> edit(@RequestBody AiolExamRecord aiolExamRecord) {
aiolExamRecordService.updateById(aiolExamRecord);
return Result.OK("编辑成功!");
@ -141,18 +136,6 @@ 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查询