This commit is contained in:
2023-12-20 16:20:49 +08:00
parent dd432ead11
commit 026a299f88
48 changed files with 37 additions and 438 deletions

View File

@@ -0,0 +1,87 @@
<?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="TIMESTAMP" 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>
<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=TIMESTAMP})
</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=TIMESTAMP},
</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=TIMESTAMP},
</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=TIMESTAMP}
where id = #{id,jdbcType=INTEGER}
</update>
</mapper>