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,109 @@
<?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.AuthDao">
<resultMap id="BaseResultMap" type="com.lovenav.entity.Auth">
<id column="id" jdbcType="INTEGER" property="id" />
<result column="icon" jdbcType="VARCHAR" property="icon" />
<result column="name" jdbcType="VARCHAR" property="name" />
<result column="route_url" jdbcType="VARCHAR" property="routeUrl" />
<result column="pid" jdbcType="INTEGER" property="pid" />
<result column="is_menu" jdbcType="TINYINT" property="isMenu" />
<result column="weigh" jdbcType="INTEGER" property="weigh" />
</resultMap>
<sql id="Base_Column_List">
id, icon, `name`, route_url, pid, is_menu, weigh
</sql>
<select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from ln_auth
where id = #{id,jdbcType=INTEGER}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
delete from ln_auth
where id = #{id,jdbcType=INTEGER}
</delete>
<insert id="insert" keyColumn="id" keyProperty="id" parameterType="com.lovenav.entity.Auth" useGeneratedKeys="true">
insert into ln_auth (icon, `name`, route_url,
pid, is_menu, weigh)
values (#{icon,jdbcType=VARCHAR}, #{name,jdbcType=VARCHAR}, #{routeUrl,jdbcType=VARCHAR},
#{pid,jdbcType=INTEGER}, #{isMenu,jdbcType=TINYINT}, #{weigh,jdbcType=INTEGER})
</insert>
<insert id="insertSelective" keyColumn="id" keyProperty="id" parameterType="com.lovenav.entity.Auth" useGeneratedKeys="true">
insert into ln_auth
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="icon != null">
icon,
</if>
<if test="name != null">
`name`,
</if>
<if test="routeUrl != null">
route_url,
</if>
<if test="pid != null">
pid,
</if>
<if test="isMenu != null">
is_menu,
</if>
<if test="weigh != null">
weigh,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="icon != null">
#{icon,jdbcType=VARCHAR},
</if>
<if test="name != null">
#{name,jdbcType=VARCHAR},
</if>
<if test="routeUrl != null">
#{routeUrl,jdbcType=VARCHAR},
</if>
<if test="pid != null">
#{pid,jdbcType=INTEGER},
</if>
<if test="isMenu != null">
#{isMenu,jdbcType=TINYINT},
</if>
<if test="weigh != null">
#{weigh,jdbcType=INTEGER},
</if>
</trim>
</insert>
<update id="updateByPrimaryKeySelective" parameterType="com.lovenav.entity.Auth">
update ln_auth
<set>
<if test="icon != null">
icon = #{icon,jdbcType=VARCHAR},
</if>
<if test="name != null">
`name` = #{name,jdbcType=VARCHAR},
</if>
<if test="routeUrl != null">
route_url = #{routeUrl,jdbcType=VARCHAR},
</if>
<if test="pid != null">
pid = #{pid,jdbcType=INTEGER},
</if>
<if test="isMenu != null">
is_menu = #{isMenu,jdbcType=TINYINT},
</if>
<if test="weigh != null">
weigh = #{weigh,jdbcType=INTEGER},
</if>
</set>
where id = #{id,jdbcType=INTEGER}
</update>
<update id="updateByPrimaryKey" parameterType="com.lovenav.entity.Auth">
update ln_auth
set icon = #{icon,jdbcType=VARCHAR},
`name` = #{name,jdbcType=VARCHAR},
route_url = #{routeUrl,jdbcType=VARCHAR},
pid = #{pid,jdbcType=INTEGER},
is_menu = #{isMenu,jdbcType=TINYINT},
weigh = #{weigh,jdbcType=INTEGER}
where id = #{id,jdbcType=INTEGER}
</update>
</mapper>