From 1f2697051a87a7ca54734ccbf04a4bc8b0110907 Mon Sep 17 00:00:00 2001
From: zxl <763096477@qq.com>
Date: 星期五, 21 三月 2025 15:56:18 +0800
Subject: [PATCH] 建设内容
---
business/src/main/java/com/ycl/service/impl/ProjectInvestmentFundingServiceImpl.java | 14 +++++++++-----
1 files changed, 9 insertions(+), 5 deletions(-)
diff --git a/business/src/main/java/com/ycl/service/impl/ProjectInvestmentFundingServiceImpl.java b/business/src/main/java/com/ycl/service/impl/ProjectInvestmentFundingServiceImpl.java
index ff2a93b..d9a9e1b 100644
--- a/business/src/main/java/com/ycl/service/impl/ProjectInvestmentFundingServiceImpl.java
+++ b/business/src/main/java/com/ycl/service/impl/ProjectInvestmentFundingServiceImpl.java
@@ -2,6 +2,7 @@
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.baomidou.mybatisplus.extension.conditions.query.LambdaQueryChainWrapper;
import com.ycl.common.utils.SecurityUtils;
import com.ycl.domain.entity.ProjectInvestmentFunding;
import com.ycl.domain.entity.ProjectInvestmentInfo;
@@ -46,6 +47,7 @@
entity.setCreateBy(userId);
entity.setUpdateBy(userId);
baseMapper.insert(entity);
+ //閬垮厤鏂板涓�涓悗閲嶅鏂板杩斿洖id缁欏墠绔垽鏂�
return Result.ok("娣诲姞鎴愬姛").data(entity.getId());
}
@@ -108,11 +110,13 @@
*/
@Override
public Result detail(Integer id) {
- QueryWrapper<ProjectInvestmentFunding> queryWrapper = new QueryWrapper<>();
- queryWrapper.eq("project_id",id);
- ProjectInvestmentFunding entity = baseMapper.selectOne(queryWrapper);
- Assert.notNull(entity, "璁板綍涓嶅瓨鍦�");
- ProjectInvestmentFundingVO vo = ProjectInvestmentFundingVO.getVoByEntity(entity, null);
+ ProjectInvestmentFunding entity = new LambdaQueryChainWrapper<>(baseMapper)
+ .eq(ProjectInvestmentFunding::getProjectId, id)
+ .one();
+ ProjectInvestmentFundingVO vo =new ProjectInvestmentFundingVO();
+ if(entity!=null){
+ vo = ProjectInvestmentFundingVO.getVoByEntity(entity, null);
+ }
return Result.ok().data(vo);
}
--
Gitblit v1.8.0