package com.gic.haoban.manage.web.qo.data;

import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import lombok.Data;

import java.io.Serializable;

/**
 * @Author guojx
 * @Date 2024/4/29 15:26
 */
@Data
@JsonIgnoreProperties(ignoreUnknown = true)
public class StoreSalesDataQO extends CommonQO implements Serializable {

    private StoreSalesApiQO apiParam;

    /**
     * 1:data_sales_perf_anal_cont_day_overview
     * 2:data_sales_perf_anal_cont_week_overview
     * 3:data_sales_perf_anal_cont_month_overview
     * 4:data_sales_perf_anal_cont_year_overview
     * 5:data_sales_perf_anal_cont_custm_overview
     */
    private Integer apiNameType;


    public String getApolloKeyByType() {
        if (apiNameType == null) {
            apiNameType = 1;
        }
        switch (apiNameType) {
            case 2:
                return "data_sales_perf_anal_cont_week_overview";
            case 3:
                return "data_sales_perf_anal_cont_month_overview";
            case 4:
                return "data_sales_perf_anal_cont_year_overview";
            case 5 :
                return "data_sales_perf_anal_cont_custm_overview";
            default:
                return "data_sales_perf_anal_cont_day_overview";
        }
    }
}
