package cn.freemud.demo.utils;

import cn.freemud.demo.entities.dto.goods.add.AddGoodsRequestDTO;
import cn.freemud.demo.enums.BizTypeEnum;
import cn.freemud.enums.OrderChannelType;

public class BizTypeUtil {

    private final static String macafePartnerId = "";


    public static BizTypeEnum getBizType (AddGoodsRequestDTO baseRequestDTO){

        if (baseRequestDTO.getChannelType() != null && OrderChannelType.SAASMALL.getCode().equals(baseRequestDTO.getChannelType())){
            return BizTypeEnum.MAIL;
        } else if (baseRequestDTO.getPartnerId().equals(macafePartnerId)) {
            return BizTypeEnum.MCOFFEE;
        } else {
            return BizTypeEnum.PLATFORM;
        }

    }

}
