📄 foodsetlistaction.java
字号:
package com.foodset.web.action;
import org.apache.struts.action.ActionForward;
import com.common.*;
import com.common.struts.*;
import com.foodset.rule.FoodSetRule;
import com.foodset.web.page.FoodSetListPage;
import java.util.*;
import com.util.StrUtility;
public class FoodSetListAction extends AbstractAction {
public FoodSetListAction() {
}
public ActionForward execute(ActionContext actionContext) throws java.lang.Exception
{
/*
SessionContext ctx = (SessionContext) actionContext.getSession().getAttribute(Globals.SESSION_CONTEXT);
String storeID = ctx.getStoreID();
FoodsetDao dao = new FoodsetDao();
List foodsetList = dao.getAllSetList(storeID);
actionContext.getRequest().setAttribute("foodsetList",foodsetList);
return actionContext.getMapping().findForward("foodsetList");
*/
String storeID = actionContext.getParameter("storeID");
String areaID = actionContext.getParameter("areaID");
String startRecNumStr = actionContext.getParameter("start_rec_num");
if (startRecNumStr == null || "".equals(startRecNumStr))
startRecNumStr = "1";
int startRecNum = Integer.parseInt(startRecNumStr);
int recNumOfPage = Globals.REC_NUM_OF_PAGE;
String orderStr = actionContext.getParameter("orderstr");
String modifyDateDown = actionContext.getParameter("importtime1");
String modifyDateUp = actionContext.getParameter("importtime2");
if((("").equals(modifyDateDown)||null==modifyDateDown) &&(("").equals(modifyDateUp)||null==modifyDateUp))
{
modifyDateDown = StrUtility.getCurrentDate();
modifyDateUp = StrUtility.getCurrentDate();
}
FoodSetRule rule = new FoodSetRule();
rule.setStartRecNum(startRecNum);
rule.setRecNumOfPage(recNumOfPage);
rule.setOrderStr(orderStr);
rule.setModifyDateDown(modifyDateDown);
rule.setModifyDateUp(modifyDateUp);
rule.setStoreID(storeID);
rule.setAreaID(areaID);
DynamicForm dynaForm = (DynamicForm) actionContext.getForm();
dynaForm.put("foodsetSearchRule", rule);
return FoodSetListPage.show(actionContext);
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -