新增案例题相关内容

master
xiaoCJ 9 months ago
parent e6d90ab678
commit a923682de9

@ -16,10 +16,10 @@ public class Constant {
*/ */
public static final String ADMIN = "管理员"; public static final String ADMIN = "管理员";
// //
// public static final String BUILT_IN_SCHOOL_ID= "999999999"; public static final String BUILT_IN_SCHOOL_ID= "999999999";
// public static final String INPUT_TYPE_TEACHER= "0"; public static final String INPUT_TYPE_TEACHER= "0";
// public static final String INPUT_TYPE_BUILT_IN= "1"; public static final String INPUT_TYPE_BUILT_IN= "1";
//
// public static final String OBJECTIVE_TYPE_SINGLE= "0"; // public static final String OBJECTIVE_TYPE_SINGLE= "0";
// public static final String OBJECTIVE_TYPE_Many= "1"; // public static final String OBJECTIVE_TYPE_Many= "1";
// public static final String OBJECTIVE_TYPE_JUDGE= "2"; // public static final String OBJECTIVE_TYPE_JUDGE= "2";

@ -0,0 +1,75 @@
package com.sztzjy.resource_center.controller;
import cn.hutool.core.util.IdUtil;
import com.sztzjy.resource_center.annotation.AnonymousAccess;
import com.sztzjy.resource_center.entity.SysCaseQuestion;
import com.sztzjy.resource_center.entity.SysTopicAndCourse;
import com.sztzjy.resource_center.mapper.SysCaseQuestionMapper;
import com.sztzjy.resource_center.mapper.SysCaseQuestionStepMapper;
import com.sztzjy.resource_center.mapper.SysTopicAndCourseMapper;
import com.sztzjy.resource_center.util.ResultEntity;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.HttpStatus;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import java.util.Date;
/**
* @Author xcj
* @Date 2024/6/26
*/
@RestController
@Api(tags = "案例题")
@RequestMapping("api/sys/case")
public class CaseController {
@Autowired
private SysCaseQuestionStepMapper caseQuestionStepMapper;
@Autowired
private SysCaseQuestionMapper caseQuestionMapper;
@Autowired
private SysTopicAndCourseMapper topicAndCourseMapper;
@AnonymousAccess
@ApiOperation("案例题新增")
@PostMapping("insertCase")
public ResultEntity<HttpStatus> insertCase(@ApiParam("目前二级三级ID可以为空来源和题型要传,上架状态传true") @RequestBody SysCaseQuestion sysCaseQuestion) {
if (!("1").equals(sysCaseQuestion.getType())) {
return new ResultEntity<>(HttpStatus.BAD_REQUEST,"题型错误!");
}
if (StringUtils.isBlank(sysCaseQuestion.getOneId())) { //todo 目前二级三级ID可以为空
return new ResultEntity<>(HttpStatus.BAD_REQUEST,"课程不能为空!");
}
if (StringUtils.isBlank(sysCaseQuestion.getContent())||StringUtils.isBlank(sysCaseQuestion.getTitle())) {
return new ResultEntity<>(HttpStatus.BAD_REQUEST,"题目内容不能为空!");
}
if (StringUtils.isBlank(sysCaseQuestion.getSource())) {
return new ResultEntity<>(HttpStatus.BAD_REQUEST,"题目来源不能为空!");
}
String uuid = IdUtil.randomUUID();
sysCaseQuestion.setCaseId(uuid);
sysCaseQuestion.setCreateTime(new Date());
caseQuestionMapper.insert(sysCaseQuestion);
//新增绑定关系
SysTopicAndCourse sysTopicAndCourse =new SysTopicAndCourse();
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());
}
topicAndCourseMapper.insert(sysTopicAndCourse);
return new ResultEntity<>(HttpStatus.OK,"新增成功!");
}
}

@ -6,10 +6,13 @@ import org.springframework.web.bind.annotation.RestController;
/** /**
* @Author xcj * @Author xcj
* @Date 2024/6/18 * @Date 2024/6/26
*/ */
@Api(tags = "python案例")
@RestController @RestController
@RequestMapping("api/sys/case") @Api(tags = "案例题步骤")
public class PythonCaseController { @RequestMapping("api/sys/case/step")
public class CaseStepController {
} }

@ -1,7 +1,6 @@
package com.sztzjy.resource_center.controller; package com.sztzjy.resource_center.controller;
import cn.hutool.core.util.IdUtil; import cn.hutool.core.util.IdUtil;
import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo; import com.github.pagehelper.PageInfo;
import com.sztzjy.resource_center.annotation.AnonymousAccess; import com.sztzjy.resource_center.annotation.AnonymousAccess;
import com.sztzjy.resource_center.entity.SysResource; import com.sztzjy.resource_center.entity.SysResource;

