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
package com.fgkj.services;
 
import java.util.List;
 
import com.fgkj.dao.BaseDAO;
import com.fgkj.dao.BaseDAOFactory;
import com.fgkj.dto.ServiceModel;
 
public class Echarts_usrService {
    private BaseDAO dao;
    private ServiceModel model;
    
    public Echarts_usrService() {
        super();
        dao=BaseDAOFactory.getBaseDAO(BaseDAO.ECHARTS_USR);
        model = new ServiceModel();
    }
    //添加或修改
    public ServiceModel add(Object obj) {
        Boolean bl = dao.add(obj);
        if (bl) {
            model.setCode(1);
            model.setMsg("添加成功!");
        } else {
            model.setMsg("添加失败!");
        }
        return model;
 
    }
    //根据用户id查询图标的使能
    public ServiceModel serchByCondition(Object obj){
        List list=dao.serchByCondition(obj);
        if(list!=null && list.size()>0){
            model.setCode(1);
            model.setMsg("查询成功!");
            model.setData(list);
        }else{
            model.setCode(0);
            model.setMsg("查询失败!");
        }
        return model;
    }
 
}