|
@ -1,12 +1,15 @@ |
|
|
package com.example.demo.serviceImpl; |
|
|
package com.example.demo.serviceImpl; |
|
|
|
|
|
|
|
|
import com.example.demo.domain.entity.Role; |
|
|
import com.example.demo.domain.entity.Role; |
|
|
|
|
|
import com.example.demo.domain.vo.ConsumeUser; |
|
|
import com.example.demo.domain.vo.Result; |
|
|
import com.example.demo.domain.vo.Result; |
|
|
import com.example.demo.domain.vo.RoleVo; |
|
|
import com.example.demo.domain.vo.RoleVo; |
|
|
import com.example.demo.mapper.RefundMapper; |
|
|
import com.example.demo.mapper.RefundMapper; |
|
|
import com.example.demo.mapper.RoleMapper; |
|
|
import com.example.demo.mapper.RoleMapper; |
|
|
import com.example.demo.service.MenuService; |
|
|
import com.example.demo.service.MenuService; |
|
|
import com.example.demo.service.RoleService; |
|
|
import com.example.demo.service.RoleService; |
|
|
|
|
|
import com.github.pagehelper.PageHelper; |
|
|
|
|
|
import com.github.pagehelper.PageInfo; |
|
|
import org.springframework.beans.factory.annotation.Autowired; |
|
|
import org.springframework.beans.factory.annotation.Autowired; |
|
|
import org.springframework.stereotype.Service; |
|
|
import org.springframework.stereotype.Service; |
|
|
import org.springframework.transaction.annotation.Transactional; |
|
|
import org.springframework.transaction.annotation.Transactional; |
|
@ -74,6 +77,14 @@ public class RoleServiceImpl implements RoleService { |
|
|
public List<RoleVo> selectSubRole(Integer fatherId) { |
|
|
public List<RoleVo> selectSubRole(Integer fatherId) { |
|
|
return roleMapper.selectByFatherId(fatherId); |
|
|
return roleMapper.selectByFatherId(fatherId); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
//分页查找角色 |
|
|
|
|
|
@Override |
|
|
|
|
|
public PageInfo<RoleVo> selectBy(Integer pageNum, Integer pageSize, RoleVo roleVo) { |
|
|
|
|
|
PageHelper.startPage(pageNum, pageSize); |
|
|
|
|
|
List<RoleVo> roleVos = roleMapper.selectBy(roleVo); |
|
|
|
|
|
return new PageInfo<>(roleVos); |
|
|
|
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|