记得上下班打卡 | 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
96eb77e3
Commit
96eb77e3
authored
Jun 25, 2021
by
jiangxiulong
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/dev' into dev
parents
0b9de53d
4d3d1fdb
Changes
14
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
14 changed files
with
371 additions
and
283 deletions
+371
-283
PerformanceStep2Param.java
...uidnet/service/kylin/dto/param/PerformanceStep2Param.java
+3
-0
KylinStationPerformanceVo.java
...rvice/kylin/dto/vo/returns/KylinStationPerformanceVo.java
+3
-11
ClientUpdateAnnotation.java
...idnet/commons/lang/annotation/ClientUpdateAnnotation.java
+17
-0
liquidnet-service-adam.yml
...et-bus-config/liquidnet-config/liquidnet-service-adam.yml
+1
-1
liquidnet-service-kylin-dev.yml
...s-config/liquidnet-config/liquidnet-service-kylin-dev.yml
+1
-1
liquidnet-service-kylin.yml
...t-bus-config/liquidnet-config/liquidnet-service-kylin.yml
+1
-1
KylinPerformancesMapper.xml
...iquidnet.service.kylin.mapper/KylinPerformancesMapper.xml
+72
-69
KylinUtils.java
.../liquidnet/service/consumer/service/Utils/KylinUtils.java
+60
-50
KylinOrderTicketsController.java
...service/kylin/controller/KylinOrderTicketsController.java
+1
-1
KylinStationController.java
...dnet/service/kylin/controller/KylinStationController.java
+117
-84
KylinOrderTicketsServiceImpl.java
...vice/kylin/service/impl/KylinOrderTicketsServiceImpl.java
+18
-7
KylinPerformancesPartnerServiceImpl.java
...ice/impl/partner/KylinPerformancesPartnerServiceImpl.java
+14
-2
DataUtils.java
...ain/java/com/liquidnet/service/kylin/utils/DataUtils.java
+62
-55
errors.properties
...t-service-kylin-impl/src/main/resources/errors.properties
+1
-1
No files found.
liquidnet-bus-api/liquidnet-service-kylin-api/src/main/java/com/liquidnet/service/kylin/dto/param/PerformanceStep2Param.java
View file @
96eb77e3
...
...
@@ -30,6 +30,9 @@ public class PerformanceStep2Param implements Serializable {
@ApiModelProperty
(
hidden
=
true
)
private
Integer
auditStatus
;
@ApiModelProperty
(
hidden
=
true
)
private
Integer
status
;
@ApiModelProperty
(
value
=
"场次数据"
,
hidden
=
true
)
private
List
<
TicketTimesTicketCreatePartnerVo
>
ticketTimes
;
}
liquidnet-bus-api/liquidnet-service-kylin-api/src/main/java/com/liquidnet/service/kylin/dto/vo/returns/KylinStationPerformanceVo.java
View file @
96eb77e3
package
com
.
liquidnet
.
service
.
kylin
.
dto
.
vo
.
returns
;
import
com.liquidnet.service.kylin.dto.vo.m
ongo.KylinPerformance
Vo
;
import
com.liquidnet.service.kylin.dto.vo.m
iddle.KylinTicketTimes
Vo
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
...
...
@@ -39,6 +39,8 @@ public class KylinStationPerformanceVo implements Serializable, Cloneable {
private
Integer
checkedNum
;
@ApiModelProperty
(
position
=
23
,
value
=
"余量[9]"
)
private
Integer
remainderNum
;
@ApiModelProperty
(
position
=
30
,
value
=
"#过程数据,前端无需关注"
)
private
List
<
KylinTicketTimesVo
>
ticketTimeList
;
private
static
final
KylinStationPerformanceVo
obj
=
new
KylinStationPerformanceVo
();
...
...
@@ -49,14 +51,4 @@ public class KylinStationPerformanceVo implements Serializable, Cloneable {
return
new
KylinStationPerformanceVo
();
}
}
public
KylinStationPerformanceVo
copy
(
KylinPerformanceVo
source
)
{
if
(
null
==
source
)
return
this
;
this
.
performancesId
=
source
.
getPerformancesId
();
this
.
type
=
source
.
getType
();
this
.
title
=
source
.
getTitle
();
this
.
timeStart
=
source
.
getTimeStart
();
this
.
timeEnd
=
source
.
getTimeEnd
();
return
this
;
}
}
liquidnet-bus-common/liquidnet-common-base/src/main/java/com/liquidnet/commons/lang/annotation/ClientUpdateAnnotation.java
0 → 100644
View file @
96eb77e3
package
com
.
liquidnet
.
commons
.
lang
.
annotation
;
import
java.lang.annotation.ElementType
;
import
java.lang.annotation.Retention
;
import
java.lang.annotation.RetentionPolicy
;
import
java.lang.annotation.Target
;
@Target
(
ElementType
.
FIELD
)
@Retention
(
RetentionPolicy
.
RUNTIME
)
public
@interface
ClientUpdateAnnotation
{
String
version
()
default
"100000000"
;
String
source
()
default
"ALL"
;
String
path
()
default
"NONE"
;
}
liquidnet-bus-config/liquidnet-config/liquidnet-service-adam.yml
View file @
96eb77e3
...
...
@@ -28,7 +28,7 @@ logging:
console
:
'
%d{yyyy-MM-dd
HH:mm:ss.SSS}
[
%-5level]
%thread
[%logger{96}:%line]
-
%msg%n'
rolling-file-name
:
${liquidnet.logfile.path}/${liquidnet.logfile.name}-%d{yyyy-MM-dd}.%i.log
level
:
root
:
${liquidnet.logfile.level}
root
:
info
#以下是为指定包设置日志级别
com.liquidnet
:
${liquidnet.logfile.level}
# -----------------------------------------------------------
...
...
liquidnet-bus-config/liquidnet-config/liquidnet-service-kylin-dev.yml
View file @
96eb77e3
...
...
@@ -14,7 +14,7 @@ liquidnet:
pattern-file
:
'
%d{yyyy-MM-dd
HH:mm:ss.SSS}
[
%-5level]
%thread
[%logger{96}:%line]
-
%msg%n'
pattern-console
:
'
%d{yyyy-MM-dd
HH:mm:ss.SSS}
[
%-5level]
%thread
[%logger{96}:%line]
-
%msg%n'
pattern-rolling-file-name
:
${liquidnet.logfile.path}/${liquidnet.logfile.name}-%d{yyyy-MM-dd}.%i.log
level
:
info
level
:
debug
rabbitmq
:
connection-timeout
:
5000
mysql
:
...
...
liquidnet-bus-config/liquidnet-config/liquidnet-service-kylin.yml
View file @
96eb77e3
...
...
@@ -28,7 +28,7 @@ logging:
console
:
'
%d{yyyy-MM-dd
HH:mm:ss.SSS}
[
%-5level]
%thread
[%logger{96}:%line]
-
%msg%n'
rolling-file-name
:
${liquidnet.logfile.path}/${liquidnet.logfile.name}-%d{yyyy-MM-dd}.%i.log
level
:
root
:
${liquidnet.logfile.level}
root
:
info
#以下是为指定包设置日志级别
com
:
liquidnet
:
${liquidnet.logfile.level}
...
...
liquidnet-bus-do/liquidnet-service-kylin-do/src/main/resources/com.liquidnet.service.kylin.mapper/KylinPerformancesMapper.xml
View file @
96eb77e3
This diff is collapsed.
Click to expand it.
liquidnet-bus-service/liquidnet-service-consumer/src/main/java/com/liquidnet/service/consumer/service/Utils/KylinUtils.java
View file @
96eb77e3
...
...
@@ -20,6 +20,7 @@ public class KylinUtils {
@Autowired
private
RedisUtil
redisUtil
;
/**
* @param userId 用户id
* @param type 1新增 2修改
...
...
@@ -31,13 +32,13 @@ public class KylinUtils {
KylinOrderListVo
voItem
=
new
KylinOrderListVo
();
KylinOrderTicketVo
data
;
if
(
dataSingle
==
null
)
{
data
=
(
KylinOrderTicketVo
)
redisUtil
.
get
(
KylinRedisConst
.
ORDER
+
orderId
);
data
=
(
KylinOrderTicketVo
)
redisUtil
.
get
(
KylinRedisConst
.
ORDER
+
orderId
);
}
else
{
data
=
dataSingle
;
}
BeanUtils
.
copyProperties
(
data
,
voItem
);
List
<
KylinOrderListVo
>
redisData
=
(
List
<
KylinOrderListVo
>)
redisUtil
.
get
(
KylinRedisConst
.
ORDER_LIST
+
userId
);
if
(
type
==
1
)
{
if
(
type
==
1
)
{
redisVo
.
add
(
voItem
);
if
(
redisData
.
size
()
>
0
)
{
if
(
redisData
.
get
(
0
).
getOrderTicketsId
().
equals
(
orderId
))
{
...
...
@@ -63,7 +64,7 @@ public class KylinUtils {
if
(
redisVo
.
size
()
==
0
)
{
vo
.
add
(
voItem
);
}
redisUtil
.
set
(
KylinRedisConst
.
ORDER_LIST
+
userId
,
vo
);
redisUtil
.
set
(
KylinRedisConst
.
ORDER_LIST
+
userId
,
vo
);
return
true
;
case
2
:
for
(
int
i
=
0
;
i
<
redisVo
.
size
();
i
++)
{
...
...
@@ -76,7 +77,7 @@ public class KylinUtils {
vo
.
add
(
redisVo
.
get
(
i
));
}
}
redisUtil
.
set
(
KylinRedisConst
.
ORDER_LIST
+
userId
,
vo
);
redisUtil
.
set
(
KylinRedisConst
.
ORDER_LIST
+
userId
,
vo
);
return
true
;
default
:
return
false
;
...
...
@@ -116,56 +117,65 @@ public class KylinUtils {
String
ticketIdKey
=
redisKey
+
":"
+
KylinRedisConst
.
TICKET_ID
+
":"
+
ticketId
;
String
ticketUseTimeKey
=
ticketIdKey
+
":"
+
KylinRedisConst
.
USE_TIME
;
redisUtil
.
set
(
ticketUseTimeKey
,
useTime
);
if
(
buyCount
>
0
)
{
redisUtil
.
incr
(
ticketIdKey
,
buyCount
);
if
(
1
==
ticketType
)
{
int
count
=
0
;
for
(
int
i
=
0
;
i
<
allTicketId
.
get
(
useTime
).
size
();
i
++)
{
String
item
=
allTicketId
.
get
(
useTime
).
get
(
i
);
if
(
allTicketId
.
get
(
useTime
).
size
()
==
1
)
{
redisUtil
.
incr
(
performanceIdKey
,
buyCount
);
break
;
}
if
(
null
==
redisUtil
.
get
(
redisKey
+
":"
+
KylinRedisConst
.
TICKET_ID
+
":"
+
item
))
{
redisUtil
.
set
(
redisKey
+
":"
+
KylinRedisConst
.
TICKET_ID
+
":"
+
item
,
0
);
}
if
(
i
==
0
)
{
count
=
(
int
)
redisUtil
.
get
(
redisKey
+
":"
+
KylinRedisConst
.
TICKET_ID
+
":"
+
item
);
}
else
{
if
(
count
!=
(
int
)
redisUtil
.
get
(
redisKey
+
":"
+
KylinRedisConst
.
TICKET_ID
+
":"
+
item
))
{
redisUtil
.
incr
(
performanceIdKey
,
buyCount
);
break
;
}
}
}
}
else
{
redisUtil
.
incr
(
performanceIdKey
,
buyCount
);
}
redisUtil
.
incr
(
performanceIdKey
,
buyCount
);
}
else
{
redisUtil
.
decr
(
ticketIdKey
,
Math
.
abs
(
buyCount
));
if
(
1
==
ticketType
)
{
int
count
=
0
;
for
(
int
i
=
0
;
i
<
allTicketId
.
get
(
useTime
).
size
();
i
++)
{
String
item
=
allTicketId
.
get
(
useTime
).
get
(
i
);
if
(
allTicketId
.
get
(
useTime
).
size
()
==
1
)
{
redisUtil
.
decr
(
performanceIdKey
,
Math
.
abs
(
buyCount
));
break
;
}
if
(
null
==
redisUtil
.
get
(
redisKey
+
":"
+
KylinRedisConst
.
TICKET_ID
+
":"
+
item
))
{
redisUtil
.
set
(
redisKey
+
":"
+
KylinRedisConst
.
TICKET_ID
+
":"
+
item
,
0
);
}
if
(
i
==
0
)
{
count
=
(
int
)
redisUtil
.
get
(
redisKey
+
":"
+
KylinRedisConst
.
TICKET_ID
+
":"
+
item
);
}
else
{
if
(
count
!=
(
int
)
redisUtil
.
get
(
redisKey
+
":"
+
KylinRedisConst
.
TICKET_ID
+
":"
+
item
))
{
redisUtil
.
decr
(
performanceIdKey
,
Math
.
abs
(
buyCount
));
break
;
}
}
}
}
else
{
redisUtil
.
decr
(
performanceIdKey
,
Math
.
abs
(
buyCount
));
}
redisUtil
.
decr
(
performanceIdKey
,
Math
.
abs
(
buyCount
));
}
// if (buyCount > 0) {
// redisUtil.incr(ticketIdKey, buyCount);
// if (1 == ticketType) {
// int count = 0;
// for (int i = 0; i < allTicketId.get(useTime).size(); i++) {
// String item = allTicketId.get(useTime).get(i);
// if (allTicketId.get(useTime).size() == 1) {
// redisUtil.incr(performanceIdKey, buyCount);
// break;
// }
// if (null == redisUtil.get(redisKey + ":" + KylinRedisConst.TICKET_ID + ":" + item)) {
// redisUtil.set(redisKey + ":" + KylinRedisConst.TICKET_ID + ":" + item, 0);
// }
// if (i == 0) {
// count = (int) redisUtil.get(redisKey + ":" + KylinRedisConst.TICKET_ID + ":" + item);
// } else {
// if (count != (int) redisUtil.get(redisKey + ":" + KylinRedisConst.TICKET_ID + ":" + item)) {
// redisUtil.incr(performanceIdKey, buyCount);
// break;
// }
// }
// }
// } else {
// redisUtil.incr(performanceIdKey, buyCount);
// }
// } else {
// redisUtil.decr(ticketIdKey, Math.abs(buyCount));
// if (1 == ticketType) {
// int count = 0;
// for (int i = 0; i < allTicketId.get(useTime).size(); i++) {
// String item = allTicketId.get(useTime).get(i);
// if (allTicketId.get(useTime).size() == 1) {
// redisUtil.decr(performanceIdKey, Math.abs(buyCount));
// break;
// }
// if (null == redisUtil.get(redisKey + ":" + KylinRedisConst.TICKET_ID + ":" + item)) {
// redisUtil.set(redisKey + ":" + KylinRedisConst.TICKET_ID + ":" + item, 0);
// }
// if (i == 0) {
// count = (int) redisUtil.get(redisKey + ":" + KylinRedisConst.TICKET_ID + ":" + item);
// } else {
// if (count != (int) redisUtil.get(redisKey + ":" + KylinRedisConst.TICKET_ID + ":" + item)) {
// redisUtil.decr(performanceIdKey, Math.abs(buyCount));
// break;
// }
// }
// }
// } else {
// redisUtil.decr(performanceIdKey, Math.abs(buyCount));
// }
// }
}
}
liquidnet-bus-service/liquidnet-service-kylin/liquidnet-service-kylin-impl/src/main/java/com/liquidnet/service/kylin/controller/KylinOrderTicketsController.java
View file @
96eb77e3
...
...
@@ -55,7 +55,7 @@ public class KylinOrderTicketsController {
public
ResponseDto
<
PayResultVo
>
payAgain
(
@RequestBody
@Valid
PayAgainParam
payAgainParam
)
{
PayResultVo
vo
=
orderTicketsService
.
payAgain
(
payAgainParam
).
getData
();
if
(
null
==
vo
)
{
return
ResponseDto
.
failure
(
ErrorMapping
.
get
(
"20003"
)
);
return
ResponseDto
.
failure
(
"订单已失效"
);
}
else
{
return
ResponseDto
.
success
(
vo
);
}
...
...
liquidnet-bus-service/liquidnet-service-kylin/liquidnet-service-kylin-impl/src/main/java/com/liquidnet/service/kylin/controller/KylinStationController.java
View file @
96eb77e3
This diff is collapsed.
Click to expand it.
liquidnet-bus-service/liquidnet-service-kylin/liquidnet-service-kylin-impl/src/main/java/com/liquidnet/service/kylin/service/impl/KylinOrderTicketsServiceImpl.java
View file @
96eb77e3
...
...
@@ -921,7 +921,7 @@ public class KylinOrderTicketsServiceImpl extends ServiceImpl<KylinOrderTicketsM
DateUtil
.
parse
(
item
.
getOverdueAt
(),
"yyyy-MM-dd HH:mm:ss"
),
DateUtil
.
parse
(
DateUtil
.
getNowTime
(),
"yyyy-MM-dd HH:mm:ss"
)
));
if
(
item
.
getRestTime
()<=
0L
)
{
if
(
item
.
getRestTime
()
<=
0L
)
{
item
.
setRestTime
(
0L
);
}
}
catch
(
Exception
e
)
{
...
...
@@ -951,6 +951,7 @@ public class KylinOrderTicketsServiceImpl extends ServiceImpl<KylinOrderTicketsM
@Override
public
OrderDetailsVo
orderDetails
(
String
orderId
)
{
log
.
error
(
"调用订单详情"
);
OrderDetailsVo
vo
=
new
OrderDetailsVo
();
try
{
String
uid
=
CurrentUtil
.
getCurrentUid
();
...
...
@@ -1013,7 +1014,7 @@ public class KylinOrderTicketsServiceImpl extends ServiceImpl<KylinOrderTicketsM
DateUtil
.
parse
(
orderTicketVo
.
getOverdueAt
(),
"yyyy-MM-dd HH:mm:ss"
),
DateUtil
.
parse
(
DateUtil
.
getNowTime
(),
"yyyy-MM-dd HH:mm:ss"
)
));
if
(
vo
.
getRestTime
()<=
0L
)
{
if
(
vo
.
getRestTime
()
<=
0L
)
{
vo
.
setRestTime
(
0L
);
}
}
else
{
...
...
@@ -1032,7 +1033,7 @@ public class KylinOrderTicketsServiceImpl extends ServiceImpl<KylinOrderTicketsM
vo
.
setOrderTicketVo
(
orderTicketVo
);
vo
.
setEnterDescribe
(
dataUtils
.
getEnterInfo
(
"1"
));
}
log
.
info
(
UserPathDto
.
setData
(
"订单
列表
"
,
orderId
,
vo
));
log
.
info
(
UserPathDto
.
setData
(
"订单
详情
"
,
orderId
,
vo
));
return
vo
;
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
...
...
@@ -1190,12 +1191,22 @@ public class KylinOrderTicketsServiceImpl extends ServiceImpl<KylinOrderTicketsM
public
ResponseDto
<
Integer
>
orderUnPayCount
()
{
String
uid
=
CurrentUtil
.
getCurrentUid
();
List
<
KylinOrderListVo
>
voList
=
dataUtils
.
getOrderList
(
uid
);
Integer
unPayCount
=
0
;
int
unPayCount
=
0
;
for
(
KylinOrderListVo
item
:
voList
)
{
if
(
item
.
getStatus
()
==
0
)
{
unPayCount
+=
1
;
}
if
(
item
.
getStatus
().
equals
(
KylinTableStatusConst
.
ORDER_STATUS0
))
{
item
.
setRestTime
(
DateUtil
.
intervalSeconds
(
DateUtil
.
parse
(
item
.
getOverdueAt
(),
"yyyy-MM-dd HH:mm:ss"
),
DateUtil
.
parse
(
DateUtil
.
getNowTime
(),
"yyyy-MM-dd HH:mm:ss"
)
));
if
(
item
.
getRestTime
()
<=
0L
)
{
item
.
setRestTime
(
0L
);
}
else
{
unPayCount
+=
1
;
}
}
else
{
item
.
setRestTime
(
0L
);
}
}
return
ResponseDto
.
success
(
unPayCount
);
}
...
...
liquidnet-bus-service/liquidnet-service-kylin/liquidnet-service-kylin-impl/src/main/java/com/liquidnet/service/kylin/service/impl/partner/KylinPerformancesPartnerServiceImpl.java
View file @
96eb77e3
...
...
@@ -211,9 +211,13 @@ public class KylinPerformancesPartnerServiceImpl extends ServiceImpl<KylinPerfor
PerformancePartnerVo
data
=
mongoTemplate
.
findOne
(
Query
.
query
(
Criteria
.
where
(
"performancesId"
).
is
(
performancesId
)),
PerformancePartnerVo
.
class
,
PerformancePartnerVo
.
class
.
getSimpleName
()
);
KylinPerformanceStatus
performanceStatus
=
performanceStatusMapper
.
selectOne
(
new
UpdateWrapper
<
KylinPerformanceStatus
>().
eq
(
"performance_id"
,
performancesId
));
if
(
data
==
null
)
{
return
ResponseDto
.
failure
(
ErrorMapping
.
get
(
20104
));
}
if
(
null
!=
performanceStatus
)
{
data
.
setStatus
(
performanceStatus
.
getStatus
());
}
return
ResponseDto
.
success
(
data
);
}
...
...
@@ -229,7 +233,7 @@ public class KylinPerformancesPartnerServiceImpl extends ServiceImpl<KylinPerfor
}
else
if
(
performanceStatus
.
getStatus
()
==
1
||
performanceStatus
.
getStatus
()
==
3
||
performanceStatus
.
getStatus
()
==
6
||
performanceStatus
.
getStatus
()
==
7
||
performanceStatus
.
getStatus
()
==
8
||
performanceStatus
.
getStatus
()
==
9
)
{
// 修改
result
=
updateStep2
(
step2Param
);
}
else
if
(
performanceStatus
.
getStatus
()
==
10
){
result
=
ResponseDto
.
success
(
"演出已结束不可修改"
);
result
=
ResponseDto
.
failure
(
"演出已结束不可修改"
);
}
}
return
result
;
...
...
@@ -406,6 +410,7 @@ public class KylinPerformancesPartnerServiceImpl extends ServiceImpl<KylinPerfor
ticketSellTime
.
setTimeEnd
(
DateUtil
.
Formatter
.
yyyyMMddHHmmss
.
parse
(
ticketItem
.
getTimeEnd
()));
ticketSellTime
.
setTimeStart
(
DateUtil
.
Formatter
.
yyyyMMddHHmmss
.
parse
(
ticketItem
.
getTimeStart
()));
ticketSellTime
.
setAdvanceMinuteMember
(
null
);
ticketSellTime
.
setPayCountdownMinute
(
kylinPerformanceMisVo
.
getPayCountdownMinute
());
//修改 价格
ticketSellTime
.
setPrice
(
ticketItem
.
getPrice
());
ticketSellTime
.
setPriceDiscountMember
(
null
);
...
...
@@ -454,6 +459,13 @@ public class KylinPerformancesPartnerServiceImpl extends ServiceImpl<KylinPerfor
PerformanceStep2Param
performanceStep2Param
=
new
PerformanceStep2Param
();
BeanUtils
.
copyProperties
(
data
,
performanceStep2Param
);
KylinPerformanceStatus
performanceStatus
=
performanceStatusMapper
.
selectOne
(
new
UpdateWrapper
<
KylinPerformanceStatus
>().
eq
(
"performance_id"
,
performancesId
));
if
(
null
!=
performanceStatus
)
{
performanceStep2Param
.
setStatus
(
performanceStatus
.
getStatus
());
}
else
{
performanceStep2Param
.
setStatus
(-
1
);
}
performanceStep2Param
.
setTicketTimes
(
ticketTimesTicketCreatePartnerVoList
);
return
ResponseDto
.
success
(
performanceStep2Param
);
}
...
...
@@ -514,7 +526,7 @@ public class KylinPerformancesPartnerServiceImpl extends ServiceImpl<KylinPerfor
KylinPerformanceStatus
performanceStatusData
=
performanceStatusMapper
.
selectOne
(
new
UpdateWrapper
<
KylinPerformanceStatus
>().
eq
(
"performance_id"
,
performancesId
));
if
(
performanceStatusData
.
getStatus
()
>=
3
&&
performanceStatusData
.
getStatus
()
!=
4
&&
performanceStatusData
.
getStatus
()
!=
7
)
{
//未提审||被拒绝
if
(
performanceStatusData
.
getStatus
()
>=
3
&&
performanceStatusData
.
getStatus
()
!=
4
&&
performanceStatusData
.
getStatus
()
!=
7
&&
performanceStatusData
.
getStatus
()
!=
10
)
{
//未提审||被拒绝
LocalDateTime
updatedAt
=
LocalDateTime
.
now
();
KylinPerformanceStatus
performanceStatus
=
new
KylinPerformanceStatus
();
performanceStatus
.
setStatus
(
7
);
...
...
liquidnet-bus-service/liquidnet-service-kylin/liquidnet-service-kylin-impl/src/main/java/com/liquidnet/service/kylin/utils/DataUtils.java
View file @
96eb77e3
...
...
@@ -309,77 +309,29 @@ public class DataUtils {
allTicketId
.
put
(
timeItem
.
getUseStart
(),
ticketList
);
}
System
.
out
.
println
(
" PERFORMANCE_ID = "
+
performanceId
);
if
(
0
==
isTrueName
)
{
redisKey
=
KylinRedisConst
.
USERID_BUY_INFO
+
userId
;
}
else
{
redisKey
=
KylinRedisConst
.
IDCARD_BUY_INFO
+
idCard
;
}
System
.
out
.
println
(
" REDIS KEY= "
+
redisKey
);
String
performanceIdKey
=
redisKey
+
":"
+
KylinRedisConst
.
PERFORMANCE_ID
+
":"
+
performanceId
;
String
ticketIdKey
=
redisKey
+
":"
+
KylinRedisConst
.
TICKET_ID
+
":"
+
ticketId
;
String
ticketUseTimeKey
=
ticketIdKey
+
":"
+
KylinRedisConst
.
USE_TIME
;
System
.
out
.
println
(
"PERFORMANCEID REDIS KEY = "
+
performanceIdKey
);
System
.
out
.
println
(
"TICKETID REDIS KEY = "
+
ticketIdKey
);
redisUtil
.
set
(
ticketUseTimeKey
,
useTime
);
if
(
buyCount
>
0
)
{
redisUtil
.
incr
(
ticketIdKey
,
buyCount
);
if
(
1
==
ticketType
)
{
int
count
=
0
;
for
(
int
i
=
0
;
i
<
allTicketId
.
get
(
useTime
).
size
();
i
++)
{
String
item
=
allTicketId
.
get
(
useTime
).
get
(
i
);
if
(
allTicketId
.
get
(
useTime
).
size
()
==
1
)
{
redisUtil
.
incr
(
performanceIdKey
,
buyCount
);
break
;
}
if
(
null
==
redisUtil
.
get
(
redisKey
+
":"
+
KylinRedisConst
.
TICKET_ID
+
":"
+
item
))
{
redisUtil
.
set
(
redisKey
+
":"
+
KylinRedisConst
.
TICKET_ID
+
":"
+
item
,
0
);
}
if
(
i
==
0
)
{
count
=
(
int
)
redisUtil
.
get
(
redisKey
+
":"
+
KylinRedisConst
.
TICKET_ID
+
":"
+
item
);
}
else
{
if
(
count
!=
(
int
)
redisUtil
.
get
(
redisKey
+
":"
+
KylinRedisConst
.
TICKET_ID
+
":"
+
item
))
{
redisUtil
.
incr
(
performanceIdKey
,
buyCount
);
break
;
}
}
}
}
else
{
System
.
out
.
println
(
"BUY_COUNT = "
+
buyCount
);
redisUtil
.
incr
(
performanceIdKey
,
buyCount
);
}
}
else
{
redisUtil
.
decr
(
ticketIdKey
,
Math
.
abs
(
buyCount
));
if
(
1
==
ticketType
)
{
int
count
=
0
;
for
(
int
i
=
0
;
i
<
allTicketId
.
get
(
useTime
).
size
();
i
++)
{
String
item
=
allTicketId
.
get
(
useTime
).
get
(
i
);
if
(
allTicketId
.
get
(
useTime
).
size
()
==
1
)
{
redisUtil
.
decr
(
performanceIdKey
,
Math
.
abs
(
buyCount
));
break
;
}
if
(
null
==
redisUtil
.
get
(
redisKey
+
":"
+
KylinRedisConst
.
TICKET_ID
+
":"
+
item
))
{
redisUtil
.
set
(
redisKey
+
":"
+
KylinRedisConst
.
TICKET_ID
+
":"
+
item
,
0
);
}
if
(
i
==
0
)
{
count
=
(
int
)
redisUtil
.
get
(
redisKey
+
":"
+
KylinRedisConst
.
TICKET_ID
+
":"
+
item
);
}
else
{
if
(
count
!=
(
int
)
redisUtil
.
get
(
redisKey
+
":"
+
KylinRedisConst
.
TICKET_ID
+
":"
+
item
))
{
redisUtil
.
decr
(
performanceIdKey
,
Math
.
abs
(
buyCount
));
break
;
}
}
}
}
else
{
redisUtil
.
decr
(
performanceIdKey
,
Math
.
abs
(
buyCount
));
}
redisUtil
.
incr
(
performanceIdKey
,
buyCount
);
}
else
{
redisUtil
.
decr
(
ticketIdKey
,
buyCount
);
redisUtil
.
decr
(
performanceIdKey
,
buyCount
);
}
}
// 获取 用户维度 演出购买数量
public
int
getUserPBuyCount
(
String
userId
,
String
performanceId
)
{
try
{
...
...
@@ -387,6 +339,61 @@ public class DataUtils {
}
catch
(
Exception
e
)
{
return
0
;
}
// if (buyCount > 0) {
// redisUtil.incr(ticketIdKey, buyCount);
// if (1 == ticketType) {
// int count = 0;
// for (int i = 0; i < allTicketId.get(useTime).size(); i++) {
// String item = allTicketId.get(useTime).get(i);
// if (allTicketId.get(useTime).size() == 1) {
// redisUtil.incr(performanceIdKey, buyCount);
// break;
// }
// if (null == redisUtil.get(redisKey + ":" + KylinRedisConst.TICKET_ID + ":" + item)) {
// redisUtil.set(redisKey + ":" + KylinRedisConst.TICKET_ID + ":" + item, 0);
// }
// if (i == 0) {
// count = (int) redisUtil.get(redisKey + ":" + KylinRedisConst.TICKET_ID + ":" + item);
// } else {
// if (count != (int) redisUtil.get(redisKey + ":" + KylinRedisConst.TICKET_ID + ":" + item)) {
// redisUtil.incr(performanceIdKey, buyCount);
// break;
// }
// }
// }
// } else {
// System.out.println("BUY_COUNT = "+buyCount);
// redisUtil.incr(performanceIdKey, buyCount);
// for (int i = 0; i < allTicketId.get(useTime).size(); i++) {
// String item = allTicketId.get(useTime).get(i);
// redisUtil.set(redisKey + ":" + KylinRedisConst.TICKET_ID + ":" + item, 0);
// }
// }
// } else {
// redisUtil.decr(ticketIdKey, Math.abs(buyCount));
// if (1 == ticketType) {
// int count = 0;
// for (int i = 0; i < allTicketId.get(useTime).size(); i++) {
// String item = allTicketId.get(useTime).get(i);
// if (allTicketId.get(useTime).size() == 1) {
// redisUtil.decr(performanceIdKey, Math.abs(buyCount));
// break;
// }
// if (null == redisUtil.get(redisKey + ":" + KylinRedisConst.TICKET_ID + ":" + item)) {
// redisUtil.set(redisKey + ":" + KylinRedisConst.TICKET_ID + ":" + item, 0);
// }
// if (i == 0) {
// count = (int) redisUtil.get(redisKey + ":" + KylinRedisConst.TICKET_ID + ":" + item);
// } else {
// if (count != (int) redisUtil.get(redisKey + ":" + KylinRedisConst.TICKET_ID + ":" + item)) {
// redisUtil.decr(performanceIdKey, Math.abs(buyCount));
// break;
// }
// }
// }
// } else {
// redisUtil.decr(performanceIdKey, Math.abs(buyCount));
// }
}
// 获取 用户维度 票种购买数量
...
...
liquidnet-bus-service/liquidnet-service-kylin/liquidnet-service-kylin-impl/src/main/resources/errors.properties
View file @
96eb77e3
...
...
@@ -19,7 +19,7 @@
20013
=
已超过快递票截止时间
20014
=
快递票未填写收货地址
20015
=
入场人数量错误
20016
=
该票种已售罄
20016
=
库存不足
20017
=
年龄不符合
20018
=
下单失败
...
...
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