|
@@ -24,7 +24,6 @@ import com.ruoyi.common.utils.wrapper.SqlField;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.stereotype.Service;
|
|
|
|
|
|
-import java.math.BigDecimal;
|
|
|
import java.util.List;
|
|
|
import java.util.Map;
|
|
|
import java.util.function.Function;
|
|
@@ -190,7 +189,7 @@ public class SupplierPriceServiceImpl extends ServiceImpl<SupplierPriceMapper, S
|
|
|
}
|
|
|
|
|
|
@Override
|
|
|
- public Map<Long, BigDecimal> getSupplierPriceByProductIds(SupplierPriceDto dto) {
|
|
|
+ public Map<Long, SupplierPrice> getSupplierPriceByProductIds(SupplierPriceDto dto) {
|
|
|
Long supplierId = dto.getSupplierInfoId();
|
|
|
if (ObjectUtils.isEmpty(supplierId)) {
|
|
|
throw new ServiceException("供应商id不能为空");
|
|
@@ -200,7 +199,7 @@ public class SupplierPriceServiceImpl extends ServiceImpl<SupplierPriceMapper, S
|
|
|
throw new ServiceException("产品id数组不能为空");
|
|
|
}
|
|
|
List<SupplierPrice> list = list(q -> q.eq(SupplierPrice::getSupplierInfoId, supplierId).in(SupplierPrice::getProductInfoId, productIdList));
|
|
|
- return list.stream().collect(Collectors.toMap(SupplierPrice::getProductInfoId, SupplierPrice::getPrice));
|
|
|
+ return list.stream().collect(Collectors.toMap(SupplierPrice::getProductInfoId, Function.identity()));
|
|
|
}
|
|
|
|
|
|
@Override
|