记得上下班打卡 | 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
dd90674c
Commit
dd90674c
authored
May 12, 2022
by
胡佳晨
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改 黑白名单方法
修改 消费 逻辑
parent
c26e6c10
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
12 additions
and
12 deletions
+12
-12
AbstractXlsRedisReceiver.java
...ice/consumer/kylin/receiver/AbstractXlsRedisReceiver.java
+8
-8
GoblinRedisUtils.java
...a/com/liquidnet/service/goblin/util/GoblinRedisUtils.java
+2
-2
GoblinRedisUtils.java
...a/com/liquidnet/service/order/utils/GoblinRedisUtils.java
+2
-2
No files found.
liquidnet-bus-service/liquidnet-service-consumer-all/liquidnet-service-consumer-kylin/src/main/java/com/liquidnet/service/consumer/kylin/receiver/AbstractXlsRedisReceiver.java
View file @
dd90674c
...
@@ -94,30 +94,30 @@ public abstract class AbstractXlsRedisReceiver implements StreamListener<String,
...
@@ -94,30 +94,30 @@ public abstract class AbstractXlsRedisReceiver implements StreamListener<String,
objs
.
add
(
new
Object
[]{
skuId
,
xlsPath
,
type
,
1
,
LocalDateTime
.
now
()});
objs
.
add
(
new
Object
[]{
skuId
,
xlsPath
,
type
,
1
,
LocalDateTime
.
now
()});
aBoolean
=
baseDao
.
batchSql
(
SQL_INSERT_GOODS_BUY_ROSTER_LOG
,
objs
);
aBoolean
=
baseDao
.
batchSql
(
SQL_INSERT_GOODS_BUY_ROSTER_LOG
,
objs
);
}
else
if
(
finalType
.
equals
(
3
)
||
finalType
.
equals
(
4
))
{
}
else
if
(
finalType
.
equals
(
3
)
||
finalType
.
equals
(
4
))
{
if
(
xlsPath
!=
null
&&
!
xlsPath
.
equals
(
""
))
{
//添加
if
(
oXlsPath
!=
null
&&
!
oXlsPath
.
equals
(
""
))
{
//删除旧的黑白名单
EasyExcel
.
read
(
new
URL
(
x
lsPath
).
openStream
(),
new
PageReadListener
<
HashMap
<
String
,
String
>>(
dataList
->
{
EasyExcel
.
read
(
new
URL
(
oX
lsPath
).
openStream
(),
new
PageReadListener
<
HashMap
<
String
,
String
>>(
dataList
->
{
for
(
HashMap
<
String
,
String
>
data
:
dataList
)
{
for
(
HashMap
<
String
,
String
>
data
:
dataList
)
{
if
(
data
.
get
(
0
)
==
null
)
{
if
(
data
.
get
(
0
)
==
null
)
{
continue
;
continue
;
}
}
if
(
finalType
.
equals
(
3
))
{
if
(
finalType
.
equals
(
3
))
{
redisUtil
.
set
(
GoblinRedisConst
.
REDIS_WHITE
.
concat
(
listId
+
":"
).
concat
(
finalSkuId
+
":"
).
concat
(
data
.
get
(
0
)),
1
);
redisUtil
.
del
(
GoblinRedisConst
.
REDIS_WHITE
.
concat
(
listId
+
":"
).
concat
(
finalSkuId
+
":"
).
concat
(
data
.
get
(
0
))
);
}
else
{
}
else
{
redisUtil
.
set
(
GoblinRedisConst
.
REDIS_BLACK
.
concat
(
listId
+
":"
).
concat
(
finalSkuId
+
":"
).
concat
(
data
.
get
(
0
)),
1
);
redisUtil
.
del
(
GoblinRedisConst
.
REDIS_BLACK
.
concat
(
listId
+
":"
).
concat
(
finalSkuId
+
":"
).
concat
(
data
.
get
(
0
))
);
}
}
}
}
})).
sheet
().
doRead
();
})).
sheet
().
doRead
();
}
}
if
(
oXlsPath
!=
null
&&
!
oXlsPath
.
equals
(
""
))
{
//删除旧的黑白名单
if
(
xlsPath
!=
null
&&
!
xlsPath
.
equals
(
""
))
{
//添加
EasyExcel
.
read
(
new
URL
(
oX
lsPath
).
openStream
(),
new
PageReadListener
<
HashMap
<
String
,
String
>>(
dataList
->
{
EasyExcel
.
read
(
new
URL
(
x
lsPath
).
openStream
(),
new
PageReadListener
<
HashMap
<
String
,
String
>>(
dataList
->
{
for
(
HashMap
<
String
,
String
>
data
:
dataList
)
{
for
(
HashMap
<
String
,
String
>
data
:
dataList
)
{
if
(
data
.
get
(
0
)
==
null
)
{
if
(
data
.
get
(
0
)
==
null
)
{
continue
;
continue
;
}
}
if
(
finalType
.
equals
(
3
))
{
if
(
finalType
.
equals
(
3
))
{
redisUtil
.
del
(
GoblinRedisConst
.
REDIS_WHITE
.
concat
(
listId
+
":"
).
concat
(
finalSkuId
+
":"
).
concat
(
data
.
get
(
0
))
);
redisUtil
.
set
(
GoblinRedisConst
.
REDIS_WHITE
.
concat
(
listId
+
":"
).
concat
(
finalSkuId
+
":"
).
concat
(
data
.
get
(
0
)),
1
);
}
else
{
}
else
{
redisUtil
.
del
(
GoblinRedisConst
.
REDIS_BLACK
.
concat
(
listId
+
":"
).
concat
(
finalSkuId
+
":"
).
concat
(
data
.
get
(
0
))
);
redisUtil
.
set
(
GoblinRedisConst
.
REDIS_BLACK
.
concat
(
listId
+
":"
).
concat
(
finalSkuId
+
":"
).
concat
(
data
.
get
(
0
)),
1
);
}
}
}
}
})).
sheet
().
doRead
();
})).
sheet
().
doRead
();
...
...
liquidnet-bus-service/liquidnet-service-goblin/liquidnet-service-goblin-impl/src/main/java/com/liquidnet/service/goblin/util/GoblinRedisUtils.java
View file @
dd90674c
...
@@ -967,8 +967,8 @@ public class GoblinRedisUtils {
...
@@ -967,8 +967,8 @@ public class GoblinRedisUtils {
* @return
* @return
*/
*/
public
Boolean
getListCanBuy
(
String
listId
,
String
skuId
,
String
mobile
,
String
uid
,
Integer
whiteType
)
{
public
Boolean
getListCanBuy
(
String
listId
,
String
skuId
,
String
mobile
,
String
uid
,
Integer
whiteType
)
{
String
rdkB
=
GoblinRedisConst
.
REDIS_BLACK
.
concat
(
listId
+
":"
).
concat
(
skuId
+
""
).
concat
(
mobile
);
String
rdkB
=
GoblinRedisConst
.
REDIS_BLACK
.
concat
(
listId
+
":"
).
concat
(
skuId
+
"
:
"
).
concat
(
mobile
);
String
rdkW
=
GoblinRedisConst
.
REDIS_WHITE
.
concat
(
listId
+
":"
).
concat
(
skuId
+
""
).
concat
(
mobile
);
String
rdkW
=
GoblinRedisConst
.
REDIS_WHITE
.
concat
(
listId
+
":"
).
concat
(
skuId
+
"
:
"
).
concat
(
mobile
);
boolean
bResult
=
redisUtil
.
hasKey
(
rdkB
);
//是否黑名单
boolean
bResult
=
redisUtil
.
hasKey
(
rdkB
);
//是否黑名单
boolean
wResult
=
redisUtil
.
hasKey
(
rdkW
);
//是否白名单
boolean
wResult
=
redisUtil
.
hasKey
(
rdkW
);
//是否白名单
Integer
memberStage
=
getMember
(
uid
);
Integer
memberStage
=
getMember
(
uid
);
...
...
liquidnet-bus-service/liquidnet-service-order/liquidnet-service-order-impl/src/main/java/com/liquidnet/service/order/utils/GoblinRedisUtils.java
View file @
dd90674c
...
@@ -352,8 +352,8 @@ public class GoblinRedisUtils {
...
@@ -352,8 +352,8 @@ public class GoblinRedisUtils {
* @return
* @return
*/
*/
public
Boolean
getListCanBuy
(
String
listId
,
String
skuId
,
String
mobile
,
String
uid
,
Integer
whiteType
)
{
public
Boolean
getListCanBuy
(
String
listId
,
String
skuId
,
String
mobile
,
String
uid
,
Integer
whiteType
)
{
String
rdkB
=
GoblinRedisConst
.
REDIS_BLACK
.
concat
(
listId
+
":"
).
concat
(
skuId
+
""
).
concat
(
mobile
);
String
rdkB
=
GoblinRedisConst
.
REDIS_BLACK
.
concat
(
listId
+
":"
).
concat
(
skuId
+
"
:
"
).
concat
(
mobile
);
String
rdkW
=
GoblinRedisConst
.
REDIS_WHITE
.
concat
(
listId
+
":"
).
concat
(
skuId
+
""
).
concat
(
mobile
);
String
rdkW
=
GoblinRedisConst
.
REDIS_WHITE
.
concat
(
listId
+
":"
).
concat
(
skuId
+
"
:
"
).
concat
(
mobile
);
boolean
bResult
=
redisUtil
.
hasKey
(
rdkB
);
//是否黑名单
boolean
bResult
=
redisUtil
.
hasKey
(
rdkB
);
//是否黑名单
boolean
wResult
=
redisUtil
.
hasKey
(
rdkW
);
//是否白名单
boolean
wResult
=
redisUtil
.
hasKey
(
rdkW
);
//是否白名单
Integer
memberStage
=
getMember
(
uid
);
Integer
memberStage
=
getMember
(
uid
);
...
...
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