| | |
| | | } |
| | | |
| | | @Override |
| | | public List<ProductPricing> getPricingByProductId(Long productId) { |
| | | public List<ProductPricing> getPricingByProductId(String productId) { |
| | | try { |
| | | if (productId == null) { |
| | | throw new BusinessException("产品ID不能为空"); |
| | | } |
| | | return baseMapper.selectByProductId(productId); |
| | | } catch (Exception e) { |
| | | log.error("根据产品ID查询定价失败: ", e); |
| | |
| | | } |
| | | |
| | | @Override |
| | | public List<ProductPricing> getPricingByCondition(String suiteName, String salesForm, |
| | | public List<ProductPricing> getPricingByCondition(String productId, String suiteName, String salesForm, |
| | | String customerType, String priceType, Boolean isActive) { |
| | | try { |
| | | QueryWrapper<ProductPricing> queryWrapper = new QueryWrapper<>(); |
| | | |
| | | |
| | | if (StringUtils.hasText(productId)) { |
| | | queryWrapper.like("product_id", productId); |
| | | } |
| | | |
| | | if (StringUtils.hasText(suiteName)) { |
| | | queryWrapper.like("suite_name", suiteName); |
| | | } |