From 3d2ed120efa8830f1f9f6bb8f6eb3e188c8ff38d Mon Sep 17 00:00:00 2001
From: lsh <lsh@163.com>
Date: 星期四, 13 十一月 2025 17:09:06 +0800
Subject: [PATCH] *
---
src/main/resources/mapper/OrderPakoutMapper.xml | 50 +++++++++++++++++++++++++++++++++-----------------
1 files changed, 33 insertions(+), 17 deletions(-)
diff --git a/src/main/resources/mapper/OrderPakoutMapper.xml b/src/main/resources/mapper/OrderPakoutMapper.xml
index 59ec1d5..63141ba 100644
--- a/src/main/resources/mapper/OrderPakoutMapper.xml
+++ b/src/main/resources/mapper/OrderPakoutMapper.xml
@@ -44,7 +44,8 @@
<!-- 涓昏鍥続鐨勯�氱敤鏌ヨ鏄犲皠缁撴灉 -->
<resultMap id="PakoutMainResultMap" type="com.zy.asrs.entity.result.OrderPakoutMainVo">
- <id column="id" property="id" jdbcType="BIGINT"/>
+ <result column="id" property="id" jdbcType="BIGINT"/>
+ <result column="row" property="row" jdbcType="BIGINT"/>
<result column="item_name" property="itemName" jdbcType="VARCHAR"/>
<result column="order_count" property="orderCount" jdbcType="INTEGER"/>
<result column="uuid" property="uuid" jdbcType="VARCHAR"/>
@@ -140,25 +141,40 @@
where 1=1
and item_name = #{itemName}
and order_no != #{orderNo}
- and (settle = 10 or settle = 98)
+ and (settle = 10 or settle = 13 or settle = 98)
+ </update>
+
+ <update id="updateItemName">
+ update man_order_pakout
+ set settle = #{settle}
+ ,update_by = #{userId}
+ ,update_time = getdate()
+ where 1=1
+ and item_name = #{itemName}
</update>
<select id="selectOrderPakoutMainVoList" resultMap="PakoutMainResultMap">
- SELECT * FROM v_pakout_main
- WHERE status = 1
- <if test="itemName != null and itemName != ''">
- AND item_name LIKE CONCAT('%', #{itemName}, '%')
- </if>
- <if test="cstmrName != null and cstmrName != ''">
- AND cstmr_name LIKE CONCAT('%', #{cstmrName}, '%')
- </if>
- <if test="settle != null and settle != ''">
- AND settle = #{settle}
- </if>
- <if test="status != null and status != ''">
- AND status = #{status}
- </if>
- ORDER BY create_time DESC
+ select d.* from (
+ select
+ ROW_NUMBER() over (order by c.update_time desc) as row1,
+ c.* from (
+ select a.* from v_pakout_main as a
+ where 1=1 AND status = 1
+ <if test="itemName != null and itemName != ''">
+ AND item_name LIKE CONCAT('%', #{itemName}, '%')
+ </if>
+ <if test="cstmrName != null and cstmrName != ''">
+ AND cstmr_name LIKE CONCAT('%', #{cstmrName}, '%')
+ </if>
+ <if test="settle != null and settle != ''">
+ AND settle = #{settle}
+ </if>
+ <if test="status != null and status != ''">
+ AND status = #{status}
+ </if>
+ ) as c
+ ) as d
+ where d.row1 between ((#{pageNumber}-1)*#{pageSize}+1) and (#{pageNumber}*#{pageSize}) order by d.update_time desc
</select>
<select id="selectOrderPakoutMainVoListTotal" resultType="Long">
--
Gitblit v1.9.1