1
0
mirror of https://gitee.com/bookshelfplus/bookshelfplus synced 2025-10-10 01:35:14 +08:00
Code Issues Projects Releases Wiki Activity GitHub Gitee

自动生成数据库映射文件

This commit is contained in:
2022-03-12 18:56:57 +08:00
parent fe5bd2080d
commit 3813f54c5e
25 changed files with 2995 additions and 7 deletions

View File

@@ -0,0 +1,188 @@
<?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="plus.bookshelf.Dao.Mapper.CategoryDOMapper">
<resultMap id="BaseResultMap" type="plus.bookshelf.Dao.DO.CategoryDO">
<!--
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
This element was generated on Sat Mar 12 18:53:08 SGT 2022.
-->
<id column="id" jdbcType="INTEGER" property="id" />
<result column="name" jdbcType="VARCHAR" property="name" />
<result column="isShow" jdbcType="BIT" property="isshow" />
<result column="order" jdbcType="INTEGER" property="order" />
<result column="level" jdbcType="INTEGER" property="level" />
<result column="parentId" jdbcType="INTEGER" property="parentid" />
</resultMap>
<resultMap extends="BaseResultMap" id="ResultMapWithBLOBs" type="plus.bookshelf.Dao.DO.CategoryDO">
<!--
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
This element was generated on Sat Mar 12 18:53:08 SGT 2022.
-->
<result column="description" jdbcType="LONGVARCHAR" property="description" />
</resultMap>
<sql id="Base_Column_List">
<!--
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
This element was generated on Sat Mar 12 18:53:08 SGT 2022.
-->
id, name, isShow, order, level, parentId
</sql>
<sql id="Blob_Column_List">
<!--
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
This element was generated on Sat Mar 12 18:53:08 SGT 2022.
-->
description
</sql>
<select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="ResultMapWithBLOBs">
<!--
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
This element was generated on Sat Mar 12 18:53:08 SGT 2022.
-->
select
<include refid="Base_Column_List" />
,
<include refid="Blob_Column_List" />
from category_info
where id = #{id,jdbcType=INTEGER}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
<!--
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
This element was generated on Sat Mar 12 18:53:08 SGT 2022.
-->
delete from category_info
where id = #{id,jdbcType=INTEGER}
</delete>
<insert id="insert" parameterType="plus.bookshelf.Dao.DO.CategoryDO">
<!--
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
This element was generated on Sat Mar 12 18:53:08 SGT 2022.
-->
insert into category_info (id, name, isShow,
order, level, parentId,
description)
values (#{id,jdbcType=INTEGER}, #{name,jdbcType=VARCHAR}, #{isshow,jdbcType=BIT},
#{order,jdbcType=INTEGER}, #{level,jdbcType=INTEGER}, #{parentid,jdbcType=INTEGER},
#{description,jdbcType=LONGVARCHAR})
</insert>
<insert id="insertSelective" parameterType="plus.bookshelf.Dao.DO.CategoryDO">
<!--
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
This element was generated on Sat Mar 12 18:53:08 SGT 2022.
-->
insert into category_info
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="id != null">
id,
</if>
<if test="name != null">
name,
</if>
<if test="isshow != null">
isShow,
</if>
<if test="order != null">
order,
</if>
<if test="level != null">
level,
</if>
<if test="parentid != null">
parentId,
</if>
<if test="description != null">
description,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="id != null">
#{id,jdbcType=INTEGER},
</if>
<if test="name != null">
#{name,jdbcType=VARCHAR},
</if>
<if test="isshow != null">
#{isshow,jdbcType=BIT},
</if>
<if test="order != null">
#{order,jdbcType=INTEGER},
</if>
<if test="level != null">
#{level,jdbcType=INTEGER},
</if>
<if test="parentid != null">
#{parentid,jdbcType=INTEGER},
</if>
<if test="description != null">
#{description,jdbcType=LONGVARCHAR},
</if>
</trim>
</insert>
<update id="updateByPrimaryKeySelective" parameterType="plus.bookshelf.Dao.DO.CategoryDO">
<!--
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
This element was generated on Sat Mar 12 18:53:08 SGT 2022.
-->
update category_info
<set>
<if test="name != null">
name = #{name,jdbcType=VARCHAR},
</if>
<if test="isshow != null">
isShow = #{isshow,jdbcType=BIT},
</if>
<if test="order != null">
order = #{order,jdbcType=INTEGER},
</if>
<if test="level != null">
level = #{level,jdbcType=INTEGER},
</if>
<if test="parentid != null">
parentId = #{parentid,jdbcType=INTEGER},
</if>
<if test="description != null">
description = #{description,jdbcType=LONGVARCHAR},
</if>
</set>
where id = #{id,jdbcType=INTEGER}
</update>
<update id="updateByPrimaryKeyWithBLOBs" parameterType="plus.bookshelf.Dao.DO.CategoryDO">
<!--
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
This element was generated on Sat Mar 12 18:53:08 SGT 2022.
-->
update category_info
set name = #{name,jdbcType=VARCHAR},
isShow = #{isshow,jdbcType=BIT},
order = #{order,jdbcType=INTEGER},
level = #{level,jdbcType=INTEGER},
parentId = #{parentid,jdbcType=INTEGER},
description = #{description,jdbcType=LONGVARCHAR}
where id = #{id,jdbcType=INTEGER}
</update>
<update id="updateByPrimaryKey" parameterType="plus.bookshelf.Dao.DO.CategoryDO">
<!--
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
This element was generated on Sat Mar 12 18:53:08 SGT 2022.
-->
update category_info
set name = #{name,jdbcType=VARCHAR},
isShow = #{isshow,jdbcType=BIT},
order = #{order,jdbcType=INTEGER},
level = #{level,jdbcType=INTEGER},
parentId = #{parentid,jdbcType=INTEGER}
where id = #{id,jdbcType=INTEGER}
</update>
</mapper>