| | |
| | | import cc.mrbird.febs.common.entity.FebsResponse; |
| | | import cc.mrbird.febs.common.entity.QueryRequest; |
| | | import cn.hutool.core.util.ObjectUtil; |
| | | import cn.hutool.core.util.StrUtil; |
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.core.toolkit.Wrappers; |
| | |
| | | public IPage<AiProductPoint> listInPage(AiProductPoint dto, QueryRequest request) { |
| | | Page<AiProductPoint> page = new Page<>(request.getPageNum(), request.getPageSize()); |
| | | LambdaQueryWrapper<AiProductPoint> query = Wrappers.lambdaQuery(AiProductPoint.class); |
| | | if (StrUtil.isNotEmpty(dto.getCompanyId())){ |
| | | query.eq(AiProductPoint::getCompanyId, dto.getCompanyId()); |
| | | } |
| | | Page<AiProductPoint> pages = aiProductPointMapper.selectPage(page, query); |
| | | return pages; |
| | | } |
| | |
| | | entity.setIsNormal(dto.getIsNormal() ); |
| | | entity.setFinderUserName(dto.getFinderUserName()); |
| | | entity.setFeedId(dto.getFeedId()); |
| | | entity.setFeedImg(dto.getFeedImg()); |
| | | entity.setTitle(dto.getTitle()); |
| | | entity.setDescription(dto.getDescription()); |
| | | entity.setCreatedTime(new Date()); |
| | |
| | | .set(AiProductPoint::getFinderUserName, dto.getFinderUserName()) |
| | | .set(AiProductPoint::getFeedId, dto.getFeedId()) |
| | | .set(AiProductPoint::getTitle, dto.getTitle()) |
| | | .set(AiProductPoint::getFeedImg, dto.getFeedImg()) |
| | | .set(AiProductPoint::getDescription, dto.getDescription()) |
| | | .set(AiProductPoint::getUpdatedTime, new Date()) |
| | | .eq(AiProductPoint::getId, id) |
| | |
| | | } |
| | | |
| | | @Override |
| | | public List<AiProductPoint> pointTree() { |
| | | |
| | | return aiProductPointMapper.selectList(null); |
| | | public List<AiProductPoint> pointTree(String companyId) { |
| | | LambdaQueryWrapper<AiProductPoint> query = Wrappers.lambdaQuery(AiProductPoint.class); |
| | | if (StrUtil.isNotEmpty(companyId)){ |
| | | query.eq(AiProductPoint::getCompanyId, companyId); |
| | | } |
| | | return aiProductPointMapper.selectList(query); |
| | | } |
| | | |
| | | |