记得上下班打卡 | git大法好,push需谨慎
Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
L
liquidnet-bus-v1
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
董敬伟
liquidnet-bus-v1
Commits
f69c2ecd
Commit
f69c2ecd
authored
Jun 06, 2021
by
jiangxiulong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
异常处理更换 同样的操作swith整合 URL改成配置
parent
d89bf177
Changes
12
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
156 additions
and
283 deletions
+156
-283
RefundApplyParam.java
...m/liquidnet/service/kylin/dto/param/RefundApplyParam.java
+2
-0
KylinOrderRefundAdminController.java
...oller/zhengzai/kylin/KylinOrderRefundAdminController.java
+26
-22
KylinOrderRefundBatchAdminController.java
.../zhengzai/kylin/KylinOrderRefundBatchAdminController.java
+0
-2
application-dev.yml
...t-client-admin-web/src/main/resources/application-dev.yml
+4
-0
application-prod.yml
...-client-admin-web/src/main/resources/application-prod.yml
+3
-0
application-test.yml
...-client-admin-web/src/main/resources/application-test.yml
+3
-0
KylinOrderRefundsServiceImpl.java
...gzai/kylin/service/impl/KylinOrderRefundsServiceImpl.java
+61
-141
KylinRefundExecuteServiceImpl.java
...zai/kylin/service/impl/KylinRefundExecuteServiceImpl.java
+13
-29
KylinRefundPerformancesAdminServiceImpl.java
...service/impl/KylinRefundPerformancesAdminServiceImpl.java
+0
-3
KylinRefundsStatusServiceImpl.java
...zai/kylin/service/impl/KylinRefundsStatusServiceImpl.java
+44
-80
liquidnet-service-kylin-dev.yml
...s-config/liquidnet-config/liquidnet-service-kylin-dev.yml
+0
-3
liquidnet-service-kylin-test.yml
...-config/liquidnet-config/liquidnet-service-kylin-test.yml
+0
-3
No files found.
liquidnet-bus-api/liquidnet-service-kylin-api/src/main/java/com/liquidnet/service/kylin/dto/param/RefundApplyParam.java
View file @
f69c2ecd
...
@@ -33,4 +33,6 @@ public class RefundApplyParam implements Serializable {
...
@@ -33,4 +33,6 @@ public class RefundApplyParam implements Serializable {
private
String
refuse
;
private
String
refuse
;
private
String
type
;
}
}
liquidnet-bus-client/liquidnet-client-admin/liquidnet-client-admin-web/src/main/java/com/liquidnet/client/admin/web/controller/zhengzai/kylin/KylinOrderRefundAdminController.java
View file @
f69c2ecd
...
@@ -6,6 +6,7 @@ import com.liquidnet.client.admin.common.core.domain.AjaxResult;
...
@@ -6,6 +6,7 @@ import com.liquidnet.client.admin.common.core.domain.AjaxResult;
import
com.liquidnet.client.admin.common.core.page.TableDataInfo
;
import
com.liquidnet.client.admin.common.core.page.TableDataInfo
;
import
com.liquidnet.client.admin.zhengzai.kylin.service.impl.KylinOrderRefundsServiceImpl
;
import
com.liquidnet.client.admin.zhengzai.kylin.service.impl.KylinOrderRefundsServiceImpl
;
import
com.liquidnet.client.admin.zhengzai.kylin.service.impl.KylinOrderTicketsAdminServiceImpl
;
import
com.liquidnet.client.admin.zhengzai.kylin.service.impl.KylinOrderTicketsAdminServiceImpl
;
import
com.liquidnet.service.base.ResponseDto
;
import
com.liquidnet.service.kylin.constant.KylinTableStatusConst
;
import
com.liquidnet.service.kylin.constant.KylinTableStatusConst
;
import
com.liquidnet.service.kylin.dao.OrderRefundDao
;
import
com.liquidnet.service.kylin.dao.OrderRefundDao
;
import
com.liquidnet.service.kylin.dto.param.RefundApplyParam
;
import
com.liquidnet.service.kylin.dto.param.RefundApplyParam
;
...
@@ -19,8 +20,6 @@ import org.springframework.stereotype.Controller;
...
@@ -19,8 +20,6 @@ import org.springframework.stereotype.Controller;
import
org.springframework.ui.ModelMap
;
import
org.springframework.ui.ModelMap
;
import
org.springframework.web.bind.annotation.*
;
import
org.springframework.web.bind.annotation.*
;
import
javax.websocket.server.PathParam
;
/**
/**
* <p>
* <p>
* 后台单订单退款 服务实现类
* 后台单订单退款 服务实现类
...
@@ -88,11 +87,11 @@ public class KylinOrderRefundAdminController extends BaseController {
...
@@ -88,11 +87,11 @@ public class KylinOrderRefundAdminController extends BaseController {
@ResponseBody
@ResponseBody
public
AjaxResult
refundApply
(
RefundApplyParam
refundApplyParam
)
{
public
AjaxResult
refundApply
(
RefundApplyParam
refundApplyParam
)
{
try
{
try
{
Boolean
res
=
kylinOrderRefundsServiceImpl
.
refundApply
(
refundApplyParam
);
ResponseDto
res
=
kylinOrderRefundsServiceImpl
.
refundApply
(
refundApplyParam
);
if
(
res
)
{
if
(
res
.
isSuccess
()
)
{
return
success
();
return
success
();
}
else
{
}
else
{
return
error
(
"申请退款失败"
);
return
error
(
res
.
getMessage
()
);
}
}
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
return
error
(
e
.
getMessage
());
return
error
(
e
.
getMessage
());
...
@@ -104,11 +103,12 @@ public class KylinOrderRefundAdminController extends BaseController {
...
@@ -104,11 +103,12 @@ public class KylinOrderRefundAdminController extends BaseController {
@ResponseBody
@ResponseBody
public
AjaxResult
refundCancel
(
RefundApplyParam
refundApplyParam
)
{
public
AjaxResult
refundCancel
(
RefundApplyParam
refundApplyParam
)
{
try
{
try
{
Boolean
res
=
kylinOrderRefundsServiceImpl
.
refundCancel
(
refundApplyParam
);
refundApplyParam
.
setType
(
"cancel"
);
if
(
res
)
{
ResponseDto
res
=
kylinOrderRefundsServiceImpl
.
refundCheckStatus
(
refundApplyParam
);
if
(
res
.
isSuccess
())
{
return
success
();
return
success
();
}
else
{
}
else
{
return
error
(
"取消退款失败"
);
return
error
(
res
.
getMessage
()
);
}
}
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
return
error
(
e
.
getMessage
());
return
error
(
e
.
getMessage
());
...
@@ -120,12 +120,12 @@ public class KylinOrderRefundAdminController extends BaseController {
...
@@ -120,12 +120,12 @@ public class KylinOrderRefundAdminController extends BaseController {
@ResponseBody
@ResponseBody
public
AjaxResult
refundReapply
(
RefundApplyParam
refundApplyParam
)
{
public
AjaxResult
refundReapply
(
RefundApplyParam
refundApplyParam
)
{
try
{
try
{
Boolean
res
=
kylinOrderRefundsServiceImpl
.
refundReapply
(
refundApplyParam
);
refundApplyParam
.
setType
(
"reapply"
);
if
(
res
)
{
ResponseDto
res
=
kylinOrderRefundsServiceImpl
.
refundCheckStatus
(
refundApplyParam
);
if
(
res
.
isSuccess
())
{
return
success
();
return
success
();
}
else
{
}
else
{
// 不是重新发起退款,而是重新发起退款审核
return
error
(
res
.
getMessage
());
return
error
(
"再次发起退款审核失败"
);
}
}
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
return
error
(
e
.
getMessage
());
return
error
(
e
.
getMessage
());
...
@@ -138,18 +138,20 @@ public class KylinOrderRefundAdminController extends BaseController {
...
@@ -138,18 +138,20 @@ public class KylinOrderRefundAdminController extends BaseController {
@ResponseBody
@ResponseBody
public
AjaxResult
refundReview
(
RefundApplyParam
refundApplyParam
)
{
public
AjaxResult
refundReview
(
RefundApplyParam
refundApplyParam
)
{
try
{
try
{
Boolean
res
=
false
;
ResponseDto
res
=
null
;
Integer
status
=
refundApplyParam
.
getStatus
();
Integer
status
=
refundApplyParam
.
getStatus
();
if
(
status
==
KylinTableStatusConst
.
ORDER_REFUND_STATUS_APPROVED
)
{
// 通过
if
(
status
==
KylinTableStatusConst
.
ORDER_REFUND_STATUS_APPROVED
)
{
// 通过
res
=
kylinOrderRefundsServiceImpl
.
refundApproved
(
refundApplyParam
);
refundApplyParam
.
setType
(
"approved"
);
res
=
kylinOrderRefundsServiceImpl
.
refundCheckStatus
(
refundApplyParam
);
}
}
if
(
status
==
KylinTableStatusConst
.
ORDER_REFUND_STATUS_REJECT
)
{
// 驳回
if
(
status
==
KylinTableStatusConst
.
ORDER_REFUND_STATUS_REJECT
)
{
// 驳回
res
=
kylinOrderRefundsServiceImpl
.
refundReject
(
refundApplyParam
);
refundApplyParam
.
setType
(
"reject"
);
res
=
kylinOrderRefundsServiceImpl
.
refundCheckStatus
(
refundApplyParam
);
}
}
if
(
res
)
{
if
(
res
.
isSuccess
()
)
{
return
success
();
return
success
();
}
else
{
}
else
{
return
error
(
"审核退款失败"
);
return
error
(
res
.
getMessage
()
);
}
}
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
return
error
(
e
.
getMessage
());
return
error
(
e
.
getMessage
());
...
@@ -162,18 +164,20 @@ public class KylinOrderRefundAdminController extends BaseController {
...
@@ -162,18 +164,20 @@ public class KylinOrderRefundAdminController extends BaseController {
@ResponseBody
@ResponseBody
public
AjaxResult
refundExecute
(
RefundApplyParam
refundApplyParam
)
{
public
AjaxResult
refundExecute
(
RefundApplyParam
refundApplyParam
)
{
try
{
try
{
Boolean
res
=
false
;
ResponseDto
res
=
null
;
Integer
status
=
refundApplyParam
.
getStatus
();
Integer
status
=
refundApplyParam
.
getStatus
();
if
(
status
==
KylinTableStatusConst
.
ORDER_REFUND_STATUS_UNFILLED
)
{
// 通过
if
(
status
==
KylinTableStatusConst
.
ORDER_REFUND_STATUS_UNFILLED
)
{
// 通过
res
=
kylinOrderRefundsServiceImpl
.
refundUnfilled
(
refundApplyParam
);
refundApplyParam
.
setType
(
"unfilled"
);
res
=
kylinOrderRefundsServiceImpl
.
refundCheckStatus
(
refundApplyParam
);
}
}
if
(
status
==
KylinTableStatusConst
.
ORDER_REFUND_STATUS_REFUSE
)
{
// 驳回
if
(
status
==
KylinTableStatusConst
.
ORDER_REFUND_STATUS_REFUSE
)
{
// 驳回
res
=
kylinOrderRefundsServiceImpl
.
refundRefuse
(
refundApplyParam
);
refundApplyParam
.
setType
(
"refuse"
);
res
=
kylinOrderRefundsServiceImpl
.
refundCheckStatus
(
refundApplyParam
);
}
}
if
(
res
)
{
if
(
res
.
isSuccess
()
)
{
return
success
();
return
success
();
}
else
{
}
else
{
return
error
(
"审核退款失败"
);
return
error
(
res
.
getMessage
()
);
}
}
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
return
error
(
e
.
getMessage
());
return
error
(
e
.
getMessage
());
...
...
liquidnet-bus-client/liquidnet-client-admin/liquidnet-client-admin-web/src/main/java/com/liquidnet/client/admin/web/controller/zhengzai/kylin/KylinOrderRefundBatchAdminController.java
View file @
f69c2ecd
...
@@ -6,11 +6,9 @@ import com.liquidnet.client.admin.common.core.domain.AjaxResult;
...
@@ -6,11 +6,9 @@ import com.liquidnet.client.admin.common.core.domain.AjaxResult;
import
com.liquidnet.client.admin.common.core.page.TableDataInfo
;
import
com.liquidnet.client.admin.common.core.page.TableDataInfo
;
import
com.liquidnet.client.admin.zhengzai.kylin.service.impl.KylinRefundPerformancesAdminServiceImpl
;
import
com.liquidnet.client.admin.zhengzai.kylin.service.impl.KylinRefundPerformancesAdminServiceImpl
;
import
com.liquidnet.service.kylin.dao.OrderRefundBatchDao
;
import
com.liquidnet.service.kylin.dao.OrderRefundBatchDao
;
import
com.liquidnet.service.kylin.dto.param.RefundApplyParam
;
import
com.liquidnet.service.kylin.dto.param.RefundBatchApplyParam
;
import
com.liquidnet.service.kylin.dto.param.RefundBatchApplyParam
;
import
com.liquidnet.service.kylin.dto.param.RefundBatchSearchParam
;
import
com.liquidnet.service.kylin.dto.param.RefundBatchSearchParam
;
import
com.liquidnet.service.kylin.dto.vo.KylinOrderRefundBatchesVo
;
import
com.liquidnet.service.kylin.dto.vo.KylinOrderRefundBatchesVo
;
import
com.liquidnet.service.kylin.dto.vo.OrderDetailsVo
;
import
org.apache.shiro.authz.annotation.RequiresPermissions
;
import
org.apache.shiro.authz.annotation.RequiresPermissions
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Controller
;
import
org.springframework.stereotype.Controller
;
...
...
liquidnet-bus-client/liquidnet-client-admin/liquidnet-client-admin-web/src/main/resources/application-dev.yml
View file @
f69c2ecd
...
@@ -24,6 +24,10 @@ liquidnet:
...
@@ -24,6 +24,10 @@ liquidnet:
username
:
testmall
username
:
testmall
password
:
zhengzai!mYT
password
:
zhengzai!mYT
database-name
:
dev_ln_scene
database-name
:
dev_ln_scene
url-refund
:
apply
:
"
http://devpay.zhengzai.tv/refund/single"
notify
:
"
https://devzuul.zhengzai.tv/kylin/refund/callback"
# end-dev-这里是配置信息基本值
# end-dev-这里是配置信息基本值
spring
:
spring
:
...
...
liquidnet-bus-client/liquidnet-client-admin/liquidnet-client-admin-web/src/main/resources/application-prod.yml
View file @
f69c2ecd
...
@@ -24,6 +24,9 @@ liquidnet:
...
@@ -24,6 +24,9 @@ liquidnet:
username
:
testmall
username
:
testmall
password
:
zhengzai!mYT
password
:
zhengzai!mYT
database-name
:
test_ln_scene
database-name
:
test_ln_scene
url-refund
:
apply
:
"
http://pay.zhengzai.tv/refund/single"
notify
:
"
https://zuul.zhengzai.tv/kylin/refund/callback"
# end-dev-这里是配置信息基本值
# end-dev-这里是配置信息基本值
spring
:
spring
:
...
...
liquidnet-bus-client/liquidnet-client-admin/liquidnet-client-admin-web/src/main/resources/application-test.yml
View file @
f69c2ecd
...
@@ -24,6 +24,9 @@ liquidnet:
...
@@ -24,6 +24,9 @@ liquidnet:
username
:
zhengzai
username
:
zhengzai
password
:
$hAh4SGcDQ
password
:
$hAh4SGcDQ
database-name
:
test_ln_scene
database-name
:
test_ln_scene
url-refund
:
apply
:
"
http://testpay.zhengzai.tv/refund/single"
notify
:
"
https://zuul.zhengzai.tv/kylin/refund/callback"
# end-dev-这里是配置信息基本值
# end-dev-这里是配置信息基本值
spring
:
spring
:
...
...
liquidnet-bus-client/liquidnet-client-admin/liquidnet-client-admin-zhengzai/src/main/java/com/liquidnet/client/admin/zhengzai/kylin/service/impl/KylinOrderRefundsServiceImpl.java
View file @
f69c2ecd
This diff is collapsed.
Click to expand it.
liquidnet-bus-client/liquidnet-client-admin/liquidnet-client-admin-zhengzai/src/main/java/com/liquidnet/client/admin/zhengzai/kylin/service/impl/KylinRefundExecuteServiceImpl.java
View file @
f69c2ecd
...
@@ -2,6 +2,7 @@ package com.liquidnet.client.admin.zhengzai.kylin.service.impl;
...
@@ -2,6 +2,7 @@ package com.liquidnet.client.admin.zhengzai.kylin.service.impl;
import
com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper
;
import
com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper
;
import
com.liquidnet.common.cache.redis.util.RedisUtil
;
import
com.liquidnet.common.cache.redis.util.RedisUtil
;
import
com.liquidnet.service.base.ResponseDto
;
import
com.liquidnet.service.kylin.constant.KylinTableStatusConst
;
import
com.liquidnet.service.kylin.constant.KylinTableStatusConst
;
import
com.liquidnet.service.kylin.dto.param.RefundApplyParam
;
import
com.liquidnet.service.kylin.dto.param.RefundApplyParam
;
import
com.liquidnet.service.kylin.dto.param.RefundBatchApplyParam
;
import
com.liquidnet.service.kylin.dto.param.RefundBatchApplyParam
;
...
@@ -15,7 +16,6 @@ import org.springframework.beans.factory.annotation.Autowired;
...
@@ -15,7 +16,6 @@ import org.springframework.beans.factory.annotation.Autowired;
import
org.springframework.scheduling.annotation.Async
;
import
org.springframework.scheduling.annotation.Async
;
import
org.springframework.stereotype.Service
;
import
org.springframework.stereotype.Service
;
import
java.math.BigDecimal
;
import
java.util.List
;
import
java.util.List
;
import
java.util.stream.Collectors
;
import
java.util.stream.Collectors
;
...
@@ -67,7 +67,7 @@ public class KylinRefundExecuteServiceImpl {
...
@@ -67,7 +67,7 @@ public class KylinRefundExecuteServiceImpl {
if
(
order
.
getPriceExpress
()
!=
null
)
{
if
(
order
.
getPriceExpress
()
!=
null
)
{
refundApplyParam
.
setRefundPriceExpress
(
order
.
getPriceExpress
().
doubleValue
());
refundApplyParam
.
setRefundPriceExpress
(
order
.
getPriceExpress
().
doubleValue
());
}
}
Boolean
res
=
kylinOrderRefundsServiceImpl
.
refundApply
(
refundApplyParam
);
ResponseDto
res
=
kylinOrderRefundsServiceImpl
.
refundApply
(
refundApplyParam
);
}
}
count
=
orderList
.
size
();
count
=
orderList
.
size
();
...
@@ -91,17 +91,21 @@ public class KylinRefundExecuteServiceImpl {
...
@@ -91,17 +91,21 @@ public class KylinRefundExecuteServiceImpl {
break
;
break
;
case
"review"
:
case
"review"
:
if
(
status
==
KylinTableStatusConst
.
ORDER_REFUND_STATUS_APPROVED
)
{
// 通过申请
if
(
status
==
KylinTableStatusConst
.
ORDER_REFUND_STATUS_APPROVED
)
{
// 通过申请
type
=
"approved"
;
whereStatus
=
new
Integer
[]{
KylinTableStatusConst
.
ORDER_REFUND_STATUS_APPLY
,
KylinTableStatusConst
.
ORDER_REFUND_STATUS_REJECT
,
KylinTableStatusConst
.
ORDER_REFUND_STATUS_REFUSE
};
whereStatus
=
new
Integer
[]{
KylinTableStatusConst
.
ORDER_REFUND_STATUS_APPLY
,
KylinTableStatusConst
.
ORDER_REFUND_STATUS_REJECT
,
KylinTableStatusConst
.
ORDER_REFUND_STATUS_REFUSE
};
}
}
if
(
status
==
KylinTableStatusConst
.
ORDER_REFUND_STATUS_REJECT
)
{
// 驳回申请
if
(
status
==
KylinTableStatusConst
.
ORDER_REFUND_STATUS_REJECT
)
{
// 驳回申请
type
=
"reject"
;
whereStatus
=
new
Integer
[]{
KylinTableStatusConst
.
ORDER_REFUND_STATUS_APPLY
,
KylinTableStatusConst
.
ORDER_REFUND_STATUS_APPROVED
,
KylinTableStatusConst
.
ORDER_REFUND_STATUS_REFUSE
};
whereStatus
=
new
Integer
[]{
KylinTableStatusConst
.
ORDER_REFUND_STATUS_APPLY
,
KylinTableStatusConst
.
ORDER_REFUND_STATUS_APPROVED
,
KylinTableStatusConst
.
ORDER_REFUND_STATUS_REFUSE
};
}
}
break
;
break
;
case
"execute"
:
case
"execute"
:
if
(
status
==
KylinTableStatusConst
.
ORDER_REFUND_STATUS_UNFILLED
)
{
// 执行退款
if
(
status
==
KylinTableStatusConst
.
ORDER_REFUND_STATUS_UNFILLED
)
{
// 执行退款
type
=
"unfilled"
;
whereStatus
=
new
Integer
[]{
KylinTableStatusConst
.
ORDER_REFUND_STATUS_APPROVED
,
KylinTableStatusConst
.
ORDER_REFUND_STATUS_REFUSE
,
KylinTableStatusConst
.
ORDER_REFUND_STATUS_ERROR
};
whereStatus
=
new
Integer
[]{
KylinTableStatusConst
.
ORDER_REFUND_STATUS_APPROVED
,
KylinTableStatusConst
.
ORDER_REFUND_STATUS_REFUSE
,
KylinTableStatusConst
.
ORDER_REFUND_STATUS_ERROR
};
}
}
if
(
status
==
KylinTableStatusConst
.
ORDER_REFUND_STATUS_REFUSE
)
{
// 拒绝退款
if
(
status
==
KylinTableStatusConst
.
ORDER_REFUND_STATUS_REFUSE
)
{
// 拒绝退款
type
=
"refuse"
;
whereStatus
=
new
Integer
[]{
KylinTableStatusConst
.
ORDER_REFUND_STATUS_APPROVED
,
KylinTableStatusConst
.
ORDER_REFUND_STATUS_ERROR
};
whereStatus
=
new
Integer
[]{
KylinTableStatusConst
.
ORDER_REFUND_STATUS_APPROVED
,
KylinTableStatusConst
.
ORDER_REFUND_STATUS_ERROR
};
}
}
break
;
break
;
...
@@ -121,34 +125,14 @@ public class KylinRefundExecuteServiceImpl {
...
@@ -121,34 +125,14 @@ public class KylinRefundExecuteServiceImpl {
RefundApplyParam
refundApplyParam
=
new
RefundApplyParam
();
RefundApplyParam
refundApplyParam
=
new
RefundApplyParam
();
refundApplyParam
.
setIds
(
refundIds
);
refundApplyParam
.
setIds
(
refundIds
);
Boolean
res
=
null
;
refundApplyParam
.
setType
(
type
);
if
(
null
!=
refundBatchApplyParam
.
getRefuse
())
{
switch
(
type
)
{
refundApplyParam
.
setRefuse
(
refundBatchApplyParam
.
getRefuse
());
case
"reapply"
:
res
=
kylinOrderRefundsServiceImpl
.
refundReapply
(
refundApplyParam
);
break
;
case
"cancel"
:
res
=
kylinOrderRefundsServiceImpl
.
refundCancel
(
refundApplyParam
);
break
;
case
"review"
:
if
(
status
==
KylinTableStatusConst
.
ORDER_REFUND_STATUS_APPROVED
)
{
// 通过申请
res
=
kylinOrderRefundsServiceImpl
.
refundApproved
(
refundApplyParam
);
}
if
(
status
==
KylinTableStatusConst
.
ORDER_REFUND_STATUS_REJECT
)
{
// 驳回申请
res
=
kylinOrderRefundsServiceImpl
.
refundReject
(
refundApplyParam
);
}
break
;
case
"execute"
:
if
(
status
==
KylinTableStatusConst
.
ORDER_REFUND_STATUS_UNFILLED
)
{
// 执行退款
res
=
kylinOrderRefundsServiceImpl
.
refundUnfilled
(
refundApplyParam
);
}
if
(
status
==
KylinTableStatusConst
.
ORDER_REFUND_STATUS_REFUSE
)
{
// 拒绝退款
res
=
kylinOrderRefundsServiceImpl
.
refundRefuse
(
refundApplyParam
);
}
break
;
default
:
throw
new
Exception
(
"type异常,无法操作"
);
}
}
if
(
null
!=
refundBatchApplyParam
.
getReject
())
{
refundApplyParam
.
setReject
(
refundBatchApplyParam
.
getReject
());
}
ResponseDto
res
=
kylinOrderRefundsServiceImpl
.
refundCheckStatus
(
refundApplyParam
);
}
}
count
=
refundList
.
size
();
count
=
refundList
.
size
();
...
...
liquidnet-bus-client/liquidnet-client-admin/liquidnet-client-admin-zhengzai/src/main/java/com/liquidnet/client/admin/zhengzai/kylin/service/impl/KylinRefundPerformancesAdminServiceImpl.java
View file @
f69c2ecd
...
@@ -4,17 +4,14 @@ import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
...
@@ -4,17 +4,14 @@ import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import
com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper
;
import
com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper
;
import
com.github.pagehelper.PageHelper
;
import
com.github.pagehelper.PageHelper
;
import
com.github.pagehelper.PageInfo
;
import
com.github.pagehelper.PageInfo
;
import
com.liquidnet.client.admin.zhengzai.kylin.utils.DataUtils
;
import
com.liquidnet.common.cache.redis.util.RedisUtil
;
import
com.liquidnet.common.cache.redis.util.RedisUtil
;
import
com.liquidnet.commons.lang.util.BeanUtil
;
import
com.liquidnet.commons.lang.util.BeanUtil
;
import
com.liquidnet.commons.lang.util.IDGenerator
;
import
com.liquidnet.commons.lang.util.IDGenerator
;
import
com.liquidnet.service.kylin.constant.KylinRedisConst
;
import
com.liquidnet.service.kylin.constant.KylinTableStatusConst
;
import
com.liquidnet.service.kylin.constant.KylinTableStatusConst
;
import
com.liquidnet.service.kylin.dao.OrderRefundBatchDao
;
import
com.liquidnet.service.kylin.dao.OrderRefundBatchDao
;
import
com.liquidnet.service.kylin.dto.param.RefundBatchApplyParam
;
import
com.liquidnet.service.kylin.dto.param.RefundBatchApplyParam
;
import
com.liquidnet.service.kylin.dto.param.RefundBatchSearchParam
;
import
com.liquidnet.service.kylin.dto.param.RefundBatchSearchParam
;
import
com.liquidnet.service.kylin.dto.vo.KylinOrderRefundBatchesVo
;
import
com.liquidnet.service.kylin.dto.vo.KylinOrderRefundBatchesVo
;
import
com.liquidnet.service.kylin.dto.vo.KylinPerformanceVo
;
import
com.liquidnet.service.kylin.entity.KylinOrderRefundBatches
;
import
com.liquidnet.service.kylin.entity.KylinOrderRefundBatches
;
import
com.liquidnet.service.kylin.mapper.KylinOrderRefundBatchesMapper
;
import
com.liquidnet.service.kylin.mapper.KylinOrderRefundBatchesMapper
;
import
com.liquidnet.service.kylin.mapper.KylinOrderTicketsMapper
;
import
com.liquidnet.service.kylin.mapper.KylinOrderTicketsMapper
;
...
...
liquidnet-bus-client/liquidnet-client-admin/liquidnet-client-admin-zhengzai/src/main/java/com/liquidnet/client/admin/zhengzai/kylin/service/impl/KylinRefundsStatusServiceImpl.java
View file @
f69c2ecd
...
@@ -26,11 +26,10 @@ import com.liquidnet.service.kylin.mapper.KylinOrderTicketsMapper;
...
@@ -26,11 +26,10 @@ import com.liquidnet.service.kylin.mapper.KylinOrderTicketsMapper;
import
com.mongodb.BasicDBObject
;
import
com.mongodb.BasicDBObject
;
import
com.mongodb.client.model.FindOneAndUpdateOptions
;
import
com.mongodb.client.model.FindOneAndUpdateOptions
;
import
com.mongodb.client.model.ReturnDocument
;
import
com.mongodb.client.model.ReturnDocument
;
import
com.sun.media.jfxmedia.logging.Logger
;
import
lombok.extern.slf4j.Slf4j
;
import
lombok.extern.slf4j.Slf4j
;
import
org.apache.http.HttpException
;
import
org.bson.Document
;
import
org.bson.Document
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.data.mongodb.core.MongoTemplate
;
import
org.springframework.data.mongodb.core.MongoTemplate
;
import
org.springframework.data.mongodb.core.query.Criteria
;
import
org.springframework.data.mongodb.core.query.Criteria
;
import
org.springframework.data.mongodb.core.query.Query
;
import
org.springframework.data.mongodb.core.query.Query
;
...
@@ -45,7 +44,7 @@ import java.util.stream.Collectors;
...
@@ -45,7 +44,7 @@ import java.util.stream.Collectors;
/**
/**
* <p>
* <p>
*
退款表 服务实现类
*
订单退款表 服务实现类 处理数据 退款后状态的变化
* </p>
* </p>
*
*
* @author jiaangxiulong
* @author jiaangxiulong
...
@@ -55,6 +54,11 @@ import java.util.stream.Collectors;
...
@@ -55,6 +54,11 @@ import java.util.stream.Collectors;
@Service
@Service
public
class
KylinRefundsStatusServiceImpl
{
public
class
KylinRefundsStatusServiceImpl
{
@Value
(
"${liquidnet.url-refund.apply}"
)
private
String
applyUrl
;
@Value
(
"${liquidnet.url-refund.notify}"
)
private
String
notifyUrl
;
@Autowired
@Autowired
private
KylinOrderTicketsMapper
kylinOrderTicketsMapper
;
private
KylinOrderTicketsMapper
kylinOrderTicketsMapper
;
...
@@ -77,7 +81,7 @@ public class KylinRefundsStatusServiceImpl {
...
@@ -77,7 +81,7 @@ public class KylinRefundsStatusServiceImpl {
RefundApplyParam
refundApplyParam
,
KylinOrderTickets
orderInfo
,
String
orderTicketsId
,
RefundApplyParam
refundApplyParam
,
KylinOrderTickets
orderInfo
,
String
orderTicketsId
,
double
RefundPriceExpress
,
double
priceExpress
,
double
RefundPriceExpress
,
double
priceExpress
,
int
ticketEntityCount
,
List
<
String
>
ticketEntityIds
int
ticketEntityCount
,
List
<
String
>
ticketEntityIds
)
throws
HttpException
{
)
{
// 处理数据
// 处理数据
String
authId
=
ShiroUtils
.
getUserId
().
toString
();
String
authId
=
ShiroUtils
.
getUserId
().
toString
();
String
authName
=
ShiroUtils
.
getLoginName
();
String
authName
=
ShiroUtils
.
getLoginName
();
...
@@ -225,90 +229,53 @@ public class KylinRefundsStatusServiceImpl {
...
@@ -225,90 +229,53 @@ public class KylinRefundsStatusServiceImpl {
return
true
;
return
true
;
}
}
public
boolean
orderTicketRefundReapply
(
List
<
KylinOrderRefunds
>
refundList
)
{
public
boolean
orderRefundChangeStatus
(
List
<
KylinOrderRefunds
>
refundList
,
String
type
,
String
reject
,
String
refuse
)
{
String
authId
=
ShiroUtils
.
getUserId
().
toString
();
String
authName
=
ShiroUtils
.
getLoginName
();
KylinOrderRefunds
kylinOrderRefunds
=
new
KylinOrderRefunds
();
kylinOrderRefunds
.
setStatus
(
KylinTableStatusConst
.
ORDER_REFUND_STATUS_APPLY
);
kylinOrderRefunds
.
setApplicantId
(
authId
);
kylinOrderRefunds
.
setApplicantName
(
authName
);
kylinOrderRefunds
.
setApplicantAt
(
LocalDateTime
.
now
());
List
<
String
>
refundIds
=
refundList
.
stream
().
map
(
KylinOrderRefunds
->
KylinOrderRefunds
.
getOrderRefundsId
()).
collect
(
Collectors
.
toList
());
kylinOrderRefundsMapper
.
update
(
kylinOrderRefunds
,
new
UpdateWrapper
<
KylinOrderRefunds
>().
in
(
"order_refunds_id"
,
refundIds
)
);
return
true
;
}
public
boolean
orderTicketRefundApproved
(
List
<
KylinOrderRefunds
>
refundList
,
String
reject
)
{
String
authId
=
ShiroUtils
.
getUserId
().
toString
();
String
authName
=
ShiroUtils
.
getLoginName
();
KylinOrderRefunds
kylinOrderRefunds
=
new
KylinOrderRefunds
();
kylinOrderRefunds
.
setStatus
(
KylinTableStatusConst
.
ORDER_REFUND_STATUS_APPROVED
);
kylinOrderRefunds
.
setAuditorId
(
authId
);
kylinOrderRefunds
.
setAuditorName
(
authName
);
kylinOrderRefunds
.
setAuditorAt
(
LocalDateTime
.
now
());
kylinOrderRefunds
.
setReject
(
reject
);
List
<
String
>
refundIds
=
refundList
.
stream
().
map
(
KylinOrderRefunds
->
KylinOrderRefunds
.
getOrderRefundsId
()).
collect
(
Collectors
.
toList
());
kylinOrderRefundsMapper
.
update
(
kylinOrderRefunds
,
new
UpdateWrapper
<
KylinOrderRefunds
>().
in
(
"order_refunds_id"
,
refundIds
)
);
return
true
;
}
public
boolean
orderTicketRefundReject
(
List
<
KylinOrderRefunds
>
refundList
,
String
reject
)
{
String
authId
=
ShiroUtils
.
getUserId
().
toString
();
String
authId
=
ShiroUtils
.
getUserId
().
toString
();
String
authName
=
ShiroUtils
.
getLoginName
();
String
authName
=
ShiroUtils
.
getLoginName
();
KylinOrderRefunds
kylinOrderRefunds
=
new
KylinOrderRefunds
();
KylinOrderRefunds
kylinOrderRefunds
=
new
KylinOrderRefunds
();
kylinOrderRefunds
.
setStatus
(
KylinTableStatusConst
.
ORDER_REFUND_STATUS_REJECT
);
kylinOrderRefunds
.
setAuditorId
(
authId
);
kylinOrderRefunds
.
setAuditorName
(
authName
);
kylinOrderRefunds
.
setAuditorAt
(
LocalDateTime
.
now
());
kylinOrderRefunds
.
setReject
(
reject
);
List
<
String
>
refundIds
=
refundList
.
stream
().
map
(
KylinOrderRefunds
->
KylinOrderRefunds
.
getOrderRefundsId
()).
collect
(
Collectors
.
toList
());
switch
(
type
)
{
case
"reapply"
:
kylinOrderRefunds
.
setStatus
(
KylinTableStatusConst
.
ORDER_REFUND_STATUS_APPLY
);
kylinOrderRefunds
.
setApplicantId
(
authId
);
kylinOrderRefunds
.
setApplicantName
(
authName
);
kylinOrderRefunds
.
setApplicantAt
(
LocalDateTime
.
now
());
break
;
case
"approved"
:
kylinOrderRefunds
.
setStatus
(
KylinTableStatusConst
.
ORDER_REFUND_STATUS_APPROVED
);
kylinOrderRefunds
.
setAuditorId
(
authId
);
kylinOrderRefunds
.
setAuditorName
(
authName
);
kylinOrderRefunds
.
setAuditorAt
(
LocalDateTime
.
now
());
kylinOrderRefunds
.
setReject
(
reject
);
break
;
case
"Reject"
:
kylinOrderRefunds
.
setStatus
(
KylinTableStatusConst
.
ORDER_REFUND_STATUS_REJECT
);
kylinOrderRefunds
.
setAuditorId
(
authId
);
kylinOrderRefunds
.
setAuditorName
(
authName
);
kylinOrderRefunds
.
setAuditorAt
(
LocalDateTime
.
now
());
kylinOrderRefunds
.
setReject
(
reject
);
break
;
case
"refuse"
:
kylinOrderRefunds
.
setStatus
(
KylinTableStatusConst
.
ORDER_REFUND_STATUS_REFUSE
);
kylinOrderRefunds
.
setExecutorId
(
authId
);
kylinOrderRefunds
.
setExecutorName
(
authName
);
kylinOrderRefunds
.
setExecutorAt
(
LocalDateTime
.
now
());
kylinOrderRefunds
.
setRefuse
(
refuse
);
break
;
}
kylinOrderRefundsMapper
.
update
(
List
<
String
>
orderRefundIds
=
refundList
.
stream
().
map
(
kylinOrderRefunds
,
KylinOrderRefunds
->
KylinOrderRefunds
.
getOrderRefundsId
()).
collect
(
Collectors
.
toList
()
new
UpdateWrapper
<
KylinOrderRefunds
>().
in
(
"order_refunds_id"
,
refundIds
)
);
);
return
true
;
}
public
boolean
orderTicketRefundRefuse
(
List
<
KylinOrderRefunds
>
refundList
,
String
refuse
)
{
String
authId
=
ShiroUtils
.
getUserId
().
toString
();
String
authName
=
ShiroUtils
.
getLoginName
();
KylinOrderRefunds
kylinOrderRefunds
=
new
KylinOrderRefunds
();
kylinOrderRefunds
.
setStatus
(
KylinTableStatusConst
.
ORDER_REFUND_STATUS_REFUSE
);
kylinOrderRefunds
.
setExecutorId
(
authId
);
kylinOrderRefunds
.
setExecutorName
(
authName
);
kylinOrderRefunds
.
setExecutorAt
(
LocalDateTime
.
now
());
kylinOrderRefunds
.
setRefuse
(
refuse
);
List
<
String
>
refundIds
=
refundList
.
stream
().
map
(
KylinOrderRefunds
->
KylinOrderRefunds
.
getOrderRefundsId
()).
collect
(
Collectors
.
toList
());
kylinOrderRefundsMapper
.
update
(
kylinOrderRefundsMapper
.
update
(
kylinOrderRefunds
,
kylinOrderRefunds
,
new
UpdateWrapper
<
KylinOrderRefunds
>().
in
(
"order_refunds_id"
,
r
efundIds
)
new
UpdateWrapper
<
KylinOrderRefunds
>().
in
(
"order_refunds_id"
,
orderR
efundIds
)
);
);
return
true
;
return
true
;
}
}
public
boolean
orderTicketRefundUnfilled
(
List
<
KylinOrderRefunds
>
refundList
,
String
refuse
)
throws
Exception
{
public
boolean
orderTicketRefundUnfilled
(
List
<
KylinOrderRefunds
>
refundList
,
String
refuse
)
{
String
authId
=
ShiroUtils
.
getUserId
().
toString
();
String
authId
=
ShiroUtils
.
getUserId
().
toString
();
String
authName
=
ShiroUtils
.
getLoginName
();
String
authName
=
ShiroUtils
.
getLoginName
();
...
@@ -320,9 +287,6 @@ public class KylinRefundsStatusServiceImpl {
...
@@ -320,9 +287,6 @@ public class KylinRefundsStatusServiceImpl {
kylinOrderRefunds
.
setRefuse
(
refuse
);
kylinOrderRefunds
.
setRefuse
(
refuse
);
// List<String> refundIds = refundList.stream().map(KylinOrderRefunds -> KylinOrderRefunds.getOrderRefundsId()).collect(Collectors.toList());
// List<String> refundIds = refundList.stream().map(KylinOrderRefunds -> KylinOrderRefunds.getOrderRefundsId()).collect(Collectors.toList());
// 开始执行退款
String
postUrl
=
"http://testpay.zhengzai.tv/refund/single"
;
for
(
KylinOrderRefunds
refund
:
refundList
)
{
for
(
KylinOrderRefunds
refund
:
refundList
)
{
KylinOrderTickets
oderInfo
=
kylinOrderTicketsMapper
.
selectOne
(
KylinOrderTickets
oderInfo
=
kylinOrderTicketsMapper
.
selectOne
(
new
QueryWrapper
<
KylinOrderTickets
>()
new
QueryWrapper
<
KylinOrderTickets
>()
...
@@ -333,7 +297,7 @@ public class KylinRefundsStatusServiceImpl {
...
@@ -333,7 +297,7 @@ public class KylinRefundsStatusServiceImpl {
params
.
add
(
"order_refund_code"
,
refund
.
getOrderRefundCode
());
params
.
add
(
"order_refund_code"
,
refund
.
getOrderRefundCode
());
params
.
add
(
"price"
,
refund
.
getPrice
().
toString
());
params
.
add
(
"price"
,
refund
.
getPrice
().
toString
());
params
.
add
(
"reason"
,
refund
.
getReason
());
params
.
add
(
"reason"
,
refund
.
getReason
());
params
.
add
(
"notify_url"
,
"http://zuul.zhengzai.tv/kylin/refund/callback"
);
params
.
add
(
"notify_url"
,
notifyUrl
);
String
sign
=
StringUtils
.
Ksort
(
params
);
String
sign
=
StringUtils
.
Ksort
(
params
);
sign
=
sign
.
concat
(
"&key="
).
concat
(
"R7tXY9smPQPG9Ku5yI0u6sfnlckmk04V"
);
sign
=
sign
.
concat
(
"&key="
).
concat
(
"R7tXY9smPQPG9Ku5yI0u6sfnlckmk04V"
);
...
@@ -345,7 +309,7 @@ public class KylinRefundsStatusServiceImpl {
...
@@ -345,7 +309,7 @@ public class KylinRefundsStatusServiceImpl {
// start
// start
// TODO: 2021/5/31 待整理
// TODO: 2021/5/31 待整理
String
postResult
=
null
;
String
postResult
=
null
;
postResult
=
HttpUtil
.
post
(
post
Url
,
params
);
postResult
=
HttpUtil
.
post
(
apply
Url
,
params
);
JsonNode
postResultNew
=
JsonUtils
.
fromJson
(
postResult
,
JsonNode
.
class
);
JsonNode
postResultNew
=
JsonUtils
.
fromJson
(
postResult
,
JsonNode
.
class
);
// 请求提审接口结果
// 请求提审接口结果
if
(
postResultNew
.
get
(
"message"
).
toString
()
!=
"OK"
)
{
if
(
postResultNew
.
get
(
"message"
).
toString
()
!=
"OK"
)
{
...
...
liquidnet-bus-config/liquidnet-config/liquidnet-service-kylin-dev.yml
View file @
f69c2ecd
...
@@ -21,9 +21,6 @@ liquidnet:
...
@@ -21,9 +21,6 @@ liquidnet:
pay
:
"
http://testpay.zhengzai.tv/"
pay
:
"
http://testpay.zhengzai.tv/"
check
:
"
http://testpay.zhengzai.tv/order/verify"
check
:
"
http://testpay.zhengzai.tv/order/verify"
localUrl
:
"
https://zuul.zhengzai.tv/kylin/order/syncOrder"
localUrl
:
"
https://zuul.zhengzai.tv/kylin/order/syncOrder"
url-refund
:
apply
:
"
http://testpay.zhengzai.tv/refund/single"
notify
:
"
https://devzuul.zhengzai.tv/kylin/refund/callback"
#以下为spring各环境个性配置
#以下为spring各环境个性配置
spring
:
spring
:
...
...
liquidnet-bus-config/liquidnet-config/liquidnet-service-kylin-test.yml
View file @
f69c2ecd
...
@@ -21,9 +21,6 @@ liquidnet:
...
@@ -21,9 +21,6 @@ liquidnet:
pay
:
"
http://testpay.zhengzai.tv/"
pay
:
"
http://testpay.zhengzai.tv/"
check
:
"
http://testpay.zhengzai.tv/order/verify"
check
:
"
http://testpay.zhengzai.tv/order/verify"
localUrl
:
"
https://zuul.zhengzai.tv/kylin/order/syncOrder"
localUrl
:
"
https://zuul.zhengzai.tv/kylin/order/syncOrder"
url-refund
:
apply
:
"
http://testpay.zhengzai.tv/refund/single"
notify
:
"
https://zuul.zhengzai.tv/kylin/refund/callback"
#以下为spring各环境个性配置
#以下为spring各环境个性配置
spring
:
spring
:
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment