| | |
| | | import cc.mrbird.febs.ai.res.productPoint.ApiProductPointVo; |
| | | import cc.mrbird.febs.ai.service.*; |
| | | import cc.mrbird.febs.common.entity.FebsResponse; |
| | | import cc.mrbird.febs.common.exception.FebsException; |
| | | import cn.hutool.core.util.ObjectUtil; |
| | | import cn.hutool.core.util.StrUtil; |
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import lombok.RequiredArgsConstructor; |
| | |
| | | @Override |
| | | public FebsResponse productInfo(ApiProductInfoDto dto) { |
| | | |
| | | ApiProductInfoVo vo = new ApiProductInfoVo(); |
| | | String id = dto.getId(); |
| | | AiProduct entity = this.getById(id); |
| | | ApiProductInfoVo vo = new ApiProductInfoVo(); |
| | | if (ObjectUtil.isNull( entity)){ |
| | | throw new FebsException("产品不存在"); |
| | | } |
| | | vo.setId(entity.getId()); |
| | | vo.setProductCategoryId(entity.getProductCategoryId()); |
| | | vo.setName(entity.getName()); |
| | |
| | | List<ApiProductPointVo> apiProductPointVos = aiProductPointService.listByProductId(id); |
| | | return new FebsResponse().success().data(apiProductPointVos); |
| | | } |
| | | |
| | | @Override |
| | | public List<AiProduct> getProductListByQuery(LambdaQueryWrapper<AiProduct> productQuery) { |
| | | return aiProductMapper.selectList(productQuery); |
| | | } |
| | | } |