修改案例步骤信息传参逻辑、修改部分字段类型

newBigdata
yz 11 months ago
parent fefb239a27
commit ba766029c6

@ -68,9 +68,19 @@ public class ExerciseExperimentalTraining {
@GetMapping("getCaseStepInfo")
@ApiOperation("获取案例题步骤基础信息")
@AnonymousAccess
public ResultEntity<List<SysCaseQuestionStep>> getCaseStepInfo(@RequestParam String caseId) {
public ResultEntity<List<SysCaseQuestionStep>> getCaseStepInfo(@RequestParam String chapterId) {
//根据chapterId查询所有的caseid
SysCaseQuestionExample questionExample = new SysCaseQuestionExample();
questionExample.createCriteria().andChapterIdEqualTo(chapterId);
List<SysCaseQuestion> sysCaseQuestions = caseQuestionMapper.selectByExample(questionExample);
List<String> caseIds=new ArrayList<>();
for (int i = 0; i < sysCaseQuestions.size(); i++) {
String caseId = sysCaseQuestions.get(i).getCaseId();
caseIds.add(caseId);
}
SysCaseQuestionStepExample example = new SysCaseQuestionStepExample();
example.createCriteria().andCaseIdEqualTo(caseId);
example.createCriteria().andCaseIdIn(caseIds);
example.setOrderByClause("sort ASC");
List<SysCaseQuestionStep> stepList = caseQuestionStepMapper.selectByExample(example);
for (int i = 0; i < stepList.size(); i++) {
stepList.get(0).setAnswer("");

@ -15,6 +15,7 @@ import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.HttpStatus;
import org.springframework.web.bind.annotation.*;
import java.util.ArrayList;
import java.util.List;
@ -142,6 +143,24 @@ public class TeaCaseController {
return new ResultEntity<>(HttpStatus.OK, "案例题库选择案例题内容展示成功",list);
}
// //案例题库所有信息展示
// @GetMapping("selectAllCaseBySchoolId")
// @ApiOperation("案例题库选择案例题内容展示")
// @AnonymousAccess
// public ResultEntity<List<SysCaseQuestion>> selectAllCaseBySchoolId(@RequestParam String schoolId){
// SysCaseQuestionExample example = new SysCaseQuestionExample();
// if(Constant.BUILT_IN_SCHOOL_ID.equals(schoolId)){
// example.createCriteria().andSchoolIdEqualTo(schoolId);
// }else {
// ArrayList<String> schoolIds = new ArrayList<>();
// schoolIds.add(schoolId);
// schoolIds.add(Constant.BUILT_IN_SCHOOL_ID);
// example.createCriteria().andSchoolIdIn(schoolIds);
// }
// List<SysCaseQuestion> sysCaseQuestions = questionMapper.selectByExample(example);
// return new ResultEntity<>(HttpStatus.OK, "新增考试案例题预览展示成功",sysCaseQuestions);
// }
//新增考试案例题预览
@GetMapping("selectCaseStepDetailByCaseId")
@ApiOperation("新增考试-案例题预览-步骤信息查询")

@ -48,8 +48,9 @@ public class TeaResourceCenterController {
public ResultEntity uploadResource(@RequestParam MultipartFile file,
@ApiParam("学校id") @RequestParam(required = false) String schoolId,
@ApiParam("课程Id") @RequestParam String courseId,
@ApiParam("章节id") @RequestParam String chapterId,
@ApiParam("上传文件类型 文件/视频") @RequestParam String type) {
Boolean flag = resourceCenterService.uploadResource(file, schoolId, courseId,type);
Boolean flag = resourceCenterService.uploadResource(file, schoolId, courseId,type,chapterId);
if (flag) {
return new ResultEntity<>(HttpStatus.OK, "新增成功");
} else {
@ -57,16 +58,26 @@ public class TeaResourceCenterController {
}
}
//查看资源文件列表
//根据课程id查看资源文件列表
@AnonymousAccess
@GetMapping("selectResource")
@ApiOperation("查看资源文件列表,图片资源使用默认图片")
public ResultEntity<List<TeaResourceCenter>> uploadResourceCenter(@ApiParam("学校id") @RequestParam(required = false) String schoolId,
public ResultEntity<List<TeaResourceCenter>> selectResource(@ApiParam("学校id") @RequestParam(required = false) String schoolId,
@ApiParam("课程Id") @RequestParam String courseId) {
List<TeaResourceCenter> list = resourceCenterService.selectResource(schoolId, courseId);
return new ResultEntity(HttpStatus.OK, "查看资源文件列表,展示成功", list);
}
//根据章节查看资源文件列表
@AnonymousAccess
@GetMapping("selectResourceByChapterId")
@ApiOperation("根据章节查看资源文件列表,图片资源使用默认图片")
public ResultEntity<List<TeaResourceCenter>> selectResourceByChapterId(@ApiParam("学校id") @RequestParam(required = false) String schoolId,
@ApiParam("章节Id") @RequestParam String chapterId) {
List<TeaResourceCenter> list = resourceCenterService.selectResourceByChapterId(schoolId, chapterId);
return new ResultEntity(HttpStatus.OK, "根据章节查看资源文件列表,展示成功", list);
}
//下载资源文件
@GetMapping("downloadResource")
@ApiOperation("下载资源文件")

@ -14,22 +14,25 @@ public class SysCaseQuestion {
@ApiModelProperty("课程ID")
private String courseId;
@ApiModelProperty("课程名")
private String courseName;
@ApiModelProperty("章节ID")
private String chapterId;
@ApiModelProperty("章节名")
private String chapterName;
@ApiModelProperty("题目标题")
private String title;
@ApiModelProperty("题目内容")
private String content;
@ApiModelProperty("数据集地址 用 ,隔开")
private String resourceData;
@ApiModelProperty("输入类型 内置,新增 0为老师导入 1为内置")
private String inputType;
@ApiModelProperty("题目类型 / 暂不需要")
@ApiModelProperty("题目类型 0为基础 1为应用")
private String type;
@ApiModelProperty("学校id")
@ -38,6 +41,9 @@ public class SysCaseQuestion {
@ApiModelProperty("上下架状态")
private Boolean unmountStatus;
@ApiModelProperty("题目内容")
private String content;
public String getCaseId() {
return caseId;
}
@ -54,6 +60,14 @@ public class SysCaseQuestion {
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;
}
@ -62,20 +76,20 @@ public class SysCaseQuestion {
this.chapterId = chapterId == null ? null : chapterId.trim();
}
public String getTitle() {
return title;
public String getChapterName() {
return chapterName;
}
public void setTitle(String title) {
this.title = title == null ? null : title.trim();
public void setChapterName(String chapterName) {
this.chapterName = chapterName == null ? null : chapterName.trim();
}
public String getContent() {
return content;
public String getTitle() {
return title;
}
public void setContent(String content) {
this.content = content == null ? null : content.trim();
public void setTitle(String title) {
this.title = title == null ? null : title.trim();
}
public String getResourceData() {
@ -117,4 +131,12 @@ public class SysCaseQuestion {
public void setUnmountStatus(Boolean unmountStatus) {
this.unmountStatus = unmountStatus;
}
public String getContent() {
return content;
}
public void setContent(String content) {
this.content = content == null ? null : content.trim();
}
}

@ -244,6 +244,76 @@ public class SysCaseQuestionExample {
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<String> values) {
addCriterion("course_name in", values, "courseName");
return (Criteria) this;
}
public Criteria andCourseNameNotIn(List<String> 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;
@ -314,143 +384,143 @@ public class SysCaseQuestionExample {
return (Criteria) this;
}
public Criteria andTitleIsNull() {
addCriterion("title is null");
public Criteria andChapterNameIsNull() {
addCriterion("chapter_name is null");
return (Criteria) this;
}
public Criteria andTitleIsNotNull() {
addCriterion("title is not null");
public Criteria andChapterNameIsNotNull() {
addCriterion("chapter_name is not null");
return (Criteria) this;
}
public Criteria andTitleEqualTo(String value) {
addCriterion("title =", value, "title");
public Criteria andChapterNameEqualTo(String value) {
addCriterion("chapter_name =", value, "chapterName");
return (Criteria) this;
}
public Criteria andTitleNotEqualTo(String value) {
addCriterion("title <>", value, "title");
public Criteria andChapterNameNotEqualTo(String value) {
addCriterion("chapter_name <>", value, "chapterName");
return (Criteria) this;
}
public Criteria andTitleGreaterThan(String value) {
addCriterion("title >", value, "title");
public Criteria andChapterNameGreaterThan(String value) {
addCriterion("chapter_name >", value, "chapterName");
return (Criteria) this;
}
public Criteria andTitleGreaterThanOrEqualTo(String value) {
addCriterion("title >=", value, "title");
public Criteria andChapterNameGreaterThanOrEqualTo(String value) {
addCriterion("chapter_name >=", value, "chapterName");
return (Criteria) this;
}
public Criteria andTitleLessThan(String value) {
addCriterion("title <", value, "title");
public Criteria andChapterNameLessThan(String value) {
addCriterion("chapter_name <", value, "chapterName");
return (Criteria) this;
}
public Criteria andTitleLessThanOrEqualTo(String value) {
addCriterion("title <=", value, "title");
public Criteria andChapterNameLessThanOrEqualTo(String value) {
addCriterion("chapter_name <=", value, "chapterName");
return (Criteria) this;
}
public Criteria andTitleLike(String value) {
addCriterion("title like", value, "title");
public Criteria andChapterNameLike(String value) {
addCriterion("chapter_name like", value, "chapterName");
return (Criteria) this;
}
public Criteria andTitleNotLike(String value) {
addCriterion("title not like", value, "title");
public Criteria andChapterNameNotLike(String value) {
addCriterion("chapter_name not like", value, "chapterName");
return (Criteria) this;
}
public Criteria andTitleIn(List<String> values) {
addCriterion("title in", values, "title");
public Criteria andChapterNameIn(List<String> values) {
addCriterion("chapter_name in", values, "chapterName");
return (Criteria) this;
}
public Criteria andTitleNotIn(List<String> values) {
addCriterion("title not in", values, "title");
public Criteria andChapterNameNotIn(List<String> values) {
addCriterion("chapter_name not in", values, "chapterName");
return (Criteria) this;
}
public Criteria andTitleBetween(String value1, String value2) {
addCriterion("title between", value1, value2, "title");
public Criteria andChapterNameBetween(String value1, String value2) {
addCriterion("chapter_name between", value1, value2, "chapterName");
return (Criteria) this;
}
public Criteria andTitleNotBetween(String value1, String value2) {
addCriterion("title not between", value1, value2, "title");
public Criteria andChapterNameNotBetween(String value1, String value2) {
addCriterion("chapter_name not between", value1, value2, "chapterName");
return (Criteria) this;
}
public Criteria andContentIsNull() {
addCriterion("content is null");
public Criteria andTitleIsNull() {
addCriterion("title is null");
return (Criteria) this;
}
public Criteria andContentIsNotNull() {
addCriterion("content is not null");
public Criteria andTitleIsNotNull() {
addCriterion("title is not null");
return (Criteria) this;
}
public Criteria andContentEqualTo(String value) {
addCriterion("content =", value, "content");
public Criteria andTitleEqualTo(String value) {
addCriterion("title =", value, "title");
return (Criteria) this;
}
public Criteria andContentNotEqualTo(String value) {
addCriterion("content <>", value, "content");
public Criteria andTitleNotEqualTo(String value) {
addCriterion("title <>", value, "title");
return (Criteria) this;
}
public Criteria andContentGreaterThan(String value) {
addCriterion("content >", value, "content");
public Criteria andTitleGreaterThan(String value) {
addCriterion("title >", value, "title");
return (Criteria) this;
}
public Criteria andContentGreaterThanOrEqualTo(String value) {
addCriterion("content >=", value, "content");
public Criteria andTitleGreaterThanOrEqualTo(String value) {
addCriterion("title >=", value, "title");
return (Criteria) this;
}
public Criteria andContentLessThan(String value) {
addCriterion("content <", value, "content");
public Criteria andTitleLessThan(String value) {
addCriterion("title <", value, "title");
return (Criteria) this;
}
public Criteria andContentLessThanOrEqualTo(String value) {
addCriterion("content <=", value, "content");
public Criteria andTitleLessThanOrEqualTo(String value) {
addCriterion("title <=", value, "title");
return (Criteria) this;
}
public Criteria andContentLike(String value) {
addCriterion("content like", value, "content");
public Criteria andTitleLike(String value) {
addCriterion("title like", value, "title");
return (Criteria) this;
}
public Criteria andContentNotLike(String value) {
addCriterion("content not like", value, "content");
public Criteria andTitleNotLike(String value) {
addCriterion("title not like", value, "title");
return (Criteria) this;
}
public Criteria andContentIn(List<String> values) {
addCriterion("content in", values, "content");
public Criteria andTitleIn(List<String> values) {
addCriterion("title in", values, "title");
return (Criteria) this;
}
public Criteria andContentNotIn(List<String> values) {
addCriterion("content not in", values, "content");
public Criteria andTitleNotIn(List<String> values) {
addCriterion("title not in", values, "title");
return (Criteria) this;
}
public Criteria andContentBetween(String value1, String value2) {
addCriterion("content between", value1, value2, "content");
public Criteria andTitleBetween(String value1, String value2) {
addCriterion("title between", value1, value2, "title");
return (Criteria) this;
}
public Criteria andContentNotBetween(String value1, String value2) {
addCriterion("content not between", value1, value2, "content");
public Criteria andTitleNotBetween(String value1, String value2) {
addCriterion("title not between", value1, value2, "title");
return (Criteria) this;
}

@ -14,6 +14,9 @@ public class TeaResourceCenter {
@ApiModelProperty("课程ID")
private String courseId;
@ApiModelProperty("章节id")
private String chapterId;
@ApiModelProperty("资源地址")
private String resourceUrl;
@ -48,6 +51,14 @@ public class TeaResourceCenter {
this.courseId = courseId == null ? null : courseId.trim();
}
public String getChapterId() {
return chapterId;
}
public void setChapterId(String chapterId) {
this.chapterId = chapterId == null ? null : chapterId.trim();
}
public String getResourceUrl() {
return resourceUrl;
}

@ -244,6 +244,76 @@ public class TeaResourceCenterExample {
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<String> values) {
addCriterion("chapter_id in", values, "chapterId");
return (Criteria) this;
}
public Criteria andChapterIdNotIn(List<String> 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 andResourceUrlIsNull() {
addCriterion("resource_url is null");
return (Criteria) this;

@ -20,16 +20,22 @@ public interface SysCaseQuestionMapper {
int insertSelective(SysCaseQuestion record);
List<SysCaseQuestion> selectByExampleWithBLOBs(SysCaseQuestionExample example);
List<SysCaseQuestion> selectByExample(SysCaseQuestionExample example);
SysCaseQuestion selectByPrimaryKey(String caseId);
int updateByExampleSelective(@Param("record") SysCaseQuestion record, @Param("example") SysCaseQuestionExample example);
int updateByExampleWithBLOBs(@Param("record") SysCaseQuestion record, @Param("example") SysCaseQuestionExample example);
int updateByExample(@Param("record") SysCaseQuestion record, @Param("example") SysCaseQuestionExample example);
int updateByPrimaryKeySelective(SysCaseQuestion record);
int updateByPrimaryKeyWithBLOBs(SysCaseQuestion record);
int updateByPrimaryKey(SysCaseQuestion record);
@Select(" SELECT course_id FROM sys_course WHERE school_id = #{schoolId} order by sequence")

@ -7,8 +7,10 @@ import javax.servlet.http.HttpServletResponse;
import java.util.List;
public interface ITeaResourceCenterService {
Boolean uploadResource(MultipartFile file, String schoolId,String courseId,String type);
Boolean uploadResource(MultipartFile file, String schoolId,String courseId,String type,String chapterId);
List<TeaResourceCenter> selectResource(String schoolId, String courseId);
void downloadResource(String resourceId, HttpServletResponse response);
List<TeaResourceCenter> selectResourceByChapterId(String schoolId, String chapterId);
}

@ -117,6 +117,8 @@ public class TeaObjectiveServiceImpl implements ITeaObjectiveService {
String type = String.valueOf(currentRow.getCell(2).getNumericCellValue()); //题目类型
String score = String.valueOf(currentRow.getCell(3).getNumericCellValue()); //分数
String content = currentRow.getCell(4).getStringCellValue(); //题目内容
System.out.println(chapterName);
System.out.println("!!!"+content);
String question_a = "";
String question_b = "";
String question_c = "";
@ -132,12 +134,13 @@ public class TeaObjectiveServiceImpl implements ITeaObjectiveService {
}
String answer = currentRow.getCell(9).getStringCellValue();
String analyze = currentRow.getCell(10).getStringCellValue();
Cell cell = currentRow.getCell(10);
String analyze = (cell != null) ? cell.getStringCellValue() : "";
SysObjectiveQuestion obj = new SysObjectiveQuestion();
obj.setObjectiveId(String.valueOf(UUID.randomUUID()));
obj.setCourseId(courseMap.get(courseName));
obj.setCourseId(courseMap.get(chapterName));
obj.setCourseName(courseName);
obj.setChapterId(chapterMap.get(chapterName));
obj.setChapterName(chapterName);
@ -196,7 +199,8 @@ public class TeaObjectiveServiceImpl implements ITeaObjectiveService {
}
String answer = currentRow.getCell(8).getStringCellValue();
String analyze = currentRow.getCell(9).getStringCellValue();
Cell cell = currentRow.getCell(9);
String analyze = (cell != null) ? cell.getStringCellValue() : "";
SysObjectiveQuestion obj = new SysObjectiveQuestion();

@ -1,5 +1,6 @@
package com.sztzjy.financial_bigdata.service.tea.impl;
import com.sztzjy.financial_bigdata.config.Constant;
import com.sztzjy.financial_bigdata.entity.TeaResourceCenter;
import com.sztzjy.financial_bigdata.entity.TeaResourceCenterExample;
import com.sztzjy.financial_bigdata.mapper.TeaResourceCenterMapper;
@ -20,9 +21,10 @@ public class TeaResourceCenterServiceImpl implements ITeaResourceCenterService {
@Autowired
TeaResourceCenterMapper resourceCenterMapper;
@Override
public Boolean uploadResource(MultipartFile file, String schoolId,String courseId,String type) {
public Boolean uploadResource(MultipartFile file, String schoolId,String courseId,String type,String chapterId) {
String uploadUrl = fileUtil.upload(file);
TeaResourceCenter resourceCenter=new TeaResourceCenter();
resourceCenter.setChapterId(chapterId);
resourceCenter.setResourceId(String.valueOf(UUID.randomUUID()));
resourceCenter.setResourceName(file.getOriginalFilename());
resourceCenter.setResourceUrl(uploadUrl);
@ -58,4 +60,13 @@ public class TeaResourceCenterServiceImpl implements ITeaResourceCenterService {
}
}
@Override
public List<TeaResourceCenter> selectResourceByChapterId(String schoolId, String chapterId) {
TeaResourceCenterExample example=new TeaResourceCenterExample();
TeaResourceCenterExample.Criteria criteria = example.createCriteria();
criteria.andChapterIdEqualTo(chapterId).andSchoolIdEqualTo(schoolId);
List<TeaResourceCenter> teaResourceCenterList = resourceCenterMapper.selectByExample(example);
return teaResourceCenterList;
}
}

@ -4,15 +4,19 @@
<resultMap id="BaseResultMap" type="com.sztzjy.financial_bigdata.entity.SysCaseQuestion">
<id column="case_id" jdbcType="VARCHAR" property="caseId" />
<result column="course_id" jdbcType="VARCHAR" property="courseId" />
<result column="course_name" jdbcType="VARCHAR" property="courseName" />
<result column="chapter_id" jdbcType="VARCHAR" property="chapterId" />
<result column="chapter_name" jdbcType="VARCHAR" property="chapterName" />
<result column="title" jdbcType="VARCHAR" property="title" />
<result column="content" jdbcType="VARCHAR" property="content" />
<result column="resource_data" jdbcType="VARCHAR" property="resourceData" />
<result column="input_type" jdbcType="VARCHAR" property="inputType" />
<result column="type" jdbcType="VARCHAR" property="type" />
<result column="school_id" jdbcType="VARCHAR" property="schoolId" />
<result column="unmount_status" jdbcType="BIT" property="unmountStatus" />
</resultMap>
<resultMap extends="BaseResultMap" id="ResultMapWithBLOBs" type="com.sztzjy.financial_bigdata.entity.SysCaseQuestion">
<result column="content" jdbcType="LONGVARCHAR" property="content" />
</resultMap>
<sql id="Example_Where_Clause">
<where>
<foreach collection="oredCriteria" item="criteria" separator="or">
@ -72,9 +76,28 @@
</where>
</sql>
<sql id="Base_Column_List">
case_id, course_id, chapter_id, title, content, resource_data, input_type, type,
school_id, unmount_status
case_id, course_id, course_name, chapter_id, chapter_name, title, resource_data,
input_type, type, school_id, unmount_status
</sql>
<sql id="Blob_Column_List">
content
</sql>
<select id="selectByExampleWithBLOBs" parameterType="com.sztzjy.financial_bigdata.entity.SysCaseQuestionExample" resultMap="ResultMapWithBLOBs">
select
<if test="distinct">
distinct
</if>
<include refid="Base_Column_List" />
,
<include refid="Blob_Column_List" />
from sys_case_question
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
<if test="orderByClause != null">
order by ${orderByClause}
</if>
</select>
<select id="selectByExample" parameterType="com.sztzjy.financial_bigdata.entity.SysCaseQuestionExample" resultMap="BaseResultMap">
select
<if test="distinct">
@ -89,9 +112,11 @@
order by ${orderByClause}
</if>
</select>
<select id="selectByPrimaryKey" parameterType="java.lang.String" resultMap="BaseResultMap">
<select id="selectByPrimaryKey" parameterType="java.lang.String" resultMap="ResultMapWithBLOBs">
select
<include refid="Base_Column_List" />
,
<include refid="Blob_Column_List" />
from sys_case_question
where case_id = #{caseId,jdbcType=VARCHAR}
</select>
@ -106,14 +131,16 @@
</if>
</delete>
<insert id="insert" parameterType="com.sztzjy.financial_bigdata.entity.SysCaseQuestion">
insert into sys_case_question (case_id, course_id, chapter_id,
title, content, resource_data,
input_type, type, school_id,
unmount_status)
values (#{caseId,jdbcType=VARCHAR}, #{courseId,jdbcType=VARCHAR}, #{chapterId,jdbcType=VARCHAR},
#{title,jdbcType=VARCHAR}, #{content,jdbcType=VARCHAR}, #{resourceData,jdbcType=VARCHAR},
#{inputType,jdbcType=VARCHAR}, #{type,jdbcType=VARCHAR}, #{schoolId,jdbcType=VARCHAR},
#{unmountStatus,jdbcType=BIT})
insert into sys_case_question (case_id, course_id, course_name,
chapter_id, chapter_name, title,
resource_data, input_type, type,
school_id, unmount_status, content
)
values (#{caseId,jdbcType=VARCHAR}, #{courseId,jdbcType=VARCHAR}, #{courseName,jdbcType=VARCHAR},
#{chapterId,jdbcType=VARCHAR}, #{chapterName,jdbcType=VARCHAR}, #{title,jdbcType=VARCHAR},
#{resourceData,jdbcType=VARCHAR}, #{inputType,jdbcType=VARCHAR}, #{type,jdbcType=VARCHAR},
#{schoolId,jdbcType=VARCHAR}, #{unmountStatus,jdbcType=BIT}, #{content,jdbcType=LONGVARCHAR}
)
</insert>
<insert id="insertSelective" parameterType="com.sztzjy.financial_bigdata.entity.SysCaseQuestion">
insert into sys_case_question
@ -124,15 +151,18 @@
<if test="courseId != null">
course_id,
</if>
<if test="courseName != null">
course_name,
</if>
<if test="chapterId != null">
chapter_id,
</if>
<if test="chapterName != null">
chapter_name,
</if>
<if test="title != null">
title,
</if>
<if test="content != null">
content,
</if>
<if test="resourceData != null">
resource_data,
</if>
@ -148,6 +178,9 @@
<if test="unmountStatus != null">
unmount_status,
</if>
<if test="content != null">
content,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="caseId != null">
@ -156,15 +189,18 @@
<if test="courseId != null">
#{courseId,jdbcType=VARCHAR},
</if>
<if test="courseName != null">
#{courseName,jdbcType=VARCHAR},
</if>
<if test="chapterId != null">
#{chapterId,jdbcType=VARCHAR},
</if>
<if test="chapterName != null">
#{chapterName,jdbcType=VARCHAR},
</if>
<if test="title != null">
#{title,jdbcType=VARCHAR},
</if>
<if test="content != null">
#{content,jdbcType=VARCHAR},
</if>
<if test="resourceData != null">
#{resourceData,jdbcType=VARCHAR},
</if>
@ -180,6 +216,9 @@
<if test="unmountStatus != null">
#{unmountStatus,jdbcType=BIT},
</if>
<if test="content != null">
#{content,jdbcType=LONGVARCHAR},
</if>
</trim>
</insert>
<select id="countByExample" parameterType="com.sztzjy.financial_bigdata.entity.SysCaseQuestionExample" resultType="java.lang.Long">
@ -197,15 +236,18 @@
<if test="record.courseId != null">
course_id = #{record.courseId,jdbcType=VARCHAR},
</if>
<if test="record.courseName != null">
course_name = #{record.courseName,jdbcType=VARCHAR},
</if>
<if test="record.chapterId != null">
chapter_id = #{record.chapterId,jdbcType=VARCHAR},
</if>
<if test="record.chapterName != null">
chapter_name = #{record.chapterName,jdbcType=VARCHAR},
</if>
<if test="record.title != null">
title = #{record.title,jdbcType=VARCHAR},
</if>
<if test="record.content != null">
content = #{record.content,jdbcType=VARCHAR},
</if>
<if test="record.resourceData != null">
resource_data = #{record.resourceData,jdbcType=VARCHAR},
</if>
@ -221,18 +263,40 @@
<if test="record.unmountStatus != null">
unmount_status = #{record.unmountStatus,jdbcType=BIT},
</if>
<if test="record.content != null">
content = #{record.content,jdbcType=LONGVARCHAR},
</if>
</set>
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
</update>
<update id="updateByExampleWithBLOBs" parameterType="map">
update sys_case_question
set case_id = #{record.caseId,jdbcType=VARCHAR},
course_id = #{record.courseId,jdbcType=VARCHAR},
course_name = #{record.courseName,jdbcType=VARCHAR},
chapter_id = #{record.chapterId,jdbcType=VARCHAR},
chapter_name = #{record.chapterName,jdbcType=VARCHAR},
title = #{record.title,jdbcType=VARCHAR},
resource_data = #{record.resourceData,jdbcType=VARCHAR},
input_type = #{record.inputType,jdbcType=VARCHAR},
type = #{record.type,jdbcType=VARCHAR},
school_id = #{record.schoolId,jdbcType=VARCHAR},
unmount_status = #{record.unmountStatus,jdbcType=BIT},
content = #{record.content,jdbcType=LONGVARCHAR}
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
</update>
<update id="updateByExample" parameterType="map">
update sys_case_question
set case_id = #{record.caseId,jdbcType=VARCHAR},
course_id = #{record.courseId,jdbcType=VARCHAR},
course_name = #{record.courseName,jdbcType=VARCHAR},
chapter_id = #{record.chapterId,jdbcType=VARCHAR},
chapter_name = #{record.chapterName,jdbcType=VARCHAR},
title = #{record.title,jdbcType=VARCHAR},
content = #{record.content,jdbcType=VARCHAR},
resource_data = #{record.resourceData,jdbcType=VARCHAR},
input_type = #{record.inputType,jdbcType=VARCHAR},
type = #{record.type,jdbcType=VARCHAR},
@ -248,15 +312,18 @@
<if test="courseId != null">
course_id = #{courseId,jdbcType=VARCHAR},
</if>
<if test="courseName != null">
course_name = #{courseName,jdbcType=VARCHAR},
</if>
<if test="chapterId != null">
chapter_id = #{chapterId,jdbcType=VARCHAR},
</if>
<if test="chapterName != null">
chapter_name = #{chapterName,jdbcType=VARCHAR},
</if>
<if test="title != null">
title = #{title,jdbcType=VARCHAR},
</if>
<if test="content != null">
content = #{content,jdbcType=VARCHAR},
</if>
<if test="resourceData != null">
resource_data = #{resourceData,jdbcType=VARCHAR},
</if>
@ -272,15 +339,34 @@
<if test="unmountStatus != null">
unmount_status = #{unmountStatus,jdbcType=BIT},
</if>
<if test="content != null">
content = #{content,jdbcType=LONGVARCHAR},
</if>
</set>
where case_id = #{caseId,jdbcType=VARCHAR}
</update>
<update id="updateByPrimaryKeyWithBLOBs" parameterType="com.sztzjy.financial_bigdata.entity.SysCaseQuestion">
update sys_case_question
set course_id = #{courseId,jdbcType=VARCHAR},
course_name = #{courseName,jdbcType=VARCHAR},
chapter_id = #{chapterId,jdbcType=VARCHAR},
chapter_name = #{chapterName,jdbcType=VARCHAR},
title = #{title,jdbcType=VARCHAR},
resource_data = #{resourceData,jdbcType=VARCHAR},
input_type = #{inputType,jdbcType=VARCHAR},
type = #{type,jdbcType=VARCHAR},
school_id = #{schoolId,jdbcType=VARCHAR},
unmount_status = #{unmountStatus,jdbcType=BIT},
content = #{content,jdbcType=LONGVARCHAR}
where case_id = #{caseId,jdbcType=VARCHAR}
</update>
<update id="updateByPrimaryKey" parameterType="com.sztzjy.financial_bigdata.entity.SysCaseQuestion">
update sys_case_question
set course_id = #{courseId,jdbcType=VARCHAR},
course_name = #{courseName,jdbcType=VARCHAR},
chapter_id = #{chapterId,jdbcType=VARCHAR},
chapter_name = #{chapterName,jdbcType=VARCHAR},
title = #{title,jdbcType=VARCHAR},
content = #{content,jdbcType=VARCHAR},
resource_data = #{resourceData,jdbcType=VARCHAR},
input_type = #{inputType,jdbcType=VARCHAR},
type = #{type,jdbcType=VARCHAR},
@ -288,4 +374,4 @@
unmount_status = #{unmountStatus,jdbcType=BIT}
where case_id = #{caseId,jdbcType=VARCHAR}
</update>
</mapper>
</mapper>

@ -4,6 +4,7 @@
<resultMap id="BaseResultMap" type="com.sztzjy.financial_bigdata.entity.TeaResourceCenter">
<id column="resource_id" jdbcType="VARCHAR" property="resourceId" />
<result column="course_id" jdbcType="VARCHAR" property="courseId" />
<result column="chapter_id" jdbcType="VARCHAR" property="chapterId" />
<result column="resource_url" jdbcType="VARCHAR" property="resourceUrl" />
<result column="image_url" jdbcType="VARCHAR" property="imageUrl" />
<result column="resource_name" jdbcType="VARCHAR" property="resourceName" />
@ -70,8 +71,8 @@
</where>
</sql>
<sql id="Base_Column_List">
resource_id, course_id, resource_url, image_url, resource_name, school_id, type,
count
resource_id, course_id, chapter_id, resource_url, image_url, resource_name, school_id,
type, count
</sql>
<select id="selectByExample" parameterType="com.sztzjy.financial_bigdata.entity.TeaResourceCenterExample" resultMap="BaseResultMap">
select
@ -104,12 +105,14 @@
</if>
</delete>
<insert id="insert" parameterType="com.sztzjy.financial_bigdata.entity.TeaResourceCenter">
insert into tea_resource_center (resource_id, course_id, resource_url,
image_url, resource_name, school_id,
type, count)
values (#{resourceId,jdbcType=VARCHAR}, #{courseId,jdbcType=VARCHAR}, #{resourceUrl,jdbcType=VARCHAR},
#{imageUrl,jdbcType=VARCHAR}, #{resourceName,jdbcType=VARCHAR}, #{schoolId,jdbcType=VARCHAR},
#{type,jdbcType=VARCHAR}, #{count,jdbcType=INTEGER})
insert into tea_resource_center (resource_id, course_id, chapter_id,
resource_url, image_url, resource_name,
school_id, type, count
)
values (#{resourceId,jdbcType=VARCHAR}, #{courseId,jdbcType=VARCHAR}, #{chapterId,jdbcType=VARCHAR},
#{resourceUrl,jdbcType=VARCHAR}, #{imageUrl,jdbcType=VARCHAR}, #{resourceName,jdbcType=VARCHAR},
#{schoolId,jdbcType=VARCHAR}, #{type,jdbcType=VARCHAR}, #{count,jdbcType=INTEGER}
)
</insert>
<insert id="insertSelective" parameterType="com.sztzjy.financial_bigdata.entity.TeaResourceCenter">
insert into tea_resource_center
@ -120,6 +123,9 @@
<if test="courseId != null">
course_id,
</if>
<if test="chapterId != null">
chapter_id,
</if>
<if test="resourceUrl != null">
resource_url,
</if>
@ -146,6 +152,9 @@
<if test="courseId != null">
#{courseId,jdbcType=VARCHAR},
</if>
<if test="chapterId != null">
#{chapterId,jdbcType=VARCHAR},
</if>
<if test="resourceUrl != null">
#{resourceUrl,jdbcType=VARCHAR},
</if>
@ -181,6 +190,9 @@
<if test="record.courseId != null">
course_id = #{record.courseId,jdbcType=VARCHAR},
</if>
<if test="record.chapterId != null">
chapter_id = #{record.chapterId,jdbcType=VARCHAR},
</if>
<if test="record.resourceUrl != null">
resource_url = #{record.resourceUrl,jdbcType=VARCHAR},
</if>
@ -208,6 +220,7 @@
update tea_resource_center
set resource_id = #{record.resourceId,jdbcType=VARCHAR},
course_id = #{record.courseId,jdbcType=VARCHAR},
chapter_id = #{record.chapterId,jdbcType=VARCHAR},
resource_url = #{record.resourceUrl,jdbcType=VARCHAR},
image_url = #{record.imageUrl,jdbcType=VARCHAR},
resource_name = #{record.resourceName,jdbcType=VARCHAR},
@ -224,6 +237,9 @@
<if test="courseId != null">
course_id = #{courseId,jdbcType=VARCHAR},
</if>
<if test="chapterId != null">
chapter_id = #{chapterId,jdbcType=VARCHAR},
</if>
<if test="resourceUrl != null">
resource_url = #{resourceUrl,jdbcType=VARCHAR},
</if>
@ -248,6 +264,7 @@
<update id="updateByPrimaryKey" parameterType="com.sztzjy.financial_bigdata.entity.TeaResourceCenter">
update tea_resource_center
set course_id = #{courseId,jdbcType=VARCHAR},
chapter_id = #{chapterId,jdbcType=VARCHAR},
resource_url = #{resourceUrl,jdbcType=VARCHAR},
image_url = #{imageUrl,jdbcType=VARCHAR},
resource_name = #{resourceName,jdbcType=VARCHAR},

Loading…
Cancel
Save