order list finish

This commit is contained in:
Cauchy
2023-10-20 10:47:33 +08:00
parent 21ca9f8d7d
commit a1b70c8d4f
6 changed files with 23 additions and 12 deletions

View File

@@ -17,9 +17,9 @@ spring:
type: com.alibaba.druid.pool.DruidDataSource
druid:
driver-class-name: com.mysql.cj.jdbc.Driver
url: jdbc:mysql://59.110.212.44:3306/e_book_test?useUnicode=true&characterEncoding=UTF-8&serverTimezone=Asia/Shanghai&allowMultiQueries=true
url: jdbc:mysql://127.0.0.1:3306/e_book_test?useUnicode=true&characterEncoding=UTF-8&serverTimezone=Asia/Shanghai&allowMultiQueries=true
username: root
password: HSXY1234hsxy
password: password
initial-size: 10
max-active: 100
min-idle: 10

View File

@@ -70,10 +70,16 @@
</select>
<select id="orderList" resultType="com.peanut.modules.book.entity.BuyOrder"
parameterType="com.peanut.modules.book.vo.request.BuyOrderListRequestVo">
parameterType="com.peanut.modules.book.vo.request.BuyOrderListRequestVo" resultMap="buyOrderMap">
<!--
select order_sn, province, city, district, user_phone, address, payment_method, order_status, remark
-->
select *
from buy_order
<where>
<if test="searchKeyWord != null">
order_sn like #{searchKeyWord}
</if>
<if test="orderStatus != null">
and order_status = #{orderStatus}
</if>
@@ -83,10 +89,6 @@
<if test="endTime != null">
and create_time &lt;= #{endTime}
</if>
<if test="searchKeyWord != null">
and order_sn like %#{searchKeyWord}%
</if>
</where>
limit #{index},#{pageSize}
</select>