<?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.yeshi.fanli.dao.mybatis.customerservice.CustomerServiceHistoryMapper">
|
<resultMap id="BaseResultMap"
|
type="com.yeshi.fanli.entity.customerservice.CustomerServiceHistory">
|
<id column="csh_id" property="id" jdbcType="BIGINT" />
|
<result column="csh_device" property="device" jdbcType="VARCHAR" />
|
<result column="csh_platform" property="platform" jdbcType="VARCHAR" />
|
<result column="csh_content" property="content" jdbcType="VARCHAR" />
|
<result column="csh_createtime" property="createTime" jdbcType="TIMESTAMP" />
|
<result column="csh_updatetime" property="updateTime" jdbcType="TIMESTAMP" />
|
<result column="csh_app_info" property="appInfoStr" jdbcType="VARCHAR" />
|
<result column="csh_device_info" property="deviceInfoStr"
|
jdbcType="VARCHAR" />
|
</resultMap>
|
<sql id="Base_Column_List">csh_id,csh_device,csh_platform,csh_content,csh_createtime,csh_updatetime,csh_app_info,csh_device_info
|
</sql>
|
<select id="selectByPrimaryKey" resultMap="BaseResultMap"
|
parameterType="java.lang.Long">
|
select
|
<include refid="Base_Column_List" />
|
from yeshi_ec_customer_service_history where csh_id =
|
#{id,jdbcType=BIGINT}
|
</select>
|
<delete id="deleteByPrimaryKey" parameterType="java.lang.Long">delete from
|
yeshi_ec_customer_service_history where csh_id = #{id,jdbcType=BIGINT}
|
</delete>
|
<insert id="insert"
|
parameterType="com.yeshi.fanli.entity.customerservice.CustomerServiceHistory"
|
useGeneratedKeys="true" keyProperty="id">insert into
|
yeshi_ec_customer_service_history
|
(csh_id,csh_device,csh_platform,csh_content,csh_createtime,csh_updatetime,csh_app_info,csh_device_info)
|
values
|
(#{id,jdbcType=BIGINT},#{device,jdbcType=VARCHAR},#{platform,jdbcType=VARCHAR},#{content,jdbcType=VARCHAR},#{createTime,jdbcType=TIMESTAMP},#{updateTime,jdbcType=TIMESTAMP},#{appInfoStr,jdbcType=VARCHAR},#{deviceInfoStr,jdbcType=VARCHAR})
|
</insert>
|
<insert id="insertSelective"
|
parameterType="com.yeshi.fanli.entity.customerservice.CustomerServiceHistory"
|
useGeneratedKeys="true" keyProperty="id">
|
insert into yeshi_ec_customer_service_history
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
<if test="id != null">csh_id,</if>
|
<if test="device != null">csh_device,</if>
|
<if test="platform != null">csh_platform,</if>
|
<if test="content != null">csh_content,</if>
|
<if test="createTime != null">csh_createtime,</if>
|
<if test="updateTime != null">csh_updatetime,</if>
|
<if test="appInfoStr != null">csh_app_info,</if>
|
<if test="deviceInfoStr != null">csh_device_info,</if>
|
</trim>
|
values
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
<if test="id != null">#{id,jdbcType=BIGINT},</if>
|
<if test="device != null">#{device,jdbcType=VARCHAR},</if>
|
<if test="platform != null">#{platform,jdbcType=VARCHAR},</if>
|
<if test="content != null">#{content,jdbcType=VARCHAR},</if>
|
<if test="createTime != null">#{createTime,jdbcType=TIMESTAMP},</if>
|
<if test="updateTime != null">#{updateTime,jdbcType=TIMESTAMP},</if>
|
<if test="appInfoStr != null">#{appInfoStr,jdbcType=VARCHAR},</if>
|
<if test="deviceInfoStr != null">#{deviceInfoStr,jdbcType=VARCHAR},</if>
|
</trim>
|
</insert>
|
<update id="updateByPrimaryKey"
|
parameterType="com.yeshi.fanli.entity.customerservice.CustomerServiceHistory">update yeshi_ec_customer_service_history set csh_device
|
= #{device,jdbcType=VARCHAR},csh_platform =
|
#{platform,jdbcType=VARCHAR},csh_content =
|
#{content,jdbcType=VARCHAR},csh_createtime =
|
#{createTime,jdbcType=TIMESTAMP},csh_updatetime =
|
#{updateTime,jdbcType=TIMESTAMP},csh_app_info =
|
#{appInfoStr,jdbcType=VARCHAR},csh_device_info =
|
#{deviceInfoStr,jdbcType=VARCHAR} where csh_id = #{id,jdbcType=BIGINT}
|
</update>
|
<update id="updateByPrimaryKeySelective"
|
parameterType="com.yeshi.fanli.entity.customerservice.CustomerServiceHistory">
|
update yeshi_ec_customer_service_history
|
<set>
|
<if test="device != null">csh_device=#{device,jdbcType=VARCHAR},</if>
|
<if test="platform != null">csh_platform=#{platform,jdbcType=VARCHAR},</if>
|
<if test="content != null">csh_content=#{content,jdbcType=VARCHAR},</if>
|
<if test="createTime != null">csh_createtime=#{createTime,jdbcType=TIMESTAMP},</if>
|
<if test="updateTime != null">csh_updatetime=#{updateTime,jdbcType=TIMESTAMP},</if>
|
<if test="appInfoStr != null">csh_app_info=#{appInfoStr,jdbcType=VARCHAR},</if>
|
<if test="deviceInfoStr != null">csh_device_info=#{deviceInfoStr,jdbcType=VARCHAR},</if>
|
</set>
|
where csh_id = #{id,jdbcType=BIGINT}
|
</update>
|
</mapper>
|