package com.red.circle.wallet.infra.sync;

import com.red.circle.common.business.core.enums.SysOriginPlatformEnum;
import com.red.circle.framework.core.asserts.ResponseAssert;
import com.red.circle.framework.core.response.CommonErrorCode;
import lombok.RequiredArgsConstructor;
import org.springframework.stereotype.Component;

import java.util.List;

/**
 * 控制迁移过程功能开关.
 *
 * @author pengliang on 2024/1/4
 */
@Component
@RequiredArgsConstructor
public class ControlSwitch {

  private final List<SysOriginPlatformEnum> openSys = List.of(
      SysOriginPlatformEnum.TWO_FUN, SysOriginPlatformEnum.YOLO,SysOriginPlatformEnum.ASWAT,SysOriginPlatformEnum.TARAB
  );

  /**
   * 注意: 指定系统数据未全部同步前, 对应系统货运关闭.
   */
  public void execute(SysOriginPlatformEnum sysOrigin) {
    return;
//    if (openSys.contains(sysOrigin)) {
//      return;
//    }
//    ResponseAssert.failure(CommonErrorCode.API_DEPRECATED);
  }

}
