Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
O
oms-ci-test
概览
概览
详情
活动
周期分析
版本库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
统计图
问题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程表
图表
维基
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
test-ci
oms-ci-test
Commits
9ac670b8
提交
9ac670b8
authored
9月 12, 2023
作者:
zhenjie
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
修改关闭订单
上级
88b2ff3e
隐藏空白字符变更
内嵌
并排
正在显示
3 个修改的文件
包含
14 行增加
和
10 行删除
+14
-10
PaymentAppApi.java
src/main/java/com/mmc/oms/feign/PaymentAppApi.java
+2
-1
PaymentAppApiHystrix.java
.../java/com/mmc/oms/feign/hystrix/PaymentAppApiHystrix.java
+1
-1
UavOrderServiceImpl.java
...ava/com/mmc/oms/service/uav/impl/UavOrderServiceImpl.java
+11
-8
没有找到文件。
src/main/java/com/mmc/oms/feign/PaymentAppApi.java
浏览文件 @
9ac670b8
...
@@ -6,6 +6,7 @@ import com.mmc.oms.model.vo.ApplyRefundVO;
...
@@ -6,6 +6,7 @@ import com.mmc.oms.model.vo.ApplyRefundVO;
import
org.springframework.cloud.openfeign.FeignClient
;
import
org.springframework.cloud.openfeign.FeignClient
;
import
org.springframework.web.bind.annotation.PostMapping
;
import
org.springframework.web.bind.annotation.PostMapping
;
import
org.springframework.web.bind.annotation.RequestBody
;
import
org.springframework.web.bind.annotation.RequestBody
;
import
org.springframework.web.bind.annotation.RequestHeader
;
/**
/**
* @author: zj
* @author: zj
...
@@ -15,5 +16,5 @@ import org.springframework.web.bind.annotation.RequestBody;
...
@@ -15,5 +16,5 @@ import org.springframework.web.bind.annotation.RequestBody;
public
interface
PaymentAppApi
{
public
interface
PaymentAppApi
{
@PostMapping
(
"wechat/applyRefund"
)
@PostMapping
(
"wechat/applyRefund"
)
public
ResultBody
applyRefund
(
@RequestBody
ApplyRefundVO
applyRefundVO
);
public
ResultBody
applyRefund
(
@RequestBody
ApplyRefundVO
applyRefundVO
,
@RequestHeader
String
token
);
}
}
src/main/java/com/mmc/oms/feign/hystrix/PaymentAppApiHystrix.java
浏览文件 @
9ac670b8
...
@@ -13,7 +13,7 @@ import lombok.extern.slf4j.Slf4j;
...
@@ -13,7 +13,7 @@ import lombok.extern.slf4j.Slf4j;
@Slf4j
@Slf4j
public
class
PaymentAppApiHystrix
implements
PaymentAppApi
{
public
class
PaymentAppApiHystrix
implements
PaymentAppApi
{
@Override
@Override
public
ResultBody
applyRefund
(
ApplyRefundVO
applyRefundVO
)
{
public
ResultBody
applyRefund
(
ApplyRefundVO
applyRefundVO
,
String
token
)
{
log
.
error
(
"PaymentAppApiHystrix applyRefund ---- param:{}"
,
JSONObject
.
toJSONString
(
applyRefundVO
));
log
.
error
(
"PaymentAppApiHystrix applyRefund ---- param:{}"
,
JSONObject
.
toJSONString
(
applyRefundVO
));
return
ResultBody
.
error
(
"调用微信退款失败"
);
return
ResultBody
.
error
(
"调用微信退款失败"
);
}
}
...
...
src/main/java/com/mmc/oms/service/uav/impl/UavOrderServiceImpl.java
浏览文件 @
9ac670b8
...
@@ -281,14 +281,17 @@ public class UavOrderServiceImpl implements UavOrderService {
...
@@ -281,14 +281,17 @@ public class UavOrderServiceImpl implements UavOrderService {
return
resultBody
;
return
resultBody
;
}
}
// 微信退款
// 微信退款
ApplyRefundVO
applyRefundVO
=
new
ApplyRefundVO
();
if
(
"wechatpay"
.
equals
(
uavOrderDO
.
getPayType
()))
{
applyRefundVO
.
setOutTradeNo
(
uavOrderDO
.
getOrderNo
());
ApplyRefundVO
applyRefundVO
=
new
ApplyRefundVO
();
applyRefundVO
.
setReason
(
"关闭订单"
);
applyRefundVO
.
setOutTradeNo
(
uavOrderDO
.
getOrderNo
());
applyRefundVO
.
setRefund
(
uavOrderDO
.
getOtherAmount
().
multiply
(
BigDecimal
.
valueOf
(
100
)).
longValue
());
applyRefundVO
.
setReason
(
"关闭商城订单"
);
ResultBody
applyRefund
=
paymentAppApi
.
applyRefund
(
applyRefundVO
);
applyRefundVO
.
setRefund
(
uavOrderDO
.
getOtherAmount
().
multiply
(
BigDecimal
.
valueOf
(
100
)).
longValue
());
if
(!
applyRefund
.
getCode
().
equals
(
ResultEnum
.
SUCCESS
.
getResultCode
()))
{
ResultBody
applyRefund
=
paymentAppApi
.
applyRefund
(
applyRefundVO
,
token
);
TransactionAspectSupport
.
currentTransactionStatus
().
setRollbackOnly
();
log
.
info
(
"applyRefund res:{}"
,
applyRefund
);
throw
new
BizException
(
"关闭订单失败!"
);
if
(!
applyRefund
.
getCode
().
equals
(
ResultEnum
.
SUCCESS
.
getResultCode
()))
{
TransactionAspectSupport
.
currentTransactionStatus
().
setRollbackOnly
();
throw
new
BizException
(
"关闭订单失败!"
);
}
}
}
return
ResultBody
.
success
();
return
ResultBody
.
success
();
}
}
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论