package org.springblade.common.config.yeepay;

import com.alibaba.fastjson.JSON;
import org.springblade.yeePay.common.YeepayProduct;
import org.springblade.yeePay.entity.saas.InvitationDto;

import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;

import static org.springblade.yeePay.common.YeepayProduct.*;


/**
 * @author: lianghanqiang
 * @description: 联兑通入驻平台需要开通的易宝的产品列表
 * @since: 9/29/21 -- 11:56 AM
 */
public class OpenProduct {

	/**
	 * 平台商
	 * */
	public static final YeepayProduct[] PRODUCTS = {
		USER_SCAN_WECHAT_OFFLINE,
		USER_SCAN_WECHAT_ONLINE,
		USER_SCAN_ALIPAY_OFFLINE,
//		MERCHANT_SCAN_WECHAT_OFFLINE,
//		MERCHANT_SCAN_ALIPAY_OFFLINE,
		WECHAT_OFFIACCOUNT_WECHAT_OFFLINE,
		WECHAT_OFFIACCOUNT_WECHAT_ONLINE,
		ALIPAY_LIFE_ALIPAY_OFFLINE,
		MINI_PROGRAM_WECHAT_OFFLINE,
		MINI_PROGRAM_WECHAT_ONLINE,
		MINI_PROGRAM_ALIPAY_OFFLINE,
//		BINDCARDPAY_DEBIT,
//		BINDCARDPAY_CREDIT,
//		BINDCARDPAY_BINDCARD,
		ONEKEYPAY_DEBIT,
		ONEKEYPAY_CREDIT,
//		ONEKEYPAY_DEBIT_CMBCHINA,
//		ONEKEYPAY_DEBIT_BOCO,
//		ONEKEYPAY_CREDIT_CMBCHINA,
//		ONEKEYPAY_CREDIT_BOCO,
//		E_BANK_B2B,
//		E_BANK_B2C,
//		BANKTRANSFERPAY,
		D1_MANUAL,
		ENTERPRISE_RECHARGE_STANDARD_B2B,
//		ENTERPRISE_RECHARGE_STANDARD_B2C,
//		ENTERPRISE_RECHARGE_STANDARD_BANK_TRASFER,
		ENTERPRISE_WITHDRAW_STANDARD_REALTIME,
//		ENTERPRISE_WITHDRAW_STANDARD_TWOHOURS,
//		ENTERPRISE_WITHDRAW_STANDARD_TOMORROW,
//		ENTERPRISE_TRANSFER_B2B,
//		ENTERPRISE_PAY_TWOHOURS,
//		ENTERPRISE_PAY_REALTIME,
//		ENTERPRISE_PAY_TOMORROW,
	};

	/**
	 * 商户
	 * */
	public static final YeepayProduct[] MERCHANT_PRODUCTS = {
		USER_SCAN_WECHAT_OFFLINE,
		USER_SCAN_WECHAT_ONLINE,
		USER_SCAN_ALIPAY_OFFLINE,
//		MERCHANT_SCAN_WECHAT_OFFLINE,
//		MERCHANT_SCAN_ALIPAY_OFFLINE,
		WECHAT_OFFIACCOUNT_WECHAT_OFFLINE,
		WECHAT_OFFIACCOUNT_WECHAT_ONLINE,
		ALIPAY_LIFE_ALIPAY_OFFLINE,
		MINI_PROGRAM_WECHAT_OFFLINE,
		MINI_PROGRAM_WECHAT_ONLINE,
		MINI_PROGRAM_ALIPAY_OFFLINE,
//		BINDCARDPAY_DEBIT,
//		BINDCARDPAY_CREDIT,
//		BINDCARDPAY_BINDCARD,
		ONEKEYPAY_DEBIT,
		ONEKEYPAY_CREDIT,
//		ONEKEYPAY_DEBIT_CMBCHINA,
//		ONEKEYPAY_DEBIT_BOCO,
//		ONEKEYPAY_CREDIT_CMBCHINA,
//		ONEKEYPAY_CREDIT_BOCO,
//		E_BANK_B2B,
//		E_BANK_B2C,
//		BANKTRANSFERPAY,
		D1_MANUAL,
		ENTERPRISE_RECHARGE_STANDARD_B2B,
//		ENTERPRISE_RECHARGE_STANDARD_B2C,
//		ENTERPRISE_RECHARGE_STANDARD_BANK_TRASFER,
		ENTERPRISE_WITHDRAW_STANDARD_REALTIME,
//		ENTERPRISE_WITHDRAW_STANDARD_TWOHOURS,
//		ENTERPRISE_WITHDRAW_STANDARD_TOMORROW,
//		ENTERPRISE_TRANSFER_B2B,
//		ENTERPRISE_PAY_TWOHOURS,
//		ENTERPRISE_PAY_REALTIME,
//		ENTERPRISE_PAY_TOMORROW,
	};

