📄 isaddauctionitemaction.java
字号:
/*
* 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 + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -