⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 deleteactlogaction.java

📁 新技术论坛系统 v1.0 前后台管理的初始用户名 : admin 密码 123456
💻 JAVA
字号:
package com.ntsky.bbs.web.webwork.action.actlog;

import java.util.List;

import com.opensymphony.xwork.Preparable;

import com.ntsky.bbs.Symbols;
import com.ntsky.bbs.exception.ActionException;
import com.ntsky.bbs.exception.ServiceException;
import com.ntsky.bbs.util.page.Pagination;
import com.ntsky.bbs.util.page.QueryResult;

/**
 * 删除操作日志
 *  
 * @author ntsky
 * @link www.ntsky.com
 * 
 * @version $Revision: 1.4 $ $Date: 2007/03/18 08:57:53 $
 */
public class DeleteActLogAction extends ActLogActionSupport{
	
	// 删除列表
	private String[] ids;
	public void setId(String[] ids){
		this.ids = ids;
	}
	
	// 是否删除全部
	public int isAll;
	private void setIsAll(int isAll){
		this.isAll = isAll;
	}
	
	
	/**
	 * 执行删除统计
	 * <pre>
	 * 	执行成功迁移到 actLogs.ftl
	 * </pre>
	 * @return String success 
	 */
	public String execute() throws Exception {
		
		/* ---------- 权限判断 ------------ */
		// 删除操作日志
		if(!isPermisson("6_6")){
			setWarnMessage("您没有删除操作日志的权限.");
			return NO_PERMISSION;
		}
		/* ------------------------------ */		
		
		/* ------------ 记录日志 -----------*/
		recordActLog("删除操作日志");
		/* ------------ 记录日志 -----------*/
		
		if(logger.isInfoEnabled()){
			logger.info("删除操作日志");
		}
		// isAll为1删除全部的统计信息
		QueryResult queryResult = null;
		try{
			if(isAll==1){
				actLogService.deleteAllActLog();
			}
			else{
				actLogService.deleteActLogs(ids);
			}
			// 设置页面数据和分页
			queryResult = actLogService.getActLogs(super.getParameter("place"),new Pagination(super.getIntParameter(Symbols.PARA_START)));
		}
		catch(ServiceException se){
			throw new ActionException(se);
		}
		super.setActLogs(queryResult.getItems());
		super.setPagination(queryResult.getPagination());
		return SUCCESS;
    }
	
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -