|
|
@@ -7,25 +7,27 @@
|
|
|
<result column="status" jdbcType="INTEGER" property="status" />
|
|
|
<result column="create_by" jdbcType="VARCHAR" property="createBy" />
|
|
|
<result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
|
|
|
+ <result column="tid" jdbcType="INTEGER" property="tid" />
|
|
|
</resultMap>
|
|
|
<sql id="Base_Column_List">
|
|
|
- id, `type`, `status`, create_by, create_time
|
|
|
+ id, `type`, `status`, create_by, create_time, tid
|
|
|
</sql>
|
|
|
<select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap">
|
|
|
- select
|
|
|
+ select
|
|
|
<include refid="Base_Column_List" />
|
|
|
from task_sopt
|
|
|
where id = #{id,jdbcType=BIGINT}
|
|
|
</select>
|
|
|
+
|
|
|
<delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
|
|
|
delete from task_sopt
|
|
|
where id = #{id,jdbcType=BIGINT}
|
|
|
</delete>
|
|
|
<insert id="insert" keyColumn="id" keyProperty="id" parameterType="com.goafanti.common.model.TaskSopt" useGeneratedKeys="true">
|
|
|
- insert into task_sopt (`type`, `status`, create_by,
|
|
|
- create_time)
|
|
|
- values (#{type,jdbcType=INTEGER}, #{status,jdbcType=INTEGER}, #{createBy,jdbcType=VARCHAR},
|
|
|
- #{createTime,jdbcType=TIMESTAMP})
|
|
|
+ insert into task_sopt (`type`, `status`, create_by,
|
|
|
+ create_time, tid)
|
|
|
+ values (#{type,jdbcType=INTEGER}, #{status,jdbcType=INTEGER}, #{createBy,jdbcType=VARCHAR},
|
|
|
+ #{createTime,jdbcType=TIMESTAMP}, #{tid,jdbcType=INTEGER})
|
|
|
</insert>
|
|
|
<insert id="insertSelective" keyColumn="id" keyProperty="id" parameterType="com.goafanti.common.model.TaskSopt" useGeneratedKeys="true">
|
|
|
insert into task_sopt
|
|
|
@@ -42,6 +44,9 @@
|
|
|
<if test="createTime != null">
|
|
|
create_time,
|
|
|
</if>
|
|
|
+ <if test="tid != null">
|
|
|
+ tid,
|
|
|
+ </if>
|
|
|
</trim>
|
|
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
|
<if test="type != null">
|
|
|
@@ -56,6 +61,9 @@
|
|
|
<if test="createTime != null">
|
|
|
#{createTime,jdbcType=TIMESTAMP},
|
|
|
</if>
|
|
|
+ <if test="tid != null">
|
|
|
+ #{tid,jdbcType=INTEGER},
|
|
|
+ </if>
|
|
|
</trim>
|
|
|
</insert>
|
|
|
<update id="updateByPrimaryKeySelective" parameterType="com.goafanti.common.model.TaskSopt">
|
|
|
@@ -73,6 +81,9 @@
|
|
|
<if test="createTime != null">
|
|
|
create_time = #{createTime,jdbcType=TIMESTAMP},
|
|
|
</if>
|
|
|
+ <if test="tid != null">
|
|
|
+ tid = #{tid,jdbcType=INTEGER},
|
|
|
+ </if>
|
|
|
</set>
|
|
|
where id = #{id,jdbcType=BIGINT}
|
|
|
</update>
|
|
|
@@ -81,7 +92,27 @@
|
|
|
set `type` = #{type,jdbcType=INTEGER},
|
|
|
`status` = #{status,jdbcType=INTEGER},
|
|
|
create_by = #{createBy,jdbcType=VARCHAR},
|
|
|
- create_time = #{createTime,jdbcType=TIMESTAMP}
|
|
|
+ create_time = #{createTime,jdbcType=TIMESTAMP},
|
|
|
+ tid = #{tid,jdbcType=INTEGER}
|
|
|
where id = #{id,jdbcType=BIGINT}
|
|
|
</update>
|
|
|
-</mapper>
|
|
|
+
|
|
|
+ <insert id="insertList">
|
|
|
+ insert into task_sopt (`type`, `status`,tid, create_by,
|
|
|
+ create_time)
|
|
|
+ values (#{type,jdbcType=INTEGER}, #{status,jdbcType=INTEGER}, #{createBy,jdbcType=VARCHAR},
|
|
|
+ #{createTime,jdbcType=TIMESTAMP})
|
|
|
+ values
|
|
|
+ <foreach item="item" collection="list" separator="," index="">
|
|
|
+ (#{item.type,jdbcType=INTEGER}, #{item.status,jdbcType=INTEGER},#{tid,jdbcType=INTEGER},
|
|
|
+ #{item.createBy,jdbcType=VARCHAR}, #{item.createTime,jdbcType=TIMESTAMP})
|
|
|
+ </foreach>
|
|
|
+ </insert>
|
|
|
+
|
|
|
+ <select id="selectByTid" parameterType="java.lang.Long" resultMap="BaseResultMap">
|
|
|
+ select
|
|
|
+ <include refid="Base_Column_List" />
|
|
|
+ from task_sopt
|
|
|
+ where tid = #{tid} and status in (0,2)
|
|
|
+ </select>
|
|
|
+</mapper>
|