diff --git a/src/main/java/com/sztzjy/resource_center/controller/CaseController.java b/src/main/java/com/sztzjy/resource_center/controller/CaseController.java index 1e5f3e4..150d6cf 100644 --- a/src/main/java/com/sztzjy/resource_center/controller/CaseController.java +++ b/src/main/java/com/sztzjy/resource_center/controller/CaseController.java @@ -44,7 +44,7 @@ public class CaseController { @ApiOperation("案例题新增") @PostMapping("insertCase") public ResultEntity insertCase(@ApiParam("目前二级三级ID可以为空,来源和题型要传,上架状态传true") @RequestBody SysCaseQuestion sysCaseQuestion) { - if (!("1").equals(sysCaseQuestion.getType())) { + if (("3").equals(sysCaseQuestion.getType())) { return new ResultEntity<>(HttpStatus.BAD_REQUEST, "题型错误!"); } if (StringUtils.isBlank(sysCaseQuestion.getOneId())) { //todo 目前二级三级ID可以为空 @@ -67,17 +67,19 @@ public class CaseController { String uuid = IdUtil.randomUUID(); sysCaseQuestion.setCaseId(uuid); sysCaseQuestion.setCreateTime(new Date()); + sysCaseQuestion.setUnmountStatus(false); caseQuestionMapper.insert(sysCaseQuestion); //新增绑定关系 SysTopicAndCourse sysTopicAndCourse = new SysTopicAndCourse(); + sysTopicAndCourse.setId(IdUtil.randomUUID()); sysTopicAndCourse.setTopicType("1"); sysTopicAndCourse.setTopicId(uuid); sysTopicAndCourse.setOneId(sysCaseQuestion.getOneId()); if (StringUtils.isNotBlank(sysCaseQuestion.getTwoId())) { sysTopicAndCourse.setTwoId(sysCaseQuestion.getTwoId()); } - if (StringUtils.isNotBlank(sysCaseQuestion.getThree())) { - sysTopicAndCourse.setThreeId(sysCaseQuestion.getThree()); + if (StringUtils.isNotBlank(sysCaseQuestion.getThreeId())) { + sysTopicAndCourse.setThreeId(sysCaseQuestion.getThreeId()); } topicAndCourseMapper.insert(sysTopicAndCourse); return new ResultEntity<>(HttpStatus.OK, "新增成功!"); @@ -89,8 +91,8 @@ public class CaseController { @PostMapping("selectCaseByConditions") public ResultEntity> selectCaseByConditions(@RequestParam Integer index, @RequestParam Integer size, - @RequestParam String title, - @RequestParam String oneId) { + @RequestParam(required = false) String title, + @RequestParam(required = false) String oneId) { PageHelper.startPage(index, size); List list = caseQuestionMapper.selectCaseByConditions(title, oneId); PageInfo pageInfo = new PageInfo(list); diff --git a/src/main/java/com/sztzjy/resource_center/controller/CourseConfigController.java b/src/main/java/com/sztzjy/resource_center/controller/CourseConfigController.java index 8c890e3..0554a35 100644 --- a/src/main/java/com/sztzjy/resource_center/controller/CourseConfigController.java +++ b/src/main/java/com/sztzjy/resource_center/controller/CourseConfigController.java @@ -127,12 +127,15 @@ public class CourseConfigController { @ApiOperation("课程配置/资源列表展示") @PostMapping("selectResourceByIDAndSource") public ResultEntity> selectResource(@ApiParam("课程ID") @RequestParam String oneID, - @ApiParam("章ID") @RequestParam String twoID, - @ApiParam("节ID") @RequestParam String threeID, + @ApiParam("章ID") @RequestParam(required = false) String twoID, + @ApiParam("节ID") @RequestParam(required = false) String threeID, @RequestParam(required = false) String source, //子系统调用时传 @RequestParam Integer index, @RequestParam Integer size) { List list = sysResourceAndCourseMapper.selectResourceId(oneID, twoID, threeID); + if (list == null || list.isEmpty()) { + return new ResultEntity>(new PageInfo<>()); + } SysResourceExample example = new SysResourceExample(); SysResourceExample.Criteria criteria = example.createCriteria(); criteria.andResourceIdIn(list); @@ -141,7 +144,7 @@ public class CourseConfigController { List sources = Arrays.asList(source, "内置"); criteria.andSourceIn(sources); } - example.setOrderByClause("createTime ASC"); + example.setOrderByClause("create_time ASC"); List sysResources = sysResourceMapper.selectByExample(example); PageInfo pageInfo = PageUtil.pageHelper(sysResources, index, size); return new ResultEntity>(pageInfo); diff --git a/src/main/java/com/sztzjy/resource_center/controller/TopicResourceController.java b/src/main/java/com/sztzjy/resource_center/controller/TopicResourceController.java index ae25de4..57d298f 100644 --- a/src/main/java/com/sztzjy/resource_center/controller/TopicResourceController.java +++ b/src/main/java/com/sztzjy/resource_center/controller/TopicResourceController.java @@ -12,17 +12,24 @@ import com.sztzjy.resource_center.entity.dto.SysObjectiveQuestionsDto; import com.sztzjy.resource_center.mapper.SysObjectiveQuestionsMapper; import com.sztzjy.resource_center.mapper.SysTopicAndCourseMapper; import com.sztzjy.resource_center.util.ResultEntity; +import com.sztzjy.resource_center.util.file.IFileUtil; import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; import io.swagger.annotations.ApiParam; import org.apache.commons.lang3.StringUtils; +import org.apache.poi.openxml4j.exceptions.InvalidFormatException; +import org.apache.poi.ss.usermodel.*; import org.springframework.beans.BeanUtils; import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.beans.factory.annotation.Value; import org.springframework.http.HttpStatus; import org.springframework.web.bind.annotation.*; +import org.springframework.web.multipart.MultipartFile; -import java.util.Date; -import java.util.List; +import javax.servlet.http.HttpServletResponse; +import java.io.IOException; +import java.math.BigDecimal; +import java.util.*; /** * @Author xcj @@ -37,6 +44,10 @@ public class TopicResourceController { private SysObjectiveQuestionsMapper sysObjectiveQuestionMapper; @Autowired private SysTopicAndCourseMapper sysTopicAndCourseMapper; + @Autowired + IFileUtil fileUtil; + @Value("${file.path}") + private String filePath; @ApiOperation("新增单个试题") //新增 题干不允许重复 @PostMapping("addTopic") @@ -75,6 +86,7 @@ public class TopicResourceController { String uuid = IdUtil.randomUUID(); objectiveQuestion.setObjectiveId(uuid); objectiveQuestion.setCreateTime(new Date()); + objectiveQuestion.setIsDelete(false); sysObjectiveQuestionMapper.insert(objectiveQuestion); //新增题库关系表 @@ -93,14 +105,19 @@ public class TopicResourceController { return new ResultEntity<>(HttpStatus.OK, "新增题目成功!"); } - @ApiOperation("本地excel导入试题") //todo 模板暂定,可以复用皖西的导入 + @AnonymousAccess + @ApiOperation("本地excel导入试题") @PostMapping("importTopicByLocal") - private ResultEntity importTopicByLocal() { - return null; + private ResultEntity importTopicByLocal(@RequestParam MultipartFile file, + @RequestParam String source) throws IOException, InvalidFormatException { + if (file == null) { + return new ResultEntity<>(HttpStatus.BAD_REQUEST, "导入文件不能为空"); + } + return insertObjectiveByExcel(file, source); } - @ApiOperation("批量导入") //理解为批量添加已有资源的绑定关系 + @ApiOperation("资源中心批量导入") //理解为批量添加已有资源的绑定关系 @PostMapping("importTopic") private ResultEntity importTopic(@RequestBody List list) { for (SysTopicAndCourse sysTopicAndCourse : list) { @@ -123,15 +140,24 @@ public class TopicResourceController { return new ResultEntity<>(HttpStatus.OK, "添加成功!"); } + //客观题导入模板下载 + @GetMapping("downloadResource") + @ApiOperation("客观题导入模板下载") + @AnonymousAccess + public void downloadResource(HttpServletResponse response) { + fileUtil.download(response, "客观题导入模板.xlsx", filePath); + } + + @AnonymousAccess @ApiOperation("条件查询") @PostMapping("selectTopicByConditions") //todo 关于老师删除的题库如何查询 private ResultEntity> selectTopicByConditions(@RequestParam Integer index, @RequestParam Integer size, @RequestParam(required = false) String oneID, - @RequestParam (required = false)String twoID, - @RequestParam (required = false)String threeID, - @ApiParam("题干") @RequestParam (required = false)String content) { + @RequestParam(required = false) String twoID, + @RequestParam(required = false) String threeID, + @ApiParam("题干") @RequestParam(required = false) String content) { PageHelper.startPage(index, size); List list = sysObjectiveQuestionMapper.selectTopicByConditions(oneID, twoID, threeID, content); PageInfo pageInfo = new PageInfo(list); @@ -143,7 +169,7 @@ public class TopicResourceController { @ApiOperation("编辑") @PostMapping("updateTopic") private ResultEntity updateTopic(@ApiParam("修改绑定关系需要传topicAndCourseId") @RequestParam SysObjectiveQuestionsDto dto) { - if (dto.getInputType().equals("0")) { //老师新增的不能编辑 + if (!dto.getSource().equals("管理员")) { //老师新增的不能编辑 SysTopicAndCourseExample example = new SysTopicAndCourseExample(); example.createCriteria().andTopicIdEqualTo(dto.getObjectiveId()); List sysTopicAndCourses = sysTopicAndCourseMapper.selectByExample(example); @@ -184,4 +210,82 @@ public class TopicResourceController { sysObjectiveQuestionMapper.deleteByPrimaryKey(id); return new ResultEntity<>(HttpStatus.OK, "成功删除!"); } + + + //如果是内置增加 则需要提供课程和章节信息 + //如果是老师增加 则只需要提供课程信息 + public ResultEntity insertObjectiveByExcel(MultipartFile file, String source) throws IOException, InvalidFormatException { + List objectiveQuestionList = new ArrayList<>(); + Workbook workbook = WorkbookFactory.create(file.getInputStream()); + Sheet sheet = workbook.getSheetAt(0); + + // 迭代每一行 + Iterator iterator = sheet.iterator(); + iterator.next(); + while (iterator.hasNext()) { + Row row = iterator.next(); + + /*解析列,下标从0开始*/ + Cell cell0 = row.getCell(0); + Cell cell1 = row.getCell(1); + Cell cell2 = row.getCell(2); + Cell cell3 = row.getCell(3); + Cell cell4 = row.getCell(4); + Cell cell5 = row.getCell(5); + Cell cell6 = row.getCell(6); + Cell cell7 = row.getCell(7); + Cell cell8 = row.getCell(8); + Cell cell9 = row.getCell(9); + //判断题的BCDE选项和解析可能为空 + if (cell0 == null || cell1 == null || cell2 == null || cell6 == null || cell7 == null || cell9 == null) { + return new ResultEntity<>(HttpStatus.BAD_REQUEST, "必填项不能为空"); + } + + String content = this.getCellValue(cell0);//题干 + String a = this.getCellValue(cell1); //选项A + String b = this.getCellValue(cell2);//选项B + String type = this.getCellValue(cell6);//题型 + String answer = this.getCellValue(cell7);//答案 + String score = this.getCellValue(cell9);//分值 + String c = cell3 != null ? this.getCellValue(cell3) : null; + String d = cell4 != null ? this.getCellValue(cell4) : null; + String e = cell5 != null ? this.getCellValue(cell5) : null; + String analyze = cell8 != null ? this.getCellValue(cell8) : null; + + + SysObjectiveQuestions obj = new SysObjectiveQuestions(); + obj.setObjectiveId(String.valueOf(UUID.randomUUID())); + obj.setContent(content); + obj.setType(type); + obj.setSource(source); + obj.setQuestionA(a); + obj.setQuestionB(b); + obj.setQuestionC(c); + obj.setQuestionD(d); + obj.setQuestionE(e); + obj.setAnswer(answer); + obj.setAnalysis(analyze); + obj.setScore(BigDecimal.valueOf(Integer.parseInt(score))); + obj.setCreateTime(new Date()); + obj.setIsDelete(false); + objectiveQuestionList.add(obj); + } + int result = sysObjectiveQuestionMapper.insertBatch(objectiveQuestionList); + if (result > 0) { + return new ResultEntity<>(HttpStatus.OK, "批量导入成功!"); + } else { + return new ResultEntity<>(HttpStatus.INTERNAL_SERVER_ERROR, "批量导入失败,请联系管理员!"); + } + } + + + public String getCellValue(Cell cell) { + if (cell.getCellType() == Cell.CELL_TYPE_BOOLEAN) { + return String.valueOf(cell.getBooleanCellValue()); + } else if (cell.getCellType() == Cell.CELL_TYPE_NUMERIC) { + Double d = cell.getNumericCellValue(); + return String.valueOf(d.intValue()); + } + return String.valueOf(cell.getStringCellValue()); + } } diff --git a/src/main/java/com/sztzjy/resource_center/entity/SysCaseQuestion.java b/src/main/java/com/sztzjy/resource_center/entity/SysCaseQuestion.java index 2a7eed2..159de42 100644 --- a/src/main/java/com/sztzjy/resource_center/entity/SysCaseQuestion.java +++ b/src/main/java/com/sztzjy/resource_center/entity/SysCaseQuestion.java @@ -16,7 +16,7 @@ public class SysCaseQuestion { @ApiModelProperty("题目标题") private String title; - @ApiModelProperty("数据集地址 /用,隔开") + @ApiModelProperty("数据集地址 用 ,隔开") private String resourceData; @ApiModelProperty("来源 schoolid/内置") @@ -28,11 +28,17 @@ public class SysCaseQuestion { @ApiModelProperty("一级目录ID") private String oneId; + private String oneName; + @ApiModelProperty("二级目录ID") private String twoId; + private String twoName; + @ApiModelProperty("三级目录ID") - private String three; + private String threeId; + + private String threeName; @ApiModelProperty("上下架状态") private Boolean unmountStatus; @@ -94,6 +100,14 @@ public class SysCaseQuestion { this.oneId = oneId == null ? null : oneId.trim(); } + public String getOneName() { + return oneName; + } + + public void setOneName(String oneName) { + this.oneName = oneName == null ? null : oneName.trim(); + } + public String getTwoId() { return twoId; } @@ -102,12 +116,28 @@ public class SysCaseQuestion { this.twoId = twoId == null ? null : twoId.trim(); } - public String getThree() { - return three; + public String getTwoName() { + return twoName; + } + + public void setTwoName(String twoName) { + this.twoName = twoName == null ? null : twoName.trim(); + } + + public String getThreeId() { + return threeId; + } + + public void setThreeId(String threeId) { + this.threeId = threeId == null ? null : threeId.trim(); + } + + public String getThreeName() { + return threeName; } - public void setThree(String three) { - this.three = three == null ? null : three.trim(); + public void setThreeName(String threeName) { + this.threeName = threeName == null ? null : threeName.trim(); } public Boolean getUnmountStatus() { diff --git a/src/main/java/com/sztzjy/resource_center/entity/SysCaseQuestionExample.java b/src/main/java/com/sztzjy/resource_center/entity/SysCaseQuestionExample.java index 6b7f654..1654ffa 100644 --- a/src/main/java/com/sztzjy/resource_center/entity/SysCaseQuestionExample.java +++ b/src/main/java/com/sztzjy/resource_center/entity/SysCaseQuestionExample.java @@ -525,6 +525,76 @@ public class SysCaseQuestionExample { return (Criteria) this; } + public Criteria andOneNameIsNull() { + addCriterion("one_name is null"); + return (Criteria) this; + } + + public Criteria andOneNameIsNotNull() { + addCriterion("one_name is not null"); + return (Criteria) this; + } + + public Criteria andOneNameEqualTo(String value) { + addCriterion("one_name =", value, "oneName"); + return (Criteria) this; + } + + public Criteria andOneNameNotEqualTo(String value) { + addCriterion("one_name <>", value, "oneName"); + return (Criteria) this; + } + + public Criteria andOneNameGreaterThan(String value) { + addCriterion("one_name >", value, "oneName"); + return (Criteria) this; + } + + public Criteria andOneNameGreaterThanOrEqualTo(String value) { + addCriterion("one_name >=", value, "oneName"); + return (Criteria) this; + } + + public Criteria andOneNameLessThan(String value) { + addCriterion("one_name <", value, "oneName"); + return (Criteria) this; + } + + public Criteria andOneNameLessThanOrEqualTo(String value) { + addCriterion("one_name <=", value, "oneName"); + return (Criteria) this; + } + + public Criteria andOneNameLike(String value) { + addCriterion("one_name like", value, "oneName"); + return (Criteria) this; + } + + public Criteria andOneNameNotLike(String value) { + addCriterion("one_name not like", value, "oneName"); + return (Criteria) this; + } + + public Criteria andOneNameIn(List values) { + addCriterion("one_name in", values, "oneName"); + return (Criteria) this; + } + + public Criteria andOneNameNotIn(List values) { + addCriterion("one_name not in", values, "oneName"); + return (Criteria) this; + } + + public Criteria andOneNameBetween(String value1, String value2) { + addCriterion("one_name between", value1, value2, "oneName"); + return (Criteria) this; + } + + public Criteria andOneNameNotBetween(String value1, String value2) { + addCriterion("one_name not between", value1, value2, "oneName"); + return (Criteria) this; + } + public Criteria andTwoIdIsNull() { addCriterion("two_id is null"); return (Criteria) this; @@ -595,73 +665,213 @@ public class SysCaseQuestionExample { return (Criteria) this; } - public Criteria andThreeIsNull() { - addCriterion("three is null"); + public Criteria andTwoNameIsNull() { + addCriterion("two_name is null"); + return (Criteria) this; + } + + public Criteria andTwoNameIsNotNull() { + addCriterion("two_name is not null"); + return (Criteria) this; + } + + public Criteria andTwoNameEqualTo(String value) { + addCriterion("two_name =", value, "twoName"); + return (Criteria) this; + } + + public Criteria andTwoNameNotEqualTo(String value) { + addCriterion("two_name <>", value, "twoName"); + return (Criteria) this; + } + + public Criteria andTwoNameGreaterThan(String value) { + addCriterion("two_name >", value, "twoName"); + return (Criteria) this; + } + + public Criteria andTwoNameGreaterThanOrEqualTo(String value) { + addCriterion("two_name >=", value, "twoName"); + return (Criteria) this; + } + + public Criteria andTwoNameLessThan(String value) { + addCriterion("two_name <", value, "twoName"); + return (Criteria) this; + } + + public Criteria andTwoNameLessThanOrEqualTo(String value) { + addCriterion("two_name <=", value, "twoName"); + return (Criteria) this; + } + + public Criteria andTwoNameLike(String value) { + addCriterion("two_name like", value, "twoName"); + return (Criteria) this; + } + + public Criteria andTwoNameNotLike(String value) { + addCriterion("two_name not like", value, "twoName"); + return (Criteria) this; + } + + public Criteria andTwoNameIn(List values) { + addCriterion("two_name in", values, "twoName"); + return (Criteria) this; + } + + public Criteria andTwoNameNotIn(List values) { + addCriterion("two_name not in", values, "twoName"); + return (Criteria) this; + } + + public Criteria andTwoNameBetween(String value1, String value2) { + addCriterion("two_name between", value1, value2, "twoName"); + return (Criteria) this; + } + + public Criteria andTwoNameNotBetween(String value1, String value2) { + addCriterion("two_name not between", value1, value2, "twoName"); + return (Criteria) this; + } + + public Criteria andThreeIdIsNull() { + addCriterion("three_id is null"); + return (Criteria) this; + } + + public Criteria andThreeIdIsNotNull() { + addCriterion("three_id is not null"); + return (Criteria) this; + } + + public Criteria andThreeIdEqualTo(String value) { + addCriterion("three_id =", value, "threeId"); + return (Criteria) this; + } + + public Criteria andThreeIdNotEqualTo(String value) { + addCriterion("three_id <>", value, "threeId"); + return (Criteria) this; + } + + public Criteria andThreeIdGreaterThan(String value) { + addCriterion("three_id >", value, "threeId"); + return (Criteria) this; + } + + public Criteria andThreeIdGreaterThanOrEqualTo(String value) { + addCriterion("three_id >=", value, "threeId"); + return (Criteria) this; + } + + public Criteria andThreeIdLessThan(String value) { + addCriterion("three_id <", value, "threeId"); + return (Criteria) this; + } + + public Criteria andThreeIdLessThanOrEqualTo(String value) { + addCriterion("three_id <=", value, "threeId"); + return (Criteria) this; + } + + public Criteria andThreeIdLike(String value) { + addCriterion("three_id like", value, "threeId"); + return (Criteria) this; + } + + public Criteria andThreeIdNotLike(String value) { + addCriterion("three_id not like", value, "threeId"); + return (Criteria) this; + } + + public Criteria andThreeIdIn(List values) { + addCriterion("three_id in", values, "threeId"); + return (Criteria) this; + } + + public Criteria andThreeIdNotIn(List values) { + addCriterion("three_id not in", values, "threeId"); + return (Criteria) this; + } + + public Criteria andThreeIdBetween(String value1, String value2) { + addCriterion("three_id between", value1, value2, "threeId"); + return (Criteria) this; + } + + public Criteria andThreeIdNotBetween(String value1, String value2) { + addCriterion("three_id not between", value1, value2, "threeId"); + return (Criteria) this; + } + + public Criteria andThreeNameIsNull() { + addCriterion("three_name is null"); return (Criteria) this; } - public Criteria andThreeIsNotNull() { - addCriterion("three is not null"); + public Criteria andThreeNameIsNotNull() { + addCriterion("three_name is not null"); return (Criteria) this; } - public Criteria andThreeEqualTo(String value) { - addCriterion("three =", value, "three"); + public Criteria andThreeNameEqualTo(String value) { + addCriterion("three_name =", value, "threeName"); return (Criteria) this; } - public Criteria andThreeNotEqualTo(String value) { - addCriterion("three <>", value, "three"); + public Criteria andThreeNameNotEqualTo(String value) { + addCriterion("three_name <>", value, "threeName"); return (Criteria) this; } - public Criteria andThreeGreaterThan(String value) { - addCriterion("three >", value, "three"); + public Criteria andThreeNameGreaterThan(String value) { + addCriterion("three_name >", value, "threeName"); return (Criteria) this; } - public Criteria andThreeGreaterThanOrEqualTo(String value) { - addCriterion("three >=", value, "three"); + public Criteria andThreeNameGreaterThanOrEqualTo(String value) { + addCriterion("three_name >=", value, "threeName"); return (Criteria) this; } - public Criteria andThreeLessThan(String value) { - addCriterion("three <", value, "three"); + public Criteria andThreeNameLessThan(String value) { + addCriterion("three_name <", value, "threeName"); return (Criteria) this; } - public Criteria andThreeLessThanOrEqualTo(String value) { - addCriterion("three <=", value, "three"); + public Criteria andThreeNameLessThanOrEqualTo(String value) { + addCriterion("three_name <=", value, "threeName"); return (Criteria) this; } - public Criteria andThreeLike(String value) { - addCriterion("three like", value, "three"); + public Criteria andThreeNameLike(String value) { + addCriterion("three_name like", value, "threeName"); return (Criteria) this; } - public Criteria andThreeNotLike(String value) { - addCriterion("three not like", value, "three"); + public Criteria andThreeNameNotLike(String value) { + addCriterion("three_name not like", value, "threeName"); return (Criteria) this; } - public Criteria andThreeIn(List values) { - addCriterion("three in", values, "three"); + public Criteria andThreeNameIn(List values) { + addCriterion("three_name in", values, "threeName"); return (Criteria) this; } - public Criteria andThreeNotIn(List values) { - addCriterion("three not in", values, "three"); + public Criteria andThreeNameNotIn(List values) { + addCriterion("three_name not in", values, "threeName"); return (Criteria) this; } - public Criteria andThreeBetween(String value1, String value2) { - addCriterion("three between", value1, value2, "three"); + public Criteria andThreeNameBetween(String value1, String value2) { + addCriterion("three_name between", value1, value2, "threeName"); return (Criteria) this; } - public Criteria andThreeNotBetween(String value1, String value2) { - addCriterion("three not between", value1, value2, "three"); + public Criteria andThreeNameNotBetween(String value1, String value2) { + addCriterion("three_name not between", value1, value2, "threeName"); return (Criteria) this; } diff --git a/src/main/java/com/sztzjy/resource_center/entity/SysObjectiveQuestions.java b/src/main/java/com/sztzjy/resource_center/entity/SysObjectiveQuestions.java index f335250..b0f95ee 100644 --- a/src/main/java/com/sztzjy/resource_center/entity/SysObjectiveQuestions.java +++ b/src/main/java/com/sztzjy/resource_center/entity/SysObjectiveQuestions.java @@ -8,32 +8,14 @@ import io.swagger.annotations.ApiModelProperty; * 客观题库表 * * @author xcj - * sys_objective_question + * sys_objective_questions */ public class SysObjectiveQuestions { @ApiModelProperty("客观题ID") private String objectiveId; - @ApiModelProperty("课程ID") - private String courseId; - - @ApiModelProperty("课程名称") - private String courseName; - - @ApiModelProperty("章节ID") - private String chapterId; - - @ApiModelProperty("章节名称") - private String chapterName; - - @ApiModelProperty("内置,新增 0为老师导入 1为内置") - private String inputType; - - @ApiModelProperty("题目类型 0单选 1多选 2判断") - private String type; - - @ApiModelProperty("分数") - private BigDecimal score; + @ApiModelProperty("schoolid/内置") + private String source; @ApiModelProperty("题目内容") private String content; @@ -53,48 +35,26 @@ public class SysObjectiveQuestions { @ApiModelProperty("选项e") private String questionE; + @ApiModelProperty("分数") + private BigDecimal score; + @ApiModelProperty("答案") private String answer; @ApiModelProperty("答案解析") private String analysis; - @ApiModelProperty("学校Id") - private String schoolId; + @ApiModelProperty("题目类型 0单选 1多选 2判断") + private String type; @ApiModelProperty("创建时间") private Date createTime; @ApiModelProperty("修改时间") - private String updateTime; + private Date updateTime; - @ApiModelProperty("是否删除") private Boolean isDelete; - public Date getCreateTime() { - return createTime; - } - - public void setCreateTime(Date createTime) { - this.createTime = createTime; - } - - public String getUpdateTime() { - return updateTime; - } - - public void setUpdateTime(String updateTime) { - this.updateTime = updateTime; - } - - public Boolean getDelete() { - return isDelete; - } - - public void setDelete(Boolean delete) { - isDelete = delete; - } - public String getObjectiveId() { return objectiveId; } @@ -103,60 +63,12 @@ public class SysObjectiveQuestions { this.objectiveId = objectiveId == null ? null : objectiveId.trim(); } - public String getCourseId() { - return courseId; - } - - public void setCourseId(String courseId) { - this.courseId = courseId == null ? null : courseId.trim(); - } - - public String getCourseName() { - return courseName; - } - - public void setCourseName(String courseName) { - this.courseName = courseName == null ? null : courseName.trim(); - } - - public String getChapterId() { - return chapterId; - } - - public void setChapterId(String chapterId) { - this.chapterId = chapterId == null ? null : chapterId.trim(); - } - - public String getChapterName() { - return chapterName; + public String getSource() { + return source; } - public void setChapterName(String chapterName) { - this.chapterName = chapterName == null ? null : chapterName.trim(); - } - - public String getInputType() { - return inputType; - } - - public void setInputType(String inputType) { - this.inputType = inputType == null ? null : inputType.trim(); - } - - public String getType() { - return type; - } - - public void setType(String type) { - this.type = type == null ? null : type.trim(); - } - - public BigDecimal getScore() { - return score; - } - - public void setScore(BigDecimal score) { - this.score = score; + public void setSource(String source) { + this.source = source == null ? null : source.trim(); } public String getContent() { @@ -207,6 +119,14 @@ public class SysObjectiveQuestions { this.questionE = questionE == null ? null : questionE.trim(); } + public BigDecimal getScore() { + return score; + } + + public void setScore(BigDecimal score) { + this.score = score; + } + public String getAnswer() { return answer; } @@ -223,11 +143,35 @@ public class SysObjectiveQuestions { this.analysis = analysis == null ? null : analysis.trim(); } - public String getSchoolId() { - return schoolId; + public String getType() { + return type; + } + + public void setType(String type) { + this.type = type == null ? null : type.trim(); + } + + public Date getCreateTime() { + return createTime; + } + + public void setCreateTime(Date createTime) { + this.createTime = createTime; + } + + public Date getUpdateTime() { + return updateTime; + } + + public void setUpdateTime(Date updateTime) { + this.updateTime = updateTime; + } + + public Boolean getIsDelete() { + return isDelete; } - public void setSchoolId(String schoolId) { - this.schoolId = schoolId == null ? null : schoolId.trim(); + public void setIsDelete(Boolean isDelete) { + this.isDelete = isDelete; } } \ No newline at end of file diff --git a/src/main/java/com/sztzjy/resource_center/entity/SysObjectiveQuestionsExample.java b/src/main/java/com/sztzjy/resource_center/entity/SysObjectiveQuestionsExample.java index f02f995..735afb0 100644 --- a/src/main/java/com/sztzjy/resource_center/entity/SysObjectiveQuestionsExample.java +++ b/src/main/java/com/sztzjy/resource_center/entity/SysObjectiveQuestionsExample.java @@ -2,6 +2,7 @@ package com.sztzjy.resource_center.entity; import java.math.BigDecimal; import java.util.ArrayList; +import java.util.Date; import java.util.List; public class SysObjectiveQuestionsExample { @@ -175,483 +176,73 @@ public class SysObjectiveQuestionsExample { return (Criteria) this; } - public Criteria andCourseIdIsNull() { - addCriterion("course_id is null"); + public Criteria andSourceIsNull() { + addCriterion("source is null"); return (Criteria) this; } - public Criteria andCourseIdIsNotNull() { - addCriterion("course_id is not null"); + public Criteria andSourceIsNotNull() { + addCriterion("source is not null"); return (Criteria) this; } - public Criteria andCourseIdEqualTo(String value) { - addCriterion("course_id =", value, "courseId"); + public Criteria andSourceEqualTo(String value) { + addCriterion("source =", value, "source"); return (Criteria) this; } - public Criteria andCourseIdNotEqualTo(String value) { - addCriterion("course_id <>", value, "courseId"); + public Criteria andSourceNotEqualTo(String value) { + addCriterion("source <>", value, "source"); return (Criteria) this; } - public Criteria andCourseIdGreaterThan(String value) { - addCriterion("course_id >", value, "courseId"); + public Criteria andSourceGreaterThan(String value) { + addCriterion("source >", value, "source"); return (Criteria) this; } - public Criteria andCourseIdGreaterThanOrEqualTo(String value) { - addCriterion("course_id >=", value, "courseId"); + public Criteria andSourceGreaterThanOrEqualTo(String value) { + addCriterion("source >=", value, "source"); return (Criteria) this; } - public Criteria andCourseIdLessThan(String value) { - addCriterion("course_id <", value, "courseId"); + public Criteria andSourceLessThan(String value) { + addCriterion("source <", value, "source"); return (Criteria) this; } - public Criteria andCourseIdLessThanOrEqualTo(String value) { - addCriterion("course_id <=", value, "courseId"); + public Criteria andSourceLessThanOrEqualTo(String value) { + addCriterion("source <=", value, "source"); return (Criteria) this; } - public Criteria andCourseIdLike(String value) { - addCriterion("course_id like", value, "courseId"); + public Criteria andSourceLike(String value) { + addCriterion("source like", value, "source"); return (Criteria) this; } - public Criteria andCourseIdNotLike(String value) { - addCriterion("course_id not like", value, "courseId"); + public Criteria andSourceNotLike(String value) { + addCriterion("source not like", value, "source"); return (Criteria) this; } - public Criteria andCourseIdIn(List values) { - addCriterion("course_id in", values, "courseId"); + public Criteria andSourceIn(List values) { + addCriterion("source in", values, "source"); return (Criteria) this; } - public Criteria andCourseIdNotIn(List values) { - addCriterion("course_id not in", values, "courseId"); + public Criteria andSourceNotIn(List values) { + addCriterion("source not in", values, "source"); return (Criteria) this; } - public Criteria andCourseIdBetween(String value1, String value2) { - addCriterion("course_id between", value1, value2, "courseId"); + public Criteria andSourceBetween(String value1, String value2) { + addCriterion("source between", value1, value2, "source"); return (Criteria) this; } - public Criteria andCourseIdNotBetween(String value1, String value2) { - addCriterion("course_id not between", value1, value2, "courseId"); - return (Criteria) this; - } - - public Criteria andCourseNameIsNull() { - addCriterion("course_name is null"); - return (Criteria) this; - } - - public Criteria andCourseNameIsNotNull() { - addCriterion("course_name is not null"); - return (Criteria) this; - } - - public Criteria andCourseNameEqualTo(String value) { - addCriterion("course_name =", value, "courseName"); - return (Criteria) this; - } - - public Criteria andCourseNameNotEqualTo(String value) { - addCriterion("course_name <>", value, "courseName"); - return (Criteria) this; - } - - public Criteria andCourseNameGreaterThan(String value) { - addCriterion("course_name >", value, "courseName"); - return (Criteria) this; - } - - public Criteria andCourseNameGreaterThanOrEqualTo(String value) { - addCriterion("course_name >=", value, "courseName"); - return (Criteria) this; - } - - public Criteria andCourseNameLessThan(String value) { - addCriterion("course_name <", value, "courseName"); - return (Criteria) this; - } - - public Criteria andCourseNameLessThanOrEqualTo(String value) { - addCriterion("course_name <=", value, "courseName"); - return (Criteria) this; - } - - public Criteria andCourseNameLike(String value) { - addCriterion("course_name like", value, "courseName"); - return (Criteria) this; - } - - public Criteria andCourseNameNotLike(String value) { - addCriterion("course_name not like", value, "courseName"); - return (Criteria) this; - } - - public Criteria andCourseNameIn(List values) { - addCriterion("course_name in", values, "courseName"); - return (Criteria) this; - } - - public Criteria andCourseNameNotIn(List values) { - addCriterion("course_name not in", values, "courseName"); - return (Criteria) this; - } - - public Criteria andCourseNameBetween(String value1, String value2) { - addCriterion("course_name between", value1, value2, "courseName"); - return (Criteria) this; - } - - public Criteria andCourseNameNotBetween(String value1, String value2) { - addCriterion("course_name not between", value1, value2, "courseName"); - return (Criteria) this; - } - - public Criteria andChapterIdIsNull() { - addCriterion("chapter_id is null"); - return (Criteria) this; - } - - public Criteria andChapterIdIsNotNull() { - addCriterion("chapter_id is not null"); - return (Criteria) this; - } - - public Criteria andChapterIdEqualTo(String value) { - addCriterion("chapter_id =", value, "chapterId"); - return (Criteria) this; - } - - public Criteria andChapterIdNotEqualTo(String value) { - addCriterion("chapter_id <>", value, "chapterId"); - return (Criteria) this; - } - - public Criteria andChapterIdGreaterThan(String value) { - addCriterion("chapter_id >", value, "chapterId"); - return (Criteria) this; - } - - public Criteria andChapterIdGreaterThanOrEqualTo(String value) { - addCriterion("chapter_id >=", value, "chapterId"); - return (Criteria) this; - } - - public Criteria andChapterIdLessThan(String value) { - addCriterion("chapter_id <", value, "chapterId"); - return (Criteria) this; - } - - public Criteria andChapterIdLessThanOrEqualTo(String value) { - addCriterion("chapter_id <=", value, "chapterId"); - return (Criteria) this; - } - - public Criteria andChapterIdLike(String value) { - addCriterion("chapter_id like", value, "chapterId"); - return (Criteria) this; - } - - public Criteria andChapterIdNotLike(String value) { - addCriterion("chapter_id not like", value, "chapterId"); - return (Criteria) this; - } - - public Criteria andChapterIdIn(List values) { - addCriterion("chapter_id in", values, "chapterId"); - return (Criteria) this; - } - - public Criteria andChapterIdNotIn(List values) { - addCriterion("chapter_id not in", values, "chapterId"); - return (Criteria) this; - } - - public Criteria andChapterIdBetween(String value1, String value2) { - addCriterion("chapter_id between", value1, value2, "chapterId"); - return (Criteria) this; - } - - public Criteria andChapterIdNotBetween(String value1, String value2) { - addCriterion("chapter_id not between", value1, value2, "chapterId"); - return (Criteria) this; - } - - public Criteria andChapterNameIsNull() { - addCriterion("chapter_name is null"); - return (Criteria) this; - } - - public Criteria andChapterNameIsNotNull() { - addCriterion("chapter_name is not null"); - return (Criteria) this; - } - - public Criteria andChapterNameEqualTo(String value) { - addCriterion("chapter_name =", value, "chapterName"); - return (Criteria) this; - } - - public Criteria andChapterNameNotEqualTo(String value) { - addCriterion("chapter_name <>", value, "chapterName"); - return (Criteria) this; - } - - public Criteria andChapterNameGreaterThan(String value) { - addCriterion("chapter_name >", value, "chapterName"); - return (Criteria) this; - } - - public Criteria andChapterNameGreaterThanOrEqualTo(String value) { - addCriterion("chapter_name >=", value, "chapterName"); - return (Criteria) this; - } - - public Criteria andChapterNameLessThan(String value) { - addCriterion("chapter_name <", value, "chapterName"); - return (Criteria) this; - } - - public Criteria andChapterNameLessThanOrEqualTo(String value) { - addCriterion("chapter_name <=", value, "chapterName"); - return (Criteria) this; - } - - public Criteria andChapterNameLike(String value) { - addCriterion("chapter_name like", value, "chapterName"); - return (Criteria) this; - } - - public Criteria andChapterNameNotLike(String value) { - addCriterion("chapter_name not like", value, "chapterName"); - return (Criteria) this; - } - - public Criteria andChapterNameIn(List values) { - addCriterion("chapter_name in", values, "chapterName"); - return (Criteria) this; - } - - public Criteria andChapterNameNotIn(List values) { - addCriterion("chapter_name not in", values, "chapterName"); - return (Criteria) this; - } - - public Criteria andChapterNameBetween(String value1, String value2) { - addCriterion("chapter_name between", value1, value2, "chapterName"); - return (Criteria) this; - } - - public Criteria andChapterNameNotBetween(String value1, String value2) { - addCriterion("chapter_name not between", value1, value2, "chapterName"); - return (Criteria) this; - } - - public Criteria andInputTypeIsNull() { - addCriterion("input_type is null"); - return (Criteria) this; - } - - public Criteria andInputTypeIsNotNull() { - addCriterion("input_type is not null"); - return (Criteria) this; - } - - public Criteria andInputTypeEqualTo(String value) { - addCriterion("input_type =", value, "inputType"); - return (Criteria) this; - } - - public Criteria andInputTypeNotEqualTo(String value) { - addCriterion("input_type <>", value, "inputType"); - return (Criteria) this; - } - - public Criteria andInputTypeGreaterThan(String value) { - addCriterion("input_type >", value, "inputType"); - return (Criteria) this; - } - - public Criteria andInputTypeGreaterThanOrEqualTo(String value) { - addCriterion("input_type >=", value, "inputType"); - return (Criteria) this; - } - - public Criteria andInputTypeLessThan(String value) { - addCriterion("input_type <", value, "inputType"); - return (Criteria) this; - } - - public Criteria andInputTypeLessThanOrEqualTo(String value) { - addCriterion("input_type <=", value, "inputType"); - return (Criteria) this; - } - - public Criteria andInputTypeLike(String value) { - addCriterion("input_type like", value, "inputType"); - return (Criteria) this; - } - - public Criteria andInputTypeNotLike(String value) { - addCriterion("input_type not like", value, "inputType"); - return (Criteria) this; - } - - public Criteria andInputTypeIn(List values) { - addCriterion("input_type in", values, "inputType"); - return (Criteria) this; - } - - public Criteria andInputTypeNotIn(List values) { - addCriterion("input_type not in", values, "inputType"); - return (Criteria) this; - } - - public Criteria andInputTypeBetween(String value1, String value2) { - addCriterion("input_type between", value1, value2, "inputType"); - return (Criteria) this; - } - - public Criteria andInputTypeNotBetween(String value1, String value2) { - addCriterion("input_type not between", value1, value2, "inputType"); - return (Criteria) this; - } - - public Criteria andTypeIsNull() { - addCriterion("type is null"); - return (Criteria) this; - } - - public Criteria andTypeIsNotNull() { - addCriterion("type is not null"); - return (Criteria) this; - } - - public Criteria andTypeEqualTo(String value) { - addCriterion("type =", value, "type"); - return (Criteria) this; - } - - public Criteria andTypeNotEqualTo(String value) { - addCriterion("type <>", value, "type"); - return (Criteria) this; - } - - public Criteria andTypeGreaterThan(String value) { - addCriterion("type >", value, "type"); - return (Criteria) this; - } - - public Criteria andTypeGreaterThanOrEqualTo(String value) { - addCriterion("type >=", value, "type"); - return (Criteria) this; - } - - public Criteria andTypeLessThan(String value) { - addCriterion("type <", value, "type"); - return (Criteria) this; - } - - public Criteria andTypeLessThanOrEqualTo(String value) { - addCriterion("type <=", value, "type"); - return (Criteria) this; - } - - public Criteria andTypeLike(String value) { - addCriterion("type like", value, "type"); - return (Criteria) this; - } - - public Criteria andTypeNotLike(String value) { - addCriterion("type not like", value, "type"); - return (Criteria) this; - } - - public Criteria andTypeIn(List values) { - addCriterion("type in", values, "type"); - return (Criteria) this; - } - - public Criteria andTypeNotIn(List values) { - addCriterion("type not in", values, "type"); - return (Criteria) this; - } - - public Criteria andTypeBetween(String value1, String value2) { - addCriterion("type between", value1, value2, "type"); - return (Criteria) this; - } - - public Criteria andTypeNotBetween(String value1, String value2) { - addCriterion("type not between", value1, value2, "type"); - return (Criteria) this; - } - - public Criteria andScoreIsNull() { - addCriterion("score is null"); - return (Criteria) this; - } - - public Criteria andScoreIsNotNull() { - addCriterion("score is not null"); - return (Criteria) this; - } - - public Criteria andScoreEqualTo(BigDecimal value) { - addCriterion("score =", value, "score"); - return (Criteria) this; - } - - public Criteria andScoreNotEqualTo(BigDecimal value) { - addCriterion("score <>", value, "score"); - return (Criteria) this; - } - - public Criteria andScoreGreaterThan(BigDecimal value) { - addCriterion("score >", value, "score"); - return (Criteria) this; - } - - public Criteria andScoreGreaterThanOrEqualTo(BigDecimal value) { - addCriterion("score >=", value, "score"); - return (Criteria) this; - } - - public Criteria andScoreLessThan(BigDecimal value) { - addCriterion("score <", value, "score"); - return (Criteria) this; - } - - public Criteria andScoreLessThanOrEqualTo(BigDecimal value) { - addCriterion("score <=", value, "score"); - return (Criteria) this; - } - - public Criteria andScoreIn(List values) { - addCriterion("score in", values, "score"); - return (Criteria) this; - } - - public Criteria andScoreNotIn(List values) { - addCriterion("score not in", values, "score"); - return (Criteria) this; - } - - public Criteria andScoreBetween(BigDecimal value1, BigDecimal value2) { - addCriterion("score between", value1, value2, "score"); - return (Criteria) this; - } - - public Criteria andScoreNotBetween(BigDecimal value1, BigDecimal value2) { - addCriterion("score not between", value1, value2, "score"); + public Criteria andSourceNotBetween(String value1, String value2) { + addCriterion("source not between", value1, value2, "source"); return (Criteria) this; } @@ -1075,6 +666,66 @@ public class SysObjectiveQuestionsExample { return (Criteria) this; } + public Criteria andScoreIsNull() { + addCriterion("score is null"); + return (Criteria) this; + } + + public Criteria andScoreIsNotNull() { + addCriterion("score is not null"); + return (Criteria) this; + } + + public Criteria andScoreEqualTo(BigDecimal value) { + addCriterion("score =", value, "score"); + return (Criteria) this; + } + + public Criteria andScoreNotEqualTo(BigDecimal value) { + addCriterion("score <>", value, "score"); + return (Criteria) this; + } + + public Criteria andScoreGreaterThan(BigDecimal value) { + addCriterion("score >", value, "score"); + return (Criteria) this; + } + + public Criteria andScoreGreaterThanOrEqualTo(BigDecimal value) { + addCriterion("score >=", value, "score"); + return (Criteria) this; + } + + public Criteria andScoreLessThan(BigDecimal value) { + addCriterion("score <", value, "score"); + return (Criteria) this; + } + + public Criteria andScoreLessThanOrEqualTo(BigDecimal value) { + addCriterion("score <=", value, "score"); + return (Criteria) this; + } + + public Criteria andScoreIn(List values) { + addCriterion("score in", values, "score"); + return (Criteria) this; + } + + public Criteria andScoreNotIn(List values) { + addCriterion("score not in", values, "score"); + return (Criteria) this; + } + + public Criteria andScoreBetween(BigDecimal value1, BigDecimal value2) { + addCriterion("score between", value1, value2, "score"); + return (Criteria) this; + } + + public Criteria andScoreNotBetween(BigDecimal value1, BigDecimal value2) { + addCriterion("score not between", value1, value2, "score"); + return (Criteria) this; + } + public Criteria andAnswerIsNull() { addCriterion("answer is null"); return (Criteria) this; @@ -1215,73 +866,253 @@ public class SysObjectiveQuestionsExample { return (Criteria) this; } - public Criteria andSchoolIdIsNull() { - addCriterion("school_id is null"); + public Criteria andTypeIsNull() { + addCriterion("type is null"); + return (Criteria) this; + } + + public Criteria andTypeIsNotNull() { + addCriterion("type is not null"); + return (Criteria) this; + } + + public Criteria andTypeEqualTo(String value) { + addCriterion("type =", value, "type"); + return (Criteria) this; + } + + public Criteria andTypeNotEqualTo(String value) { + addCriterion("type <>", value, "type"); + return (Criteria) this; + } + + public Criteria andTypeGreaterThan(String value) { + addCriterion("type >", value, "type"); + return (Criteria) this; + } + + public Criteria andTypeGreaterThanOrEqualTo(String value) { + addCriterion("type >=", value, "type"); + return (Criteria) this; + } + + public Criteria andTypeLessThan(String value) { + addCriterion("type <", value, "type"); + return (Criteria) this; + } + + public Criteria andTypeLessThanOrEqualTo(String value) { + addCriterion("type <=", value, "type"); + return (Criteria) this; + } + + public Criteria andTypeLike(String value) { + addCriterion("type like", value, "type"); + return (Criteria) this; + } + + public Criteria andTypeNotLike(String value) { + addCriterion("type not like", value, "type"); + return (Criteria) this; + } + + public Criteria andTypeIn(List values) { + addCriterion("type in", values, "type"); + return (Criteria) this; + } + + public Criteria andTypeNotIn(List values) { + addCriterion("type not in", values, "type"); + return (Criteria) this; + } + + public Criteria andTypeBetween(String value1, String value2) { + addCriterion("type between", value1, value2, "type"); + return (Criteria) this; + } + + public Criteria andTypeNotBetween(String value1, String value2) { + addCriterion("type not between", value1, value2, "type"); + return (Criteria) this; + } + + public Criteria andCreateTimeIsNull() { + addCriterion("create_time is null"); + return (Criteria) this; + } + + public Criteria andCreateTimeIsNotNull() { + addCriterion("create_time is not null"); + return (Criteria) this; + } + + public Criteria andCreateTimeEqualTo(Date value) { + addCriterion("create_time =", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeNotEqualTo(Date value) { + addCriterion("create_time <>", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeGreaterThan(Date value) { + addCriterion("create_time >", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeGreaterThanOrEqualTo(Date value) { + addCriterion("create_time >=", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeLessThan(Date value) { + addCriterion("create_time <", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeLessThanOrEqualTo(Date value) { + addCriterion("create_time <=", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeIn(List values) { + addCriterion("create_time in", values, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeNotIn(List values) { + addCriterion("create_time not in", values, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeBetween(Date value1, Date value2) { + addCriterion("create_time between", value1, value2, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeNotBetween(Date value1, Date value2) { + addCriterion("create_time not between", value1, value2, "createTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeIsNull() { + addCriterion("update_time is null"); + return (Criteria) this; + } + + public Criteria andUpdateTimeIsNotNull() { + addCriterion("update_time is not null"); + return (Criteria) this; + } + + public Criteria andUpdateTimeEqualTo(Date value) { + addCriterion("update_time =", value, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeNotEqualTo(Date value) { + addCriterion("update_time <>", value, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeGreaterThan(Date value) { + addCriterion("update_time >", value, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeGreaterThanOrEqualTo(Date value) { + addCriterion("update_time >=", value, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeLessThan(Date value) { + addCriterion("update_time <", value, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeLessThanOrEqualTo(Date value) { + addCriterion("update_time <=", value, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeIn(List values) { + addCriterion("update_time in", values, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeNotIn(List values) { + addCriterion("update_time not in", values, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeBetween(Date value1, Date value2) { + addCriterion("update_time between", value1, value2, "updateTime"); return (Criteria) this; } - public Criteria andSchoolIdIsNotNull() { - addCriterion("school_id is not null"); + public Criteria andUpdateTimeNotBetween(Date value1, Date value2) { + addCriterion("update_time not between", value1, value2, "updateTime"); return (Criteria) this; } - public Criteria andSchoolIdEqualTo(String value) { - addCriterion("school_id =", value, "schoolId"); + public Criteria andIsDeleteIsNull() { + addCriterion("is_delete is null"); return (Criteria) this; } - public Criteria andSchoolIdNotEqualTo(String value) { - addCriterion("school_id <>", value, "schoolId"); + public Criteria andIsDeleteIsNotNull() { + addCriterion("is_delete is not null"); return (Criteria) this; } - public Criteria andSchoolIdGreaterThan(String value) { - addCriterion("school_id >", value, "schoolId"); + public Criteria andIsDeleteEqualTo(Boolean value) { + addCriterion("is_delete =", value, "isDelete"); return (Criteria) this; } - public Criteria andSchoolIdGreaterThanOrEqualTo(String value) { - addCriterion("school_id >=", value, "schoolId"); + public Criteria andIsDeleteNotEqualTo(Boolean value) { + addCriterion("is_delete <>", value, "isDelete"); return (Criteria) this; } - public Criteria andSchoolIdLessThan(String value) { - addCriterion("school_id <", value, "schoolId"); + public Criteria andIsDeleteGreaterThan(Boolean value) { + addCriterion("is_delete >", value, "isDelete"); return (Criteria) this; } - public Criteria andSchoolIdLessThanOrEqualTo(String value) { - addCriterion("school_id <=", value, "schoolId"); + public Criteria andIsDeleteGreaterThanOrEqualTo(Boolean value) { + addCriterion("is_delete >=", value, "isDelete"); return (Criteria) this; } - public Criteria andSchoolIdLike(String value) { - addCriterion("school_id like", value, "schoolId"); + public Criteria andIsDeleteLessThan(Boolean value) { + addCriterion("is_delete <", value, "isDelete"); return (Criteria) this; } - public Criteria andSchoolIdNotLike(String value) { - addCriterion("school_id not like", value, "schoolId"); + public Criteria andIsDeleteLessThanOrEqualTo(Boolean value) { + addCriterion("is_delete <=", value, "isDelete"); return (Criteria) this; } - public Criteria andSchoolIdIn(List values) { - addCriterion("school_id in", values, "schoolId"); + public Criteria andIsDeleteIn(List values) { + addCriterion("is_delete in", values, "isDelete"); return (Criteria) this; } - public Criteria andSchoolIdNotIn(List values) { - addCriterion("school_id not in", values, "schoolId"); + public Criteria andIsDeleteNotIn(List values) { + addCriterion("is_delete not in", values, "isDelete"); return (Criteria) this; } - public Criteria andSchoolIdBetween(String value1, String value2) { - addCriterion("school_id between", value1, value2, "schoolId"); + public Criteria andIsDeleteBetween(Boolean value1, Boolean value2) { + addCriterion("is_delete between", value1, value2, "isDelete"); return (Criteria) this; } - public Criteria andSchoolIdNotBetween(String value1, String value2) { - addCriterion("school_id not between", value1, value2, "schoolId"); + public Criteria andIsDeleteNotBetween(Boolean value1, Boolean value2) { + addCriterion("is_delete not between", value1, value2, "isDelete"); return (Criteria) this; } } diff --git a/src/main/java/com/sztzjy/resource_center/mapper/SysObjectiveQuestionsMapper.java b/src/main/java/com/sztzjy/resource_center/mapper/SysObjectiveQuestionsMapper.java index 3d3e3c9..e1f8193 100644 --- a/src/main/java/com/sztzjy/resource_center/mapper/SysObjectiveQuestionsMapper.java +++ b/src/main/java/com/sztzjy/resource_center/mapper/SysObjectiveQuestionsMapper.java @@ -2,12 +2,11 @@ package com.sztzjy.resource_center.mapper; import com.sztzjy.resource_center.entity.SysObjectiveQuestions; import com.sztzjy.resource_center.entity.SysObjectiveQuestionsExample; +import java.util.List; + import com.sztzjy.resource_center.entity.dto.SysObjectiveQuestionsDto; import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Param; - -import java.util.List; - @Mapper public interface SysObjectiveQuestionsMapper { long countByExample(SysObjectiveQuestionsExample example); @@ -32,8 +31,10 @@ public interface SysObjectiveQuestionsMapper { int updateByPrimaryKey(SysObjectiveQuestions record); - List selectTopicByConditions(@Param("oneID") String oneID, + List selectTopicByConditions(@Param("oneID")String oneID, @Param("twoID") String twoID, @Param("threeID") String threeID, @Param("content") String content); + + int insertBatch(@Param("objectiveQuestionList") List objectiveQuestionList); } \ No newline at end of file diff --git a/src/main/java/com/sztzjy/resource_center/mapper/SysResourceAndCourseMapper.java b/src/main/java/com/sztzjy/resource_center/mapper/SysResourceAndCourseMapper.java index 1c10774..3c189cb 100644 --- a/src/main/java/com/sztzjy/resource_center/mapper/SysResourceAndCourseMapper.java +++ b/src/main/java/com/sztzjy/resource_center/mapper/SysResourceAndCourseMapper.java @@ -34,8 +34,8 @@ public interface SysResourceAndCourseMapper { void batchDeleteByIds(@Param("idList") List idList); - @Select("SELECT resource_id FROM sys_resource_and_course where one_id = #{oneId} and two_id = #{twoID} and three_id = #{threeID}") - List selectResourceId(@Param("oneId") String oneID, +// @Select("SELECT resource_id FROM sys_resource_and_course where one_id = #{oneId} and two_id = #{twoID} and three_id = #{threeID}") + List selectResourceId(@Param("oneID") String oneID, @Param("twoID") String twoID, @Param("threeID") String threeID); diff --git a/src/main/resources/application-dev.yml b/src/main/resources/application-dev.yml index b449aad..28c4b37 100644 --- a/src/main/resources/application-dev.yml +++ b/src/main/resources/application-dev.yml @@ -11,7 +11,7 @@ spring: # 文件存储 file: type: local -# path: /usr/local/tianzeProject/resource_center/uploadFile +# path: /usr/local/tianzeProject/resourceCenter/uploadFile path: D:/home timer: enable: false diff --git a/src/main/resources/generatorConfig.xml b/src/main/resources/generatorConfig.xml index 560192a..6d01e7f 100644 --- a/src/main/resources/generatorConfig.xml +++ b/src/main/resources/generatorConfig.xml @@ -44,9 +44,9 @@ - + -
+ diff --git a/src/main/resources/mapper/SysCaseQuestionMapper.xml b/src/main/resources/mapper/SysCaseQuestionMapper.xml index 9eacb36..b05b162 100644 --- a/src/main/resources/mapper/SysCaseQuestionMapper.xml +++ b/src/main/resources/mapper/SysCaseQuestionMapper.xml @@ -1,397 +1,444 @@ - - - - - - - - - - - - - - - - - - - - - - - - - and ${criterion.condition} - - - and ${criterion.condition} #{criterion.value} - - - and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} - - - and ${criterion.condition} - - #{listItem} - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + and ${criterion.condition} + + + and ${criterion.condition} #{criterion.value} + + + and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} + + + and ${criterion.condition} + + #{listItem} + + + - - - - - - - - - - - and ${criterion.condition} - - - and ${criterion.condition} #{criterion.value} - - - and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} - - - and ${criterion.condition} - - #{listItem} - - - - - - - - - - - case_id - , title, resource_data, source, type, one_id, two_id, three, unmount_status, - create_time, update_time - - - content - - - - - - delete - from sys_case_questions - where case_id = #{caseId,jdbcType=VARCHAR} - - - delete from sys_case_questions - - - - - - insert into sys_case_questions (case_id, title, resource_data, - source, type, one_id, - two_id, three, unmount_status, - create_time, update_time, content) - values (#{caseId,jdbcType=VARCHAR}, #{title,jdbcType=VARCHAR}, #{resourceData,jdbcType=VARCHAR}, - #{source,jdbcType=VARCHAR}, #{type,jdbcType=VARCHAR}, #{oneId,jdbcType=VARCHAR}, - #{twoId,jdbcType=VARCHAR}, #{three,jdbcType=VARCHAR}, #{unmountStatus,jdbcType=BIT}, - #{createTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP}, #{content,jdbcType=LONGVARCHAR}) - - - insert into sys_case_questions - - - case_id, - - - title, - - - resource_data, - - - source, - - - type, - - - one_id, - - - two_id, - - - three, - - - unmount_status, - - - create_time, - - - update_time, - - - content, - - - - - #{caseId,jdbcType=VARCHAR}, - - - #{title,jdbcType=VARCHAR}, - - - #{resourceData,jdbcType=VARCHAR}, - - - #{source,jdbcType=VARCHAR}, - - - #{type,jdbcType=VARCHAR}, - - - #{oneId,jdbcType=VARCHAR}, - - - #{twoId,jdbcType=VARCHAR}, - - - #{three,jdbcType=VARCHAR}, - - - #{unmountStatus,jdbcType=BIT}, - - - #{createTime,jdbcType=TIMESTAMP}, - - - #{updateTime,jdbcType=TIMESTAMP}, - - - #{content,jdbcType=LONGVARCHAR}, - - - - - - update sys_case_questions - - - case_id = #{record.caseId,jdbcType=VARCHAR}, - - - title = #{record.title,jdbcType=VARCHAR}, - - - resource_data = #{record.resourceData,jdbcType=VARCHAR}, - - - source = #{record.source,jdbcType=VARCHAR}, - - - type = #{record.type,jdbcType=VARCHAR}, - - - one_id = #{record.oneId,jdbcType=VARCHAR}, - - - two_id = #{record.twoId,jdbcType=VARCHAR}, - - - three = #{record.three,jdbcType=VARCHAR}, - - - unmount_status = #{record.unmountStatus,jdbcType=BIT}, - - - create_time = #{record.createTime,jdbcType=TIMESTAMP}, - - - update_time = #{record.updateTime,jdbcType=TIMESTAMP}, - - - content = #{record.content,jdbcType=LONGVARCHAR}, - - - - + + + + + + + + + + + + and ${criterion.condition} + + + and ${criterion.condition} #{criterion.value} + + + and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} + + + and ${criterion.condition} + + #{listItem} + + + + + - - - update sys_case_questions - set case_id = #{record.caseId,jdbcType=VARCHAR}, + + + + + case_id, title, resource_data, source, type, one_id, one_name, two_id, two_name, + three_id, three_name, unmount_status, create_time, update_time + + + content + + + + + + delete from sys_case_questions + where case_id = #{caseId,jdbcType=VARCHAR} + + + delete from sys_case_questions + + + + + + insert into sys_case_questions (case_id, title, resource_data, + source, type, one_id, + one_name, two_id, two_name, + three_id, three_name, unmount_status, + create_time, update_time, content + ) + values (#{caseId,jdbcType=VARCHAR}, #{title,jdbcType=VARCHAR}, #{resourceData,jdbcType=VARCHAR}, + #{source,jdbcType=VARCHAR}, #{type,jdbcType=VARCHAR}, #{oneId,jdbcType=VARCHAR}, + #{oneName,jdbcType=VARCHAR}, #{twoId,jdbcType=VARCHAR}, #{twoName,jdbcType=VARCHAR}, + #{threeId,jdbcType=VARCHAR}, #{threeName,jdbcType=VARCHAR}, #{unmountStatus,jdbcType=BIT}, + #{createTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP}, #{content,jdbcType=LONGVARCHAR} + ) + + + insert into sys_case_questions + + + case_id, + + + title, + + + resource_data, + + + source, + + + type, + + + one_id, + + + one_name, + + + two_id, + + + two_name, + + + three_id, + + + three_name, + + + unmount_status, + + + create_time, + + + update_time, + + + content, + + + + + #{caseId,jdbcType=VARCHAR}, + + + #{title,jdbcType=VARCHAR}, + + + #{resourceData,jdbcType=VARCHAR}, + + + #{source,jdbcType=VARCHAR}, + + + #{type,jdbcType=VARCHAR}, + + + #{oneId,jdbcType=VARCHAR}, + + + #{oneName,jdbcType=VARCHAR}, + + + #{twoId,jdbcType=VARCHAR}, + + + #{twoName,jdbcType=VARCHAR}, + + + #{threeId,jdbcType=VARCHAR}, + + + #{threeName,jdbcType=VARCHAR}, + + + #{unmountStatus,jdbcType=BIT}, + + + #{createTime,jdbcType=TIMESTAMP}, + + + #{updateTime,jdbcType=TIMESTAMP}, + + + #{content,jdbcType=LONGVARCHAR}, + + + + + + update sys_case_questions + + + case_id = #{record.caseId,jdbcType=VARCHAR}, + + title = #{record.title,jdbcType=VARCHAR}, + + resource_data = #{record.resourceData,jdbcType=VARCHAR}, + + source = #{record.source,jdbcType=VARCHAR}, + + type = #{record.type,jdbcType=VARCHAR}, + + one_id = #{record.oneId,jdbcType=VARCHAR}, + + + one_name = #{record.oneName,jdbcType=VARCHAR}, + + two_id = #{record.twoId,jdbcType=VARCHAR}, - three = #{record.three,jdbcType=VARCHAR}, + + + two_name = #{record.twoName,jdbcType=VARCHAR}, + + + three_id = #{record.threeId,jdbcType=VARCHAR}, + + + three_name = #{record.threeName,jdbcType=VARCHAR}, + + unmount_status = #{record.unmountStatus,jdbcType=BIT}, + + create_time = #{record.createTime,jdbcType=TIMESTAMP}, + + update_time = #{record.updateTime,jdbcType=TIMESTAMP}, - content = #{record.content,jdbcType=LONGVARCHAR} - - - - - - update sys_case_questions - set case_id = #{record.caseId,jdbcType=VARCHAR}, - title = #{record.title,jdbcType=VARCHAR}, - resource_data = #{record.resourceData,jdbcType=VARCHAR}, - source = #{record.source,jdbcType=VARCHAR}, - type = #{record.type,jdbcType=VARCHAR}, - one_id = #{record.oneId,jdbcType=VARCHAR}, - two_id = #{record.twoId,jdbcType=VARCHAR}, - three = #{record.three,jdbcType=VARCHAR}, - unmount_status = #{record.unmountStatus,jdbcType=BIT}, - create_time = #{record.createTime,jdbcType=TIMESTAMP}, - update_time = #{record.updateTime,jdbcType=TIMESTAMP} - - - - - - update sys_case_questions - - - title = #{title,jdbcType=VARCHAR}, - - - resource_data = #{resourceData,jdbcType=VARCHAR}, - - - source = #{source,jdbcType=VARCHAR}, - - - type = #{type,jdbcType=VARCHAR}, - - - one_id = #{oneId,jdbcType=VARCHAR}, - - - two_id = #{twoId,jdbcType=VARCHAR}, - - - three = #{three,jdbcType=VARCHAR}, - - - unmount_status = #{unmountStatus,jdbcType=BIT}, - - - create_time = #{createTime,jdbcType=TIMESTAMP}, - - - update_time = #{updateTime,jdbcType=TIMESTAMP}, - - - content = #{content,jdbcType=LONGVARCHAR}, - - - where case_id = #{caseId,jdbcType=VARCHAR} - - - update sys_case_questions - set title = #{title,jdbcType=VARCHAR}, - resource_data = #{resourceData,jdbcType=VARCHAR}, - source = #{source,jdbcType=VARCHAR}, - type = #{type,jdbcType=VARCHAR}, - one_id = #{oneId,jdbcType=VARCHAR}, - two_id = #{twoId,jdbcType=VARCHAR}, - three = #{three,jdbcType=VARCHAR}, - unmount_status = #{unmountStatus,jdbcType=BIT}, - create_time = #{createTime,jdbcType=TIMESTAMP}, - update_time = #{updateTime,jdbcType=TIMESTAMP}, - content = #{content,jdbcType=LONGVARCHAR} - where case_id = #{caseId,jdbcType=VARCHAR} - - - update sys_case_questions - set title = #{title,jdbcType=VARCHAR}, - resource_data = #{resourceData,jdbcType=VARCHAR}, - source = #{source,jdbcType=VARCHAR}, - type = #{type,jdbcType=VARCHAR}, - one_id = #{oneId,jdbcType=VARCHAR}, - two_id = #{twoId,jdbcType=VARCHAR}, - three = #{three,jdbcType=VARCHAR}, - unmount_status = #{unmountStatus,jdbcType=BIT}, - create_time = #{createTime,jdbcType=TIMESTAMP}, - update_time = #{updateTime,jdbcType=TIMESTAMP} - where case_id = #{caseId,jdbcType=VARCHAR} - - - - + + + content = #{record.content,jdbcType=LONGVARCHAR}, + + + + + + + + update sys_case_questions + set case_id = #{record.caseId,jdbcType=VARCHAR}, + title = #{record.title,jdbcType=VARCHAR}, + resource_data = #{record.resourceData,jdbcType=VARCHAR}, + source = #{record.source,jdbcType=VARCHAR}, + type = #{record.type,jdbcType=VARCHAR}, + one_id = #{record.oneId,jdbcType=VARCHAR}, + one_name = #{record.oneName,jdbcType=VARCHAR}, + two_id = #{record.twoId,jdbcType=VARCHAR}, + two_name = #{record.twoName,jdbcType=VARCHAR}, + three_id = #{record.threeId,jdbcType=VARCHAR}, + three_name = #{record.threeName,jdbcType=VARCHAR}, + unmount_status = #{record.unmountStatus,jdbcType=BIT}, + create_time = #{record.createTime,jdbcType=TIMESTAMP}, + update_time = #{record.updateTime,jdbcType=TIMESTAMP}, + content = #{record.content,jdbcType=LONGVARCHAR} + + + + + + update sys_case_questions + set case_id = #{record.caseId,jdbcType=VARCHAR}, + title = #{record.title,jdbcType=VARCHAR}, + resource_data = #{record.resourceData,jdbcType=VARCHAR}, + source = #{record.source,jdbcType=VARCHAR}, + type = #{record.type,jdbcType=VARCHAR}, + one_id = #{record.oneId,jdbcType=VARCHAR}, + one_name = #{record.oneName,jdbcType=VARCHAR}, + two_id = #{record.twoId,jdbcType=VARCHAR}, + two_name = #{record.twoName,jdbcType=VARCHAR}, + three_id = #{record.threeId,jdbcType=VARCHAR}, + three_name = #{record.threeName,jdbcType=VARCHAR}, + unmount_status = #{record.unmountStatus,jdbcType=BIT}, + create_time = #{record.createTime,jdbcType=TIMESTAMP}, + update_time = #{record.updateTime,jdbcType=TIMESTAMP} + + + + + + update sys_case_questions + + + title = #{title,jdbcType=VARCHAR}, + + + resource_data = #{resourceData,jdbcType=VARCHAR}, + + + source = #{source,jdbcType=VARCHAR}, + + + type = #{type,jdbcType=VARCHAR}, + + + one_id = #{oneId,jdbcType=VARCHAR}, + + + one_name = #{oneName,jdbcType=VARCHAR}, + + + two_id = #{twoId,jdbcType=VARCHAR}, + + + two_name = #{twoName,jdbcType=VARCHAR}, + + + three_id = #{threeId,jdbcType=VARCHAR}, + + + three_name = #{threeName,jdbcType=VARCHAR}, + + + unmount_status = #{unmountStatus,jdbcType=BIT}, + + + create_time = #{createTime,jdbcType=TIMESTAMP}, + + + update_time = #{updateTime,jdbcType=TIMESTAMP}, + + + content = #{content,jdbcType=LONGVARCHAR}, + + + where case_id = #{caseId,jdbcType=VARCHAR} + + + update sys_case_questions + set title = #{title,jdbcType=VARCHAR}, + resource_data = #{resourceData,jdbcType=VARCHAR}, + source = #{source,jdbcType=VARCHAR}, + type = #{type,jdbcType=VARCHAR}, + one_id = #{oneId,jdbcType=VARCHAR}, + one_name = #{oneName,jdbcType=VARCHAR}, + two_id = #{twoId,jdbcType=VARCHAR}, + two_name = #{twoName,jdbcType=VARCHAR}, + three_id = #{threeId,jdbcType=VARCHAR}, + three_name = #{threeName,jdbcType=VARCHAR}, + unmount_status = #{unmountStatus,jdbcType=BIT}, + create_time = #{createTime,jdbcType=TIMESTAMP}, + update_time = #{updateTime,jdbcType=TIMESTAMP}, + content = #{content,jdbcType=LONGVARCHAR} + where case_id = #{caseId,jdbcType=VARCHAR} + + + update sys_case_questions + set title = #{title,jdbcType=VARCHAR}, + resource_data = #{resourceData,jdbcType=VARCHAR}, + source = #{source,jdbcType=VARCHAR}, + type = #{type,jdbcType=VARCHAR}, + one_id = #{oneId,jdbcType=VARCHAR}, + one_name = #{oneName,jdbcType=VARCHAR}, + two_id = #{twoId,jdbcType=VARCHAR}, + two_name = #{twoName,jdbcType=VARCHAR}, + three_id = #{threeId,jdbcType=VARCHAR}, + three_name = #{threeName,jdbcType=VARCHAR}, + unmount_status = #{unmountStatus,jdbcType=BIT}, + create_time = #{createTime,jdbcType=TIMESTAMP}, + update_time = #{updateTime,jdbcType=TIMESTAMP} + where case_id = #{caseId,jdbcType=VARCHAR} + + + \ No newline at end of file diff --git a/src/main/resources/mapper/SysObjectiveQuestionsMapper.xml b/src/main/resources/mapper/SysObjectiveQuestionsMapper.xml index 4cb7954..9f70717 100644 --- a/src/main/resources/mapper/SysObjectiveQuestionsMapper.xml +++ b/src/main/resources/mapper/SysObjectiveQuestionsMapper.xml @@ -16,7 +16,7 @@ - + @@ -86,7 +86,7 @@ distinct - from sys_objective_question + from sys_objective_questions @@ -97,21 +97,21 @@ - delete from sys_objective_question + delete from sys_objective_questions where objective_id = #{objectiveId,jdbcType=VARCHAR} - delete from sys_objective_question + delete from sys_objective_questions - insert into sys_objective_question (objective_id, source, content, + insert into sys_objective_questions (objective_id, source, content, question_a, question_b, question_c, question_d, question_e, score, answer, analysis, type, @@ -121,11 +121,11 @@ #{questionA,jdbcType=VARCHAR}, #{questionB,jdbcType=VARCHAR}, #{questionC,jdbcType=VARCHAR}, #{questionD,jdbcType=VARCHAR}, #{questionE,jdbcType=VARCHAR}, #{score,jdbcType=DECIMAL}, #{answer,jdbcType=VARCHAR}, #{analysis,jdbcType=VARCHAR}, #{type,jdbcType=VARCHAR}, - #{createTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP}, #{isDelete,jdbcType=TINYINT} + #{createTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP}, #{isDelete,jdbcType=BIT} ) - insert into sys_objective_question + insert into sys_objective_questions objective_id, @@ -217,18 +217,18 @@ #{updateTime,jdbcType=TIMESTAMP}, - #{isDelete,jdbcType=TINYINT}, + #{isDelete,jdbcType=BIT}, - update sys_objective_question + update sys_objective_questions objective_id = #{record.objectiveId,jdbcType=VARCHAR}, @@ -273,7 +273,7 @@ update_time = #{record.updateTime,jdbcType=TIMESTAMP}, - is_delete = #{record.isDelete,jdbcType=TINYINT}, + is_delete = #{record.isDelete,jdbcType=BIT}, @@ -281,7 +281,7 @@ - update sys_objective_question + update sys_objective_questions set objective_id = #{record.objectiveId,jdbcType=VARCHAR}, source = #{record.source,jdbcType=VARCHAR}, content = #{record.content,jdbcType=VARCHAR}, @@ -296,13 +296,13 @@ type = #{record.type,jdbcType=VARCHAR}, create_time = #{record.createTime,jdbcType=TIMESTAMP}, update_time = #{record.updateTime,jdbcType=TIMESTAMP}, - is_delete = #{record.isDelete,jdbcType=TINYINT} + is_delete = #{record.isDelete,jdbcType=BIT} - update sys_objective_question + update sys_objective_questions source = #{source,jdbcType=VARCHAR}, @@ -344,13 +344,13 @@ update_time = #{updateTime,jdbcType=TIMESTAMP}, - is_delete = #{isDelete,jdbcType=TINYINT}, + is_delete = #{isDelete,jdbcType=BIT}, where objective_id = #{objectiveId,jdbcType=VARCHAR} - update sys_objective_question + update sys_objective_questions set source = #{source,jdbcType=VARCHAR}, content = #{content,jdbcType=VARCHAR}, question_a = #{questionA,jdbcType=VARCHAR}, @@ -364,7 +364,7 @@ type = #{type,jdbcType=VARCHAR}, create_time = #{createTime,jdbcType=TIMESTAMP}, update_time = #{updateTime,jdbcType=TIMESTAMP}, - is_delete = #{isDelete,jdbcType=TINYINT} + is_delete = #{isDelete,jdbcType=BIT} where objective_id = #{objectiveId,jdbcType=VARCHAR} @@ -408,7 +408,18 @@ and sb.content = #{content} - + > order by sb.create_time + + + INSERT INTO sys_objective_questions ( + objective_id, source, content, question_a, question_b, question_c, question_d, question_e, score, answer, analysis, type, create_time, update_time, is_delete + ) VALUES + + ( + #{item.objectiveId}, #{item.source}, #{item.content}, #{item.questionA}, #{item.questionB}, #{item.questionC}, #{item.questionD}, #{item.questionE}, #{item.score}, #{item.answer}, #{item.analysis}, #{item.type}, #{item.createTime}, #{item.updateTime}, #{item.isDelete} + ) + + \ No newline at end of file diff --git a/src/main/resources/mapper/SysResourceAndCourseMapper.xml b/src/main/resources/mapper/SysResourceAndCourseMapper.xml index c7a8dd2..092dc16 100644 --- a/src/main/resources/mapper/SysResourceAndCourseMapper.xml +++ b/src/main/resources/mapper/SysResourceAndCourseMapper.xml @@ -239,4 +239,19 @@ + + \ No newline at end of file diff --git a/src/main/resources/mapper/SysResourceMapper.xml b/src/main/resources/mapper/SysResourceMapper.xml index dcf15e2..e49aeeb 100644 --- a/src/main/resources/mapper/SysResourceMapper.xml +++ b/src/main/resources/mapper/SysResourceMapper.xml @@ -354,10 +354,9 @@