资源简介

ExtJs商场VIP消费查询系统(北风网源码完全版)

资源截图

代码片段和文件信息

package com.ibeifeng.action;

import java.util.List;
import java.util.Map;

import com.ibeifeng.dao.CommodityDAO;
import com.ibeifeng.po.Commodity;
import com.opensymphony.xwork2.ActionContext;
import com.opensymphony.xwork2.ActionSupport;

public class CommodityAddAction  extends ActionSupport{
private String commodityName;
private Double price;
private Double agio;

private boolean success;
private String msg;

private CommodityDAO commodityDAO;

public String getCommodityName() {
return commodityName;
}

public void setCommodityName(String commodityName) {
this.commodityName = commodityName;
}

public Double getPrice() {
return price;
}

public void setPrice(Double price) {
this.price = price;
}

public Double getAgio() {
return agio;
}

public void setAgio(Double agio) {
this.agio = agio;
}

public boolean isSuccess() {
return success;
}

public void setSuccess(boolean success) {
this.success = success;
}

public String getMsg() {
return msg;
}

public void setMsg(String msg) {
this.msg = msg;
}

public CommodityDAO getCommodityDAO() {
return commodityDAO;
}

public void setCommodityDAO(CommodityDAO commodityDAO) {
this.commodityDAO = commodityDAO;
}

public String execute() throws Exception {
//商品名称不能重复,所有首先根据该商品名称来查询是否已经存在这样的商品
List commodities = commodityDAO.findByCommodityName(commodityName);
//如果不存在
if(commodities.size() == 0) {
//实例化,并设置值
Commodity commodity = new Commodity();
commodity.setCommodityName(commodityName);
commodity.setPrice(price);
commodity.setAgio(agio);
//进行保存
commodityDAO.save(commodity);
success = true;
msg = “商品录入成功!“;
}
//如果存在
else {
success = false;
msg = “商品录入失败,该商品已经存在!“;
}
return this.SUCCESS;
}

}

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----
     目录           0  2012-09-08 20:43  BFVIPShopping\
     文件        1302  2012-09-08 20:44  BFVIPShopping\.classpath
     目录           0  2012-09-08 22:26  BFVIPShopping\.myeclipse\
     文件         547  2009-06-13 16:38  BFVIPShopping\.myhibernatedata
     文件         312  2012-09-08 20:44  BFVIPShopping\.mymetadata
     文件        1433  2009-06-12 11:57  BFVIPShopping\.project
     目录           0  2012-09-08 20:44  BFVIPShopping\WebRoot\
     目录           0  2012-09-08 20:44  BFVIPShopping\WebRoot\Ext\
     文件       11548  2009-05-15 16:39  BFVIPShopping\WebRoot\Ext\CHANGES.html
     文件         893  2009-05-15 16:39  BFVIPShopping\WebRoot\Ext\INCLUDE_ORDER.txt
     目录           0  2012-09-08 20:43  BFVIPShopping\WebRoot\Ext\adapter\
     目录           0  2012-09-08 20:43  BFVIPShopping\WebRoot\Ext\adapter\ext\
     文件       35849  2009-05-15 16:39  BFVIPShopping\WebRoot\Ext\adapter\ext\ext-base.js
     目录           0  2012-09-08 20:43  BFVIPShopping\WebRoot\Ext\adapter\jquery\
     文件       15551  2009-05-15 16:39  BFVIPShopping\WebRoot\Ext\adapter\jquery\ext-jquery-adapter.js
     文件       96763  2009-05-15 16:39  BFVIPShopping\WebRoot\Ext\adapter\jquery\jquery.js
     目录           0  2012-09-08 20:43  BFVIPShopping\WebRoot\Ext\adapter\prototype\
     文件       38986  2009-05-15 16:39  BFVIPShopping\WebRoot\Ext\adapter\prototype\effects.js
     文件       16135  2009-05-15 16:39  BFVIPShopping\WebRoot\Ext\adapter\prototype\ext-prototype-adapter.js
     文件      130347  2009-05-15 16:39  BFVIPShopping\WebRoot\Ext\adapter\prototype\prototype.js
     文件        2654  2009-05-15 16:39  BFVIPShopping\WebRoot\Ext\adapter\prototype\scriptaculous.js
     目录           0  2012-09-08 20:43  BFVIPShopping\WebRoot\Ext\adapter\yui\
     文件       13125  2009-05-15 16:39  BFVIPShopping\WebRoot\Ext\adapter\yui\ext-yui-adapter.js
     文件       83879  2009-05-15 16:39  BFVIPShopping\WebRoot\Ext\adapter\yui\yui-utilities.js
     目录           0  2012-09-08 20:43  BFVIPShopping\WebRoot\Ext\air\
     文件         552  2009-05-15 16:39  BFVIPShopping\WebRoot\Ext\air\README.txt
     文件       46339  2009-05-15 16:39  BFVIPShopping\WebRoot\Ext\air\air.jsb
     文件       43722  2009-05-15 16:39  BFVIPShopping\WebRoot\Ext\air\ext-air.js
     目录           0  2012-09-08 20:43  BFVIPShopping\WebRoot\Ext\air\resources\
     文件        1136  2009-05-15 16:39  BFVIPShopping\WebRoot\Ext\air\resources\air-resources.jsb
     文件        2457  2009-05-15 16:39  BFVIPShopping\WebRoot\Ext\air\resources\ext-air.css
............此处省略1298个文件信息

评论

共有 条评论