修复 拉卡拉 分账接口bug
This commit is contained in:
parent
ce558afe78
commit
f335937d3e
@ -210,6 +210,9 @@ public class ShopMerchEntry implements Serializable {
|
||||
@ApiModelProperty(value = "商家的代理商ID")
|
||||
private Long distributor_id;
|
||||
|
||||
@ApiModelProperty(value = "拉卡拉银联商户号(唯一)")
|
||||
private String lkl_mer_cup_no;
|
||||
|
||||
@ApiModelProperty(value = "合同签署状态:0-无任何签署;1-一方签署;2-双方已签署;")
|
||||
private Integer signed_status;
|
||||
|
||||
|
||||
@ -6,7 +6,7 @@
|
||||
* Vestibulum commodo. Ut rhoncus gravida arcu.
|
||||
*/
|
||||
|
||||
package com.suisung.mall.shop.lakala.controller;
|
||||
package com.suisung.mall.shop.lakala.controller.admin;
|
||||
|
||||
import com.suisung.mall.common.service.impl.BaseControllerImpl;
|
||||
import com.suisung.mall.shop.lakala.service.impl.LklTkServiceImpl;
|
||||
@ -21,7 +21,7 @@ import javax.annotation.Resource;
|
||||
@Api(tags = "拉卡拉商户进件控制器")
|
||||
@RestController
|
||||
@RequestMapping("/admin/shop/lakala/tk")
|
||||
public class LklTkController extends BaseControllerImpl {
|
||||
public class LklTkAdminController extends BaseControllerImpl {
|
||||
|
||||
@Resource
|
||||
private LklTkServiceImpl lklTkService;
|
||||
@ -6,7 +6,7 @@
|
||||
* Vestibulum commodo. Ut rhoncus gravida arcu.
|
||||
*/
|
||||
|
||||
package com.suisung.mall.shop.lakala.controller;
|
||||
package com.suisung.mall.shop.lakala.controller.mobile;
|
||||
|
||||
import cn.hutool.json.JSONObject;
|
||||
import com.suisung.mall.common.api.CommonResult;
|
||||
@ -0,0 +1,40 @@
|
||||
/*
|
||||
* Copyright (c) 2025. Lorem ipsum dolor sit amet, consectetur adipiscing elit.
|
||||
* Morbi non lorem porttitor neque feugiat blandit. Ut vitae ipsum eget quam lacinia accumsan.
|
||||
* Etiam sed turpis ac ipsum condimentum fringilla. Maecenas magna.
|
||||
* Proin dapibus sapien vel ante. Aliquam erat volutpat. Pellentesque sagittis ligula eget metus.
|
||||
* Vestibulum commodo. Ut rhoncus gravida arcu.
|
||||
*/
|
||||
|
||||
package com.suisung.mall.shop.lakala.controller.mobile;
|
||||
|
||||
import cn.hutool.json.JSONObject;
|
||||
import com.suisung.mall.common.service.impl.BaseControllerImpl;
|
||||
import com.suisung.mall.shop.lakala.service.impl.LklTkServiceImpl;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMethod;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
|
||||
@Api(tags = "拉卡拉商户进件控制器")
|
||||
@RestController
|
||||
@RequestMapping("/mobile/shop/lakala/tk")
|
||||
public class LklTkController extends BaseControllerImpl {
|
||||
|
||||
@Resource
|
||||
private LklTkServiceImpl lklTkService;
|
||||
|
||||
|
||||
// https://mall.gpxscs.cn/api/mobile/shop/lakala/ledger/applyLedgerMerReceiverBindNotify
|
||||
@ApiOperation(value = "拉卡拉进件申请异步回调通知", notes = "拉卡拉进件申请异步回调通知")
|
||||
@RequestMapping(value = "/registrationMerchantNotify", method = {RequestMethod.POST, RequestMethod.GET})
|
||||
public JSONObject registrationMerchantNotify(HttpServletRequest request) {
|
||||
return lklTkService.registrationMerchantNotify(request);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@ -20,6 +20,7 @@ import com.suisung.mall.common.utils.RestTemplateHttpUtil;
|
||||
import com.suisung.mall.common.utils.StringUtils;
|
||||
import com.suisung.mall.common.utils.UploadUtil;
|
||||
import com.suisung.mall.core.web.service.RedisService;
|
||||
import com.suisung.mall.shop.lakala.utils.LakalaUtil;
|
||||
import com.suisung.mall.shop.store.service.ShopMerchEntryService;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
@ -31,6 +32,7 @@ import org.springframework.http.ResponseEntity;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import java.io.File;
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
@ -201,20 +203,20 @@ public class LklTkServiceImpl {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// TODO 咨询清楚
|
||||
JSONObject bizContent = new JSONObject();
|
||||
bizContent.put("activityId", 687);
|
||||
bizContent.put("termNum", "1");
|
||||
bizContent.put("mcc", "1");
|
||||
bizContent.put("mcc", "12015"); // 超市的 code
|
||||
bizContent.put("fees", new JSONArray() {{
|
||||
put(new JSONObject() {{
|
||||
put("feeCode", "WECHAT");
|
||||
put("feeValue", 0.38);
|
||||
put("feeValue", 0.20);
|
||||
}});
|
||||
}});
|
||||
|
||||
formData.put("bizContent", bizContent);
|
||||
|
||||
// 附件文件
|
||||
JSONArray attachments = new JSONArray();
|
||||
JSONObject ID_CARD_FRONT = updatePhoto(shopMerchEntry.getIndividual_id_images(), "ID_CARD_FRONT", true);
|
||||
if (ID_CARD_FRONT != null) {
|
||||
@ -255,7 +257,6 @@ public class LklTkServiceImpl {
|
||||
if (BANK_CARD != null) {
|
||||
attachments.put(BANK_CARD); // 银行卡图片
|
||||
}
|
||||
|
||||
formData.put("attchments", attachments);
|
||||
|
||||
|
||||
@ -277,10 +278,26 @@ public class LklTkServiceImpl {
|
||||
|
||||
|
||||
// TODO 新增 lkl_ledger_member 数据, 等待异步审核通知,更改状态
|
||||
String merchantNo = response.getBody().getStr("merchantNo"); //拉卡拉内部商户号
|
||||
// String merchantNo = response.getBody().getStr("merchantNo"); //拉卡拉内部商户号
|
||||
return Pair.of(true, "进件成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 拉卡拉进件异步通知
|
||||
*
|
||||
* @param request
|
||||
* @return
|
||||
*/
|
||||
public JSONObject registrationMerchantNotify(HttpServletRequest request) {
|
||||
log.debug("拉卡拉进件异步通知开始");
|
||||
// 验签
|
||||
String authorization = request.getHeader("Authorization");
|
||||
String requestBody = LakalaUtil.getBody(request);
|
||||
log.debug("分账绑定关系申请业务回调返回参数:{}", requestBody);
|
||||
|
||||
return new JSONObject().put("body", requestBody);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取拉卡拉省市区编码
|
||||
*
|
||||
|
||||
@ -127,6 +127,15 @@ public interface ShopMerchEntryService {
|
||||
*/
|
||||
Boolean updateMerchEntryStoreStatus(String loginMobile, Integer storeStatus);
|
||||
|
||||
/**
|
||||
* 更新商家入驻申请的拉卡拉商户号
|
||||
*
|
||||
* @param loginMobile
|
||||
* @param lklMerCupNo
|
||||
* @return
|
||||
*/
|
||||
Boolean updateMerchEntryLklMerCupNo(String loginMobile, String lklMerCupNo);
|
||||
|
||||
/**
|
||||
* 更新商家入驻申请的店铺 ID
|
||||
*
|
||||
|
||||
@ -678,7 +678,7 @@ public class ShopMerchEntryServiceImpl extends BaseServiceImpl<ShopMerchEntryMap
|
||||
@Override
|
||||
public Boolean updateMerchEntryStoreStatus(String loginMobile, Integer storeStatus) {
|
||||
if (StrUtil.isBlank(loginMobile) && ObjectUtil.isEmpty(storeStatus)) {
|
||||
return null;
|
||||
return false;
|
||||
}
|
||||
|
||||
UpdateWrapper<ShopMerchEntry> updateWrapper = new UpdateWrapper<>();
|
||||
@ -686,6 +686,17 @@ public class ShopMerchEntryServiceImpl extends BaseServiceImpl<ShopMerchEntryMap
|
||||
return update(updateWrapper);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Boolean updateMerchEntryLklMerCupNo(String loginMobile, String lklMerCupNo) {
|
||||
if (StrUtil.isBlank(loginMobile) && StrUtil.isBlank(lklMerCupNo)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
UpdateWrapper<ShopMerchEntry> updateWrapper = new UpdateWrapper<>();
|
||||
updateWrapper.eq("login_mobile", loginMobile).set("lkl_mer_cup_no", lklMerCupNo);
|
||||
return update(updateWrapper);
|
||||
}
|
||||
|
||||
/**
|
||||
* 更新商家入驻申请的店铺 ID
|
||||
*
|
||||
|
||||
Loading…
Reference in New Issue
Block a user