页面权限接口
This commit is contained in:
parent
0d11678148
commit
7d9cfb74f4
|
|
@ -50,6 +50,20 @@ public class ShopPagePermissionController {
|
||||||
return CzgResult.success(shopStaffPagePermissionService.add(StpKit.USER.getShopId(), pagePathPermissionAddDTO));
|
return CzgResult.success(shopStaffPagePermissionService.add(StpKit.USER.getShopId(), pagePathPermissionAddDTO));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取员工拥有页面路径
|
||||||
|
* @param staffId 员工ID
|
||||||
|
*/
|
||||||
|
@GetMapping("/detail")
|
||||||
|
public CzgResult<List<ShopPagePath>> detail(@RequestParam Long staffId) {
|
||||||
|
Set<Long> pageIdList = shopStaffPagePermissionService.list(new QueryWrapper().eq(ShopStaffPagePermission::getShopId,
|
||||||
|
StpKit.USER.getShopId()).eq(ShopStaffPagePermission::getStaffId, staffId)).stream().map(ShopStaffPagePermission::getPagePathId).collect(Collectors.toSet());
|
||||||
|
if (pageIdList.isEmpty()) {
|
||||||
|
return CzgResult.success(new ArrayList<>());
|
||||||
|
}
|
||||||
|
return CzgResult.success(shopPagePathService.list(new QueryWrapper().in(ShopPagePath::getId, pageIdList)));
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 获取当前员工已拥有页面路径权限
|
* 获取当前员工已拥有页面路径权限
|
||||||
*/
|
*/
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue