默认初始化页面权限
This commit is contained in:
parent
f530956f06
commit
9e004d9cdb
|
|
@ -29,12 +29,12 @@ import java.util.stream.Collectors;
|
|||
*/
|
||||
@Service
|
||||
public class ShopPagePathServiceImpl extends ServiceImpl<ShopPagePathMapper, ShopPagePath> implements ShopPagePathService{
|
||||
@Autowired
|
||||
private ShopStaffPagePermissionMapper shopStaffPermissionMapper;
|
||||
@Resource
|
||||
private ShopStaffPagePermissionMapper shopStaffPagePermissionMapper;
|
||||
|
||||
@Override
|
||||
public List<ShopPagePath> detail(Long staffId) {
|
||||
Set<Long> pageIdList = shopStaffPermissionMapper.selectListByQuery(new QueryWrapper().eq(ShopStaffPagePermission::getShopId,
|
||||
Set<Long> pageIdList = shopStaffPagePermissionMapper.selectListByQuery(new QueryWrapper().eq(ShopStaffPagePermission::getShopId,
|
||||
StpKit.USER.getShopId()).eq(ShopStaffPagePermission::getStaffId, staffId)).stream().map(ShopStaffPagePermission::getPagePathId).collect(Collectors.toSet());
|
||||
if (pageIdList.isEmpty()) {
|
||||
list().forEach(item -> {
|
||||
|
|
@ -42,7 +42,7 @@ public class ShopPagePathServiceImpl extends ServiceImpl<ShopPagePathMapper, Sho
|
|||
permission.setShopId(StpKit.USER.getShopId());
|
||||
permission.setStaffId(staffId);
|
||||
permission.setPagePathId(item.getId());
|
||||
shopStaffPermissionMapper.insert(permission);
|
||||
shopStaffPagePermissionMapper.insert(permission);
|
||||
pageIdList.add(permission.getPagePathId());
|
||||
});
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue