|
@@ -1,5 +1,6 @@
|
|
|
package com.miaxis.app.controller.question;
|
|
|
|
|
|
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
|
|
import com.miaxis.common.constant.Constants;
|
|
|
|
|
|
import java.util.ArrayList;
|
|
@@ -125,4 +126,21 @@ public class QuestionWrongController extends BaseController{
|
|
|
){
|
|
|
return toResponse(questionWrongService.removeByIds(Arrays.asList(ids)) ? 1 : 0);
|
|
|
}
|
|
|
+
|
|
|
+
|
|
|
+ @Log(title = "wrongQuestion", businessType = BusinessTypeEnum.DELETE)
|
|
|
+ @DeleteMapping("/cancel/{questionId}")
|
|
|
+ @ApiOperation("删除错题")
|
|
|
+ public Response<Integer> remove(
|
|
|
+ @ApiParam(name = "questionId", value = "问题id", required = true)
|
|
|
+ @PathVariable String questionId
|
|
|
+ ){
|
|
|
+ Long userId = SecurityUtils.getLoginUser().getStudent().getId();
|
|
|
+ QueryWrapper<QuestionWrong> queryWrapper= new QueryWrapper<QuestionWrong>();
|
|
|
+ queryWrapper.eq("user_id",userId);
|
|
|
+ queryWrapper.eq("question_id",questionId);
|
|
|
+ questionWrongService.remove(queryWrapper);
|
|
|
+ return Response.success();
|
|
|
+
|
|
|
+ }
|
|
|
}
|