isaddauctionitemaction.java
来自「Struts+Spring+Hibernate实现的在线拍卖系统,去掉了这些组件」· Java 代码 · 共 59 行
JAVA
59 行
/*
* Generated by MyEclipse Struts
* Template path: templates/java/JavaClass.vtl
*/
package org.bestteam.web.struts.action;
import java.util.List;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import org.apache.struts.action.Action;
import org.apache.struts.action.ActionForm;
import org.apache.struts.action.ActionForward;
import org.apache.struts.action.ActionMapping;
import org.bestteam.domain.UserInfo;
import org.bestteam.service.CatalogManager;
import org.bestteam.service.IsExistService;
/**
* MyEclipse Struts
* Creation date: 02-04-2007
*
* XDoclet definition:
* @struts.action path="/isAddAuctionItem" name="isAddAuctionItemForm" scope="request" validate="true"
*/
public class IsAddAuctionItemAction extends Action {
private IsExistService isExistService;
private CatalogManager catalogManager;
public void setCatalogManager(CatalogManager catalogManager) {
this.catalogManager = catalogManager;
}
public ActionForward execute(ActionMapping mapping, ActionForm form,
HttpServletRequest request, HttpServletResponse response) {
Integer userID = (Integer) request.getSession().getAttribute("userId");
if (userID == null || userID == 0) {
request.setAttribute("errorMessage", "你还没有登录");
return mapping.findForward("fail");
}
UserInfo user = new UserInfo();
user.setUserId(userID);
if (!isExistService.isExistActualNameAttestation(user)) {
request.setAttribute("errorMessage", "您还没有经过实名认证");
return mapping.findForward("fail");
}
List parentList = catalogManager.getBigCatalog();
request.setAttribute("parent", parentList);
return mapping.findForward("success");
}
public void setIsExistService(IsExistService isExistService) {
this.isExistService = isExistService;
}
}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?