109 lines
3.7 KiB
XML
109 lines
3.7 KiB
XML
<?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.lovenav.dao.ConfigDao">
|
|
<resultMap id="BaseResultMap" type="com.lovenav.entity.Config">
|
|
<id column="id" jdbcType="INTEGER" property="id" />
|
|
<result column="type" jdbcType="OTHER" property="type" />
|
|
<result column="name" jdbcType="VARCHAR" property="name" />
|
|
<result column="value" jdbcType="VARCHAR" property="value" />
|
|
<result column="updatetime" jdbcType="BIGINT" property="updatetime" />
|
|
</resultMap>
|
|
<sql id="Base_Column_List">
|
|
id, `type`, `name`, `value`, updatetime
|
|
</sql>
|
|
<select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
|
|
select
|
|
<include refid="Base_Column_List" />
|
|
from ln_config
|
|
where id = #{id,jdbcType=INTEGER}
|
|
</select>
|
|
<select id="selectByName" parameterType="java.lang.String" resultMap="BaseResultMap">
|
|
select
|
|
<include refid="Base_Column_List" />
|
|
from ln_config
|
|
where name = #{name,jdbcType=VARCHAR}
|
|
</select>
|
|
|
|
<delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
|
|
delete from ln_config
|
|
where id = #{id,jdbcType=INTEGER}
|
|
</delete>
|
|
<insert id="insert" keyColumn="id" keyProperty="id" parameterType="com.lovenav.entity.Config" useGeneratedKeys="true">
|
|
insert into ln_config (`type`, `name`, `value`,
|
|
updatetime)
|
|
values (#{type,jdbcType=OTHER}, #{name,jdbcType=VARCHAR}, #{value,jdbcType=VARCHAR},
|
|
#{updatetime,jdbcType=BIGINT})
|
|
</insert>
|
|
<insert id="insertSelective" keyColumn="id" keyProperty="id" parameterType="com.lovenav.entity.Config" useGeneratedKeys="true">
|
|
insert into ln_config
|
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
|
<if test="type != null">
|
|
`type`,
|
|
</if>
|
|
<if test="name != null">
|
|
`name`,
|
|
</if>
|
|
<if test="value != null">
|
|
`value`,
|
|
</if>
|
|
<if test="updatetime != null">
|
|
updatetime,
|
|
</if>
|
|
</trim>
|
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
<if test="type != null">
|
|
#{type,jdbcType=OTHER},
|
|
</if>
|
|
<if test="name != null">
|
|
#{name,jdbcType=VARCHAR},
|
|
</if>
|
|
<if test="value != null">
|
|
#{value,jdbcType=VARCHAR},
|
|
</if>
|
|
<if test="updatetime != null">
|
|
#{updatetime,jdbcType=BIGINT},
|
|
</if>
|
|
</trim>
|
|
</insert>
|
|
<update id="updateByPrimaryKeySelective" parameterType="com.lovenav.entity.Config">
|
|
update ln_config
|
|
<set>
|
|
<if test="type != null">
|
|
`type` = #{type,jdbcType=OTHER},
|
|
</if>
|
|
<if test="name != null">
|
|
`name` = #{name,jdbcType=VARCHAR},
|
|
</if>
|
|
<if test="value != null">
|
|
`value` = #{value,jdbcType=VARCHAR},
|
|
</if>
|
|
<if test="updatetime != null">
|
|
updatetime = #{updatetime,jdbcType=BIGINT},
|
|
</if>
|
|
</set>
|
|
where id = #{id,jdbcType=INTEGER}
|
|
</update>
|
|
<update id="updateByPrimaryKey" parameterType="com.lovenav.entity.Config">
|
|
update ln_config
|
|
set `type` = #{type,jdbcType=OTHER},
|
|
`name` = #{name,jdbcType=VARCHAR},
|
|
`value` = #{value,jdbcType=VARCHAR},
|
|
updatetime = #{updatetime,jdbcType=BIGINT}
|
|
where id = #{id,jdbcType=INTEGER}
|
|
</update>
|
|
<update id="updateByName" parameterType="com.lovenav.entity.Config">
|
|
update ln_config
|
|
<set>
|
|
<if test="type != null">
|
|
`type` = #{type,jdbcType=OTHER},
|
|
</if>
|
|
<if test="value != null">
|
|
`value` = #{value,jdbcType=VARCHAR},
|
|
</if>
|
|
<if test="updatetime != null">
|
|
updatetime = #{updatetime,jdbcType=BIGINT},
|
|
</if>
|
|
</set>
|
|
where name = #{name,jdbcType=VARCHAR}
|
|
</update>
|
|
</mapper> |