购物网站25:FORM----产品----品牌----前台产品----后台产品----产品查询----产品类型
2009-09-01 00:45
585 查看
public class BrandForm extends BaseForm {
private String name;
private FormFile logofile;
private String code;
private String logoimagepath;
public String getLogoimagepath() {
return logoimagepath;
}
public void setLogoimagepath(String logoimagepath) {
this.logoimagepath = logoimagepath;
}
public String getCode() {
return code;
}
public void setCode(String code) {
this.code = code;
}
public FormFile getLogofile() {
return logofile;
}
public void setLogofile(FormFile logofile) {
this.logofile = logofile;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
}
--------------------------------------------------------------
public class FrontProductForm extends BaseForm {
private String sort;
private Integer typeid;
private String brandid;
private String sex;
private Integer productid;
private String style;
public String getStyle() {
return style;
}
public void setStyle(String style) {
this.style = style;
}
public Integer getProductid() {
return productid;
}
public void setProductid(Integer productid) {
this.productid = productid;
}
public String getSex() {
return sex;
}
public void setSex(String sex) {
this.sex = sex;
}
public String getBrandid() {
return brandid;
}
public void setBrandid(String brandid) {
this.brandid = brandid;
}
public Integer getTypeid() {
return typeid;
}
public void setTypeid(Integer typeid) {
this.typeid = typeid;
}
public String getSort() {
return sort;
}
public void setSort(String sort) {
this.sort = sort;
}
}
----------------------------------------------------------
public class ProductQueryForm extends BaseForm {
private String word;
public String getWord() {
return word;
}
public void setWord(String word) {
this.word = word;
}
}
-------------------------------------------------------------
public class ProductForm extends BaseForm {
private Integer productid;
private Integer[] productids;
/** 货号 **/
private String code;
/** 产品名称 **/
private String name;
/** 品牌 **/
private String brandid;
/** 型号 **/
private String model;
/** 底价(采购进来的价格) **/
private Float baseprice;
/** 市场价 **/
private Float marketprice;
/** 销售价 **/
private Float sellprice;
/** 重量 单位:克 **/
private Integer weight;
/** 产品简介 **/
private String description;
/** 购买说明 **/
private String buyexplain;
/** 产品类型 **/
private Integer typeid;
/** 性别要求 **/
private String sex;
private Integer[] stylesids;
private String stylename;
private FormFile imagefile;
private Float startsellprice;
private Float endsellprice;
private Float startbaseprice;
private Float endbaseprice;
private Integer productstyleid;
private String word;
public String getWord() {
return word;
}
public void setWord(String word) {
this.word = word;
}
public Integer[] getStylesids() {
return stylesids;
}
public void setStylesids(Integer[] stylesids) {
this.stylesids = stylesids;
}
public Integer getProductstyleid() {
return productstyleid;
}
public void setProductstyleid(Integer productstyleid) {
this.productstyleid = productstyleid;
}
public Integer[] getProductids() {
return productids;
}
public void setProductids(Integer[] productids) {
this.productids = productids;
}
public Float getStartbaseprice() {
return startbaseprice;
}
public void setStartbaseprice(Float startbaseprice) {
this.startbaseprice = startbaseprice;
}
public Float getEndbaseprice() {
return endbaseprice;
}
public void setEndbaseprice(Float endbaseprice) {
this.endbaseprice = endbaseprice;
}
public Float getStartsellprice() {
return startsellprice;
}
public void setStartsellprice(Float startsellprice) {
this.startsellprice = startsellprice;
}
public Float getEndsellprice() {
return endsellprice;
}
public void setEndsellprice(Float endsellprice) {
this.endsellprice = endsellprice;
}
public String getStylename() {
return stylename;
}
public void setStylename(String stylename) {
this.stylename = stylename;
}
public FormFile getImagefile() {
return imagefile;
}
public void setImagefile(FormFile imagefile) {
this.imagefile = imagefile;
}
public Integer getProductid() {
return productid;
}
public void setProductid(Integer productid) {
this.productid = productid;
}
public String getCode() {
return code;
}
public void setCode(String code) {
this.code = code;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public String getBrandid() {
return brandid;
}
public void setBrandid(String brandid) {
this.brandid = brandid;
}
public String getModel() {
return model;
}
public void setModel(String model) {
this.model = model;
}
public Float getBaseprice() {
return baseprice;
}
public void setBaseprice(Float baseprice) {
this.baseprice = baseprice;
}
public Float getMarketprice() {
return marketprice;
}
public void setMarketprice(Float marketprice) {
this.marketprice = marketprice;
}
public Float getSellprice() {
return sellprice;
}
public void setSellprice(Float sellprice) {
this.sellprice = sellprice;
}
public Integer getWeight() {
return weight;
}
public void setWeight(Integer weight) {
this.weight = weight;
}
public String getDescription() {
return description;
}
public void setDescription(String description) {
this.description = description;
}
public String getBuyexplain() {
return buyexplain;
}
public void setBuyexplain(String buyexplain) {
this.buyexplain = buyexplain;
}
public Integer getTypeid() {
return typeid;
}
public void setTypeid(Integer typeid) {
this.typeid = typeid;
}
public String getSex() {
return sex;
}
public void setSex(String sex) {
this.sex = sex;
}
/**
* 保存产品图片
* @param request
* @param imagefile 上传的产品图片
* @param productTypeId 产品类别id
* @param productId 产品id
* @return
* @throws Exception
*/
public static void saveProductImageFile(HttpServletRequest request, FormFile imagefile,
Integer productTypeId,Integer productId,String filename) throws Exception{
String ext = BaseForm.getExt(imagefile);
String pathdir = "/images/product/"+ productTypeId+ "/"+ productId+ "/prototype";//构建文件保存的目录
//得到图片保存目录的真实路径
String realpathdir = request.getSession().getServletContext().getRealPath(pathdir);
File savedir = new File(realpathdir);
File file = saveFile(savedir, filename, imagefile.getFileData());
String pathdir140 = "/images/product/"+ productTypeId+ "/"+ productId+ "/140x";//140宽度的图片保存目录
String realpathdir140 = request.getSession().getServletContext().getRealPath(pathdir140);
File savedir140 = new File(realpathdir140);
if(!savedir140.exists()) savedir140.mkdirs();//如果目录不存在就创建
File file140 = new File(realpathdir140, filename);
ImageSizer.resize(file, file140, 140, ext);
}
}
----------------------------------------------------
public class ProductTypeForm extends BaseForm {
private Integer parentid;
private String name;
private String note;
private Integer typeid;
public Integer getTypeid() {
return typeid;
}
public void setTypeid(Integer typeid) {
this.typeid = typeid;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public String getNote() {
return note;
}
public void setNote(String note) {
this.note = note;
}
public Integer getParentid() {
return parentid;
}
public void setParentid(Integer parentid) {
this.parentid = parentid;
}
}
private String name;
private FormFile logofile;
private String code;
private String logoimagepath;
public String getLogoimagepath() {
return logoimagepath;
}
public void setLogoimagepath(String logoimagepath) {
this.logoimagepath = logoimagepath;
}
public String getCode() {
return code;
}
public void setCode(String code) {
this.code = code;
}
public FormFile getLogofile() {
return logofile;
}
public void setLogofile(FormFile logofile) {
this.logofile = logofile;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
}
--------------------------------------------------------------
public class FrontProductForm extends BaseForm {
private String sort;
private Integer typeid;
private String brandid;
private String sex;
private Integer productid;
private String style;
public String getStyle() {
return style;
}
public void setStyle(String style) {
this.style = style;
}
public Integer getProductid() {
return productid;
}
public void setProductid(Integer productid) {
this.productid = productid;
}
public String getSex() {
return sex;
}
public void setSex(String sex) {
this.sex = sex;
}
public String getBrandid() {
return brandid;
}
public void setBrandid(String brandid) {
this.brandid = brandid;
}
public Integer getTypeid() {
return typeid;
}
public void setTypeid(Integer typeid) {
this.typeid = typeid;
}
public String getSort() {
return sort;
}
public void setSort(String sort) {
this.sort = sort;
}
}
----------------------------------------------------------
public class ProductQueryForm extends BaseForm {
private String word;
public String getWord() {
return word;
}
public void setWord(String word) {
this.word = word;
}
}
-------------------------------------------------------------
public class ProductForm extends BaseForm {
private Integer productid;
private Integer[] productids;
/** 货号 **/
private String code;
/** 产品名称 **/
private String name;
/** 品牌 **/
private String brandid;
/** 型号 **/
private String model;
/** 底价(采购进来的价格) **/
private Float baseprice;
/** 市场价 **/
private Float marketprice;
/** 销售价 **/
private Float sellprice;
/** 重量 单位:克 **/
private Integer weight;
/** 产品简介 **/
private String description;
/** 购买说明 **/
private String buyexplain;
/** 产品类型 **/
private Integer typeid;
/** 性别要求 **/
private String sex;
private Integer[] stylesids;
private String stylename;
private FormFile imagefile;
private Float startsellprice;
private Float endsellprice;
private Float startbaseprice;
private Float endbaseprice;
private Integer productstyleid;
private String word;
public String getWord() {
return word;
}
public void setWord(String word) {
this.word = word;
}
public Integer[] getStylesids() {
return stylesids;
}
public void setStylesids(Integer[] stylesids) {
this.stylesids = stylesids;
}
public Integer getProductstyleid() {
return productstyleid;
}
public void setProductstyleid(Integer productstyleid) {
this.productstyleid = productstyleid;
}
public Integer[] getProductids() {
return productids;
}
public void setProductids(Integer[] productids) {
this.productids = productids;
}
public Float getStartbaseprice() {
return startbaseprice;
}
public void setStartbaseprice(Float startbaseprice) {
this.startbaseprice = startbaseprice;
}
public Float getEndbaseprice() {
return endbaseprice;
}
public void setEndbaseprice(Float endbaseprice) {
this.endbaseprice = endbaseprice;
}
public Float getStartsellprice() {
return startsellprice;
}
public void setStartsellprice(Float startsellprice) {
this.startsellprice = startsellprice;
}
public Float getEndsellprice() {
return endsellprice;
}
public void setEndsellprice(Float endsellprice) {
this.endsellprice = endsellprice;
}
public String getStylename() {
return stylename;
}
public void setStylename(String stylename) {
this.stylename = stylename;
}
public FormFile getImagefile() {
return imagefile;
}
public void setImagefile(FormFile imagefile) {
this.imagefile = imagefile;
}
public Integer getProductid() {
return productid;
}
public void setProductid(Integer productid) {
this.productid = productid;
}
public String getCode() {
return code;
}
public void setCode(String code) {
this.code = code;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public String getBrandid() {
return brandid;
}
public void setBrandid(String brandid) {
this.brandid = brandid;
}
public String getModel() {
return model;
}
public void setModel(String model) {
this.model = model;
}
public Float getBaseprice() {
return baseprice;
}
public void setBaseprice(Float baseprice) {
this.baseprice = baseprice;
}
public Float getMarketprice() {
return marketprice;
}
public void setMarketprice(Float marketprice) {
this.marketprice = marketprice;
}
public Float getSellprice() {
return sellprice;
}
public void setSellprice(Float sellprice) {
this.sellprice = sellprice;
}
public Integer getWeight() {
return weight;
}
public void setWeight(Integer weight) {
this.weight = weight;
}
public String getDescription() {
return description;
}
public void setDescription(String description) {
this.description = description;
}
public String getBuyexplain() {
return buyexplain;
}
public void setBuyexplain(String buyexplain) {
this.buyexplain = buyexplain;
}
public Integer getTypeid() {
return typeid;
}
public void setTypeid(Integer typeid) {
this.typeid = typeid;
}
public String getSex() {
return sex;
}
public void setSex(String sex) {
this.sex = sex;
}
/**
* 保存产品图片
* @param request
* @param imagefile 上传的产品图片
* @param productTypeId 产品类别id
* @param productId 产品id
* @return
* @throws Exception
*/
public static void saveProductImageFile(HttpServletRequest request, FormFile imagefile,
Integer productTypeId,Integer productId,String filename) throws Exception{
String ext = BaseForm.getExt(imagefile);
String pathdir = "/images/product/"+ productTypeId+ "/"+ productId+ "/prototype";//构建文件保存的目录
//得到图片保存目录的真实路径
String realpathdir = request.getSession().getServletContext().getRealPath(pathdir);
File savedir = new File(realpathdir);
File file = saveFile(savedir, filename, imagefile.getFileData());
String pathdir140 = "/images/product/"+ productTypeId+ "/"+ productId+ "/140x";//140宽度的图片保存目录
String realpathdir140 = request.getSession().getServletContext().getRealPath(pathdir140);
File savedir140 = new File(realpathdir140);
if(!savedir140.exists()) savedir140.mkdirs();//如果目录不存在就创建
File file140 = new File(realpathdir140, filename);
ImageSizer.resize(file, file140, 140, ext);
}
}
----------------------------------------------------
public class ProductTypeForm extends BaseForm {
private Integer parentid;
private String name;
private String note;
private Integer typeid;
public Integer getTypeid() {
return typeid;
}
public void setTypeid(Integer typeid) {
this.typeid = typeid;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public String getNote() {
return note;
}
public void setNote(String note) {
this.note = note;
}
public Integer getParentid() {
return parentid;
}
public void setParentid(Integer parentid) {
this.parentid = parentid;
}
}
相关文章推荐
- 购物网站11:产品Service---品牌---产品信息---产品样式---产品类型---产品搜索---查询结果回调
- 购物网站5:产品设计--品牌----产品信息---产品样式---产品类型----性别
- 购物网站17-2:产品action---产品查询----产品样式列表----产品样式管理-----产品控制---产品类型列表----产品类型管理----浏览商品
- 牛腩购物32:完成整个网站的功能制作(后台产品列表,多表查询+分页),产品修改保存,图片的上传保存
- 购物网站17-1:产品action---品牌列表---品牌管理---生成产品静态页面---前台产品管理----产品列表----产品管理
- Magento后台订单详情页,Items Ordered处, 添加跳转到网站前台的产品url
- Magento后台产品编辑页,点击产品标题跳转到网站前台的产品详情页
- 招商银行购物网站的产品展示效果,循环播放
- springMVC前台传递日期类型到后台
- Flask04 后台获取请求数据、视图函数返回类型、前台接受响应数据
- 通过ajax方式从后台查询出数据并填入前台的select中
- 前台传递一个时间字符传,后台怎么用Date类型接收?
- Ajax (部分一)自己做的,总结页面向后台传Form值、单个值和后台向前台传一个或是一组值
- SAP跟踪前台操作导致的后台查询语句
- Ajax (部分二:prototype.js代码后半部分)自己做的,总结页面向后台传Form值、单个值和后台向前台传一个或是一组值
- Ajax (部分一)自己做的,总结页面向后台传Form值、单个值和后台向前台传一个或是一组值
- ASP.NET前台无法访问后台internal类型变量的问题 [转]
- 给WordPress前台和后台指定不同的favicon(网站图标)
- ajax从后台返回list类型到前台解析
- 后台对前台传入的json数据进行数据类型判断