From 9a4b09e6a32b4510e1e9c4fb13d6cb90b896abe4 Mon Sep 17 00:00:00 2001
From: zqy <2522236926@qq.com>
Date: 星期二, 16 七月 2024 21:23:26 +0800
Subject: [PATCH] 修改分页查询

---
 zhang-content/src/main/java/com/ruoyi/service/impl/ZPropertyServiceImpl.java |   16 +++++++++++++---
 1 files changed, 13 insertions(+), 3 deletions(-)

diff --git a/zhang-content/src/main/java/com/ruoyi/service/impl/ZPropertyServiceImpl.java b/zhang-content/src/main/java/com/ruoyi/service/impl/ZPropertyServiceImpl.java
index a243831..2d63a06 100644
--- a/zhang-content/src/main/java/com/ruoyi/service/impl/ZPropertyServiceImpl.java
+++ b/zhang-content/src/main/java/com/ruoyi/service/impl/ZPropertyServiceImpl.java
@@ -11,8 +11,6 @@
 import com.ruoyi.common.utils.StringUtils;
 import com.ruoyi.common.utils.poi.ExcelUtil;
 import com.ruoyi.domain.ZProperty;
-import com.ruoyi.domain.ZProperty;
-import com.ruoyi.domain.ZfProperty;
 import com.ruoyi.mapper.ZPropertyMapper;
 import com.ruoyi.service.ZPropertyService;
 import org.springframework.beans.factory.annotation.Autowired;
@@ -20,6 +18,7 @@
 import org.springframework.transaction.annotation.Transactional;
 import org.springframework.web.multipart.MultipartFile;
 
+import javax.annotation.Resource;
 import java.util.ArrayList;
 import java.util.Arrays;
 import java.util.HashMap;
@@ -38,6 +37,9 @@
 
     @Autowired
     ZPropertyServiceImpl zPropertyService;
+
+    @Resource
+    ZPropertyMapper zPropertyMapper;
 
     private LambdaQueryWrapper<ZProperty> uniqueCondition(ZProperty zProperty) {
         LambdaQueryWrapper<ZProperty> lqw = new LambdaQueryWrapper<>();
@@ -59,9 +61,11 @@
         lqw.eq(userId != null, ZProperty::getUserId, userId)
                 .like(StringUtils.isNotEmpty(zProperty.getType()), ZProperty::getType, zProperty.getType())
                 .like(StringUtils.isNotEmpty(zProperty.getIncomeName()), ZProperty::getIncomeName, zProperty.getIncomeName())
-                .like(StringUtils.isNotEmpty(zProperty.getType()), ZProperty::getType, zProperty.getType()).eq(zProperty.getIsChange()!=null,ZProperty::getIsChange,zProperty.getIsChange())
+                .like(StringUtils.isNotEmpty(zProperty.getType()), ZProperty::getType, zProperty.getType())
+                .like(StringUtils.isNotEmpty(zProperty.getIsChange()),ZProperty::getIsChange,zProperty.getIsChange())
                 .like(StringUtils.isNotEmpty(zProperty.getRemark()), ZProperty::getRemark, zProperty.getRemark())
                 .like(StringUtils.isNotEmpty(zProperty.getTimeLimit()),ZProperty::getTimeLimit,zProperty.getTimeLimit())
+                .eq(zProperty.getStatus()!=null,ZProperty::getStatus,zProperty.getStatus())
                 .between(zProperty.getHappenStartTime() != null && zProperty.getHappenEndTime() != null, ZProperty::getHappenTime, zProperty.getHappenStartTime(), zProperty.getHappenEndTime())
                 .orderByDesc(ZProperty::getCreateTime);
         return lqw;
@@ -128,6 +132,12 @@
     }
 
     @Override
+    public AjaxResult listType() {
+        List<String> result = zPropertyMapper.listType();
+        return AjaxResult.success(result);
+    }
+
+    @Override
     @Transactional
     public AjaxResult importExcel(MultipartFile file) {
 

--
Gitblit v1.9.1