package com.gic.haoban.manage.web.utils.storestatusfilter;

import java.util.Collections;
import java.util.List;
import java.util.stream.Collectors;
import java.util.stream.Stream;

public class StoreStatusFilterUtils {

    /**
     * 获取门店实际状态值
     * @param storeStatusFilter 0或者空：全部 1:上线 2：未上线 -3 ：回收站
     * @return
     */
    public static List<String> getStoreStatusList(Integer storeStatusFilter) {
        if (storeStatusFilter == null || storeStatusFilter == 0) {
            return Collections.emptyList();
        }
        switch (storeStatusFilter) {
            case 2:
                return Stream.of("3", "6", "7").collect(Collectors.toList());
            case -3:
                return Stream.of("-3").collect(Collectors.toList());
            default:
                return Stream.of("2").collect(Collectors.toList());
        }
    }

    public static Integer getStoreStatusFilter(Integer storeStatus) {
        switch (storeStatus) {
            case 2:
                return 1;
            case -3:
                return -3;
            default :
                return 2;
        }
    }
}
