liujie
1 天以前 afb2bc8e77e086ebeb358915e12fad41dac78a6a
ruoyi-service/ruoyi-management/src/main/java/com/ruoyi/management/controller/TStudyController.java
@@ -20,6 +20,7 @@
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import javax.validation.Valid;
import java.util.List;
/**
@@ -56,10 +57,10 @@
    @ResponseBody
    public AjaxResult addStudySet(@RequestBody AddStudySetDTO dto) {
        System.err.println("后台"+dto);
        if(dto.getGame().getCount()>dto.getGame().getSubjectIds().split(",").length){
        if(dto.getDay()==6 && dto.getGame().getCount()>dto.getGame().getSubjectIds().split(",").length){
            return AjaxResult.error("超级听力选择题目数量不足");
        }
        if(dto.getGame().getAnswerCount()>dto.getGame().getSubjectIds().split(",").length){
        if(dto.getDay()==6 && dto.getGame().getAnswerCount()>dto.getGame().getSubjectIdsOne().split(",").length){
            return AjaxResult.error("超级记忆选择题目数量不足");
        }
        R<Object> objectR = studyClient.addStudySet(dto);
@@ -71,6 +72,20 @@
        return AjaxResult.success("保存成功");
    }
    @ApiOperation(value = "听图选音设置常规/示例", tags = {"后台-学习"})
    @PostMapping(value = "/setStudyType")
    @ResponseBody
    public AjaxResult setStudyType(@RequestBody @Valid SetStudyTypeDto dto) {
        R<Object> objectR = studyClient.setStudyType(dto);
        int code = objectR.getCode();
        if (code == 500){
            String string = objectR.getMsg().toString();
            return AjaxResult.error(string);
        }
        return AjaxResult.success("设置成功");
    }
    /**
     * 通过类型、周目、day查询学习配置
     * @return