feat(mall): 新增商品标签筛选功能并优化支付相关代码- 在商品搜索接口中添加标签筛选参数
- 更新数据库查询以支持标签筛选 - 移除冗余的支付相关代码 - 更新拉卡拉SDK的调用方式
This commit is contained in:
@@ -16,24 +16,24 @@ public class BaseCommonDemo {
|
||||
// 你的证书序列号
|
||||
private static final String serialNo = "0195119ac8ac";
|
||||
|
||||
/*//商户私钥信息地址
|
||||
//商户私钥信息地址
|
||||
private static final String priKeyPath = "D:\\manage\\jcs\\OP10000499商户私钥.txt";
|
||||
|
||||
//拉卡拉支付平台证书地址
|
||||
private static final String lklCerPath = "D:\\manage\\jcs\\平台公钥生产.cer";
|
||||
|
||||
//拉卡拉支付平台证书地址2(用于拉卡拉通知验签)+
|
||||
private static final String lklNotifyCerPath = "D:\\manage\\jcs\\平台公钥生产.cer";*/
|
||||
private static final String lklNotifyCerPath = "D:\\manage\\jcs\\平台公钥生产.cer";
|
||||
|
||||
|
||||
//商户私钥信息地址
|
||||
/*//商户私钥信息地址
|
||||
private static final String priKeyPath = "/home/manage/jcs/OP10000499商户私钥.txt";
|
||||
|
||||
//拉卡拉支付平台证书地址
|
||||
private static final String lklCerPath = "/home/manage/jcs/平台公钥生产.cer";
|
||||
|
||||
//拉卡拉支付平台证书地址2(用于拉卡拉通知验签)
|
||||
private static final String lklNotifyCerPath = "/home/manage/jcs/平台公钥生产.cer";
|
||||
private static final String lklNotifyCerPath = "/home/manage/jcs/平台公钥生产.cer";*/
|
||||
|
||||
/**
|
||||
* 拉卡拉报文加密对称性密钥
|
||||
|
||||
@@ -40,22 +40,22 @@ public class KlkConstant {
|
||||
/**
|
||||
* bindAccount 分账关系绑定结果回调地址
|
||||
*/
|
||||
public static final String BIND_ACC_URL = "https://jcs-api.52o.site/api/mall/callback/applyBind";
|
||||
public static final String BIND_ACC_URL = "https://jcsapi-new.52o.site/jcsapi/api/mall/callback/applyBind";
|
||||
|
||||
/**
|
||||
* 提现结果回调地址
|
||||
*/
|
||||
public static final String WITHDRAWAL = "https://jcs-api.52o.site/api/mall/callback/withdrawal";
|
||||
public static final String WITHDRAWAL = "https://jcsapi-new.52o.site/jcsapi/api/mall/callback/withdrawal";
|
||||
|
||||
/**
|
||||
* 会员兑换码订单回调地址
|
||||
*/
|
||||
public static final String MEMBER_CODE_ORDER = "https://jcs-api.52o.site/api/mall/callback/codeOrder";
|
||||
public static final String MEMBER_CODE_ORDER = "https://jcsapi-new.52o.site/jcsapi/api/mall/callback/codeOrder";
|
||||
|
||||
/**
|
||||
* 材料订单回调地址
|
||||
*/
|
||||
public static final String MEMBER_ORDER = "https://jcs-api.52o.site/api/mall/callback/order";
|
||||
public static final String MEMBER_ORDER = "https://jcsapi-new.52o.site/jcsapi/api/mall/callback/order";
|
||||
|
||||
/**
|
||||
* 分账状态 处理中:PROCESSING, 已受理:ACCEPTED, 成功:SUCCESS, 失败:FAIL
|
||||
|
||||
@@ -7,6 +7,7 @@ import com.lakala.zf.laop.java.sdk.demo.BaseCommonDemo;
|
||||
import com.lkl.laop.sdk.LKLSDK;
|
||||
import com.lkl.laop.sdk.exception.SDKException;
|
||||
import com.lkl.laop.sdk.request.V3CcssCounterOrderCreateRequest;
|
||||
import com.lkl.laop.sdk.request.model.V3CcssOrderOutSplitInfo;
|
||||
import com.lkl.laop.sdk.request.model.V3CcssOrderSceneFieldInfo;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
@@ -21,6 +22,88 @@ import java.util.List;
|
||||
|
||||
public class LakalaUtils extends BaseCommonDemo {
|
||||
|
||||
|
||||
|
||||
|
||||
*/
|
||||
/**
|
||||
* 聚合收银台创建订单
|
||||
*
|
||||
* @return
|
||||
*//*
|
||||
|
||||
public static JSONObject createOrderPayment(String orderNo, BigDecimal payPrice, List<V3CcssOrderOutSplitInfo> splitInfoList) throws Exception {
|
||||
doInit();
|
||||
//创建订单请求参数
|
||||
V3CcssCounterOrderCreateRequest request = new V3CcssCounterOrderCreateRequest();
|
||||
|
||||
//商户订单号
|
||||
request.setOutOrderNo(orderNo);
|
||||
|
||||
//是否支持多次发起订单 0 不支持 1 支持
|
||||
request.setSupportRepeatPay(1);
|
||||
|
||||
//银联商户号
|
||||
request.setMerchantNo(KlkConstant.merchantNo);
|
||||
|
||||
//订单支付金额 单位:分
|
||||
request.setTotalAmount(payPrice.multiply(new BigDecimal(100)).longValue());
|
||||
|
||||
//支付有效期 一天
|
||||
request.setOrderEfficientTime(DateUtil.format(DateUtil.offsetDay(new Date(), 1), "yyyyMMddHHmmss"));
|
||||
|
||||
//回调地址
|
||||
request.setNotifyUrl(KlkConstant.MEMBER_ORDER);
|
||||
|
||||
request.setSupportCancel(1);
|
||||
|
||||
request.setSupportRefund(1);
|
||||
|
||||
*/
|
||||
/*request.setSplitMark("1");
|
||||
request.setOutSplitInfo(splitInfoList);*//*
|
||||
|
||||
|
||||
//支付类型
|
||||
// req.setCounterParam("{\"pay_mode\":\"ALIPAY\"}");
|
||||
|
||||
// req.setBusiTypeParam("[{\"busi_type\":\"UPCARD\",\"params\":{\"crd_flg\":\"CRDFLG_D|CRDFLG_C|CRDFLG_OTH\"}},{\"busi_type\":\"SCPAY\",\"params\":{\"pay_mode\":\"WECHAT\",\"crd_flg\":\"CRDFLG_D\"}}]");
|
||||
|
||||
// 订单标题,在使用收银台扫码支付时必输入,交易时送往账户端
|
||||
request.setOrderInfo("集材社订单支付");
|
||||
|
||||
List<String> sgnInfos = new ArrayList<>();
|
||||
|
||||
sgnInfos.add("1");
|
||||
|
||||
request.setSgnInfo(sgnInfos);
|
||||
|
||||
V3CcssOrderSceneFieldInfo.HbFqSceneInfo hbFqSceneInfo = new V3CcssOrderSceneFieldInfo.HbFqSceneInfo();
|
||||
|
||||
hbFqSceneInfo.setHbFqNum("3");
|
||||
|
||||
hbFqSceneInfo.setHbFqSellerPercent("0");
|
||||
|
||||
//3. 发送请求
|
||||
String response = null;
|
||||
try {
|
||||
response = LKLSDK.httpPost(request);
|
||||
} catch (SDKException e) {
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
|
||||
//4. 响应
|
||||
System.out.println(response);
|
||||
|
||||
JSONObject jsonObject = JSONObject.parseObject(response);
|
||||
if ("000000".equals(jsonObject.get("code"))) {
|
||||
System.out.println(jsonObject.get("resp_data").toString());
|
||||
} else {
|
||||
System.out.println(jsonObject.get("msg").toString());
|
||||
}
|
||||
return jsonObject;
|
||||
}
|
||||
|
||||
*/
|
||||
/**
|
||||
* 聚合收银台创建订单
|
||||
|
||||
@@ -1,22 +1,28 @@
|
||||
/*
|
||||
package com.lakala.zf.laop.java.sdk.demo.utils;
|
||||
|
||||
import com.alibaba.fastjson2.JSON;
|
||||
import com.alibaba.fastjson2.JSONObject;
|
||||
import com.lakala.zf.laop.java.sdk.demo.BaseCommonDemo;
|
||||
import com.lkl.laop.sdk.LKLSDK;
|
||||
import com.lkl.laop.sdk.request.V3LabsRelationRefundRequest;
|
||||
import com.lkl.laop.sdk.request.*;
|
||||
import com.lkl.laop.sdk.utils.CommonUtil;
|
||||
|
||||
import javax.servlet.ServletException;
|
||||
|
||||
*/
|
||||
/**
|
||||
* @author Maosw
|
||||
*/
|
||||
public class V3LakalaOrderUtils extends BaseCommonDemo {
|
||||
*//*
|
||||
|
||||
/*
|
||||
*//**
|
||||
public class V3LakalaUserUtils extends BaseCommonDemo {
|
||||
|
||||
|
||||
*/
|
||||
/**
|
||||
* 根据卡号查询卡BIN信息
|
||||
*//*
|
||||
|
||||
public static JSONObject cardBin(String acctNo) throws Exception {
|
||||
doInit();
|
||||
if (acctNo == null) {
|
||||
@@ -27,13 +33,17 @@ public class V3LakalaOrderUtils extends BaseCommonDemo {
|
||||
cardBin.setOrderNo(CommonUtil.getOrderNo());
|
||||
cardBin.setOrgCode(KlkConstant.ORG_CODE);
|
||||
cardBin.setCardNo(acctNo);
|
||||
System.out.println("cardBin:"+cardBin);
|
||||
String cardBinResponse = LKLSDK.httpPost(cardBin);
|
||||
System.out.println(cardBinResponse);
|
||||
return JSON.parseObject(cardBinResponse);
|
||||
}
|
||||
|
||||
*//**
|
||||
*/
|
||||
/**
|
||||
*附件上传
|
||||
*//*
|
||||
|
||||
public static JSONObject uploadFile(V2MmsOpenApiUploadFile uploadFile) throws Exception {
|
||||
doInit();
|
||||
if (uploadFile == null) {
|
||||
@@ -50,9 +60,11 @@ public class V3LakalaOrderUtils extends BaseCommonDemo {
|
||||
return JSON.parseObject(uploadFileResponse);
|
||||
}
|
||||
|
||||
*//**
|
||||
*/
|
||||
/**
|
||||
* 分账接收方创建申请
|
||||
*//*
|
||||
|
||||
public static JSONObject applyLedgerReceiver(V2MmsApplyLedgerReceiverRequest ledgerReceiver) throws Exception {
|
||||
doInit();
|
||||
if (ledgerReceiver == null) {
|
||||
@@ -65,9 +77,11 @@ public class V3LakalaOrderUtils extends BaseCommonDemo {
|
||||
return JSON.parseObject(uploadFileResponse);
|
||||
}
|
||||
|
||||
*//**
|
||||
*/
|
||||
/**
|
||||
* 查询提现申请详情
|
||||
*//*
|
||||
|
||||
public static JSONObject queryWithdraw(V3SacsQueryRequest queryRequest) throws Exception {
|
||||
doInit();
|
||||
if (queryRequest == null) {
|
||||
@@ -77,9 +91,11 @@ public class V3LakalaOrderUtils extends BaseCommonDemo {
|
||||
return JSON.parseObject(response);
|
||||
}
|
||||
|
||||
*//**
|
||||
*/
|
||||
/**
|
||||
* 提现申请
|
||||
*//*
|
||||
|
||||
public static JSONObject withdraw(V3SacsBalanceSeparateRequest separateRequest) throws Exception {
|
||||
doInit();
|
||||
if (separateRequest == null) {
|
||||
@@ -89,9 +105,11 @@ public class V3LakalaOrderUtils extends BaseCommonDemo {
|
||||
return JSON.parseObject(response);
|
||||
}
|
||||
|
||||
*//**
|
||||
*/
|
||||
/**
|
||||
*提款模式设置
|
||||
*//*
|
||||
|
||||
public static JSONObject setWithdrawMode(V2LaepIndustryEwalletSettleProfileRequest ewalletSettleProfileRequest) throws Exception {
|
||||
doInit();
|
||||
if (ewalletSettleProfileRequest == null) {
|
||||
@@ -99,11 +117,16 @@ public class V3LakalaOrderUtils extends BaseCommonDemo {
|
||||
}
|
||||
String response = LKLSDK.httpPost(ewalletSettleProfileRequest);
|
||||
return JSON.parseObject(response);
|
||||
}*/
|
||||
}
|
||||
|
||||
/**
|
||||
*/
|
||||
/* *//*
|
||||
*/
|
||||
/**
|
||||
* 退款
|
||||
*/
|
||||
*//*
|
||||
*/
|
||||
/*
|
||||
public static JSONObject relationRefund(V3LabsRelationRefundRequest v3LabsRelationRefundRequest) throws Exception {
|
||||
// 1. 配置初始化
|
||||
doInit();
|
||||
@@ -115,6 +138,8 @@ public class V3LakalaOrderUtils extends BaseCommonDemo {
|
||||
//4. 响应
|
||||
System.out.println(response);
|
||||
return JSON.parseObject(response);
|
||||
}
|
||||
}*//*
|
||||
|
||||
|
||||
}
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user