程序/cxtdgl/src/org/front/DocumentAction.java

(开头部分) 8KB

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

package org.front;

import java.io.File;
import java.io.IOException;
import java.util.Date;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

import javax.servlet.http.HttpServletRequest;

import org.apache.commons.io.FileUtils;
import org.apache.commons.lang3.StringUtils;
import org.apache.commons.lang3.time.DateFormatUtils;
import org.apache.struts2.ServletActionContext;
import org.dao.ChannelDao;
import org.dao.DocumentDao;
import org.entity.Channel;
import org.entity.Document;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Scope;
import org.springframework.stereotype.Component;
import org.util.PageUtil;

import com.opensymphony.xwork2.ActionContext;
import com.opensymphony.xwork2.ActionSupport;

/*

 */
@Scope("prototype")
@Component("DocumentAction")
public class DocumentAction extends ActionSupport {
	private static final long serialVersionUID = -9167213418951271794L;

	private int pageSize = 10;
	private int currentPage = 1;
	private Document entity = new Document();

	private Map<String, Object> dataMap = new HashMap<String, Object>();

	@Autowired
	private DocumentDao entityDao;
	@Autowired
	private ChannelDao channelDao;

	public String list() {
		ActionContext context = ActionContext.getContext();
		dataMap.clear();
		try {
			int listCount = entityDao.countList(entity);
			PageUtil pageUtil = new PageUtil();
			if (listCount > 0) {
				pageUtil.setPageSize(pageSize);// 每页显示的记录数量
				pageUtil.setTotalRecord(listCount);// 总记录数
				pageUtil.setCurrentPage(currentPage);// 当前页码
				List<Document> entityList = (List<Document>) entityDao.findList(entity, pageUtil.getStart(), pageUtil.getPageSize());
				dataMap.put("list", entityList);
				context.put("list", entityList);
			} else {
后面还有 213 行代码,购买后查看完整代码

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

AI 解读 AI

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

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