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

📄 queryaction.java~1~

📁 一个专门用来快速开发网站的框架
💻 JAVA~1~
字号:
package com.ksgl.system.message_answer;

import org.apache.commons.logging.*;
import com.core.web.*;
import com.ksgl.map.*;
import java.util.List;
import java.io.File;
import com.opensymphony.xwork.ActionContext;
/**
 * <p>Title: </p>
 * <p>Description: </p>
 * <p>Copyright: Copyright (c) 2006</p>
 * <p>Company: </p>
 * @author hj
 * @version 1.0
 */

public class QueryAction extends Action{
  private static Log log = LogFactory.getLog(QueryAction.class);
  Message objmap = new Message();
  private List list, lblist;
  private String id;

  public String execute() throws Exception {
    BO bo = new BO();
    if (id == null) {
      list = bo.queryList(paging, condition);
    }
    else {
//getUpdateTime

      String names[] = (String[]) ActionContext.getContext().getParameters().
          get("id");

      for (int i = 0; i < names.length; i++) {
//        new com.core.log.RecLog().add(((com.ksgl.map.T_sys_gly)ActionContext.getContext().getSession().get("user")).getBm(),"信息删除操作,id:"+names[i]);

        objmap = bo.queryList1(names[i]);
//ReName
        if(objmap.getUpdatetime()!=null){
        String updatetime = objmap.getUpdatetime();
        updatetime = updatetime.replaceAll("-","");
        updatetime = updatetime.replaceAll(":","");
        updatetime = updatetime.replaceAll(" ","");
        String sGeneFileName = updatetime+".htm";
//filePath&imagePath
        File path = new File(System.getProperty("user.dir"));
        String filePath = path.getParent() + File.separator + "webapps" + File.separator+"ROOT"+ File.separator+"template"+File.separator;
//DeleteHtml
        File html = new File(filePath+sGeneFileName);
        html.delete();

        }


      }




//DeleteHtmlDone----------------------------------------------------
      bo.delete();
      list = bo.queryList(paging, condition);
    }
    return SUCCESS;
  }

  public List getList() {
    return list;
  }

  public Message getObjmap() {
    return objmap;
  }

  public String getId() {
    return id;
  }

  public List getLblist() {
    return lblist;
  }

  public void setList(List list) {
    this.list = list;
  }

  public void setObjmap(Message objmap) {
    this.objmap = objmap;
  }

  public void setId(String id) {
    this.id = id;
  }

  public void setLblist(List lblist) {
    this.lblist = lblist;
  }

}

⌨️ 快捷键说明

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