whyclxw
2020-09-05 a837b422de397246b318c34a87cec8f6c97f7187
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
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();
    }
 
}