<?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.chaozhanggui.dao.system.dao.TbPlussSuggestMapper">
  <resultMap id="BaseResultMap" type="com.chaozhanggui.dao.system.entity.TbPlussSuggest">
    <id column="id" jdbcType="INTEGER" property="id" />
    <result column="userId" jdbcType="INTEGER" property="userid" />
    <result column="logo" jdbcType="VARCHAR" property="logo" />
    <result column="createDt" jdbcType="TIMESTAMP" property="createdt" />
    <result column="content" jdbcType="VARCHAR" property="content" />
    <result column="status" jdbcType="VARCHAR" property="status" />
    <result column="picUrls" jdbcType="VARCHAR" property="picurls" />
    <result column="phone" jdbcType="VARCHAR" property="phone" />
  </resultMap>
  <sql id="Base_Column_List">
    id, userId, logo, createDt, content, status, picUrls, phone
  </sql>
  <select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
    select 
    <include refid="Base_Column_List" />
    from tb_pluss_suggest
    where id = #{id,jdbcType=INTEGER}
  </select>
  <delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
    delete from tb_pluss_suggest
    where id = #{id,jdbcType=INTEGER}
  </delete>
  <insert id="insert" parameterType="com.chaozhanggui.dao.system.entity.TbPlussSuggest">
    insert into tb_pluss_suggest (id, userId, logo, 
      createDt, content, status, 
      picUrls, phone)
    values (#{id,jdbcType=INTEGER}, #{userid,jdbcType=INTEGER}, #{logo,jdbcType=VARCHAR}, 
      #{createdt,jdbcType=TIMESTAMP}, #{content,jdbcType=VARCHAR}, #{status,jdbcType=VARCHAR}, 
      #{picurls,jdbcType=VARCHAR}, #{phone,jdbcType=VARCHAR})
  </insert>
  <insert id="insertSelective" parameterType="com.chaozhanggui.dao.system.entity.TbPlussSuggest">
    insert into tb_pluss_suggest
    <trim prefix="(" suffix=")" suffixOverrides=",">
      <if test="id != null">
        id,
      </if>
      <if test="userid != null">
        userId,
      </if>
      <if test="logo != null">
        logo,
      </if>
      <if test="createdt != null">
        createDt,
      </if>
      <if test="content != null">
        content,
      </if>
      <if test="status != null">
        status,
      </if>
      <if test="picurls != null">
        picUrls,
      </if>
      <if test="phone != null">
        phone,
      </if>
    </trim>
    <trim prefix="values (" suffix=")" suffixOverrides=",">
      <if test="id != null">
        #{id,jdbcType=INTEGER},
      </if>
      <if test="userid != null">
        #{userid,jdbcType=INTEGER},
      </if>
      <if test="logo != null">
        #{logo,jdbcType=VARCHAR},
      </if>
      <if test="createdt != null">
        #{createdt,jdbcType=TIMESTAMP},
      </if>
      <if test="content != null">
        #{content,jdbcType=VARCHAR},
      </if>
      <if test="status != null">
        #{status,jdbcType=VARCHAR},
      </if>
      <if test="picurls != null">
        #{picurls,jdbcType=VARCHAR},
      </if>
      <if test="phone != null">
        #{phone,jdbcType=VARCHAR},
      </if>
    </trim>
  </insert>
  <update id="updateByPrimaryKeySelective" parameterType="com.chaozhanggui.dao.system.entity.TbPlussSuggest">
    update tb_pluss_suggest
    <set>
      <if test="userid != null">
        userId = #{userid,jdbcType=INTEGER},
      </if>
      <if test="logo != null">
        logo = #{logo,jdbcType=VARCHAR},
      </if>
      <if test="createdt != null">
        createDt = #{createdt,jdbcType=TIMESTAMP},
      </if>
      <if test="content != null">
        content = #{content,jdbcType=VARCHAR},
      </if>
      <if test="status != null">
        status = #{status,jdbcType=VARCHAR},
      </if>
      <if test="picurls != null">
        picUrls = #{picurls,jdbcType=VARCHAR},
      </if>
      <if test="phone != null">
        phone = #{phone,jdbcType=VARCHAR},
      </if>
    </set>
    where id = #{id,jdbcType=INTEGER}
  </update>
  <update id="updateByPrimaryKey" parameterType="com.chaozhanggui.dao.system.entity.TbPlussSuggest">
    update tb_pluss_suggest
    set userId = #{userid,jdbcType=INTEGER},
      logo = #{logo,jdbcType=VARCHAR},
      createDt = #{createdt,jdbcType=TIMESTAMP},
      content = #{content,jdbcType=VARCHAR},
      status = #{status,jdbcType=VARCHAR},
      picUrls = #{picurls,jdbcType=VARCHAR},
      phone = #{phone,jdbcType=VARCHAR}
    where id = #{id,jdbcType=INTEGER}
  </update>
</mapper>