|
|
@ -8,8 +8,13 @@ import com.hfkj.common.exception.SysCode; |
|
|
|
import com.hfkj.common.utils.GenerateUtil; |
|
|
|
import com.hfkj.common.utils.GenerateUtil; |
|
|
|
import com.hfkj.common.utils.HttpsUtils; |
|
|
|
import com.hfkj.common.utils.HttpsUtils; |
|
|
|
import com.hfkj.config.CommonSysConst; |
|
|
|
import com.hfkj.config.CommonSysConst; |
|
|
|
|
|
|
|
import com.hfkj.entity.BsMer; |
|
|
|
|
|
|
|
import com.hfkj.entity.BsMerPlatformNo; |
|
|
|
|
|
|
|
import com.hfkj.service.BsMerPlatformNoService; |
|
|
|
|
|
|
|
import com.hfkj.service.BsMerService; |
|
|
|
import org.springframework.stereotype.Service; |
|
|
|
import org.springframework.stereotype.Service; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
import javax.annotation.Resource; |
|
|
|
import java.math.BigDecimal; |
|
|
|
import java.math.BigDecimal; |
|
|
|
import java.util.Date; |
|
|
|
import java.util.Date; |
|
|
|
import java.util.HashMap; |
|
|
|
import java.util.HashMap; |
|
|
@ -22,12 +27,24 @@ import java.util.Map; |
|
|
|
@Service("laKaLaWalletService") |
|
|
|
@Service("laKaLaWalletService") |
|
|
|
public class LaKaLaWalletService { |
|
|
|
public class LaKaLaWalletService { |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@Resource |
|
|
|
|
|
|
|
private BsMerPlatformNoService merPlatformNoService; |
|
|
|
|
|
|
|
@Resource |
|
|
|
|
|
|
|
private BsMerService merService; |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
/** |
|
|
|
* 商户开通主动结算业务 |
|
|
|
* 商户开通主动结算业务 |
|
|
|
* @param merCupNo |
|
|
|
* @param merCupNo |
|
|
|
* @return |
|
|
|
* @return |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
public JSONObject activeSettleApply(String merCupNo) { |
|
|
|
public JSONObject activeSettleApply(String merCupNo) { |
|
|
|
|
|
|
|
// 查询平台商户号
|
|
|
|
|
|
|
|
BsMerPlatformNo merPlatform = merPlatformNoService.getPlatformNoByCupNo(merCupNo); |
|
|
|
|
|
|
|
if (merPlatform == null) { |
|
|
|
|
|
|
|
throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "未找到平台商户号"); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
BsMer mer = merService.getMer(merPlatform.getMerId()); |
|
|
|
|
|
|
|
|
|
|
|
// 请求参数
|
|
|
|
// 请求参数
|
|
|
|
Map<String, Object> param = new HashMap<>(); |
|
|
|
Map<String, Object> param = new HashMap<>(); |
|
|
|
param.put("timestamp", new Date().getTime()); |
|
|
|
param.put("timestamp", new Date().getTime()); |
|
|
@ -38,7 +55,7 @@ public class LaKaLaWalletService { |
|
|
|
Map<String, Object> map = new HashMap<>(); |
|
|
|
Map<String, Object> map = new HashMap<>(); |
|
|
|
map.put("version", "1.0"); |
|
|
|
map.put("version", "1.0"); |
|
|
|
map.put("orderNo", System.currentTimeMillis()+""); |
|
|
|
map.put("orderNo", System.currentTimeMillis()+""); |
|
|
|
map.put("orgCode", CommonSysConst.getSysConfig().getLkl_org_code()); |
|
|
|
map.put("orgCode", mer.getOrgNo()); |
|
|
|
map.put("merCupNo", merCupNo); |
|
|
|
map.put("merCupNo", merCupNo); |
|
|
|
param.put("reqData", map); |
|
|
|
param.put("reqData", map); |
|
|
|
|
|
|
|
|
|
|
@ -65,6 +82,13 @@ public class LaKaLaWalletService { |
|
|
|
* @return |
|
|
|
* @return |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
public JSONObject ewalletWithdrawD1(String merCupNo, BigDecimal drawAmt, String remark) { |
|
|
|
public JSONObject ewalletWithdrawD1(String merCupNo, BigDecimal drawAmt, String remark) { |
|
|
|
|
|
|
|
// 查询平台商户号
|
|
|
|
|
|
|
|
BsMerPlatformNo merPlatform = merPlatformNoService.getPlatformNoByCupNo(merCupNo); |
|
|
|
|
|
|
|
if (merPlatform == null) { |
|
|
|
|
|
|
|
throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "未找到平台商户号"); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
BsMer mer = merService.getMer(merPlatform.getMerId()); |
|
|
|
|
|
|
|
|
|
|
|
// 请求参数
|
|
|
|
// 请求参数
|
|
|
|
Map<String, Object> param = new HashMap<>(); |
|
|
|
Map<String, Object> param = new HashMap<>(); |
|
|
|
param.put("timestamp", new Date().getTime()); |
|
|
|
param.put("timestamp", new Date().getTime()); |
|
|
@ -73,7 +97,7 @@ public class LaKaLaWalletService { |
|
|
|
param.put("reqId", new Date().getTime()); |
|
|
|
param.put("reqId", new Date().getTime()); |
|
|
|
|
|
|
|
|
|
|
|
Map<String, Object> map = new HashMap<>(); |
|
|
|
Map<String, Object> map = new HashMap<>(); |
|
|
|
map.put("orgNo", CommonSysConst.getSysConfig().getLkl_org_code()); |
|
|
|
map.put("orgNo", mer.getOrgNo()); |
|
|
|
map.put("merchantNo", merCupNo); |
|
|
|
map.put("merchantNo", merCupNo); |
|
|
|
map.put("drawAmt", drawAmt); |
|
|
|
map.put("drawAmt", drawAmt); |
|
|
|
map.put("notifyUrl", ""); |
|
|
|
map.put("notifyUrl", ""); |
|
|
@ -105,6 +129,13 @@ public class LaKaLaWalletService { |
|
|
|
* @return |
|
|
|
* @return |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
public JSONObject ewalletBalanceQuery(String merCupNo, String payNo, String payType) { |
|
|
|
public JSONObject ewalletBalanceQuery(String merCupNo, String payNo, String payType) { |
|
|
|
|
|
|
|
// 查询平台商户号
|
|
|
|
|
|
|
|
BsMerPlatformNo merPlatform = merPlatformNoService.getPlatformNoByCupNo(merCupNo); |
|
|
|
|
|
|
|
if (merPlatform == null) { |
|
|
|
|
|
|
|
throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "未找到平台商户号"); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
BsMer mer = merService.getMer(merPlatform.getMerId()); |
|
|
|
|
|
|
|
|
|
|
|
// 请求参数
|
|
|
|
// 请求参数
|
|
|
|
Map<String, Object> param = new HashMap<>(); |
|
|
|
Map<String, Object> param = new HashMap<>(); |
|
|
|
param.put("timestamp", new Date().getTime()); |
|
|
|
param.put("timestamp", new Date().getTime()); |
|
|
@ -113,7 +144,7 @@ public class LaKaLaWalletService { |
|
|
|
param.put("reqId", new Date().getTime()); |
|
|
|
param.put("reqId", new Date().getTime()); |
|
|
|
|
|
|
|
|
|
|
|
Map<String, Object> map = new HashMap<>(); |
|
|
|
Map<String, Object> map = new HashMap<>(); |
|
|
|
map.put("orgNo", CommonSysConst.getSysConfig().getLkl_org_code()); |
|
|
|
map.put("orgNo", mer.getOrgNo()); |
|
|
|
map.put("merchantNo", merCupNo); |
|
|
|
map.put("merchantNo", merCupNo); |
|
|
|
map.put("payNo", payNo); |
|
|
|
map.put("payNo", payNo); |
|
|
|
map.put("payType", payType); |
|
|
|
map.put("payType", payType); |
|
|
@ -142,6 +173,13 @@ public class LaKaLaWalletService { |
|
|
|
* @return |
|
|
|
* @return |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
public JSONObject ewalletWithdrawQuery(String merCupNo,String drawJnl) { |
|
|
|
public JSONObject ewalletWithdrawQuery(String merCupNo,String drawJnl) { |
|
|
|
|
|
|
|
// 查询平台商户号
|
|
|
|
|
|
|
|
BsMerPlatformNo merPlatform = merPlatformNoService.getPlatformNoByCupNo(merCupNo); |
|
|
|
|
|
|
|
if (merPlatform == null) { |
|
|
|
|
|
|
|
throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "未找到平台商户号"); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
BsMer mer = merService.getMer(merPlatform.getMerId()); |
|
|
|
|
|
|
|
|
|
|
|
// 请求参数
|
|
|
|
// 请求参数
|
|
|
|
Map<String, Object> param = new HashMap<>(); |
|
|
|
Map<String, Object> param = new HashMap<>(); |
|
|
|
param.put("timestamp", new Date().getTime()); |
|
|
|
param.put("timestamp", new Date().getTime()); |
|
|
@ -150,7 +188,7 @@ public class LaKaLaWalletService { |
|
|
|
param.put("reqId", new Date().getTime()); |
|
|
|
param.put("reqId", new Date().getTime()); |
|
|
|
|
|
|
|
|
|
|
|
Map<String, Object> map = new HashMap<>(); |
|
|
|
Map<String, Object> map = new HashMap<>(); |
|
|
|
map.put("orgNo", CommonSysConst.getSysConfig().getLkl_org_code()); |
|
|
|
map.put("orgNo", mer.getOrgNo()); |
|
|
|
map.put("merchantNo", merCupNo); |
|
|
|
map.put("merchantNo", merCupNo); |
|
|
|
map.put("drawJnl", drawJnl); |
|
|
|
map.put("drawJnl", drawJnl); |
|
|
|
param.put("reqData", map); |
|
|
|
param.put("reqData", map); |
|
|
@ -180,6 +218,13 @@ public class LaKaLaWalletService { |
|
|
|
* @return |
|
|
|
* @return |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
public JSONObject ewalletSettleProfile(String merCupNo, String settleType, String settleTime) { |
|
|
|
public JSONObject ewalletSettleProfile(String merCupNo, String settleType, String settleTime) { |
|
|
|
|
|
|
|
// 查询平台商户号
|
|
|
|
|
|
|
|
BsMerPlatformNo merPlatform = merPlatformNoService.getPlatformNoByCupNo(merCupNo); |
|
|
|
|
|
|
|
if (merPlatform == null) { |
|
|
|
|
|
|
|
throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "未找到平台商户号"); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
BsMer mer = merService.getMer(merPlatform.getMerId()); |
|
|
|
|
|
|
|
|
|
|
|
// 请求参数
|
|
|
|
// 请求参数
|
|
|
|
Map<String, Object> param = new HashMap<>(); |
|
|
|
Map<String, Object> param = new HashMap<>(); |
|
|
|
param.put("timestamp", new Date().getTime()); |
|
|
|
param.put("timestamp", new Date().getTime()); |
|
|
@ -188,7 +233,7 @@ public class LaKaLaWalletService { |
|
|
|
param.put("reqId", new Date().getTime()); |
|
|
|
param.put("reqId", new Date().getTime()); |
|
|
|
|
|
|
|
|
|
|
|
Map<String, Object> map = new HashMap<>(); |
|
|
|
Map<String, Object> map = new HashMap<>(); |
|
|
|
map.put("bmcpNo", CommonSysConst.getSysConfig().getLkl_org_code()); |
|
|
|
map.put("bmcpNo", mer.getOrgNo()); |
|
|
|
map.put("mercId", merCupNo); |
|
|
|
map.put("mercId", merCupNo); |
|
|
|
map.put("settleType", settleType); |
|
|
|
map.put("settleType", settleType); |
|
|
|
map.put("settleTime", settleTime); |
|
|
|
map.put("settleTime", settleTime); |
|
|
@ -218,6 +263,13 @@ public class LaKaLaWalletService { |
|
|
|
* @return |
|
|
|
* @return |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
public JSONObject ewalletSettleQuery(String merCupNo) { |
|
|
|
public JSONObject ewalletSettleQuery(String merCupNo) { |
|
|
|
|
|
|
|
// 查询平台商户号
|
|
|
|
|
|
|
|
BsMerPlatformNo merPlatform = merPlatformNoService.getPlatformNoByCupNo(merCupNo); |
|
|
|
|
|
|
|
if (merPlatform == null) { |
|
|
|
|
|
|
|
throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "未找到平台商户号"); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
BsMer mer = merService.getMer(merPlatform.getMerId()); |
|
|
|
|
|
|
|
|
|
|
|
// 请求参数
|
|
|
|
// 请求参数
|
|
|
|
Map<String, Object> param = new HashMap<>(); |
|
|
|
Map<String, Object> param = new HashMap<>(); |
|
|
|
param.put("timestamp", new Date().getTime()); |
|
|
|
param.put("timestamp", new Date().getTime()); |
|
|
@ -226,7 +278,7 @@ public class LaKaLaWalletService { |
|
|
|
param.put("reqId", new Date().getTime()); |
|
|
|
param.put("reqId", new Date().getTime()); |
|
|
|
|
|
|
|
|
|
|
|
Map<String, Object> map = new HashMap<>(); |
|
|
|
Map<String, Object> map = new HashMap<>(); |
|
|
|
map.put("bmcpNo", CommonSysConst.getSysConfig().getLkl_org_code()); |
|
|
|
map.put("bmcpNo", mer.getOrgNo()); |
|
|
|
map.put("mercId", merCupNo); |
|
|
|
map.put("mercId", merCupNo); |
|
|
|
param.put("reqData", map); |
|
|
|
param.put("reqData", map); |
|
|
|
|
|
|
|
|
|
|
|