⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 goodsaction.java

📁 本系统是一个网上拍卖系统
💻 JAVA
字号:
/*
 * Generated by MyEclipse Struts
 * Template path: templates/java/JavaClass.vtl
 */
package y2ssh.xzh.web.action;

import java.util.List;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import org.apache.struts.action.ActionForm;
import org.apache.struts.action.ActionForward;
import org.apache.struts.action.ActionMapping;


import y2ssh.xzh.biz.GoodsBiz;

import y2ssh.xzh.biz.impl.GoodsBizImpl;
import y2ssh.xzh.entity.Goods;

import y2ssh.xzh.web.form.GoodsForm;

/** 
 * MyEclipse Struts
 * Creation date: 08-27-2007
 * 
 * XDoclet definition:
 * @struts.action path="/goods" name="goodsForm" parameter="operate" scope="request"
 */
public class GoodsAction extends BaseAction {
	/*
	 * Generated Methods
	 */
	private GoodsBiz goodsBiz = null;//new GoodsBizImpl();

	public ActionForward toAdd(ActionMapping mapping, ActionForm form,
			HttpServletRequest request, HttpServletResponse response) {
		return mapping.findForward("add_goods");
	}
	
	public ActionForward doAdd(ActionMapping mapping, ActionForm form,
			HttpServletRequest request, HttpServletResponse response) {
		GoodsForm goodsForm = (GoodsForm) form;
		Goods item = goodsForm.getItem();
		this.goodsBiz.addGoods(item,(super.getCurrUserId(request)).longValue());
		return mapping.findForward("index");
	}
	
	public ActionForward toOnSaleGoodsList(ActionMapping mapping, ActionForm form,
			HttpServletRequest request, HttpServletResponse response) {
		List list = this.goodsBiz.getOnSaleGoodsList();
		request.setAttribute("list", list);
		return mapping.findForward("on_sale_list");
	}
	
	public ActionForward toMyGoodsList(ActionMapping mapping, ActionForm form,
			HttpServletRequest request, HttpServletResponse response) {
		Long userId = super.getCurrUserId(request);
		List list = this.goodsBiz.getMyGoodsList(userId);
		request.setAttribute("list", list);
		return mapping.findForward("my_goods_list");
	}

	public GoodsBiz getGoodsBiz() {
		return goodsBiz;
	}

	public void setGoodsBiz(GoodsBiz goodsBiz) {
		this.goodsBiz = goodsBiz;
	}
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -