package com.red.circle.console.app.command.admin;

import com.red.circle.console.app.dto.cmd.admin.RoleMenuUpdateCmd;
import com.red.circle.console.infra.database.rds.service.admin.RoleMenuService;
import lombok.RequiredArgsConstructor;
import org.springframework.stereotype.Component;

/**
 * 修改角色菜单
 *
 * @author pengliang on 2023/5/12
 */
@Component
@RequiredArgsConstructor
public class RoleMenuUpdateCmdExe {

  private final RoleMenuService roleMenuService;

  public void execute(RoleMenuUpdateCmd cmd) {
    roleMenuService.saveRoleMenu(cmd.getId(), cmd.getMenuIds());
  }

}
