...
|
...
|
@@ -1897,4 +1897,28 @@ public class ProductServiceImpl implements ProductService { |
|
|
ProductProfit productProfit = productProfitMapper.selectByProductId(productId);
|
|
|
return null == productProfit ? null : productProfit.getProfitRate();
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
* 根据编码查询货号 名称 和图片
|
|
|
* @param productId
|
|
|
* @return
|
|
|
*/
|
|
|
public ProductInfo queryProductInfo(Integer productId) {
|
|
|
ProductInfo resp = new ProductInfo();
|
|
|
|
|
|
Product product = productMapper.selectByPrimaryKey(productId);
|
|
|
if (product != null) {
|
|
|
resp.setProductId(product.getId());
|
|
|
resp.setProductName(product.getProductName());
|
|
|
resp.setProductCode(product.getProductCode());
|
|
|
}
|
|
|
|
|
|
List<Goods> goods = goodsMapper.selectByProductIds(Lists.newArrayList(productId));
|
|
|
if (org.apache.commons.collections.CollectionUtils.isNotEmpty(goods)) {
|
|
|
resp.setColorImage(goods.get(0).getColorImage());
|
|
|
|
|
|
}
|
|
|
|
|
|
return resp;
|
|
|
}
|
|
|
} |
...
|
...
|
|