<?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.ks.lijin.mapper.LiJinProviderNoticeMapper">
|
<resultMap id="BaseResultMap" type="com.ks.lijin.pojo.DO.LiJinProviderNotice">
|
<id column="ne_id" property="id" jdbcType="BIGINT"/>
|
<result column="ne_provider_id" property="providerId" jdbcType="BIGINT"/>
|
<result column="ne_title" property="title" jdbcType="VARCHAR"/>
|
<result column="ne_content" property="content" jdbcType="VARCHAR"/>
|
<result column="ne_type" property="type" jdbcType="VARCHAR"/>
|
<result column="ne_read" property="read" jdbcType="BOOLEAN"/>
|
<result column="ne_state" property="state" jdbcType="INTEGER"/>
|
<result column="ne_creator_id" property="creatorId" jdbcType="BIGINT"/>
|
<result column="ne_create_time" property="createTime" jdbcType="TIMESTAMP"/>
|
<result column="ne_updator_id" property="updatorId" jdbcType="BIGINT"/>
|
<result column="ne_update_time" property="updateTime" jdbcType="TIMESTAMP"/>
|
</resultMap>
|
<sql id="Base_Column_List">ne_id
|
,ne_provider_id,ne_title,ne_content,ne_type,ne_read,ne_state,ne_creator_id,ne_create_time,ne_updator_id,ne_update_time</sql>
|
<select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Long">select
|
<include refid="Base_Column_List"/>from tlj_provider_notice where ne_id = #{id,jdbcType=BIGINT}
|
</select>
|
<delete id="deleteByPrimaryKey" parameterType="java.lang.Long">delete
|
from tlj_provider_notice
|
where ne_id = #{id,jdbcType=BIGINT}</delete>
|
<insert id="insert" parameterType="com.ks.lijin.pojo.DO.LiJinProviderNotice" useGeneratedKeys="true"
|
keyProperty="id">insert into tlj_provider_notice (ne_id, ne_provider_id, ne_title, ne_content, ne_type,
|
ne_read, ne_state, ne_creator_id, ne_create_time,
|
ne_updator_id, ne_update_time)
|
values (#{id,jdbcType=BIGINT}, #{providerId,jdbcType=BIGINT}, #{title,jdbcType=VARCHAR},
|
#{content,jdbcType=VARCHAR}, #{type,jdbcType=VARCHAR}, #{read,jdbcType=BOOLEAN},
|
#{state,jdbcType=INTEGER}, #{creatorId,jdbcType=BIGINT},
|
#{createTime,jdbcType=TIMESTAMP}, #{updatorId,jdbcType=BIGINT},
|
#{updateTime,jdbcType=TIMESTAMP})</insert>
|
<insert id="insertSelective" parameterType="com.ks.lijin.pojo.DO.LiJinProviderNotice" useGeneratedKeys="true"
|
keyProperty="id">insert into tlj_provider_notice
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
<if test="id != null">ne_id,</if>
|
<if test="providerId != null">ne_provider_id,</if>
|
<if test="title != null">ne_title,</if>
|
<if test="content != null">ne_content,</if>
|
<if test="type != null">ne_type,</if>
|
<if test="read != null">ne_read,</if>
|
<if test="state != null">ne_state,</if>
|
<if test="creatorId != null">ne_creator_id,</if>
|
<if test="createTime != null">ne_create_time,</if>
|
<if test="updatorId != null">ne_updator_id,</if>
|
<if test="updateTime != null">ne_update_time,</if>
|
</trim>
|
values
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
<if test="id != null">#{id,jdbcType=BIGINT},</if>
|
<if test="providerId != null">#{providerId,jdbcType=BIGINT},</if>
|
<if test="title != null">#{title,jdbcType=VARCHAR},</if>
|
<if test="content != null">#{content,jdbcType=VARCHAR},</if>
|
<if test="type != null">#{type,jdbcType=VARCHAR},</if>
|
<if test="read != null">#{read,jdbcType=BOOLEAN},</if>
|
<if test="state != null">#{state,jdbcType=INTEGER},</if>
|
<if test="creatorId != null">#{creatorId,jdbcType=BIGINT},</if>
|
<if test="createTime != null">#{createTime,jdbcType=TIMESTAMP},</if>
|
<if test="updatorId != null">#{updatorId,jdbcType=BIGINT},</if>
|
<if test="updateTime != null">#{updateTime,jdbcType=TIMESTAMP},</if>
|
</trim>
|
</insert>
|
<update id="updateByPrimaryKey" parameterType="com.ks.lijin.pojo.DO.LiJinProviderNotice">update tlj_provider_notice
|
set ne_provider_id = #{providerId,jdbcType=BIGINT},
|
ne_title = #{title,jdbcType=VARCHAR},
|
ne_content = #{content,jdbcType=VARCHAR},
|
ne_type = #{type,jdbcType=VARCHAR},
|
ne_read = #{read,jdbcType=BOOLEAN},
|
ne_state = #{state,jdbcType=INTEGER},
|
ne_creator_id = #{creatorId,jdbcType=BIGINT},
|
ne_create_time = #{createTime,jdbcType=TIMESTAMP},
|
ne_updator_id = #{updatorId,jdbcType=BIGINT},
|
ne_update_time = #{updateTime,jdbcType=TIMESTAMP}
|
where ne_id = #{id,jdbcType=BIGINT}</update>
|
<update id="updateByPrimaryKeySelective" parameterType="com.ks.lijin.pojo.DO.LiJinProviderNotice">update
|
tlj_provider_notice
|
<set>
|
<if test="providerId != null">ne_provider_id=#{providerId,jdbcType=BIGINT},</if>
|
<if test="title != null">ne_title=#{title,jdbcType=VARCHAR},</if>
|
<if test="content != null">ne_content=#{content,jdbcType=VARCHAR},</if>
|
<if test="type != null">ne_type=#{type,jdbcType=VARCHAR},</if>
|
<if test="read != null">ne_read=#{read,jdbcType=BOOLEAN},</if>
|
<if test="state != null">ne_state=#{state,jdbcType=INTEGER},</if>
|
<if test="creatorId != null">ne_creator_id=#{creatorId,jdbcType=BIGINT},</if>
|
<if test="createTime != null">ne_create_time=#{createTime,jdbcType=TIMESTAMP},</if>
|
<if test="updatorId != null">ne_updator_id=#{updatorId,jdbcType=BIGINT},</if>
|
<if test="updateTime != null">ne_update_time=#{updateTime,jdbcType=TIMESTAMP},</if>
|
</set>
|
where ne_id = #{id,jdbcType=BIGINT}
|
</update>
|
|
|
<!-- 非模板 -->
|
<sql id="listWhere">
|
<if test="query.id!=null">and ne_id=#{query.id}</if>
|
<if test="query.name!=null">and ne_title=#{query.name}</if>
|
<if test="query.state!=null">and ne_state=#{query.state}</if>
|
</sql>
|
|
|
<select id="listByPage" resultMap="BaseResultMap">
|
select <include refid="Base_Column_List"/> from tlj_provider_notice
|
where 1=1
|
<include refid="listWhere"/>
|
limit #{query.start},#{query.count}
|
</select>
|
|
<select id="count" resultType="java.lang.Long">
|
select count(*) from tlj_provider_notice
|
where 1=1
|
<include refid="listWhere"/>
|
</select>
|
|
</mapper>
|