NewRoleApiController.java 904 B

1234567891011121314151617181920212223242526272829
  1. package com.goafanti.permission.controller;
  2. import javax.annotation.Resource;
  3. import org.springframework.web.bind.annotation.RequestMapping;
  4. import org.springframework.web.bind.annotation.RequestMethod;
  5. import org.springframework.web.bind.annotation.RestController;
  6. import com.goafanti.common.bo.Result;
  7. import com.goafanti.common.controller.BaseApiController;
  8. import com.goafanti.common.model.Role;
  9. import com.goafanti.permission.service.NewRoleService;
  10. @RestController
  11. @RequestMapping("open/api/admin/role")
  12. public class NewRoleApiController extends BaseApiController{
  13. @Resource
  14. private NewRoleService newRoleService;
  15. @RequestMapping(value = "/roles", method = RequestMethod.POST)
  16. public Result roles(Role role, Integer pageNo,
  17. Integer pageSize) {
  18. Result res = new Result();
  19. res.setData(newRoleService.findRoles(role,pageNo,pageSize));
  20. return res;
  21. }
  22. }