This commit is contained in:
admin-lmm
2023-07-07 16:10:26 +08:00
5 changed files with 26 additions and 27 deletions

View File

@@ -18,9 +18,6 @@ import com.jsowell.pile.domain.MemberPlateNumberRelation;
import com.jsowell.pile.domain.PileAuthCard;
import com.jsowell.pile.dto.GenerateOrderDTO;
import com.jsowell.pile.service.*;
import com.jsowell.pile.vo.CarVinInfoVO;
import com.jsowell.pile.vo.uniapp.MemberVO;
import com.jsowell.pile.vo.uniapp.PersonalPileInfoVO;
import com.jsowell.wxpay.dto.WechatSendMsgDTO;
import com.jsowell.wxpay.service.WxAppletRemoteService;
import io.netty.channel.Channel;
@@ -28,7 +25,6 @@ import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
import java.util.List;
import java.util.Map;
/**
@@ -170,13 +166,13 @@ public class ConfirmStartChargingRequestHandler extends AbstractHandler{
}
}
} catch (BusinessException e){
transactionCode = "00000000000000000000000000000000";
transactionCode = Constants.ILLEGAL_TRANSACTION_CODE;
accountBalanceByteArr = BytesUtil.checkLengthAndBehindAppendZero(accountBalanceByteArr, 8);
authenticationFlagByteArr = Constants.zeroByteArray;
log.error("刷卡启动充电鉴权 error:{}, {}", e.getCode(), e.getMessage());
}catch (Exception e){
transactionCode = "00000000000000000000000000000000";
transactionCode = Constants.ILLEGAL_TRANSACTION_CODE;
accountBalanceByteArr = BytesUtil.checkLengthAndBehindAppendZero(accountBalanceByteArr, 8);
authenticationFlagByteArr = Constants.zeroByteArray;
@@ -224,13 +220,13 @@ public class ConfirmStartChargingRequestHandler extends AbstractHandler{
}
}
}catch (BusinessException e){
transactionCode = "00000000000000000000000000000000";
transactionCode = Constants.ILLEGAL_TRANSACTION_CODE;
accountBalanceByteArr = BytesUtil.checkLengthAndBehindAppendZero(accountBalanceByteArr, 8);
authenticationFlagByteArr = Constants.zeroByteArray;
log.error("VIN码启动充电鉴权 error:{}, {}", e.getCode(), e.getMessage());
}catch (Exception e) {
transactionCode = "00000000000000000000000000000000";
transactionCode = Constants.ILLEGAL_TRANSACTION_CODE;
accountBalanceByteArr = BytesUtil.checkLengthAndBehindAppendZero(accountBalanceByteArr, 8);
authenticationFlagByteArr = Constants.zeroByteArray;

View File

@@ -582,6 +582,10 @@ public class TransactionRecordsRequestHandler extends AbstractHandler {
return getResult(ykcDataProtocol, concatMsgBody);
}
/**
* 收到交易记录 处理订单
* @param data
*/
private void processOrder(TransactionRecordsData data) {
String transactionCode = data.getTransactionCode();
// 根据交易流水号查询订单信息

View File

@@ -1,7 +1,6 @@
package com.jsowell.pile.service.impl;
import com.alibaba.fastjson2.JSON;
import com.alibaba.fastjson2.JSONArray;
import com.alibaba.fastjson2.JSONObject;
import com.fasterxml.jackson.core.JsonProcessingException;
import com.github.pagehelper.PageHelper;
@@ -1868,22 +1867,22 @@ public class OrderBasicInfoServiceImpl implements IOrderBasicInfoService {
refundParams.put("notify_url", ADAPAY_REFUND_CALLBACK_URL);
// 分账对象信息
OrderBasicInfo orderBasicInfo = getOrderInfoByOrderCode(dto.getOrderCode());
if (orderBasicInfo != null) {
String adapayMemberId = adapayMemberAccountService.selectAdapayMemberIdByStationId(orderBasicInfo.getStationId());
if (StringUtils.isNotBlank(adapayMemberId)) {
JSONObject jsonObject = new JSONObject();
jsonObject.put("member_id", adapayMemberId);
jsonObject.put("amount", amount);
jsonObject.put("fee_flag", Constants.Y);
// 分账对象信息列表最多仅支持7个分账方json 数组形式
JSONArray jsonArray = new JSONArray();
jsonArray.add(jsonObject);
// 分账对象信息
refundParams.put("div_members", jsonArray.toString());
}
}
// OrderBasicInfo orderBasicInfo = getOrderInfoByOrderCode(dto.getOrderCode());
// if (orderBasicInfo != null) {
// String adapayMemberId = adapayMemberAccountService.selectAdapayMemberIdByStationId(orderBasicInfo.getStationId());
// if (StringUtils.isNotBlank(adapayMemberId)) {
// JSONObject jsonObject = new JSONObject();
// jsonObject.put("member_id", adapayMemberId);
// jsonObject.put("amount", amount);
// jsonObject.put("fee_flag", Constants.Y);
//
// // 分账对象信息列表最多仅支持7个分账方json 数组形式
// JSONArray jsonArray = new JSONArray();
// jsonArray.add(jsonObject);
// // 分账对象信息
// refundParams.put("div_members", jsonArray.toString());
// }
// }
try {
Map<String, Object> response = Refund.create(id, refundParams);
logger.info("汇付支付创建退款对象:{}", JSON.toJSONString(response));

View File

@@ -121,7 +121,7 @@ public class HttpUtils {
String jsonResult = EntityUtils.toString(httpEntity);
return JSON.readValue(jsonResult, HashMap.class);
} else {
log.error("微信支付错误信息:{}", EntityUtils.toString(httpEntity));
log.error("微信支付错误信息:{}, body:{}", EntityUtils.toString(httpEntity), body);
}
} catch (Exception e) {
log.error("HttpUtils.doPostWexin error", e);

View File

@@ -194,7 +194,7 @@
<el-table-column prop="nickName" label="用户昵称" align="center"/>
<el-table-column prop="mobileNumber" label="用户手机号" align="center"/>
<el-table-column prop="principalBalance" label="本金金额" align="center"/>
<el-table-column prop="giftBalance" label="赠送金额" align="center"/>
<!-- <el-table-column prop="giftBalance" label="赠送金额" align="center"/>-->
<el-table-column prop="totalAccountAmount" label="总金额" align="center"/>
</el-table>
<div class="marginTop"></div>