package com.jsowell.pile.util;

import com.jsowell.common.util.StringUtils;

/**
 * 运营商工具类
 */
public class MerchantUtils {

    // 希晓运营商id
    public static final String XIXIAO_MERCHANT_ID = "35";

    // 是否是希晓运营商
    public static boolean isXiXiaoMerchant(String merchantId) {
        return StringUtils.equals(XIXIAO_MERCHANT_ID, merchantId);
    }

    /**
     * 从统一社会信用代码中获取组织机构代码
     * @param organizationCode
     * @return
     */
    public static String getOperatorID(String organizationCode) {
        return organizationCode.substring(8, 17);
    }

    public static void main(String[] args) {
        String organizationCode = "91310118MA1JLFUU81";
        System.out.println(getOperatorID(organizationCode));
    }
}
