记得上下班打卡 | 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
ce088405
Commit
ce088405
authored
Jun 21, 2021
by
jiangxiulong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
批量退款异步 增加处理中状态
parent
00d68220
Changes
9
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
143 additions
and
55 deletions
+143
-55
KylinTableStatusConst.java
...quidnet/service/kylin/constant/KylinTableStatusConst.java
+8
-4
RuoYiApplication.java
...ain/java/com/liquidnet/client/admin/RuoYiApplication.java
+2
-0
refundBatch.html
...ces/templates/zhengzai/kylin/refundBatch/refundBatch.html
+4
-4
KylinOrderRefundsServiceImpl.java
...gzai/kylin/service/impl/KylinOrderRefundsServiceImpl.java
+7
-1
KylinRefundExecuteServiceImpl.java
...zai/kylin/service/impl/KylinRefundExecuteServiceImpl.java
+62
-10
KylinRefundPerformancesAdminServiceImpl.java
...service/impl/KylinRefundPerformancesAdminServiceImpl.java
+32
-26
OrderRefundBatchDao.java
.../com/liquidnet/service/kylin/dao/OrderRefundBatchDao.java
+24
-6
KylinOrderTicketsMapper.java
...quidnet/service/kylin/mapper/KylinOrderTicketsMapper.java
+2
-2
KylinOrderTicketsMapper.xml
...iquidnet.service.kylin.mapper/KylinOrderTicketsMapper.xml
+2
-2
No files found.
liquidnet-bus-api/liquidnet-service-kylin-api/src/main/java/com/liquidnet/service/kylin/constant/KylinTableStatusConst.java
View file @
ce088405
...
@@ -9,15 +9,19 @@ package com.liquidnet.service.kylin.constant;
...
@@ -9,15 +9,19 @@ package com.liquidnet.service.kylin.constant;
* @since 2021-05-25 6:38 下午
* @since 2021-05-25 6:38 下午
*/
*/
public
class
KylinTableStatusConst
{
public
class
KylinTableStatusConst
{
// 批量退款
// 批量退款 1处理完成 11 处理中
public
static
final
Integer
STATUS_APPLY
=
1
;
// 1申请退款
public
static
final
Integer
STATUS_APPLY
=
1
;
// 1申请退款处理中
public
static
final
Integer
STATUS_APPLY11
=
11
;
public
static
final
Integer
STATUS_CANCEL
=
2
;
// 2取消退款
public
static
final
Integer
STATUS_CANCEL
=
2
;
// 2取消退款
public
static
final
Integer
STATUS_CANCEL22
=
22
;
public
static
final
Integer
STATUS_OPERATE_REJECT
=
3
;
// 3运营驳回审核
public
static
final
Integer
STATUS_OPERATE_REJECT
=
3
;
// 3运营驳回审核
public
static
final
Integer
STATUS_OPERATE_REJECT33
=
33
;
public
static
final
Integer
STATUS_OPERATE_ADOPT
=
4
;
// 4运营通过审核
public
static
final
Integer
STATUS_OPERATE_ADOPT
=
4
;
// 4运营通过审核
public
static
final
Integer
STATUS_OPERATE_ADOPT44
=
44
;
public
static
final
Integer
STATUS_FINANCE_REJECT
=
5
;
// 5财务驳回审核
public
static
final
Integer
STATUS_FINANCE_REJECT
=
5
;
// 5财务驳回审核
public
static
final
Integer
STATUS_FINANCE_REJECT55
=
55
;
public
static
final
Integer
STATUS_FINANCE_ADOPT
=
6
;
// 6财务通过审核
public
static
final
Integer
STATUS_FINANCE_ADOPT
=
6
;
// 6财务通过审核
public
static
final
Integer
STATUS_FINANCE_ADOPT66
=
66
;
public
static
final
Integer
STATUS_TARGET_TYPE
=
1
;
// 演出
// 退款
// 退款
public
static
final
Integer
ORDER_REFUND_STATUS_APPLY
=
0
;
// 请求退款
public
static
final
Integer
ORDER_REFUND_STATUS_APPLY
=
0
;
// 请求退款
...
...
liquidnet-bus-client/liquidnet-client-admin/liquidnet-client-admin-web/src/main/java/com/liquidnet/client/admin/RuoYiApplication.java
View file @
ce088405
...
@@ -4,12 +4,14 @@ import org.mybatis.spring.annotation.MapperScan;
...
@@ -4,12 +4,14 @@ import org.mybatis.spring.annotation.MapperScan;
import
org.springframework.boot.SpringApplication
;
import
org.springframework.boot.SpringApplication
;
import
org.springframework.boot.autoconfigure.SpringBootApplication
;
import
org.springframework.boot.autoconfigure.SpringBootApplication
;
import
org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration
;
import
org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration
;
import
org.springframework.scheduling.annotation.EnableAsync
;
/**
/**
* 启动程序
* 启动程序
*
*
* @author ruoyi
* @author ruoyi
*/
*/
@EnableAsync
@SpringBootApplication
(
exclude
=
{
DataSourceAutoConfiguration
.
class
},
scanBasePackages
=
{
"com.liquidnet"
})
@SpringBootApplication
(
exclude
=
{
DataSourceAutoConfiguration
.
class
},
scanBasePackages
=
{
"com.liquidnet"
})
@MapperScan
(
basePackages
=
{
"com.liquidnet.service.kylin.mapper"
,
"com.liquidnet.service.adam.mapper"
})
//
@MapperScan
(
basePackages
=
{
"com.liquidnet.service.kylin.mapper"
,
"com.liquidnet.service.adam.mapper"
})
//
public
class
RuoYiApplication
public
class
RuoYiApplication
...
...
liquidnet-bus-client/liquidnet-client-admin/liquidnet-client-admin-web/src/main/resources/templates/zhengzai/kylin/refundBatch/refundBatch.html
View file @
ce088405
...
@@ -93,7 +93,7 @@
...
@@ -93,7 +93,7 @@
return
false
;
return
false
;
}
}
data
[
'reject'
]
=
remark
;
data
[
'reject'
]
=
remark
;
data
[
'status'
]
=
4
;
data
[
'status'
]
=
4
4
;
$
.
operate
.
save
(
prefix
+
"/review"
,
data
);
$
.
operate
.
save
(
prefix
+
"/review"
,
data
);
layer
.
close
(
index
)
layer
.
close
(
index
)
},
},
...
@@ -104,7 +104,7 @@
...
@@ -104,7 +104,7 @@
return
false
;
return
false
;
}
}
data
[
'reject'
]
=
remark
;
data
[
'reject'
]
=
remark
;
data
[
'status'
]
=
3
;
data
[
'status'
]
=
3
3
;
$
.
operate
.
save
(
prefix
+
"/review"
,
data
);
$
.
operate
.
save
(
prefix
+
"/review"
,
data
);
}
}
});
});
...
@@ -127,7 +127,7 @@
...
@@ -127,7 +127,7 @@
return
false
;
return
false
;
}
}
data
[
'refuse'
]
=
remark
;
data
[
'refuse'
]
=
remark
;
data
[
'status'
]
=
6
;
data
[
'status'
]
=
6
6
;
$
.
operate
.
save
(
prefix
+
"/execute"
,
data
);
$
.
operate
.
save
(
prefix
+
"/execute"
,
data
);
layer
.
close
(
index
)
layer
.
close
(
index
)
},
},
...
@@ -138,7 +138,7 @@
...
@@ -138,7 +138,7 @@
return
false
;
return
false
;
}
}
data
[
'refuse'
]
=
remark
;
data
[
'refuse'
]
=
remark
;
data
[
'status'
]
=
5
;
data
[
'status'
]
=
5
5
;
$
.
operate
.
save
(
prefix
+
"/execute"
,
data
);
$
.
operate
.
save
(
prefix
+
"/execute"
,
data
);
// return false;
// return false;
}
}
...
...
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 @
ce088405
...
@@ -161,6 +161,7 @@ public class KylinOrderRefundsServiceImpl extends ServiceImpl<KylinOrderRefundsM
...
@@ -161,6 +161,7 @@ public class KylinOrderRefundsServiceImpl extends ServiceImpl<KylinOrderRefundsM
}
}
realRefundPriceList
=
entitiesPrice
;
realRefundPriceList
=
entitiesPrice
;
}
else
{
// 批量 计算入场人订单可退金额
}
else
{
// 批量 计算入场人订单可退金额
List
<
String
>
ticketEntityIdsNew
=
new
ArrayList
<>();
for
(
int
i
=
0
;
i
<=
ticketEntityIds
.
size
()
-
1
;
i
++)
{
for
(
int
i
=
0
;
i
<=
ticketEntityIds
.
size
()
-
1
;
i
++)
{
Double
refundedPrice
=
kylinOrderTicketEntitiesMapper
.
getRefundEntitiesPrice
(
//已退 包含退款中
Double
refundedPrice
=
kylinOrderTicketEntitiesMapper
.
getRefundEntitiesPrice
(
//已退 包含退款中
orderTicketsId
,
orderTicketsId
,
...
@@ -171,8 +172,13 @@ public class KylinOrderRefundsServiceImpl extends ServiceImpl<KylinOrderRefundsM
...
@@ -171,8 +172,13 @@ public class KylinOrderRefundsServiceImpl extends ServiceImpl<KylinOrderRefundsM
refundedPrice
=
0.0
;
refundedPrice
=
0.0
;
}
}
Double
price
=
onePrice
-
refundedPrice
;
// 计算可退金额
Double
price
=
onePrice
-
refundedPrice
;
// 计算可退金额
realRefundPriceList
.
add
(
price
);
if
(
price
>
0
)
{
realRefundPriceList
.
add
(
price
);
ticketEntityIdsNew
.
add
(
ticketEntityIds
.
get
(
i
));
}
}
}
// 剔除掉已经退完的入场人订单 可能包含正在退的
ticketEntityIds
=
ticketEntityIdsNew
;
}
}
boolean
res
=
kylinRefundsStatusServiceImpl
.
orderTicketRefunding
(
boolean
res
=
kylinRefundsStatusServiceImpl
.
orderTicketRefunding
(
...
...
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 @
ce088405
...
@@ -6,9 +6,8 @@ import com.liquidnet.service.base.ResponseDto;
...
@@ -6,9 +6,8 @@ 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
;
import
com.liquidnet.service.kylin.entity.KylinOrderRefunds
;
import
com.liquidnet.service.kylin.entity.*
;
import
com.liquidnet.service.kylin.entity.KylinOrderTicketEntities
;
import
com.liquidnet.service.kylin.mapper.KylinOrderRefundBatchesMapper
;
import
com.liquidnet.service.kylin.entity.KylinOrderTickets
;
import
com.liquidnet.service.kylin.mapper.KylinOrderRefundsMapper
;
import
com.liquidnet.service.kylin.mapper.KylinOrderRefundsMapper
;
import
com.liquidnet.service.kylin.mapper.KylinOrderTicketEntitiesMapper
;
import
com.liquidnet.service.kylin.mapper.KylinOrderTicketEntitiesMapper
;
import
com.liquidnet.service.kylin.mapper.KylinOrderTicketsMapper
;
import
com.liquidnet.service.kylin.mapper.KylinOrderTicketsMapper
;
...
@@ -16,6 +15,8 @@ import org.springframework.beans.factory.annotation.Autowired;
...
@@ -16,6 +15,8 @@ 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.time.LocalDateTime
;
import
java.util.List
;
import
java.util.List
;
import
java.util.stream.Collectors
;
import
java.util.stream.Collectors
;
...
@@ -39,24 +40,34 @@ public class KylinRefundExecuteServiceImpl {
...
@@ -39,24 +40,34 @@ public class KylinRefundExecuteServiceImpl {
@Autowired
@Autowired
private
KylinOrderTicketEntitiesMapper
kylinOrderTicketEntitiesMapper
;
private
KylinOrderTicketEntitiesMapper
kylinOrderTicketEntitiesMapper
;
@Autowired
private
KylinOrderRefundBatchesMapper
kylinOrderRefundBatchesMapper
;
@Autowired
@Autowired
RedisUtil
redisUtil
;
RedisUtil
redisUtil
;
@Autowired
@Autowired
private
KylinOrderRefundsServiceImpl
kylinOrderRefundsServiceImpl
;
private
KylinOrderRefundsServiceImpl
kylinOrderRefundsServiceImpl
;
@Async
public
void
refundBatchApply
(
String
targetId
,
String
refundBatchId
,
String
reason
)
{
public
void
refundBatchApply
(
String
targetId
,
String
refundBatchId
,
String
reason
)
{
// TODO: 2021/6/20 sleepTest
try
{
Thread
.
sleep
(
5000
);
}
catch
(
Exception
e
)
{}
RefundApplyParam
refundApplyParam
=
new
RefundApplyParam
();
RefundApplyParam
refundApplyParam
=
new
RefundApplyParam
();
int
count
;
int
count
;
int
limitNum
=
10
0
;
int
limitNum
=
10
;
int
mid
=
0
;
int
mid
=
0
;
Integer
[]
isPayment
=
{
KylinTableStatusConst
.
ENTITIES_IS_PAYMENT1
,
KylinTableStatusConst
.
ENTITIES_IS_PAYMENT2
,
KylinTableStatusConst
.
ENTITIES_IS_PAYMENT4
};
do
{
do
{
List
<
KylinOrderTickets
>
orderList
=
kylinOrderTicketsMapper
.
getOrderList
(
targetId
,
mid
,
limitNum
);
List
<
KylinOrderTickets
>
orderList
=
kylinOrderTicketsMapper
.
get
CanRefund
OrderList
(
targetId
,
mid
,
limitNum
);
for
(
KylinOrderTickets
order
:
orderList
)
{
for
(
KylinOrderTickets
order
:
orderList
)
{
List
<
KylinOrderTicketEntities
>
entitiesList
=
kylinOrderTicketEntitiesMapper
.
selectList
(
List
<
KylinOrderTicketEntities
>
entitiesList
=
kylinOrderTicketEntitiesMapper
.
selectList
(
new
UpdateWrapper
<
KylinOrderTicketEntities
>().
eq
(
"order_id"
,
order
.
getOrderTicketsId
())
new
UpdateWrapper
<
KylinOrderTicketEntities
>().
eq
(
"order_id"
,
order
.
getOrderTicketsId
())
.
eq
(
"is_payment"
,
1
)
.
in
(
"is_payment"
,
isPayment
)
);
);
List
<
String
>
ticketEntityIds
=
entitiesList
.
stream
().
map
(
KylinOrderTicketEntities
->
KylinOrderTicketEntities
.
getOrderTicketEntitiesId
()).
collect
(
Collectors
.
toList
());
List
<
String
>
ticketEntityIds
=
entitiesList
.
stream
().
map
(
KylinOrderTicketEntities
->
KylinOrderTicketEntities
.
getOrderTicketEntitiesId
()).
collect
(
Collectors
.
toList
());
...
@@ -74,9 +85,23 @@ public class KylinRefundExecuteServiceImpl {
...
@@ -74,9 +85,23 @@ public class KylinRefundExecuteServiceImpl {
KylinOrderTickets
lastInfo
=
orderList
.
get
(
count
-
1
);
KylinOrderTickets
lastInfo
=
orderList
.
get
(
count
-
1
);
mid
=
lastInfo
.
getMid
();
mid
=
lastInfo
.
getMid
();
}
while
(
count
>=
limitNum
);
}
while
(
count
>=
limitNum
);
KylinOrderRefundBatches
updateBatchData
=
new
KylinOrderRefundBatches
();
updateBatchData
.
setStatus
(
KylinTableStatusConst
.
STATUS_APPLY
);
updateBatchData
.
setUpdatedAt
(
LocalDateTime
.
now
());
kylinOrderRefundBatchesMapper
.
update
(
updateBatchData
,
new
UpdateWrapper
<
KylinOrderRefundBatches
>().
eq
(
"refund_batch_id"
,
refundBatchId
)
);
}
}
public
void
refundBatchStatus
(
RefundBatchApplyParam
refundBatchApplyParam
,
String
type
)
throws
Exception
{
// @Async
public
void
refundBatchStatus
(
RefundBatchApplyParam
refundBatchApplyParam
,
String
type
)
{
// TODO: 2021/6/20 sleepTest
/*try {
Thread.sleep(5000);
} catch (Exception e) {}*/
String
refundBatchId
=
refundBatchApplyParam
.
getRefundBatchId
();
String
refundBatchId
=
refundBatchApplyParam
.
getRefundBatchId
();
Integer
status
=
refundBatchApplyParam
.
getRefundStatus
();
Integer
status
=
refundBatchApplyParam
.
getRefundStatus
();
// 处理查询订单状态
// 处理查询订单状态
...
@@ -109,12 +134,10 @@ public class KylinRefundExecuteServiceImpl {
...
@@ -109,12 +134,10 @@ public class KylinRefundExecuteServiceImpl {
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
;
default
:
throw
new
Exception
(
"type异常,无法操作"
);
}
}
int
count
=
0
;
int
count
=
0
;
int
limitNum
=
1
;
int
limitNum
=
20
;
int
mid
=
0
;
int
mid
=
0
;
do
{
do
{
List
<
KylinOrderRefunds
>
refundList
=
kylinOrderRefundsMapper
.
getRefundList
(
whereType
,
refundBatchId
,
whereStatus
,
mid
,
limitNum
);
List
<
KylinOrderRefunds
>
refundList
=
kylinOrderRefundsMapper
.
getRefundList
(
whereType
,
refundBatchId
,
whereStatus
,
mid
,
limitNum
);
...
@@ -143,6 +166,35 @@ public class KylinRefundExecuteServiceImpl {
...
@@ -143,6 +166,35 @@ public class KylinRefundExecuteServiceImpl {
}
}
}
}
}
while
(
count
>=
limitNum
);
}
while
(
count
>=
limitNum
);
KylinOrderRefundBatches
updateBatchData
=
new
KylinOrderRefundBatches
();
switch
(
type
)
{
case
"cancel"
:
updateBatchData
.
setStatus
(
KylinTableStatusConst
.
STATUS_CANCEL
);
break
;
case
"reapply"
:
updateBatchData
.
setStatus
(
KylinTableStatusConst
.
STATUS_APPLY
);
break
;
case
"approved"
:
updateBatchData
.
setStatus
(
KylinTableStatusConst
.
STATUS_OPERATE_ADOPT
);
break
;
case
"reject"
:
updateBatchData
.
setStatus
(
KylinTableStatusConst
.
STATUS_OPERATE_REJECT
);
break
;
case
"unfilled"
:
updateBatchData
.
setStatus
(
KylinTableStatusConst
.
STATUS_FINANCE_ADOPT
);
break
;
case
"refuse"
:
updateBatchData
.
setStatus
(
KylinTableStatusConst
.
STATUS_FINANCE_REJECT
);
break
;
}
updateBatchData
.
setUpdatedAt
(
LocalDateTime
.
now
());
kylinOrderRefundBatchesMapper
.
update
(
updateBatchData
,
new
UpdateWrapper
<
KylinOrderRefundBatches
>().
eq
(
"refund_batch_id"
,
refundBatchId
)
);
}
}
}
}
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 @
ce088405
...
@@ -20,6 +20,7 @@ import com.liquidnet.service.kylin.mapper.KylinOrderTicketsMapper;
...
@@ -20,6 +20,7 @@ import com.liquidnet.service.kylin.mapper.KylinOrderTicketsMapper;
import
com.liquidnet.service.kylin.mapper.KylinPerformancesMapper
;
import
com.liquidnet.service.kylin.mapper.KylinPerformancesMapper
;
import
org.springframework.beans.BeanUtils
;
import
org.springframework.beans.BeanUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.scheduling.annotation.Async
;
import
org.springframework.stereotype.Service
;
import
org.springframework.stereotype.Service
;
import
java.math.BigDecimal
;
import
java.math.BigDecimal
;
...
@@ -67,11 +68,21 @@ public class KylinRefundPerformancesAdminServiceImpl {
...
@@ -67,11 +68,21 @@ public class KylinRefundPerformancesAdminServiceImpl {
Double
totalPriceRefundWepay
=
0.0
;
Double
totalPriceRefundWepay
=
0.0
;
Integer
totalRefundNumberWepay
=
0
;
Integer
totalRefundNumberWepay
=
0
;
if
(
null
!=
orderStatisAlipay
||
null
!=
orderStatisWepay
)
{
if
(
null
!=
orderStatisAlipay
||
null
!=
orderStatisWepay
)
{
totalPriceRefundAlipay
=
(
Double
)
orderStatisAlipay
.
get
(
"total_price_refund"
);
if
(
null
!=
orderStatisAlipay
)
{
totalRefundNumberAlipay
=
(
Integer
)
orderStatisAlipay
.
get
(
"total_refund_number"
);
BigDecimal
totalPriceRefundAlipayBigDecimal
=
(
BigDecimal
)
orderStatisAlipay
.
get
(
"total_price_refund"
);
totalPriceRefundWepay
=
(
Double
)
orderStatisWepay
.
get
(
"total_price_refund"
);
totalPriceRefundAlipay
=
totalPriceRefundAlipayBigDecimal
.
doubleValue
();
totalRefundNumberWepay
=
(
Integer
)
orderStatisWepay
.
get
(
"total_refund_number"
);
BigDecimal
totalRefundNumberAlipayBigDecimal
=
(
BigDecimal
)
orderStatisAlipay
.
get
(
"total_refund_number"
);
if
(
totalPriceRefundAlipay
<=
0
||
totalPriceRefundWepay
<=
0
)
{
totalRefundNumberAlipay
=
totalRefundNumberAlipayBigDecimal
.
intValue
();
}
if
(
null
!=
orderStatisWepay
)
{
BigDecimal
totalPriceRefundWepayBigDecimal
=
(
BigDecimal
)
orderStatisWepay
.
get
(
"total_price_refund"
);
totalPriceRefundWepay
=
totalPriceRefundWepayBigDecimal
.
doubleValue
();
BigDecimal
totalRefundNumberWepayBigDecimal
=
(
BigDecimal
)
orderStatisWepay
.
get
(
"total_refund_number"
);
totalRefundNumberWepay
=
totalRefundNumberWepayBigDecimal
.
intValue
();
}
if
(
totalPriceRefundAlipay
<=
0
&&
totalPriceRefundWepay
<=
0
)
{
return
ResponseDto
.
failure
(
"演出退款金额为0,无需退款"
);
return
ResponseDto
.
failure
(
"演出退款金额为0,无需退款"
);
}
}
}
else
{
}
else
{
...
@@ -81,26 +92,20 @@ public class KylinRefundPerformancesAdminServiceImpl {
...
@@ -81,26 +92,20 @@ public class KylinRefundPerformancesAdminServiceImpl {
KylinOrderRefundBatches
refundBatchesInfo
=
kylinOrderRefundBatchesMapper
.
selectOne
(
KylinOrderRefundBatches
refundBatchesInfo
=
kylinOrderRefundBatchesMapper
.
selectOne
(
new
QueryWrapper
<
KylinOrderRefundBatches
>().
eq
(
"target_id"
,
targetId
).
orderByDesc
(
"refund_batch_id"
)
new
QueryWrapper
<
KylinOrderRefundBatches
>().
eq
(
"target_id"
,
targetId
).
orderByDesc
(
"refund_batch_id"
)
);
);
if
(
refundBatchesInfo
==
null
||
if
(
refundBatchesInfo
==
null
||
refundBatchesInfo
.
getStatus
()
==
KylinTableStatusConst
.
STATUS_CANCEL
||
refundBatchesInfo
.
getStatus
()
==
KylinTableStatusConst
.
STATUS_CANCEL
||
refundBatchesInfo
.
getStatus
()
==
KylinTableStatusConst
.
STATUS_FINANCE_ADOPT
refundBatchesInfo
.
getStatus
()
==
KylinTableStatusConst
.
STATUS_FINANCE_ADOPT
)
{
)
{
// 添加演出退款记录
// 添加演出退款记录
String
refundBatchId
=
IDGenerator
.
nextSnowId
().
toString
();
String
refundBatchId
=
IDGenerator
.
nextSnowId
();
KylinOrderRefundBatches
createData
=
new
KylinOrderRefundBatches
();
KylinOrderRefundBatches
createData
=
new
KylinOrderRefundBatches
();
createData
.
setRefundBatchId
(
refundBatchId
);
createData
.
setRefundBatchId
(
refundBatchId
);
createData
.
setTargetId
(
targetId
);
createData
.
setTargetId
(
targetId
);
createData
.
setStatus
(
KylinTableStatusConst
.
STATUS_APPLY
);
createData
.
setStatus
(
KylinTableStatusConst
.
STATUS_APPLY
11
);
createData
.
setTotalNum
(
totalRefundNumberAlipay
+
totalRefundNumberWepay
);
createData
.
setTotalNum
(
totalRefundNumberAlipay
+
totalRefundNumberWepay
);
if
(
null
!=
totalPriceRefundAlipay
)
{
createData
.
setTotalAlipay
(
BigDecimal
.
valueOf
(
totalPriceRefundAlipay
));
createData
.
setTotalAlipay
(
BigDecimal
.
valueOf
(
totalPriceRefundAlipay
));
createData
.
setTotalWepay
(
BigDecimal
.
valueOf
(
totalPriceRefundWepay
));
}
if
(
null
!=
totalPriceRefundWepay
)
{
createData
.
setTotalWepay
(
BigDecimal
.
valueOf
(
totalPriceRefundWepay
));
}
createData
.
setCreatedAt
(
LocalDateTime
.
now
());
createData
.
setCreatedAt
(
LocalDateTime
.
now
());
int
resNum
=
kylinOrderRefundBatchesMapper
.
insert
(
createData
);
int
resNum
=
kylinOrderRefundBatchesMapper
.
insert
(
createData
);
if
(
resNum
>
0
)
{
if
(
resNum
>
0
)
{
// 开始执行批量提交审核 分批处理退款申请
// 开始执行批量提交审核 分批处理退款申请
...
@@ -124,30 +129,30 @@ public class KylinRefundPerformancesAdminServiceImpl {
...
@@ -124,30 +129,30 @@ public class KylinRefundPerformancesAdminServiceImpl {
switch
(
type
)
{
switch
(
type
)
{
case
"reapply"
:
case
"reapply"
:
paymentTypeAlipayArray
=
new
Integer
[]{
KylinTableStatusConst
.
STATUS_OPERATE_REJECT
,
KylinTableStatusConst
.
STATUS_FINANCE_REJECT
};
paymentTypeAlipayArray
=
new
Integer
[]{
KylinTableStatusConst
.
STATUS_OPERATE_REJECT
,
KylinTableStatusConst
.
STATUS_FINANCE_REJECT
};
batchUpdateStatus
=
KylinTableStatusConst
.
STATUS_APPLY
;
batchUpdateStatus
=
KylinTableStatusConst
.
STATUS_APPLY
11
;
break
;
break
;
case
"cancel"
:
case
"cancel"
:
paymentTypeAlipayArray
=
new
Integer
[]{
KylinTableStatusConst
.
STATUS_APPLY
,
KylinTableStatusConst
.
STATUS_OPERATE_REJECT
,
KylinTableStatusConst
.
STATUS_FINANCE_REJECT
};
paymentTypeAlipayArray
=
new
Integer
[]{
KylinTableStatusConst
.
STATUS_APPLY
,
KylinTableStatusConst
.
STATUS_OPERATE_REJECT
,
KylinTableStatusConst
.
STATUS_FINANCE_REJECT
};
batchUpdateStatus
=
KylinTableStatusConst
.
STATUS_CANCEL
;
batchUpdateStatus
=
KylinTableStatusConst
.
STATUS_CANCEL
22
;
break
;
break
;
case
"review"
:
case
"review"
:
batchUpdateStatus
=
batchStatus
;
batchUpdateStatus
=
batchStatus
;
if
(
batchStatus
==
KylinTableStatusConst
.
STATUS_OPERATE_ADOPT
)
{
// 通过申请
if
(
batchStatus
==
KylinTableStatusConst
.
STATUS_OPERATE_ADOPT
44
)
{
// 通过申请
paymentTypeAlipayArray
=
new
Integer
[]{
KylinTableStatusConst
.
STATUS_APPLY
};
paymentTypeAlipayArray
=
new
Integer
[]{
KylinTableStatusConst
.
STATUS_APPLY
};
orderUpdateStatus
=
KylinTableStatusConst
.
ORDER_REFUND_STATUS_APPROVED
;
orderUpdateStatus
=
KylinTableStatusConst
.
ORDER_REFUND_STATUS_APPROVED
;
}
}
if
(
batchStatus
==
KylinTableStatusConst
.
STATUS_OPERATE_REJECT
)
{
// 驳回申请
if
(
batchStatus
==
KylinTableStatusConst
.
STATUS_OPERATE_REJECT
33
)
{
// 驳回申请
paymentTypeAlipayArray
=
new
Integer
[]{
KylinTableStatusConst
.
STATUS_APPLY
};
paymentTypeAlipayArray
=
new
Integer
[]{
KylinTableStatusConst
.
STATUS_APPLY
};
orderUpdateStatus
=
KylinTableStatusConst
.
ORDER_REFUND_STATUS_REJECT
;
orderUpdateStatus
=
KylinTableStatusConst
.
ORDER_REFUND_STATUS_REJECT
;
}
}
break
;
break
;
case
"execute"
:
case
"execute"
:
batchUpdateStatus
=
batchStatus
;
batchUpdateStatus
=
batchStatus
;
if
(
batchStatus
==
KylinTableStatusConst
.
STATUS_FINANCE_ADOPT
)
{
// 执行退款
if
(
batchStatus
==
KylinTableStatusConst
.
STATUS_FINANCE_ADOPT
66
)
{
// 执行退款
paymentTypeAlipayArray
=
new
Integer
[]{
KylinTableStatusConst
.
STATUS_OPERATE_ADOPT
,
KylinTableStatusConst
.
STATUS_FINANCE_REJECT
};
paymentTypeAlipayArray
=
new
Integer
[]{
KylinTableStatusConst
.
STATUS_OPERATE_ADOPT
,
KylinTableStatusConst
.
STATUS_FINANCE_REJECT
};
orderUpdateStatus
=
KylinTableStatusConst
.
ORDER_REFUND_STATUS_UNFILLED
;
orderUpdateStatus
=
KylinTableStatusConst
.
ORDER_REFUND_STATUS_UNFILLED
;
}
}
if
(
batchStatus
==
KylinTableStatusConst
.
STATUS_FINANCE_REJECT
)
{
// 拒绝退款
if
(
batchStatus
==
KylinTableStatusConst
.
STATUS_FINANCE_REJECT
55
)
{
// 拒绝退款
paymentTypeAlipayArray
=
new
Integer
[]{
KylinTableStatusConst
.
STATUS_OPERATE_ADOPT
,
KylinTableStatusConst
.
STATUS_FINANCE_REJECT
};
paymentTypeAlipayArray
=
new
Integer
[]{
KylinTableStatusConst
.
STATUS_OPERATE_ADOPT
,
KylinTableStatusConst
.
STATUS_FINANCE_REJECT
};
orderUpdateStatus
=
KylinTableStatusConst
.
ORDER_REFUND_STATUS_REFUSE
;
orderUpdateStatus
=
KylinTableStatusConst
.
ORDER_REFUND_STATUS_REFUSE
;
}
}
...
@@ -161,6 +166,11 @@ public class KylinRefundPerformancesAdminServiceImpl {
...
@@ -161,6 +166,11 @@ public class KylinRefundPerformancesAdminServiceImpl {
if
(
null
!=
refundBatchesInfo
)
{
if
(
null
!=
refundBatchesInfo
)
{
// 开始执行批量提交审核 分批处理退款申请
// 开始执行批量提交审核 分批处理退款申请
try
{
try
{
KylinOrderRefundBatches
params
=
new
KylinOrderRefundBatches
();
params
.
setStatus
(
batchUpdateStatus
);
params
.
setUpdatedAt
(
LocalDateTime
.
now
());
kylinOrderRefundBatchesMapper
.
update
(
params
,
new
UpdateWrapper
<
KylinOrderRefundBatches
>().
eq
(
"refund_batch_id"
,
refundBatchId
));
if
(
null
!=
orderUpdateStatus
)
{
if
(
null
!=
orderUpdateStatus
)
{
refundBatchApplyParam
.
setRefundStatus
(
orderUpdateStatus
);
refundBatchApplyParam
.
setRefundStatus
(
orderUpdateStatus
);
}
}
...
@@ -169,10 +179,6 @@ public class KylinRefundPerformancesAdminServiceImpl {
...
@@ -169,10 +179,6 @@ public class KylinRefundPerformancesAdminServiceImpl {
return
ResponseDto
.
failure
(
"操作失败"
);
return
ResponseDto
.
failure
(
"操作失败"
);
}
}
KylinOrderRefundBatches
params
=
new
KylinOrderRefundBatches
();
params
.
setStatus
(
batchUpdateStatus
);
kylinOrderRefundBatchesMapper
.
update
(
params
,
new
UpdateWrapper
<
KylinOrderRefundBatches
>().
eq
(
"refund_batch_id"
,
refundBatchId
));
return
ResponseDto
.
success
();
return
ResponseDto
.
success
();
}
else
{
}
else
{
return
ResponseDto
.
failure
(
"当前状态下不允许此操作"
);
return
ResponseDto
.
failure
(
"当前状态下不允许此操作"
);
...
...
liquidnet-bus-do/liquidnet-service-kylin-do/src/main/java/com/liquidnet/service/kylin/dao/OrderRefundBatchDao.java
View file @
ce088405
...
@@ -28,22 +28,40 @@ public class OrderRefundBatchDao implements Serializable {
...
@@ -28,22 +28,40 @@ public class OrderRefundBatchDao implements Serializable {
this
.
status
=
status
;
this
.
status
=
status
;
switch
(
status
){
switch
(
status
){
case
1
:
case
1
:
this
.
statusName
=
"申请退款"
;
this
.
statusName
=
"申请退款处理完成"
;
break
;
case
11
:
this
.
statusName
=
"申请退款处理中"
;
break
;
break
;
case
2
:
case
2
:
this
.
statusName
=
"取消退款"
;
this
.
statusName
=
"取消退款处理完成"
;
break
;
case
22
:
this
.
statusName
=
"取消退款处理中"
;
break
;
break
;
case
3
:
case
3
:
this
.
statusName
=
"运营驳回审核"
;
this
.
statusName
=
"运营驳回审核处理完成"
;
break
;
case
33
:
this
.
statusName
=
"运营驳回审核处理中"
;
break
;
break
;
case
4
:
case
4
:
this
.
statusName
=
"运营通过审核"
;
this
.
statusName
=
"运营通过审核处理完成"
;
break
;
case
44
:
this
.
statusName
=
"运营通过审核处理中"
;
break
;
break
;
case
5
:
case
5
:
this
.
statusName
=
"财务驳回审核"
;
this
.
statusName
=
"财务驳回审核处理完成"
;
break
;
case
55
:
this
.
statusName
=
"财务驳回审核处理中"
;
break
;
break
;
case
6
:
case
6
:
this
.
statusName
=
"财务通过审核"
;
this
.
statusName
=
"财务通过审核处理完成"
;
break
;
case
66
:
this
.
statusName
=
"财务通过审核处理中"
;
break
;
break
;
default
:
default
:
this
.
statusName
=
"其他"
;
this
.
statusName
=
"其他"
;
...
...
liquidnet-bus-do/liquidnet-service-kylin-do/src/main/java/com/liquidnet/service/kylin/mapper/KylinOrderTicketsMapper.java
View file @
ce088405
...
@@ -24,8 +24,8 @@ public interface KylinOrderTicketsMapper extends BaseMapper<KylinOrderTickets> {
...
@@ -24,8 +24,8 @@ public interface KylinOrderTicketsMapper extends BaseMapper<KylinOrderTickets> {
// 查询演出订单能退款的总金额和总订单数量
// 查询演出订单能退款的总金额和总订单数量
HashMap
<
String
,
Object
>
getPerformanceRefundOrderStatis
(
@Param
(
"targetId"
)
String
targetId
,
@Param
(
"paymentType"
)
String
[]
paymentType
);
HashMap
<
String
,
Object
>
getPerformanceRefundOrderStatis
(
@Param
(
"targetId"
)
String
targetId
,
@Param
(
"paymentType"
)
String
[]
paymentType
);
// 获取
订单和购票
信息
// 获取
可退款的订单
信息
List
<
KylinOrderTickets
>
getOrderList
(
@Param
(
"targetId"
)
String
targetId
,
@Param
(
"mid"
)
int
mid
,
@Param
(
"limitNum"
)
int
limitNum
);
List
<
KylinOrderTickets
>
get
CanRefund
OrderList
(
@Param
(
"targetId"
)
String
targetId
,
@Param
(
"mid"
)
int
mid
,
@Param
(
"limitNum"
)
int
limitNum
);
List
<
OrderTicketsListDao
>
orderList
(
Map
<
String
,
Object
>
map
);
List
<
OrderTicketsListDao
>
orderList
(
Map
<
String
,
Object
>
map
);
...
...
liquidnet-bus-do/liquidnet-service-kylin-do/src/main/resources/com.liquidnet.service.kylin.mapper/KylinOrderTicketsMapper.xml
View file @
ce088405
...
@@ -69,7 +69,7 @@
...
@@ -69,7 +69,7 @@
</where>
</where>
LIMIT 1
LIMIT 1
</select>
</select>
<select
id=
"getOrderList"
parameterType=
"java.lang.String"
<select
id=
"get
CanRefund
OrderList"
parameterType=
"java.lang.String"
resultType=
"com.liquidnet.service.kylin.entity.KylinOrderTickets"
>
resultType=
"com.liquidnet.service.kylin.entity.KylinOrderTickets"
>
SELECT o.mid, order_tickets_id, number, price_actual, performance_title
SELECT o.mid, order_tickets_id, number, price_actual, performance_title
FROM kylin_order_tickets AS o
FROM kylin_order_tickets AS o
...
@@ -77,7 +77,7 @@
...
@@ -77,7 +77,7 @@
JOIN kylin_order_ticket_status AS s ON s.order_id = o.order_tickets_id
JOIN kylin_order_ticket_status AS s ON s.order_id = o.order_tickets_id
<where>
<where>
r.performance_id=${targetId}
r.performance_id=${targetId}
AND s.status
=1
AND s.status
IN (1, 3, 6)
AND s.pay_status=1
AND s.pay_status=1
AND o.coupon_type='no'
AND o.coupon_type='no'
AND o.mid>${mid}
AND o.mid>${mid}
...
...
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