// 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();
|
// // }
|
// }
|