From ae4a996ce351c55fa466187c74d790efe484dd32 Mon Sep 17 00:00:00 2001
From: zss <zss@example.com>
Date: 星期二, 15 八月 2023 18:01:47 +0800
Subject: [PATCH] 解bug
---
inspect-server/src/main/resources/mapper/InspectUnacceptedMapper.xml | 19 +++++++++++--------
1 files changed, 11 insertions(+), 8 deletions(-)
diff --git a/inspect-server/src/main/resources/mapper/InspectUnacceptedMapper.xml b/inspect-server/src/main/resources/mapper/InspectUnacceptedMapper.xml
index 6cd8f94..b02f98c 100644
--- a/inspect-server/src/main/resources/mapper/InspectUnacceptedMapper.xml
+++ b/inspect-server/src/main/resources/mapper/InspectUnacceptedMapper.xml
@@ -2,7 +2,7 @@
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
<mapper namespace="com.yuanchu.mom.mapper.InspectUnacceptedMapper">
<select id="selectUnRawInspectsList" resultType="java.util.Map">
- select
+ select ru.id,
DATE_FORMAT(form_time, '%Y-%m-%d') '鏉ユ枡鏃ユ湡',
reason,
code,
@@ -18,20 +18,22 @@
DATE_FORMAT(deal_time, '%Y-%m-%d') '澶勭悊鏃ユ湡'
from mom_ocean.raw_inspect ri inner join mom_ocean.inspect_unaccepted ru on ri.id = ru.raw_inspect_id
<where>
- <if test="dealState!=null">
+ <if test="dealState!=null and dealState!=''">
and deal_state=#{dealState}
</if>
- <if test="formTime!=null">
+ <if test="formTime!=null and formTime!=''">
and form_time=#{formTime}
</if>
- <if test="type!=null">
+ <if test="type!=null and type!=''">
and ru.type=#{type}
</if>
and ru.state=1
</where>
+ order by ru.id desc
</select>
<select id="selectInsList" resultType="java.util.Map">
- select DATE_FORMAT(fi.create_time, '%Y-%m-%d') '鏉ユ枡鏃ユ湡',
+ select ru.id,
+ DATE_FORMAT(fi.create_time, '%Y-%m-%d') '鏉ユ枡鏃ユ湡',
reason,
material_code,
name,
@@ -49,15 +51,16 @@
mom_ocean.user u
where fi.id = ru.raw_inspect_id
and fi.user_id=u.id
- <if test="dealState!=null">
+ <if test="dealState!=null and dealState!=''">
and deal_state=#{dealState}
</if>
- <if test="formTime!=null">
+ <if test="formTime!=null and formTime!=''">
and fi.create_time=#{formTime}
</if>
- <if test="type!=null">
+ <if test="type!=null and type!=''">
and ru.type=#{type}
</if>
and ru.state=1
+ order by ru.id desc
</select>
</mapper>
\ No newline at end of file
--
Gitblit v1.9.3