记得上下班打卡 | 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
52c28c34
Commit
52c28c34
authored
Feb 24, 2022
by
张国柄
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
~API:商品管理:添加、编辑商品+AR标签点选;
parent
99cf0bc4
Changes
12
Show whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
159 additions
and
60 deletions
+159
-60
GoblinRedisConst.java
...m/liquidnet/service/goblin/constant/GoblinRedisConst.java
+4
-4
GoblinStoreMgtGoodsAddParam.java
...ervice/goblin/dto/manage/GoblinStoreMgtGoodsAddParam.java
+8
-1
GoblinGoodsExtagVo.java
...m/liquidnet/service/goblin/dto/vo/GoblinGoodsExtagVo.java
+2
-2
GoblinGoodsInfoVo.java
...om/liquidnet/service/goblin/dto/vo/GoblinGoodsInfoVo.java
+3
-1
GoblinSelfTagVo.java
.../com/liquidnet/service/goblin/dto/vo/GoblinSelfTagVo.java
+1
-1
GoblinSelfExtagAdminController.java
...oller/zhengzai/goblin/GoblinSelfExtagAdminController.java
+2
-2
GoblinSelfTagServiceImpl.java
...hengzai/goblin/service/impl/GoblinSelfTagServiceImpl.java
+4
-1
db_ln_goblin_initialdata.sql
...net-service-goblin-impl/docu/db_ln_goblin_initialdata.sql
+1
-1
GoblinStoreMgtGoodsController.java
...blin/controller/manage/GoblinStoreMgtGoodsController.java
+39
-21
GoblinStoreMgtGoodsServiceImpl.java
...n/service/impl/manage/GoblinStoreMgtGoodsServiceImpl.java
+72
-20
GoblinMongoUtils.java
...a/com/liquidnet/service/goblin/util/GoblinMongoUtils.java
+2
-1
GoblinRedisUtils.java
...a/com/liquidnet/service/goblin/util/GoblinRedisUtils.java
+21
-5
No files found.
liquidnet-bus-api/liquidnet-service-goblin-api/src/main/java/com/liquidnet/service/goblin/constant/GoblinRedisConst.java
View file @
52c28c34
...
@@ -10,14 +10,14 @@ public class GoblinRedisConst {
...
@@ -10,14 +10,14 @@ public class GoblinRedisConst {
public
static
final
String
BASIC_USTORE
=
PREFIX
.
concat
(
"bsc:ustore:"
);
public
static
final
String
BASIC_USTORE
=
PREFIX
.
concat
(
"bsc:ustore:"
);
/**
/**
* 平台商品标签信息
* 平台商品标签信息
* {goblin:bsc:self_
g_t
, JsonUtils.toJson(List<com.liquidnet.service.goblin.dto.vo.GoblinSelfTagVo>)}
* {goblin:bsc:self_
tag
, JsonUtils.toJson(List<com.liquidnet.service.goblin.dto.vo.GoblinSelfTagVo>)}
*/
*/
public
static
final
String
BASIC_SELF_
GOODS_TAG
=
PREFIX
.
concat
(
"bsc:self_g_t
"
);
public
static
final
String
BASIC_SELF_
TAG
=
PREFIX
.
concat
(
"bsc:self_tag
"
);
/**
/**
* 平台专属标签信息
* 平台专属标签信息
* {goblin:bsc:self_e
_t
, JsonUtils.toJson(List<com.liquidnet.service.goblin.dto.vo.GoblinSelfTagVo>)}
* {goblin:bsc:self_e
tag
, JsonUtils.toJson(List<com.liquidnet.service.goblin.dto.vo.GoblinSelfTagVo>)}
*/
*/
public
static
final
String
BASIC_SELF_EXTAG
=
PREFIX
.
concat
(
"bsc:self_e
_t
"
);
public
static
final
String
BASIC_SELF_EXTAG
=
PREFIX
.
concat
(
"bsc:self_e
tag
"
);
/**
/**
* 平台商品分类信息
* 平台商品分类信息
* {goblin:bsc:self_g_c, JsonUtils.toJson(List<com.liquidnet.service.goblin.dto.vo.GoblinSelfGoodsCategoryVo>)}
* {goblin:bsc:self_g_c, JsonUtils.toJson(List<com.liquidnet.service.goblin.dto.vo.GoblinSelfGoodsCategoryVo>)}
...
...
liquidnet-bus-api/liquidnet-service-goblin-api/src/main/java/com/liquidnet/service/goblin/dto/manage/GoblinStoreMgtGoodsAddParam.java
View file @
52c28c34
...
@@ -122,9 +122,16 @@ public class GoblinStoreMgtGoodsAddParam implements Serializable {
...
@@ -122,9 +122,16 @@ public class GoblinStoreMgtGoodsAddParam implements Serializable {
* ---------------------------- 专属标签 ----------------------------
* ---------------------------- 专属标签 ----------------------------
**/
**/
@ApiModelProperty
(
position
=
33
,
required
=
true
,
value
=
"商品关联音乐人、艺术家、
IP
列表"
)
@ApiModelProperty
(
position
=
33
,
required
=
true
,
value
=
"商品关联音乐人、艺术家、
品牌方、厂牌
列表"
)
private
List
<
String
>
extagList
;
private
List
<
String
>
extagList
;
/**
* ---------------------------- AR标签 ----------------------------
**/
@ApiModelProperty
(
position
=
33
,
required
=
true
,
value
=
"商品关联音乐人、艺术家、品牌方、厂牌、AR列表"
)
private
List
<
String
>
artagList
;
/**
/**
* 生成SPU
* 生成SPU
...
...
liquidnet-bus-api/liquidnet-service-goblin-api/src/main/java/com/liquidnet/service/goblin/dto/vo/GoblinGoodsExtagVo.java
View file @
52c28c34
...
@@ -7,7 +7,7 @@ import lombok.Data;
...
@@ -7,7 +7,7 @@ import lombok.Data;
import
java.io.Serializable
;
import
java.io.Serializable
;
@ApiModel
(
value
=
"GoblinGoodsExtagVo"
,
description
=
"商品关联
音乐人、艺人、IP
信息"
)
@ApiModel
(
value
=
"GoblinGoodsExtagVo"
,
description
=
"商品关联
标签(音乐人、艺人、品牌方、厂牌、AR)
信息"
)
@Data
@Data
@JsonIgnoreProperties
(
ignoreUnknown
=
true
)
@JsonIgnoreProperties
(
ignoreUnknown
=
true
)
public
class
GoblinGoodsExtagVo
implements
Serializable
,
Cloneable
{
public
class
GoblinGoodsExtagVo
implements
Serializable
,
Cloneable
{
...
@@ -20,7 +20,7 @@ public class GoblinGoodsExtagVo implements Serializable, Cloneable {
...
@@ -20,7 +20,7 @@ public class GoblinGoodsExtagVo implements Serializable, Cloneable {
private
String
tagDesc
;
private
String
tagDesc
;
@ApiModelProperty
(
position
=
13
,
value
=
"标签图片"
)
@ApiModelProperty
(
position
=
13
,
value
=
"标签图片"
)
private
String
tagPic
;
private
String
tagPic
;
@ApiModelProperty
(
position
=
14
,
value
=
"标签类型[1-音乐人|2-艺术家|3-品牌方|4-厂牌]"
)
@ApiModelProperty
(
position
=
14
,
value
=
"标签类型[1-音乐人|2-艺术家|3-品牌方|4-厂牌
|5-AR
]"
)
private
String
tagType
;
private
String
tagType
;
@ApiModelProperty
(
position
=
15
,
value
=
"排序[数值越小,排序越前]"
)
@ApiModelProperty
(
position
=
15
,
value
=
"排序[数值越小,排序越前]"
)
private
Integer
sort
;
private
Integer
sort
;
...
...
liquidnet-bus-api/liquidnet-service-goblin-api/src/main/java/com/liquidnet/service/goblin/dto/vo/GoblinGoodsInfoVo.java
View file @
52c28c34
...
@@ -105,8 +105,10 @@ public class GoblinGoodsInfoVo implements Serializable, Cloneable {
...
@@ -105,8 +105,10 @@ public class GoblinGoodsInfoVo implements Serializable, Cloneable {
private
List
<
GoblinServiceSupportVo
>
serviceSupportVoList
;
private
List
<
GoblinServiceSupportVo
>
serviceSupportVoList
;
@ApiModelProperty
(
position
=
54
,
value
=
"音乐人、艺术家、IP列表"
)
@ApiModelProperty
(
position
=
54
,
value
=
"音乐人、艺术家、IP列表"
)
private
List
<
GoblinGoodsExtagVo
>
extagVoList
;
private
List
<
GoblinGoodsExtagVo
>
extagVoList
;
@ApiModelProperty
(
position
=
55
,
value
=
"AR标签"
)
private
List
<
GoblinGoodsExtagVo
>
artagVoList
;
@ApiModelProperty
(
position
=
5
5
,
value
=
"SPU包含的SKU_ID列表"
)
@ApiModelProperty
(
position
=
5
6
,
value
=
"SPU包含的SKU_ID列表"
)
private
List
<
String
>
skuIdList
;
private
List
<
String
>
skuIdList
;
/* ------------------------------------------------------------ */
/* ------------------------------------------------------------ */
...
...
liquidnet-bus-api/liquidnet-service-goblin-api/src/main/java/com/liquidnet/service/goblin/dto/vo/GoblinSelfTagVo.java
View file @
52c28c34
...
@@ -21,7 +21,7 @@ public class GoblinSelfTagVo implements Serializable, Cloneable {
...
@@ -21,7 +21,7 @@ public class GoblinSelfTagVo implements Serializable, Cloneable {
private
String
tagDesc
;
private
String
tagDesc
;
@ApiModelProperty
(
position
=
13
,
value
=
"标签图片"
)
@ApiModelProperty
(
position
=
13
,
value
=
"标签图片"
)
private
String
tagPic
;
private
String
tagPic
;
@ApiModelProperty
(
position
=
14
,
value
=
"标签类型[
1-音乐人|2-艺术家|3-品牌方|4-厂牌
]"
)
@ApiModelProperty
(
position
=
14
,
value
=
"标签类型[
0-商品标签|1-音乐人|2-艺术家|3-品牌方|4-厂牌|5-AR
]"
)
private
String
tagType
;
private
String
tagType
;
@ApiModelProperty
(
position
=
15
,
value
=
"标签所属[0-普通标签|1-专属标签]"
)
@ApiModelProperty
(
position
=
15
,
value
=
"标签所属[0-普通标签|1-专属标签]"
)
private
String
tagBelong
;
private
String
tagBelong
;
...
...
liquidnet-bus-client/liquidnet-client-admin/liquidnet-client-admin-web/src/main/java/com/liquidnet/client/admin/web/controller/zhengzai/goblin/GoblinSelfExtagAdminController.java
View file @
52c28c34
...
@@ -86,7 +86,7 @@ public class GoblinSelfExtagAdminController extends BaseController {
...
@@ -86,7 +86,7 @@ public class GoblinSelfExtagAdminController extends BaseController {
@ApiImplicitParams
({
@ApiImplicitParams
({
@ApiImplicitParam
(
type
=
"form"
,
required
=
true
,
dataType
=
"String"
,
name
=
"tagName"
,
value
=
"标签名称[50]"
),
@ApiImplicitParam
(
type
=
"form"
,
required
=
true
,
dataType
=
"String"
,
name
=
"tagName"
,
value
=
"标签名称[50]"
),
@ApiImplicitParam
(
type
=
"form"
,
required
=
true
,
dataType
=
"String"
,
name
=
"tagPic"
,
value
=
"标签图片[256]"
),
@ApiImplicitParam
(
type
=
"form"
,
required
=
true
,
dataType
=
"String"
,
name
=
"tagPic"
,
value
=
"标签图片[256]"
),
@ApiImplicitParam
(
type
=
"form"
,
required
=
true
,
dataType
=
"String"
,
name
=
"tagType"
,
value
=
"标签类型[1-音乐人|2-艺术家|3-品牌方|4-厂牌
]"
,
allowableValues
=
"1,2,3,4
"
),
@ApiImplicitParam
(
type
=
"form"
,
required
=
true
,
dataType
=
"String"
,
name
=
"tagType"
,
value
=
"标签类型[1-音乐人|2-艺术家|3-品牌方|4-厂牌
|5-AR]"
,
allowableValues
=
"1,2,3,4,5
"
),
})
})
@Log
(
title
=
"店铺管理:音乐人标签库:新建"
,
businessType
=
BusinessType
.
INSERT
)
@Log
(
title
=
"店铺管理:音乐人标签库:新建"
,
businessType
=
BusinessType
.
INSERT
)
@RequiresPermissions
(
"goblin:extag:add"
)
@RequiresPermissions
(
"goblin:extag:add"
)
...
@@ -96,7 +96,7 @@ public class GoblinSelfExtagAdminController extends BaseController {
...
@@ -96,7 +96,7 @@ public class GoblinSelfExtagAdminController extends BaseController {
if
(
StringUtils
.
isBlank
(
tagName
)
||
StringUtils
.
isBlank
(
tagPic
)
||
StringUtils
.
isBlank
(
tagType
))
{
if
(
StringUtils
.
isBlank
(
tagName
)
||
StringUtils
.
isBlank
(
tagPic
)
||
StringUtils
.
isBlank
(
tagType
))
{
return
AjaxResult
.
warn
(
"参数有误,请核实"
);
return
AjaxResult
.
warn
(
"参数有误,请核实"
);
}
}
if
(!
Arrays
.
asList
(
"1"
,
"2"
,
"3"
,
"4"
).
contains
(
tagType
))
{
if
(!
Arrays
.
asList
(
"1"
,
"2"
,
"3"
,
"4"
,
"5"
).
contains
(
tagType
))
{
return
AjaxResult
.
warn
(
"无效参数:标签类型"
);
return
AjaxResult
.
warn
(
"无效参数:标签类型"
);
}
}
LambdaQueryWrapper
<
GoblinSelfTag
>
queryWrapper
=
Wrappers
.
lambdaQuery
(
GoblinSelfTag
.
class
);
LambdaQueryWrapper
<
GoblinSelfTag
>
queryWrapper
=
Wrappers
.
lambdaQuery
(
GoblinSelfTag
.
class
);
...
...
liquidnet-bus-client/liquidnet-client-admin/liquidnet-client-admin-zhengzai/src/main/java/com/liquidnet/client/admin/zhengzai/goblin/service/impl/GoblinSelf
Goods
TagServiceImpl.java
→
liquidnet-bus-client/liquidnet-client-admin/liquidnet-client-admin-zhengzai/src/main/java/com/liquidnet/client/admin/zhengzai/goblin/service/impl/GoblinSelfTagServiceImpl.java
View file @
52c28c34
...
@@ -39,7 +39,7 @@ import java.util.stream.Collectors;
...
@@ -39,7 +39,7 @@ import java.util.stream.Collectors;
*/
*/
@Slf4j
@Slf4j
@Service
@Service
public
class
GoblinSelf
Goods
TagServiceImpl
extends
ServiceImpl
<
GoblinSelfTagMapper
,
GoblinSelfTag
>
implements
IGoblinSelfTagService
{
public
class
GoblinSelfTagServiceImpl
extends
ServiceImpl
<
GoblinSelfTagMapper
,
GoblinSelfTag
>
implements
IGoblinSelfTagService
{
@Autowired
@Autowired
private
MongoTemplate
mongoTemplate
;
private
MongoTemplate
mongoTemplate
;
@Autowired
@Autowired
...
@@ -55,6 +55,7 @@ public class GoblinSelfGoodsTagServiceImpl extends ServiceImpl<GoblinSelfTagMapp
...
@@ -55,6 +55,7 @@ public class GoblinSelfGoodsTagServiceImpl extends ServiceImpl<GoblinSelfTagMapp
if
(
this
.
save
(
selfTag
))
{
if
(
this
.
save
(
selfTag
))
{
mongoTemplate
.
insert
(
GoblinSelfTagVo
.
getNew
().
copy
(
selfTag
),
GoblinSelfTagVo
.
class
.
getSimpleName
());
mongoTemplate
.
insert
(
GoblinSelfTagVo
.
getNew
().
copy
(
selfTag
),
GoblinSelfTagVo
.
class
.
getSimpleName
());
redisDataSourceUtil
.
getRedisGoblinUtil
().
del
(
GoblinRedisConst
.
BASIC_SELF_TAG
);
redisDataSourceUtil
.
getRedisGoblinUtil
().
del
(
GoblinRedisConst
.
BASIC_SELF_EXTAG
);
redisDataSourceUtil
.
getRedisGoblinUtil
().
del
(
GoblinRedisConst
.
BASIC_SELF_EXTAG
);
return
true
;
return
true
;
...
@@ -85,6 +86,7 @@ public class GoblinSelfGoodsTagServiceImpl extends ServiceImpl<GoblinSelfTagMapp
...
@@ -85,6 +86,7 @@ public class GoblinSelfGoodsTagServiceImpl extends ServiceImpl<GoblinSelfTagMapp
log
.
info
(
"店铺管理:标签管理:编辑[selfTag={},MONGO.UpdateResult={}]"
,
JsonUtils
.
toJson
(
selfTag
),
JsonUtils
.
toJson
(
updateResult
));
log
.
info
(
"店铺管理:标签管理:编辑[selfTag={},MONGO.UpdateResult={}]"
,
JsonUtils
.
toJson
(
selfTag
),
JsonUtils
.
toJson
(
updateResult
));
AbstractRedisUtil
redisGoblinUtil
=
redisDataSourceUtil
.
getRedisGoblinUtil
();
AbstractRedisUtil
redisGoblinUtil
=
redisDataSourceUtil
.
getRedisGoblinUtil
();
redisGoblinUtil
.
del
(
GoblinRedisConst
.
BASIC_SELF_TAG
);
redisGoblinUtil
.
del
(
GoblinRedisConst
.
BASIC_SELF_EXTAG
);
redisGoblinUtil
.
del
(
GoblinRedisConst
.
BASIC_SELF_EXTAG
);
try
{
try
{
...
@@ -141,6 +143,7 @@ public class GoblinSelfGoodsTagServiceImpl extends ServiceImpl<GoblinSelfTagMapp
...
@@ -141,6 +143,7 @@ public class GoblinSelfGoodsTagServiceImpl extends ServiceImpl<GoblinSelfTagMapp
log
.
info
(
"店铺管理:标签管理:删除[tagIdArr={},tagBelong={},MONGO.UpdateResult={}]"
,
JsonUtils
.
toJson
(
tagIdArr
),
tagBelong
,
JsonUtils
.
toJson
(
updateResult
));
log
.
info
(
"店铺管理:标签管理:删除[tagIdArr={},tagBelong={},MONGO.UpdateResult={}]"
,
JsonUtils
.
toJson
(
tagIdArr
),
tagBelong
,
JsonUtils
.
toJson
(
updateResult
));
AbstractRedisUtil
redisGoblinUtil
=
redisDataSourceUtil
.
getRedisGoblinUtil
();
AbstractRedisUtil
redisGoblinUtil
=
redisDataSourceUtil
.
getRedisGoblinUtil
();
redisGoblinUtil
.
del
(
GoblinRedisConst
.
BASIC_SELF_TAG
);
redisGoblinUtil
.
del
(
GoblinRedisConst
.
BASIC_SELF_EXTAG
);
redisGoblinUtil
.
del
(
GoblinRedisConst
.
BASIC_SELF_EXTAG
);
try
{
try
{
...
...
liquidnet-bus-service/liquidnet-service-goblin/liquidnet-service-goblin-impl/docu/db_ln_goblin_initialdata.sql
View file @
52c28c34
...
@@ -28,7 +28,7 @@ create table goblin_self_tag
...
@@ -28,7 +28,7 @@ create table goblin_self_tag
tag_name
varchar
(
50
)
not
null
comment
'标签名称'
,
tag_name
varchar
(
50
)
not
null
comment
'标签名称'
,
tag_desc
varchar
(
128
)
null
comment
'标签描述'
,
tag_desc
varchar
(
128
)
null
comment
'标签描述'
,
tag_pic
varchar
(
256
)
null
comment
'标签图片'
,
tag_pic
varchar
(
256
)
null
comment
'标签图片'
,
tag_type
char
null
comment
'标签类型[0-商品标签|1-音乐人|2-艺术家|3-品牌方|4-厂牌]'
,
tag_type
char
null
comment
'标签类型[0-商品标签|1-音乐人|2-艺术家|3-品牌方|4-厂牌
|5-AR
]'
,
tag_belong
char
default
'0'
comment
'标签所属[0-普通标签|1-专属标签]'
,
tag_belong
char
default
'0'
comment
'标签所属[0-普通标签|1-专属标签]'
,
del_flg
char
default
'0'
comment
'删除标记[0-未删除|1-删除]'
,
del_flg
char
default
'0'
comment
'删除标记[0-未删除|1-删除]'
,
counts
int
default
0
comment
'关联商品计数'
,
counts
int
default
0
comment
'关联商品计数'
,
...
...
liquidnet-bus-service/liquidnet-service-goblin/liquidnet-service-goblin-impl/src/main/java/com/liquidnet/service/goblin/controller/manage/GoblinStoreMgtGoodsController.java
View file @
52c28c34
...
@@ -185,26 +185,41 @@ public class GoblinStoreMgtGoodsController {
...
@@ -185,26 +185,41 @@ public class GoblinStoreMgtGoodsController {
storeMgtGoodsAddParam
.
initGoodsSkuInfoVo
(
goodsInfoVo
,
goodsSkuInfoVoList
,
goodsSpecVoList
);
storeMgtGoodsAddParam
.
initGoodsSkuInfoVo
(
goodsInfoVo
,
goodsSkuInfoVoList
,
goodsSpecVoList
);
{
// 标签处理
{
// 标签处理
List
<
String
>
goodsTagIdList
=
storeMgtGoodsAddParam
.
getTagList
(),
goodsExtagIdList
=
storeMgtGoodsAddParam
.
getExtagList
();
List
<
String
>
goodsTagIdList
=
storeMgtGoodsAddParam
.
getTagList
(),
List
<
String
>
tagIdList
=
CollectionUtil
.
arrayListString
();
goodsExtagIdList
=
storeMgtGoodsAddParam
.
getExtagList
(),
tagIdList
.
addAll
(
goodsTagIdList
);
goodsArtagIdList
=
storeMgtGoodsAddParam
.
getExtagList
();
tagIdList
.
addAll
(
goodsExtagIdList
);
List
<
GoblinSelfTagVo
>
selfTagVoList
;
if
(!
CollectionUtils
.
isEmpty
(
tagIdList
)
&&
!
CollectionUtils
.
isEmpty
(
selfTagVoList
=
goblinMongoUtils
.
getMgtSelfTagVos
(
tagIdList
)))
{
if
(!
CollectionUtils
.
isEmpty
(
goodsTagIdList
))
{
if
(!
CollectionUtils
.
isEmpty
(
goodsTagIdList
))
{
List
<
GoblinSelfTagVo
>
selfGoodsTagVos
=
goblinRedisUtils
.
getSelfTagVos
();
List
<
GoblinGoodsTagVo
>
goodsTagVoList
=
ObjectUtil
.
getGoblinGoodsTagVoArrayList
();
List
<
GoblinGoodsTagVo
>
goodsTagVoList
=
ObjectUtil
.
getGoblinGoodsTagVoArrayList
();
for
(
int
i
=
0
;
i
<
goodsTagIdList
.
size
();
i
++)
for
(
int
i
=
0
;
i
<
goodsTagIdList
.
size
();
i
++)
for
(
GoblinSelfTagVo
r
:
selfTagVoList
)
for
(
GoblinSelfTagVo
r
:
selfGoodsTagVos
)
if
(
r
.
getTagId
().
equals
(
goodsTagIdList
.
get
(
i
)))
goodsTagVoList
.
add
(
GoblinGoodsTagVo
.
getNew
().
copy
(
r
).
setSort
(
i
));
if
(
r
.
getTagId
().
equals
(
goodsTagIdList
.
get
(
i
))
&&
r
.
getTagBelong
().
equals
(
"0"
))
{
goodsTagVoList
.
add
(
GoblinGoodsTagVo
.
getNew
().
copy
(
r
).
setSort
(
i
));
break
;
}
goodsInfoVo
.
setTagVoList
(
goodsTagVoList
);
goodsInfoVo
.
setTagVoList
(
goodsTagVoList
);
}
}
if
(!
CollectionUtils
.
isEmpty
(
goodsExtagIdList
))
{
if
(!
CollectionUtils
.
isEmpty
(
goodsExtagIdList
))
{
List
<
GoblinSelfTagVo
>
selfExtagVos
=
goblinRedisUtils
.
getSelfExtagVos
();
List
<
GoblinGoodsExtagVo
>
goodsExtagVoList
=
ObjectUtil
.
getGoblinGoodsExtagVoArrayList
();
List
<
GoblinGoodsExtagVo
>
goodsExtagVoList
=
ObjectUtil
.
getGoblinGoodsExtagVoArrayList
();
for
(
int
i
=
0
;
i
<
goodsExtagIdList
.
size
();
i
++)
for
(
int
i
=
0
;
i
<
goodsExtagIdList
.
size
();
i
++)
for
(
GoblinSelfTagVo
r
:
selfTagVoList
)
for
(
GoblinSelfTagVo
r
:
selfExtagVos
)
if
(
r
.
getTagId
().
equals
(
goodsExtagIdList
.
get
(
i
)))
goodsExtagVoList
.
add
(
GoblinGoodsExtagVo
.
getNew
().
copy
(
r
).
setSort
(
i
));
if
(
r
.
getTagId
().
equals
(
goodsExtagIdList
.
get
(
i
))
&&
r
.
getTagBelong
().
equals
(
"1"
)
&&
!
r
.
getTagType
().
equals
(
"5"
))
{
goodsExtagVoList
.
add
(
GoblinGoodsExtagVo
.
getNew
().
copy
(
r
).
setSort
(
i
));
break
;
}
goodsInfoVo
.
setExtagVoList
(
goodsExtagVoList
);
goodsInfoVo
.
setExtagVoList
(
goodsExtagVoList
);
}
}
if
(!
CollectionUtils
.
isEmpty
(
goodsArtagIdList
))
{
List
<
GoblinSelfTagVo
>
selfExtagVos
=
goblinRedisUtils
.
getSelfExtagVos
();
List
<
GoblinGoodsExtagVo
>
goodsArtagVoList
=
ObjectUtil
.
getGoblinGoodsExtagVoArrayList
();
for
(
int
i
=
0
;
i
<
goodsArtagIdList
.
size
();
i
++)
for
(
GoblinSelfTagVo
r
:
selfExtagVos
)
if
(
r
.
getTagId
().
equals
(
goodsArtagIdList
.
get
(
i
))
&&
r
.
getTagBelong
().
equals
(
"1"
))
{
goodsArtagVoList
.
add
(
GoblinGoodsExtagVo
.
getNew
().
copy
(
r
).
setSort
(
i
));
break
;
}
goodsInfoVo
.
setArtagVoList
(
goodsArtagVoList
);
}
}
}
}
...
@@ -473,7 +488,10 @@ public class GoblinStoreMgtGoodsController {
...
@@ -473,7 +488,10 @@ public class GoblinStoreMgtGoodsController {
.
collect
(
Collectors
.
toMap
(
GoblinGoodsSpecDto:
:
getSpecName
,
GoblinGoodsSpecDto:
:
getSpecVname
,
(
k1
,
k2
)
->
k2
));
.
collect
(
Collectors
.
toMap
(
GoblinGoodsSpecDto:
:
getSpecName
,
GoblinGoodsSpecDto:
:
getSpecVname
,
(
k1
,
k2
)
->
k2
));
for
(
GoblinGoodsSpecVo
specVo
:
specVoList
)
{
// 同步添加SPU规格信息
for
(
GoblinGoodsSpecVo
specVo
:
specVoList
)
{
// 同步添加SPU规格信息
List
<
GoblinGoodsSpecValueVo
>
specValues
=
specVo
.
getSpecValues
();
List
<
GoblinGoodsSpecValueVo
>
specValues
=
specVo
.
getSpecValues
();
specValues
.
add
(
GoblinGoodsSpecValueVo
.
getNew
().
setSpecVname
(
paramSkuSpecMap
.
get
(
specVo
.
getSpecName
())).
setSpecVsort
(
specValues
.
size
()));
String
paramSkuSpecVname
=
paramSkuSpecMap
.
get
(
specVo
.
getSpecName
());
if
(
specValues
.
stream
().
noneMatch
(
r
->
r
.
getSpecVname
().
equals
(
paramSkuSpecVname
)))
{
specValues
.
add
(
GoblinGoodsSpecValueVo
.
getNew
().
setSpecVname
(
paramSkuSpecVname
).
setSpecVsort
(
specValues
.
size
()));
}
}
}
}
}
...
...
liquidnet-bus-service/liquidnet-service-goblin/liquidnet-service-goblin-impl/src/main/java/com/liquidnet/service/goblin/service/impl/manage/GoblinStoreMgtGoodsServiceImpl.java
View file @
52c28c34
...
@@ -174,6 +174,9 @@ public class GoblinStoreMgtGoodsServiceImpl implements IGoblinstoreMgtGoodsServi
...
@@ -174,6 +174,9 @@ public class GoblinStoreMgtGoodsServiceImpl implements IGoblinstoreMgtGoodsServi
if
(!
CollectionUtils
.
isEmpty
(
goodsInfoVo
.
getExtagVoList
()))
{
if
(!
CollectionUtils
.
isEmpty
(
goodsInfoVo
.
getExtagVoList
()))
{
goodsInfoVo
.
getExtagVoList
().
forEach
(
exTagVo
->
initGoodsTagObjs
.
add
(
new
Object
[]{
spuId
,
exTagVo
.
getTagId
(),
exTagVo
.
getSort
(),
"1"
}));
goodsInfoVo
.
getExtagVoList
().
forEach
(
exTagVo
->
initGoodsTagObjs
.
add
(
new
Object
[]{
spuId
,
exTagVo
.
getTagId
(),
exTagVo
.
getSort
(),
"1"
}));
}
}
if
(!
CollectionUtils
.
isEmpty
(
goodsInfoVo
.
getArtagVoList
()))
{
goodsInfoVo
.
getArtagVoList
().
forEach
(
arTagVo
->
initGoodsTagObjs
.
add
(
new
Object
[]{
spuId
,
arTagVo
.
getTagId
(),
arTagVo
.
getSort
(),
"1"
}));
}
toMqSqls
.
add
(
SqlMapping
.
get
(
"goblin_goods_service_support.insert"
));
toMqSqls
.
add
(
SqlMapping
.
get
(
"goblin_goods_service_support.insert"
));
LinkedList
<
Object
[]>
initGoodsServiceSupportObjs
=
CollectionUtil
.
linkedListObjectArr
();
LinkedList
<
Object
[]>
initGoodsServiceSupportObjs
=
CollectionUtil
.
linkedListObjectArr
();
if
(!
CollectionUtils
.
isEmpty
(
goodsInfoVo
.
getServiceSupportVoList
()))
{
if
(!
CollectionUtils
.
isEmpty
(
goodsInfoVo
.
getServiceSupportVoList
()))
{
...
@@ -235,37 +238,53 @@ public class GoblinStoreMgtGoodsServiceImpl implements IGoblinstoreMgtGoodsServi
...
@@ -235,37 +238,53 @@ public class GoblinStoreMgtGoodsServiceImpl implements IGoblinstoreMgtGoodsServi
}
}
GoblinGoodsInfoVo
updateSpuInfoVo
=
storeMgtGoodsAddParam
.
initEditGoodsInfoVo
();
GoblinGoodsInfoVo
updateSpuInfoVo
=
storeMgtGoodsAddParam
.
initEditGoodsInfoVo
();
boolean
updateTagFlg
=
false
,
updateExtagFlg
=
false
;
boolean
updateTagFlg
=
false
,
updateExtagFlg
=
false
,
updateArtagFlg
=
false
;
List
<
GoblinGoodsTagVo
>
befTagVoList
=
mgtGoodsInfoVo
.
getTagVoList
();
List
<
GoblinGoodsTagVo
>
befTagVoList
=
mgtGoodsInfoVo
.
getTagVoList
();
boolean
befTagIsEmptyFlg
=
CollectionUtils
.
isEmpty
(
befTagVoList
);
boolean
befTagIsEmptyFlg
=
CollectionUtils
.
isEmpty
(
befTagVoList
);
List
<
GoblinGoodsExtagVo
>
befExtagVoList
=
mgtGoodsInfoVo
.
getExtagVoList
();
List
<
GoblinGoodsExtagVo
>
befExtagVoList
=
mgtGoodsInfoVo
.
getExtagVoList
();
boolean
befExtagIsEmptyFlg
=
CollectionUtils
.
isEmpty
(
befExtagVoList
);
boolean
befExtagIsEmptyFlg
=
CollectionUtils
.
isEmpty
(
befExtagVoList
);
boolean
paramTagIsEmptyFlg
,
paramExtagIsEmptyFlg
;
List
<
GoblinGoodsExtagVo
>
befArtagVoList
=
mgtGoodsInfoVo
.
getArtagVoList
();
boolean
befArtagIsEmptyFlg
=
CollectionUtils
.
isEmpty
(
befArtagVoList
);
boolean
paramTagIsEmptyFlg
,
paramExtagIsEmptyFlg
,
paramArtagIsEmptyFlg
;
List
<
GoblinGoodsTagVo
>
paramTagVoList
=
ObjectUtil
.
getGoblinGoodsTagVoArrayList
();
List
<
GoblinGoodsTagVo
>
paramTagVoList
=
ObjectUtil
.
getGoblinGoodsTagVoArrayList
();
List
<
GoblinGoodsExtagVo
>
paramExtagVoList
=
ObjectUtil
.
getGoblinGoodsExtagVoArrayList
();
List
<
GoblinGoodsExtagVo
>
paramExtagVoList
=
ObjectUtil
.
getGoblinGoodsExtagVoArrayList
();
List
<
GoblinGoodsExtagVo
>
paramArtagVoList
=
ObjectUtil
.
getGoblinGoodsExtagVoArrayList
();
{
// 标签处理
{
// 标签处理
List
<
String
>
goodsTagIdList
=
storeMgtGoodsAddParam
.
getTagList
(),
goodsExtagIdList
=
storeMgtGoodsAddParam
.
getExtagList
();
List
<
String
>
goodsTagIdList
=
storeMgtGoodsAddParam
.
getTagList
(),
List
<
String
>
tagIdList
=
CollectionUtil
.
arrayListString
();
goodsExtagIdList
=
storeMgtGoodsAddParam
.
getExtagList
(),
tagIdList
.
addAll
(
goodsTagIdList
);
goodsArtagIdList
=
storeMgtGoodsAddParam
.
getArtagList
();
tagIdList
.
addAll
(
goodsExtagIdList
);
List
<
GoblinSelfTagVo
>
selfTagVoList
;
if
(!
CollectionUtils
.
isEmpty
(
tagIdList
)
&&
!
CollectionUtils
.
isEmpty
(
selfTagVoList
=
goblinMongoUtils
.
getMgtSelfTagVos
(
tagIdList
)))
{
if
(!
CollectionUtils
.
isEmpty
(
goodsTagIdList
))
{
if
(!
CollectionUtils
.
isEmpty
(
goodsTagIdList
))
{
List
<
GoblinSelfTagVo
>
selfGoodsTagVos
=
goblinRedisUtils
.
getSelfTagVos
();
for
(
int
i
=
0
;
i
<
goodsTagIdList
.
size
();
i
++)
for
(
int
i
=
0
;
i
<
goodsTagIdList
.
size
();
i
++)
for
(
GoblinSelfTagVo
r
:
selfTagVoList
)
for
(
GoblinSelfTagVo
r
:
selfGoodsTagVos
)
if
(
r
.
getTagBelong
().
equals
(
"0"
)
&&
r
.
getTagId
().
equals
(
goodsTagIdList
.
get
(
i
)))
if
(
r
.
getTagId
().
equals
(
goodsTagIdList
.
get
(
i
))
&&
r
.
getTagBelong
().
equals
(
"0"
))
{
paramTagVoList
.
add
(
GoblinGoodsTagVo
.
getNew
().
copy
(
r
).
setSort
(
i
));
paramTagVoList
.
add
(
GoblinGoodsTagVo
.
getNew
().
copy
(
r
).
setSort
(
i
));
break
;
}
}
}
List
<
GoblinSelfTagVo
>
selfExtagVos
=
null
;
if
(!
CollectionUtils
.
isEmpty
(
goodsExtagIdList
))
{
if
(!
CollectionUtils
.
isEmpty
(
goodsExtagIdList
))
{
selfExtagVos
=
goblinRedisUtils
.
getSelfExtagVos
();
for
(
int
i
=
0
;
i
<
goodsExtagIdList
.
size
();
i
++)
for
(
int
i
=
0
;
i
<
goodsExtagIdList
.
size
();
i
++)
for
(
GoblinSelfTagVo
r
:
selfTagVoList
)
for
(
GoblinSelfTagVo
r
:
selfExtagVos
)
if
(
r
.
getTagBelong
().
equals
(
"1"
)
&&
r
.
getTagId
().
equals
(
goodsExtagIdList
.
get
(
i
)))
if
(
r
.
getTagId
().
equals
(
goodsExtagIdList
.
get
(
i
))
&&
r
.
getTagBelong
().
equals
(
"1"
)
&&
!
r
.
getTagType
().
equals
(
"5"
))
{
paramExtagVoList
.
add
(
GoblinGoodsExtagVo
.
getNew
().
copy
(
r
).
setSort
(
i
));
paramExtagVoList
.
add
(
GoblinGoodsExtagVo
.
getNew
().
copy
(
r
).
setSort
(
i
));
break
;
}
}
if
(!
CollectionUtils
.
isEmpty
(
goodsArtagIdList
))
{
selfExtagVos
=
CollectionUtils
.
isEmpty
(
selfExtagVos
)
?
goblinRedisUtils
.
getSelfExtagVos
()
:
selfExtagVos
;
for
(
int
i
=
0
;
i
<
goodsArtagIdList
.
size
();
i
++)
for
(
GoblinSelfTagVo
r
:
selfExtagVos
)
if
(
r
.
getTagId
().
equals
(
goodsArtagIdList
.
get
(
i
))
&&
r
.
getTagBelong
().
equals
(
"1"
))
{
paramArtagVoList
.
add
(
GoblinGoodsExtagVo
.
getNew
().
copy
(
r
).
setSort
(
i
));
break
;
}
}
}
}
paramTagIsEmptyFlg
=
CollectionUtils
.
isEmpty
(
paramTagVoList
);
paramTagIsEmptyFlg
=
CollectionUtils
.
isEmpty
(
paramTagVoList
);
paramExtagIsEmptyFlg
=
CollectionUtils
.
isEmpty
(
paramExtagVoList
);
paramExtagIsEmptyFlg
=
CollectionUtils
.
isEmpty
(
paramExtagVoList
);
paramArtagIsEmptyFlg
=
CollectionUtils
.
isEmpty
(
paramArtagVoList
);
if
(!
befTagIsEmptyFlg
||
!
paramTagIsEmptyFlg
)
{
if
(!
befTagIsEmptyFlg
||
!
paramTagIsEmptyFlg
)
{
if
(!
befTagIsEmptyFlg
&&
!
paramTagIsEmptyFlg
)
{
if
(!
befTagIsEmptyFlg
&&
!
paramTagIsEmptyFlg
)
{
if
(
paramTagVoList
.
size
()
!=
befTagVoList
.
size
())
{
if
(
paramTagVoList
.
size
()
!=
befTagVoList
.
size
())
{
...
@@ -307,6 +326,27 @@ public class GoblinStoreMgtGoodsServiceImpl implements IGoblinstoreMgtGoodsServi
...
@@ -307,6 +326,27 @@ public class GoblinStoreMgtGoodsServiceImpl implements IGoblinstoreMgtGoodsServi
if
(
updateExtagFlg
)
{
if
(
updateExtagFlg
)
{
updateSpuInfoVo
.
setExtagVoList
(
paramExtagIsEmptyFlg
?
ObjectUtil
.
getGoblinGoodsExtagVoArrayList
()
:
paramExtagVoList
);
updateSpuInfoVo
.
setExtagVoList
(
paramExtagIsEmptyFlg
?
ObjectUtil
.
getGoblinGoodsExtagVoArrayList
()
:
paramExtagVoList
);
}
}
if
(!
befArtagIsEmptyFlg
||
!
paramArtagIsEmptyFlg
)
{
if
(!
befArtagIsEmptyFlg
&&
!
paramArtagIsEmptyFlg
)
{
if
(
paramArtagVoList
.
size
()
!=
befArtagVoList
.
size
())
{
updateArtagFlg
=
true
;
}
else
{
List
<
String
>
befArtagIdList
=
befArtagVoList
.
stream
().
map
(
GoblinGoodsExtagVo:
:
getTagId
).
collect
(
Collectors
.
toList
());
for
(
GoblinGoodsExtagVo
vo
:
paramArtagVoList
)
{
if
(!
befArtagIdList
.
contains
(
vo
.
getTagId
()))
{
updateArtagFlg
=
true
;
break
;
}
}
}
}
else
{
updateArtagFlg
=
true
;
}
}
if
(
updateArtagFlg
)
{
updateSpuInfoVo
.
setArtagVoList
(
paramArtagIsEmptyFlg
?
ObjectUtil
.
getGoblinGoodsExtagVoArrayList
()
:
paramArtagVoList
);
}
}
}
...
@@ -406,11 +446,23 @@ public class GoblinStoreMgtGoodsServiceImpl implements IGoblinstoreMgtGoodsServi
...
@@ -406,11 +446,23 @@ public class GoblinStoreMgtGoodsServiceImpl implements IGoblinstoreMgtGoodsServi
if
(
updateExtagFlg
)
{
if
(
updateExtagFlg
)
{
if
(!
befExtagIsEmptyFlg
)
{
if
(!
befExtagIsEmptyFlg
)
{
deleteGoodsTagObjs
.
add
(
new
Object
[]{
spuId
,
'1'
});
deleteGoodsTagObjs
.
add
(
new
Object
[]{
spuId
,
'1'
});
List
<
GoblinGoodsExtagVo
>
artagVoList
=
updateArtagFlg
?
updateSpuInfoVo
.
getArtagVoList
()
:
mgtGoodsInfoVo
.
getArtagVoList
();
artagVoList
.
forEach
(
vo
->
initGoodsTagObjs
.
add
(
new
Object
[]{
spuId
,
vo
.
getTagId
(),
vo
.
getSort
(),
"1"
}));
}
}
if
(!
paramExtagIsEmptyFlg
)
{
if
(!
paramExtagIsEmptyFlg
)
{
updateSpuInfoVo
.
getExtagVoList
().
forEach
(
vo
->
initGoodsTagObjs
.
add
(
new
Object
[]{
spuId
,
vo
.
getTagId
(),
vo
.
getSort
(),
"1"
}));
updateSpuInfoVo
.
getExtagVoList
().
forEach
(
vo
->
initGoodsTagObjs
.
add
(
new
Object
[]{
spuId
,
vo
.
getTagId
(),
vo
.
getSort
(),
"1"
}));
}
}
}
}
if
(
updateArtagFlg
)
{
if
(!
befArtagIsEmptyFlg
)
{
deleteGoodsTagObjs
.
add
(
new
Object
[]{
spuId
,
'1'
});
List
<
GoblinGoodsExtagVo
>
extagVoList
=
updateExtagFlg
?
updateSpuInfoVo
.
getExtagVoList
()
:
mgtGoodsInfoVo
.
getExtagVoList
();
extagVoList
.
forEach
(
vo
->
initGoodsTagObjs
.
add
(
new
Object
[]{
spuId
,
vo
.
getTagId
(),
vo
.
getSort
(),
"1"
}));
}
if
(!
paramArtagIsEmptyFlg
)
{
updateSpuInfoVo
.
getArtagVoList
().
forEach
(
vo
->
initGoodsTagObjs
.
add
(
new
Object
[]{
spuId
,
vo
.
getTagId
(),
vo
.
getSort
(),
"1"
}));
}
}
toMqSqls
.
add
(
SqlMapping
.
get
(
"goblin_goods_service_support.delete"
));
toMqSqls
.
add
(
SqlMapping
.
get
(
"goblin_goods_service_support.delete"
));
LinkedList
<
Object
[]>
deleteServiceSupportObjs
=
CollectionUtil
.
linkedListObjectArr
();
LinkedList
<
Object
[]>
deleteServiceSupportObjs
=
CollectionUtil
.
linkedListObjectArr
();
...
...
liquidnet-bus-service/liquidnet-service-goblin/liquidnet-service-goblin-impl/src/main/java/com/liquidnet/service/goblin/util/GoblinMongoUtils.java
View file @
52c28c34
...
@@ -464,6 +464,7 @@ public class GoblinMongoUtils {
...
@@ -464,6 +464,7 @@ public class GoblinMongoUtils {
.
set
(
"logisticsTemplate"
,
vo
.
getLogisticsTemplate
())
.
set
(
"logisticsTemplate"
,
vo
.
getLogisticsTemplate
())
.
set
(
"tagVoList"
,
mongoConverter
.
convertToMongoType
(
vo
.
getTagVoList
()))
.
set
(
"tagVoList"
,
mongoConverter
.
convertToMongoType
(
vo
.
getTagVoList
()))
.
set
(
"extagVoList"
,
mongoConverter
.
convertToMongoType
(
vo
.
getExtagVoList
()))
.
set
(
"extagVoList"
,
mongoConverter
.
convertToMongoType
(
vo
.
getExtagVoList
()))
.
set
(
"artagVoList"
,
mongoConverter
.
convertToMongoType
(
vo
.
getArtagVoList
()))
.
set
(
"serviceSupportVoList"
,
mongoConverter
.
convertToMongoType
(
vo
.
getServiceSupportVoList
()))
.
set
(
"serviceSupportVoList"
,
mongoConverter
.
convertToMongoType
(
vo
.
getServiceSupportVoList
()))
.
set
(
"updatedBy"
,
vo
.
getUpdatedBy
())
.
set
(
"updatedBy"
,
vo
.
getUpdatedBy
())
.
set
(
"updatedAt"
,
vo
.
getUpdatedAt
())
.
set
(
"updatedAt"
,
vo
.
getUpdatedAt
())
...
@@ -1071,7 +1072,7 @@ public class GoblinMongoUtils {
...
@@ -1071,7 +1072,7 @@ public class GoblinMongoUtils {
if
(
StringUtils
.
isNotBlank
(
filterParam
.
getStoreCouponNo
()))
{
if
(
StringUtils
.
isNotBlank
(
filterParam
.
getStoreCouponNo
()))
{
criteria
.
and
(
"storeCouponNo"
).
is
(
filterParam
.
getStoreCouponNo
());
criteria
.
and
(
"storeCouponNo"
).
is
(
filterParam
.
getStoreCouponNo
());
}
}
if
(
filterParam
.
getState
()
!=
null
)
{
if
(
StringUtils
.
isNotBlank
(
filterParam
.
getState
())
)
{
criteria
.
and
(
"state"
).
is
(
filterParam
.
getState
());
criteria
.
and
(
"state"
).
is
(
filterParam
.
getState
());
}
}
if
(
StringUtils
.
isNotBlank
(
filterParam
.
getStartTime
()))
{
if
(
StringUtils
.
isNotBlank
(
filterParam
.
getStartTime
()))
{
...
...
liquidnet-bus-service/liquidnet-service-goblin/liquidnet-service-goblin-impl/src/main/java/com/liquidnet/service/goblin/util/GoblinRedisUtils.java
View file @
52c28c34
...
@@ -108,13 +108,21 @@ public class GoblinRedisUtils {
...
@@ -108,13 +108,21 @@ public class GoblinRedisUtils {
/* ---------------------------------------- 平台标签数据源 ---------------------------------------- */
/* ---------------------------------------- 平台标签数据源 ---------------------------------------- */
public
List
<
GoblinSelfTagVo
>
getSelfGoodsTagVos
()
{
// 普通商品标签
/**
String
valStr
=
(
String
)
redisUtil
.
get
(
GoblinRedisConst
.
BASIC_SELF_GOODS_TAG
);
* 普通商品标签
* {
* tagType:0-普通商品标签
* tagBelong:0-普通标签
* }
* @return List<GoblinSelfTagVo>
*/
public
List
<
GoblinSelfTagVo
>
getSelfTagVos
()
{
String
valStr
=
(
String
)
redisUtil
.
get
(
GoblinRedisConst
.
BASIC_SELF_TAG
);
boolean
valStrIsEmptyFlg
=
StringUtils
.
isEmpty
(
valStr
);
boolean
valStrIsEmptyFlg
=
StringUtils
.
isEmpty
(
valStr
);
List
<
GoblinSelfTagVo
>
vos
;
List
<
GoblinSelfTagVo
>
vos
;
if
(
valStrIsEmptyFlg
)
{
if
(
valStrIsEmptyFlg
)
{
if
(!
CollectionUtils
.
isEmpty
(
vos
=
goblinMongoUtils
.
getSelfTagVos
(
"0"
)))
{
if
(!
CollectionUtils
.
isEmpty
(
vos
=
goblinMongoUtils
.
getSelfTagVos
(
"0"
)))
{
redisUtil
.
set
(
GoblinRedisConst
.
BASIC_SELF_
GOODS_
TAG
,
JsonUtils
.
toJson
(
vos
));
redisUtil
.
set
(
GoblinRedisConst
.
BASIC_SELF_TAG
,
JsonUtils
.
toJson
(
vos
));
}
}
}
else
{
}
else
{
vos
=
JsonUtils
.
fromJson
(
valStr
,
new
TypeReference
<
List
<
GoblinSelfTagVo
>>()
{
vos
=
JsonUtils
.
fromJson
(
valStr
,
new
TypeReference
<
List
<
GoblinSelfTagVo
>>()
{
...
@@ -123,12 +131,20 @@ public class GoblinRedisUtils {
...
@@ -123,12 +131,20 @@ public class GoblinRedisUtils {
return
vos
;
return
vos
;
}
}
public
List
<
GoblinSelfTagVo
>
getSelfExtagVos
()
{
// 专属标签(音乐人等)
/**
* 专属标签
* {
* tagType:1-音乐人|2-艺术家|3-品牌方|4-厂牌|5-AR
* tagBelong:1-专属标签
* }
* @return List<GoblinSelfTagVo>
*/
public
List
<
GoblinSelfTagVo
>
getSelfExtagVos
()
{
String
valStr
=
(
String
)
redisUtil
.
get
(
GoblinRedisConst
.
BASIC_SELF_EXTAG
);
String
valStr
=
(
String
)
redisUtil
.
get
(
GoblinRedisConst
.
BASIC_SELF_EXTAG
);
List
<
GoblinSelfTagVo
>
vos
;
List
<
GoblinSelfTagVo
>
vos
;
if
(
StringUtils
.
isEmpty
(
valStr
))
{
if
(
StringUtils
.
isEmpty
(
valStr
))
{
if
(!
CollectionUtils
.
isEmpty
(
vos
=
goblinMongoUtils
.
getSelfTagVos
(
"1"
)))
{
if
(!
CollectionUtils
.
isEmpty
(
vos
=
goblinMongoUtils
.
getSelfTagVos
(
"1"
)))
{
redisUtil
.
set
(
GoblinRedisConst
.
BASIC_SELF_
GOODS_
TAG
,
JsonUtils
.
toJson
(
vos
));
redisUtil
.
set
(
GoblinRedisConst
.
BASIC_SELF_TAG
,
JsonUtils
.
toJson
(
vos
));
}
}
}
else
{
}
else
{
vos
=
JsonUtils
.
fromJson
(
valStr
,
new
TypeReference
<
List
<
GoblinSelfTagVo
>>()
{
vos
=
JsonUtils
.
fromJson
(
valStr
,
new
TypeReference
<
List
<
GoblinSelfTagVo
>>()
{
...
...
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