记得上下班打卡 | 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
65fd947c
Commit
65fd947c
authored
Jun 25, 2021
by
胡佳晨
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
限购逻辑修改
parent
733983cb
Changes
6
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
99 additions
and
59 deletions
+99
-59
PerformanceStep2Param.java
...uidnet/service/kylin/dto/param/PerformanceStep2Param.java
+3
-0
ClientUpdateAnnotation.java
...idnet/commons/lang/annotation/ClientUpdateAnnotation.java
+17
-0
KylinOrderTicketsController.java
...service/kylin/controller/KylinOrderTicketsController.java
+1
-1
KylinOrderTicketsServiceImpl.java
...vice/kylin/service/impl/KylinOrderTicketsServiceImpl.java
+2
-1
KylinPerformancesPartnerServiceImpl.java
...ice/impl/partner/KylinPerformancesPartnerServiceImpl.java
+14
-2
DataUtils.java
...ain/java/com/liquidnet/service/kylin/utils/DataUtils.java
+62
-55
No files found.
liquidnet-bus-api/liquidnet-service-kylin-api/src/main/java/com/liquidnet/service/kylin/dto/param/PerformanceStep2Param.java
View file @
65fd947c
...
@@ -30,6 +30,9 @@ public class PerformanceStep2Param implements Serializable {
...
@@ -30,6 +30,9 @@ public class PerformanceStep2Param implements Serializable {
@ApiModelProperty
(
hidden
=
true
)
@ApiModelProperty
(
hidden
=
true
)
private
Integer
auditStatus
;
private
Integer
auditStatus
;
@ApiModelProperty
(
hidden
=
true
)
private
Integer
status
;
@ApiModelProperty
(
value
=
"场次数据"
,
hidden
=
true
)
@ApiModelProperty
(
value
=
"场次数据"
,
hidden
=
true
)
private
List
<
TicketTimesTicketCreatePartnerVo
>
ticketTimes
;
private
List
<
TicketTimesTicketCreatePartnerVo
>
ticketTimes
;
}
}
liquidnet-bus-common/liquidnet-common-base/src/main/java/com/liquidnet/commons/lang/annotation/ClientUpdateAnnotation.java
0 → 100644
View file @
65fd947c
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-service/liquidnet-service-kylin/liquidnet-service-kylin-impl/src/main/java/com/liquidnet/service/kylin/controller/KylinOrderTicketsController.java
View file @
65fd947c
...
@@ -55,7 +55,7 @@ public class KylinOrderTicketsController {
...
@@ -55,7 +55,7 @@ public class KylinOrderTicketsController {
public
ResponseDto
<
PayResultVo
>
payAgain
(
@RequestBody
@Valid
PayAgainParam
payAgainParam
)
{
public
ResponseDto
<
PayResultVo
>
payAgain
(
@RequestBody
@Valid
PayAgainParam
payAgainParam
)
{
PayResultVo
vo
=
orderTicketsService
.
payAgain
(
payAgainParam
).
getData
();
PayResultVo
vo
=
orderTicketsService
.
payAgain
(
payAgainParam
).
getData
();
if
(
null
==
vo
)
{
if
(
null
==
vo
)
{
return
ResponseDto
.
failure
(
ErrorMapping
.
get
(
"20003"
)
);
return
ResponseDto
.
failure
(
"订单已失效"
);
}
else
{
}
else
{
return
ResponseDto
.
success
(
vo
);
return
ResponseDto
.
success
(
vo
);
}
}
...
...
liquidnet-bus-service/liquidnet-service-kylin/liquidnet-service-kylin-impl/src/main/java/com/liquidnet/service/kylin/service/impl/KylinOrderTicketsServiceImpl.java
View file @
65fd947c
...
@@ -951,6 +951,7 @@ public class KylinOrderTicketsServiceImpl extends ServiceImpl<KylinOrderTicketsM
...
@@ -951,6 +951,7 @@ public class KylinOrderTicketsServiceImpl extends ServiceImpl<KylinOrderTicketsM
@Override
@Override
public
OrderDetailsVo
orderDetails
(
String
orderId
)
{
public
OrderDetailsVo
orderDetails
(
String
orderId
)
{
log
.
error
(
"调用订单详情"
);
OrderDetailsVo
vo
=
new
OrderDetailsVo
();
OrderDetailsVo
vo
=
new
OrderDetailsVo
();
try
{
try
{
String
uid
=
CurrentUtil
.
getCurrentUid
();
String
uid
=
CurrentUtil
.
getCurrentUid
();
...
@@ -1032,7 +1033,7 @@ public class KylinOrderTicketsServiceImpl extends ServiceImpl<KylinOrderTicketsM
...
@@ -1032,7 +1033,7 @@ public class KylinOrderTicketsServiceImpl extends ServiceImpl<KylinOrderTicketsM
vo
.
setOrderTicketVo
(
orderTicketVo
);
vo
.
setOrderTicketVo
(
orderTicketVo
);
vo
.
setEnterDescribe
(
dataUtils
.
getEnterInfo
(
"1"
));
vo
.
setEnterDescribe
(
dataUtils
.
getEnterInfo
(
"1"
));
}
}
log
.
info
(
UserPathDto
.
setData
(
"订单
列表
"
,
orderId
,
vo
));
log
.
info
(
UserPathDto
.
setData
(
"订单
详情
"
,
orderId
,
vo
));
return
vo
;
return
vo
;
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
e
.
printStackTrace
();
...
...
liquidnet-bus-service/liquidnet-service-kylin/liquidnet-service-kylin-impl/src/main/java/com/liquidnet/service/kylin/service/impl/partner/KylinPerformancesPartnerServiceImpl.java
View file @
65fd947c
...
@@ -211,9 +211,13 @@ public class KylinPerformancesPartnerServiceImpl extends ServiceImpl<KylinPerfor
...
@@ -211,9 +211,13 @@ public class KylinPerformancesPartnerServiceImpl extends ServiceImpl<KylinPerfor
PerformancePartnerVo
data
=
mongoTemplate
.
findOne
(
PerformancePartnerVo
data
=
mongoTemplate
.
findOne
(
Query
.
query
(
Criteria
.
where
(
"performancesId"
).
is
(
performancesId
)),
PerformancePartnerVo
.
class
,
PerformancePartnerVo
.
class
.
getSimpleName
()
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
)
{
if
(
data
==
null
)
{
return
ResponseDto
.
failure
(
ErrorMapping
.
get
(
20104
));
return
ResponseDto
.
failure
(
ErrorMapping
.
get
(
20104
));
}
}
if
(
null
!=
performanceStatus
)
{
data
.
setStatus
(
performanceStatus
.
getStatus
());
}
return
ResponseDto
.
success
(
data
);
return
ResponseDto
.
success
(
data
);
}
}
...
@@ -229,7 +233,7 @@ public class KylinPerformancesPartnerServiceImpl extends ServiceImpl<KylinPerfor
...
@@ -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
)
{
// 修改
}
else
if
(
performanceStatus
.
getStatus
()
==
1
||
performanceStatus
.
getStatus
()
==
3
||
performanceStatus
.
getStatus
()
==
6
||
performanceStatus
.
getStatus
()
==
7
||
performanceStatus
.
getStatus
()
==
8
||
performanceStatus
.
getStatus
()
==
9
)
{
// 修改
result
=
updateStep2
(
step2Param
);
result
=
updateStep2
(
step2Param
);
}
else
if
(
performanceStatus
.
getStatus
()
==
10
){
}
else
if
(
performanceStatus
.
getStatus
()
==
10
){
result
=
ResponseDto
.
success
(
"演出已结束不可修改"
);
result
=
ResponseDto
.
failure
(
"演出已结束不可修改"
);
}
}
}
}
return
result
;
return
result
;
...
@@ -406,6 +410,7 @@ public class KylinPerformancesPartnerServiceImpl extends ServiceImpl<KylinPerfor
...
@@ -406,6 +410,7 @@ public class KylinPerformancesPartnerServiceImpl extends ServiceImpl<KylinPerfor
ticketSellTime
.
setTimeEnd
(
DateUtil
.
Formatter
.
yyyyMMddHHmmss
.
parse
(
ticketItem
.
getTimeEnd
()));
ticketSellTime
.
setTimeEnd
(
DateUtil
.
Formatter
.
yyyyMMddHHmmss
.
parse
(
ticketItem
.
getTimeEnd
()));
ticketSellTime
.
setTimeStart
(
DateUtil
.
Formatter
.
yyyyMMddHHmmss
.
parse
(
ticketItem
.
getTimeStart
()));
ticketSellTime
.
setTimeStart
(
DateUtil
.
Formatter
.
yyyyMMddHHmmss
.
parse
(
ticketItem
.
getTimeStart
()));
ticketSellTime
.
setAdvanceMinuteMember
(
null
);
ticketSellTime
.
setAdvanceMinuteMember
(
null
);
ticketSellTime
.
setPayCountdownMinute
(
kylinPerformanceMisVo
.
getPayCountdownMinute
());
//修改 价格
//修改 价格
ticketSellTime
.
setPrice
(
ticketItem
.
getPrice
());
ticketSellTime
.
setPrice
(
ticketItem
.
getPrice
());
ticketSellTime
.
setPriceDiscountMember
(
null
);
ticketSellTime
.
setPriceDiscountMember
(
null
);
...
@@ -454,6 +459,13 @@ public class KylinPerformancesPartnerServiceImpl extends ServiceImpl<KylinPerfor
...
@@ -454,6 +459,13 @@ public class KylinPerformancesPartnerServiceImpl extends ServiceImpl<KylinPerfor
PerformanceStep2Param
performanceStep2Param
=
new
PerformanceStep2Param
();
PerformanceStep2Param
performanceStep2Param
=
new
PerformanceStep2Param
();
BeanUtils
.
copyProperties
(
data
,
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
);
performanceStep2Param
.
setTicketTimes
(
ticketTimesTicketCreatePartnerVoList
);
return
ResponseDto
.
success
(
performanceStep2Param
);
return
ResponseDto
.
success
(
performanceStep2Param
);
}
}
...
@@ -514,7 +526,7 @@ public class KylinPerformancesPartnerServiceImpl extends ServiceImpl<KylinPerfor
...
@@ -514,7 +526,7 @@ public class KylinPerformancesPartnerServiceImpl extends ServiceImpl<KylinPerfor
KylinPerformanceStatus
performanceStatusData
=
performanceStatusMapper
.
selectOne
(
new
UpdateWrapper
<
KylinPerformanceStatus
>().
eq
(
"performance_id"
,
performancesId
));
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
();
LocalDateTime
updatedAt
=
LocalDateTime
.
now
();
KylinPerformanceStatus
performanceStatus
=
new
KylinPerformanceStatus
();
KylinPerformanceStatus
performanceStatus
=
new
KylinPerformanceStatus
();
performanceStatus
.
setStatus
(
7
);
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 @
65fd947c
...
@@ -309,77 +309,29 @@ public class DataUtils {
...
@@ -309,77 +309,29 @@ public class DataUtils {
allTicketId
.
put
(
timeItem
.
getUseStart
(),
ticketList
);
allTicketId
.
put
(
timeItem
.
getUseStart
(),
ticketList
);
}
}
System
.
out
.
println
(
" PERFORMANCE_ID = "
+
performanceId
);
if
(
0
==
isTrueName
)
{
if
(
0
==
isTrueName
)
{
redisKey
=
KylinRedisConst
.
USERID_BUY_INFO
+
userId
;
redisKey
=
KylinRedisConst
.
USERID_BUY_INFO
+
userId
;
}
else
{
}
else
{
redisKey
=
KylinRedisConst
.
IDCARD_BUY_INFO
+
idCard
;
redisKey
=
KylinRedisConst
.
IDCARD_BUY_INFO
+
idCard
;
}
}
System
.
out
.
println
(
" REDIS KEY= "
+
redisKey
);
String
performanceIdKey
=
redisKey
+
":"
+
KylinRedisConst
.
PERFORMANCE_ID
+
":"
+
performanceId
;
String
performanceIdKey
=
redisKey
+
":"
+
KylinRedisConst
.
PERFORMANCE_ID
+
":"
+
performanceId
;
String
ticketIdKey
=
redisKey
+
":"
+
KylinRedisConst
.
TICKET_ID
+
":"
+
ticketId
;
String
ticketIdKey
=
redisKey
+
":"
+
KylinRedisConst
.
TICKET_ID
+
":"
+
ticketId
;
String
ticketUseTimeKey
=
ticketIdKey
+
":"
+
KylinRedisConst
.
USE_TIME
;
String
ticketUseTimeKey
=
ticketIdKey
+
":"
+
KylinRedisConst
.
USE_TIME
;
System
.
out
.
println
(
"PERFORMANCEID REDIS KEY = "
+
performanceIdKey
);
System
.
out
.
println
(
"TICKETID REDIS KEY = "
+
ticketIdKey
);
redisUtil
.
set
(
ticketUseTimeKey
,
useTime
);
redisUtil
.
set
(
ticketUseTimeKey
,
useTime
);
if
(
buyCount
>
0
)
{
if
(
buyCount
>
0
)
{
redisUtil
.
incr
(
ticketIdKey
,
buyCount
);
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
);
redisUtil
.
incr
(
performanceIdKey
,
buyCount
);
}
}
else
{
}
else
{
redisUtil
.
decr
(
ticketIdKey
,
buyCount
);
redisUtil
.
decr
(
ticketIdKey
,
Math
.
abs
(
buyCount
));
redisUtil
.
decr
(
performanceIdKey
,
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
));
}
}
}
}
}
// 获取 用户维度 演出购买数量
// 获取 用户维度 演出购买数量
public
int
getUserPBuyCount
(
String
userId
,
String
performanceId
)
{
public
int
getUserPBuyCount
(
String
userId
,
String
performanceId
)
{
try
{
try
{
...
@@ -387,6 +339,61 @@ public class DataUtils {
...
@@ -387,6 +339,61 @@ public class DataUtils {
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
return
0
;
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));
// }
}
}
// 获取 用户维度 票种购买数量
// 获取 用户维度 票种购买数量
...
...
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