Skip to content
切换导航条
切换导航条
当前项目
正在载入...
登录
sibu-v-mall
/
sibu-v-mall-third-api
转到一个项目
切换导航栏
切换导航栏固定状态
项目
群组
代码片段
帮助
项目
活动
版本库
流水线
图表
问题
0
合并请求
0
维基
网络
创建新的问题
构建
提交
问题看板
文件
提交
网络
比较
分支
标签
94a3112d
由
刘嘉
编写于
2018-04-08 16:52:58 +0800
浏览文件
选项
浏览文件
标签
下载
电子邮件补丁
差异文件
菠萝派接口-发货接口、退款检测借口修改
1 个父辈
186ad9b8
隐藏空白字符变更
内嵌
并排
正在显示
3 个修改的文件
包含
12 行增加
和
13 行删除
com.sibu.orderHelper.integralMall/src/main/resources/mapper/PineappleMapper.xml
com.sibu.orderHelper.model/src/main/java/com/sibu/orderHelper/enums/PineappleRefundEnum.java
com.sibu.orderHelper.service/src/main/java/com/sibu/orderHelper/integral/service/pineapple/impl/CheckRefundStatusBizServiceImpl.java
com.sibu.orderHelper.integralMall/src/main/resources/mapper/PineappleMapper.xml
查看文件 @
94a3112
...
...
@@ -6,7 +6,7 @@
<!--检测退款订单-->
<select
id=
"countCheckRefundStatusResponse"
parameterType=
"java.util.Map"
resultType=
"java.lang.Integer"
>
SELECT COUNT(*) FROM im_order_refund WHERE order_code = #{orderCode} AND refund_status
IN ('1','2','3','5','7
')
SELECT COUNT(*) FROM im_order_refund WHERE order_code = #{orderCode} AND refund_status
NOT IN ('100','101','-128
')
</select>
<select
id=
"getIMDoingOrderBean"
parameterType=
"java.util.Map"
resultMap=
"iMDoingOrderBean"
>
...
...
@@ -34,7 +34,7 @@
<select
id=
"childrenrefundStatusByCourse"
parameterType=
"java.lang.String"
resultMap=
"checkRefundStatusBean"
>
SELECT r.refund_code,r1.name,r.refund_status FROM im_refund_order_item r1
LEFT JOIN im_order_refund r ON r1.refund_id = r.refund_id
WHERE r.refund_status
IN ('1','2','3','5
') AND r.order_code = #{orderCode}
WHERE r.refund_status
NOT IN ('7','100','101','-128
') AND r.order_code = #{orderCode}
</select>
...
...
com.sibu.orderHelper.model/src/main/java/com/sibu/orderHelper/enums/PineappleRefundEnum.java
查看文件 @
94a3112
...
...
@@ -15,13 +15,13 @@ import java.util.List;
* @description 菠萝派商城退款验证退款状态举类
*/
public
enum
PineappleRefundEnum
{
JH_07
(
"JH_07"
,
"没有退款"
,
new
ArrayList
<>()),
JH_01
(
"JH_01"
,
"买家已经申请退款等待卖家同意"
,
Arrays
.
asList
(
OrderRefundStatusEnum
.
WAIT_SELLER_AUDIT
.
getCode
())),
JH_02
(
"JH_02"
,
"卖家已经同意退款等待买家退货"
,
Arrays
.
asList
(
OrderRefundStatusEnum
.
WAIT_CUSTOMER_REFUND_GOODS
.
getCode
())),
JH_02
(
"JH_02"
,
"卖家已经同意退款等待买家退货"
,
Arrays
.
asList
(
OrderRefundStatusEnum
.
WAIT_CUSTOMER_REFUND_GOODS
.
getCode
()
,
OrderRefundStatusEnum
.
AGREE_CHANGE_GOODS
.
getCode
()
)),
JH_03
(
"JH_03"
,
"买家已经退货等待卖家确认收货"
,
Arrays
.
asList
(
OrderRefundStatusEnum
.
WAIT_SELLER_RECEIVE_GOODS
.
getCode
(),
OrderRefundStatusEnum
.
WAIT_SELLER_AUDIT_RECEIVE_GOODS
.
getCode
())),
JH_04
(
"JH_04"
,
"卖家拒绝退款"
,
new
ArrayList
<>(
)),
JH_04
(
"JH_04"
,
"卖家拒绝退款"
,
Arrays
.
asList
(
OrderRefundStatusEnum
.
WAIT_CUSTOMER_AUDIT
.
getCode
(),
OrderRefundStatusEnum
.
DISAGREE_REFUNDING_MONEY
.
getCode
(),
OrderRefundStatusEnum
.
DISAGREE_CHANGE_GOODS
.
getCode
(),
OrderRefundStatusEnum
.
DENY_CHANGE_GOODS
.
getCode
()
)),
JH_05
(
"JH_05"
,
"退款关闭"
,
new
ArrayList
<>()),
JH_06
(
"JH_06"
,
"退款成功"
,
Arrays
.
asList
(
OrderRefundStatusEnum
.
SELLER_REFUNDING_MONEY_SUCCESS
.
getCode
())),
JH_07
(
"JH_07"
,
"没有退款"
,
new
ArrayList
<>()),
JH_99
(
"JH_99"
,
"其他"
,
new
ArrayList
<>());
private
String
code
;
// 错误代码
...
...
com.sibu.orderHelper.service/src/main/java/com/sibu/orderHelper/integral/service/pineapple/impl/CheckRefundStatusBizServiceImpl.java
查看文件 @
94a3112
...
...
@@ -16,10 +16,7 @@ import org.apache.log4j.Logger;
import
org.springframework.stereotype.Service
;
import
javax.annotation.Resource
;
import
java.util.ArrayList
;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.*
;
@Service
public
class
CheckRefundStatusBizServiceImpl
extends
AbstractBizService
<
CheckRefundStatusRequest
>{
...
...
@@ -53,7 +50,7 @@ public class CheckRefundStatusBizServiceImpl extends AbstractBizService<CheckRef
}
//看是否全额退款 查询退款成功
checkRefundStatusBeanList
=
pineappleDao
.
childrenrefundStatusBySuccess
(
IMDoingOrderBean
.
getOrderCode
());
if
(
PayOrderStatus
.
RefundSuccess
.
getCode
()
==
IMDoingOrderBean
.
getOrderStatus
().
intValue
())
{
if
(
PayOrderStatus
.
RefundSuccess
.
getCode
()==
IMDoingOrderBean
.
getOrderStatus
().
intValue
())
{
if
(
StringUtil
.
isNull
(
checkRefundStatusBeanList
)
||
checkRefundStatusBeanList
.
isEmpty
())
{
log
.
error
(
String
.
format
(
"订单号:%s查询不到退款成功记录,请求method:%s,appket:%s"
,
callRequest
.
getBizModel
().
getOrderID
(),
callRequest
.
getRequest
().
getMethod
(),
callRequest
.
getRequest
().
getAppkey
()));
throw
new
BizException
(
String
.
format
(
"订单号:%s查询不到退款成功记录,请求method:%s,appket:%s"
,
callRequest
.
getBizModel
().
getOrderID
(),
callRequest
.
getRequest
().
getMethod
(),
callRequest
.
getRequest
().
getAppkey
()));
...
...
@@ -88,13 +85,15 @@ public class CheckRefundStatusBizServiceImpl extends AbstractBizService<CheckRef
}
else
{
checkRefundStatusBeanList
=
pineappleDao
.
childrenrefundStatusByCourse
(
IMDoingOrderBean
.
getOrderCode
());
if
(!
StringUtil
.
isNull
(
checkRefundStatusBeanList
)
&&
!
checkRefundStatusBeanList
.
isEmpty
()){
Optional
<
CheckRefundStatusBean
>
entity
=
checkRefundStatusBeanList
.
stream
().
findFirst
();
checkRefundStatusResponse
.
setRefundStatus
(
PineappleRefundEnum
.
resolveByPlatformRefundStatus
(
Integer
.
valueOf
(
entity
.
get
().
getRefundStatus
())).
getCode
());
checkRefundStatusResponse
.
setSubmessage
(
PineappleRefundEnum
.
resolveByPlatformRefundStatus
(
Integer
.
valueOf
(
entity
.
get
().
getRefundStatus
())).
getMsg
());
checkRefundStatusResponse
.
setRefundStatusdescription
(
PineappleRefundEnum
.
resolveByPlatformRefundStatus
(
Integer
.
valueOf
(
entity
.
get
().
getRefundStatus
())).
getMsg
());
for
(
CheckRefundStatusBean
bean
:
checkRefundStatusBeanList
)
{
bean
.
setRefundStatusdescription
(
PineappleRefundEnum
.
resolveByPlatformRefundStatus
(
Integer
.
valueOf
(
bean
.
getRefundStatus
())).
getMsg
());
bean
.
setRefundStatus
(
PineappleRefundEnum
.
resolveByPlatformRefundStatus
(
Integer
.
valueOf
(
bean
.
getRefundStatus
())).
getCode
());
}
checkRefundStatusResponse
.
setRefundStatus
(
PineappleRefundEnum
.
JH_99
.
getCode
());
checkRefundStatusResponse
.
setSubmessage
(
PineappleRefundEnum
.
JH_99
.
getMsg
());
checkRefundStatusResponse
.
setRefundStatusdescription
(
PineappleRefundEnum
.
JH_99
.
getMsg
());
checkRefundStatusResponse
.
setCode
(
PineappleEnum
.
SUCCESS
.
getCode
());
checkRefundStatusResponse
.
setMessage
(
PineappleEnum
.
SUCCESS
.
getMsg
());
checkRefundStatusResponse
.
setChildrenrefundStatus
(
checkRefundStatusBeanList
);
...
...
请
注册
或
登录
后发表评论