lxw
2020-07-11 9db52f2f2dd3665fe9da1ae5657e0167c3a34d40
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
package com.fgkj.actions;
 
import com.fgkj.dto.Limit;
 
import com.fgkj.dto.ServiceModel;
import com.fgkj.services.LimitService;
 
import com.opensymphony.xwork2.ActionSupport;
 
public class LimitAction extends ActionSupport{
 
    private ServiceModel model;
    LimitService  service=new LimitService();
    
    private Limit limit;
    private String result;
    
    public String add() {
        model=service.addLimit(limit);
        result=ActionUtil.tojson(model);
        return "success";
    }
 
    public String update() {
        model=service.updateLimit(limit);
        result=ActionUtil.tojson(model);        
        return "success";
    }
    
    
 
    public String del() {
        
        model=service.delLimit(limit);
        result=ActionUtil.tojson(model);
        return "success";
    }
    
 
    public String find() {
        model=service.findLimit(limit);
        result=ActionUtil.tojson(model);
        return "success";
    }
    
    public String findAll() {
        //System.out.println("开始查询用户。。。。。。。");
        model=service.findLimitAll();
        result=ActionUtil.tojson(model);
        //System.out.println(model);
        return "success";
    }
    
    public String findByInfo(){
        //System.out.println(user);
        model=service.findByInfo(limit);
        result=ActionUtil.tojson(model);
        //System.out.println(result);
        return "success";
    }
    
    public ServiceModel getModel() {
        return model;
    }
    public void setModel(ServiceModel model) {
        this.model = model;
    }
    
    public void setLimit(Limit limit) {
        this.limit = limit;
    }
 
}