|
|
@@ -381,7 +381,8 @@ public class ProductServiceImpl implements ProductService {
|
|
|
if (productId == null) {
|
|
|
return false;
|
|
|
}
|
|
|
- Date date = new Date(System.currentTimeMillis());
|
|
|
+ Date date = new Date();
|
|
|
+ // 删除原有的替代料数据
|
|
|
List<ProductReplace> productReplacesOld = productReplaceDao.findByUserUUAndProductId(SystemSession.getUser().getUserUU(), productId);
|
|
|
productReplaceDao.delete(productReplacesOld);
|
|
|
for (ProductReplace productReplace : productReplaceList) {
|
|
|
@@ -392,6 +393,11 @@ public class ProductServiceImpl implements ProductService {
|
|
|
return true;
|
|
|
}
|
|
|
|
|
|
+ @Override
|
|
|
+ public List<ProductReplace> getReplacesByProductId(Long id) {
|
|
|
+ return productReplaceDao.findByProductIdOrderByDetno(id);
|
|
|
+ }
|
|
|
+
|
|
|
@Override
|
|
|
public List<Goods> getProductsGoods(String type, String keyword) {
|
|
|
final PageInfo page = new PageInfo();
|