RolesService.java 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. /*
  2. * Copyright [2020] [MaxKey of copyright http://www.maxkey.top]
  3. *
  4. * Licensed under the Apache License, Version 2.0 (the "License");
  5. * you may not use this file except in compliance with the License.
  6. * You may obtain a copy of the License at
  7. *
  8. * http://www.apache.org/licenses/LICENSE-2.0
  9. *
  10. * Unless required by applicable law or agreed to in writing, software
  11. * distributed under the License is distributed on an "AS IS" BASIS,
  12. * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  13. * See the License for the specific language governing permissions and
  14. * limitations under the License.
  15. */
  16. package org.maxkey.persistence.service;
  17. import java.util.List;
  18. import org.apache.mybatis.jpa.persistence.JpaBaseService;
  19. import org.maxkey.domain.RolePermissions;
  20. import org.maxkey.domain.Roles;
  21. import org.maxkey.persistence.mapper.RolesMapper;
  22. import org.springframework.stereotype.Service;
  23. @Service
  24. public class RolesService extends JpaBaseService<Roles>{
  25. public RolesService() {
  26. super(RolesMapper.class);
  27. }
  28. /* (non-Javadoc)
  29. * @see com.connsec.db.service.BaseService#getMapper()
  30. */
  31. @Override
  32. public RolesMapper getMapper() {
  33. return (RolesMapper)super.getMapper();
  34. }
  35. public boolean insertRolePermissions(List<RolePermissions> rolePermissionsList) {
  36. return getMapper().insertRolePermissions(rolePermissionsList)>0;
  37. };
  38. public boolean logisticDeleteRolePermissions(List<RolePermissions> rolePermissionsList) {
  39. return getMapper().logisticDeleteRolePermissions(rolePermissionsList)>=0;
  40. }
  41. public List<RolePermissions> queryRolePermissions(RolePermissions rolePermissions){
  42. return getMapper().queryRolePermissions(rolePermissions);
  43. }
  44. }