Forráskód Böngészése

Merge branch 'dev' of http://192.168.1.43:3000/v2/zd-parents into dev

chaiyunlong 3 éve
szülő
commit
80a468bd39

+ 2 - 4
zd-modules/zd-algorithm/src/main/java/com/zd/alg/smartlock/controller/SlOpendoorApplyController.java

@@ -43,9 +43,6 @@ public class SlOpendoorApplyController extends BaseController
     @Autowired
     private TokenService tokenService;
 
-    @Autowired
-    private SmartlockUtil smartlockUtil;
-
     /**
      * 查询申请开门列表
      */
@@ -55,7 +52,8 @@ public class SlOpendoorApplyController extends BaseController
     public TableDataInfo<SlOpendoorApplyVo> list(SlOpendoorApplyVo slOpendoorApply)
     {
         //获取登录用户
-        SysUser sysUser = tokenService.getLoginUser().getSysUser();
+        // SysUser sysUser = tokenService.getLoginUser().getSysUser();
+
         startPage("creat_time","descending");
         List<SlOpendoorApplyVo> list = slOpendoorApplyService.selectSlOpendoorApplyList(slOpendoorApply);
         for (SlOpendoorApplyVo vo:list) {

+ 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>