记得上下班打卡 | 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
2405452d
Commit
2405452d
authored
Aug 18, 2021
by
胡佳晨
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
temp
parent
b2f7ed15
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
23 additions
and
7 deletions
+23
-7
DataImpl.java
...quidnet/service/platform/service/impl/kylin/DataImpl.java
+23
-7
No files found.
liquidnet-bus-service/liquidnet-service-platform/liquidnet-service-platform-impl/src/main/java/com/liquidnet/service/platform/service/impl/kylin/DataImpl.java
View file @
2405452d
...
@@ -27,6 +27,7 @@ import org.springframework.beans.factory.annotation.Autowired;
...
@@ -27,6 +27,7 @@ import org.springframework.beans.factory.annotation.Autowired;
import
org.springframework.data.mongodb.core.MongoTemplate
;
import
org.springframework.data.mongodb.core.MongoTemplate
;
import
org.springframework.stereotype.Service
;
import
org.springframework.stereotype.Service
;
import
org.springframework.util.DigestUtils
;
import
org.springframework.util.DigestUtils
;
import
redis.clients.jedis.Jedis
;
import
redis.clients.jedis.JedisPool
;
import
redis.clients.jedis.JedisPool
;
import
java.math.BigDecimal
;
import
java.math.BigDecimal
;
...
@@ -952,13 +953,28 @@ public class DataImpl {
...
@@ -952,13 +953,28 @@ public class DataImpl {
}
}
@Autowired
@Autowired
public
boolean
SurplusRedis
(){
public
boolean
SurplusRedis
()
{
List
<
KylinTicketStatus
>
ticketStatus
=
ticketStatusMapper
.
selectList
(
Wrappers
.
lambdaQuery
(
KylinTicketStatus
.
class
));
for
(
KylinTicketStatus
item
:
ticketStatus
){
Jedis
jedis
=
null
;
String
ticketId
=
item
.
getTicketId
();
try
{
dataUtils
.
setSurplusGeneral
(
ticketId
,
(
Integer
)
redisUtil
.
getDB15RedisGet
(
KylinRedisConst
.
PERFORMANCES_INVENTORY
+
ticketId
+
":"
+
KylinRedisConst
.
SURPLUS_GENERAL
));
jedis
=
jedisPool
.
getResource
();
dataUtils
.
setSurplusExchange
(
ticketId
,
(
Integer
)
redisUtil
.
getDB15RedisGet
(
KylinRedisConst
.
PERFORMANCES_INVENTORY
+
ticketId
+
":"
+
KylinRedisConst
.
SURPLUS_EXCHANGE
));
jedis
.
auth
(
"NBs$%6hW"
);
jedis
.
select
(
15
);
List
<
KylinTicketStatus
>
ticketStatus
=
ticketStatusMapper
.
selectList
(
Wrappers
.
lambdaQuery
(
KylinTicketStatus
.
class
));
for
(
KylinTicketStatus
item
:
ticketStatus
)
{
String
ticketId
=
item
.
getTicketId
();
dataUtils
.
setSurplusGeneral
(
ticketId
,
toObjMapper
.
readValue
(
jedis
.
get
(
KylinRedisConst
.
PERFORMANCES_INVENTORY
+
ticketId
+
":"
+
KylinRedisConst
.
SURPLUS_GENERAL
),
Integer
.
class
));
dataUtils
.
setSurplusExchange
(
ticketId
,
toObjMapper
.
readValue
(
jedis
.
get
(
KylinRedisConst
.
PERFORMANCES_INVENTORY
+
ticketId
+
":"
+
KylinRedisConst
.
SURPLUS_EXCHANGE
),
Integer
.
class
));
}
return
true
;
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
return
false
;
}
finally
{
if
(
jedis
!=
null
)
{
jedis
.
close
();
}
}
}
return
true
;
}
}
}
}
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