提交 a44c43f3 authored 作者: huningning's avatar huningning

Merge branch 'v6.4_transportation_20231110' into test

...@@ -50,6 +50,9 @@ public class OrderGoodsTruckBindDaoImpl extends BaseDaoImpl<OrderGoodsTruckBindM ...@@ -50,6 +50,9 @@ public class OrderGoodsTruckBindDaoImpl extends BaseDaoImpl<OrderGoodsTruckBindM
return Optional.ofNullable(getOne(lQrWrapper() return Optional.ofNullable(getOne(lQrWrapper()
.eq(OrderGoodsTruckBind::getOrderGoodsNo, orderGoodsNo) .eq(OrderGoodsTruckBind::getOrderGoodsNo, orderGoodsNo)
.eq(OrderGoodsTruckBind::getTruckNo, truckNo) .eq(OrderGoodsTruckBind::getTruckNo, truckNo)
.in(OrderGoodsTruckBind::getStatus, OrderGoodsTruckBindEnum.Status.NORMAL.getCode(),
OrderGoodsTruckBindEnum.Status.GET.getCode()
)
)); ));
} }
......
...@@ -18,6 +18,7 @@ import com.clx.performance.param.pc.payment.PayParam; ...@@ -18,6 +18,7 @@ import com.clx.performance.param.pc.payment.PayParam;
import com.clx.performance.param.pc.payment.PayUnitDTO; import com.clx.performance.param.pc.payment.PayUnitDTO;
import com.clx.performance.param.pc.payment.PayUserDTO; import com.clx.performance.param.pc.payment.PayUserDTO;
import com.clx.performance.service.ThirdPartRequestLogService; import com.clx.performance.service.ThirdPartRequestLogService;
import com.google.gson.Gson;
import com.msl.common.dto.HttpDTO; import com.msl.common.dto.HttpDTO;
import com.msl.common.enums.ResultCodeEnum; import com.msl.common.enums.ResultCodeEnum;
import com.msl.common.exception.ServiceSystemException; import com.msl.common.exception.ServiceSystemException;
...@@ -169,9 +170,11 @@ public class PaymentServiceImpl implements PaymentService { ...@@ -169,9 +170,11 @@ public class PaymentServiceImpl implements PaymentService {
})) }))
.peek(dto -> log.info("http请求返回------dto->{}", dto)) .peek(dto -> log.info("http请求返回------dto->{}", dto))
.mapTry(dto -> EncryptUtil.decrypt(dto.getData(), TRANSPORT_KEY)) .mapTry(dto -> EncryptUtil.decrypt(dto.getData(), TRANSPORT_KEY))
.map(this::covertResult)
.mapWithObj(new TypeReference<Result<Object>>() {
}, this::covertResult)
.peek(result -> thirdPartRequestLogService.updateResult(httpLogId, result)) .peek(result -> thirdPartRequestLogService.updateResult(httpLogId, result))
.filter(Result::succeed) // .filter(Result::succeed)
.orElseThrow(); .orElseThrow();
} catch (GeneralSecurityException e) { } catch (GeneralSecurityException e) {
log.error("解密失败", e); log.error("解密失败", e);
...@@ -179,9 +182,12 @@ public class PaymentServiceImpl implements PaymentService { ...@@ -179,9 +182,12 @@ public class PaymentServiceImpl implements PaymentService {
} }
} }
private <T> Result<?> covertResult(String result) { private <T> Result<T> covertResult(String result, TypeReference<Result<T>> reference) {
return JSON.parseObject(result, Result.class); return new Gson().fromJson(result, reference.getType());
} }
} }
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论