@ -8,7 +8,7 @@ import org.springframework.web.bind.annotation.RestController;
* @Author xcj * @Author xcj
* @Date 2024/6/18 * @Date 2024/6/18
*/ */
@Api(tags = "python案例") @Api(tags = "python模型题")
@RestController @RestController
@RequestMapping("api/sys/model") @RequestMapping("api/sys/model")
public class PythonModelController { public class PythonModelController {

@ -7,44 +7,41 @@ import io.swagger.annotations.ApiModelProperty;
* *
* *
* @author xcj * @author xcj
* sys_case_question * sys_case_questions
*/ */
public class SysCaseQuestion { public class SysCaseQuestion {
@ApiModelProperty("案例题ID") @ApiModelProperty("案例题ID")
private String caseId; private String caseId;
@ApiModelProperty("课程ID")
private String courseId;
@ApiModelProperty("课程名")
private String courseName;
@ApiModelProperty("章节ID")
private String chapterId;
@ApiModelProperty("章节名")
private String chapterName;
@ApiModelProperty("题目标题") @ApiModelProperty("题目标题")
private String title; private String title;
@ApiModelProperty("数据集地址 ,隔开") @ApiModelProperty("数据集地址 /用,隔开")
private String resourceData; private String resourceData;
@ApiModelProperty("输入类型 内置,新增 0为老师导入 1为内置") @ApiModelProperty("来源 schoolid/内置")
private String inputType; private String source;
@ApiModelProperty("题目类型 0为基础 1为应用") @ApiModelProperty("题目类型 0为基础 1为应用 2为模型题")
private String type; private String type;
@ApiModelProperty("学校id") @ApiModelProperty("一级目录ID")
private String schoolId; private String oneId;
@ApiModelProperty("二级目录ID")
private String twoId;
@ApiModelProperty("三级目录ID")
private String three;
@ApiModelProperty("上下架状态") @ApiModelProperty("上下架状态")
private Boolean unmountStatus; private Boolean unmountStatus;
@ApiModelProperty("新增时间") @ApiModelProperty("创建时间")
private Date insertTime; private Date createTime;
@ApiModelProperty("修改时间")
private Date updateTime;
@ApiModelProperty("题目内容") @ApiModelProperty("题目内容")
private String content; private String content;
@ -57,38 +54,6 @@ public class SysCaseQuestion {
this.caseId = caseId == null ? null : caseId.trim(); this.caseId = caseId == null ? null : caseId.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 void setChapterName(String chapterName) {
this.chapterName = chapterName == null ? null : chapterName.trim();
}
public String getTitle() { public String getTitle() {
return title; return title;
} }
@ -105,12 +70,12 @@ public class SysCaseQuestion {
this.resourceData = resourceData == null ? null : resourceData.trim(); this.resourceData = resourceData == null ? null : resourceData.trim();
} }
public String getInputType() { public String getSource() {
return inputType; return source;
} }
public void setInputType(String inputType) { public void setSource(String source) {
this.inputType = inputType == null ? null : inputType.trim(); this.source = source == null ? null : source.trim();
} }
public String getType() { public String getType() {
@ -121,12 +86,28 @@ public class SysCaseQuestion {
this.type = type == null ? null : type.trim(); this.type = type == null ? null : type.trim();
} }
public String getSchoolId() { public String getOneId() {
return schoolId; return oneId;
}
public void setOneId(String oneId) {
this.oneId = oneId == null ? null : oneId.trim();
}
public String getTwoId() {
return twoId;
} }
public void setSchoolId(String schoolId) { public void setTwoId(String twoId) {
this.schoolId = schoolId == null ? null : schoolId.trim(); this.twoId = twoId == null ? null : twoId.trim();
}
public String getThree() {
return three;
}
public void setThree(String three) {
this.three = three == null ? null : three.trim();
} }
public Boolean getUnmountStatus() { public Boolean getUnmountStatus() {
@ -137,12 +118,20 @@ public class SysCaseQuestion {
this.unmountStatus = unmountStatus; this.unmountStatus = unmountStatus;
} }
public Date getInsertTime() { public Date getCreateTime() {
return insertTime; return createTime;
}
public void setCreateTime(Date createTime) {
this.createTime = createTime;
}
public Date getUpdateTime() {
return updateTime;
} }
public void setInsertTime(Date insertTime) { public void setUpdateTime(Date updateTime) {
this.insertTime = insertTime; this.updateTime = updateTime;
} }
public String getContent() { public String getContent() {

@ -6,7 +6,7 @@ import io.swagger.annotations.ApiModelProperty;
/** /**
* *
* @author xcj * @author xcj
* sys_case_question_step * sys_case_question_steps
*/ */
public class SysCaseQuestionStep { public class SysCaseQuestionStep {
@ApiModelProperty("案例题步骤id") @ApiModelProperty("案例题步骤id")

@ -4,7 +4,7 @@ import io.swagger.annotations.ApiModelProperty;
/** /**
* *
* @author xcj * @author xcj
* sys_case_question_step * sys_case_question_steps
*/ */
public class SysCaseQuestionStepWithBLOBs extends SysCaseQuestionStep { public class SysCaseQuestionStepWithBLOBs extends SysCaseQuestionStep {
@ApiModelProperty("步骤标题") @ApiModelProperty("步骤标题")

@ -3,8 +3,10 @@ package com.sztzjy.resource_center.mapper;
import com.sztzjy.resource_center.entity.SysCaseQuestion; import com.sztzjy.resource_center.entity.SysCaseQuestion;
import com.sztzjy.resource_center.entity.SysCaseQuestionExample; import com.sztzjy.resource_center.entity.SysCaseQuestionExample;
import java.util.List; import java.util.List;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
@Mapper
public interface SysCaseQuestionMapper { public interface SysCaseQuestionMapper {
long countByExample(SysCaseQuestionExample example); long countByExample(SysCaseQuestionExample example);

@ -4,8 +4,10 @@ import com.sztzjy.resource_center.entity.SysCaseQuestionStep;
import com.sztzjy.resource_center.entity.SysCaseQuestionStepExample; import com.sztzjy.resource_center.entity.SysCaseQuestionStepExample;
import com.sztzjy.resource_center.entity.SysCaseQuestionStepWithBLOBs; import com.sztzjy.resource_center.entity.SysCaseQuestionStepWithBLOBs;
import java.util.List; import java.util.List;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
@Mapper
public interface SysCaseQuestionStepMapper { public interface SysCaseQuestionStepMapper {
long countByExample(SysCaseQuestionStepExample example); long countByExample(SysCaseQuestionStepExample example);

@ -90,7 +90,7 @@
<include refid="Base_Column_List" /> <include refid="Base_Column_List" />
, ,
<include refid="Blob_Column_List" /> <include refid="Blob_Column_List" />
from sys_case_question from sys_case_questions
<if test="_parameter != null"> <if test="_parameter != null">
<include refid="Example_Where_Clause" /> <include refid="Example_Where_Clause" />
</if> </if>
@ -104,7 +104,7 @@
distinct distinct
</if> </if>
<include refid="Base_Column_List" /> <include refid="Base_Column_List" />
from sys_case_question from sys_case_questions
<if test="_parameter != null"> <if test="_parameter != null">
<include refid="Example_Where_Clause" /> <include refid="Example_Where_Clause" />
</if> </if>
@ -117,21 +117,21 @@
<include refid="Base_Column_List" /> <include refid="Base_Column_List" />
, ,
<include refid="Blob_Column_List" /> <include refid="Blob_Column_List" />
from sys_case_question from sys_case_questions
where case_id = #{caseId,jdbcType=VARCHAR} where case_id = #{caseId,jdbcType=VARCHAR}
</select> </select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.String"> <delete id="deleteByPrimaryKey" parameterType="java.lang.String">
delete from sys_case_question delete from sys_case_questions
where case_id = #{caseId,jdbcType=VARCHAR} where case_id = #{caseId,jdbcType=VARCHAR}
</delete> </delete>
<delete id="deleteByExample" parameterType="com.sztzjy.resource_center.entity.SysCaseQuestionExample"> <delete id="deleteByExample" parameterType="com.sztzjy.resource_center.entity.SysCaseQuestionExample">
delete from sys_case_question delete from sys_case_questions
<if test="_parameter != null"> <if test="_parameter != null">
<include refid="Example_Where_Clause" /> <include refid="Example_Where_Clause" />
</if> </if>
</delete> </delete>
<insert id="insert" parameterType="com.sztzjy.resource_center.entity.SysCaseQuestion"> <insert id="insert" parameterType="com.sztzjy.resource_center.entity.SysCaseQuestion">
insert into sys_case_question (case_id, title, resource_data, insert into sys_case_questions (case_id, title, resource_data,
source, type, one_id, source, type, one_id,
two_id, three, unmount_status, two_id, three, unmount_status,
create_time, update_time, content create_time, update_time, content
@ -143,7 +143,7 @@
) )
</insert> </insert>
<insert id="insertSelective" parameterType="com.sztzjy.resource_center.entity.SysCaseQuestion"> <insert id="insertSelective" parameterType="com.sztzjy.resource_center.entity.SysCaseQuestion">
insert into sys_case_question insert into sys_case_questions
<trim prefix="(" suffix=")" suffixOverrides=","> <trim prefix="(" suffix=")" suffixOverrides=",">
<if test="caseId != null"> <if test="caseId != null">
case_id, case_id,
@ -222,13 +222,13 @@
</trim> </trim>
</insert> </insert>
<select id="countByExample" parameterType="com.sztzjy.resource_center.entity.SysCaseQuestionExample" resultType="java.lang.Long"> <select id="countByExample" parameterType="com.sztzjy.resource_center.entity.SysCaseQuestionExample" resultType="java.lang.Long">
select count(*) from sys_case_question select count(*) from sys_case_questions
<if test="_parameter != null"> <if test="_parameter != null">
<include refid="Example_Where_Clause" /> <include refid="Example_Where_Clause" />
</if> </if>
</select> </select>
<update id="updateByExampleSelective" parameterType="map"> <update id="updateByExampleSelective" parameterType="map">
update sys_case_question update sys_case_questions
<set> <set>
<if test="record.caseId != null"> <if test="record.caseId != null">
case_id = #{record.caseId,jdbcType=VARCHAR}, case_id = #{record.caseId,jdbcType=VARCHAR},
@ -272,7 +272,7 @@
</if> </if>
</update> </update>
<update id="updateByExampleWithBLOBs" parameterType="map"> <update id="updateByExampleWithBLOBs" parameterType="map">
update sys_case_question update sys_case_questions
set case_id = #{record.caseId,jdbcType=VARCHAR}, set case_id = #{record.caseId,jdbcType=VARCHAR},
title = #{record.title,jdbcType=VARCHAR}, title = #{record.title,jdbcType=VARCHAR},
resource_data = #{record.resourceData,jdbcType=VARCHAR}, resource_data = #{record.resourceData,jdbcType=VARCHAR},
@ -290,7 +290,7 @@
</if> </if>
</update> </update>
<update id="updateByExample" parameterType="map"> <update id="updateByExample" parameterType="map">
update sys_case_question update sys_case_questions
set case_id = #{record.caseId,jdbcType=VARCHAR}, set case_id = #{record.caseId,jdbcType=VARCHAR},
title = #{record.title,jdbcType=VARCHAR}, title = #{record.title,jdbcType=VARCHAR},
resource_data = #{record.resourceData,jdbcType=VARCHAR}, resource_data = #{record.resourceData,jdbcType=VARCHAR},
@ -307,7 +307,7 @@
</if> </if>
</update> </update>
<update id="updateByPrimaryKeySelective" parameterType="com.sztzjy.resource_center.entity.SysCaseQuestion"> <update id="updateByPrimaryKeySelective" parameterType="com.sztzjy.resource_center.entity.SysCaseQuestion">
update sys_case_question update sys_case_questions
<set> <set>
<if test="title != null"> <if test="title != null">
title = #{title,jdbcType=VARCHAR}, title = #{title,jdbcType=VARCHAR},
@ -346,7 +346,7 @@
where case_id = #{caseId,jdbcType=VARCHAR} where case_id = #{caseId,jdbcType=VARCHAR}
</update> </update>
<update id="updateByPrimaryKeyWithBLOBs" parameterType="com.sztzjy.resource_center.entity.SysCaseQuestion"> <update id="updateByPrimaryKeyWithBLOBs" parameterType="com.sztzjy.resource_center.entity.SysCaseQuestion">
update sys_case_question update sys_case_questions
set title = #{title,jdbcType=VARCHAR}, set title = #{title,jdbcType=VARCHAR},
resource_data = #{resourceData,jdbcType=VARCHAR}, resource_data = #{resourceData,jdbcType=VARCHAR},
source = #{source,jdbcType=VARCHAR}, source = #{source,jdbcType=VARCHAR},
@ -361,7 +361,7 @@
where case_id = #{caseId,jdbcType=VARCHAR} where case_id = #{caseId,jdbcType=VARCHAR}
</update> </update>
<update id="updateByPrimaryKey" parameterType="com.sztzjy.resource_center.entity.SysCaseQuestion"> <update id="updateByPrimaryKey" parameterType="com.sztzjy.resource_center.entity.SysCaseQuestion">
update sys_case_question update sys_case_questions
set title = #{title,jdbcType=VARCHAR}, set title = #{title,jdbcType=VARCHAR},
resource_data = #{resourceData,jdbcType=VARCHAR}, resource_data = #{resourceData,jdbcType=VARCHAR},
source = #{source,jdbcType=VARCHAR}, source = #{source,jdbcType=VARCHAR},

@ -1,349 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.sztzjy.resource_center.mapper.SysCaseQuestionStepMapper"> <mapper namespace="com.sztzjy.resource_center.mapper.SysCaseQuestionStepMapper">
<!-- <resultMap id="BaseResultMap" type="com.sztzjy.resource_center.entity.SysCaseQuestionStep">-->
<!-- <id column="case_step_id" jdbcType="VARCHAR" property="caseStepId" />-->
<!-- <result column="case_id" jdbcType="VARCHAR" property="caseId" />-->
<!-- <result column="sort" jdbcType="INTEGER" property="sort" />-->
<!-- <result column="score" jdbcType="DECIMAL" property="score" />-->
<!-- </resultMap>-->
<!-- <resultMap extends="BaseResultMap" id="ResultMapWithBLOBs" type="com.sztzjy.resource_center.entity.SysCaseQuestionStepWithBLOBs">-->
<!-- <result column="title" jdbcType="LONGVARCHAR" property="title" />-->
<!-- <result column="content" jdbcType="LONGVARCHAR" property="content" />-->
<!-- <result column="question" jdbcType="LONGVARCHAR" property="question" />-->
<!-- <result column="answer" jdbcType="LONGVARCHAR" property="answer" />-->
<!-- <result column="content_original" jdbcType="LONGVARCHAR" property="contentOriginal" />-->
<!-- <result column="question_original" jdbcType="LONGVARCHAR" property="questionOriginal" />-->
<!-- <result column="answer_original" jdbcType="LONGVARCHAR" property="answerOriginal" />-->
<!-- </resultMap>-->
<!-- <sql id="Example_Where_Clause">-->
<!-- <where>-->
<!-- <foreach collection="oredCriteria" item="criteria" separator="or">-->
<!-- <if test="criteria.valid">-->
<!-- <trim prefix="(" prefixOverrides="and" suffix=")">-->
<!-- <foreach collection="criteria.criteria" item="criterion">-->
<!-- <choose>-->
<!-- <when test="criterion.noValue">-->
<!-- and ${criterion.condition}-->
<!-- </when>-->
<!-- <when test="criterion.singleValue">-->
<!-- and ${criterion.condition} #{criterion.value}-->
<!-- </when>-->
<!-- <when test="criterion.betweenValue">-->
<!-- and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}-->
<!-- </when>-->
<!-- <when test="criterion.listValue">-->
<!-- and ${criterion.condition}-->
<!-- <foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">-->
<!-- #{listItem}-->
<!-- </foreach>-->
<!-- </when>-->
<!-- </choose>-->
<!-- </foreach>-->
<!-- </trim>-->
<!-- </if>-->
<!-- </foreach>-->
<!-- </where>-->
<!-- </sql>-->
<!-- <sql id="Update_By_Example_Where_Clause">-->
<!-- <where>-->
<!-- <foreach collection="example.oredCriteria" item="criteria" separator="or">-->
<!-- <if test="criteria.valid">-->
<!-- <trim prefix="(" prefixOverrides="and" suffix=")">-->
<!-- <foreach collection="criteria.criteria" item="criterion">-->
<!-- <choose>-->
<!-- <when test="criterion.noValue">-->
<!-- and ${criterion.condition}-->
<!-- </when>-->
<!-- <when test="criterion.singleValue">-->
<!-- and ${criterion.condition} #{criterion.value}-->
<!-- </when>-->
<!-- <when test="criterion.betweenValue">-->
<!-- and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}-->
<!-- </when>-->
<!-- <when test="criterion.listValue">-->
<!-- and ${criterion.condition}-->
<!-- <foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">-->
<!-- #{listItem}-->
<!-- </foreach>-->
<!-- </when>-->
<!-- </choose>-->
<!-- </foreach>-->
<!-- </trim>-->
<!-- </if>-->
<!-- </foreach>-->
<!-- </where>-->
<!-- </sql>-->
<!-- <sql id="Base_Column_List">-->
<!-- case_step_id, case_id, sort, score-->
<!-- </sql>-->
<!-- <sql id="Blob_Column_List">-->
<!-- title, content, question, answer, content_original, question_original, answer_original-->
<!-- </sql>-->
<!-- <select id="selectByExampleWithBLOBs" parameterType="com.sztzjy.resource_center.entity.SysCaseQuestionStepExample" resultMap="ResultMapWithBLOBs">-->
<!-- select-->
<!-- <if test="distinct">-->
<!-- distinct-->
<!-- </if>-->
<!-- <include refid="Base_Column_List" />-->
<!-- ,-->
<!-- <include refid="Blob_Column_List" />-->
<!-- from sys_case_question_step-->
<!-- <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.resource_center.entity.SysCaseQuestionStepExample" resultMap="BaseResultMap">-->
<!-- select-->
<!-- <if test="distinct">-->
<!-- distinct-->
<!-- </if>-->
<!-- <include refid="Base_Column_List" />-->
<!-- from sys_case_question_step-->
<!-- <if test="_parameter != null">-->
<!-- <include refid="Example_Where_Clause" />-->
<!-- </if>-->
<!-- <if test="orderByClause != null">-->
<!-- order by ${orderByClause}-->
<!-- </if>-->
<!-- </select>-->
<!-- <select id="selectByPrimaryKey" parameterType="java.lang.String" resultMap="ResultMapWithBLOBs">-->
<!-- select -->
<!-- <include refid="Base_Column_List" />-->
<!-- ,-->
<!-- <include refid="Blob_Column_List" />-->
<!-- from sys_case_question_step-->
<!-- where case_step_id = #{caseStepId,jdbcType=VARCHAR}-->
<!-- </select>-->
<!-- <delete id="deleteByPrimaryKey" parameterType="java.lang.String">-->
<!-- delete from sys_case_question_step-->
<!-- where case_step_id = #{caseStepId,jdbcType=VARCHAR}-->
<!-- </delete>-->
<!-- <delete id="deleteByExample" parameterType="com.sztzjy.resource_center.entity.SysCaseQuestionStepExample">-->
<!-- delete from sys_case_question_step-->
<!-- <if test="_parameter != null">-->
<!-- <include refid="Example_Where_Clause" />-->
<!-- </if>-->
<!-- </delete>-->
<!-- <insert id="insert" parameterType="com.sztzjy.resource_center.entity.SysCaseQuestionStepWithBLOBs">-->
<!-- insert into sys_case_question_step (case_step_id, case_id, sort, -->
<!-- score, title, content, -->
<!-- question, answer, content_original, -->
<!-- question_original, answer_original-->
<!-- )-->
<!-- values (#{caseStepId,jdbcType=VARCHAR}, #{caseId,jdbcType=VARCHAR}, #{sort,jdbcType=INTEGER}, -->
<!-- #{score,jdbcType=DECIMAL}, #{title,jdbcType=LONGVARCHAR}, #{content,jdbcType=LONGVARCHAR}, -->
<!-- #{question,jdbcType=LONGVARCHAR}, #{answer,jdbcType=LONGVARCHAR}, #{contentOriginal,jdbcType=LONGVARCHAR}, -->
<!-- #{questionOriginal,jdbcType=LONGVARCHAR}, #{answerOriginal,jdbcType=LONGVARCHAR}-->
<!-- )-->
<!-- </insert>-->
<!-- <insert id="insertSelective" parameterType="com.sztzjy.resource_center.entity.SysCaseQuestionStepWithBLOBs">-->
<!-- insert into sys_case_question_step-->
<!-- <trim prefix="(" suffix=")" suffixOverrides=",">-->
<!-- <if test="caseStepId != null">-->
<!-- case_step_id,-->
<!-- </if>-->
<!-- <if test="caseId != null">-->
<!-- case_id,-->
<!-- </if>-->
<!-- <if test="sort != null">-->
<!-- sort,-->
<!-- </if>-->
<!-- <if test="score != null">-->
<!-- score,-->
<!-- </if>-->
<!-- <if test="title != null">-->
<!-- title,-->
<!-- </if>-->
<!-- <if test="content != null">-->
<!-- content,-->
<!-- </if>-->
<!-- <if test="question != null">-->
<!-- question,-->
<!-- </if>-->
<!-- <if test="answer != null">-->
<!-- answer,-->
<!-- </if>-->
<!-- <if test="contentOriginal != null">-->
<!-- content_original,-->
<!-- </if>-->
<!-- <if test="questionOriginal != null">-->
<!-- question_original,-->
<!-- </if>-->
<!-- <if test="answerOriginal != null">-->
<!-- answer_original,-->
<!-- </if>-->
<!-- </trim>-->
<!-- <trim prefix="values (" suffix=")" suffixOverrides=",">-->
<!-- <if test="caseStepId != null">-->
<!-- #{caseStepId,jdbcType=VARCHAR},-->
<!-- </if>-->
<!-- <if test="caseId != null">-->
<!-- #{caseId,jdbcType=VARCHAR},-->
<!-- </if>-->
<!-- <if test="sort != null">-->
<!-- #{sort,jdbcType=INTEGER},-->
<!-- </if>-->
<!-- <if test="score != null">-->
<!-- #{score,jdbcType=DECIMAL},-->
<!-- </if>-->
<!-- <if test="title != null">-->
<!-- #{title,jdbcType=LONGVARCHAR},-->
<!-- </if>-->
<!-- <if test="content != null">-->
<!-- #{content,jdbcType=LONGVARCHAR},-->
<!-- </if>-->
<!-- <if test="question != null">-->
<!-- #{question,jdbcType=LONGVARCHAR},-->
<!-- </if>-->
<!-- <if test="answer != null">-->
<!-- #{answer,jdbcType=LONGVARCHAR},-->
<!-- </if>-->
<!-- <if test="contentOriginal != null">-->
<!-- #{contentOriginal,jdbcType=LONGVARCHAR},-->
<!-- </if>-->
<!-- <if test="questionOriginal != null">-->
<!-- #{questionOriginal,jdbcType=LONGVARCHAR},-->
<!-- </if>-->
<!-- <if test="answerOriginal != null">-->
<!-- #{answerOriginal,jdbcType=LONGVARCHAR},-->
<!-- </if>-->
<!-- </trim>-->
<!-- </insert>-->
<!-- <select id="countByExample" parameterType="com.sztzjy.resource_center.entity.SysCaseQuestionStepExample" resultType="java.lang.Long">-->
<!-- select count(*) from sys_case_question_step-->
<!-- <if test="_parameter != null">-->
<!-- <include refid="Example_Where_Clause" />-->
<!-- </if>-->
<!-- </select>-->
<!-- <update id="updateByExampleSelective" parameterType="map">-->
<!-- update sys_case_question_step-->
<!-- <set>-->
<!-- <if test="record.caseStepId != null">-->
<!-- case_step_id = #{record.caseStepId,jdbcType=VARCHAR},-->
<!-- </if>-->
<!-- <if test="record.caseId != null">-->
<!-- case_id = #{record.caseId,jdbcType=VARCHAR},-->
<!-- </if>-->
<!-- <if test="record.sort != null">-->
<!-- sort = #{record.sort,jdbcType=INTEGER},-->
<!-- </if>-->
<!-- <if test="record.score != null">-->
<!-- score = #{record.score,jdbcType=DECIMAL},-->
<!-- </if>-->
<!-- <if test="record.title != null">-->
<!-- title = #{record.title,jdbcType=LONGVARCHAR},-->
<!-- </if>-->
<!-- <if test="record.content != null">-->
<!-- content = #{record.content,jdbcType=LONGVARCHAR},-->
<!-- </if>-->
<!-- <if test="record.question != null">-->
<!-- question = #{record.question,jdbcType=LONGVARCHAR},-->
<!-- </if>-->
<!-- <if test="record.answer != null">-->
<!-- answer = #{record.answer,jdbcType=LONGVARCHAR},-->
<!-- </if>-->
<!-- <if test="record.contentOriginal != null">-->
<!-- content_original = #{record.contentOriginal,jdbcType=LONGVARCHAR},-->
<!-- </if>-->
<!-- <if test="record.questionOriginal != null">-->
<!-- question_original = #{record.questionOriginal,jdbcType=LONGVARCHAR},-->
<!-- </if>-->
<!-- <if test="record.answerOriginal != null">-->
<!-- answer_original = #{record.answerOriginal,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_step-->
<!-- set case_step_id = #{record.caseStepId,jdbcType=VARCHAR},-->
<!-- case_id = #{record.caseId,jdbcType=VARCHAR},-->
<!-- sort = #{record.sort,jdbcType=INTEGER},-->
<!-- score = #{record.score,jdbcType=DECIMAL},-->
<!-- title = #{record.title,jdbcType=LONGVARCHAR},-->
<!-- content = #{record.content,jdbcType=LONGVARCHAR},-->
<!-- question = #{record.question,jdbcType=LONGVARCHAR},-->
<!-- answer = #{record.answer,jdbcType=LONGVARCHAR},-->
<!-- content_original = #{record.contentOriginal,jdbcType=LONGVARCHAR},-->
<!-- question_original = #{record.questionOriginal,jdbcType=LONGVARCHAR},-->
<!-- answer_original = #{record.answerOriginal,jdbcType=LONGVARCHAR}-->
<!-- <if test="_parameter != null">-->
<!-- <include refid="Update_By_Example_Where_Clause" />-->
<!-- </if>-->
<!-- </update>-->
<!-- <update id="updateByExample" parameterType="map">-->
<!-- update sys_case_question_step-->
<!-- set case_step_id = #{record.caseStepId,jdbcType=VARCHAR},-->
<!-- case_id = #{record.caseId,jdbcType=VARCHAR},-->
<!-- sort = #{record.sort,jdbcType=INTEGER},-->
<!-- score = #{record.score,jdbcType=DECIMAL}-->
<!-- <if test="_parameter != null">-->
<!-- <include refid="Update_By_Example_Where_Clause" />-->
<!-- </if>-->
<!-- </update>-->
<!-- <update id="updateByPrimaryKeySelective" parameterType="com.sztzjy.resource_center.entity.SysCaseQuestionStepWithBLOBs">-->
<!-- update sys_case_question_step-->
<!-- <set>-->
<!-- <if test="caseId != null">-->
<!-- case_id = #{caseId,jdbcType=VARCHAR},-->
<!-- </if>-->
<!-- <if test="sort != null">-->
<!-- sort = #{sort,jdbcType=INTEGER},-->
<!-- </if>-->
<!-- <if test="score != null">-->
<!-- score = #{score,jdbcType=DECIMAL},-->
<!-- </if>-->
<!-- <if test="title != null">-->
<!-- title = #{title,jdbcType=LONGVARCHAR},-->
<!-- </if>-->
<!-- <if test="content != null">-->
<!-- content = #{content,jdbcType=LONGVARCHAR},-->
<!-- </if>-->
<!-- <if test="question != null">-->
<!-- question = #{question,jdbcType=LONGVARCHAR},-->
<!-- </if>-->
<!-- <if test="answer != null">-->
<!-- answer = #{answer,jdbcType=LONGVARCHAR},-->
<!-- </if>-->
<!-- <if test="contentOriginal != null">-->
<!-- content_original = #{contentOriginal,jdbcType=LONGVARCHAR},-->
<!-- </if>-->
<!-- <if test="questionOriginal != null">-->
<!-- question_original = #{questionOriginal,jdbcType=LONGVARCHAR},-->
<!-- </if>-->
<!-- <if test="answerOriginal != null">-->
<!-- answer_original = #{answerOriginal,jdbcType=LONGVARCHAR},-->
<!-- </if>-->
<!-- </set>-->
<!-- where case_step_id = #{caseStepId,jdbcType=VARCHAR}-->
<!-- </update>-->
<!-- <update id="updateByPrimaryKeyWithBLOBs" parameterType="com.sztzjy.resource_center.entity.SysCaseQuestionStepWithBLOBs">-->
<!-- update sys_case_question_step-->
<!-- set case_id = #{caseId,jdbcType=VARCHAR},-->
<!-- sort = #{sort,jdbcType=INTEGER},-->
<!-- score = #{score,jdbcType=DECIMAL},-->
<!-- title = #{title,jdbcType=LONGVARCHAR},-->
<!-- content = #{content,jdbcType=LONGVARCHAR},-->
<!-- question = #{question,jdbcType=LONGVARCHAR},-->
<!-- answer = #{answer,jdbcType=LONGVARCHAR},-->
<!-- content_original = #{contentOriginal,jdbcType=LONGVARCHAR},-->
<!-- question_original = #{questionOriginal,jdbcType=LONGVARCHAR},-->
<!-- answer_original = #{answerOriginal,jdbcType=LONGVARCHAR}-->
<!-- where case_step_id = #{caseStepId,jdbcType=VARCHAR}-->
<!-- </update>-->
<!-- <update id="updateByPrimaryKey" parameterType="com.sztzjy.resource_center.entity.SysCaseQuestionStep">-->
<!-- update sys_case_question_step-->
<!-- set case_id = #{caseId,jdbcType=VARCHAR},-->
<!-- sort = #{sort,jdbcType=INTEGER},-->
<!-- score = #{score,jdbcType=DECIMAL}-->
<!-- where case_step_id = #{caseStepId,jdbcType=VARCHAR}-->
<!-- </update>-->
<resultMap id="BaseResultMap" type="com.sztzjy.resource_center.entity.SysCaseQuestionStep"> <resultMap id="BaseResultMap" type="com.sztzjy.resource_center.entity.SysCaseQuestionStep">
<id column="case_step_id" jdbcType="VARCHAR" property="caseStepId" /> <id column="case_step_id" jdbcType="VARCHAR" property="caseStepId" />
<result column="case_id" jdbcType="VARCHAR" property="caseId" /> <result column="case_id" jdbcType="VARCHAR" property="caseId" />
@ -431,7 +88,7 @@
<include refid="Base_Column_List" /> <include refid="Base_Column_List" />
, ,
<include refid="Blob_Column_List" /> <include refid="Blob_Column_List" />
from sys_case_question_step from sys_case_question_steps
<if test="_parameter != null"> <if test="_parameter != null">
<include refid="Example_Where_Clause" /> <include refid="Example_Where_Clause" />
</if> </if>
@ -445,7 +102,7 @@
distinct distinct
</if> </if>
<include refid="Base_Column_List" /> <include refid="Base_Column_List" />
from sys_case_question_step from sys_case_question_steps
<if test="_parameter != null"> <if test="_parameter != null">
<include refid="Example_Where_Clause" /> <include refid="Example_Where_Clause" />
</if> </if>
@ -458,21 +115,21 @@
<include refid="Base_Column_List" /> <include refid="Base_Column_List" />
, ,
<include refid="Blob_Column_List" /> <include refid="Blob_Column_List" />
from sys_case_question_step from sys_case_question_steps
where case_step_id = #{caseStepId,jdbcType=VARCHAR} where case_step_id = #{caseStepId,jdbcType=VARCHAR}
</select> </select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.String"> <delete id="deleteByPrimaryKey" parameterType="java.lang.String">
delete from sys_case_question_step delete from sys_case_question_steps
where case_step_id = #{caseStepId,jdbcType=VARCHAR} where case_step_id = #{caseStepId,jdbcType=VARCHAR}
</delete> </delete>
<delete id="deleteByExample" parameterType="com.sztzjy.resource_center.entity.SysCaseQuestionStepExample"> <delete id="deleteByExample" parameterType="com.sztzjy.resource_center.entity.SysCaseQuestionStepExample">
delete from sys_case_question_step delete from sys_case_question_steps
<if test="_parameter != null"> <if test="_parameter != null">
<include refid="Example_Where_Clause" /> <include refid="Example_Where_Clause" />
</if> </if>
</delete> </delete>
<insert id="insert" parameterType="com.sztzjy.resource_center.entity.SysCaseQuestionStepWithBLOBs"> <insert id="insert" parameterType="com.sztzjy.resource_center.entity.SysCaseQuestionStepWithBLOBs">
insert into sys_case_question_step (case_step_id, case_id, sort, insert into sys_case_question_steps (case_step_id, case_id, sort,
score, title, content, score, title, content,
question, answer, content_original, question, answer, content_original,
question_original, answer_original question_original, answer_original
@ -484,7 +141,7 @@
) )
</insert> </insert>
<insert id="insertSelective" parameterType="com.sztzjy.resource_center.entity.SysCaseQuestionStepWithBLOBs"> <insert id="insertSelective" parameterType="com.sztzjy.resource_center.entity.SysCaseQuestionStepWithBLOBs">
insert into sys_case_question_step insert into sys_case_question_steps
<trim prefix="(" suffix=")" suffixOverrides=","> <trim prefix="(" suffix=")" suffixOverrides=",">
<if test="caseStepId != null"> <if test="caseStepId != null">
case_step_id, case_step_id,
@ -557,13 +214,13 @@
</trim> </trim>
</insert> </insert>
<select id="countByExample" parameterType="com.sztzjy.resource_center.entity.SysCaseQuestionStepExample" resultType="java.lang.Long"> <select id="countByExample" parameterType="com.sztzjy.resource_center.entity.SysCaseQuestionStepExample" resultType="java.lang.Long">
select count(*) from sys_case_question_step select count(*) from sys_case_question_steps
<if test="_parameter != null"> <if test="_parameter != null">
<include refid="Example_Where_Clause" /> <include refid="Example_Where_Clause" />
</if> </if>
</select> </select>
<update id="updateByExampleSelective" parameterType="map"> <update id="updateByExampleSelective" parameterType="map">
update sys_case_question_step update sys_case_question_steps
<set> <set>
<if test="record.caseStepId != null"> <if test="record.caseStepId != null">
case_step_id = #{record.caseStepId,jdbcType=VARCHAR}, case_step_id = #{record.caseStepId,jdbcType=VARCHAR},
@ -604,7 +261,7 @@
</if> </if>
</update> </update>
<update id="updateByExampleWithBLOBs" parameterType="map"> <update id="updateByExampleWithBLOBs" parameterType="map">
update sys_case_question_step update sys_case_question_steps
set case_step_id = #{record.caseStepId,jdbcType=VARCHAR}, set case_step_id = #{record.caseStepId,jdbcType=VARCHAR},
case_id = #{record.caseId,jdbcType=VARCHAR}, case_id = #{record.caseId,jdbcType=VARCHAR},
sort = #{record.sort,jdbcType=INTEGER}, sort = #{record.sort,jdbcType=INTEGER},
@ -621,7 +278,7 @@
</if> </if>
</update> </update>
<update id="updateByExample" parameterType="map"> <update id="updateByExample" parameterType="map">
update sys_case_question_step update sys_case_question_steps
set case_step_id = #{record.caseStepId,jdbcType=VARCHAR}, set case_step_id = #{record.caseStepId,jdbcType=VARCHAR},
case_id = #{record.caseId,jdbcType=VARCHAR}, case_id = #{record.caseId,jdbcType=VARCHAR},
sort = #{record.sort,jdbcType=INTEGER}, sort = #{record.sort,jdbcType=INTEGER},
@ -631,7 +288,7 @@
</if> </if>
</update> </update>
<update id="updateByPrimaryKeySelective" parameterType="com.sztzjy.resource_center.entity.SysCaseQuestionStepWithBLOBs"> <update id="updateByPrimaryKeySelective" parameterType="com.sztzjy.resource_center.entity.SysCaseQuestionStepWithBLOBs">
update sys_case_question_step update sys_case_question_steps
<set> <set>
<if test="caseId != null"> <if test="caseId != null">
case_id = #{caseId,jdbcType=VARCHAR}, case_id = #{caseId,jdbcType=VARCHAR},
@ -667,7 +324,7 @@
where case_step_id = #{caseStepId,jdbcType=VARCHAR} where case_step_id = #{caseStepId,jdbcType=VARCHAR}
</update> </update>
<update id="updateByPrimaryKeyWithBLOBs" parameterType="com.sztzjy.resource_center.entity.SysCaseQuestionStepWithBLOBs"> <update id="updateByPrimaryKeyWithBLOBs" parameterType="com.sztzjy.resource_center.entity.SysCaseQuestionStepWithBLOBs">
update sys_case_question_step update sys_case_question_steps
set case_id = #{caseId,jdbcType=VARCHAR}, set case_id = #{caseId,jdbcType=VARCHAR},
sort = #{sort,jdbcType=INTEGER}, sort = #{sort,jdbcType=INTEGER},
score = #{score,jdbcType=DECIMAL}, score = #{score,jdbcType=DECIMAL},
@ -681,7 +338,7 @@
where case_step_id = #{caseStepId,jdbcType=VARCHAR} where case_step_id = #{caseStepId,jdbcType=VARCHAR}
</update> </update>
<update id="updateByPrimaryKey" parameterType="com.sztzjy.resource_center.entity.SysCaseQuestionStep"> <update id="updateByPrimaryKey" parameterType="com.sztzjy.resource_center.entity.SysCaseQuestionStep">
update sys_case_question_step update sys_case_question_steps
set case_id = #{caseId,jdbcType=VARCHAR}, set case_id = #{caseId,jdbcType=VARCHAR},
sort = #{sort,jdbcType=INTEGER}, sort = #{sort,jdbcType=INTEGER},
score = #{score,jdbcType=DECIMAL} score = #{score,jdbcType=DECIMAL}

Loading…
Cancel
Save