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

import com.red.circle.other.infra.database.cache.key.ActivityKeys;
import com.red.circle.other.infra.database.cache.service.other.WeekStarCacheService;
import java.util.Optional;
import lombok.RequiredArgsConstructor;
import org.springframework.stereotype.Service;

/**
 * 周星奖励配置-奖励池.
 *
 * @author pengshigang on 2021/6/24
 */
@Service
@RequiredArgsConstructor
public class WeekStarStartEndTimeQueryExe {

  private final WeekStarCacheService weekStarCacheService;

  public String execute() {
    return Optional.ofNullable(weekStarCacheService
        .getWeekStarStartEndDate(ActivityKeys.WEEK_STAR_START_END_DATE.name())).orElse("");
  }

}
