From 7fce3006ecd0b670e33c2d3ba123778e79e2e943 Mon Sep 17 00:00:00 2001
From: 潘志宝 <979469083@qq.com>
Date: 星期一, 06 一月 2025 09:18:25 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/master'

---
 iailab-module-model/iailab-module-model-biz/src/main/java/com/iailab/module/model/mpk/service/impl/ProjectServiceImpl.java |   15 +++++++++------
 1 files changed, 9 insertions(+), 6 deletions(-)

diff --git a/iailab-module-model/iailab-module-model-biz/src/main/java/com/iailab/module/model/mpk/service/impl/ProjectServiceImpl.java b/iailab-module-model/iailab-module-model-biz/src/main/java/com/iailab/module/model/mpk/service/impl/ProjectServiceImpl.java
index 2ab3194..6095b8c 100644
--- a/iailab-module-model/iailab-module-model-biz/src/main/java/com/iailab/module/model/mpk/service/impl/ProjectServiceImpl.java
+++ b/iailab-module-model/iailab-module-model-biz/src/main/java/com/iailab/module/model/mpk/service/impl/ProjectServiceImpl.java
@@ -4,6 +4,7 @@
 import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
 import com.baomidou.mybatisplus.core.metadata.IPage;
 import com.iailab.framework.common.page.PageData;
+import com.iailab.framework.common.service.impl.BaseServiceImpl;
 import com.iailab.framework.common.service.impl.CrudServiceImpl;
 import com.iailab.framework.common.util.object.ConvertUtils;
 import com.iailab.module.model.mpk.dao.MpkFileDao;
@@ -13,6 +14,7 @@
 import com.iailab.module.model.mpk.dto.ProjectModelDTO;
 import com.iailab.module.model.mpk.dto.ProjectPackageHistoryDTO;
 import com.iailab.module.model.mpk.entity.ProjectEntity;
+import com.iailab.module.model.mpk.entity.ProjectPackageHistoryEntity;
 import com.iailab.module.model.mpk.service.ProjectModelService;
 import com.iailab.module.model.mpk.service.ProjectPackageHistoryModelService;
 import com.iailab.module.model.mpk.service.ProjectPackageHistoryService;
@@ -34,7 +36,7 @@
  **/
 @Service
 @Slf4j
-public class ProjectServiceImpl extends CrudServiceImpl<ProjectDao, ProjectEntity, ProjectDTO> implements ProjectService {
+public class ProjectServiceImpl extends BaseServiceImpl<ProjectDao, ProjectEntity> implements ProjectService {
 
     @Autowired
     ProjectModelService projectModelService;
@@ -47,9 +49,9 @@
 
     @Override
     public PageData<ProjectDTO> page(Map<String, Object> params) {
-        IPage<ProjectDTO> page = baseDao.getPageList(
+        IPage<ProjectEntity> page = baseDao.selectPage(
                 getPage(params, null, false),
-                params
+                getWrapper(params)
         );
 
         return getPageData(page, ProjectDTO.class);
@@ -121,7 +123,7 @@
         //删除备份文件
         Map<String,Object> map = new HashMap<>();
         map.put("projectId",id);
-        List<ProjectPackageHistoryDTO> list = projectPackageHistoryService.list(map);
+        List<ProjectPackageHistoryEntity> list = projectPackageHistoryService.list(map);
         list.forEach(e -> {
             File file = new File(e.getFilePath());
             if (file.exists()) {
@@ -161,14 +163,15 @@
         return new PageData<>(list,total);
     }
 
-    @Override
     public QueryWrapper<ProjectEntity> getWrapper(Map<String, Object> params){
         String id = (String)params.get("id");
         String projectName = (String)params.get("projectName");
+        String projectCode = (String)params.get("projectCode");
 
         QueryWrapper<ProjectEntity> wrapper = new QueryWrapper<>();
         wrapper.eq(StringUtils.isNotBlank(id), "id", id)
-                .like(StringUtils.isNotBlank(projectName),"project_name",projectName);
+                .like(StringUtils.isNotBlank(projectName),"project_name",projectName)
+                .like(StringUtils.isNotBlank(projectCode),"project_code",projectCode);
 
         return wrapper;
     }

--
Gitblit v1.9.3