<?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.common.DataMonitorMapper">
|
<resultMap id="BaseResultMap" type="com.yeshi.fanli.entity.common.DataMonitor">
|
<id column="md_id" property="id" jdbcType="BIGINT" />
|
<result column="md_name" property="name" jdbcType="VARCHAR" />
|
<result column="md_key" property="key" jdbcType="VARCHAR" />
|
<result column="md_value" property="value" jdbcType="VARCHAR" />
|
<result column="md_createtime" property="createTime" jdbcType="TIMESTAMP" />
|
<result column="md_updatetime" property="updateTime" jdbcType="TIMESTAMP" />
|
</resultMap>
|
<sql id="Base_Column_List">md_id,md_name,md_key,md_value,md_createtime,md_updatetime
|
</sql>
|
<select id="selectByPrimaryKey" resultMap="BaseResultMap"
|
parameterType="java.lang.Long">
|
select
|
<include refid="Base_Column_List" />
|
from yeshi_ec_monitor_data where md_id = #{id,jdbcType=BIGINT}
|
</select>
|
|
|
<select id="selectByKey" resultMap="BaseResultMap"
|
parameterType="java.lang.String">
|
select
|
<include refid="Base_Column_List" />
|
from yeshi_ec_monitor_data where md_key = #{0} limit 1
|
</select>
|
|
|
<delete id="deleteByPrimaryKey" parameterType="java.lang.Long">delete from
|
yeshi_ec_monitor_data where md_id = #{id,jdbcType=BIGINT}
|
</delete>
|
<insert id="insert" parameterType="com.yeshi.fanli.entity.common.DataMonitor"
|
useGeneratedKeys="true" keyProperty="id">insert into yeshi_ec_monitor_data
|
(md_id,md_name,md_key,md_value,md_createtime,md_updatetime) values
|
(#{id,jdbcType=BIGINT},#{name,jdbcType=VARCHAR},#{key,jdbcType=VARCHAR},#{value,jdbcType=VARCHAR},#{createTime,jdbcType=TIMESTAMP},#{updateTime,jdbcType=TIMESTAMP})
|
</insert>
|
<insert id="insertSelective" parameterType="com.yeshi.fanli.entity.common.DataMonitor"
|
useGeneratedKeys="true" keyProperty="id">
|
insert into yeshi_ec_monitor_data
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
<if test="id != null">md_id,</if>
|
<if test="name != null">md_name,</if>
|
<if test="key != null">md_key,</if>
|
<if test="value != null">md_value,</if>
|
<if test="createTime != null">md_createtime,</if>
|
<if test="updateTime != null">md_updatetime,</if>
|
</trim>
|
values
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
<if test="id != null">#{id,jdbcType=BIGINT},</if>
|
<if test="name != null">#{name,jdbcType=VARCHAR},</if>
|
<if test="key != null">#{key,jdbcType=VARCHAR},</if>
|
<if test="value != null">#{value,jdbcType=VARCHAR},</if>
|
<if test="createTime != null">#{createTime,jdbcType=TIMESTAMP},</if>
|
<if test="updateTime != null">#{updateTime,jdbcType=TIMESTAMP},</if>
|
</trim>
|
</insert>
|
<update id="updateByPrimaryKey" parameterType="com.yeshi.fanli.entity.common.DataMonitor">update
|
yeshi_ec_monitor_data set md_name = #{name,jdbcType=VARCHAR},md_key =
|
#{key,jdbcType=VARCHAR},md_value =
|
#{value,jdbcType=VARCHAR},md_createtime =
|
#{createTime,jdbcType=TIMESTAMP},md_updatetime =
|
#{updateTime,jdbcType=TIMESTAMP} where md_id = #{id,jdbcType=BIGINT}
|
</update>
|
<update id="updateByPrimaryKeySelective" parameterType="com.yeshi.fanli.entity.common.DataMonitor">
|
update yeshi_ec_monitor_data
|
<set>
|
<if test="name != null">md_name=#{name,jdbcType=VARCHAR},</if>
|
<if test="key != null">md_key=#{key,jdbcType=VARCHAR},</if>
|
<if test="value != null">md_value=#{value,jdbcType=VARCHAR},</if>
|
<if test="createTime != null">md_createtime=#{createTime,jdbcType=TIMESTAMP},</if>
|
<if test="updateTime != null">md_updatetime=#{updateTime,jdbcType=TIMESTAMP},</if>
|
</set>
|
where md_id = #{id,jdbcType=BIGINT}
|
</update>
|
</mapper>
|