src/com/action/indexAction.java
(开头部分) 1KB这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。
package com.action;
import java.util.List;
import javax.servlet.http.HttpServletRequest;
import org.apache.struts2.ServletActionContext;
import com.dao.TCheDAO;
import com.dao.TGonggaoDAO;
import com.opensymphony.xwork2.ActionSupport;
public class indexAction extends ActionSupport
{
private TGonggaoDAO gonggaoDAO;
private TCheDAO cheDAO;
public TCheDAO getCheDAO()
{
return cheDAO;
}
public void setCheDAO(TCheDAO cheDAO)
{
this.cheDAO = cheDAO;
}
public TGonggaoDAO getGonggaoDAO()
{
return gonggaoDAO;
}
public void setGonggaoDAO(TGonggaoDAO gonggaoDAO)
{
this.gonggaoDAO = gonggaoDAO;
}
public String index()
{
HttpServletRequest request=ServletActionContext.getRequest();
List gonggaoList =gonggaoDAO.findAll();
if(gonggaoList.size()>6)
{
gonggaoList=gonggaoList.subList(0, 6);
}
request.setAttribute("gonggaoList", gonggaoList);
String sql="from TChe where del='no'";
List cheList=cheDAO.getHibernateTemplate().find(sql);
if(cheList.size()>4)
{
cheList=cheList.subList(0, 4);
}
request.setAttribute("cheList", cheList);
后面还有 4 行代码,购买后查看完整代码
24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明
AI 解读 AI
登录后可用,每次 10 算力,解读结果公开显示在下面。
还没有人解读过这个文件。