顺丰同城配置改成 生产环境
This commit is contained in:
parent
bcde181462
commit
bfa4b3669d
@ -128,6 +128,9 @@ public class PayConsumeDeposit implements Serializable {
|
||||
@ApiModelProperty(value = "额外参数")
|
||||
private String deposit_extra_param;
|
||||
|
||||
@ApiModelProperty(value = "拉卡拉订单合单参数")
|
||||
private String lkl_combine_params;
|
||||
|
||||
@ApiModelProperty(value = "支付")
|
||||
private String deposit_service;
|
||||
|
||||
|
||||
@ -262,9 +262,10 @@ public class LakalaPayServiceImpl implements LakalaPayService {
|
||||
accBusiFields.put("user_id", openId); // 用户openid
|
||||
reqData.put("acc_busi_fields", accBusiFields);
|
||||
|
||||
// 分账信息
|
||||
// 重要约定,订单号规则:商品订单:ORD_订单号,运费订单:DF_订单号
|
||||
// 分单信息
|
||||
JSONObject goodsSplitInfo = new JSONObject();
|
||||
goodsSplitInfo.put("out_sub_trade_no", orderId + "-1"); // 子订单号
|
||||
goodsSplitInfo.put("out_sub_trade_no", "ORD_" + orderId); // 子订单号
|
||||
goodsSplitInfo.put("merchant_no", merchantNo); // 分账商户号
|
||||
goodsSplitInfo.put("term_no", termNo); // 分账终端号
|
||||
int totalAmountInt = Convert.toInt(totalAmount) - Convert.toInt(agentAmount);
|
||||
@ -273,7 +274,7 @@ public class LakalaPayServiceImpl implements LakalaPayService {
|
||||
goodsSplitInfo.put("sub_remark", "商品订单金额"); // 子单备注信息
|
||||
|
||||
JSONObject deliverySplitInfo = new JSONObject();
|
||||
deliverySplitInfo.put("out_sub_trade_no", orderId + "-2"); // 子订单号
|
||||
deliverySplitInfo.put("out_sub_trade_no", "DF_" + orderId); // 子订单号
|
||||
deliverySplitInfo.put("merchant_no", agentMerchantNo); // 分账商户号
|
||||
deliverySplitInfo.put("term_no", agentTermNo); // 分账终端号
|
||||
deliverySplitInfo.put("amount", agentAmount); // 分账金额
|
||||
@ -301,7 +302,7 @@ public class LakalaPayServiceImpl implements LakalaPayService {
|
||||
|
||||
// 这里的请求方法,对返回的字段进行了处理,需要注意
|
||||
ResponseEntity<JSONObject> lakalaRespJSON = RestTemplateHttpUtil.sendPostBodyBackEntity(reqUrl, header, reqBody, JSONObject.class);
|
||||
log.debug("拉卡拉合单交易响应参数:{}", lakalaRespJSON);
|
||||
log.info("拉卡拉合单交易响应参数:{}", lakalaRespJSON);
|
||||
|
||||
// 7. 处理响应结果
|
||||
if (lakalaRespJSON == null) {
|
||||
@ -336,7 +337,7 @@ public class LakalaPayServiceImpl implements LakalaPayService {
|
||||
* 参考地址:https://o.lakala.com/#/home/document/detail?id=113
|
||||
*
|
||||
* @param storeId 店铺ID
|
||||
* @param outTradeNo 退货订单号
|
||||
* @param outTradeNo 退货订单号,如: FX-20241214-1
|
||||
* @param originTradeNo 原拉卡拉交易流水号
|
||||
* @param refundAmount 退款金额(单位:分)
|
||||
* @param refundReason 退款原因
|
||||
@ -367,6 +368,7 @@ public class LakalaPayServiceImpl implements LakalaPayService {
|
||||
}
|
||||
// 3. 初始化拉卡拉SDK
|
||||
initLKLSDK();
|
||||
|
||||
// 4. 获取店铺的拉卡拉商户号和终端号
|
||||
ShopStoreBase shopStoreBase = shopService.getLklMerchantNoAndTermNo(storeId);
|
||||
if (shopStoreBase == null || org.apache.commons.lang3.StringUtils.isAnyBlank(shopStoreBase.getLkl_merchant_no(), shopStoreBase.getLkl_term_no())) {
|
||||
@ -379,11 +381,12 @@ public class LakalaPayServiceImpl implements LakalaPayService {
|
||||
// 5. 构造退款请求并发送
|
||||
V3LabsRelationRefundRequest refundRequest = new V3LabsRelationRefundRequest();
|
||||
refundRequest.setOutTradeNo(outTradeNo);
|
||||
refundRequest.setOriginTradeNo(originTradeNo);
|
||||
refundRequest.setMerchantNo(shopStoreBase.getLkl_merchant_no());
|
||||
refundRequest.setTermNo(shopStoreBase.getLkl_term_no());
|
||||
refundRequest.setRefundAmount(refundAmount);
|
||||
refundRequest.setRefundReason(refundReason);
|
||||
refundRequest.setOriginTradeNo(originTradeNo);
|
||||
|
||||
refundRequest.setLocationInfo(new V3LabsTradeLocationInfo(requestIp, null, ""));
|
||||
|
||||
log.info("拉卡拉退款请求参数: {}", JSONUtil.toJsonStr(refundRequest));
|
||||
|
||||
@ -65,6 +65,7 @@ import io.seata.spring.annotation.GlobalTransactional;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.beans.factory.annotation.Value;
|
||||
import org.springframework.data.util.Pair;
|
||||
import org.springframework.jdbc.datasource.DataSourceTransactionManager;
|
||||
import org.springframework.stereotype.Service;
|
||||
@ -122,6 +123,11 @@ public class PayUserPayServiceImpl extends BaseServiceImpl<PayUserPayMapper, Pay
|
||||
@Autowired
|
||||
private LakalaPayService lakalaPayService;
|
||||
|
||||
@Value("${lakala.delivery_merchant_no}")
|
||||
private String delivery_merchant_no;
|
||||
@Value("${lakala.delivery_term_no}")
|
||||
private String delivery_term_no;
|
||||
|
||||
/**
|
||||
* 获取支付密码
|
||||
*
|
||||
@ -681,7 +687,7 @@ public class PayUserPayServiceImpl extends BaseServiceImpl<PayUserPayMapper, Pay
|
||||
// 拉卡拉合单预支付返回参数
|
||||
// TODO RMK 这里只有固定一个运费代理商代收运费,以后代理商模块做好了,要动态读取店铺的运费代理商。
|
||||
lakalaRespJSON = lakalaPayService.lklTransMergePreOrder(shopStoreBase.getLkl_merchant_no(), shopStoreBase.getLkl_term_no(),
|
||||
"822584059990FYP", "N5811590",
|
||||
delivery_merchant_no, delivery_term_no, // 以后根据代理商动态分配
|
||||
appId, openId, storeIdStr, out_trade_no, subject, total_amt,
|
||||
Convert.toStr(shippingFee.multiply(BigDecimal.valueOf(100)).intValue()),
|
||||
notifyUrl,
|
||||
|
||||
@ -127,7 +127,7 @@ lakala:
|
||||
lkl_platform_cer_path: payKey/lakala/dev/lkl_notify_cert_v2.cer
|
||||
# 机构代码
|
||||
org_code: 1
|
||||
# #商户号
|
||||
# merchant_no: 82229007392000A
|
||||
# #终端号
|
||||
# term_no: D9296400
|
||||
#运费代理商商户号(深圳立挚)
|
||||
delivery_merchant_no: 822584059990FYP
|
||||
#运费代理商终端号码(深圳立挚),M0780629(B2B收银台) M0780798(专业化扫码)
|
||||
delivery_term_no: N5811590
|
||||
@ -129,7 +129,7 @@ lakala:
|
||||
lkl_platform_cer_path: payKey/lakala/dev/lkl_notify_cert_v2.cer
|
||||
# 机构代码
|
||||
org_code: 1
|
||||
# #商户号
|
||||
# merchant_no: 82229007392000A
|
||||
# #终端号
|
||||
# term_no: D9296400
|
||||
#运费代理商商户号(深圳立挚)
|
||||
delivery_merchant_no: 822584059990FYP
|
||||
#运费代理商终端号码(深圳立挚),M0780629(B2B收银台) M0780798(专业化扫码)
|
||||
delivery_term_no: N5811590
|
||||
@ -151,7 +151,7 @@ lakala:
|
||||
lkl_platform_cer_path: payKey/lakala/prod/lkl_platform.cer
|
||||
#机构代码
|
||||
org_code: 980688
|
||||
# #商户号
|
||||
# merchant_no: 8226330599900LN
|
||||
# #终端号码,M0780629(B2B收银台) M0780798(专业化扫码)
|
||||
# term_no: M0780798
|
||||
#运费代理商商户号(深圳立挚)
|
||||
delivery_merchant_no: 822584059990FYP
|
||||
#运费代理商终端号码(深圳立挚),M0780629(B2B收银台) M0780798(专业化扫码)
|
||||
delivery_term_no: N5811590
|
||||
|
||||
@ -127,7 +127,7 @@ lakala:
|
||||
lkl_platform_cer_path: payKey/lakala/dev/lkl_notify_cert_v2.cer
|
||||
# 机构代码
|
||||
org_code: 1
|
||||
# #商户号
|
||||
# merchant_no: 82229007392000A
|
||||
# #终端号
|
||||
# term_no: D9296400
|
||||
#运费代理商商户号(深圳立挚)
|
||||
delivery_merchant_no: 822584059990FYP
|
||||
#运费代理商终端号码(深圳立挚),M0780629(B2B收银台) M0780798(专业化扫码)
|
||||
delivery_term_no: N5811590
|
||||
@ -127,7 +127,7 @@ lakala:
|
||||
lkl_platform_cer_path: payKey/lakala/dev/lkl_notify_cert_v2.cer
|
||||
# 机构代码
|
||||
org_code: 1
|
||||
# #商户号
|
||||
# merchant_no: 82229007392000A
|
||||
# #终端号
|
||||
# term_no: D9296400
|
||||
#运费代理商商户号(深圳立挚)
|
||||
delivery_merchant_no: 822584059990FYP
|
||||
#运费代理商终端号码(深圳立挚),M0780629(B2B收银台) M0780798(专业化扫码)
|
||||
delivery_term_no: N5811590
|
||||
@ -1,22 +1,19 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.suisung.mall.pay.mapper.PayConsumeDepositMapper">
|
||||
|
||||
<!-- 通用查询结果列 -->
|
||||
<sql id="Base_Column_List">
|
||||
deposit_id
|
||||
, order_id, deposit_trade_no, payment_channel_id, app_id, server_id, deposit_app_id_channel, deposit_subject, deposit_payment_type, deposit_trade_status, deposit_seller_id, deposit_seller_email, deposit_buyer_id, deposit_buyer_email, currency_id, currency_symbol_left, deposit_total_fee, deposit_quantity, deposit_price, deposit_body, deposit_gmt_create, deposit_gmt_payment, deposit_gmt_close, deposit_is_total_fee_adjust, deposit_use_coupon, deposit_discount, deposit_notify_time, deposit_notify_type, deposit_notify_id, deposit_sign_type, deposit_sign, deposit_extra_param, deposit_service, deposit_state, deposit_async, deposit_review, deposit_enable, store_id, user_id, chain_id
|
||||
, order_id, deposit_trade_no, payment_channel_id, app_id, server_id, deposit_app_id_channel, deposit_subject, deposit_payment_type, deposit_trade_status, deposit_seller_id, deposit_seller_email, deposit_buyer_id, deposit_buyer_email, currency_id, currency_symbol_left, deposit_total_fee, deposit_quantity, deposit_price, deposit_body, deposit_gmt_create, deposit_gmt_payment, deposit_gmt_close, deposit_is_total_fee_adjust, deposit_use_coupon, deposit_discount, deposit_notify_time, deposit_notify_type, deposit_notify_id, deposit_sign_type, deposit_sign, deposit_extra_param, lkl_combine_params, deposit_service, deposit_state, deposit_async, deposit_review, deposit_enable, store_id, user_id, chain_id
|
||||
</sql>
|
||||
<select id="getConsumeDepositSumOne" resultType="java.math.BigDecimal">
|
||||
SELECT
|
||||
sum( deposit_total_fee )
|
||||
sum( deposit_total_fee )
|
||||
FROM
|
||||
pay_consume_deposit
|
||||
pay_consume_deposit
|
||||
<where>
|
||||
subsite_id = #{subsite_id}
|
||||
And deposit_state = 1
|
||||
</where>
|
||||
</select>
|
||||
|
||||
|
||||
</mapper>
|
||||
|
||||
@ -93,19 +93,19 @@ public class LakalaController extends BaseControllerImpl {
|
||||
// List<String> clientIds = JSONUtil.toList(paramsJSON.getJSONArray("clientIds"), String.class);
|
||||
// return pushMessageService.sendMessage(clientIds, paramsJSON.getStr("title"), paramsJSON.getStr("content"), paramsJSON.getJSONObject("payload"));
|
||||
|
||||
JSONObject jsonObject = new JSONObject();
|
||||
String orderId = "DD-20250725-1";
|
||||
jsonObject.put("category", 1);
|
||||
jsonObject.put("orderId", "DD-20250725-1");
|
||||
jsonObject.put("storeId", 12);
|
||||
jsonObject.put("title", "有一笔已超时的订单!");
|
||||
jsonObject.put("message", "您有一笔已超时的订单[" + orderId + "],请及时处理。");
|
||||
mqMessageService.sendDelayMessage(jsonObject.toString(), 10000);
|
||||
return jsonObject;
|
||||
// JSONObject jsonObject = new JSONObject();
|
||||
// String orderId = "DD-20250725-1";
|
||||
// jsonObject.put("category", 1);
|
||||
// jsonObject.put("orderId", "DD-20250725-1");
|
||||
// jsonObject.put("storeId", 12);
|
||||
// jsonObject.put("title", "有一笔已超时的订单!");
|
||||
// jsonObject.put("message", "您有一笔已超时的订单[" + orderId + "],请及时处理。");
|
||||
// mqMessageService.sendDelayMessage(jsonObject.toString(), 10000);
|
||||
// return jsonObject;
|
||||
|
||||
// return shopOrderBaseService.sameCityOrderExpireSeconds(10000L);
|
||||
|
||||
// return sfExpressApiService.createSfExpressShop(66, "能辉超市", "桂平市", "广西壮族自治区贵港市桂平市广佰汇超市(桂平店)", "谢能坤", "17777525395", "110.07165452271", "23.369069486251");
|
||||
return sfExpressApiService.createSfExpressShop(66, "能辉超市", "桂平市", "广西壮族自治区贵港市桂平市广佰汇超市(桂平店)", "谢能坤", "17777525395", "110.07165452271", "23.369069486251");
|
||||
|
||||
}
|
||||
|
||||
|
||||
@ -541,7 +541,7 @@ public class ShopOrderReturnServiceImpl extends BaseServiceImpl<ShopOrderReturnM
|
||||
orderReturnItem.setOrder_item_id(returnItemInputVo.getOrder_item_id()); // 退货商品编号(DOT):0为退款
|
||||
orderReturnItem.setOrder_id(order_id); // 订单编号
|
||||
orderReturnItem.setReturn_item_num(return_item_num); // 退货商品编号(DOT):0为退款
|
||||
orderReturnItem.setReturn_item_subtotal(return_refund_amount); // 退款金额 = goods_payment_amount/goods_quantity, 因为涉及到折扣等等 或者 为订单中 order_payment_amount
|
||||
orderReturnItem.setReturn_item_subtotal(return_refund_amount); // 退款金额 = goods_payment_amount/goods_quantity, 因为涉及到折扣等等 或者为订单中 order_payment_amount
|
||||
orderReturnItem.setReturn_reason_id(return_reason_id); // 退款理由id
|
||||
orderReturnItem.setReturn_item_note(return_buyer_message); // 买家退货备注
|
||||
orderReturnItem.setReturn_item_image(return_item_image);
|
||||
@ -1418,6 +1418,7 @@ public class ShopOrderReturnServiceImpl extends BaseServiceImpl<ShopOrderReturnM
|
||||
if (shopOrderInfo == null) {
|
||||
throw new ApiException(I18nUtil._("该订单详情信息不存在!"));
|
||||
}
|
||||
|
||||
// 查询订单表是否出库
|
||||
if (shopOrderInfo.getOrder_is_out().equals(StateCode.ORDER_PICKING_STATE_YES)) {
|
||||
Long orderItemId = returnItem.getOrder_item_id();
|
||||
|
||||
@ -151,11 +151,11 @@ feieyun:
|
||||
ukey: vuzPtNVghXSxbZmr
|
||||
sf-express:
|
||||
# 顺丰同城 api 接口配置
|
||||
dev_id: 1711573316
|
||||
dev_id: 1715091463
|
||||
# 桂平顺丰平台商家id
|
||||
supplier_id: 2273453450129
|
||||
appid: 1711573316
|
||||
appkey: cd57608baa9c00fe1cda5f652b14240d
|
||||
appid: 1715091463
|
||||
appkey: 47466ae69c530f831395e1bc405639fb
|
||||
# dev_id: 1715091463
|
||||
# appid: 1715091463
|
||||
# appkey: 47466ae69c530f831395e1bc405639fb
|
||||
|
||||
Loading…
Reference in New Issue
Block a user