foodlistaction.java

来自「一个完整的网络订餐系统」· Java 代码 · 共 54 行

JAVA
54
字号
package com.food.web.action;

import com.common.*;
import com.common.struts.*;
import com.food.rule.FoodRule;
import org.apache.struts.action.ActionForward;
import com.food.web.page.FoodListPage;

public class FoodListAction  extends AbstractAction {
  public FoodListAction() {
  }


  public ActionForward execute(ActionContext actionContext) throws java.lang.Exception {

     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 foodName = actionContext.getParameter("foodName");
    String foodType = actionContext.getParameter("foodType");
    String foodClass = actionContext.getParameter("foodClass");

    String modifyDateDown = actionContext.getParameter("importtime1");
    String modifyDateUp = actionContext.getParameter("importtime2");

    FoodRule rule = new FoodRule();

    rule.setStartRecNum(startRecNum);
    rule.setRecNumOfPage(recNumOfPage);
    rule.setOrderStr(orderStr);
    rule.setFoodName(foodName);
    rule.setFoodType(foodType);

    rule.setModifyDateDown(modifyDateDown);
    rule.setModifyDateUp(modifyDateUp);
    rule.setStoreID(storeID);
    rule.setAreaID(areaID);
    rule.setFoodClass(foodClass);

    DynamicForm dynaForm = (DynamicForm)actionContext.getForm();

    dynaForm.put("foodSearchRule", rule);

    return FoodListPage.show(actionContext);
  }
}

⌨️ 快捷键说明

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