| | |
| | | package com.ycl.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.ycl.common.utils.SecurityUtils; |
| | | import com.ycl.domain.entity.ProjectInvestmentInfo; |
| | |
| | | entity.setUpdateBy(userId); |
| | | |
| | | baseMapper.insert(entity); |
| | | //避免新增一个后重复新增返回id给前端判断 |
| | | return Result.ok("添加成功").data(entity.getId()); |
| | | } |
| | | |
| | |
| | | */ |
| | | @Override |
| | | public Result detail(Integer id) { |
| | | ProjectInvestmentInfoVO vo = baseMapper.getById(id); |
| | | Assert.notNull(vo, "记录不存在"); |
| | | QueryWrapper<ProjectInvestmentInfo> queryWrapper = new QueryWrapper<>(); |
| | | queryWrapper.eq("project_id",id); |
| | | ProjectInvestmentInfo entity = baseMapper.selectOne(queryWrapper); |
| | | ProjectInvestmentInfoVO vo = new ProjectInvestmentInfoVO(); |
| | | if(entity!=null) { |
| | | vo = ProjectInvestmentInfoVO.getVoByEntity(entity, null); |
| | | } |
| | | return Result.ok().data(vo); |
| | | } |
| | | |