src/com/action/indexAction.java

(开头部分) 1KB

这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。

package com.action;

import java.util.List;
import java.util.Map;

import org.apache.struts2.ServletActionContext;

import com.dao.TCheciDAO;
import com.dao.TGonggaoDAO;
import com.dao.TPicNewsDAO;
import com.opensymphony.xwork2.ActionSupport;

public class indexAction extends ActionSupport
{
	private TGonggaoDAO gonggaoDAO;
	private TPicNewsDAO picNewsDAO;
	private TCheciDAO checiDAO;
	
	
	
	public String index()
	{
		Map request=(Map)ServletActionContext.getContext().get("request");
		
		List gonggaoList=gonggaoDAO.findAll();
		if(gonggaoList.size()>5)
		{
			gonggaoList=gonggaoList.subList(0, 5);
		}
		request.put("gonggaoList", gonggaoList);
		
		List picNewsList=picNewsDAO.findAll();
		if(picNewsList.size()>4)
		{
			picNewsList=picNewsList.subList(0, 4);
		}
		request.put("picNewsList", picNewsList);
		
		
		String sql="from TCheci where del='no'";
	    List checiList=checiDAO.getHibernateTemplate().find(sql);
	    request.put("checiList", checiList);
		
		return ActionSupport.SUCCESS;
	}

	
	public TGonggaoDAO getGonggaoDAO()
	{
		return gonggaoDAO;
	}

	public void setGonggaoDAO(TGonggaoDAO gonggaoDAO)
	{
		this.gonggaoDAO = gonggaoDAO;
	}


	public TPicNewsDAO getPicNewsDAO()
	{
后面还有 20 行代码,购买后查看完整代码

24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明

AI 解读 AI

登录后可用,每次 10 算力,解读结果公开显示在下面。

还没有人解读过这个文件。