From 1519a7c81e6566dd0cbc6acfb1b5e92c3aaba7df Mon Sep 17 00:00:00 2001 From: xiangpei <xiangpei@timesnew.cn> Date: 星期日, 02 三月 2025 10:53:57 +0800 Subject: [PATCH] 赋码定时任务只判断超时,且用红码时间判断 --- business/src/main/java/com/ycl/service/impl/ProjectInvestmentFundingServiceImpl.java | 22 +++++++++++++++++++--- 1 files changed, 19 insertions(+), 3 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 d77109b..d9a9e1b 100644 --- a/business/src/main/java/com/ycl/service/impl/ProjectInvestmentFundingServiceImpl.java +++ b/business/src/main/java/com/ycl/service/impl/ProjectInvestmentFundingServiceImpl.java @@ -1,7 +1,12 @@ package com.ycl.service.impl; +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; +import com.ycl.domain.vo.ProjectInvestmentInfoVO; import com.ycl.mapper.ProjectInvestmentFundingMapper; import com.ycl.service.ProjectInvestmentFundingService; import com.ycl.common.base.Result; @@ -38,8 +43,12 @@ @Override public Result add(ProjectInvestmentFundingForm form) { ProjectInvestmentFunding entity = ProjectInvestmentFundingForm.getEntityByForm(form, null); + Long userId = SecurityUtils.getUserId(); + entity.setCreateBy(userId); + entity.setUpdateBy(userId); baseMapper.insert(entity); - return Result.ok("娣诲姞鎴愬姛"); + //閬垮厤鏂板涓�涓悗閲嶅鏂板杩斿洖id缁欏墠绔垽鏂� + return Result.ok("娣诲姞鎴愬姛").data(entity.getId()); } /** @@ -54,6 +63,8 @@ // 涓虹┖鎶汭llegalArgumentException锛屽仛鍏ㄥ眬寮傚父澶勭悊 Assert.notNull(entity, "璁板綍涓嶅瓨鍦�"); BeanUtils.copyProperties(form, entity); + Long userId = SecurityUtils.getUserId(); + entity.setUpdateBy(userId); baseMapper.updateById(entity); return Result.ok("淇敼鎴愬姛"); } @@ -99,8 +110,13 @@ */ @Override public Result detail(Integer id) { - ProjectInvestmentFundingVO vo = baseMapper.getById(id); - Assert.notNull(vo, "璁板綍涓嶅瓨鍦�"); + 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