|
|
@@ -0,0 +1,37 @@
|
|
|
+package com.uas.platform.b2c.external.erp.product.service.impl;
|
|
|
+
|
|
|
+
|
|
|
+import com.uas.api.b2c_erp.baisc.model.Product;
|
|
|
+import com.uas.api.b2c_erp.baisc.service.ProductService;
|
|
|
+import com.uas.platform.b2c.prod.commodity.dao.ProductDao;
|
|
|
+import org.springframework.beans.BeanUtils;
|
|
|
+import org.springframework.beans.factory.annotation.Autowired;
|
|
|
+
|
|
|
+import java.util.ArrayList;
|
|
|
+import java.util.List;
|
|
|
+
|
|
|
+/**
|
|
|
+ * ERP物料服务
|
|
|
+ *
|
|
|
+ * Created by hejq on 2018-05-14.
|
|
|
+ */
|
|
|
+public class ProductServiceImpl implements ProductService {
|
|
|
+
|
|
|
+ @Autowired
|
|
|
+ private ProductDao productDao;
|
|
|
+
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 通过型号查询信息(测试方法)
|
|
|
+ *
|
|
|
+ * @param cmpCode 原厂型号
|
|
|
+ * @return
|
|
|
+ */
|
|
|
+ @Override
|
|
|
+ public List<Product> findByCmpCode(String cmpCode) {
|
|
|
+ List<Product> productList = new ArrayList<>();
|
|
|
+ List<com.uas.platform.b2c.prod.commodity.model.Product> products = productDao.findByCmpCode(cmpCode);
|
|
|
+ BeanUtils.copyProperties(products, productList, Product.class);
|
|
|
+ return productList;
|
|
|
+ }
|
|
|
+}
|