| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134 |
- <?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.PublicExamineMapper">
- <resultMap id="BaseResultMap" type="com.goafanti.common.model.PublicExamine">
- <id column="id" jdbcType="INTEGER" property="id" />
- <result column="prid" jdbcType="INTEGER" property="prid" />
- <result column="aid" jdbcType="VARCHAR" property="aid" />
- <result column="status" jdbcType="INTEGER" property="status" />
- <result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
- <result column="aname" jdbcType="VARCHAR" property="aname" />
- </resultMap>
- <sql id="Base_Column_List">
- id, prid, aid, `status`, create_time, aname
- </sql>
- <select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
- select
- <include refid="Base_Column_List" />
- from public_examine
- where id = #{id,jdbcType=INTEGER}
- </select>
- <delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
- delete from public_examine
- where id = #{id,jdbcType=INTEGER}
- </delete>
- <insert id="insert" keyColumn="id" keyProperty="id" parameterType="com.goafanti.common.model.PublicExamine" useGeneratedKeys="true">
- insert into public_examine (prid, aid, `status`,
- create_time, aname)
- values (#{prid,jdbcType=INTEGER}, #{aid,jdbcType=VARCHAR}, #{status,jdbcType=INTEGER},
- #{createTime,jdbcType=TIMESTAMP}, #{aname,jdbcType=VARCHAR})
- </insert>
- <insert id="insertSelective" keyColumn="id" keyProperty="id" parameterType="com.goafanti.common.model.PublicExamine" useGeneratedKeys="true">
- insert into public_examine
- <trim prefix="(" suffix=")" suffixOverrides=",">
- <if test="prid != null">
- prid,
- </if>
- <if test="aid != null">
- aid,
- </if>
- <if test="status != null">
- `status`,
- </if>
- <if test="createTime != null">
- create_time,
- </if>
- <if test="aname != null">
- aname,
- </if>
- </trim>
- <trim prefix="values (" suffix=")" suffixOverrides=",">
- <if test="prid != null">
- #{prid,jdbcType=INTEGER},
- </if>
- <if test="aid != null">
- #{aid,jdbcType=VARCHAR},
- </if>
- <if test="status != null">
- #{status,jdbcType=INTEGER},
- </if>
- <if test="createTime != null">
- #{createTime,jdbcType=TIMESTAMP},
- </if>
- <if test="aname != null">
- #{aname,jdbcType=VARCHAR},
- </if>
- </trim>
- </insert>
- <update id="updateByPrimaryKeySelective" parameterType="com.goafanti.common.model.PublicExamine">
- update public_examine
- <set>
- <if test="prid != null">
- prid = #{prid,jdbcType=INTEGER},
- </if>
- <if test="aid != null">
- aid = #{aid,jdbcType=VARCHAR},
- </if>
- <if test="status != null">
- `status` = #{status,jdbcType=INTEGER},
- </if>
- <if test="createTime != null">
- create_time = #{createTime,jdbcType=TIMESTAMP},
- </if>
- <if test="aname != null">
- aname = #{aname,jdbcType=VARCHAR},
- </if>
- </set>
- where id = #{id,jdbcType=INTEGER}
- </update>
- <update id="updateByPrimaryKey" parameterType="com.goafanti.common.model.PublicExamine">
- update public_examine
- set prid = #{prid,jdbcType=INTEGER},
- aid = #{aid,jdbcType=VARCHAR},
- `status` = #{status,jdbcType=INTEGER},
- create_time = #{createTime,jdbcType=TIMESTAMP},
- aname = #{aname,jdbcType=VARCHAR}
- where id = #{id,jdbcType=INTEGER}
- </update>
- <update id="updatePrid">
- update public_examine
- set `status` = #{status,jdbcType=INTEGER}
- where prid = #{prid,jdbcType=INTEGER}
- <if test="aid != null">
- and aid = #{aid,jdbcType=VARCHAR}
- </if>
- </update>
- <update id="updateAidByAid">
- update public_examine a ,(select id,name from admin where id=#{aid})b
- set a.aid=b.id ,a.aname =b.name
- where a.aid = #{oldAid}
- </update>
- <select id="selectByPrid" parameterType="java.lang.Integer" resultMap="BaseResultMap">
- select
- <include refid="Base_Column_List" />
- from public_examine
- where prid = #{id,jdbcType=INTEGER}
- </select>
- <select id="selectByIds" parameterType="java.lang.Integer" resultMap="BaseResultMap">
- select
- <include refid="Base_Column_List" />
- from public_examine
- where prid in
- <foreach close=")" collection="ids" item="id" open="(" separator=",">
- #{id}
- </foreach>
- </select>
- <delete id="deletePrid">
- delete from public_examine
- where prid = #{id,jdbcType=INTEGER}
- </delete>
- </mapper>
|