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
package com.fgkj.actions;
 
import com.fgkj.dto.Echarts_usr;
import com.fgkj.dto.ServiceModel;
import com.fgkj.dto.User_inf;
import com.fgkj.services.Echarts_usrService;
 
public class Echarts_usrAction extends ActionUtil{
    private Echarts_usrService service = new Echarts_usrService();
    private String result;
    private String json;
    //添加或修改
    public String add() {
        Echarts_usr echarts = getGson().fromJson(json, Echarts_usr.class);
        User_inf uinf=(User_inf) getUser();
        echarts.setUid(uinf.getUId());
        ServiceModel model = service.add(echarts);
        result = tojson(model);
        return SUCCESS;
    }
    //根据用户id查询图标的使能
    public String serchByCondition() {
        Echarts_usr echarts = new Echarts_usr();
        User_inf uinf=(User_inf) getUser();
        echarts.setUid(uinf.getUId());
        ServiceModel model = service.serchByCondition(echarts);
        result = tojson(model);
        return SUCCESS;
    }
    
    public String getResult() {
        return result;
    }
    public void setJson(String json) {
        this.json = json;
    }
    
    
}