记得上下班打卡 | 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
68e5f641
Commit
68e5f641
authored
Jun 27, 2021
by
jiangxiulong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
大美的回滚限购
parent
2c526422
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
55 deletions
+5
-55
DataUtils.java
...iquidnet/client/admin/zhengzai/kylin/utils/DataUtils.java
+5
-55
No files found.
liquidnet-bus-client/liquidnet-client-admin/liquidnet-client-admin-zhengzai/src/main/java/com/liquidnet/client/admin/zhengzai/kylin/utils/DataUtils.java
View file @
68e5f641
...
...
@@ -246,73 +246,23 @@ 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
);
}
}
}
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