whycrzg
2021-02-23 351b9a53cb9ecebdf8f79db0117f540d9c42c2a4
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
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
// package com.fgkj.services;
//
// import java.util.List;
//
// import com.fgkj.mapper.BaseDAO;
// import com.fgkj.mapper.BaseDAOFactory;
// import com.fgkj.dto.RoleLimit;
// import com.fgkj.dto.ServiceModel;
//
// public class RoleLimitService {
//
//
//     private Impl mapper;;
//
//     ServiceModel model = new ServiceModel();
//
//      public RoleLimitService() {
//         dao = BaseDAOFactory.getBaseDAO(BaseDAO.ROLELIMIT);
//         model = new ServiceModel();
//     }
//
//     public ServiceModel updateRoleLimit(Object obj) {
//         RoleLimit rl=(RoleLimit) obj;
//         List<RoleLimit> list=dao.serchByCondition(rl);
//         if(!list.isEmpty()){
//             if(dao.update(rl)){
//                 model.setCode(1);
//                 model.setMsg("修改成功");
//
//             }else{
//                 model.setMsg("修改失败");
//             }
//         }else{
//             model.setMsg("修改失败");
//         }
//         return model;
//
//     }
//
//     public ServiceModel addRoleLimit(Object obj) {
//         RoleLimit rl=(RoleLimit) obj;
//         boolean bl = dao.update(rl);
//         if(bl){
//         model.setCode(1);
//         model.setMsg("添加成功");
//         }else{
//             model.setMsg("添加失败");
//         }
//         //System.out.println("66666"+limit);
//         //System.out.println("add Result:" + bl);
//         return model;
//
//     }
//
//     public ServiceModel searchRoleLimit(Object obj) {
//         RoleLimit rl=(RoleLimit)obj;
//         List<RoleLimit> list = dao.serchByCondition(rl);
//     //    for(RoleLimit rlt:list){
//         //    System.out.println(rlt);
//         //}
//         if(list==null || list.size()<1){
//             model.setMsg("没有匹配的角色");
//         }else{
//             model.setData(list);
//             model.setCode(1);
//         }
//         return model;
//     }
//
//     public ServiceModel delRoleLimit(Object obj) {
//
//         RoleLimit rl=(RoleLimit)obj;
//         boolean bl=dao.del(rl);
//         if(bl){
//             model.setCode(1);
//             model.setMsg("删除成功");
//             }else{
//                 model.setMsg("删除失败");
//             }
//         //System.out.println("del Result:" + bl);
//         return model;
//
//     }
//     public ServiceModel findRoleLimitall() {
//         //System.out.println("11111111111");
//         List<RoleLimit> list=dao.searchAll();
//         if(list!=null && list.size()>0){
//             model.setCode(1);
//             model.setData(list);
//         }
// //        for(RoleLimit rl:list){
// //            System.out.println(rl);
// //        }
//
//         return model;
//     }
// //    public static void main(String[] args) {
// //        (new RoleLimitService()).findRoleLimitall();
// //    }
// }