|
|
@@ -1,139 +0,0 @@
|
|
|
-<?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">
|
|
|
-<mapper namespace="com.goafanti.common.dao.TaskSoptMapper">
|
|
|
- <resultMap id="BaseResultMap" type="com.goafanti.common.model.TaskSopt">
|
|
|
- <id column="id" jdbcType="BIGINT" property="id" />
|
|
|
- <result column="tid" jdbcType="INTEGER" property="tid" />
|
|
|
- <result column="type" jdbcType="INTEGER" property="type" />
|
|
|
- <result column="status" jdbcType="INTEGER" property="status" />
|
|
|
- <result column="reason" jdbcType="VARCHAR" property="reason" />
|
|
|
- <result column="create_by" jdbcType="VARCHAR" property="createBy" />
|
|
|
- <result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
|
|
|
- <result column="annex_url" jdbcType="VARCHAR" property="annexUrl" />
|
|
|
- </resultMap>
|
|
|
- <sql id="Base_Column_List">
|
|
|
- id, tid, `type`, `status`, reason, create_by, create_time, annex_url
|
|
|
- </sql>
|
|
|
- <select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap">
|
|
|
- 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 (tid, `type`, `status`,
|
|
|
- reason, create_by, create_time,
|
|
|
- annex_url)
|
|
|
- values (#{tid,jdbcType=INTEGER}, #{type,jdbcType=INTEGER}, #{status,jdbcType=INTEGER},
|
|
|
- #{reason,jdbcType=VARCHAR}, #{createBy,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP},
|
|
|
- #{annexUrl,jdbcType=VARCHAR})
|
|
|
- </insert>
|
|
|
- <insert id="insertSelective" keyColumn="id" keyProperty="id" parameterType="com.goafanti.common.model.TaskSopt" useGeneratedKeys="true">
|
|
|
- insert into task_sopt
|
|
|
- <trim prefix="(" suffix=")" suffixOverrides=",">
|
|
|
- <if test="tid != null">
|
|
|
- tid,
|
|
|
- </if>
|
|
|
- <if test="type != null">
|
|
|
- `type`,
|
|
|
- </if>
|
|
|
- <if test="status != null">
|
|
|
- `status`,
|
|
|
- </if>
|
|
|
- <if test="reason != null">
|
|
|
- reason,
|
|
|
- </if>
|
|
|
- <if test="createBy != null">
|
|
|
- create_by,
|
|
|
- </if>
|
|
|
- <if test="createTime != null">
|
|
|
- create_time,
|
|
|
- </if>
|
|
|
- <if test="annexUrl != null">
|
|
|
- annex_url,
|
|
|
- </if>
|
|
|
- </trim>
|
|
|
- <trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
|
- <if test="tid != null">
|
|
|
- #{tid,jdbcType=INTEGER},
|
|
|
- </if>
|
|
|
- <if test="type != null">
|
|
|
- #{type,jdbcType=INTEGER},
|
|
|
- </if>
|
|
|
- <if test="status != null">
|
|
|
- #{status,jdbcType=INTEGER},
|
|
|
- </if>
|
|
|
- <if test="reason != null">
|
|
|
- #{reason,jdbcType=VARCHAR},
|
|
|
- </if>
|
|
|
- <if test="createBy != null">
|
|
|
- #{createBy,jdbcType=VARCHAR},
|
|
|
- </if>
|
|
|
- <if test="createTime != null">
|
|
|
- #{createTime,jdbcType=TIMESTAMP},
|
|
|
- </if>
|
|
|
- <if test="annexUrl != null">
|
|
|
- #{annexUrl,jdbcType=VARCHAR},
|
|
|
- </if>
|
|
|
- </trim>
|
|
|
- </insert>
|
|
|
- <update id="updateByPrimaryKeySelective" parameterType="com.goafanti.common.model.TaskSopt">
|
|
|
- update task_sopt
|
|
|
- <set>
|
|
|
- <if test="tid != null">
|
|
|
- tid = #{tid,jdbcType=INTEGER},
|
|
|
- </if>
|
|
|
- <if test="type != null">
|
|
|
- `type` = #{type,jdbcType=INTEGER},
|
|
|
- </if>
|
|
|
- <if test="status != null">
|
|
|
- `status` = #{status,jdbcType=INTEGER},
|
|
|
- </if>
|
|
|
- <if test="reason != null">
|
|
|
- reason = #{reason,jdbcType=VARCHAR},
|
|
|
- </if>
|
|
|
- <if test="createBy != null">
|
|
|
- create_by = #{createBy,jdbcType=VARCHAR},
|
|
|
- </if>
|
|
|
- <if test="createTime != null">
|
|
|
- create_time = #{createTime,jdbcType=TIMESTAMP},
|
|
|
- </if>
|
|
|
- <if test="annexUrl != null">
|
|
|
- annex_url = #{annexUrl,jdbcType=VARCHAR},
|
|
|
- </if>
|
|
|
- </set>
|
|
|
- where id = #{id,jdbcType=BIGINT}
|
|
|
- </update>
|
|
|
- <update id="updateByPrimaryKey" parameterType="com.goafanti.common.model.TaskSopt">
|
|
|
- update task_sopt
|
|
|
- set tid = #{tid,jdbcType=INTEGER},
|
|
|
- `type` = #{type,jdbcType=INTEGER},
|
|
|
- `status` = #{status,jdbcType=INTEGER},
|
|
|
- reason = #{reason,jdbcType=VARCHAR},
|
|
|
- create_by = #{createBy,jdbcType=VARCHAR},
|
|
|
- create_time = #{createTime,jdbcType=TIMESTAMP},
|
|
|
- annex_url = #{annexUrl,jdbcType=VARCHAR}
|
|
|
- where id = #{id,jdbcType=BIGINT}
|
|
|
- </update>
|
|
|
-
|
|
|
- <insert id="insertList">
|
|
|
- insert into task_sopt (`type`, `status`,tid,reason,
|
|
|
- create_by, create_time)
|
|
|
- values
|
|
|
- <foreach item="item" collection="list" separator="," index="">
|
|
|
- (#{item.type,jdbcType=INTEGER}, #{item.status,jdbcType=INTEGER},#{item.tid,jdbcType=INTEGER},#{item.reason,jdbcType=VARCHAR},
|
|
|
- #{item.createBy,jdbcType=VARCHAR}, #{item.createTime,jdbcType=TIMESTAMP})
|
|
|
- </foreach>
|
|
|
- </insert>
|
|
|
-
|
|
|
- <select id="selectByTid" resultMap="BaseResultMap">
|
|
|
- select
|
|
|
- <include refid="Base_Column_List" />
|
|
|
- from task_sopt
|
|
|
- where tid = #{tid} and status in (0,2)
|
|
|
- </select>
|
|
|
-</mapper>
|