DeletePrivilegeGroupComponent.java 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. package com.java110.boot.components;
  2. import com.java110.boot.smo.IPrivilegeServiceSMO;
  3. import com.java110.core.context.IPageData;
  4. import org.springframework.beans.factory.annotation.Autowired;
  5. import org.springframework.http.HttpStatus;
  6. import org.springframework.http.ResponseEntity;
  7. import org.springframework.stereotype.Component;
  8. @Component("deletePrivilegeGroup")
  9. public class DeletePrivilegeGroupComponent {
  10. @Autowired
  11. private IPrivilegeServiceSMO privilegeServiceSMOImpl;
  12. /**
  13. * 删除权限组
  14. *
  15. * @param pd
  16. * @return
  17. */
  18. public ResponseEntity<String> delete(IPageData pd) {
  19. ResponseEntity<String> responseEntity = null;
  20. try {
  21. responseEntity = privilegeServiceSMOImpl.deletePrivilegeGroup(pd);
  22. } catch (Exception e) {
  23. responseEntity = new ResponseEntity<String>(e.getMessage(), HttpStatus.INTERNAL_SERVER_ERROR);
  24. } finally {
  25. }
  26. return responseEntity;
  27. }
  28. public IPrivilegeServiceSMO getPrivilegeServiceSMOImpl() {
  29. return privilegeServiceSMOImpl;
  30. }
  31. public void setPrivilegeServiceSMOImpl(IPrivilegeServiceSMO privilegeServiceSMOImpl) {
  32. this.privilegeServiceSMOImpl = privilegeServiceSMOImpl;
  33. }
  34. }