xiaoCJ 8 months ago
parent ca73521faa
commit 859d962162

@ -15,12 +15,18 @@ public class SysTopicAndCourse {
@ApiModelProperty("一级目录ID/课程ID") @ApiModelProperty("一级目录ID/课程ID")
private String oneId; private String oneId;
private String oneName;
@ApiModelProperty("二级目录ID/章ID") @ApiModelProperty("二级目录ID/章ID")
private String twoId; private String twoId;
private String twoName;
@ApiModelProperty("三级目录ID/节ID") @ApiModelProperty("三级目录ID/节ID")
private String threeId; private String threeId;
private String threeName;
@ApiModelProperty("题目类型 0客观题 1案例题 2模型题") @ApiModelProperty("题目类型 0客观题 1案例题 2模型题")
private String topicType; private String topicType;
@ -48,6 +54,14 @@ public class SysTopicAndCourse {
this.oneId = oneId == null ? null : oneId.trim(); 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() { public String getTwoId() {
return twoId; return twoId;
} }
@ -56,6 +70,14 @@ public class SysTopicAndCourse {
this.twoId = twoId == null ? null : twoId.trim(); this.twoId = twoId == null ? null : twoId.trim();
} }
public String getTwoName() {
return twoName;
}
public void setTwoName(String twoName) {
this.twoName = twoName == null ? null : twoName.trim();
}
public String getThreeId() { public String getThreeId() {
return threeId; return threeId;
} }
@ -64,6 +86,14 @@ public class SysTopicAndCourse {
this.threeId = threeId == null ? null : threeId.trim(); this.threeId = threeId == null ? null : threeId.trim();
} }
public String getThreeName() {
return threeName;
}
public void setThreeName(String threeName) {
this.threeName = threeName == null ? null : threeName.trim();
}
public String getTopicType() { public String getTopicType() {
return topicType; return topicType;
} }

