Search in sources :

Example 1 with UacRoleAction

use of com.paascloud.provider.model.domain.UacRoleAction in project paascloud-master by paascloud.

the class UacRoleActionServiceImpl method listByRoleId.

@Override
@Transactional(readOnly = true, rollbackFor = Exception.class)
public List<UacRoleAction> listByRoleId(Long roleId) {
    if (roleId == null) {
        throw new UacBizException(ErrorCodeEnum.UAC10012001);
    }
    UacRoleAction roleMenu = new UacRoleAction();
    roleMenu.setRoleId(roleId);
    return uacRoleActionMapper.select(roleMenu);
}
Also used : UacBizException(com.paascloud.provider.model.exceptions.UacBizException) UacRoleAction(com.paascloud.provider.model.domain.UacRoleAction) Transactional(org.springframework.transaction.annotation.Transactional)

Example 2 with UacRoleAction

use of com.paascloud.provider.model.domain.UacRoleAction in project paascloud-master by paascloud.

the class UacRoleActionServiceImpl method insert.

@Override
public void insert(Long roleId, Set<Long> actionIdList) {
    if (roleId == null) {
        throw new UacBizException(ErrorCodeEnum.UAC10012001);
    }
    UacRoleAction uacRoleAction = new UacRoleAction();
    uacRoleAction.setRoleId(roleId);
    for (Long actionId : actionIdList) {
        uacRoleAction.setActionId(actionId);
        uacRoleActionMapper.insert(uacRoleAction);
    }
}
Also used : UacBizException(com.paascloud.provider.model.exceptions.UacBizException) UacRoleAction(com.paascloud.provider.model.domain.UacRoleAction)

Example 3 with UacRoleAction

use of com.paascloud.provider.model.domain.UacRoleAction in project paascloud-master by paascloud.

the class UacRoleActionServiceImpl method deleteByRoleId.

@Override
public void deleteByRoleId(Long roleId) {
    if (roleId == null) {
        throw new UacBizException(ErrorCodeEnum.UAC10012001);
    }
    UacRoleAction roleMenu = new UacRoleAction();
    roleMenu.setRoleId(roleId);
    uacRoleActionMapper.delete(roleMenu);
}
Also used : UacBizException(com.paascloud.provider.model.exceptions.UacBizException) UacRoleAction(com.paascloud.provider.model.domain.UacRoleAction)

Aggregations

UacRoleAction (com.paascloud.provider.model.domain.UacRoleAction)3 UacBizException (com.paascloud.provider.model.exceptions.UacBizException)3 Transactional (org.springframework.transaction.annotation.Transactional)1