|
@@ -311,7 +311,14 @@ public class ChinaumsSenselessPayService extends SuperService {
|
|
|
request.setSrcReserve(JsonUtil.toJson(Map.of("userId", userId, "oid", oid, "projectOid", projectOid, "orderNo", orderNo)));
|
|
request.setSrcReserve(JsonUtil.toJson(Map.of("userId", userId, "oid", oid, "projectOid", projectOid, "orderNo", orderNo)));
|
|
|
payProductParameter.setMeta(BeanUtil.bean2Map(request));
|
|
payProductParameter.setMeta(BeanUtil.bean2Map(request));
|
|
|
com.github.microservice.pay.client.ret.ResultContent<Object> collectionResultContent = senselessPayService.collection(payProductParameter);
|
|
com.github.microservice.pay.client.ret.ResultContent<Object> collectionResultContent = senselessPayService.collection(payProductParameter);
|
|
|
- return ResultContent.buildContent(collectionResultContent.getContent());
|
|
|
|
|
|
|
+ if (!collectionResultContent.getState().equals(ResultState.Success)){
|
|
|
|
|
+ return ResultContent.buildFail("请求失败");
|
|
|
|
|
+ }
|
|
|
|
|
+ Map<String, Object> bodyMap = BeanUtil.bean2Map(collectionResultContent.getContent());
|
|
|
|
|
+ if (bodyMap.get("respCode").equals("0000")){
|
|
|
|
|
+ return ResultContent.buildContent(collectionResultContent.getContent());
|
|
|
|
|
+ }
|
|
|
|
|
+ return ResultContent.buildFail(bodyMap.get("respDesc").toString());
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
public ResultContent refund(String projectOid, String oid, String userId, BigDecimal total, String orderNo, String refundOrderNo, String remark) {
|
|
public ResultContent refund(String projectOid, String oid, String userId, BigDecimal total, String orderNo, String refundOrderNo, String remark) {
|
|
@@ -368,7 +375,14 @@ public class ChinaumsSenselessPayService extends SuperService {
|
|
|
request.setSysSource(JsonUtil.toJson(Map.of("userId", userId, "oid", oid, "projectOid", projectOid, "orderNo", orderNo)));
|
|
request.setSysSource(JsonUtil.toJson(Map.of("userId", userId, "oid", oid, "projectOid", projectOid, "orderNo", orderNo)));
|
|
|
payProductParameter.setMeta(BeanUtil.bean2Map(request));
|
|
payProductParameter.setMeta(BeanUtil.bean2Map(request));
|
|
|
com.github.microservice.pay.client.ret.ResultContent<Object> refundResultContent = senselessPayService.refund(payProductParameter);
|
|
com.github.microservice.pay.client.ret.ResultContent<Object> refundResultContent = senselessPayService.refund(payProductParameter);
|
|
|
- return ResultContent.buildContent(refundResultContent.getContent());
|
|
|
|
|
|
|
+ if (!refundResultContent.getState().equals(ResultState.Success)){
|
|
|
|
|
+ return ResultContent.buildFail("请求失败");
|
|
|
|
|
+ }
|
|
|
|
|
+ Map<String, Object> bodyMap = BeanUtil.bean2Map(refundResultContent.getContent());
|
|
|
|
|
+ if (bodyMap.get("respCode").equals("0000")){
|
|
|
|
|
+ return ResultContent.buildContent(refundResultContent.getContent());
|
|
|
|
|
+ }
|
|
|
|
|
+ return ResultContent.buildFail(bodyMap.get("respDesc").toString());
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
public com.github.microservice.pay.client.ret.ResultContent<List<TransactionLogModel>> handlePay(String projectOid, String oid, String userId, BigDecimal total, String orderNo, String remark) {
|
|
public com.github.microservice.pay.client.ret.ResultContent<List<TransactionLogModel>> handlePay(String projectOid, String oid, String userId, BigDecimal total, String orderNo, String remark) {
|