DeletePrivilegeGroupComponent.java 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. package com.java110.web.components;
  2. import com.java110.core.context.IPageData;
  3. import com.java110.web.smo.IPrivilegeServiceSMO;
  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. * @param pd
  15. * @return
  16. */
  17. public ResponseEntity<String> delete(IPageData pd){
  18. ResponseEntity<String> responseEntity = null;
  19. try{
  20. responseEntity = privilegeServiceSMOImpl.deletePrivilegeGroup(pd);
  21. }catch (Exception e){
  22. responseEntity = new ResponseEntity<String>(e.getMessage(), HttpStatus.INTERNAL_SERVER_ERROR);
  23. }finally {
  24. return responseEntity;
  25. }
  26. }
  27. public IPrivilegeServiceSMO getPrivilegeServiceSMOImpl() {
  28. return privilegeServiceSMOImpl;
  29. }
  30. public void setPrivilegeServiceSMOImpl(IPrivilegeServiceSMO privilegeServiceSMOImpl) {
  31. this.privilegeServiceSMOImpl = privilegeServiceSMOImpl;
  32. }
  33. }