📄 merchantassociatorinfoaction.java
字号:
/*
* 作者:
* 时间:2007年11月28日
* 功能:会员信息管理 ->本店会员信息查询
* 查看本店会员信息
*/
package com.mole.struts.action;
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 com.mole.struts.bean.MerchantAssociatorInfoBean;
import com.mole.struts.dao.MerchantAssociatorInfoDAO;
/**
* MyEclipse Struts Creation date: 11-19-2007
*
* XDoclet definition:
*
* @struts.action path="/merchantQueryAssociatorsInfo"
* name="merchantQueryAssociatorsInfoForm"
* input="/merchantQueryAssociatorsInfo.jsp" scope="request"
* validate="true"
*/
public class MerchantAssociatorInfoAction extends Action {
/*
* Generated Methods
*/
/**
* Method execute
*
* @param mapping
* @param form
* @param request
* @param response
* @return ActionForward
*/
public ActionForward execute(ActionMapping mapping, ActionForm form,
HttpServletRequest request, HttpServletResponse response) {
String storeId = (String) request.getSession().getAttribute("store");
MerchantAssociatorInfoBean[] bean = null;
MerchantAssociatorInfoDAO dao = null;
Object daoObj = request.getSession().getAttribute("pageDataRecord");
if (daoObj != null && daoObj instanceof MerchantAssociatorInfoDAO) {
dao = (MerchantAssociatorInfoDAO) daoObj;
} else {
String column = " LoginName,Name,ISNULL(cardID,''),joinDate,customerState,ISNULL(cardState,''),ISNULL(score,''),customerId ";
String where = " v_MerchantAssociatorInfo WHERE StoreId=" + storeId;
dao = new MerchantAssociatorInfoDAO(column, where, " LoginName ",
null, " Score DESC ", 10);
request.getSession().setAttribute("pageDataRecord", dao);
}
String action = request.getParameter("action");
if (action == null || action.equals("show")) {
String pageIndex = request.getParameter("pageIndex");
if (pageIndex != null && !pageIndex.equals("")) {
dao.setCurrentPage(Integer.parseInt(pageIndex));
dao.setPageSize(Integer.parseInt(request
.getParameter("pageSizeSelect")));
if (request.getParameter("selectedType").equals("loginName")) {
dao.setWhere(" v_MerchantAssociatorInfo ", storeId, null,
request.getParameter("keyword"));
} else {
dao.setWhere(" v_MerchantAssociatorInfo ", storeId, request
.getParameter("keyword"), null);
}
}
bean = dao.getAllAssociatorInfo();
request.setAttribute("result", bean);
return mapping.findForward("goMerchantAssociatorInfo");
}
return null;
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -