|
|
@@ -0,0 +1,106 @@
|
|
|
+<?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.RestrictProjectMapper">
|
|
|
+
|
|
|
+ <resultMap id="BaseResultMap" type="com.goafanti.common.model.RestrictProject">
|
|
|
+ <id property="id" column="id" jdbcType="INTEGER"/>
|
|
|
+ <result property="pid" column="pid" jdbcType="VARCHAR"/>
|
|
|
+ <result property="uid" column="uid" jdbcType="VARCHAR"/>
|
|
|
+ <result property="aid" column="aid" jdbcType="VARCHAR"/>
|
|
|
+ <result property="type" column="type" jdbcType="INTEGER"/>
|
|
|
+ <result property="lockTime" column="lock_time" jdbcType="TIMESTAMP"/>
|
|
|
+ <result property="releaseTime" column="release_time" jdbcType="TIMESTAMP"/>
|
|
|
+ <result property="createTime" column="create_time" jdbcType="TIMESTAMP"/>
|
|
|
+ </resultMap>
|
|
|
+
|
|
|
+ <sql id="Base_Column_List">
|
|
|
+ id,pid,uid,
|
|
|
+ aid,type,lock_time,
|
|
|
+ release_time,create_time
|
|
|
+ </sql>
|
|
|
+
|
|
|
+ <select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap">
|
|
|
+ select
|
|
|
+ <include refid="Base_Column_List" />
|
|
|
+ from restrict_project
|
|
|
+ where id = #{id,jdbcType=INTEGER}
|
|
|
+ </select>
|
|
|
+
|
|
|
+ <delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
|
|
|
+ delete from restrict_project
|
|
|
+ where id = #{id,jdbcType=INTEGER}
|
|
|
+ </delete>
|
|
|
+ <insert id="insert" keyColumn="id" keyProperty="id" parameterType="com.goafanti.common.model.RestrictProject" useGeneratedKeys="true">
|
|
|
+ insert into restrict_project
|
|
|
+ ( id,pid,uid
|
|
|
+ ,aid,type,lock_time
|
|
|
+ ,release_time,create_time)
|
|
|
+ values (#{id,jdbcType=INTEGER},#{pid,jdbcType=VARCHAR},#{uid,jdbcType=VARCHAR}
|
|
|
+ ,#{aid,jdbcType=VARCHAR},#{type,jdbcType=INTEGER},#{lockTime,jdbcType=TIMESTAMP}
|
|
|
+ ,#{releaseTime,jdbcType=TIMESTAMP},#{createTime,jdbcType=TIMESTAMP})
|
|
|
+ </insert>
|
|
|
+ <insert id="insertSelective" keyColumn="id" keyProperty="id" parameterType="com.goafanti.common.model.RestrictProject" useGeneratedKeys="true">
|
|
|
+ insert into restrict_project
|
|
|
+ <trim prefix="(" suffix=")" suffixOverrides=",">
|
|
|
+ <if test="id != null">id,</if>
|
|
|
+ <if test="pid != null">pid,</if>
|
|
|
+ <if test="uid != null">uid,</if>
|
|
|
+ <if test="aid != null">aid,</if>
|
|
|
+ <if test="type != null">type,</if>
|
|
|
+ <if test="lockTime != null">lock_time,</if>
|
|
|
+ <if test="releaseTime != null">release_time,</if>
|
|
|
+ <if test="createTime != null">create_time,</if>
|
|
|
+ </trim>
|
|
|
+ <trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
|
+ <if test="id != null">#{id,jdbcType=INTEGER},</if>
|
|
|
+ <if test="pid != null">#{pid,jdbcType=VARCHAR},</if>
|
|
|
+ <if test="uid != null">#{uid,jdbcType=VARCHAR},</if>
|
|
|
+ <if test="aid != null">#{aid,jdbcType=VARCHAR},</if>
|
|
|
+ <if test="type != null">#{type,jdbcType=INTEGER},</if>
|
|
|
+ <if test="lockTime != null">#{lockTime,jdbcType=TIMESTAMP},</if>
|
|
|
+ <if test="releaseTime != null">#{releaseTime,jdbcType=TIMESTAMP},</if>
|
|
|
+ <if test="createTime != null">#{createTime,jdbcType=TIMESTAMP},</if>
|
|
|
+ </trim>
|
|
|
+ </insert>
|
|
|
+ <update id="updateByPrimaryKeySelective" parameterType="com.goafanti.common.model.RestrictProject">
|
|
|
+ update restrict_project
|
|
|
+ <set>
|
|
|
+ <if test="pid != null">
|
|
|
+ pid = #{pid,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="uid != null">
|
|
|
+ uid = #{uid,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="aid != null">
|
|
|
+ aid = #{aid,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="type != null">
|
|
|
+ type = #{type,jdbcType=INTEGER},
|
|
|
+ </if>
|
|
|
+ <if test="lockTime != null">
|
|
|
+ lock_time = #{lockTime,jdbcType=TIMESTAMP},
|
|
|
+ </if>
|
|
|
+ <if test="releaseTime != null">
|
|
|
+ release_time = #{releaseTime,jdbcType=TIMESTAMP},
|
|
|
+ </if>
|
|
|
+ <if test="createTime != null">
|
|
|
+ create_time = #{createTime,jdbcType=TIMESTAMP},
|
|
|
+ </if>
|
|
|
+ </set>
|
|
|
+ where id = #{id,jdbcType=INTEGER}
|
|
|
+ </update>
|
|
|
+ <update id="updateByPrimaryKey" parameterType="com.goafanti.common.model.RestrictProject">
|
|
|
+ update restrict_project
|
|
|
+ set
|
|
|
+ pid = #{pid,jdbcType=VARCHAR},
|
|
|
+ uid = #{uid,jdbcType=VARCHAR},
|
|
|
+ aid = #{aid,jdbcType=VARCHAR},
|
|
|
+ type = #{type,jdbcType=INTEGER},
|
|
|
+ lock_time = #{lockTime,jdbcType=TIMESTAMP},
|
|
|
+ release_time = #{releaseTime,jdbcType=TIMESTAMP},
|
|
|
+ create_time = #{createTime,jdbcType=TIMESTAMP}
|
|
|
+ where id = #{id,jdbcType=INTEGER}
|
|
|
+ </update>
|
|
|
+</mapper>
|