package com.keao.edu.thirdparty.adapay; import com.huifu.adapay.core.exception.BaseAdaPayException; import java.util.HashMap; import java.util.Map; public class SettleAccount { /** * 删除 SettleAccount * * @param settleCount_id 待删除的settleCount_id * @return delete的settleCount 对象 * @throws Exception 异常 */ public static Map executeDeleteSettleAccount(String settleCount_id, String member_id) throws Exception { Map settleCountParams = new HashMap(3); settleCountParams.put("settle_account_id", settleCount_id); settleCountParams.put("member_id", member_id); settleCountParams.put("app_id", ConfigInit.appId); Map settleCount = com.huifu.adapay.model.SettleAccount.delete(settleCountParams); String error_code = (String) settleCount.get("error_code"); if (null != error_code) { String errorMsg = (String) settleCount.get("error_msg"); throw new BaseAdaPayException(errorMsg); } return settleCount; } /** * 创建 settleCount * * @return 创建的settleCount 对象 * @throws Exception 异常 */ public static Map executeCreateSettleAccount(String member_id, Map accountInfo) throws Exception { Map settleCountParams = new HashMap(4); settleCountParams.put("member_id", member_id); settleCountParams.put("app_id", ConfigInit.appId); settleCountParams.put("channel", "bank_account"); settleCountParams.put("account_info", accountInfo); Map settleCount = com.huifu.adapay.model.SettleAccount.create(settleCountParams); String error_code = (String) settleCount.get("error_code"); if (null != error_code) { String errorMsg = (String) settleCount.get("error_msg"); throw new BaseAdaPayException(errorMsg); } return settleCount; } }