|
|
@ -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>
|
|
|
|