新增三方接口
parent
6b35c97fb0
commit
dfcb513a1b
@ -1,293 +1,298 @@
|
|||||||
<?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.SysTopicAndCourseMapper">
|
<mapper namespace="com.sztzjy.resource_center.mapper.SysTopicAndCourseMapper">
|
||||||
<resultMap id="BaseResultMap" type="com.sztzjy.resource_center.entity.SysTopicAndCourse">
|
<resultMap id="BaseResultMap" type="com.sztzjy.resource_center.entity.SysTopicAndCourse">
|
||||||
<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="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="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="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">
|
||||||
<where>
|
<where>
|
||||||
<foreach collection="oredCriteria" item="criteria" separator="or">
|
<foreach collection="oredCriteria" item="criteria" separator="or">
|
||||||
<if test="criteria.valid">
|
<if test="criteria.valid">
|
||||||
<trim prefix="(" prefixOverrides="and" suffix=")">
|
<trim prefix="(" prefixOverrides="and" suffix=")">
|
||||||
<foreach collection="criteria.criteria" item="criterion">
|
<foreach collection="criteria.criteria" item="criterion">
|
||||||
<choose>
|
<choose>
|
||||||
<when test="criterion.noValue">
|
<when test="criterion.noValue">
|
||||||
and ${criterion.condition}
|
and ${criterion.condition}
|
||||||
</when>
|
</when>
|
||||||
<when test="criterion.singleValue">
|
<when test="criterion.singleValue">
|
||||||
and ${criterion.condition} #{criterion.value}
|
and ${criterion.condition} #{criterion.value}
|
||||||
</when>
|
</when>
|
||||||
<when test="criterion.betweenValue">
|
<when test="criterion.betweenValue">
|
||||||
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
|
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
|
||||||
</when>
|
</when>
|
||||||
<when test="criterion.listValue">
|
<when test="criterion.listValue">
|
||||||
and ${criterion.condition}
|
and ${criterion.condition}
|
||||||
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
|
<foreach close=")" collection="criterion.value" item="listItem" open="("
|
||||||
#{listItem}
|
separator=",">
|
||||||
</foreach>
|
#{listItem}
|
||||||
</when>
|
</foreach>
|
||||||
</choose>
|
</when>
|
||||||
|
</choose>
|
||||||
|
</foreach>
|
||||||
|
</trim>
|
||||||
|
</if>
|
||||||
</foreach>
|
</foreach>
|
||||||
</trim>
|
</where>
|
||||||
</if>
|
</sql>
|
||||||
</foreach>
|
<sql id="Update_By_Example_Where_Clause">
|
||||||
</where>
|
<where>
|
||||||
</sql>
|
<foreach collection="example.oredCriteria" item="criteria" separator="or">
|
||||||
<sql id="Update_By_Example_Where_Clause">
|
<if test="criteria.valid">
|
||||||
<where>
|
<trim prefix="(" prefixOverrides="and" suffix=")">
|
||||||
<foreach collection="example.oredCriteria" item="criteria" separator="or">
|
<foreach collection="criteria.criteria" item="criterion">
|
||||||
<if test="criteria.valid">
|
<choose>
|
||||||
<trim prefix="(" prefixOverrides="and" suffix=")">
|
<when test="criterion.noValue">
|
||||||
<foreach collection="criteria.criteria" item="criterion">
|
and ${criterion.condition}
|
||||||
<choose>
|
</when>
|
||||||
<when test="criterion.noValue">
|
<when test="criterion.singleValue">
|
||||||
and ${criterion.condition}
|
and ${criterion.condition} #{criterion.value}
|
||||||
</when>
|
</when>
|
||||||
<when test="criterion.singleValue">
|
<when test="criterion.betweenValue">
|
||||||
and ${criterion.condition} #{criterion.value}
|
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
|
||||||
</when>
|
</when>
|
||||||
<when test="criterion.betweenValue">
|
<when test="criterion.listValue">
|
||||||
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
|
and ${criterion.condition}
|
||||||
</when>
|
<foreach close=")" collection="criterion.value" item="listItem" open="("
|
||||||
<when test="criterion.listValue">
|
separator=",">
|
||||||
and ${criterion.condition}
|
#{listItem}
|
||||||
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
|
</foreach>
|
||||||
#{listItem}
|
</when>
|
||||||
</foreach>
|
</choose>
|
||||||
</when>
|
</foreach>
|
||||||
</choose>
|
</trim>
|
||||||
|
</if>
|
||||||
</foreach>
|
</foreach>
|
||||||
</trim>
|
</where>
|
||||||
|
</sql>
|
||||||
|
<sql id="Base_Column_List">
|
||||||
|
id
|
||||||
|
, topic_id, one_id, one_name, two_id, two_name, three_id, three_name, topic_type
|
||||||
|
</sql>
|
||||||
|
<select id="selectByExample" parameterType="com.sztzjy.resource_center.entity.SysTopicAndCourseExample"
|
||||||
|
resultMap="BaseResultMap">
|
||||||
|
select
|
||||||
|
<if test="distinct">
|
||||||
|
distinct
|
||||||
|
</if>
|
||||||
|
<include refid="Base_Column_List"/>
|
||||||
|
from sys_topic_and_course
|
||||||
|
<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="BaseResultMap">
|
||||||
|
select
|
||||||
|
<include refid="Base_Column_List"/>
|
||||||
|
from sys_topic_and_course
|
||||||
|
where id = #{id,jdbcType=VARCHAR}
|
||||||
|
</select>
|
||||||
|
<delete id="deleteByPrimaryKey" parameterType="java.lang.String">
|
||||||
|
delete
|
||||||
|
from sys_topic_and_course
|
||||||
|
where id = #{id,jdbcType=VARCHAR}
|
||||||
|
</delete>
|
||||||
|
<delete id="deleteByExample" parameterType="com.sztzjy.resource_center.entity.SysTopicAndCourseExample">
|
||||||
|
delete from sys_topic_and_course
|
||||||
|
<if test="_parameter != null">
|
||||||
|
<include refid="Example_Where_Clause"/>
|
||||||
</if>
|
</if>
|
||||||
</foreach>
|
</delete>
|
||||||
</where>
|
<insert id="insert" parameterType="com.sztzjy.resource_center.entity.SysTopicAndCourse">
|
||||||
</sql>
|
insert into sys_topic_and_course (id, topic_id, one_id,
|
||||||
<sql id="Base_Column_List">
|
one_name, two_id, two_name,
|
||||||
id, topic_id, one_id, one_name, two_id, two_name, three_id, three_name, topic_type
|
three_id, three_name, topic_type)
|
||||||
</sql>
|
values (#{id,jdbcType=VARCHAR}, #{topicId,jdbcType=VARCHAR}, #{oneId,jdbcType=VARCHAR},
|
||||||
<select id="selectByExample" parameterType="com.sztzjy.resource_center.entity.SysTopicAndCourseExample" resultMap="BaseResultMap">
|
#{oneName,jdbcType=VARCHAR}, #{twoId,jdbcType=VARCHAR}, #{twoName,jdbcType=VARCHAR},
|
||||||
select
|
#{threeId,jdbcType=VARCHAR}, #{threeName,jdbcType=VARCHAR}, #{topicType,jdbcType=VARCHAR})
|
||||||
<if test="distinct">
|
</insert>
|
||||||
distinct
|
<insert id="insertSelective" parameterType="com.sztzjy.resource_center.entity.SysTopicAndCourse">
|
||||||
</if>
|
insert into sys_topic_and_course
|
||||||
<include refid="Base_Column_List" />
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||||
from sys_topic_and_course
|
<if test="id != null">
|
||||||
<if test="_parameter != null">
|
id,
|
||||||
<include refid="Example_Where_Clause" />
|
</if>
|
||||||
</if>
|
<if test="topicId != null">
|
||||||
<if test="orderByClause != null">
|
topic_id,
|
||||||
order by ${orderByClause}
|
</if>
|
||||||
</if>
|
<if test="oneId != null">
|
||||||
</select>
|
one_id,
|
||||||
<select id="selectByPrimaryKey" parameterType="java.lang.String" resultMap="BaseResultMap">
|
</if>
|
||||||
select
|
<if test="oneName != null">
|
||||||
<include refid="Base_Column_List" />
|
one_name,
|
||||||
from sys_topic_and_course
|
</if>
|
||||||
where id = #{id,jdbcType=VARCHAR}
|
<if test="twoId != null">
|
||||||
</select>
|
two_id,
|
||||||
<delete id="deleteByPrimaryKey" parameterType="java.lang.String">
|
</if>
|
||||||
delete from sys_topic_and_course
|
<if test="twoName != null">
|
||||||
where id = #{id,jdbcType=VARCHAR}
|
two_name,
|
||||||
</delete>
|
</if>
|
||||||
<delete id="deleteByExample" parameterType="com.sztzjy.resource_center.entity.SysTopicAndCourseExample">
|
<if test="threeId != null">
|
||||||
delete from sys_topic_and_course
|
three_id,
|
||||||
<if test="_parameter != null">
|
</if>
|
||||||
<include refid="Example_Where_Clause" />
|
<if test="threeName != null">
|
||||||
</if>
|
three_name,
|
||||||
</delete>
|
</if>
|
||||||
<insert id="insert" parameterType="com.sztzjy.resource_center.entity.SysTopicAndCourse">
|
<if test="topicType != null">
|
||||||
insert into sys_topic_and_course (id, topic_id, one_id,
|
topic_type,
|
||||||
one_name, two_id, two_name,
|
</if>
|
||||||
three_id, three_name, topic_type
|
</trim>
|
||||||
)
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||||
values (#{id,jdbcType=VARCHAR}, #{topicId,jdbcType=VARCHAR}, #{oneId,jdbcType=VARCHAR},
|
<if test="id != null">
|
||||||
#{oneName,jdbcType=VARCHAR}, #{twoId,jdbcType=VARCHAR}, #{twoName,jdbcType=VARCHAR},
|
#{id,jdbcType=VARCHAR},
|
||||||
#{threeId,jdbcType=VARCHAR}, #{threeName,jdbcType=VARCHAR}, #{topicType,jdbcType=VARCHAR}
|
</if>
|
||||||
)
|
<if test="topicId != null">
|
||||||
</insert>
|
#{topicId,jdbcType=VARCHAR},
|
||||||
<insert id="insertSelective" parameterType="com.sztzjy.resource_center.entity.SysTopicAndCourse">
|
</if>
|
||||||
insert into sys_topic_and_course
|
<if test="oneId != null">
|
||||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
#{oneId,jdbcType=VARCHAR},
|
||||||
<if test="id != null">
|
</if>
|
||||||
id,
|
<if test="oneName != null">
|
||||||
</if>
|
#{oneName,jdbcType=VARCHAR},
|
||||||
<if test="topicId != null">
|
</if>
|
||||||
topic_id,
|
<if test="twoId != null">
|
||||||
</if>
|
#{twoId,jdbcType=VARCHAR},
|
||||||
<if test="oneId != null">
|
</if>
|
||||||
one_id,
|
<if test="twoName != null">
|
||||||
</if>
|
#{twoName,jdbcType=VARCHAR},
|
||||||
<if test="oneName != null">
|
</if>
|
||||||
one_name,
|
<if test="threeId != null">
|
||||||
</if>
|
#{threeId,jdbcType=VARCHAR},
|
||||||
<if test="twoId != null">
|
</if>
|
||||||
two_id,
|
<if test="threeName != null">
|
||||||
</if>
|
#{threeName,jdbcType=VARCHAR},
|
||||||
<if test="twoName != null">
|
</if>
|
||||||
two_name,
|
<if test="topicType != null">
|
||||||
</if>
|
#{topicType,jdbcType=VARCHAR},
|
||||||
<if test="threeId != null">
|
</if>
|
||||||
three_id,
|
</trim>
|
||||||
</if>
|
</insert>
|
||||||
<if test="threeName != null">
|
<select id="countByExample" parameterType="com.sztzjy.resource_center.entity.SysTopicAndCourseExample"
|
||||||
three_name,
|
resultType="java.lang.Long">
|
||||||
</if>
|
select count(*) from sys_topic_and_course
|
||||||
<if test="topicType != null">
|
<if test="_parameter != null">
|
||||||
topic_type,
|
<include refid="Example_Where_Clause"/>
|
||||||
</if>
|
</if>
|
||||||
</trim>
|
</select>
|
||||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
<update id="updateByExampleSelective" parameterType="map">
|
||||||
<if test="id != null">
|
update sys_topic_and_course
|
||||||
#{id,jdbcType=VARCHAR},
|
<set>
|
||||||
</if>
|
<if test="record.id != null">
|
||||||
<if test="topicId != null">
|
id = #{record.id,jdbcType=VARCHAR},
|
||||||
#{topicId,jdbcType=VARCHAR},
|
</if>
|
||||||
</if>
|
<if test="record.topicId != null">
|
||||||
<if test="oneId != null">
|
topic_id = #{record.topicId,jdbcType=VARCHAR},
|
||||||
#{oneId,jdbcType=VARCHAR},
|
</if>
|
||||||
</if>
|
<if test="record.oneId != null">
|
||||||
<if test="oneName != null">
|
one_id = #{record.oneId,jdbcType=VARCHAR},
|
||||||
#{oneName,jdbcType=VARCHAR},
|
</if>
|
||||||
</if>
|
<if test="record.oneName != null">
|
||||||
<if test="twoId != null">
|
one_name = #{record.oneName,jdbcType=VARCHAR},
|
||||||
#{twoId,jdbcType=VARCHAR},
|
</if>
|
||||||
</if>
|
<if test="record.twoId != null">
|
||||||
<if test="twoName != null">
|
two_id = #{record.twoId,jdbcType=VARCHAR},
|
||||||
#{twoName,jdbcType=VARCHAR},
|
</if>
|
||||||
</if>
|
<if test="record.twoName != null">
|
||||||
<if test="threeId != null">
|
two_name = #{record.twoName,jdbcType=VARCHAR},
|
||||||
#{threeId,jdbcType=VARCHAR},
|
</if>
|
||||||
</if>
|
<if test="record.threeId != null">
|
||||||
<if test="threeName != null">
|
three_id = #{record.threeId,jdbcType=VARCHAR},
|
||||||
#{threeName,jdbcType=VARCHAR},
|
</if>
|
||||||
</if>
|
<if test="record.threeName != null">
|
||||||
<if test="topicType != null">
|
three_name = #{record.threeName,jdbcType=VARCHAR},
|
||||||
#{topicType,jdbcType=VARCHAR},
|
</if>
|
||||||
</if>
|
<if test="record.topicType != null">
|
||||||
</trim>
|
topic_type = #{record.topicType,jdbcType=VARCHAR},
|
||||||
</insert>
|
</if>
|
||||||
<select id="countByExample" parameterType="com.sztzjy.resource_center.entity.SysTopicAndCourseExample" resultType="java.lang.Long">
|
</set>
|
||||||
select count(*) from sys_topic_and_course
|
<if test="_parameter != null">
|
||||||
<if test="_parameter != null">
|
<include refid="Update_By_Example_Where_Clause"/>
|
||||||
<include refid="Example_Where_Clause" />
|
</if>
|
||||||
</if>
|
</update>
|
||||||
</select>
|
<update id="updateByExample" parameterType="map">
|
||||||
<update id="updateByExampleSelective" parameterType="map">
|
update sys_topic_and_course
|
||||||
update sys_topic_and_course
|
set id = #{record.id,jdbcType=VARCHAR},
|
||||||
<set>
|
|
||||||
<if test="record.id != null">
|
|
||||||
id = #{record.id,jdbcType=VARCHAR},
|
|
||||||
</if>
|
|
||||||
<if test="record.topicId != null">
|
|
||||||
topic_id = #{record.topicId,jdbcType=VARCHAR},
|
topic_id = #{record.topicId,jdbcType=VARCHAR},
|
||||||
</if>
|
|
||||||
<if test="record.oneId != null">
|
|
||||||
one_id = #{record.oneId,jdbcType=VARCHAR},
|
one_id = #{record.oneId,jdbcType=VARCHAR},
|
||||||
</if>
|
|
||||||
<if test="record.oneName != null">
|
|
||||||
one_name = #{record.oneName,jdbcType=VARCHAR},
|
one_name = #{record.oneName,jdbcType=VARCHAR},
|
||||||
</if>
|
|
||||||
<if test="record.twoId != null">
|
|
||||||
two_id = #{record.twoId,jdbcType=VARCHAR},
|
two_id = #{record.twoId,jdbcType=VARCHAR},
|
||||||
</if>
|
|
||||||
<if test="record.twoName != null">
|
|
||||||
two_name = #{record.twoName,jdbcType=VARCHAR},
|
two_name = #{record.twoName,jdbcType=VARCHAR},
|
||||||
</if>
|
|
||||||
<if test="record.threeId != null">
|
|
||||||
three_id = #{record.threeId,jdbcType=VARCHAR},
|
three_id = #{record.threeId,jdbcType=VARCHAR},
|
||||||
</if>
|
|
||||||
<if test="record.threeName != null">
|
|
||||||
three_name = #{record.threeName,jdbcType=VARCHAR},
|
three_name = #{record.threeName,jdbcType=VARCHAR},
|
||||||
</if>
|
topic_type = #{record.topicType,jdbcType=VARCHAR}
|
||||||
<if test="record.topicType != null">
|
<if test="_parameter != null">
|
||||||
topic_type = #{record.topicType,jdbcType=VARCHAR},
|
<include refid="Update_By_Example_Where_Clause"/>
|
||||||
</if>
|
</if>
|
||||||
</set>
|
</update>
|
||||||
<if test="_parameter != null">
|
<update id="updateByPrimaryKeySelective" parameterType="com.sztzjy.resource_center.entity.SysTopicAndCourse">
|
||||||
<include refid="Update_By_Example_Where_Clause" />
|
update sys_topic_and_course
|
||||||
</if>
|
<set>
|
||||||
</update>
|
<if test="topicId != null">
|
||||||
<update id="updateByExample" parameterType="map">
|
topic_id = #{topicId,jdbcType=VARCHAR},
|
||||||
update sys_topic_and_course
|
</if>
|
||||||
set id = #{record.id,jdbcType=VARCHAR},
|
<if test="oneId != null">
|
||||||
topic_id = #{record.topicId,jdbcType=VARCHAR},
|
one_id = #{oneId,jdbcType=VARCHAR},
|
||||||
one_id = #{record.oneId,jdbcType=VARCHAR},
|
</if>
|
||||||
one_name = #{record.oneName,jdbcType=VARCHAR},
|
<if test="oneName != null">
|
||||||
two_id = #{record.twoId,jdbcType=VARCHAR},
|
one_name = #{oneName,jdbcType=VARCHAR},
|
||||||
two_name = #{record.twoName,jdbcType=VARCHAR},
|
</if>
|
||||||
three_id = #{record.threeId,jdbcType=VARCHAR},
|
<if test="twoId != null">
|
||||||
three_name = #{record.threeName,jdbcType=VARCHAR},
|
two_id = #{twoId,jdbcType=VARCHAR},
|
||||||
topic_type = #{record.topicType,jdbcType=VARCHAR}
|
</if>
|
||||||
<if test="_parameter != null">
|
<if test="twoName != null">
|
||||||
<include refid="Update_By_Example_Where_Clause" />
|
two_name = #{twoName,jdbcType=VARCHAR},
|
||||||
</if>
|
</if>
|
||||||
</update>
|
<if test="threeId != null">
|
||||||
<update id="updateByPrimaryKeySelective" parameterType="com.sztzjy.resource_center.entity.SysTopicAndCourse">
|
three_id = #{threeId,jdbcType=VARCHAR},
|
||||||
update sys_topic_and_course
|
</if>
|
||||||
<set>
|
<if test="threeName != null">
|
||||||
<if test="topicId != null">
|
three_name = #{threeName,jdbcType=VARCHAR},
|
||||||
topic_id = #{topicId,jdbcType=VARCHAR},
|
</if>
|
||||||
</if>
|
<if test="topicType != null">
|
||||||
<if test="oneId != null">
|
topic_type = #{topicType,jdbcType=VARCHAR},
|
||||||
one_id = #{oneId,jdbcType=VARCHAR},
|
</if>
|
||||||
</if>
|
</set>
|
||||||
<if test="oneName != null">
|
where id = #{id,jdbcType=VARCHAR}
|
||||||
one_name = #{oneName,jdbcType=VARCHAR},
|
</update>
|
||||||
</if>
|
<update id="updateByPrimaryKey" parameterType="com.sztzjy.resource_center.entity.SysTopicAndCourse">
|
||||||
<if test="twoId != null">
|
update sys_topic_and_course
|
||||||
two_id = #{twoId,jdbcType=VARCHAR},
|
set topic_id = #{topicId,jdbcType=VARCHAR},
|
||||||
</if>
|
one_id = #{oneId,jdbcType=VARCHAR},
|
||||||
<if test="twoName != null">
|
one_name = #{oneName,jdbcType=VARCHAR},
|
||||||
two_name = #{twoName,jdbcType=VARCHAR},
|
two_id = #{twoId,jdbcType=VARCHAR},
|
||||||
</if>
|
two_name = #{twoName,jdbcType=VARCHAR},
|
||||||
<if test="threeId != null">
|
three_id = #{threeId,jdbcType=VARCHAR},
|
||||||
three_id = #{threeId,jdbcType=VARCHAR},
|
three_name = #{threeName,jdbcType=VARCHAR},
|
||||||
</if>
|
topic_type = #{topicType,jdbcType=VARCHAR}
|
||||||
<if test="threeName != null">
|
where id = #{id,jdbcType=VARCHAR}
|
||||||
three_name = #{threeName,jdbcType=VARCHAR},
|
</update>
|
||||||
</if>
|
<!-- 批量新增 -->
|
||||||
<if test="topicType != null">
|
<insert id="batchInsert" parameterType="java.util.List">
|
||||||
topic_type = #{topicType,jdbcType=VARCHAR},
|
INSERT INTO sys_topic_and_course (id, topic_id, one_id,one_name, two_id,two_name, three_id,
|
||||||
</if>
|
three_name,topic_type)
|
||||||
</set>
|
VALUES
|
||||||
where id = #{id,jdbcType=VARCHAR}
|
<foreach collection="list" item="topic" separator=",">
|
||||||
</update>
|
(
|
||||||
<update id="updateByPrimaryKey" parameterType="com.sztzjy.resource_center.entity.SysTopicAndCourse">
|
#{topic.id},
|
||||||
update sys_topic_and_course
|
#{topic.topicId},
|
||||||
set topic_id = #{topicId,jdbcType=VARCHAR},
|
#{topic.oneId},
|
||||||
one_id = #{oneId,jdbcType=VARCHAR},
|
#{topic.oneName},
|
||||||
one_name = #{oneName,jdbcType=VARCHAR},
|
#{topic.twoId},
|
||||||
two_id = #{twoId,jdbcType=VARCHAR},
|
#{topic.twoName},
|
||||||
two_name = #{twoName,jdbcType=VARCHAR},
|
#{topic.threeId},
|
||||||
three_id = #{threeId,jdbcType=VARCHAR},
|
#{topic.threeName},
|
||||||
three_name = #{threeName,jdbcType=VARCHAR},
|
#{topic.topicType}
|
||||||
topic_type = #{topicType,jdbcType=VARCHAR}
|
)
|
||||||
where id = #{id,jdbcType=VARCHAR}
|
</foreach>
|
||||||
</update>
|
</insert>
|
||||||
<!-- 批量新增 -->
|
|
||||||
<insert id="batchInsert" parameterType="java.util.List">
|
|
||||||
INSERT INTO sys_resource_and_course (id, topic_id, one_id, two_id, three_id, topic_type)
|
|
||||||
VALUES
|
|
||||||
<foreach collection="list" item="topic" separator=",">
|
|
||||||
(
|
|
||||||
#{topic.id},
|
|
||||||
#{topic.topic_id},
|
|
||||||
#{topic.topicType},
|
|
||||||
#{topic.oneId},
|
|
||||||
#{topic.oneName},
|
|
||||||
#{topic.twoId}
|
|
||||||
#{topic.threeId}
|
|
||||||
#{topic.twoName}
|
|
||||||
#{topic.threeName}
|
|
||||||
)
|
|
||||||
</foreach>
|
|
||||||
</insert>
|
|
||||||
</mapper>
|
</mapper>
|
Loading…
Reference in New Issue