📄 seecustomerlybaction.java
字号:
/*
* Generated by MyEclipse Struts
* Template path: templates/java/JavaClass.vtl
*/
package com.hnzt.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 com.hnzt.bean.Function;
import com.hnzt.dao.Dao;
public class SeecustomerlybAction extends Action {
public ActionForward execute(ActionMapping mapping, ActionForm form,
HttpServletRequest request, HttpServletResponse response) {
Dao dao = new Dao();
Function f = new Function();
int intPageSize = 5;
int intRowCount = 0;
String strPage = request.getParameter("page");
int intPage;
if (strPage == null)
{
intPage = 1;
} else
{
intPage = Integer.parseInt(strPage);
if (intPage < 1)
intPage = 1;
}
int startPage = (intPage - 1) * intPageSize;
List rsall = null ;
List lybxx_rs = null;
String user = request.getSession().getAttribute("username").toString();
String number = f.getUserNumber(user);
String hql = "select l.id, l.name,l.content,l.recontent,l.level,l.headimg,l.ltime from Customlyb as l,Customer as c where l.name=c.user and c.operation = '"+ number +"'";
rsall = dao.Bbport(hql);
if (rsall != null)
intRowCount = rsall.size();
int intPageCount = ((intRowCount + intPageSize) - 1) / intPageSize;
// lybxx_rs = dao.listalldb("Lyb", startPage, intPageSize);
lybxx_rs = rsall;
request.setAttribute("lybxx_rs", lybxx_rs);
Integer IPC = new Integer(intPageCount);
Integer IP = new Integer(intPage);
request.setAttribute("PageCount", IPC);
request.setAttribute("Pages", IP);
return mapping.findForward("success");
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -