|
@@ -6,6 +6,7 @@
|
|
|
package org.eco.vip.auth.service.role;
|
|
|
|
|
|
|
|
|
+import com.mybatisflex.core.paginate.Page;
|
|
|
import com.mybatisflex.core.query.QueryMethods;
|
|
|
import com.mybatisflex.core.query.QueryWrapper;
|
|
|
import jakarta.annotation.Resource;
|
|
@@ -18,6 +19,7 @@ import org.eco.vip.auth.domain.role.pojo.RoleVO;
|
|
|
import org.eco.vip.auth.mapper.RoleMapper;
|
|
|
import org.eco.vip.auth.mapper.RoleMenuMapper;
|
|
|
import org.eco.vip.auth.mapper.RolePermMapper;
|
|
|
+import org.eco.vip.orm.domain.PageQuery;
|
|
|
import org.eco.vip.orm.pojo.PageResult;
|
|
|
import org.eco.vip.orm.service.BaseService;
|
|
|
import org.eco.vip.orm.utils.MapstructUtils;
|
|
@@ -48,9 +50,23 @@ public class RoleService extends BaseService<RoleMapper, Role> implements IRoleS
|
|
|
@Resource
|
|
|
private RoleMenuMapper roleMenuMapper;
|
|
|
|
|
|
+ @Resource
|
|
|
+ private RoleMapper roleMapper;
|
|
|
+
|
|
|
+ private QueryWrapper buildQueryWrapper(RoleBO roleBO) {
|
|
|
+ return super.buildBaseQueryWrapper()
|
|
|
+ .and(ROLE.ORG_ID.eq(roleBO.getOrgId()))
|
|
|
+ .and(ROLE.CODE.eq(roleBO.getCode()))
|
|
|
+ .and(ROLE.CATEGORY.eq(roleBO.getCategory()))
|
|
|
+ .and(ROLE.NAME.eq(roleBO.getName()))
|
|
|
+ .and(ROLE.STATUS.eq(roleBO.getStatus()));
|
|
|
+ }
|
|
|
+
|
|
|
@Override
|
|
|
public PageResult<RoleVO> selectPage(RoleBO roleBO) {
|
|
|
- return null;
|
|
|
+ QueryWrapper queryWrapper = buildQueryWrapper(roleBO);
|
|
|
+ Page<RoleVO> page = roleMapper.paginateWithRelationsAs(PageQuery.build(), queryWrapper, RoleVO.class);
|
|
|
+ return PageResult.build(page);
|
|
|
}
|
|
|
|
|
|
@Override
|