Parcourir la source

门锁授权查询状态修改SQL修改

liujh il y a 3 ans
Parent
commit
85f2400516

+ 5 - 1
zd-modules/zd-algorithm/src/main/resources/mapper/smartlock/SlOpendoorApplyMapper.xml

@@ -119,7 +119,11 @@
             <if test="safeUserName != null  and position != ''">and t.safe_user_name = #{safeUserName}</if>
             <if test="position != null  and position != ''">and t.position = #{position}</if>
             <if test="college != null  and college != ''">and t.college = #{college}</if>
-            <if test="applyStatus != null ">and t.apply_status = #{applyStatus}</if>
+            <if test="applyStatus != null ">
+                <if test="applyStatus == 1 ">and t.creat_time &gt; now() </if>
+
+                <if test="applyStatus == 2 ">and t.creat_time &lt; now() </if>
+            </if>
             <if test="applyNumber != null ">and t.apply_number = #{applyNumber}</if>
             <if test="illustrate != null ">and t.illustrate = #{illustrate}</if>
             <if test="approvalUser != null ">and t.approval_user = #{approvalUser}</if>