📄 goodsmanager.java
字号:
package com.ajax;
import com.wl.dao.CommcateDAO;
import com.wl.dao.GoodsInfoDAO;
import com.wl.dao.TypeDAO;
import com.wl.entity.GoodsInfo;
import com.wl.entity.GoodsInstoreManager;
import com.wl.entity.GoodsType;
import com.wl.entity.Type;
/**
*
* @author tian xiaoshun
*
*/
public class GoodsManager {
public GoodsInstoreManager selectGoodsByName(int goodsId){
GoodsInfoDAO goodsInfodao=new GoodsInfoDAO();
GoodsInfo goodsinfo=goodsInfodao.selectGoodsInfoById(goodsId);
int goodsTypeId=goodsinfo.getTypeId();
TypeDAO typedao=new TypeDAO();
Type type=(Type) typedao.selectTypeById(goodsTypeId);
String typeName=type.getTypeName(); //商品型号名称
int goodsCommectId=goodsinfo.getGoodsCateId();
CommcateDAO commcatedao=new CommcateDAO();
GoodsType goodstype=commcatedao.selectCommcateByName(goodsCommectId);
String commodityName=goodstype.getCommodityName();//商品类型名称
int goodsNmu=goodsinfo.getGoodsStockNumber(); //商品数量
GoodsInstoreManager goodsmanagerinstore=null;
goodsmanagerinstore=new GoodsInstoreManager(goodsNmu,goodsTypeId,goodsCommectId,typeName,commodityName);
return goodsmanagerinstore;
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -