package com.fgkj.actions;
|
|
import java.util.List;
|
|
import com.fgkj.dao.UinfDaoFactory;
|
import com.fgkj.dto.Devdata_backup_cfg;
|
import com.fgkj.dto.User_log;
|
import com.fgkj.services.Devdata_backup_cfgService;
|
import com.fgkj.services.ServiceModel;
|
import com.fgkj.services.User_logService;
|
|
public class Devdata_backup_cfgAction extends ActionUtil{
|
private Devdata_backup_cfgService service=new Devdata_backup_cfgService();
|
private String json;
|
private String result;
|
|
//超级管理员配置
|
public String update() {
|
Devdata_backup_cfg dcfg=ActionUtil.getGson(ActionUtil.time_yyyyMMddHHmmss).fromJson(json, Devdata_backup_cfg.class);
|
ServiceModel model=service.update(dcfg);
|
String msg="";
|
{
|
msg="修改FTP备份配置表的信息";
|
}
|
{
|
User_log ulog=UinfDaoFactory.CreateULog(UinfDaoFactory.Alter, msg);
|
User_logService uservice=new User_logService();
|
uservice.add(ulog);//将用户的操作记录下来
|
}
|
result=tojson(model);
|
return SUCCESS;
|
|
}
|
//查询备份配置表
|
public String searchAll() {
|
ServiceModel model=service.searchAll();
|
String msg="";
|
{
|
msg="查询FTP备份配置表";
|
}
|
{
|
User_log ulog=UinfDaoFactory.CreateULog(UinfDaoFactory.Search, msg);
|
User_logService uservice=new User_logService();
|
uservice.add(ulog);//将用户的操作记录下来
|
}
|
result=tojson(model);
|
return SUCCESS;
|
}
|
//立即备份(修改参数不改en)
|
public String overwrite() {
|
Devdata_backup_cfg dcfg=ActionUtil.getGson(ActionUtil.time_yyyyMMddHHmmss).fromJson(json, Devdata_backup_cfg.class);
|
ServiceModel model=service.overwrite(dcfg);
|
String msg="";
|
{
|
msg="立即备份FTP文件";
|
}
|
{
|
User_log ulog=UinfDaoFactory.CreateULog(UinfDaoFactory.Alter, msg);
|
User_logService uservice=new User_logService();
|
uservice.add(ulog);//将用户的操作记录下来
|
}
|
result=tojson(model);
|
return SUCCESS;
|
}
|
|
public String getResult() {
|
return result;
|
}
|
public void setJson(String json) {
|
this.json = json;
|
}
|
|
public static void main(String[] args) {
|
Devdata_backup_cfgAction action=new Devdata_backup_cfgAction();
|
action.searchAll();
|
}
|
|
}
|