修复 拉卡拉 分账接口bug, 商家订单列表 修复
This commit is contained in:
parent
f335937d3e
commit
17778c2e1c
@ -44,6 +44,7 @@ public class LklLedgerMember implements Serializable {
|
|||||||
private String apply_id;
|
private String apply_id;
|
||||||
private Integer audit_status;
|
private Integer audit_status;
|
||||||
private String audit_status_text;
|
private String audit_status_text;
|
||||||
|
private String audit_resp;
|
||||||
private String remark;
|
private String remark;
|
||||||
private Long mch_id;
|
private Long mch_id;
|
||||||
private String version;
|
private String version;
|
||||||
|
|||||||
@ -213,6 +213,15 @@ public class ShopMerchEntry implements Serializable {
|
|||||||
@ApiModelProperty(value = "拉卡拉银联商户号(唯一)")
|
@ApiModelProperty(value = "拉卡拉银联商户号(唯一)")
|
||||||
private String lkl_mer_cup_no;
|
private String lkl_mer_cup_no;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "拉卡拉审核状态:1-已通过;2-未通过")
|
||||||
|
private Integer lkl_tk_audit_status;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "拉卡拉进件请求参数")
|
||||||
|
private String lkl_tk_reg_params;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "拉卡拉进件成功返回的JSON数据")
|
||||||
|
private String lkl_tk_reg_resp;
|
||||||
|
|
||||||
@ApiModelProperty(value = "合同签署状态:0-无任何签署;1-一方签署;2-双方已签署;")
|
@ApiModelProperty(value = "合同签署状态:0-无任何签署;1-一方签署;2-双方已签署;")
|
||||||
private Integer signed_status;
|
private Integer signed_status;
|
||||||
|
|
||||||
|
|||||||
@ -91,6 +91,22 @@ public class RestTemplateHttpUtil {
|
|||||||
return response.getBody();
|
return response.getBody();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static <T> ResponseEntity<T> sendPostBodyBackEntity(String url, JSONObject headers, JSONObject requestBody, Class<T> responseType) {
|
||||||
|
HttpHeaders httpHeaders = new HttpHeaders();
|
||||||
|
httpHeaders.setContentType(MediaType.MULTIPART_FORM_DATA);
|
||||||
|
if (headers != null) {
|
||||||
|
for (Map.Entry<String, Object> entry : headers.entrySet()) {
|
||||||
|
httpHeaders.add(entry.getKey(), (String) entry.getValue());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
httpHeaders.setContentType(MediaType.APPLICATION_JSON);
|
||||||
|
HttpEntity<Object> entity = new HttpEntity<>(requestBody, httpHeaders);
|
||||||
|
|
||||||
|
ResponseEntity<T> response = restTemplate.postForEntity(url, entity, responseType);
|
||||||
|
return response;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 发送带 header 的 POST form-data 请求
|
* 发送带 header 的 POST form-data 请求
|
||||||
*
|
*
|
||||||
|
|||||||
@ -361,6 +361,7 @@
|
|||||||
<include>**/*.pem</include>
|
<include>**/*.pem</include>
|
||||||
<include>**/*.p12</include>
|
<include>**/*.p12</include>
|
||||||
<include>**/*.cer</include>
|
<include>**/*.cer</include>
|
||||||
|
<include>**/*.txt</include>
|
||||||
</includes>
|
</includes>
|
||||||
</resource>
|
</resource>
|
||||||
</resources>
|
</resources>
|
||||||
@ -389,6 +390,7 @@
|
|||||||
<nonFilteredFileExtension>cer</nonFilteredFileExtension>
|
<nonFilteredFileExtension>cer</nonFilteredFileExtension>
|
||||||
<nonFilteredFileExtension>pem</nonFilteredFileExtension>
|
<nonFilteredFileExtension>pem</nonFilteredFileExtension>
|
||||||
<nonFilteredFileExtension>pfx</nonFilteredFileExtension>
|
<nonFilteredFileExtension>pfx</nonFilteredFileExtension>
|
||||||
|
<nonFilteredFileExtension>txt</nonFilteredFileExtension>
|
||||||
</nonFilteredFileExtensions>
|
</nonFilteredFileExtensions>
|
||||||
</configuration>
|
</configuration>
|
||||||
</plugin>
|
</plugin>
|
||||||
|
|||||||
@ -37,7 +37,6 @@ public class LakalaController extends BaseControllerImpl {
|
|||||||
return str;
|
return str;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ApiOperation(value = "获取银行卡的 BIN 信息", notes = "获取银行卡的 BIN 信息")
|
@ApiOperation(value = "获取银行卡的 BIN 信息", notes = "获取银行卡的 BIN 信息")
|
||||||
@RequestMapping(value = "/bankCardBin", method = RequestMethod.POST)
|
@RequestMapping(value = "/bankCardBin", method = RequestMethod.POST)
|
||||||
public JSONObject bankCardBin(@RequestBody JSONObject paramsJSON) {
|
public JSONObject bankCardBin(@RequestBody JSONObject paramsJSON) {
|
||||||
|
|||||||
@ -13,6 +13,8 @@ import com.suisung.mall.common.service.impl.BaseControllerImpl;
|
|||||||
import com.suisung.mall.shop.lakala.service.impl.LklTkServiceImpl;
|
import com.suisung.mall.shop.lakala.service.impl.LklTkServiceImpl;
|
||||||
import io.swagger.annotations.Api;
|
import io.swagger.annotations.Api;
|
||||||
import io.swagger.annotations.ApiOperation;
|
import io.swagger.annotations.ApiOperation;
|
||||||
|
import org.springframework.http.HttpStatus;
|
||||||
|
import org.springframework.http.ResponseEntity;
|
||||||
import org.springframework.web.bind.annotation.RequestMapping;
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
import org.springframework.web.bind.annotation.RequestMethod;
|
import org.springframework.web.bind.annotation.RequestMethod;
|
||||||
import org.springframework.web.bind.annotation.RestController;
|
import org.springframework.web.bind.annotation.RestController;
|
||||||
@ -32,8 +34,19 @@ public class LklTkController extends BaseControllerImpl {
|
|||||||
// https://mall.gpxscs.cn/api/mobile/shop/lakala/ledger/applyLedgerMerReceiverBindNotify
|
// https://mall.gpxscs.cn/api/mobile/shop/lakala/ledger/applyLedgerMerReceiverBindNotify
|
||||||
@ApiOperation(value = "拉卡拉进件申请异步回调通知", notes = "拉卡拉进件申请异步回调通知")
|
@ApiOperation(value = "拉卡拉进件申请异步回调通知", notes = "拉卡拉进件申请异步回调通知")
|
||||||
@RequestMapping(value = "/registrationMerchantNotify", method = {RequestMethod.POST, RequestMethod.GET})
|
@RequestMapping(value = "/registrationMerchantNotify", method = {RequestMethod.POST, RequestMethod.GET})
|
||||||
public JSONObject registrationMerchantNotify(HttpServletRequest request) {
|
public ResponseEntity<JSONObject> registrationMerchantNotify(HttpServletRequest request) {
|
||||||
return lklTkService.registrationMerchantNotify(request);
|
JSONObject resp = lklTkService.registrationMerchantNotify(request);
|
||||||
|
if (resp != null && resp.get("code").equals("200")) {
|
||||||
|
return new ResponseEntity<>(resp, HttpStatus.OK);
|
||||||
|
}
|
||||||
|
|
||||||
|
return new ResponseEntity<>(resp, HttpStatus.INTERNAL_SERVER_ERROR);
|
||||||
|
}
|
||||||
|
|
||||||
|
@ApiOperation(value = "上传文件", notes = "上传文件")
|
||||||
|
@RequestMapping(value = "/uploadWithOCR", method = {RequestMethod.POST, RequestMethod.GET})
|
||||||
|
public JSONObject uploadWithOCR(String fileURL) {
|
||||||
|
return lklTkService.uploadFileWithOcr("", fileURL, "ID_CARD_FRONT");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -439,7 +439,9 @@ public class LakalaApiServiceImpl implements LakalaApiService {
|
|||||||
req.setMerInnerNo(paramsJSON.getStr("merInnerNo"));
|
req.setMerInnerNo(paramsJSON.getStr("merInnerNo"));
|
||||||
req.setMerCupNo(paramsJSON.getStr("merCupNo"));
|
req.setMerCupNo(paramsJSON.getStr("merCupNo"));
|
||||||
req.setContactMobile(paramsJSON.getStr("contactMobile"));
|
req.setContactMobile(paramsJSON.getStr("contactMobile"));
|
||||||
req.setSplitLowestRatio(new BigDecimal(paramsJSON.getStr("splitLowestRatio")));
|
// 分账比例为了考虑低价订单的运费占比高,分账比例暂时定70%分账给商户,30%分账给平台
|
||||||
|
// new BigDecimal(paramsJSON.getStr("splitLowestRatio"))
|
||||||
|
req.setSplitLowestRatio(BigDecimal.valueOf(70));
|
||||||
String fileName = paramsJSON.getStr("splitEntrustFileName");
|
String fileName = paramsJSON.getStr("splitEntrustFileName");
|
||||||
req.setSplitEntrustFileName(fileName);
|
req.setSplitEntrustFileName(fileName);
|
||||||
|
|
||||||
|
|||||||
@ -32,8 +32,14 @@ import org.springframework.http.ResponseEntity;
|
|||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
import javax.annotation.Resource;
|
import javax.annotation.Resource;
|
||||||
|
import javax.crypto.Cipher;
|
||||||
import javax.servlet.http.HttpServletRequest;
|
import javax.servlet.http.HttpServletRequest;
|
||||||
|
import java.io.ByteArrayOutputStream;
|
||||||
import java.io.File;
|
import java.io.File;
|
||||||
|
import java.security.KeyFactory;
|
||||||
|
import java.security.PublicKey;
|
||||||
|
import java.security.spec.X509EncodedKeySpec;
|
||||||
|
import java.util.Base64;
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
@ -56,6 +62,9 @@ public class LklTkServiceImpl {
|
|||||||
@Value("${lakala.org_code}")
|
@Value("${lakala.org_code}")
|
||||||
private String orgCode;
|
private String orgCode;
|
||||||
|
|
||||||
|
@Value("${lakala.tk.notify_pub_key_path}")
|
||||||
|
private String notifyPubKeyPath;
|
||||||
|
|
||||||
@Value("${spring.profiles.active}")
|
@Value("${spring.profiles.active}")
|
||||||
private String profile;
|
private String profile;
|
||||||
|
|
||||||
@ -65,6 +74,41 @@ public class LklTkServiceImpl {
|
|||||||
@Autowired
|
@Autowired
|
||||||
private RedisService redisService;
|
private RedisService redisService;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 拉卡拉异步通知数据公钥解密
|
||||||
|
*
|
||||||
|
* @param pubKey Base64公钥
|
||||||
|
* @param data Base64数据
|
||||||
|
* @return 解密字符串
|
||||||
|
*/
|
||||||
|
public String decryptNotifyData(String pubKey, String data) {
|
||||||
|
try {
|
||||||
|
Base64.Decoder decoder = Base64.getDecoder();
|
||||||
|
byte[] keyBytes = decoder.decode(pubKey.getBytes());
|
||||||
|
byte[] dataBytes = decoder.decode(data.getBytes());
|
||||||
|
Cipher cipher = Cipher.getInstance("RSA");
|
||||||
|
PublicKey publicKey = KeyFactory.getInstance("RSA").generatePublic(new X509EncodedKeySpec(keyBytes));
|
||||||
|
cipher.init(Cipher.DECRYPT_MODE, publicKey);
|
||||||
|
ByteArrayOutputStream out = new ByteArrayOutputStream();
|
||||||
|
byte[] cache;
|
||||||
|
for (int i = 0, offset = 0, length = dataBytes.length; length - offset > 0; i++, offset = i * 128) {
|
||||||
|
if (length - offset > 128) {
|
||||||
|
cache = cipher.doFinal(dataBytes, offset, 128);
|
||||||
|
} else {
|
||||||
|
cache = cipher.doFinal(dataBytes, offset, length - offset);
|
||||||
|
}
|
||||||
|
out.write(cache, 0, cache.length);
|
||||||
|
}
|
||||||
|
return out.toString();
|
||||||
|
} catch (IllegalArgumentException e) {
|
||||||
|
System.err.println("Base64 解码时出现非法参数异常: " + e.getMessage());
|
||||||
|
} catch (Exception e) {
|
||||||
|
// 捕获其他可能的异常,如 NoSuchAlgorithmException、NoSuchPaddingException、InvalidKeySpecException、InvalidKeyException、BadPaddingException 等
|
||||||
|
System.err.println("解密过程中出现异常: " + e.getMessage());
|
||||||
|
}
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
protected String buildLklTkUrl(String urlPath) {
|
protected String buildLklTkUrl(String urlPath) {
|
||||||
return tkServerUrl + urlPath;
|
return tkServerUrl + urlPath;
|
||||||
}
|
}
|
||||||
@ -77,6 +121,40 @@ public class LklTkServiceImpl {
|
|||||||
return "prod".equalsIgnoreCase(profile);
|
return "prod".equalsIgnoreCase(profile);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public JSONObject uploadFileWithOcr(String fileBase64, String fileURL, String imgType) {
|
||||||
|
String authorization = getLklTkAuthorization();
|
||||||
|
if (StrUtil.isBlank(authorization)) {
|
||||||
|
return JSONUtil.createObj().set("code", 500).set("msg", "获取拉卡拉token失败");
|
||||||
|
}
|
||||||
|
|
||||||
|
JSONObject header = new JSONObject();
|
||||||
|
header.put("Authorization", authorization);
|
||||||
|
|
||||||
|
String urlPath = "/sit/htkregistration/file/upload";
|
||||||
|
if (isProd()) {
|
||||||
|
urlPath = "/registration/file/upload";
|
||||||
|
}
|
||||||
|
|
||||||
|
if (StrUtil.isBlank(fileBase64)) {
|
||||||
|
fileBase64 = UploadUtil.URLFileToBase64(fileURL);
|
||||||
|
}
|
||||||
|
|
||||||
|
JSONObject requestBody = new JSONObject();
|
||||||
|
requestBody.put("fileBase64", fileBase64);
|
||||||
|
// requestBody.put("file", fileBase64);
|
||||||
|
requestBody.put("imgType", imgType);
|
||||||
|
requestBody.put("sourcechnl", "0");
|
||||||
|
requestBody.put("isOcr", "true");
|
||||||
|
|
||||||
|
|
||||||
|
ResponseEntity<JSONObject> response = RestTemplateHttpUtil.sendPostBodyBackEntity("https://htkactvi.lakala.com/registration/file/upload", header, requestBody, JSONObject.class);
|
||||||
|
if (ObjectUtil.isEmpty(response) || response.getStatusCode() != HttpStatus.OK || response.getBody() == null) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
return response.getBody();
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 请求获取token(商户进件)
|
* 请求获取token(商户进件)
|
||||||
*
|
*
|
||||||
@ -94,7 +172,7 @@ public class LklTkServiceImpl {
|
|||||||
formData.put("client_id", clientId);
|
formData.put("client_id", clientId);
|
||||||
formData.put("client_secret", clientSecret);
|
formData.put("client_secret", clientSecret);
|
||||||
|
|
||||||
String response = RestTemplateHttpUtil.sendPostFormData(buildLklTkUrl("/oauth/token"), null, formData, String.class);
|
String response = RestTemplateHttpUtil.sendPostFormData(buildLklTkUrl("/sit/htkauth/oauth/token"), null, formData, String.class);
|
||||||
if (ObjectUtil.isEmpty(response)) {
|
if (ObjectUtil.isEmpty(response)) {
|
||||||
return "";
|
return "";
|
||||||
}
|
}
|
||||||
@ -133,7 +211,7 @@ public class LklTkServiceImpl {
|
|||||||
|
|
||||||
JSONObject formData = new JSONObject();
|
JSONObject formData = new JSONObject();
|
||||||
formData.put("userNo", "29153396");
|
formData.put("userNo", "29153396");
|
||||||
formData.put("email", mchMobile + "@163.com");
|
formData.put("email", shopMerchEntry.getEmail());
|
||||||
formData.put("busiCode", "B2B_SYT");
|
formData.put("busiCode", "B2B_SYT");
|
||||||
formData.put("merRegName", shopMerchEntry.getStore_name());
|
formData.put("merRegName", shopMerchEntry.getStore_name());
|
||||||
|
|
||||||
@ -156,7 +234,7 @@ public class LklTkServiceImpl {
|
|||||||
formData.put("source", "H5");
|
formData.put("source", "H5");
|
||||||
|
|
||||||
|
|
||||||
formData.put("larIdType", "01");
|
formData.put("larIdType", "01"); // 01 身份证 ,02 护照,03 港澳通行证,04 台胞证,10 外国人永久居留身份证,11 港妨澳居民居住证,12 台湾居民居住证,13 执行事务合伙人,99 其它证件
|
||||||
String larName = isQy ? shopMerchEntry.getLegal_person_name() : shopMerchEntry.getContact_name();
|
String larName = isQy ? shopMerchEntry.getLegal_person_name() : shopMerchEntry.getContact_name();
|
||||||
String larIdCard = isQy ? shopMerchEntry.getLegal_person_id_number() : shopMerchEntry.getIndividual_id_number();
|
String larIdCard = isQy ? shopMerchEntry.getLegal_person_id_number() : shopMerchEntry.getIndividual_id_number();
|
||||||
String larIdCardStart = isQy ? shopMerchEntry.getLegal_person_id_period_begin() : shopMerchEntry.getIndividual_id_period_begin();
|
String larIdCardStart = isQy ? shopMerchEntry.getLegal_person_id_period_begin() : shopMerchEntry.getIndividual_id_period_begin();
|
||||||
@ -277,9 +355,11 @@ public class LklTkServiceImpl {
|
|||||||
// 根据入驻商家的代理商或平台方,顺便新增一个接收方记录
|
// 根据入驻商家的代理商或平台方,顺便新增一个接收方记录
|
||||||
|
|
||||||
|
|
||||||
// TODO 新增 lkl_ledger_member 数据, 等待异步审核通知,更改状态
|
// 更改入驻记录的拉卡拉内部商户号和进件请求参数
|
||||||
// String merchantNo = response.getBody().getStr("merchantNo"); //拉卡拉内部商户号
|
String merchantNo = response.getBody().getStr("merchantNo"); //拉卡拉内部商户号
|
||||||
return Pair.of(true, "进件成功!");
|
shopMerchEntryService.updateMerchEntryLklMerCupNo(mchMobile, CommonConstant.Disable2, merchantNo, formData.toString());
|
||||||
|
|
||||||
|
return Pair.of(true, "提交成功待审核!");
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -290,12 +370,37 @@ public class LklTkServiceImpl {
|
|||||||
*/
|
*/
|
||||||
public JSONObject registrationMerchantNotify(HttpServletRequest request) {
|
public JSONObject registrationMerchantNotify(HttpServletRequest request) {
|
||||||
log.debug("拉卡拉进件异步通知开始");
|
log.debug("拉卡拉进件异步通知开始");
|
||||||
// 验签
|
JSONObject respData = new JSONObject();
|
||||||
String authorization = request.getHeader("Authorization");
|
|
||||||
String requestBody = LakalaUtil.getBody(request);
|
|
||||||
log.debug("分账绑定关系申请业务回调返回参数:{}", requestBody);
|
|
||||||
|
|
||||||
return new JSONObject().put("body", requestBody);
|
// 解密请求参数
|
||||||
|
String requestBody = LakalaUtil.getBody(request);
|
||||||
|
log.debug("拉卡拉进件异步通知返回参数:{}", requestBody);
|
||||||
|
if (StrUtil.isBlank(requestBody)) {
|
||||||
|
return new JSONObject().set("code", "500").set("message", "返回参数为空");
|
||||||
|
}
|
||||||
|
|
||||||
|
JSONObject reqBodyJSON = JSONUtil.parseObj(requestBody);
|
||||||
|
if (reqBodyJSON.isEmpty() || reqBodyJSON.get("data") == null) {
|
||||||
|
return new JSONObject().set("code", "500").set("message", "参数格式有误");
|
||||||
|
}
|
||||||
|
|
||||||
|
// 公钥解密出来的数据
|
||||||
|
String data = decryptNotifyData(notifyPubKeyPath, reqBodyJSON.getStr("data"));
|
||||||
|
if (StrUtil.isBlank(data)) {
|
||||||
|
return new JSONObject().set("code", "500").set("message", "参数解密出错");
|
||||||
|
}
|
||||||
|
log.debug("拉卡拉进件异步通知返回解密后的参数:{}", data);
|
||||||
|
|
||||||
|
// 逻辑处理
|
||||||
|
JSONObject dataJSON = JSONUtil.parseObj(data);
|
||||||
|
if (respData.isEmpty() || StrUtil.isBlank(dataJSON.getStr("externalCustomerNo"))) {
|
||||||
|
return new JSONObject().set("code", "500").set("message", "参数解析出错");
|
||||||
|
}
|
||||||
|
|
||||||
|
String externalCustomerNo = dataJSON.getStr("externalCustomerNo"); //拉卡拉外部商户号
|
||||||
|
shopMerchEntryService.updateMerchEntryLklAuditStatusByLklMerCupNo(externalCustomerNo, dataJSON.getStr("customerNo"), CommonConstant.Enable, data);
|
||||||
|
|
||||||
|
return new JSONObject().set("code", "200").set("message", "成功");
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -329,10 +434,15 @@ public class LklTkServiceImpl {
|
|||||||
countryName = areaNames[2];
|
countryName = areaNames[2];
|
||||||
}
|
}
|
||||||
|
|
||||||
String urlPath = "/organization";
|
String urlPath = "/sit/htkregistration/organization";
|
||||||
if (isBankArea) {
|
if (isProd()) {
|
||||||
urlPath = "/organization/bank";
|
urlPath = "/registration/organization";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (isBankArea) {
|
||||||
|
urlPath += "/bank";
|
||||||
|
}
|
||||||
|
|
||||||
String authorization = getLklTkAuthorization();
|
String authorization = getLklTkAuthorization();
|
||||||
if (StrUtil.isBlank(authorization)) {
|
if (StrUtil.isBlank(authorization)) {
|
||||||
log.error("获取拉卡拉token失败");
|
log.error("获取拉卡拉token失败");
|
||||||
@ -417,13 +527,16 @@ public class LklTkServiceImpl {
|
|||||||
formData.put("sourcechnl", "0");
|
formData.put("sourcechnl", "0");
|
||||||
formData.put("isOcr", isOcr);
|
formData.put("isOcr", isOcr);
|
||||||
|
|
||||||
String urlPath = "/file/upload";
|
String urlPath = "/sit/htkregistration/file/upload";
|
||||||
|
if (isProd()) {
|
||||||
|
urlPath = "/registration/file/upload";
|
||||||
|
}
|
||||||
ResponseEntity<JSONObject> response = RestTemplateHttpUtil.sendPostFormDataBackEntity(buildLklTkUrl(urlPath), header, formData, JSONObject.class);
|
ResponseEntity<JSONObject> response = RestTemplateHttpUtil.sendPostFormDataBackEntity(buildLklTkUrl(urlPath), header, formData, JSONObject.class);
|
||||||
if (ObjectUtil.isEmpty(response) || response.getStatusCode() != HttpStatus.OK) {
|
if (ObjectUtil.isEmpty(response) || response.getStatusCode() != HttpStatus.OK) {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
JSONObject result = response.getBody();
|
JSONObject result = response.getBody();
|
||||||
if (result == null) {
|
if (result.isEmpty()) {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -433,5 +546,4 @@ public class LklTkServiceImpl {
|
|||||||
return jsonObject;
|
return jsonObject;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -131,10 +131,24 @@ public interface ShopMerchEntryService {
|
|||||||
* 更新商家入驻申请的拉卡拉商户号
|
* 更新商家入驻申请的拉卡拉商户号
|
||||||
*
|
*
|
||||||
* @param loginMobile
|
* @param loginMobile
|
||||||
|
* @param lklAuditStatus
|
||||||
* @param lklMerCupNo
|
* @param lklMerCupNo
|
||||||
|
* @param lklTkRegParams
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
Boolean updateMerchEntryLklMerCupNo(String loginMobile, String lklMerCupNo);
|
Boolean updateMerchEntryLklMerCupNo(String loginMobile, Integer lklAuditStatus, String lklMerCupNo, String lklTkRegParams);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 更新商家入驻申请的拉卡拉审核状态和响应数据
|
||||||
|
*
|
||||||
|
* @param lklMerCupNo
|
||||||
|
* @param lklInnerMerNo
|
||||||
|
* @param lklAuditStatus
|
||||||
|
* @param lklTkRegResp
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
Boolean updateMerchEntryLklAuditStatusByLklMerCupNo(String lklMerCupNo, String lklInnerMerNo, Integer lklAuditStatus, String lklTkRegResp);
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 更新商家入驻申请的店铺 ID
|
* 更新商家入驻申请的店铺 ID
|
||||||
|
|||||||
@ -687,13 +687,51 @@ public class ShopMerchEntryServiceImpl extends BaseServiceImpl<ShopMerchEntryMap
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Boolean updateMerchEntryLklMerCupNo(String loginMobile, String lklMerCupNo) {
|
public Boolean updateMerchEntryLklMerCupNo(String loginMobile, Integer lklAuditStatus, String lklMerCupNo, String lklTkRegParams) {
|
||||||
if (StrUtil.isBlank(loginMobile) && StrUtil.isBlank(lklMerCupNo)) {
|
if (StrUtil.isBlank(loginMobile) && StrUtil.isBlank(lklMerCupNo)) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
UpdateWrapper<ShopMerchEntry> updateWrapper = new UpdateWrapper<>();
|
UpdateWrapper<ShopMerchEntry> updateWrapper = new UpdateWrapper<>();
|
||||||
updateWrapper.eq("login_mobile", loginMobile).set("lkl_mer_cup_no", lklMerCupNo);
|
updateWrapper.eq("login_mobile", loginMobile);
|
||||||
|
if (ObjectUtil.isNotEmpty(lklAuditStatus)) {
|
||||||
|
updateWrapper.set("lkl_audit_status", lklAuditStatus);
|
||||||
|
}
|
||||||
|
if (StrUtil.isNotBlank(lklMerCupNo)) {
|
||||||
|
updateWrapper.set("lkl_mer_cup_no", lklMerCupNo);
|
||||||
|
}
|
||||||
|
if (StrUtil.isNotBlank(lklTkRegParams)) {
|
||||||
|
updateWrapper.set("lkl_tk_reg_params", lklTkRegParams);
|
||||||
|
}
|
||||||
|
return update(updateWrapper);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 更新商家入驻申请的拉卡拉审核状态和响应数据
|
||||||
|
*
|
||||||
|
* @param lklMerCupNo
|
||||||
|
* @param lklInnerMerNo
|
||||||
|
* @param lklAuditStatus
|
||||||
|
* @param lklTkRegResp
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public Boolean updateMerchEntryLklAuditStatusByLklMerCupNo(String lklMerCupNo, String lklInnerMerNo, Integer lklAuditStatus, String lklTkRegResp) {
|
||||||
|
if (StrUtil.isBlank(lklMerCupNo)) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
UpdateWrapper<ShopMerchEntry> updateWrapper = new UpdateWrapper<>();
|
||||||
|
updateWrapper.eq("lkl_mer_cup_no", lklMerCupNo);
|
||||||
|
if (ObjectUtil.isNotEmpty(lklAuditStatus)) {
|
||||||
|
updateWrapper.set("lkl_audit_status", lklAuditStatus);
|
||||||
|
}
|
||||||
|
if (StrUtil.isNotBlank(lklInnerMerNo)) {
|
||||||
|
updateWrapper.set("lkl_mer_inner_no", lklInnerMerNo);
|
||||||
|
}
|
||||||
|
if (StrUtil.isNotBlank(lklTkRegResp)) {
|
||||||
|
updateWrapper.set("lkl_tk_reg_resp", lklTkRegResp);
|
||||||
|
}
|
||||||
return update(updateWrapper);
|
return update(updateWrapper);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -169,6 +169,8 @@ lakala:
|
|||||||
client_secret: XPa1HB5d55Ig0qV8
|
client_secret: XPa1HB5d55Ig0qV8
|
||||||
api_pub_key_path: payKey/lakala/dev/tk_api_public_key.txt
|
api_pub_key_path: payKey/lakala/dev/tk_api_public_key.txt
|
||||||
api_pri_key_path: payKey/lakala/dev/tk_api_private_key.txt
|
api_pri_key_path: payKey/lakala/dev/tk_api_private_key.txt
|
||||||
|
notify_pub_key_path: payKey/lakala/dev/tk_notify_public_key.txt
|
||||||
|
notify_pri_key_path: payKey/lakala/dev/tk_notify_private_key.txt
|
||||||
#e签宝配置
|
#e签宝配置
|
||||||
esign:
|
esign:
|
||||||
server_url: https://smlopenapi.esign.cn
|
server_url: https://smlopenapi.esign.cn
|
||||||
|
|||||||
@ -164,11 +164,13 @@ lakala:
|
|||||||
# 拉卡拉拓客进件配置
|
# 拉卡拉拓客进件配置
|
||||||
tk:
|
tk:
|
||||||
#服务地址
|
#服务地址
|
||||||
server_url: https://test.wsmsd.cn/sit/htkauth
|
server_url: https://test.wsmsd.cn
|
||||||
client_id: lsycs
|
client_id: lsycs
|
||||||
client_secret: XPa1HB5d55Ig0qV8
|
client_secret: XPa1HB5d55Ig0qV8
|
||||||
api_pub_key_path: payKey/lakala/dev/tk_api_public_key.txt
|
api_pub_key_path: payKey/lakala/dev/tk_api_public_key.txt
|
||||||
api_pri_key_path: payKey/lakala/dev/tk_api_private_key.txt
|
api_pri_key_path: payKey/lakala/dev/tk_api_private_key.txt
|
||||||
|
notify_pub_key_path: payKey/lakala/dev/tk_notify_public_key.txt
|
||||||
|
notify_pri_key_path: payKey/lakala/dev/tk_notify_private_key.txt
|
||||||
#e签宝配置
|
#e签宝配置
|
||||||
esign:
|
esign:
|
||||||
server_url: https://smlopenapi.esign.cn
|
server_url: https://smlopenapi.esign.cn
|
||||||
|
|||||||
@ -196,6 +196,8 @@ lakala:
|
|||||||
client_secret: XPa1HB5d55Ig0qV8
|
client_secret: XPa1HB5d55Ig0qV8
|
||||||
api_pub_key_path: payKey/lakala/dev/tk_api_public_key.txt
|
api_pub_key_path: payKey/lakala/dev/tk_api_public_key.txt
|
||||||
api_pri_key_path: payKey/lakala/dev/tk_api_private_key.txt
|
api_pri_key_path: payKey/lakala/dev/tk_api_private_key.txt
|
||||||
|
notify_pub_key_path: payKey/lakala/dev/tk_notify_public_key.txt
|
||||||
|
notify_pri_key_path: payKey/lakala/dev/tk_notify_private_key.txt
|
||||||
#e签宝配置
|
#e签宝配置
|
||||||
esign:
|
esign:
|
||||||
server_url: https://smlopenapi.esign.cn
|
server_url: https://smlopenapi.esign.cn
|
||||||
|
|||||||
@ -173,6 +173,8 @@ lakala:
|
|||||||
client_secret: XPa1HB5d55Ig0qV8
|
client_secret: XPa1HB5d55Ig0qV8
|
||||||
api_pub_key_path: payKey/lakala/dev/tk_api_public_key.txt
|
api_pub_key_path: payKey/lakala/dev/tk_api_public_key.txt
|
||||||
api_pri_key_path: payKey/lakala/dev/tk_api_private_key.txt
|
api_pri_key_path: payKey/lakala/dev/tk_api_private_key.txt
|
||||||
|
notify_pub_key_path: payKey/lakala/dev/tk_notify_public_key.txt
|
||||||
|
notify_pri_key_path: payKey/lakala/dev/tk_notify_private_key.txt
|
||||||
#e签宝配置
|
#e签宝配置
|
||||||
esign:
|
esign:
|
||||||
server_url: https://smlopenapi.esign.cn
|
server_url: https://smlopenapi.esign.cn
|
||||||
|
|||||||
@ -173,6 +173,8 @@ lakala:
|
|||||||
client_secret: XPa1HB5d55Ig0qV8
|
client_secret: XPa1HB5d55Ig0qV8
|
||||||
api_pub_key_path: payKey/lakala/dev/tk_api_public_key.txt
|
api_pub_key_path: payKey/lakala/dev/tk_api_public_key.txt
|
||||||
api_pri_key_path: payKey/lakala/dev/tk_api_private_key.txt
|
api_pri_key_path: payKey/lakala/dev/tk_api_private_key.txt
|
||||||
|
notify_pub_key_path: payKey/lakala/dev/tk_notify_public_key.txt
|
||||||
|
notify_pri_key_path: payKey/lakala/dev/tk_notify_private_key.txt
|
||||||
#e签宝配置
|
#e签宝配置
|
||||||
esign:
|
esign:
|
||||||
server_url: https://smlopenapi.esign.cn
|
server_url: https://smlopenapi.esign.cn
|
||||||
|
|||||||
@ -625,7 +625,9 @@
|
|||||||
SELECT
|
SELECT
|
||||||
ob.order_id,
|
ob.order_id,
|
||||||
ob.order_time,
|
ob.order_time,
|
||||||
oi.order_time + #{expireSeconds}*1000 as arrival_time,
|
<if test="delivery!=null and delivery==1">
|
||||||
|
oi.order_time + #{expireSeconds}*1000 as arrival_time,
|
||||||
|
</if>
|
||||||
ob.order_product_amount,
|
ob.order_product_amount,
|
||||||
ob.order_payment_amount,
|
ob.order_payment_amount,
|
||||||
ob.currency_id,
|
ob.currency_id,
|
||||||
@ -714,12 +716,12 @@
|
|||||||
|
|
||||||
<!--进行中-->
|
<!--进行中-->
|
||||||
<if test="status!=null and status==1 and expireSeconds!=null and expireSeconds>0">
|
<if test="status!=null and status==1 and expireSeconds!=null and expireSeconds>0">
|
||||||
and arrival_time <![CDATA[>=]]> UNIX_TIMESTAMP() * 1000
|
and (oi.order_time + #{expireSeconds}*1000) <![CDATA[>=]]> UNIX_TIMESTAMP() * 1000
|
||||||
</if>
|
</if>
|
||||||
|
|
||||||
<!--超时异常-->
|
<!--超时异常-->
|
||||||
<if test="status!=null and status==2 and expireSeconds!=null and expireSeconds>0">
|
<if test="status!=null and status==2 and expireSeconds!=null and expireSeconds>0">
|
||||||
and arrival_time <![CDATA[<]]> UNIX_TIMESTAMP() * 1000
|
and (oi.order_time + #{expireSeconds}*1000) <![CDATA[<]]> UNIX_TIMESTAMP() * 1000
|
||||||
</if>
|
</if>
|
||||||
|
|
||||||
<!--退款订单-->
|
<!--退款订单-->
|
||||||
|
|||||||
@ -0,0 +1 @@
|
|||||||
|
MIICdgIBADANBgkqhkiG9w0BAQEFAASCAmAwggJcAgEAAoGBAKnlpXdmJcbZHxh3w3Ghy/5wXtUBQcFzRMXgw2d7uYjzAzbIQ/ZCAj6srWoN/obtkU+G62kgcpByGmiVtK4LS+BoelKM705SzV+mcr8mNmr2jwNq1SwDSfgVxx5z00FtXl3LnKvCujvGYOmx6+nX8h6IiyyLX6IP6cFaqpUXHsZVAgMBAAECgYA4NpeM7etJ48T6H4Y3LsWEJkH6UDQlgbIblsaQkstMmLtTgOebrzN28UNfd8njcu9FVOrHGclOKbK7L+1cOLiduWsZKc/c/gAy9wAR4EhoLvlerH9EEPiPWFxdEDbMxPqlkpqLOo+PxHrhTn4vU4CaPdJtL2ujKn7nmsUdUDWo8QJBANS1TlM6nhPt2XlzN5kGfsJ4kBYNjuLXNA2YdNuC2ttYvEXHJ9T70FN/GnRBBIZu47uHH3Ie5nfep+qMk6a8RP8CQQDMecIyI0z1kVt+tOfWKw2ZFLsi74708qTaeR4W1ABtkngj1+bxoWWXr3KqhjqJkWxnhioSfXqu7CScNzjdM1CrAkAQd+ESjI1EmbumrYb2cAxMXi05p98SLPs4uj8B58WuCda5yEuLL9vXOxX/PjFtfxRepn2GxmGtki2J+UxNMnJdAkAFoORjlO0tZU7rcfdfwdeh+xwbnhSFUZiQGv1lC3jnizybX/oPdK3jO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