	/**
	 * 小微
	 * */
	public static final YeepayProduct[] MICRO_PRODUCTS = {
		USER_SCAN_WECHAT_OFFLINE,
//		USER_SCAN_WECHAT_ONLINE,
		USER_SCAN_ALIPAY_OFFLINE,
//		MERCHANT_SCAN_WECHAT_OFFLINE,
//		MERCHANT_SCAN_ALIPAY_OFFLINE,
		WECHAT_OFFIACCOUNT_WECHAT_OFFLINE,
//		WECHAT_OFFIACCOUNT_WECHAT_ONLINE,
//		ALIPAY_LIFE_ALIPAY_OFFLINE,
		MINI_PROGRAM_WECHAT_OFFLINE,
//		MINI_PROGRAM_WECHAT_ONLINE,
		MINI_PROGRAM_ALIPAY_OFFLINE,
//		BINDCARDPAY_DEBIT,
//		BINDCARDPAY_CREDIT,
//		BINDCARDPAY_BINDCARD,
//		ONEKEYPAY_DEBIT,
//		ONEKEYPAY_CREDIT,
//		ONEKEYPAY_DEBIT_CMBCHINA,
//		ONEKEYPAY_DEBIT_BOCO,
//		ONEKEYPAY_CREDIT_CMBCHINA,
//		ONEKEYPAY_CREDIT_BOCO,
//		E_BANK_B2B,
//		E_BANK_B2C,
//		BANKTRANSFERPAY,
		D1_MANUAL,
//		ENTERPRISE_RECHARGE_STANDARD_B2B,
//		ENTERPRISE_RECHARGE_STANDARD_B2C,
//		ENTERPRISE_RECHARGE_STANDARD_BANK_TRASFER,
		ENTERPRISE_WITHDRAW_STANDARD_REALTIME,
//		ENTERPRISE_WITHDRAW_STANDARD_TWOHOURS,
//		ENTERPRISE_WITHDRAW_STANDARD_TOMORROW,
//		ENTERPRISE_TRANSFER_B2B,
//		ENTERPRISE_PAY_TWOHOURS,
//		ENTERPRISE_PAY_REALTIME,
//		ENTERPRISE_PAY_TOMORROW,
	};

	public static void main(String[] args) {
		List<InvitationDto.ProductInfo> productInfos = new ArrayList<>();
		Arrays.stream(PRODUCTS).forEach(item -> {
			InvitationDto.ProductInfo productInfo =  new InvitationDto.ProductInfo();
			productInfo.setProductCode(item);
			productInfo.setPercentRate("0.21");
			productInfo.setFixedRate("");
			productInfo.setRateType("SINGLE_PERCENT");
			productInfo.setPaymentMethod("REAL_TIME");
			productInfo.setUndertaker("PLATFORM_MERCHANT");
			productInfos.add(productInfo);
		});
		System.out.println(JSON.toJSONString(productInfos));
	}
}
