mirror of
https://codeup.aliyun.com/67c68d4e484ca2f0a13ac3c1/ydc/jsowell-charger-web.git
synced 2026-05-08 03:50:13 +08:00
update
This commit is contained in:
@@ -100,6 +100,8 @@ public enum ReturnCodeEnum {
|
|||||||
|
|
||||||
CODE_ORDER_COMPLETE_ERROR("00100047", "该订单已经结算完成!"),
|
CODE_ORDER_COMPLETE_ERROR("00100047", "该订单已经结算完成!"),
|
||||||
|
|
||||||
|
CODE_ADAPAY_MEMBER_IS_NULL_ERROR("00100048", "未查询到该运营商的结算账户"),
|
||||||
|
|
||||||
/* 个人桩 start */
|
/* 个人桩 start */
|
||||||
|
|
||||||
CODE_PILE_HAS_BEEN_BINDING_ERROR("00400001", "此桩已被绑定,请联系管理员!"),
|
CODE_PILE_HAS_BEEN_BINDING_ERROR("00400001", "此桩已被绑定,请联系管理员!"),
|
||||||
|
|||||||
@@ -10,6 +10,7 @@ import com.google.common.collect.Maps;
|
|||||||
import com.google.common.collect.Sets;
|
import com.google.common.collect.Sets;
|
||||||
import com.huifu.adapay.core.exception.BaseAdaPayException;
|
import com.huifu.adapay.core.exception.BaseAdaPayException;
|
||||||
import com.huifu.adapay.model.Payment;
|
import com.huifu.adapay.model.Payment;
|
||||||
|
import com.huifu.adapay.model.PaymentConfirm;
|
||||||
import com.huifu.adapay.model.PaymentReverse;
|
import com.huifu.adapay.model.PaymentReverse;
|
||||||
import com.huifu.adapay.model.Refund;
|
import com.huifu.adapay.model.Refund;
|
||||||
import com.jsowell.adapay.common.CreateAdaPaymentParam;
|
import com.jsowell.adapay.common.CreateAdaPaymentParam;
|
||||||
@@ -866,6 +867,34 @@ public class OrderBasicInfoServiceImpl implements IOrderBasicInfoService {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 订单分账逻辑
|
||||||
|
*/
|
||||||
|
private void ledgerAccount(OrderBasicInfo orderBasicInfo) throws BaseAdaPayException {
|
||||||
|
// 查询运营商有没有开通结算账户
|
||||||
|
String merchantId = orderBasicInfo.getMerchantId();
|
||||||
|
AdapayMemberAccount adapayMemberAccount = adapayMemberAccountService.selectByMerchantId(merchantId);
|
||||||
|
if (adapayMemberAccount == null) {
|
||||||
|
throw new BusinessException(ReturnCodeEnum.CODE_ADAPAY_MEMBER_IS_NULL_ERROR);
|
||||||
|
}
|
||||||
|
|
||||||
|
// 查询订单的交易id
|
||||||
|
String paymentId = "";
|
||||||
|
|
||||||
|
// 调汇付的分账接口 确认交易
|
||||||
|
Map<String, Object> confirm = Maps.newHashMap();
|
||||||
|
confirm.put("payment_id", paymentId);
|
||||||
|
confirm.put("order_no", "jsdk_confirm_" + System.currentTimeMillis());
|
||||||
|
confirm.put("confirm_amt", "0.01");
|
||||||
|
confirm.put("description", "description");
|
||||||
|
confirm.put("div_members", "");
|
||||||
|
Map<String, Object> response = PaymentConfirm.create(confirm);
|
||||||
|
|
||||||
|
|
||||||
|
// 保存分账接口返回的信息
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
// uniApp 发送停止充电订阅消息
|
// uniApp 发送停止充电订阅消息
|
||||||
private void sendMsg(OrderBasicInfo orderBasicInfo) {
|
private void sendMsg(OrderBasicInfo orderBasicInfo) {
|
||||||
try {
|
try {
|
||||||
|
|||||||
@@ -124,6 +124,7 @@
|
|||||||
<include refid="Base_Column_List"/>
|
<include refid="Base_Column_List"/>
|
||||||
from adapay_member_account
|
from adapay_member_account
|
||||||
where del_flag = '0'
|
where del_flag = '0'
|
||||||
|
and status = '1'
|
||||||
and merchant_id = #{merchantId,jdbcType=VARCHAR}
|
and merchant_id = #{merchantId,jdbcType=VARCHAR}
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user