From 20956b0f05f81ca47cf6c3e8f9b3b426e9cfd035 Mon Sep 17 00:00:00 2001
From: XiaoRuby <3114200645@qq.com>
Date: 星期日, 24 九月 2023 21:54:01 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/master'

---
 inventory-server/src/main/resources/mapper/ConsignmentMapper.xml |   28 +++++++++++++++++++++++++++-
 1 files changed, 27 insertions(+), 1 deletions(-)

diff --git a/inventory-server/src/main/resources/mapper/ConsignmentMapper.xml b/inventory-server/src/main/resources/mapper/ConsignmentMapper.xml
index ccc21e2..1724dbe 100644
--- a/inventory-server/src/main/resources/mapper/ConsignmentMapper.xml
+++ b/inventory-server/src/main/resources/mapper/ConsignmentMapper.xml
@@ -2,6 +2,32 @@
 <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
 <mapper namespace="com.yuanchu.mom.mapper.ConsignmentMapper">
     <select id="selectAll" resultType="com.yuanchu.mom.pojo.Consignment">
-        select * from mom_ocean.consignment where state=1
+        select *
+        from mom_ocean.consignment
+        where state = 1
+    </select>
+    <select id="selectAllCon" resultType="java.util.Map">
+        select id,
+               name,
+               specifications,
+               quality_traceability,
+               customer_code,
+               unit,
+               number,
+               check_name,
+               fit_name,
+               user_name
+        from mom_ocean.consignment
+        where state=1
+        <if test="name!=null and name!=''">
+            and name like concat('%',#{name},'%')
+        </if>
+        <if test="specifications!=null and specifications!=''">
+            and specifications like concat('%',#{specifications},'%')
+        </if>
+        <if test="time!=null and time!=''">
+            and DATE_FORMAT(create_time, '%Y-%m-%d')=#{time}
+        </if>
+        order by id desc
     </select>
 </mapper>
\ No newline at end of file

--
Gitblit v1.9.3