| | |
| | | import cc.mrbird.febs.ai.entity.AiProductDependency; |
| | | import cc.mrbird.febs.ai.mapper.AiProductDependencyMapper; |
| | | import cc.mrbird.febs.ai.service.AiProductDependencyService; |
| | | import com.baomidou.mybatisplus.core.toolkit.Wrappers; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import lombok.RequiredArgsConstructor; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import java.util.List; |
| | | import java.util.Set; |
| | | |
| | | @Slf4j |
| | | @Service |
| | | @RequiredArgsConstructor |
| | | public class AiProductDependencyServiceImpl extends ServiceImpl<AiProductDependencyMapper, AiProductDependency> implements AiProductDependencyService { |
| | | |
| | | private final AiProductDependencyMapper aiProductDependencyMapper; |
| | | |
| | | @Override |
| | | public List<AiProductDependency> selectListByProductIds(Set<String> productIds) { |
| | | return aiProductDependencyMapper.selectList( |
| | | Wrappers.lambdaQuery(AiProductDependency.class) |
| | | .in(AiProductDependency::getTargetProductId, productIds) |
| | | ); |
| | | } |
| | | |
| | | @Override |
| | | public List<AiProductDependency> selectListByProductId(String productId) { |
| | | return aiProductDependencyMapper.selectList( |
| | | Wrappers.lambdaQuery(AiProductDependency.class) |
| | | .eq(AiProductDependency::getPrerequisiteProductId, productId) |
| | | ); |
| | | } |
| | | |
| | | @Override |
| | | public List<AiProductDependency> selectListByProductId(String productId, int intValue) { |
| | | |
| | | return aiProductDependencyMapper.selectList( |
| | | Wrappers.lambdaQuery(AiProductDependency.class) |
| | | .eq(AiProductDependency::getPrerequisiteProductId, productId) |
| | | .ge(AiProductDependency::getRequiredScore, intValue) |
| | | ); |
| | | } |
| | | } |