@ -314,6 +314,76 @@ public class SysTopicAndCourseExample {
return (Criteria) this; 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<String> values) {
addCriterion("one_name in", values, "oneName");
return (Criteria) this;
}
public Criteria andOneNameNotIn(List<String> 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() { public Criteria andTwoIdIsNull() {
addCriterion("two_id is null"); addCriterion("two_id is null");
return (Criteria) this; return (Criteria) this;
@ -384,6 +454,76 @@ public class SysTopicAndCourseExample {
return (Criteria) this; return (Criteria) this;
} }
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<String> values) {
addCriterion("two_name in", values, "twoName");
return (Criteria) this;
}
public Criteria andTwoNameNotIn(List<String> 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() { public Criteria andThreeIdIsNull() {
addCriterion("three_id is null"); addCriterion("three_id is null");
return (Criteria) this; return (Criteria) this;
@ -454,6 +594,76 @@ public class SysTopicAndCourseExample {
return (Criteria) this; return (Criteria) this;
} }
public Criteria andThreeNameIsNull() {
addCriterion("three_name is null");
return (Criteria) this;
}
public Criteria andThreeNameIsNotNull() {
addCriterion("three_name is not null");
return (Criteria) this;
}
public Criteria andThreeNameEqualTo(String value) {
addCriterion("three_name =", value, "threeName");
return (Criteria) this;
}
public Criteria andThreeNameNotEqualTo(String value) {
addCriterion("three_name <>", value, "threeName");
return (Criteria) this;
}
public Criteria andThreeNameGreaterThan(String value) {
addCriterion("three_name >", value, "threeName");
return (Criteria) this;
}
public Criteria andThreeNameGreaterThanOrEqualTo(String value) {
addCriterion("three_name >=", value, "threeName");
return (Criteria) this;
}
public Criteria andThreeNameLessThan(String value) {
addCriterion("three_name <", value, "threeName");
return (Criteria) this;
}
public Criteria andThreeNameLessThanOrEqualTo(String value) {
addCriterion("three_name <=", value, "threeName");
return (Criteria) this;
}
public Criteria andThreeNameLike(String value) {
addCriterion("three_name like", value, "threeName");
return (Criteria) this;
}
public Criteria andThreeNameNotLike(String value) {
addCriterion("three_name not like", value, "threeName");
return (Criteria) this;
}
public Criteria andThreeNameIn(List<String> values) {
addCriterion("three_name in", values, "threeName");
return (Criteria) this;
}
public Criteria andThreeNameNotIn(List<String> values) {
addCriterion("three_name not in", values, "threeName");
return (Criteria) this;
}
public Criteria andThreeNameBetween(String value1, String value2) {
addCriterion("three_name between", value1, value2, "threeName");
return (Criteria) this;
}
public Criteria andThreeNameNotBetween(String value1, String value2) {
addCriterion("three_name not between", value1, value2, "threeName");
return (Criteria) this;
}
public Criteria andTopicTypeIsNull() { public Criteria andTopicTypeIsNull() {
addCriterion("topic_type is null"); addCriterion("topic_type is null");
return (Criteria) this; return (Criteria) this;

@ -14,5 +14,8 @@ public class SysObjectiveQuestionsDto extends SysObjectiveQuestions {
private String oneID; private String oneID;
private String twoID; private String twoID;
private String threeID; private String threeID;
private String oneName;
private String twoName;
private String threeName;
private String topicAndCourseId; private String topicAndCourseId;
} }

@ -387,12 +387,15 @@
<result column="one_id" jdbcType="VARCHAR" property="oneID" /> <result column="one_id" jdbcType="VARCHAR" property="oneID" />
<result column="two_id" jdbcType="VARCHAR" property="twoID" /> <result column="two_id" jdbcType="VARCHAR" property="twoID" />
<result column="three_id" jdbcType="VARCHAR" property="threeId" /> <result column="three_id" jdbcType="VARCHAR" property="threeId" />
<result column="one_name" jdbcType="VARCHAR" property="oneName" />
<result column="two_name" jdbcType="VARCHAR" property="twoName" />
<result column="three_name" jdbcType="VARCHAR" property="threeName" />
</resultMap> </resultMap>
<!-- 条件查询--> <!-- 条件查询-->
<select id="selectTopicByConditions" parameterType="java.lang.String" resultMap="DtoMap"> <select id="selectTopicByConditions" parameterType="java.lang.String" resultMap="DtoMap">
SELECT sb.*,st.one_id,st.two_id,st.three_id,st.id SELECT sb.*,st.one_id,st.two_id,st.three_id,st.id,st.one_name,st.two_name,st.three_name
FROM sys_objective_question sb FROM sys_objective_questions sb
JOIN sys_topic_and_course st JOIN sys_topic_and_course st
on sb.objective_id = st.topic_id on sb.objective_id = st.topic_id
<where> <where>
@ -408,7 +411,7 @@
<if test="content != null and content != ''"> <if test="content != null and content != ''">
and sb.content = #{content} and sb.content = #{content}
</if> </if>
</where>> </where>
order by sb.create_time order by sb.create_time
</select> </select>

@ -5,8 +5,11 @@
<id column="id" jdbcType="VARCHAR" property="id" /> <id column="id" jdbcType="VARCHAR" property="id" />
<result column="topic_id" jdbcType="VARCHAR" property="topicId" /> <result column="topic_id" jdbcType="VARCHAR" property="topicId" />
<result column="one_id" jdbcType="VARCHAR" property="oneId" /> <result column="one_id" jdbcType="VARCHAR" property="oneId" />
<result column="one_name" jdbcType="VARCHAR" property="oneName" />
<result column="two_id" jdbcType="VARCHAR" property="twoId" /> <result column="two_id" jdbcType="VARCHAR" property="twoId" />
<result column="two_name" jdbcType="VARCHAR" property="twoName" />
<result column="three_id" jdbcType="VARCHAR" property="threeId" /> <result column="three_id" jdbcType="VARCHAR" property="threeId" />
<result column="three_name" jdbcType="VARCHAR" property="threeName" />
<result column="topic_type" jdbcType="VARCHAR" property="topicType" /> <result column="topic_type" jdbcType="VARCHAR" property="topicType" />
</resultMap> </resultMap>
<sql id="Example_Where_Clause"> <sql id="Example_Where_Clause">
@ -68,7 +71,7 @@
</where> </where>
</sql> </sql>
<sql id="Base_Column_List"> <sql id="Base_Column_List">
id, topic_id, one_id, two_id, three_id, topic_type id, topic_id, one_id, one_name, two_id, two_name, three_id, three_name, topic_type
</sql> </sql>
<select id="selectByExample" parameterType="com.sztzjy.resource_center.entity.SysTopicAndCourseExample" resultMap="BaseResultMap"> <select id="selectByExample" parameterType="com.sztzjy.resource_center.entity.SysTopicAndCourseExample" resultMap="BaseResultMap">
select select
@ -102,10 +105,12 @@
</delete> </delete>
<insert id="insert" parameterType="com.sztzjy.resource_center.entity.SysTopicAndCourse"> <insert id="insert" parameterType="com.sztzjy.resource_center.entity.SysTopicAndCourse">
insert into sys_topic_and_course (id, topic_id, one_id, insert into sys_topic_and_course (id, topic_id, one_id,
two_id, three_id, topic_type one_name, two_id, two_name,
three_id, three_name, topic_type
) )
values (#{id,jdbcType=VARCHAR}, #{topicId,jdbcType=VARCHAR}, #{oneId,jdbcType=VARCHAR}, values (#{id,jdbcType=VARCHAR}, #{topicId,jdbcType=VARCHAR}, #{oneId,jdbcType=VARCHAR},
#{twoId,jdbcType=VARCHAR}, #{threeId,jdbcType=VARCHAR}, #{topicType,jdbcType=VARCHAR} #{oneName,jdbcType=VARCHAR}, #{twoId,jdbcType=VARCHAR}, #{twoName,jdbcType=VARCHAR},
#{threeId,jdbcType=VARCHAR}, #{threeName,jdbcType=VARCHAR}, #{topicType,jdbcType=VARCHAR}
) )
</insert> </insert>
<insert id="insertSelective" parameterType="com.sztzjy.resource_center.entity.SysTopicAndCourse"> <insert id="insertSelective" parameterType="com.sztzjy.resource_center.entity.SysTopicAndCourse">
@ -120,12 +125,21 @@
<if test="oneId != null"> <if test="oneId != null">
one_id, one_id,
</if> </if>
<if test="oneName != null">
one_name,
</if>
<if test="twoId != null"> <if test="twoId != null">
two_id, two_id,
</if> </if>
<if test="twoName != null">
two_name,
</if>
<if test="threeId != null"> <if test="threeId != null">
three_id, three_id,
</if> </if>
<if test="threeName != null">
three_name,
</if>
<if test="topicType != null"> <if test="topicType != null">
topic_type, topic_type,
</if> </if>
@ -140,12 +154,21 @@
<if test="oneId != null"> <if test="oneId != null">
#{oneId,jdbcType=VARCHAR}, #{oneId,jdbcType=VARCHAR},
</if> </if>
<if test="oneName != null">
#{oneName,jdbcType=VARCHAR},
</if>
<if test="twoId != null"> <if test="twoId != null">
#{twoId,jdbcType=VARCHAR}, #{twoId,jdbcType=VARCHAR},
</if> </if>
<if test="twoName != null">
#{twoName,jdbcType=VARCHAR},
</if>
<if test="threeId != null"> <if test="threeId != null">
#{threeId,jdbcType=VARCHAR}, #{threeId,jdbcType=VARCHAR},
</if> </if>
<if test="threeName != null">
#{threeName,jdbcType=VARCHAR},
</if>
<if test="topicType != null"> <if test="topicType != null">
#{topicType,jdbcType=VARCHAR}, #{topicType,jdbcType=VARCHAR},
</if> </if>
@ -169,12 +192,21 @@
<if test="record.oneId != null"> <if test="record.oneId != null">
one_id = #{record.oneId,jdbcType=VARCHAR}, one_id = #{record.oneId,jdbcType=VARCHAR},
</if> </if>
<if test="record.oneName != null">
one_name = #{record.oneName,jdbcType=VARCHAR},
</if>
<if test="record.twoId != null"> <if test="record.twoId != null">
two_id = #{record.twoId,jdbcType=VARCHAR}, two_id = #{record.twoId,jdbcType=VARCHAR},
</if> </if>
<if test="record.twoName != null">
two_name = #{record.twoName,jdbcType=VARCHAR},
</if>
<if test="record.threeId != null"> <if test="record.threeId != null">
three_id = #{record.threeId,jdbcType=VARCHAR}, three_id = #{record.threeId,jdbcType=VARCHAR},
</if> </if>
<if test="record.threeName != null">
three_name = #{record.threeName,jdbcType=VARCHAR},
</if>
<if test="record.topicType != null"> <if test="record.topicType != null">
topic_type = #{record.topicType,jdbcType=VARCHAR}, topic_type = #{record.topicType,jdbcType=VARCHAR},
</if> </if>
@ -188,8 +220,11 @@
set id = #{record.id,jdbcType=VARCHAR}, set id = #{record.id,jdbcType=VARCHAR},
topic_id = #{record.topicId,jdbcType=VARCHAR}, topic_id = #{record.topicId,jdbcType=VARCHAR},
one_id = #{record.oneId,jdbcType=VARCHAR}, one_id = #{record.oneId,jdbcType=VARCHAR},
one_name = #{record.oneName,jdbcType=VARCHAR},
two_id = #{record.twoId,jdbcType=VARCHAR}, two_id = #{record.twoId,jdbcType=VARCHAR},
two_name = #{record.twoName,jdbcType=VARCHAR},
three_id = #{record.threeId,jdbcType=VARCHAR}, three_id = #{record.threeId,jdbcType=VARCHAR},
three_name = #{record.threeName,jdbcType=VARCHAR},
topic_type = #{record.topicType,jdbcType=VARCHAR} topic_type = #{record.topicType,jdbcType=VARCHAR}
<if test="_parameter != null"> <if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" /> <include refid="Update_By_Example_Where_Clause" />
@ -204,12 +239,21 @@
<if test="oneId != null"> <if test="oneId != null">
one_id = #{oneId,jdbcType=VARCHAR}, one_id = #{oneId,jdbcType=VARCHAR},
</if> </if>
<if test="oneName != null">
one_name = #{oneName,jdbcType=VARCHAR},
</if>
<if test="twoId != null"> <if test="twoId != null">
two_id = #{twoId,jdbcType=VARCHAR}, two_id = #{twoId,jdbcType=VARCHAR},
</if> </if>
<if test="twoName != null">
two_name = #{twoName,jdbcType=VARCHAR},
</if>
<if test="threeId != null"> <if test="threeId != null">
three_id = #{threeId,jdbcType=VARCHAR}, three_id = #{threeId,jdbcType=VARCHAR},
</if> </if>
<if test="threeName != null">
three_name = #{threeName,jdbcType=VARCHAR},
</if>
<if test="topicType != null"> <if test="topicType != null">
topic_type = #{topicType,jdbcType=VARCHAR}, topic_type = #{topicType,jdbcType=VARCHAR},
</if> </if>
@ -220,12 +264,14 @@
update sys_topic_and_course update sys_topic_and_course
set topic_id = #{topicId,jdbcType=VARCHAR}, set topic_id = #{topicId,jdbcType=VARCHAR},
one_id = #{oneId,jdbcType=VARCHAR}, one_id = #{oneId,jdbcType=VARCHAR},
one_name = #{oneName,jdbcType=VARCHAR},
two_id = #{twoId,jdbcType=VARCHAR}, two_id = #{twoId,jdbcType=VARCHAR},
two_name = #{twoName,jdbcType=VARCHAR},
three_id = #{threeId,jdbcType=VARCHAR}, three_id = #{threeId,jdbcType=VARCHAR},
three_name = #{threeName,jdbcType=VARCHAR},
topic_type = #{topicType,jdbcType=VARCHAR} topic_type = #{topicType,jdbcType=VARCHAR}
where id = #{id,jdbcType=VARCHAR} where id = #{id,jdbcType=VARCHAR}
</update> </update>
<!-- 批量新增 --> <!-- 批量新增 -->
<insert id="batchInsert" parameterType="java.util.List"> <insert id="batchInsert" parameterType="java.util.List">
INSERT INTO sys_resource_and_course (id, topic_id, one_id, two_id, three_id, topic_type) INSERT INTO sys_resource_and_course (id, topic_id, one_id, two_id, three_id, topic_type)
@ -234,10 +280,13 @@
( (
#{topic.id}, #{topic.id},
#{topic.topic_id}, #{topic.topic_id},
#{topic.topicType},
#{topic.oneId}, #{topic.oneId},
#{topic.twoId}, #{topic.oneName},
#{topic.twoId}
#{topic.threeId} #{topic.threeId}
#{topic.topicType} #{topic.twoName}
#{topic.threeName}
) )
</foreach> </foreach>
</insert> </insert>

Loading…
Cancel
Save