记得上下班打卡 | 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
88f7224c
Commit
88f7224c
authored
Jun 07, 2021
by
jiangxiulong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
批量整合
parent
0b7d35b2
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
69 additions
and
96 deletions
+69
-96
RefundBatchApplyParam.java
...uidnet/service/kylin/dto/param/RefundBatchApplyParam.java
+2
-0
KylinOrderRefundBatchAdminController.java
.../zhengzai/kylin/KylinOrderRefundBatchAdminController.java
+17
-13
KylinRefundPerformancesAdminServiceImpl.java
...service/impl/KylinRefundPerformancesAdminServiceImpl.java
+50
-83
No files found.
liquidnet-bus-api/liquidnet-service-kylin-api/src/main/java/com/liquidnet/service/kylin/dto/param/RefundBatchApplyParam.java
View file @
88f7224c
...
@@ -31,4 +31,6 @@ public class RefundBatchApplyParam implements Serializable {
...
@@ -31,4 +31,6 @@ public class RefundBatchApplyParam 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/KylinOrderRefundBatchAdminController.java
View file @
88f7224c
...
@@ -5,6 +5,7 @@ import com.liquidnet.client.admin.common.core.controller.BaseController;
...
@@ -5,6 +5,7 @@ import com.liquidnet.client.admin.common.core.controller.BaseController;
import
com.liquidnet.client.admin.common.core.domain.AjaxResult
;
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.base.ResponseDto
;
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
;
...
@@ -90,13 +91,13 @@ public class KylinOrderRefundBatchAdminController extends BaseController {
...
@@ -90,13 +91,13 @@ public class KylinOrderRefundBatchAdminController extends BaseController {
public
AjaxResult
refundBatchReApply
(
RefundBatchApplyParam
refundBatchApplyParam
)
{
public
AjaxResult
refundBatchReApply
(
RefundBatchApplyParam
refundBatchApplyParam
)
{
String
ids
=
refundBatchApplyParam
.
getIds
();
String
ids
=
refundBatchApplyParam
.
getIds
();
refundBatchApplyParam
.
setRefundBatchId
(
ids
);
refundBatchApplyParam
.
setRefundBatchId
(
ids
);
refundBatchApplyParam
.
setType
(
"reapply"
);
try
{
try
{
Boolean
res
=
kylinRefundPerformancesAdminServiceImpl
.
refundBatchReapply
(
refundBatchApplyParam
);
ResponseDto
res
=
kylinRefundPerformancesAdminServiceImpl
.
refundBatchCheckStatus
(
refundBatchApplyParam
);
if
(
res
)
{
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
());
...
@@ -109,12 +110,13 @@ public class KylinOrderRefundBatchAdminController extends BaseController {
...
@@ -109,12 +110,13 @@ public class KylinOrderRefundBatchAdminController extends BaseController {
public
AjaxResult
refundBatchCancel
(
RefundBatchApplyParam
refundBatchApplyParam
)
{
public
AjaxResult
refundBatchCancel
(
RefundBatchApplyParam
refundBatchApplyParam
)
{
String
ids
=
refundBatchApplyParam
.
getIds
();
String
ids
=
refundBatchApplyParam
.
getIds
();
refundBatchApplyParam
.
setRefundBatchId
(
ids
);
refundBatchApplyParam
.
setRefundBatchId
(
ids
);
refundBatchApplyParam
.
setType
(
"cancel"
);
try
{
try
{
Boolean
res
=
kylinRefundPerformancesAdminServiceImpl
.
refundBatchCancel
(
refundBatchApplyParam
);
ResponseDto
res
=
kylinRefundPerformancesAdminServiceImpl
.
refundBatchCheckStatus
(
refundBatchApplyParam
);
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
());
...
@@ -125,12 +127,13 @@ public class KylinOrderRefundBatchAdminController extends BaseController {
...
@@ -125,12 +127,13 @@ public class KylinOrderRefundBatchAdminController extends BaseController {
@PostMapping
(
"review"
)
@PostMapping
(
"review"
)
@ResponseBody
@ResponseBody
public
AjaxResult
refundBatchReview
(
RefundBatchApplyParam
refundBatchApplyParam
)
{
public
AjaxResult
refundBatchReview
(
RefundBatchApplyParam
refundBatchApplyParam
)
{
refundBatchApplyParam
.
setType
(
"review"
);
try
{
try
{
Boolean
res
=
kylinRefundPerformancesAdminServiceImpl
.
refundBatchReview
(
refundBatchApplyParam
);
ResponseDto
res
=
kylinRefundPerformancesAdminServiceImpl
.
refundBatchCheckStatus
(
refundBatchApplyParam
);
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
());
...
@@ -141,12 +144,13 @@ public class KylinOrderRefundBatchAdminController extends BaseController {
...
@@ -141,12 +144,13 @@ public class KylinOrderRefundBatchAdminController extends BaseController {
@PostMapping
(
"execute"
)
@PostMapping
(
"execute"
)
@ResponseBody
@ResponseBody
public
AjaxResult
refundBatchExecute
(
RefundBatchApplyParam
refundBatchApplyParam
)
{
public
AjaxResult
refundBatchExecute
(
RefundBatchApplyParam
refundBatchApplyParam
)
{
refundBatchApplyParam
.
setType
(
"execute"
);
try
{
try
{
Boolean
res
=
kylinRefundPerformancesAdminServiceImpl
.
refundBatchExecute
(
refundBatchApplyParam
);
ResponseDto
res
=
kylinRefundPerformancesAdminServiceImpl
.
refundBatchCheckStatus
(
refundBatchApplyParam
);
if
(
res
)
{
if
(
res
.
isSuccess
()
)
{
return
success
();
return
success
();
}
else
{
}
else
{
return
error
(
"审核退款失败"
);
return
error
(
res
.
getMessage
()
);
}
}
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
e
.
printStackTrace
();
...
...
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 @
88f7224c
...
@@ -7,6 +7,7 @@ import com.github.pagehelper.PageInfo;
...
@@ -7,6 +7,7 @@ import com.github.pagehelper.PageInfo;
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.base.ResponseDto
;
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
;
...
@@ -97,102 +98,68 @@ public class KylinRefundPerformancesAdminServiceImpl {
...
@@ -97,102 +98,68 @@ public class KylinRefundPerformancesAdminServiceImpl {
}
}
}
}
public
Boolean
refundBatchReapply
(
RefundBatchApplyParam
refundBatchApplyParam
)
throws
Exception
{
public
ResponseDto
refundBatchCheckStatus
(
RefundBatchApplyParam
refundBatchApplyParam
)
{
String
refundBatchId
=
refundBatchApplyParam
.
getRefundBatchId
();
Integer
[]
paymentTypeAlipayArray
=
{
KylinTableStatusConst
.
STATUS_OPERATE_REJECT
,
KylinTableStatusConst
.
STATUS_FINANCE_REJECT
};
KylinOrderRefundBatches
refundBatchesInfo
=
kylinOrderRefundBatchesMapper
.
selectOne
(
new
UpdateWrapper
<
KylinOrderRefundBatches
>().
eq
(
"refund_batch_id"
,
refundBatchId
).
in
(
"status"
,
paymentTypeAlipayArray
)
);
if
(
null
!=
refundBatchesInfo
)
{
// 开始执行批量提交审核 分批处理退款申请
kylinRefundExecuteServiceImpl
.
refundBatchStatus
(
refundBatchApplyParam
,
"reapply"
);
KylinOrderRefundBatches
params
=
new
KylinOrderRefundBatches
();
params
.
setStatus
(
KylinTableStatusConst
.
STATUS_APPLY
);
kylinOrderRefundBatchesMapper
.
update
(
params
,
new
UpdateWrapper
<
KylinOrderRefundBatches
>().
eq
(
"refund_batch_id"
,
refundBatchId
));
return
true
;
}
else
{
throw
new
Exception
(
"当前状态下不允许此操作"
);
}
}
public
Boolean
refundBatchCancel
(
RefundBatchApplyParam
refundBatchApplyParam
)
throws
Exception
{
String
refundBatchId
=
refundBatchApplyParam
.
getRefundBatchId
();
Integer
[]
paymentTypeAlipayArray
=
{
KylinTableStatusConst
.
STATUS_APPLY
,
KylinTableStatusConst
.
STATUS_OPERATE_REJECT
,
KylinTableStatusConst
.
STATUS_FINANCE_REJECT
};
KylinOrderRefundBatches
refundBatchesInfo
=
kylinOrderRefundBatchesMapper
.
selectOne
(
new
UpdateWrapper
<
KylinOrderRefundBatches
>().
eq
(
"refund_batch_id"
,
refundBatchId
).
in
(
"status"
,
paymentTypeAlipayArray
)
);
if
(
null
!=
refundBatchesInfo
)
{
// 开始执行批量提交审核 分批处理退款申请
kylinRefundExecuteServiceImpl
.
refundBatchStatus
(
refundBatchApplyParam
,
"cancel"
);
KylinOrderRefundBatches
params
=
new
KylinOrderRefundBatches
();
params
.
setStatus
(
KylinTableStatusConst
.
STATUS_CANCEL
);
kylinOrderRefundBatchesMapper
.
update
(
params
,
new
UpdateWrapper
<
KylinOrderRefundBatches
>().
eq
(
"refund_batch_id"
,
refundBatchId
));
return
true
;
}
else
{
throw
new
Exception
(
"当前状态下不允许此操作"
);
}
}
public
Boolean
refundBatchReview
(
RefundBatchApplyParam
refundBatchApplyParam
)
throws
Exception
{
String
refundBatchId
=
refundBatchApplyParam
.
getRefundBatchId
();
Integer
batchStatus
=
refundBatchApplyParam
.
getStatus
();
Integer
updateStatus
=
0
;
if
(
KylinTableStatusConst
.
STATUS_OPERATE_REJECT
==
batchStatus
)
{
// 驳回
updateStatus
=
KylinTableStatusConst
.
ORDER_REFUND_STATUS_REJECT
;
}
else
if
(
KylinTableStatusConst
.
STATUS_OPERATE_ADOPT
==
batchStatus
)
{
// 通过
updateStatus
=
KylinTableStatusConst
.
ORDER_REFUND_STATUS_APPROVED
;
}
Integer
[]
paymentTypeAlipayArray
=
{
KylinTableStatusConst
.
STATUS_APPLY
};
KylinOrderRefundBatches
refundBatchesInfo
=
kylinOrderRefundBatchesMapper
.
selectOne
(
new
UpdateWrapper
<
KylinOrderRefundBatches
>().
eq
(
"refund_batch_id"
,
refundBatchId
).
in
(
"status"
,
paymentTypeAlipayArray
)
);
if
(
null
!=
refundBatchesInfo
)
{
// 开始执行批量提交审核 分批处理退款申请
refundBatchApplyParam
.
setRefundStatus
(
updateStatus
);
kylinRefundExecuteServiceImpl
.
refundBatchStatus
(
refundBatchApplyParam
,
"review"
);
KylinOrderRefundBatches
params
=
new
KylinOrderRefundBatches
();
params
.
setStatus
(
batchStatus
);
kylinOrderRefundBatchesMapper
.
update
(
params
,
new
UpdateWrapper
<
KylinOrderRefundBatches
>().
eq
(
"refund_batch_id"
,
refundBatchId
)
);
return
true
;
}
else
{
throw
new
Exception
(
"当前状态下不允许此操作"
);
}
}
public
Boolean
refundBatchExecute
(
RefundBatchApplyParam
refundBatchApplyParam
)
throws
Exception
{
String
refundBatchId
=
refundBatchApplyParam
.
getRefundBatchId
();
String
refundBatchId
=
refundBatchApplyParam
.
getRefundBatchId
();
String
type
=
refundBatchApplyParam
.
getType
();
Integer
batchStatus
=
refundBatchApplyParam
.
getStatus
();
Integer
batchStatus
=
refundBatchApplyParam
.
getStatus
();
Integer
updateStatus
=
0
;
Integer
[]
paymentTypeAlipayArray
=
null
;
if
(
KylinTableStatusConst
.
STATUS_FINANCE_REJECT
==
batchStatus
)
{
// 驳回
Integer
batchUpdateStatus
=
0
;
updateStatus
=
KylinTableStatusConst
.
ORDER_REFUND_STATUS_REFUSE
;
Integer
orderUpdateStatus
=
0
;
}
else
if
(
KylinTableStatusConst
.
STATUS_FINANCE_ADOPT
==
batchStatus
)
{
// 通过
switch
(
type
)
{
updateStatus
=
KylinTableStatusConst
.
ORDER_REFUND_STATUS_UNFILLED
;
case
"reapply"
:
paymentTypeAlipayArray
=
new
Integer
[]{
KylinTableStatusConst
.
STATUS_OPERATE_REJECT
,
KylinTableStatusConst
.
STATUS_FINANCE_REJECT
};
batchUpdateStatus
=
KylinTableStatusConst
.
STATUS_APPLY
;
break
;
case
"cancel"
:
paymentTypeAlipayArray
=
new
Integer
[]{
KylinTableStatusConst
.
STATUS_APPLY
,
KylinTableStatusConst
.
STATUS_OPERATE_REJECT
,
KylinTableStatusConst
.
STATUS_FINANCE_REJECT
};
batchUpdateStatus
=
KylinTableStatusConst
.
STATUS_CANCEL
;
break
;
case
"review"
:
batchUpdateStatus
=
batchStatus
;
if
(
batchStatus
==
KylinTableStatusConst
.
STATUS_OPERATE_ADOPT
)
{
// 通过申请
paymentTypeAlipayArray
=
new
Integer
[]{
KylinTableStatusConst
.
STATUS_APPLY
};
orderUpdateStatus
=
KylinTableStatusConst
.
ORDER_REFUND_STATUS_APPROVED
;
}
if
(
batchStatus
==
KylinTableStatusConst
.
STATUS_OPERATE_REJECT
)
{
// 驳回申请
paymentTypeAlipayArray
=
new
Integer
[]{
KylinTableStatusConst
.
STATUS_APPLY
};
orderUpdateStatus
=
KylinTableStatusConst
.
ORDER_REFUND_STATUS_REJECT
;
}
break
;
case
"execute"
:
batchUpdateStatus
=
batchStatus
;
if
(
batchStatus
==
KylinTableStatusConst
.
STATUS_FINANCE_ADOPT
)
{
// 执行退款
paymentTypeAlipayArray
=
new
Integer
[]{
KylinTableStatusConst
.
STATUS_OPERATE_ADOPT
,
KylinTableStatusConst
.
STATUS_FINANCE_REJECT
};
orderUpdateStatus
=
KylinTableStatusConst
.
ORDER_REFUND_STATUS_UNFILLED
;
}
if
(
batchStatus
==
KylinTableStatusConst
.
STATUS_FINANCE_REJECT
)
{
// 拒绝退款
paymentTypeAlipayArray
=
new
Integer
[]{
KylinTableStatusConst
.
STATUS_OPERATE_ADOPT
,
KylinTableStatusConst
.
STATUS_FINANCE_REJECT
};
orderUpdateStatus
=
KylinTableStatusConst
.
ORDER_REFUND_STATUS_REFUSE
;
}
break
;
default
:
return
ResponseDto
.
failure
(
"type异常,无法操作"
);
}
}
Integer
[]
paymentTypeAlipayArray
=
{
KylinTableStatusConst
.
STATUS_OPERATE_ADOPT
,
KylinTableStatusConst
.
STATUS_FINANCE_REJECT
};
KylinOrderRefundBatches
refundBatchesInfo
=
kylinOrderRefundBatchesMapper
.
selectOne
(
KylinOrderRefundBatches
refundBatchesInfo
=
kylinOrderRefundBatchesMapper
.
selectOne
(
new
UpdateWrapper
<
KylinOrderRefundBatches
>().
eq
(
"refund_batch_id"
,
refundBatchId
).
in
(
"status"
,
paymentTypeAlipayArray
)
new
UpdateWrapper
<
KylinOrderRefundBatches
>().
eq
(
"refund_batch_id"
,
refundBatchId
).
in
(
"status"
,
paymentTypeAlipayArray
)
);
);
if
(
null
!=
refundBatchesInfo
)
{
if
(
null
!=
refundBatchesInfo
)
{
// 开始执行批量提交审核 分批处理退款申请
// 开始执行批量提交审核 分批处理退款申请
refundBatchApplyParam
.
setRefundStatus
(
updateStatus
);
try
{
kylinRefundExecuteServiceImpl
.
refundBatchStatus
(
refundBatchApplyParam
,
"execute"
);
if
(
null
!=
orderUpdateStatus
)
{
refundBatchApplyParam
.
setRefundStatus
(
orderUpdateStatus
);
}
kylinRefundExecuteServiceImpl
.
refundBatchStatus
(
refundBatchApplyParam
,
type
);
}
catch
(
Exception
e
)
{
return
ResponseDto
.
failure
(
"操作失败"
);
}
KylinOrderRefundBatches
params
=
new
KylinOrderRefundBatches
();
KylinOrderRefundBatches
params
=
new
KylinOrderRefundBatches
();
params
.
setStatus
(
batchStatus
);
params
.
setStatus
(
batch
Update
Status
);
kylinOrderRefundBatchesMapper
.
update
(
params
,
new
UpdateWrapper
<
KylinOrderRefundBatches
>().
eq
(
"refund_batch_id"
,
refundBatchId
));
kylinOrderRefundBatchesMapper
.
update
(
params
,
new
UpdateWrapper
<
KylinOrderRefundBatches
>().
eq
(
"refund_batch_id"
,
refundBatchId
));
return
true
;
return
ResponseDto
.
success
()
;
}
else
{
}
else
{
throw
new
Exception
(
"当前状态下不允许此操作"
);
return
ResponseDto
.
failure
(
"当前状态下不允许此操作"
);
}
}
}
}
...
...
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