顺丰商家id 配置,绑定接收者方法fix bug
This commit is contained in:
parent
a388422df6
commit
3d8999d51e
@ -669,7 +669,7 @@ public class PayUserPayServiceImpl extends BaseServiceImpl<PayUserPayMapper, Pay
|
|||||||
|
|
||||||
BigDecimal shippingFee = shopService.getOrderShippingFee(out_trade_no);
|
BigDecimal shippingFee = shopService.getOrderShippingFee(out_trade_no);
|
||||||
logger.debug("预支付时,查到的订单{},运费:{}", out_trade_no, shippingFee);
|
logger.debug("预支付时,查到的订单{},运费:{}", out_trade_no, shippingFee);
|
||||||
|
|
||||||
if (shippingFee == null || shippingFee.compareTo(BigDecimal.ZERO) <= 0) {
|
if (shippingFee == null || shippingFee.compareTo(BigDecimal.ZERO) <= 0) {
|
||||||
// 没有运费
|
// 没有运费
|
||||||
// 拉卡拉预支付返回参数
|
// 拉卡拉预支付返回参数
|
||||||
@ -681,9 +681,9 @@ public class PayUserPayServiceImpl extends BaseServiceImpl<PayUserPayMapper, Pay
|
|||||||
// 拉卡拉合单预支付返回参数
|
// 拉卡拉合单预支付返回参数
|
||||||
// TODO RMK 这里只有固定一个运费代理商代收运费,以后代理商模块做好了,要动态读取店铺的运费代理商。
|
// TODO RMK 这里只有固定一个运费代理商代收运费,以后代理商模块做好了,要动态读取店铺的运费代理商。
|
||||||
lakalaRespJSON = lakalaPayService.lklTransMergePreOrder(shopStoreBase.getLkl_merchant_no(), shopStoreBase.getLkl_term_no(),
|
lakalaRespJSON = lakalaPayService.lklTransMergePreOrder(shopStoreBase.getLkl_merchant_no(), shopStoreBase.getLkl_term_no(),
|
||||||
"", "",
|
"822584059990FYP", "N5811590",
|
||||||
appId, openId, storeIdStr, out_trade_no, subject, total_amt,
|
appId, openId, storeIdStr, out_trade_no, subject, total_amt,
|
||||||
"0",
|
Convert.toStr(shippingFee.multiply(BigDecimal.valueOf(100)).intValue()),
|
||||||
notifyUrl,
|
notifyUrl,
|
||||||
requestIP, trade_remark);
|
requestIP, trade_remark);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -51,6 +51,14 @@ public interface LklLedgerMerReceiverBindService extends IBaseService<LklLedgerM
|
|||||||
*/
|
*/
|
||||||
LklLedgerMerReceiverBind getPlatformByMerCupNo(String merCupNo);
|
LklLedgerMerReceiverBind getPlatformByMerCupNo(String merCupNo);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据申请编号查询一条平台绑定记录
|
||||||
|
*
|
||||||
|
* @param applyId
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
LklLedgerMerReceiverBind getPlatformByApplyId(String applyId);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 根据商户编号查询一条代理商绑定记录
|
* 根据商户编号查询一条代理商绑定记录
|
||||||
*
|
*
|
||||||
|
|||||||
@ -477,11 +477,12 @@ public class LakalaApiServiceImpl implements LakalaApiService {
|
|||||||
ecParams.put("D9", signDate);
|
ecParams.put("D9", signDate);
|
||||||
ecParams.put("D11", signDate);
|
ecParams.put("D11", signDate);
|
||||||
ecParams.put("D12", signDate);
|
ecParams.put("D12", signDate);
|
||||||
ecParams.put("E1", platformName);
|
ecParams.put("E1", platformName + "和代理商");
|
||||||
ecParams.put("E2", "小发同城平台商户合作协议");
|
ecParams.put("E2", "小发同城平台商户合作协议");
|
||||||
ecParams.put("E3", "2");
|
ecParams.put("E3", "1");
|
||||||
ecParams.put("E5", platformName);
|
ecParams.put("E4", splitLowestRatio);
|
||||||
ecParams.put("E6", splitLowestRatio);
|
// ecParams.put("E5", platformName);
|
||||||
|
// ecParams.put("E6", splitLowestRatio);
|
||||||
ecParams.put("E7", signDate);
|
ecParams.put("E7", signDate);
|
||||||
ecParams.put("E8", shopMchEntry.getAccount_holder_name());
|
ecParams.put("E8", shopMchEntry.getAccount_holder_name());
|
||||||
|
|
||||||
@ -542,8 +543,8 @@ public class LakalaApiServiceImpl implements LakalaApiService {
|
|||||||
shopMchEntryService.updateMerchEntryEcResultUrlByMchId(mchId, ecResultUrl);
|
shopMchEntryService.updateMerchEntryEcResultUrlByMchId(mchId, ecResultUrl);
|
||||||
|
|
||||||
// 发短信给商家,及时签署合同 SMS_488465246
|
// 发短信给商家,及时签署合同 SMS_488465246
|
||||||
// 【小发同城商家】恭喜您的开店入驻申请已审核通过!请尽快登录APP平台签署电子合同,签署链接24小时内有效(逾期需重新提交申请)。如有疑问请联系客服,感谢您的支持!
|
// 【小发同城商家】恭喜您的开店入驻申请已审核通过!请尽快登录小发同城商家版APP平台签署电子合同,签署链接24小时内有效(逾期需重新提交申请)。如有疑问请联系客服,感谢您的支持!
|
||||||
shopMessageTemplateService.aliyunSmsSend(contractMobile, "SMS_489795044", null);//SMS_479760276
|
shopMessageTemplateService.aliyunSmsSend(contractMobile, "SMS_493160417", null);//SMS_479760276
|
||||||
|
|
||||||
JSONObject payload = new JSONObject();
|
JSONObject payload = new JSONObject();
|
||||||
payload.put("category", CommonConstant.PUSH_MSG_CATE_EC);
|
payload.put("category", CommonConstant.PUSH_MSG_CATE_EC);
|
||||||
@ -942,10 +943,10 @@ public class LakalaApiServiceImpl implements LakalaApiService {
|
|||||||
|
|
||||||
// 异步通知返回的数据
|
// 异步通知返回的数据
|
||||||
JSONObject paramsJSON = JSONUtil.parseObj(checkResult.getSecond());
|
JSONObject paramsJSON = JSONUtil.parseObj(checkResult.getSecond());
|
||||||
log.info("商户分账业务申请回调:paramsJSON={}", paramsJSON);
|
log.info("商户分账业务申请异步回调数据:paramsJSON={}", paramsJSON);
|
||||||
|
|
||||||
if (paramsJSON == null) {
|
if (paramsJSON == null) {
|
||||||
log.error("商户分账业务申请回调:请求参数为空");
|
log.error("商户分账业务申请异步回调:请求参数为空");
|
||||||
return JSONUtil.createObj().put("code", "FAIL").put("message", "请求参数为空");
|
return JSONUtil.createObj().put("code", "FAIL").put("message", "请求参数为空");
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -955,27 +956,29 @@ public class LakalaApiServiceImpl implements LakalaApiService {
|
|||||||
String auditStatusText = paramsJSON.getStr("auditStatusText");
|
String auditStatusText = paramsJSON.getStr("auditStatusText");
|
||||||
|
|
||||||
if (StrUtil.isBlank(applyId) || StrUtil.isBlank(auditStatus) || StrUtil.isBlank(merCupNo)) {
|
if (StrUtil.isBlank(applyId) || StrUtil.isBlank(auditStatus) || StrUtil.isBlank(merCupNo)) {
|
||||||
String errMsg = "商户分账业务申请回调:缺少必要参数(applyId/auditStatus/merCupNo)";
|
String errMsg = "商户分账业务申请异步回调:缺少必要参数(applyId/auditStatus/merCupNo)";
|
||||||
log.error(errMsg + ":applyId={}, auditStatus={}, merCupNo={}", applyId, auditStatus, merCupNo);
|
log.error(errMsg + ":applyId={}, auditStatus={}, merCupNo={}", applyId, auditStatus, merCupNo);
|
||||||
return JSONUtil.createObj().put("code", "FAIL").put("message", errMsg);
|
return JSONUtil.createObj().put("code", "FAIL").put("message", errMsg);
|
||||||
}
|
}
|
||||||
|
|
||||||
LklLedgerMember lklLedgerMember = lklLedgerMemberService.getByApplyId(applyId, CommonConstant.Enable);
|
LklLedgerMember lklLedgerMember = lklLedgerMemberService.getByApplyId(applyId, -1);
|
||||||
|
|
||||||
// 1:通过,2拒绝
|
// 1:通过,2拒绝
|
||||||
if (!auditStatus.equals("1")) {
|
if (!auditStatus.equals("1")) {
|
||||||
log.warn("商户分账业务申请回调:审核未通过,状态={}", auditStatus);
|
log.warn("商户分账业务申请异步回调:审核未通过,状态={}", auditStatus);
|
||||||
if (lklLedgerMember != null) {
|
if (lklLedgerMember != null) {
|
||||||
shopMchEntryService.updateMerchEntryApprovalByMchId(
|
shopMchEntryService.updateMerchEntryApprovalByMchId(
|
||||||
lklLedgerMember.getMch_id(), CommonConstant.MCH_APPR_STA_NOPASS, "分账业务申请被驳回:" + auditStatusText
|
lklLedgerMember.getMch_id(), CommonConstant.MCH_APPR_STA_NOPASS, "商家分账业务审核未通过:" + auditStatusText
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
return JSONUtil.createObj().put("code", "FAIL").put("message", "商户分账申请被驳回!");
|
return JSONUtil.createObj().put("code", "FAIL").put("message", "商家分账业务审核未通过!");
|
||||||
}
|
}
|
||||||
|
|
||||||
if (lklLedgerMember != null && lklLedgerMerReceiverBindService.hasBindReceiver(merCupNo)) {
|
if (lklLedgerMember != null && CommonConstant.Enable.equals(lklLedgerMember.getAudit_status())
|
||||||
log.debug("商户分账业务申请回调:已处理成功,applyId={}", applyId);
|
&& lklLedgerMerReceiverBindService.hasBindReceiver(merCupNo)) {
|
||||||
return JSONUtil.createObj().put("code", "SUCCESS").put("message", "商户分账申请已处理成功!");
|
log.debug("商户分账业务申请异步回调:已绑定过接收方,applyId={}", applyId);
|
||||||
|
// TODO 已绑定过接收方,可以往下执行更新,绑定关系
|
||||||
|
// return JSONUtil.createObj().put("code", "SUCCESS").put("message", "已绑定过接收方!");
|
||||||
}
|
}
|
||||||
|
|
||||||
String merInnerNo = paramsJSON.getStr("merInnerNo");
|
String merInnerNo = paramsJSON.getStr("merInnerNo");
|
||||||
@ -990,8 +993,8 @@ public class LakalaApiServiceImpl implements LakalaApiService {
|
|||||||
);
|
);
|
||||||
|
|
||||||
if (!updateSuccess) {
|
if (!updateSuccess) {
|
||||||
log.error("商户分账申请业务回调:更新审核结果失败,applyId={}", applyId);
|
log.error("商户分账业务申请异步回调:系统更新分账业务审核结果失败,applyId={}", applyId);
|
||||||
return JSONUtil.createObj().put("code", "FAIL").put("message", "更新审核结果失败");
|
return JSONUtil.createObj().put("code", "FAIL").put("message", "内部程序更新审核结果失败");
|
||||||
}
|
}
|
||||||
|
|
||||||
JSONObject bindParamsJSON = new JSONObject()
|
JSONObject bindParamsJSON = new JSONObject()
|
||||||
@ -1000,8 +1003,8 @@ public class LakalaApiServiceImpl implements LakalaApiService {
|
|||||||
|
|
||||||
Pair<Boolean, String> bindResult = innerApplyLedgerMerReceiverBind(bindParamsJSON);
|
Pair<Boolean, String> bindResult = innerApplyLedgerMerReceiverBind(bindParamsJSON);
|
||||||
if (!bindResult.getFirst()) {
|
if (!bindResult.getFirst()) {
|
||||||
String errMsg = "商户分账申请业务回调:预绑定接收方失败 - " + bindResult.getSecond();
|
String errMsg = "商户分账业务申请异步回调:预绑定分账接收方失败 - " + bindResult.getSecond();
|
||||||
log.error("商户{}预绑定接收方出错:{}", merCupNo, errMsg);
|
log.error("商户{}预绑定分账接收方失败:{}", merCupNo, errMsg);
|
||||||
|
|
||||||
// 更新商户审批状态
|
// 更新商户审批状态
|
||||||
if (lklLedgerMember != null) { // 防御性判断(理论上此时应为null,但保留安全检查)
|
if (lklLedgerMember != null) { // 防御性判断(理论上此时应为null,但保留安全检查)
|
||||||
@ -1024,8 +1027,8 @@ public class LakalaApiServiceImpl implements LakalaApiService {
|
|||||||
// 更新商家分账申请状态为已申请(hasApplySplit=1)
|
// 更新商家分账申请状态为已申请(hasApplySplit=1)
|
||||||
shopMchEntryService.updateMulStatus(lklLedgerMember.getMch_id(), "", merCupNo, 0, 0, 0, 1, 0, 0, CommonConstant.MCH_APPR_STA_LKL_PADDING);
|
shopMchEntryService.updateMulStatus(lklLedgerMember.getMch_id(), "", merCupNo, 0, 0, 0, 1, 0, 0, CommonConstant.MCH_APPR_STA_LKL_PADDING);
|
||||||
|
|
||||||
shopMchEntryService.updateMerchEntryApprovalByMchId(lklLedgerMember.getMch_id(), null, "分账业务开通成功");
|
shopMchEntryService.updateMerchEntryApprovalByMchId(lklLedgerMember.getMch_id(), null, "商户分账业务申请已审核通过");
|
||||||
log.debug("商户分账业务申请回调:处理成功,applyId={}", applyId);
|
log.debug("商户分账业务申请异步回调:处理成功,applyId={}", applyId);
|
||||||
return JSONUtil.createObj().put("code", "SUCCESS").put("message", "操作成功!");
|
return JSONUtil.createObj().put("code", "SUCCESS").put("message", "操作成功!");
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1200,7 +1203,7 @@ public class LakalaApiServiceImpl implements LakalaApiService {
|
|||||||
return CommonResult.failed(retPair.getSecond());
|
return CommonResult.failed(retPair.getSecond());
|
||||||
}
|
}
|
||||||
|
|
||||||
return CommonResult.success(null, "接收方绑定成功!");
|
return CommonResult.success(null, "商家绑定分账接收方成功!");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -1219,6 +1222,8 @@ public class LakalaApiServiceImpl implements LakalaApiService {
|
|||||||
* @return 操作结果及提示信息
|
* @return 操作结果及提示信息
|
||||||
*/
|
*/
|
||||||
public Pair<Boolean, String> innerApplyLedgerMerReceiverBind(JSONObject paramsJSON) {
|
public Pair<Boolean, String> innerApplyLedgerMerReceiverBind(JSONObject paramsJSON) {
|
||||||
|
log.debug("商家绑定分账接收方申请开始:{}", paramsJSON);
|
||||||
|
|
||||||
// 1. 参数校验(提前失败)
|
// 1. 参数校验(提前失败)
|
||||||
if (paramsJSON == null) {
|
if (paramsJSON == null) {
|
||||||
return Pair.of(false, I18nUtil._("绑定参数为空"));
|
return Pair.of(false, I18nUtil._("绑定参数为空"));
|
||||||
@ -1235,11 +1240,13 @@ public class LakalaApiServiceImpl implements LakalaApiService {
|
|||||||
return Pair.of(false, I18nUtil._("商户入驻记录不存在"));
|
return Pair.of(false, I18nUtil._("商户入驻记录不存在"));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 进件记录
|
||||||
LklLedgerMember lklLedgerMember = lklLedgerMemberService.getByMerCupNo(merCupNo);
|
LklLedgerMember lklLedgerMember = lklLedgerMemberService.getByMerCupNo(merCupNo);
|
||||||
if (lklLedgerMember == null || !CommonConstant.Enable.equals(lklLedgerMember.getAudit_status())) {
|
if (lklLedgerMember == null || !CommonConstant.Enable.equals(lklLedgerMember.getAudit_status())) {
|
||||||
return Pair.of(false, I18nUtil._("商家尚未申请分账业务"));
|
return Pair.of(false, I18nUtil._("商家尚未申请分账业务"));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 分账接收方列表
|
||||||
List<LklLedgerReceiver> receiverList = lklLedgerReceiverService.selectPlatformAnDistributorList();
|
List<LklLedgerReceiver> receiverList = lklLedgerReceiverService.selectPlatformAnDistributorList();
|
||||||
if (CollectionUtil.isEmpty(receiverList)) {
|
if (CollectionUtil.isEmpty(receiverList)) {
|
||||||
return Pair.of(false, I18nUtil._("分账接收方信息为空"));
|
return Pair.of(false, I18nUtil._("分账接收方信息为空"));
|
||||||
@ -1255,7 +1262,7 @@ public class LakalaApiServiceImpl implements LakalaApiService {
|
|||||||
// 给拉卡拉通知的回调地址
|
// 给拉卡拉通知的回调地址
|
||||||
String retUrl = domain + "/mobile/shop/lakala/ledger/applyLedgerMerReceiverBindNotify";
|
String retUrl = domain + "/mobile/shop/lakala/ledger/applyLedgerMerReceiverBindNotify";
|
||||||
String entrustFileName = "小发同城合作协议书.pdf";
|
String entrustFileName = "小发同城合作协议书.pdf";
|
||||||
String entrustFilePath = shopMchEntry.getLkl_ec_file_path();
|
String entrustFilePath = shopMchEntry.getLkl_ec_file_path(); // 拉卡拉的文件路径
|
||||||
|
|
||||||
int successCount = 0;
|
int successCount = 0;
|
||||||
int totalCount = receiverList.size();
|
int totalCount = receiverList.size();
|
||||||
@ -1286,7 +1293,7 @@ public class LakalaApiServiceImpl implements LakalaApiService {
|
|||||||
request.setRetUrl(retUrl);
|
request.setRetUrl(retUrl);
|
||||||
|
|
||||||
// 7. 记录请求参数
|
// 7. 记录请求参数
|
||||||
log.debug("绑定接收方参数:{}", JSONUtil.toJsonStr(request));
|
log.debug("商家绑定分账接收方参数:{}", JSONUtil.toJsonStr(request));
|
||||||
|
|
||||||
// 8. 发送请求并处理响应
|
// 8. 发送请求并处理响应
|
||||||
String responseStr = LKLSDK.httpPost(request);
|
String responseStr = LKLSDK.httpPost(request);
|
||||||
@ -1327,14 +1334,14 @@ public class LakalaApiServiceImpl implements LakalaApiService {
|
|||||||
if (successCount == 0) {
|
if (successCount == 0) {
|
||||||
if (lklLedgerMember != null) {
|
if (lklLedgerMember != null) {
|
||||||
shopMchEntryService.updateMerchEntryApprovalByMchId(
|
shopMchEntryService.updateMerchEntryApprovalByMchId(
|
||||||
lklLedgerMember.getMch_id(), CommonConstant.MCH_APPR_STA_NOPASS, "分账接收方绑定失败:"
|
lklLedgerMember.getMch_id(), CommonConstant.MCH_APPR_STA_NOPASS, "商家绑定分账接收方失败:"
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
return Pair.of(false, "分账接收方绑定失败");
|
return Pair.of(false, "商家绑定分账接收方失败");
|
||||||
} else if (successCount < totalCount) {
|
} else if (successCount < totalCount) {
|
||||||
return Pair.of(true, "分账接收方绑定,部分提交成功(" + successCount + "/" + totalCount + "),待审核中");
|
return Pair.of(true, "商家绑定分账接收方,部分提交成功(" + successCount + "/" + totalCount + "),待审核通知");
|
||||||
} else {
|
} else {
|
||||||
return Pair.of(true, "分账接收方绑定,全部提交成功,待审核中");
|
return Pair.of(true, "商家绑定分账接收方,全部提交成功,待审核通知");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1363,7 +1370,7 @@ public class LakalaApiServiceImpl implements LakalaApiService {
|
|||||||
// 2. 解析回调参数
|
// 2. 解析回调参数
|
||||||
JSONObject paramsJSON = JSONUtil.parseObj(checkResult.getSecond());
|
JSONObject paramsJSON = JSONUtil.parseObj(checkResult.getSecond());
|
||||||
|
|
||||||
log.info("##### 商家绑定接收方回调参数:{} ####", paramsJSON);
|
log.debug("##### 商家绑定接收方回调参数:{} ####", paramsJSON);
|
||||||
|
|
||||||
if (paramsJSON == null || StrUtil.isBlank(paramsJSON.getStr("applyId"))) {
|
if (paramsJSON == null || StrUtil.isBlank(paramsJSON.getStr("applyId"))) {
|
||||||
// https://o.lakala.com/#/home/document/detail?id=386 返回的数据结果有歧义,需处理
|
// https://o.lakala.com/#/home/document/detail?id=386 返回的数据结果有歧义,需处理
|
||||||
@ -1414,8 +1421,17 @@ public class LakalaApiServiceImpl implements LakalaApiService {
|
|||||||
return JSONUtil.createObj().put("code", "FAIL").put("message", "更新状态失败");
|
return JSONUtil.createObj().put("code", "FAIL").put("message", "更新状态失败");
|
||||||
}
|
}
|
||||||
|
|
||||||
// 7. 成功后更新商户绑定状态为已绑定
|
LklLedgerMerReceiverBind lklLedgerMerReceiverBind = lklLedgerMerReceiverBindService.getPlatformByApplyId(applyId);
|
||||||
shopMchEntryService.updateMulStatus(0L, "", merCupNo, 0, 0, 0, 0, 0, 1, CommonConstant.MCH_APPR_STA_PASS);
|
if (lklLedgerMerReceiverBind != null) {
|
||||||
|
// shopMchEntryService.updateMerchEntryApprovalByMchId(
|
||||||
|
// lklLedgerMerReceiverBind.getMch_id(), CommonConstant.MCH_APPR_STA_PASS, "商家绑定分账接收方成功"
|
||||||
|
// );
|
||||||
|
|
||||||
|
// 7. 成功后更新商户绑定状态为已绑定
|
||||||
|
shopMchEntryService.updateMulStatus(lklLedgerMerReceiverBind.getMch_id(), "", merCupNo, 0, 0, 0, 0, 0, 1, CommonConstant.MCH_APPR_STA_PASS);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
// 8. 检查商户绑定状态是否完成, 更改总的审核状态
|
// 8. 检查商户绑定状态是否完成, 更改总的审核状态
|
||||||
shopMchEntryService.checkMerchEntryFinished("", merCupNo);
|
shopMchEntryService.checkMerchEntryFinished("", merCupNo);
|
||||||
|
|||||||
@ -58,7 +58,9 @@ public class LklLedgerMemberServiceImpl extends BaseServiceImpl<LklLedgerMemberM
|
|||||||
}
|
}
|
||||||
QueryWrapper<LklLedgerMember> queryWrapper = new QueryWrapper<>();
|
QueryWrapper<LklLedgerMember> queryWrapper = new QueryWrapper<>();
|
||||||
queryWrapper.eq("apply_id", applyId);
|
queryWrapper.eq("apply_id", applyId);
|
||||||
queryWrapper.eq("audit_status", auditStatus);
|
if (auditStatus >= 0) {
|
||||||
|
queryWrapper.eq("audit_status", auditStatus);
|
||||||
|
}
|
||||||
return getOne(queryWrapper);
|
return getOne(queryWrapper);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -69,7 +69,7 @@ public class LklLedgerMerReceiverBindServiceImpl extends BaseServiceImpl<LklLedg
|
|||||||
.eq("receiver_no", receiverNo)
|
.eq("receiver_no", receiverNo)
|
||||||
.eq("audit_status", CommonConstant.Enable);
|
.eq("audit_status", CommonConstant.Enable);
|
||||||
|
|
||||||
return getOne(queryWrapper);
|
return findOne(queryWrapper);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -115,6 +115,24 @@ public class LklLedgerMerReceiverBindServiceImpl extends BaseServiceImpl<LklLedg
|
|||||||
return list.get(0);
|
return list.get(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据申请编号查询一条平台绑定记录
|
||||||
|
*
|
||||||
|
* @param applyId
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public LklLedgerMerReceiverBind getPlatformByApplyId(String applyId) {
|
||||||
|
if (StrUtil.isBlank(applyId)) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
QueryWrapper<LklLedgerMerReceiverBind> queryWrapper = new QueryWrapper<>();
|
||||||
|
queryWrapper.eq("apply_id", applyId).orderByAsc("id");
|
||||||
|
|
||||||
|
return findOne(queryWrapper);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 根据商户编号查询一条代理商绑定记录
|
* 根据商户编号查询一条代理商绑定记录
|
||||||
*
|
*
|
||||||
|
|||||||
@ -318,7 +318,8 @@ public class LklTkServiceImpl {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* (重要) 请求拉卡拉进件
|
* (重要) 请求拉卡拉进件,
|
||||||
|
* TODO 已经进件过了,一般不涉及更改企业(小微)的信息,可以不要重新进件了
|
||||||
* <p>
|
* <p>
|
||||||
* 参考拉卡拉给的独立文档:2、拓客SAAS商户管理接口(新).docx
|
* 参考拉卡拉给的独立文档:2、拓客SAAS商户管理接口(新).docx
|
||||||
*
|
*
|
||||||
@ -398,7 +399,7 @@ public class LklTkServiceImpl {
|
|||||||
reqJsonBody.put("accountNo", shopMchEntry.getAccount_number()); //结算人银行卡号
|
reqJsonBody.put("accountNo", shopMchEntry.getAccount_number()); //结算人银行卡号
|
||||||
reqJsonBody.put("accountName", shopMchEntry.getAccount_holder_name()); //结算人账户名称
|
reqJsonBody.put("accountName", shopMchEntry.getAccount_holder_name()); //结算人账户名称
|
||||||
reqJsonBody.put("accountIdCard", larIdCard);//结算⼈(法人或小微个人)证件号码(身份证)
|
reqJsonBody.put("accountIdCard", larIdCard);//结算⼈(法人或小微个人)证件号码(身份证)
|
||||||
|
|
||||||
String settleType = String.format("D%d", 1);
|
String settleType = String.format("D%d", 1);
|
||||||
reqJsonBody.put("settleType", settleType); //结算类型:0-秒到(不分账);1-次日结算(需要分账)
|
reqJsonBody.put("settleType", settleType); //结算类型:0-秒到(不分账);1-次日结算(需要分账)
|
||||||
// formData.put("settlementType", "AUTOMATIC"); // 结算方式:MANUAL:手动结算(结算至拉卡拉APP钱包),AUTOMATIC:自动结算到银行卡,REGULAR:定时结算(仅企业商户支持)
|
// formData.put("settlementType", "AUTOMATIC"); // 结算方式:MANUAL:手动结算(结算至拉卡拉APP钱包),AUTOMATIC:自动结算到银行卡,REGULAR:定时结算(仅企业商户支持)
|
||||||
@ -661,7 +662,7 @@ public class LklTkServiceImpl {
|
|||||||
logger.info("初始化店铺成功!mchId={}", mchId);
|
logger.info("初始化店铺成功!mchId={}", mchId);
|
||||||
}
|
}
|
||||||
|
|
||||||
// 1、(电子合同)给商家申请分账功能使用;务必检查是否申请过?申请过忽略
|
// 1、(电子合同)给商家申请分账业务;务必检查是否申请过?申请过忽略
|
||||||
Pair<Boolean, String> retPair = lakalaApiService.innerApplyLedgerMer(merCupNo);
|
Pair<Boolean, String> retPair = lakalaApiService.innerApplyLedgerMer(merCupNo);
|
||||||
|
|
||||||
// 2:新增一个接收方记录,起码要一个平台方,代理商根据入驻信息新增
|
// 2:新增一个接收方记录,起码要一个平台方,代理商根据入驻信息新增
|
||||||
@ -669,7 +670,7 @@ public class LklTkServiceImpl {
|
|||||||
|
|
||||||
// 统一处理分账申请结果
|
// 统一处理分账申请结果
|
||||||
if (retPair.getFirst() && genSuccess) {
|
if (retPair.getFirst() && genSuccess) {
|
||||||
shopMchEntryService.updateMerchEntryApprovalByMchId(shopMchEntry.getId(), CommonConstant.MCH_APPR_STA_LKL_PADDING, "成功申请分账功能");
|
shopMchEntryService.updateMerchEntryApprovalByMchId(shopMchEntry.getId(), CommonConstant.MCH_APPR_STA_LKL_PADDING, "已向拉卡拉提交分账业务申请");
|
||||||
return new JSONObject().put("code", "200").put("message", "处理成功");
|
return new JSONObject().put("code", "200").put("message", "处理成功");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -1572,10 +1572,14 @@ public class ShopMchEntryServiceImpl extends BaseServiceImpl<ShopMchEntryMapper,
|
|||||||
// 2. 构建 UpdateWrapper 对象,用于构建更新条件
|
// 2. 构建 UpdateWrapper 对象,用于构建更新条件
|
||||||
UpdateWrapper<ShopMchEntry> updateWrapper = new UpdateWrapper<>();
|
UpdateWrapper<ShopMchEntry> updateWrapper = new UpdateWrapper<>();
|
||||||
|
|
||||||
// 3. 设置查询条件:优先使用商户手机号,如果为空则使用商户号
|
// 3. 设置查询条件:优先 mchId
|
||||||
if (CheckUtil.isEmpty(mchId)) {
|
// if (CheckUtil.isEmpty(mchId)) {
|
||||||
updateWrapper.eq("id", mchId);
|
// updateWrapper.eq("id", mchId);
|
||||||
}
|
// }
|
||||||
|
|
||||||
|
Optional.ofNullable(mchId)
|
||||||
|
.filter(CheckUtil::isNotEmpty)
|
||||||
|
.ifPresent(id -> updateWrapper.eq("id", id));
|
||||||
|
|
||||||
Optional.ofNullable(merchantMobile)
|
Optional.ofNullable(merchantMobile)
|
||||||
.filter(StrUtil::isNotBlank)
|
.filter(StrUtil::isNotBlank)
|
||||||
|
|||||||
@ -139,7 +139,8 @@ feieyun:
|
|||||||
sf-express:
|
sf-express:
|
||||||
# 顺丰同城 api 接口配置
|
# 顺丰同城 api 接口配置
|
||||||
appid: 1711573316
|
appid: 1711573316
|
||||||
supplier_id: 0
|
# 桂平顺丰平台商家id
|
||||||
|
supplier_id: 2273453450129
|
||||||
appkey: cd57608baa9c00fe1cda5f652b14240d
|
appkey: cd57608baa9c00fe1cda5f652b14240d
|
||||||
dev_id: 1711573316
|
dev_id: 1711573316
|
||||||
enable: 2
|
enable: 2
|
||||||
|
|||||||
@ -139,7 +139,8 @@ feieyun:
|
|||||||
sf-express:
|
sf-express:
|
||||||
# 顺丰同城 api 接口配置
|
# 顺丰同城 api 接口配置
|
||||||
appid: 1711573316
|
appid: 1711573316
|
||||||
supplier_id: 2280784732353
|
# 桂平顺丰平台商家id
|
||||||
|
supplier_id: 2273453450129
|
||||||
appkey: cd57608baa9c00fe1cda5f652b14240d
|
appkey: cd57608baa9c00fe1cda5f652b14240d
|
||||||
dev_id: 1711573316
|
dev_id: 1711573316
|
||||||
enable: 2
|
enable: 2
|
||||||
|
|||||||
@ -145,7 +145,8 @@ feieyun:
|
|||||||
sf-express:
|
sf-express:
|
||||||
# 顺丰同城 api 接口配置
|
# 顺丰同城 api 接口配置
|
||||||
dev_id: 1711573316
|
dev_id: 1711573316
|
||||||
supplier_id: 2280784732353
|
# 桂平顺丰平台商家id
|
||||||
|
supplier_id: 2273453450129
|
||||||
appid: 1711573316
|
appid: 1711573316
|
||||||
appkey: cd57608baa9c00fe1cda5f652b14240d
|
appkey: cd57608baa9c00fe1cda5f652b14240d
|
||||||
# dev_id: 1715091463
|
# dev_id: 1715091463
|
||||||
|
|||||||
@ -143,7 +143,8 @@ feieyun:
|
|||||||
sf-express:
|
sf-express:
|
||||||
# 顺丰同城 api 接口配置
|
# 顺丰同城 api 接口配置
|
||||||
appid: 1711573316
|
appid: 1711573316
|
||||||
supplier_id: 2280784732353
|
# 桂平顺丰平台商家id
|
||||||
|
supplier_id: 2273453450129
|
||||||
appkey: cd57608baa9c00fe1cda5f652b14240d
|
appkey: cd57608baa9c00fe1cda5f652b14240d
|
||||||
dev_id: 1711573316
|
dev_id: 1711573316
|
||||||
enable: 2
|
enable: 2
|
||||||
|
|||||||
@ -143,7 +143,8 @@ feieyun:
|
|||||||
sf-express:
|
sf-express:
|
||||||
# 顺丰同城 api 接口配置
|
# 顺丰同城 api 接口配置
|
||||||
appid: 1711573316
|
appid: 1711573316
|
||||||
supplier_id: 2280784732353
|
# 桂平顺丰平台商家id
|
||||||
|
supplier_id: 2273453450129
|
||||||
appkey: cd57608baa9c00fe1cda5f652b14240d
|
appkey: cd57608baa9c00fe1cda5f652b14240d
|
||||||
dev_id: 1711573316
|
dev_id: 1711573316
|
||||||
enable: 2
|
enable: 2
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user