// package com.fgkj.controller;
|
|
import com.fgkj.util.*;
|
//
|
// import java.util.List;
|
//
|
// import com.fgkj.dto.Limit;
|
// import com.fgkj.dto.RoleLimit;
|
// import com.fgkj.dto.Roles;
|
// import com.fgkj.dto.ServiceModel;
|
// import com.fgkj.dto.UserRole;
|
//
|
// import com.fgkj.services.RoleLimitService;
|
// import com.google.gson.Gson;
|
// import com.google.gson.reflect.TypeToken;
|
// import com.opensymphony.xwork2.ActionSupport;
|
//
|
// public class RoleLimitAction extends ActionSupport{
|
// private RoleLimit rl;
|
// private String rolelimits;
|
// private String result;
|
// ServiceModel model = new ServiceModel();
|
// RoleLimitService service=new RoleLimitService();
|
//
|
// public ServiceModel findAll(){
|
// model=service.findRoleLimitall();
|
// result=ActionUtil.tojson(model);
|
// //System.out.println(result);
|
// return "success";
|
// }
|
// public ServiceModel addRoleLimit(){
|
//
|
// model=service.addRoleLimit(rl);
|
//
|
// result=ActionUtil.tojson(model);
|
// return "success";
|
//
|
// }
|
// public ServiceModel delRoleLimit() {
|
// model=service.delRoleLimit(rl);
|
// result=ActionUtil.tojson(model);
|
//
|
// return "success";
|
// }
|
// public ServiceModel updateRoleLimit() {
|
// //System.out.println("开始修改。。。");
|
// //System.out.println(rolelimits);
|
// Gson gson=new Gson();
|
// UserRole u=new UserRole();
|
// List<RoleLimit> rtn = gson.fromJson(rolelimits, new TypeToken<List<RoleLimit>>(){}.getType());
|
// for (RoleLimit roleLimit : rtn) {
|
// // System.out.println(roleLimit);
|
// model=service.updateRoleLimit(roleLimit);
|
// }
|
// result=ActionUtil.tojson(model);
|
// return "success";
|
// }
|
//
|
// public ServiceModel getRolelimits() {
|
// return rolelimits;
|
// }
|
// public void setRolelimits(String rolelimits) {
|
// this.rolelimits = rolelimits;
|
// }
|
// public ServiceModel getResult() {
|
// return result;
|
// }
|
// public ServiceModel getModel() {
|
// return model;
|
// }
|
// public RoleLimitService getService() {
|
// return service;
|
// }
|
// public void setService(RoleLimitService service) {
|
// this.service = service;
|
// }
|
// public static void main(String[] args) {
|
// RoleLimitAction rla=new RoleLimitAction();
|
// Roles r=new Roles();
|
// r.setRid(1);
|
// Limit l=new Limit();
|
// l.setLid(2);
|
// rla.updateRoleLimit();
|
// rla.findAll();
|
// }
|
//
|
// }
|