记得上下班打卡 | 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
903a4eb9
Commit
903a4eb9
authored
Feb 15, 2022
by
张国柄
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
opt;
parent
67c8d4ec
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
23 additions
and
23 deletions
+23
-23
GoblinStoreMgtGoodsController.java
...blin/controller/manage/GoblinStoreMgtGoodsController.java
+12
-11
GoblinRedisUtils.java
...a/com/liquidnet/service/goblin/util/GoblinRedisUtils.java
+11
-12
No files found.
liquidnet-bus-service/liquidnet-service-goblin/liquidnet-service-goblin-impl/src/main/java/com/liquidnet/service/goblin/controller/manage/GoblinStoreMgtGoodsController.java
View file @
903a4eb9
...
...
@@ -352,20 +352,21 @@ public class GoblinStoreMgtGoodsController {
beUpdateSpuSpecFlg
=
true
;
specValues
.
add
(
GoblinGoodsSpecValueVo
.
getNew
().
setSpecVname
(
newSpecVname
).
setSpecVsort
(
specValues
.
size
()
+
2
));
}
boolean
toDelOldSpecVnameFlg
=
true
;
// 其他SKU中只要存在该规格值,即不可删除该规格值
Set
<
Map
.
Entry
<
String
,
List
<
GoblinGoodsSpecDto
>>>
entries
=
otherSkuSpecListMap
.
entrySet
();
for
(
Map
.
Entry
<
String
,
List
<
GoblinGoodsSpecDto
>>
ent
:
entries
)
{
for
(
GoblinGoodsSpecDto
specDto
:
ent
.
getValue
())
{
if
(
specDto
.
getSpecName
().
equals
(
specName
)
&&
specDto
.
getSpecVname
().
equals
(
oldSpecVname
))
{
toDelOldSpecVnameFlg
=
false
;
}
boolean
toDelOldSpecVnameFlg
=
true
;
// 其他SKU中只要存在该规格值,即不可删除该规格值
Set
<
Map
.
Entry
<
String
,
List
<
GoblinGoodsSpecDto
>>>
entries
=
otherSkuSpecListMap
.
entrySet
();
for
(
Map
.
Entry
<
String
,
List
<
GoblinGoodsSpecDto
>>
ent
:
entries
)
{
for
(
GoblinGoodsSpecDto
specDto
:
ent
.
getValue
())
{
if
(
specDto
.
getSpecName
().
equals
(
specName
)
&&
specDto
.
getSpecVname
().
equals
(
oldSpecVname
))
{
toDelOldSpecVnameFlg
=
false
;
}
}
if
(
toDelOldSpecVnameFlg
)
{
specValues
.
removeIf
(
rmr
->
rmr
.
getSpecVname
().
equals
(
oldSpecVname
));
delSpuSpecMap
.
put
(
specName
,
oldSpecVname
);
}
}
if
(
toDelOldSpecVnameFlg
)
{
specValues
.
removeIf
(
rmr
->
rmr
.
getSpecVname
().
equals
(
oldSpecVname
));
delSpuSpecMap
.
put
(
specName
,
oldSpecVname
);
beUpdateSpuSpecFlg
=
true
;
}
}
}
...
...
liquidnet-bus-service/liquidnet-service-goblin/liquidnet-service-goblin-impl/src/main/java/com/liquidnet/service/goblin/util/GoblinRedisUtils.java
View file @
903a4eb9
...
...
@@ -77,7 +77,7 @@ public class GoblinRedisUtils {
List
<
GoblinSelfTagVo
>
vos
;
if
(
valStrIsEmptyFlg
)
{
if
(!
CollectionUtils
.
isEmpty
(
vos
=
goblinMongoUtils
.
getSelfTagVos
(
"0"
)))
{
// redisUtil.set(GoblinRedisConst.BASIC_SELF_GOODS_TAG, JsonUtils.toJson(vos));// TODO: 2022/1/17 zhanggb==
redisUtil
.
set
(
GoblinRedisConst
.
BASIC_SELF_GOODS_TAG
,
JsonUtils
.
toJson
(
vos
));
}
}
else
{
vos
=
JsonUtils
.
fromJson
(
valStr
,
new
TypeReference
<
List
<
GoblinSelfTagVo
>>()
{
...
...
@@ -92,7 +92,7 @@ public class GoblinRedisUtils {
List
<
GoblinSelfTagVo
>
vos
;
if
(
valStrIsEmptyFlg
)
{
if
(!
CollectionUtils
.
isEmpty
(
vos
=
goblinMongoUtils
.
getSelfTagVos
(
"1"
)))
{
// redisUtil.set(GoblinRedisConst.BASIC_SELF_GOODS_TAG, JsonUtils.toJson(vos));// TODO: 2022/1/17 zhanggb==
redisUtil
.
set
(
GoblinRedisConst
.
BASIC_SELF_GOODS_TAG
,
JsonUtils
.
toJson
(
vos
));
}
}
else
{
vos
=
JsonUtils
.
fromJson
(
valStr
,
new
TypeReference
<
List
<
GoblinSelfTagVo
>>()
{
...
...
@@ -109,7 +109,7 @@ public class GoblinRedisUtils {
List
<
GoblinSelfGoodsCategoryVo
>
vos
;
if
(
valStrIsEmptyFlg
)
{
if
(!
CollectionUtils
.
isEmpty
(
vos
=
goblinMongoUtils
.
getSelfGoodsCategoryVos
()))
{
// redisUtil.set(GoblinRedisConst.BASIC_SELF_GOODS_CATEGORY, JsonUtils.toJson(vos));// TODO: 2022/1/17 zhanggb==
redisUtil
.
set
(
GoblinRedisConst
.
BASIC_SELF_GOODS_CATEGORY
,
JsonUtils
.
toJson
(
vos
));
}
}
else
{
vos
=
JsonUtils
.
fromJson
(
valStr
,
new
TypeReference
<
List
<
GoblinSelfGoodsCategoryVo
>>()
{
...
...
@@ -131,7 +131,7 @@ public class GoblinRedisUtils {
List
<
GoblinStoreGoodsCategoryVo
>
vos
=
null
;
if
(
valStrIsEmptyFlg
&&
!
CollectionUtils
.
isEmpty
(
vos
=
goblinMongoUtils
.
getStoreGoodsCategoryVos
(
storeId
)))
{
valStr
=
JsonUtils
.
toJson
(
vos
);
// redisUtil.set(rk, valStr);// TODO: 2022/1/11 zhanggb==
redisUtil
.
set
(
rk
,
valStr
);
}
else
if
(!
valStrIsEmptyFlg
)
{
vos
=
JsonUtils
.
fromJson
(
valStr
,
new
TypeReference
<
List
<
GoblinStoreGoodsCategoryVo
>>()
{
});
...
...
@@ -149,7 +149,7 @@ public class GoblinRedisUtils {
String
rk
=
GoblinRedisConst
.
BASIC_SELF_GOODS_CATEGORY_SPEC
.
concat
(
cateId
);
GoblinMgtCategorySpecVo
vo
=
(
GoblinMgtCategorySpecVo
)
redisUtil
.
get
(
rk
);
if
(
null
==
vo
&&
null
!=
(
vo
=
goblinMongoUtils
.
getCategorySpecVo
(
cateId
)))
{
// redisUtil.set(rk, vo);// TODO: 2022/1/18 zhanggb==
redisUtil
.
set
(
rk
,
vo
);
}
return
vo
;
}
...
...
@@ -162,7 +162,7 @@ public class GoblinRedisUtils {
List
<
GoblinServiceSupportVo
>
vos
;
if
(
valStrIsEmptyFlg
)
{
if
(!
CollectionUtils
.
isEmpty
(
vos
=
goblinMongoUtils
.
getMgtServiceSupportVos
()))
{
// redisUtil.set(GoblinRedisConst.BASIC_SERVICE_SUPPORT, JsonUtils.toJson(vos));// TODO: 2022/1/17 zhanggb==
redisUtil
.
set
(
GoblinRedisConst
.
BASIC_SERVICE_SUPPORT
,
JsonUtils
.
toJson
(
vos
));
}
}
else
{
vos
=
JsonUtils
.
fromJson
(
valStr
,
new
TypeReference
<
List
<
GoblinServiceSupportVo
>>()
{
...
...
@@ -209,7 +209,7 @@ public class GoblinRedisUtils {
String
rk
=
GoblinRedisConst
.
BASIC_STORE_CONF
.
concat
(
storeId
);
List
<
GoblinStoreConfigVo
>
vos
=
(
List
<
GoblinStoreConfigVo
>)
redisUtil
.
get
(
rk
);
if
(
CollectionUtils
.
isEmpty
(
vos
)
&&
!
CollectionUtils
.
isEmpty
(
vos
=
goblinMongoUtils
.
getStoreConfigVos
(
storeId
)))
{
// redisUtil.set(rk, vos);// TODO: 2022/1/12 zhanggb==
redisUtil
.
set
(
rk
,
vos
);
}
return
vos
;
}
...
...
@@ -230,8 +230,7 @@ public class GoblinRedisUtils {
public
boolean
addStoreId
(
String
uid
,
String
storeId
)
{
List
<
String
>
storeIds
=
this
.
getStoreIds
(
uid
);
// if (CollectionUtils.isEmpty(storeIds)) {
if
(
CollectionUtils
.
isEmpty
(
storeIds
)
||
storeIds
.
contains
(
"1"
))
{
// TODO: 2022/1/6 zhanggb del
if
(
CollectionUtils
.
isEmpty
(
storeIds
))
{
storeIds
=
CollectionUtil
.
arrayListString
();
}
storeIds
.
add
(
storeId
);
...
...
@@ -279,7 +278,7 @@ public class GoblinRedisUtils {
String
rk
=
GoblinRedisConst
.
BASIC_STORE
.
concat
(
storeId
);
GoblinStoreInfoVo
vo
=
(
GoblinStoreInfoVo
)
redisUtil
.
get
(
rk
);
if
(
null
==
vo
&&
null
!=
(
vo
=
goblinMongoUtils
.
getStoreInfoVo
(
storeId
)))
{
// redisUtil.set(rk, vo);// TODO: 2022/1/4 zhanggb==
redisUtil
.
set
(
rk
,
vo
);
}
return
vo
;
}
...
...
@@ -348,7 +347,7 @@ public class GoblinRedisUtils {
String
rk
=
GoblinRedisConst
.
BASIC_GOODS
.
concat
(
spuId
);
GoblinGoodsInfoVo
vo
=
(
GoblinGoodsInfoVo
)
redisUtil
.
get
(
rk
);
if
(
null
==
vo
&&
null
!=
(
vo
=
goblinMongoUtils
.
getMgtGoodsInfoVo
(
spuId
)))
{
// redisUtil.set(rk, vo);// TODO: 2022/1/4 zhanggb==
redisUtil
.
set
(
rk
,
vo
);
}
return
vo
;
}
...
...
@@ -399,7 +398,7 @@ public class GoblinRedisUtils {
String
rk
=
GoblinRedisConst
.
BASIC_GOODS_SKU
.
concat
(
skuId
);
GoblinGoodsSkuInfoVo
vo
=
(
GoblinGoodsSkuInfoVo
)
redisUtil
.
get
(
rk
);
if
(
null
==
vo
&&
null
!=
(
vo
=
goblinMongoUtils
.
getMgtGoodsSkuInfoVo
(
skuId
)))
{
// redisUtil.set(rk, vo);// TODO: 2022/1/4 zhanggb==
redisUtil
.
set
(
rk
,
vo
);
}
return
vo
;
}
...
...
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