记得上下班打卡 | 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
2ced113c
Commit
2ced113c
authored
Dec 30, 2021
by
胡佳晨
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
提交
parent
e435dbae
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
22 additions
and
13 deletions
+22
-13
GoblinStorePurchasingServiceImpl.java
...service/impl/manage/GoblinStorePurchasingServiceImpl.java
+4
-2
GoblinRedisUtils.java
...a/com/liquidnet/service/goblin/util/GoblinRedisUtils.java
+18
-11
No files found.
liquidnet-bus-service/liquidnet-service-goblin/liquidnet-service-goblin-impl/src/main/java/com/liquidnet/service/goblin/service/impl/manage/GoblinStorePurchasingServiceImpl.java
View file @
2ced113c
...
...
@@ -166,6 +166,8 @@ public class GoblinStorePurchasingServiceImpl implements IGoblinStorePurchasingS
@Override
public
ResponseDto
<
String
>
purchasingSkuList
(
String
marketId
,
String
storeId
,
int
page
)
{
List
<
String
>
spuIds
=
goblinRedisUtils
.
getStoreMarketIsConfig
(
marketId
,
storeId
);
return
null
;
}
...
...
@@ -224,7 +226,7 @@ public class GoblinStorePurchasingServiceImpl implements IGoblinStorePurchasingS
goblinRedisUtils
.
setGoodsInfoVo
(
spuVo
);
relationVo
.
setSkuList
(
skuList
);
goblinRedisUtils
.
addMarketRelation
(
GoblinStatusConst
.
MarketPreStatus
.
MARKET_PRE_PURCHASE
.
getValue
(),
params
.
getStoreMarketId
(),
relationVo
);
goblinRedisUtils
.
addStoreMarketIsConfig
(
params
.
getStoreMarketId
(),
params
.
getStoreId
(),
params
.
getSpuId
());
goblinRedisUtils
.
addStoreMarketIsConfig
(
params
.
getStoreMarketId
(),
params
.
getStoreId
(),
params
.
getSpuId
()
,
marketSpuId
);
// 执行sql
String
sqlData
=
SqlMapping
.
gets
(
sqls
,
sqlsData
);
queueUtils
.
sendMsgByRedis
(
MQConst
.
GoblinQueue
.
GOBLIN_STORE_MARKET
.
getKey
(),
...
...
@@ -289,7 +291,7 @@ public class GoblinStorePurchasingServiceImpl implements IGoblinStorePurchasingS
//redis
goblinRedisUtils
.
delGoodsInfoVo
(
marketSpuId
);
goblinRedisUtils
.
removeMarketRelation
(
GoblinStatusConst
.
MarketPreStatus
.
MARKET_PRE_PURCHASE
.
getValue
(),
marketId
,
spuId
);
goblinRedisUtils
.
delStoreMarketIsConfig
(
marketId
,
storeId
,
spuId
);
goblinRedisUtils
.
delStoreMarketIsConfig
(
marketId
,
storeId
,
spuId
,
marketSpuId
);
//mysql
queueUtils
.
sendMsgByRedis
(
MQConst
.
GoblinQueue
.
GOBLIN_STORE_MARKET
.
getKey
(),
SqlMapping
.
get
(
"goblin.store.market.delSpuRelation"
,
bean
.
getDelFlag
(),
bean
.
getUpdatedAt
(),
marketId
,
storeId
,
spuId
));
...
...
liquidnet-bus-service/liquidnet-service-goblin/liquidnet-service-goblin-impl/src/main/java/com/liquidnet/service/goblin/util/GoblinRedisUtils.java
View file @
2ced113c
...
...
@@ -112,28 +112,35 @@ public class GoblinRedisUtils {
redisUtil
.
del
(
redisKey
);
}
public
List
<
String
>
getStoreMarketIsConfig
(
String
marketId
,
String
storeId
){
/**
* 获取 配置的商铺id
*
* @param marketId
* @param storeId
*/
public
List
<
String
>
getStoreMarketIsConfig
(
String
marketId
,
String
storeId
)
{
String
redisKey
=
GoblinRedisConst
.
REDIS_GOBLIN_STORE_MARKET_ISCONFIG
.
concat
(
marketId
).
concat
(
":store_id:"
+
storeId
);
Object
obj
=
redisUtil
.
get
(
redisKey
);
if
(
obj
==
null
)
{
if
(
obj
==
null
)
{
return
CollectionUtil
.
arrayListString
();
}
else
{
}
else
{
return
(
List
<
String
>)
obj
;
}
}
public
void
addStoreMarketIsConfig
(
String
marketId
,
String
storeId
,
String
spuId
)
{
public
void
addStoreMarketIsConfig
(
String
marketId
,
String
storeId
,
String
spuId
,
String
marketSpuId
)
{
String
redisKey
=
GoblinRedisConst
.
REDIS_GOBLIN_STORE_MARKET_ISCONFIG
.
concat
(
marketId
).
concat
(
":store_id:"
+
storeId
);
List
<
String
>
voList
=
getStoreMarketIsConfig
(
marketId
,
storeId
);
voList
.
add
(
spuId
);
redisUtil
.
set
(
redisKey
,
voList
);
List
<
String
>
voList
=
getStoreMarketIsConfig
(
marketId
,
storeId
);
voList
.
add
(
spuId
+
","
+
marketSpuId
);
redisUtil
.
set
(
redisKey
,
voList
);
}
public
void
delStoreMarketIsConfig
(
String
marketId
,
String
storeId
,
String
spuId
)
{
public
void
delStoreMarketIsConfig
(
String
marketId
,
String
storeId
,
String
spuId
,
String
marketSpuId
)
{
String
redisKey
=
GoblinRedisConst
.
REDIS_GOBLIN_STORE_MARKET_ISCONFIG
.
concat
(
marketId
).
concat
(
":store_id:"
+
storeId
);
List
<
String
>
voList
=
getStoreMarketIsConfig
(
marketId
,
storeId
);
voList
.
remove
(
spuId
);
redisUtil
.
set
(
redisKey
,
voList
);
List
<
String
>
voList
=
getStoreMarketIsConfig
(
marketId
,
storeId
);
voList
.
remove
(
spuId
+
","
+
marketSpuId
);
redisUtil
.
set
(
redisKey
,
voList
);
}
/**
...
...
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