📄 productservicebean.java~33~
字号:
package xian.bin.serivce;import java.util.*;import app.Test;import xian.bin.product.*;import xian.bin.dto.*;import xian.bin.dao.*;public class ProductServiceBean implements ServiceProduct { private ProductDAO dao; public ProductServiceBean() { dao=new ProductDAO(); } //添加商品信息 public void addProduct(String pid,String pname, String brand, String spec, String unit, float price, float assprice, String pictrue, String explain, String bigcatalog, String smaillcatalog) throws Exception { try{ dao.addProduct(pid,pname,brand,spec,unit,price,assprice,pictrue,explain,bigcatalog,smaillcatalog); } catch(Exception e){ e.printStackTrace(); } } //获得所有商品信息 public Collection getAllProduct() throws Exception { try{ return dao.getAllProduct(); } catch(Exception e){ e.printStackTrace(); } return null; } //删除商品信息 public void delProduct(String pid) throws Exception { try{ dao.delProduct(pid); } catch(Exception e){ e.printStackTrace(); } } //获得一个商品信息 public ProductDTO getProduct(String pid) throws Exception { try{ return dao.getProduct(pid); } catch(Exception e){ e.printStackTrace(); } return null; } //修改商品信息 public void updateProduct(String pid, String pname, String brand, String spec, String unit, float price, float assprice, String pictrue, String explain, String bigcatalog, String smaillcatalog) throws Exception { try{ dao.updateProduct(pid,pname,brand,spec,unit,price,assprice,pictrue,explain,bigcatalog,smaillcatalog); } catch(Exception e){ e.printStackTrace(); } }}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -