|
|
|
@ -9,8 +9,10 @@ import com.hfkj.common.utils.GenerateUtil; |
|
|
|
|
import com.hfkj.common.utils.HttpsUtils; |
|
|
|
|
import com.hfkj.config.CommonSysConst; |
|
|
|
|
import com.hfkj.entity.BsMer; |
|
|
|
|
import com.hfkj.entity.BsMerLedger; |
|
|
|
|
import com.hfkj.entity.BsMerPlatformNo; |
|
|
|
|
import com.hfkj.entity.SecDictionary; |
|
|
|
|
import com.hfkj.service.BsMerLedgerService; |
|
|
|
|
import com.hfkj.service.BsMerPlatformNoService; |
|
|
|
|
import com.hfkj.service.BsMerService; |
|
|
|
|
import com.hfkj.service.CommonService; |
|
|
|
@ -32,6 +34,8 @@ public class LaKaLaWalletService { |
|
|
|
|
@Resource |
|
|
|
|
private BsMerPlatformNoService merPlatformNoService; |
|
|
|
|
@Resource |
|
|
|
|
private BsMerLedgerService merLedgerService; |
|
|
|
|
@Resource |
|
|
|
|
private BsMerService merService; |
|
|
|
|
@Resource |
|
|
|
|
private CommonService commonService; |
|
|
|
@ -248,19 +252,33 @@ public class LaKaLaWalletService { |
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
* 账管家提款模式设置 |
|
|
|
|
* @param merCupType 商户号类型 1:商户号 2:分账接收方账户 |
|
|
|
|
* @param merCupNo 商户号 |
|
|
|
|
* @param settleType 提款模式(01主动提款 02自动结算) |
|
|
|
|
* @param settleTime 结算时间(小时)- 默认值:06。如08:00-09:00到账,则传入08 |
|
|
|
|
* @return |
|
|
|
|
*/ |
|
|
|
|
public JSONObject ewalletSettleProfile(String merCupNo, String settleType, String settleTime) { |
|
|
|
|
public JSONObject ewalletSettleProfile(Integer merCupType,String merCupNo, String settleType, String settleTime) { |
|
|
|
|
BsMer mer = null; |
|
|
|
|
|
|
|
|
|
if (merCupType.equals(1)) { |
|
|
|
|
// 查询平台商户号
|
|
|
|
|
BsMerPlatformNo merPlatform = merPlatformNoService.getPlatformNoByCupNo(merCupNo); |
|
|
|
|
if (merPlatform == null) { |
|
|
|
|
throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "未找到平台商户号"); |
|
|
|
|
} |
|
|
|
|
// 商户平台
|
|
|
|
|
BsMer mer = merService.getMer(merPlatform.getMerId()); |
|
|
|
|
mer = merService.getMer(merPlatform.getMerId()); |
|
|
|
|
|
|
|
|
|
} else if (merCupType.equals(2)) { |
|
|
|
|
// 查询分账信息
|
|
|
|
|
BsMerLedger merLedger = merLedgerService.getMerLedgerByReceiverNo(merCupNo); |
|
|
|
|
if (merLedger == null) { |
|
|
|
|
throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "未找到商户分账信息"); |
|
|
|
|
} |
|
|
|
|
// 商户平台
|
|
|
|
|
mer = merService.getMer(merLedger.getMerId()); |
|
|
|
|
} |
|
|
|
|
if (mer == null) { |
|
|
|
|
throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "未知的商户"); |
|
|
|
|
} |
|
|
|
|