|
|
|
@ -31,6 +31,7 @@ import org.springframework.web.bind.annotation.*;
|
|
|
|
|
import org.springframework.web.servlet.ModelAndView;
|
|
|
|
|
|
|
|
|
|
import javax.servlet.http.HttpServletResponse;
|
|
|
|
|
import javax.validation.constraints.NotBlank;
|
|
|
|
|
import javax.validation.constraints.NotNull;
|
|
|
|
|
import java.math.BigDecimal;
|
|
|
|
|
import java.util.LinkedHashMap;
|
|
|
|
@ -202,13 +203,30 @@ public class TeacherOpenCourseQuestionLogController {
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 批量收藏题目 / 取消收藏
|
|
|
|
|
* @param teacherOpenCourseQuestionLogIds 题目日志ID
|
|
|
|
|
* @param isTuck 是否收藏:true, false
|
|
|
|
|
* @param questionSettingId 题目配置ID
|
|
|
|
|
* @param questionSnapshotIds 题目快照IDs
|
|
|
|
|
* @param isTuck 是否收藏:true, false
|
|
|
|
|
* @return
|
|
|
|
|
*/
|
|
|
|
|
@PostMapping(API + "/tuck.do")
|
|
|
|
|
public JsonResult tuck(String questionSettingId, String questionSnapshotIds, String teacherOpenCourseQuestionLogIds, boolean isTuck) {
|
|
|
|
|
teacherOpenCourseQuestionLogService.tuck(teacherOpenCourseQuestionLogIds, isTuck);
|
|
|
|
|
public JsonResult tuck(Long questionSettingId, String questionSnapshotIds, boolean isTuck) {
|
|
|
|
|
Student student = getStudent();
|
|
|
|
|
Assert.notNull(student, "该接口只能学生操作!");
|
|
|
|
|
teacherOpenCourseQuestionLogService.tuck(questionSettingId, questionSnapshotIds, isTuck, student);
|
|
|
|
|
return JsonResult.success();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 批量收藏题目 / 取消收藏
|
|
|
|
|
* @param teacherOpenCourseQuestionLogIds 题目日志IDs
|
|
|
|
|
* @param isTuck 是否收藏:true, false
|
|
|
|
|
* @return
|
|
|
|
|
*/
|
|
|
|
|
@PostMapping(API + "/tuckByLogIds.do")
|
|
|
|
|
public JsonResult tuck(@NotBlank(message = "题目日志IDs不能为空!") String teacherOpenCourseQuestionLogIds, boolean isTuck) {
|
|
|
|
|
Student student = getStudent();
|
|
|
|
|
Assert.notNull(student, "该接口只能学生操作!");
|
|
|
|
|
teacherOpenCourseQuestionLogService.tuckByLogIds(teacherOpenCourseQuestionLogIds, isTuck);
|
|
|
|
|
return JsonResult.success();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -219,7 +237,7 @@ public class TeacherOpenCourseQuestionLogController {
|
|
|
|
|
@GetMapping(API + "/tuckList.do")
|
|
|
|
|
public JsonResult tuckList(PageParam pageParam) {
|
|
|
|
|
Student student = getStudent();
|
|
|
|
|
Assert.notNull(student, "非学生身份,无法获取题目分析!");
|
|
|
|
|
Assert.notNull(student, "非学生身份,无法获取收藏的题目!");
|
|
|
|
|
PageQuery query = new PageQuery(pageParam.getPage().longValue(), pageParam.getLimit().longValue());
|
|
|
|
|
query.setPara("studentId", student.getStudentId());
|
|
|
|
|
query.setPara("teacherOpenCourseQuestionLogStatus", 1);
|
|
|
|
|