package com.red.circle.other.app.manager.activity;

import com.red.circle.other.app.manager.activity.award.WeeklyRewardsSentManager;
import com.red.circle.other.app.manager.activity.refresh.ActivityPkManager;
import com.red.circle.other.app.manager.activity.refresh.ResetWeekExclusiveGiftManager;
import lombok.AllArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Component;

/**
 * 统一刷新每周活动缓存数据（针对每周需要发送奖励的活动）
 *
 * @author lixiaofei on 2024/06/25
 */
@Slf4j
@Component
@AllArgsConstructor
public class RefreshWeekActivityManager {

  private final ActivityPkManager activityPkManager;
  private final WeeklyRewardsSentManager weeklyRewardsSentManager;
  private final ResetWeekExclusiveGiftManager resetWeekExclusiveGiftManager;

  /**
   * 15分钟加载一次的业务
   */
  public void refreshWeeklyActivitiesFifteenMin() {
    activityPkManager.everyFifteenMinutes();
    resetWeekExclusiveGiftManager.everyFifteenMinutes();

  }

  /**
   * 每周一 加载一次的业务
   */
  public void refreshWeeklyActivitiesWeekly() {
    activityPkManager.weekly();
    resetWeekExclusiveGiftManager.weekly();
  }

  /**
   * 发送每周所有活动奖励，目前( cp，pk, 特殊关系卡 )
   */
  public void weeklyAllRewardsSent() {
    weeklyRewardsSentManager.weeklyRewardSend();
  }

  public void weeklyAllRewardsSentByRegionCode(String code) {

    // CP
    // weeklyRewardsSentManager.processSendRewardCp(SysOriginPlatformEnum.ASWAT, code);

    // 代理活动 - 周
    // weeklyRewardsSentManager.processSendRewardAgentActivity(SysOriginPlatformEnum.ASWAT, "WEEK", code);

  }


}
