From 66e4211cbfa154a87390b25c93b32d722e0d690c Mon Sep 17 00:00:00 2001
From: xiang <5914123@qq.com>
Date: 星期四, 14 九月 2023 15:22:37 +0800
Subject: [PATCH] Merge branch 'haucheng_panzhihua' of http://gitlab.nhys.cdnhxx.com/root/zhihuishequ into haucheng_panzhihua

---
 springcloud_k8s_panzhihuazhihuishequ/service_equipment/src/main/java/com/panzhihua/service_equipment/service/impl/UnionOutdoorSiteServiceImpl.java |   12 +++++++++++-
 1 files changed, 11 insertions(+), 1 deletions(-)

diff --git a/springcloud_k8s_panzhihuazhihuishequ/service_equipment/src/main/java/com/panzhihua/service_equipment/service/impl/UnionOutdoorSiteServiceImpl.java b/springcloud_k8s_panzhihuazhihuishequ/service_equipment/src/main/java/com/panzhihua/service_equipment/service/impl/UnionOutdoorSiteServiceImpl.java
index f43362f..0c994c8 100644
--- a/springcloud_k8s_panzhihuazhihuishequ/service_equipment/src/main/java/com/panzhihua/service_equipment/service/impl/UnionOutdoorSiteServiceImpl.java
+++ b/springcloud_k8s_panzhihuazhihuishequ/service_equipment/src/main/java/com/panzhihua/service_equipment/service/impl/UnionOutdoorSiteServiceImpl.java
@@ -14,6 +14,7 @@
 import com.panzhihua.service_equipment.model.dos.UnionOutdoorSite;
 import com.panzhihua.service_equipment.service.UnionOutdoorSiteService;
 import lombok.extern.slf4j.Slf4j;
+import org.apache.commons.lang3.StringUtils;
 import org.springframework.stereotype.Service;
 
 import javax.annotation.Resource;
@@ -39,7 +40,16 @@
         QueryWrapper<UnionOutdoorSite> unionOutdoorLaborDynamicQueryWrapper = new QueryWrapper<>();
         if (unionOutdoorSiteDto.getAreaCode()!=null)
             unionOutdoorLaborDynamicQueryWrapper.eq("area_code",unionOutdoorSiteDto.getAreaCode());
-        return R.ok( baseMapper.selectPage(page, unionOutdoorLaborDynamicQueryWrapper));
+        if (unionOutdoorSiteDto.getKeyWord()!=null)
+            unionOutdoorLaborDynamicQueryWrapper.and(wrapper -> wrapper.like("name", unionOutdoorSiteDto.getKeyWord())
+                    .or()
+                    .like("introduction", unionOutdoorSiteDto.getKeyWord())
+                    .or()
+                    .like("detailed_address", unionOutdoorSiteDto.getKeyWord()));
+
+        Page pageResult = baseMapper.selectPage(page, unionOutdoorLaborDynamicQueryWrapper);
+        pageResult.setTotal(pageResult.getRecords().size());
+        return R.ok(pageResult);
     }
 
     @Override

--
Gitblit v1.7.1