From 781c2e20a4bb844dae3f4eafbf5f0e494b942ea8 Mon Sep 17 00:00:00 2001
From: java110 <928255095@qq.com>
Date: 星期四, 25 五月 2023 18:07:08 +0800
Subject: [PATCH] optimize

---
 java110-db/src/main/resources/mapper/common/CarInoutServiceDaoImplMapper.xml |   33 +++++++++++++++------------------
 1 files changed, 15 insertions(+), 18 deletions(-)

diff --git a/java110-db/src/main/resources/mapper/common/CarInoutServiceDaoImplMapper.xml b/java110-db/src/main/resources/mapper/common/CarInoutServiceDaoImplMapper.xml
index ad65ceb..41e898d 100755
--- a/java110-db/src/main/resources/mapper/common/CarInoutServiceDaoImplMapper.xml
+++ b/java110-db/src/main/resources/mapper/common/CarInoutServiceDaoImplMapper.xml
@@ -1,18 +1,13 @@
 <?xml version="1.0" encoding="UTF-8" ?>
-<!DOCTYPE mapper
-        PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
 <mapper namespace="carInoutServiceDaoImpl">
 
     <!-- 淇濆瓨杩涘嚭鍦轰俊鎭� add by wuxw 2018-07-03 -->
     <insert id="saveBusinessCarInoutInfo" parameterType="Map">
-        insert into business_car_inout(
-        in_time,inout_id,operate,car_num,state,community_id,b_id,out_time
-        ) values (
-        #{inTime},#{inoutId},#{operate},#{carNum},#{state},#{communityId},#{bId},#{outTime}
-        )
+        insert into business_car_inout(in_time, inout_id, operate, car_num, state, community_id, b_id, out_time)
+        values (#{inTime}, #{inoutId}, #{operate}, #{carNum}, #{state}, #{communityId}, #{bId}, #{outTime})
     </insert>
-
 
     <!-- 鏌ヨ杩涘嚭鍦轰俊鎭紙Business锛� add by wuxw 2018-07-03 -->
     <select id="getBusinessCarInoutInfo" parameterType="Map" resultType="Map">
@@ -44,9 +39,7 @@
         <if test="outTime !=null ">
             and t.out_time= #{outTime}
         </if>
-
     </select>
-
 
     <!-- 淇濆瓨杩涘嚭鍦轰俊鎭嚦 instance琛ㄤ腑 add by wuxw 2018-07-03 -->
     <insert id="saveCarInoutInfoInstance" parameterType="Map">
@@ -76,9 +69,7 @@
         <if test="outTime !=null ">
             and t.out_time= #{outTime}
         </if>
-
     </insert>
-
 
     <!-- 鏌ヨ杩涘嚭鍦轰俊鎭� add by wuxw 2018-07-03 -->
     <select id="getCarInoutInfo" parameterType="Map" resultType="Map">
@@ -120,13 +111,17 @@
         <if test="outTime !=null ">
             and t.out_time= #{outTime}
         </if>
+        <if test="startTime != null and startTime != ''">
+            and t.in_time &gt; #{startTime}
+        </if>
+        <if test="endTime != null and endTime != ''">
+            and t.out_time &lt; #{endTime}
+        </if>
         order by t.create_time desc
         <if test="page != -1 and page != null ">
             limit #{page}, #{row}
         </if>
-
     </select>
-
 
     <!-- 淇敼杩涘嚭鍦轰俊鎭� add by wuxw 2018-07-03 -->
     <update id="updateCarInoutInfoInstance" parameterType="Map">
@@ -156,7 +151,6 @@
         <if test="bId !=null and bId != ''">
             and t.b_id= #{bId}
         </if>
-
     </update>
 
     <!-- 鏌ヨ杩涘嚭鍦烘暟閲� add by wuxw 2018-07-03 -->
@@ -197,8 +191,11 @@
         <if test="outTime !=null ">
             and t.out_time= #{outTime}
         </if>
-
-
+        <if test="startTime != null and startTime != ''">
+            and t.in_time &gt; #{startTime}
+        </if>
+        <if test="endTime != null and endTime != ''">
+            and t.out_time &lt; #{endTime}
+        </if>
     </select>
-
 </mapper>

--
Gitblit v1.8.0