|
@@ -0,0 +1,42 @@
|
|
|
|
+package cn.service.impl;
|
|
|
|
+
|
|
|
|
+import cn.dao.ProductDao;
|
|
|
|
+import cn.dao.impl.ProductDaoImpl;
|
|
|
|
+import cn.domain.Agent;
|
|
|
|
+import cn.domain.Product;
|
|
|
|
+import cn.service.ProductService;
|
|
|
|
+
|
|
|
|
+import java.util.List;
|
|
|
|
+
|
|
|
|
+public class ProductServiceImpl implements ProductService {
|
|
|
|
+ private ProductDao productDao = new ProductDaoImpl();
|
|
|
|
+ @Override
|
|
|
|
+ public List<Product> findProduct() throws Exception {
|
|
|
|
+ return productDao.findProduct();
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ @Override
|
|
|
|
+ public Product findProductById(String mid) throws Exception {
|
|
|
|
+ return productDao.findProductById(mid);
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ @Override
|
|
|
|
+ public List<Product> findProductByScompany(String scompany) throws Exception {
|
|
|
|
+ return productDao.findProductByScompany(scompany);
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ @Override
|
|
|
|
+ public void addProduct(Product product) throws Exception {
|
|
|
|
+ productDao.addProduct(product);
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ @Override
|
|
|
|
+ public void deleteProduct(String mid) throws Exception {
|
|
|
|
+ productDao.deleteProduct(mid);
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ @Override
|
|
|
|
+ public void updateProduct(Product product) throws Exception {
|
|
|
|
+ productDao.updateProduct(product);
|
|
|
|
+ }
|
|
|
|
+}
|