package com.red.circle.other.app.command.user.query;

import com.red.circle.common.business.dto.cmd.AppExtCommand;
import com.red.circle.other.infra.database.rds.service.user.user.AuthTypeService;
import java.util.List;
import lombok.RequiredArgsConstructor;
import org.springframework.stereotype.Component;

/**
 * 用户认证类型查询.
 *
 * @author pengliang on 2021/5/11
 */
@Component
@RequiredArgsConstructor
public class UserAuthTypeQryExe {

  private final AuthTypeService authTypeService;

  public List<String> execute(AppExtCommand cmd) {
    return authTypeService.listUserAuthType(cmd.requiredReqUserId());
  }

  public void restoreAuthDelByUserId(Long userId) {
      authTypeService.restoreAuthDelByUserId(userId);
  }

}
