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

添加查询书籍;BookDO映射文件更新;DOMapper添加@Repository注解;添加自定义业务异常处理;添加Validation验证

This commit is contained in:
2022-03-15 17:31:12 +08:00
parent e93b52df9b
commit c2079f9064
22 changed files with 1269 additions and 41 deletions

View File

@@ -23,6 +23,39 @@
-->
<result column="description" jdbcType="LONGVARCHAR" property="description" />
</resultMap>
<sql id="Example_Where_Clause">
<!--
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
-->
<where>
<foreach collection="oredCriteria" item="criteria" separator="or">
<if test="criteria.valid">
<trim prefix="(" prefixOverrides="and" suffix=")">
<foreach collection="criteria.criteria" item="criterion">
<choose>
<when test="criterion.noValue">
and ${criterion.condition}
</when>
<when test="criterion.singleValue">
and ${criterion.condition} #{criterion.value}
</when>
<when test="criterion.betweenValue">
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
</when>
<when test="criterion.listValue">
and ${criterion.condition}
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
#{listItem}
</foreach>
</when>
</choose>
</foreach>
</trim>
</if>
</foreach>
</where>
</sql>
<sql id="Base_Column_List">
<!--
WARNING - @mbg.generated
@@ -38,6 +71,46 @@
-->
description
</sql>
<select id="selectByExampleWithBLOBs" parameterType="plus.bookshelf.Dao.DO.BookDOExample" resultMap="ResultMapWithBLOBs">
<!--
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
-->
select
<if test="distinct">
distinct
</if>
'false' as QUERYID,
<include refid="Base_Column_List" />
,
<include refid="Blob_Column_List" />
from book_info
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
<if test="orderByClause != null">
order by ${orderByClause}
</if>
</select>
<select id="selectByExample" parameterType="plus.bookshelf.Dao.DO.BookDOExample" resultMap="BaseResultMap">
<!--
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
-->
select
<if test="distinct">
distinct
</if>
'false' as QUERYID,
<include refid="Base_Column_List" />
from book_info
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
<if test="orderByClause != null">
order by ${orderByClause}
</if>
</select>
<select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="ResultMapWithBLOBs">
<!--
WARNING - @mbg.generated

View File

@@ -39,7 +39,7 @@
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
-->
select
select
<include refid="Base_Column_List" />
,
<include refid="Blob_Column_List" />
@@ -59,11 +59,11 @@
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
-->
insert into category_info (id, `name`, is_show,
`order`, `level`, parent_id,
insert into category_info (id, `name`, is_show,
`order`, `level`, parent_id,
description)
values (#{id,jdbcType=INTEGER}, #{name,jdbcType=VARCHAR}, #{isShow,jdbcType=BIT},
#{order,jdbcType=INTEGER}, #{level,jdbcType=INTEGER}, #{parentId,jdbcType=INTEGER},
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">

View File

@@ -21,7 +21,7 @@
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
-->
id, username, encript_pwd, nickname, user_identity, avatar, phone, weixin_third_party_auth_code,
id, username, encript_pwd, nickname, user_identity, avatar, phone, weixin_third_party_auth_code,
qq_third_party_auth_code
</sql>
<select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
@@ -29,7 +29,7 @@
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
-->
select
select
<include refid="Base_Column_List" />
from user_info
where id = #{id,jdbcType=INTEGER}
@@ -47,12 +47,12 @@
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
-->
insert into user_info (id, username, encript_pwd,
nickname, user_identity, avatar,
insert into user_info (id, username, encript_pwd,
nickname, user_identity, avatar,
phone, weixin_third_party_auth_code, qq_third_party_auth_code
)
values (#{id,jdbcType=INTEGER}, #{username,jdbcType=VARCHAR}, #{encriptPwd,jdbcType=VARCHAR},
#{nickname,jdbcType=VARCHAR}, #{userIdentity,jdbcType=VARCHAR}, #{avatar,jdbcType=VARCHAR},
values (#{id,jdbcType=INTEGER}, #{username,jdbcType=VARCHAR}, #{encriptPwd,jdbcType=VARCHAR},
#{nickname,jdbcType=VARCHAR}, #{userIdentity,jdbcType=VARCHAR}, #{avatar,jdbcType=VARCHAR},
#{phone,jdbcType=VARCHAR}, #{weixinThirdPartyAuthCode,jdbcType=VARCHAR}, #{qqThirdPartyAuthCode,jdbcType=VARCHAR}
)
</insert>

View File

@@ -74,7 +74,7 @@
<!-- 生成对应表及其类名 -->
<!--<table tableName="book_info" domainObjectName="BookDO" enableCountByExample="false"-->
<!-- enableUpdateByExample="false" enableDeleteByExample="false" enableSelectByExample="false"-->
<!-- enableUpdateByExample="false" enableDeleteByExample="false" enableSelectByExample="true"-->
<!-- selectByExampleQueryId="false"></table>-->
<!--<table tableName="book_thumbnail_info" domainObjectName="ThumbnailDO" enableCountByExample="false"-->
<!-- enableUpdateByExample="false" enableDeleteByExample="false" enableSelectByExample="false"-->