记得上下班打卡 | 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
8b7542d5
Commit
8b7542d5
authored
Jan 04, 2022
by
张国柄
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
+API:服务保障列表;
parent
691efc05
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
109 additions
and
15 deletions
+109
-15
GoblinGoodsExtagVo.java
...m/liquidnet/service/goblin/dto/vo/GoblinGoodsExtagVo.java
+14
-0
GoblinGoodsTagVo.java
...com/liquidnet/service/goblin/dto/vo/GoblinGoodsTagVo.java
+7
-1
GoblinServiceSupportVo.java
...quidnet/service/goblin/dto/vo/GoblinServiceSupportVo.java
+20
-0
GoblinMgtServiceSupportController.java
.../controller/manage/GoblinMgtServiceSupportController.java
+35
-0
GoblinStoreMgtGoodsServiceImpl.java
...n/service/impl/manage/GoblinStoreMgtGoodsServiceImpl.java
+16
-8
GoblinMongoUtils.java
...a/com/liquidnet/service/goblin/util/GoblinMongoUtils.java
+12
-1
GoblinRedisUtils.java
...a/com/liquidnet/service/goblin/util/GoblinRedisUtils.java
+5
-5
No files found.
liquidnet-bus-api/liquidnet-service-goblin-api/src/main/java/com/liquidnet/service/goblin/dto/vo/GoblinGoodsExtagVo.java
View file @
8b7542d5
...
...
@@ -21,6 +21,11 @@ public class GoblinGoodsExtagVo implements Serializable, Cloneable {
@ApiModelProperty
(
position
=
14
,
value
=
"排序[数值越小,排序越前]"
)
private
Integer
sort
;
public
GoblinGoodsExtagVo
setSort
(
Integer
sort
)
{
this
.
sort
=
sort
;
return
this
;
}
private
static
final
GoblinGoodsExtagVo
obj
=
new
GoblinGoodsExtagVo
();
public
static
GoblinGoodsExtagVo
getNew
()
{
try
{
...
...
@@ -29,4 +34,13 @@ public class GoblinGoodsExtagVo implements Serializable, Cloneable {
return
new
GoblinGoodsExtagVo
();
}
}
public
GoblinGoodsExtagVo
copy
(
GoblinSelfTagVo
source
)
{
if
(
null
==
source
)
return
this
;
this
.
setTagId
(
source
.
getTagId
());
this
.
setTagName
(
source
.
getTagName
());
this
.
setTagDesc
(
source
.
getTagDesc
());
this
.
setTagPic
(
source
.
getTagPic
());
return
this
;
}
}
liquidnet-bus-api/liquidnet-service-goblin-api/src/main/java/com/liquidnet/service/goblin/dto/vo/GoblinGoodsTagVo.java
View file @
8b7542d5
...
...
@@ -17,6 +17,11 @@ public class GoblinGoodsTagVo implements Serializable, Cloneable {
@ApiModelProperty
(
position
=
13
,
value
=
"排序[数值越小,排序越前]"
)
private
Integer
sort
;
public
GoblinGoodsTagVo
setSort
(
Integer
sort
)
{
this
.
sort
=
sort
;
return
this
;
}
private
static
final
GoblinGoodsTagVo
obj
=
new
GoblinGoodsTagVo
();
public
static
GoblinGoodsTagVo
getNew
()
{
try
{
...
...
@@ -28,7 +33,8 @@ public class GoblinGoodsTagVo implements Serializable, Cloneable {
public
GoblinGoodsTagVo
copy
(
GoblinSelfTagVo
source
)
{
if
(
null
==
source
)
return
this
;
this
.
setTagId
(
source
.
getTagId
());
this
.
setTagName
(
source
.
getTagName
());
return
this
;
}
}
liquidnet-bus-api/liquidnet-service-goblin-api/src/main/java/com/liquidnet/service/goblin/dto/vo/GoblinServiceSupportVo.java
View file @
8b7542d5
...
...
@@ -19,6 +19,26 @@ public class GoblinServiceSupportVo implements Serializable, Cloneable {
@ApiModelProperty
(
position
=
13
,
value
=
"服务支持图片地址[256]"
)
private
String
url
;
public
GoblinServiceSupportVo
setSsid
(
String
ssid
)
{
this
.
ssid
=
ssid
;
return
this
;
}
public
GoblinServiceSupportVo
setName
(
String
name
)
{
this
.
name
=
name
;
return
this
;
}
public
GoblinServiceSupportVo
setDesc
(
String
desc
)
{
this
.
desc
=
desc
;
return
this
;
}
public
GoblinServiceSupportVo
setUrl
(
String
url
)
{
this
.
url
=
url
;
return
this
;
}
private
static
final
GoblinServiceSupportVo
obj
=
new
GoblinServiceSupportVo
();
public
static
GoblinServiceSupportVo
getNew
()
{
try
{
...
...
liquidnet-bus-service/liquidnet-service-goblin/liquidnet-service-goblin-impl/src/main/java/com/liquidnet/service/goblin/controller/manage/GoblinMgtServiceSupportController.java
0 → 100644
View file @
8b7542d5
package
com
.
liquidnet
.
service
.
goblin
.
controller
.
manage
;
import
com.github.xiaoymin.knife4j.annotations.ApiOperationSupport
;
import
com.github.xiaoymin.knife4j.annotations.ApiSupport
;
import
com.liquidnet.service.base.ResponseDto
;
import
com.liquidnet.service.goblin.dto.vo.GoblinServiceSupportVo
;
import
com.liquidnet.service.goblin.util.GoblinMongoUtils
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
import
lombok.extern.slf4j.Slf4j
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.validation.annotation.Validated
;
import
org.springframework.web.bind.annotation.PostMapping
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RestController
;
import
java.util.List
;
@ApiSupport
(
order
=
149003
)
@Api
(
tags
=
"服务支持管理"
)
@Slf4j
@Validated
@RestController
@RequestMapping
(
"mgt/sevs"
)
public
class
GoblinMgtServiceSupportController
{
@Autowired
GoblinMongoUtils
goblinMongoUtils
;
@ApiOperationSupport
(
order
=
1
)
@ApiOperation
(
value
=
"服务支持列表"
)
@PostMapping
(
"list"
)
public
ResponseDto
<
List
<
GoblinServiceSupportVo
>>
list
()
{
return
ResponseDto
.
success
(
goblinMongoUtils
.
getMgtServiceSupportVo
());
}
}
liquidnet-bus-service/liquidnet-service-goblin/liquidnet-service-goblin-impl/src/main/java/com/liquidnet/service/goblin/service/impl/manage/GoblinStoreMgtGoodsServiceImpl.java
View file @
8b7542d5
...
...
@@ -61,28 +61,36 @@ public class GoblinStoreMgtGoodsServiceImpl implements IGoblinstoreMgtGoodsServi
if
(!
CollectionUtils
.
isEmpty
(
tagIdList
))
{
List
<
GoblinSelfTagVo
>
selfTagVoList
=
goblinMongoUtils
.
getSelfTagVos
(
tagIdList
);
if
(!
goodsTagIsEmpty
)
{
List
<
GoblinGoodsTagVo
>
goodsTagVoList
=
ObjectUtil
.
getGoblinGoodsTagVoArrayList
();
for
(
int
i
=
0
;
i
<
tagIdList
.
size
();
i
++)
{
String
tagId
=
tagIdList
.
get
(
i
);
selfTagVoList
.
forEach
(
r
->
{
for
(
GoblinSelfTagVo
r
:
selfTagVoList
)
{
if
(
r
.
getTagId
().
equals
(
tagId
))
{
GoblinGoodsTagVo
.
getNew
(
);
goodsTagVoList
.
add
(
GoblinGoodsTagVo
.
getNew
().
copy
(
r
).
setSort
(
i
)
);
}
}
);
}
}
// vo.setTagVoList(
);
vo
.
setTagVoList
(
goodsTagVoList
);
}
if
(!
goodsExtagIsEmpty
)
{
// vo.setExtagVoList();
List
<
GoblinGoodsExtagVo
>
goodsExtagVoList
=
ObjectUtil
.
getGoblinGoodsExtagVoArrayList
();
for
(
int
i
=
0
;
i
<
tagIdList
.
size
();
i
++)
{
String
tagId
=
tagIdList
.
get
(
i
);
for
(
GoblinSelfTagVo
r
:
selfTagVoList
)
{
if
(
r
.
getTagId
().
equals
(
tagId
))
{
goodsExtagVoList
.
add
(
GoblinGoodsExtagVo
.
getNew
().
copy
(
r
).
setSort
(
i
));
}
}
}
vo
.
setExtagVoList
(
goodsExtagVoList
);
}
}
}
// 服务保障处理
vo
.
setServiceSupportVoList
(
goblinMongoUtils
.
getServiceSupportVo
(
storeMgtGoodsAddParam
.
getSsidList
()));
goblinMongoUtils
.
setGoodsInfoVo
(
vo
);
goblinMongoUtils
.
setGoodsSkuInfoVos
(
goodsSkuInfoVoList
);
}
...
...
liquidnet-bus-service/liquidnet-service-goblin/liquidnet-service-goblin-impl/src/main/java/com/liquidnet/service/goblin/util/GoblinMongoUtils.java
View file @
8b7542d5
...
...
@@ -57,8 +57,19 @@ public class GoblinMongoUtils {
public
List
<
GoblinServiceSupportVo
>
getServiceSupportVo
(
List
<
String
>
ssids
)
{
if
(
CollectionUtils
.
isEmpty
(
ssids
))
return
ObjectUtil
.
getGoblinServiceSupportVoArrayList
();
return
mongoTemplate
.
find
(
Query
.
query
(
Criteria
.
where
(
"ssid"
).
in
(
ssids
)),
GoblinServiceSupportVo
.
class
,
GoblinServiceSupportVo
.
class
.
getSimpleName
());
}
return
null
;
public
List
<
GoblinServiceSupportVo
>
getMgtServiceSupportVo
()
{
List
<
GoblinServiceSupportVo
>
serviceSupportVoList
=
mongoTemplate
.
findAll
(
GoblinServiceSupportVo
.
class
,
GoblinServiceSupportVo
.
class
.
getSimpleName
());
if
(
CollectionUtils
.
isEmpty
(
serviceSupportVoList
))
{
serviceSupportVoList
.
add
(
GoblinServiceSupportVo
.
getNew
().
setName
(
"正品保证"
).
setDesc
(
"商品为正版行货"
).
setSsid
(
"101"
));
serviceSupportVoList
.
add
(
GoblinServiceSupportVo
.
getNew
().
setName
(
"极速发货"
).
setDesc
(
"24小时内发送货物"
).
setSsid
(
"102"
));
serviceSupportVoList
.
add
(
GoblinServiceSupportVo
.
getNew
().
setName
(
"无忧退货"
).
setDesc
(
"支持7天无理由退款"
).
setSsid
(
"103"
));
mongoTemplate
.
insert
(
serviceSupportVoList
,
GoblinServiceSupportVo
.
class
.
getSimpleName
());
}
return
serviceSupportVoList
;
}
/* ---------------------------------------- 店铺数据源 ---------------------------------------- */
...
...
liquidnet-bus-service/liquidnet-service-goblin/liquidnet-service-goblin-impl/src/main/java/com/liquidnet/service/goblin/util/GoblinRedisUtils.java
View file @
8b7542d5
...
...
@@ -89,7 +89,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
);
// redisUtil.set(rk, vo);// TODO: 2022/1/4 zhanggb:暂不设置
}
return
vo
;
}
...
...
@@ -119,7 +119,7 @@ public class GoblinRedisUtils {
String
rk
=
GoblinRedisConst
.
BASIC_GOODS
.
concat
(
spuId
);
GoblinGoodsInfoVo
vo
=
(
GoblinGoodsInfoVo
)
redisUtil
.
get
(
rk
);
if
(
null
==
vo
&&
null
!=
(
vo
=
goblinMongoUtils
.
getGoodsInfoVo
(
spuId
)))
{
redisUtil
.
set
(
rk
,
vo
);
// redisUtil.set(rk, vo);// TODO: 2022/1/4 zhanggb:暂不设置
}
return
vo
;
}
...
...
@@ -128,7 +128,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
);
// redisUtil.set(rk, vo);// TODO: 2022/1/4 zhanggb:暂不设置
}
return
vo
;
}
...
...
@@ -151,7 +151,7 @@ public class GoblinRedisUtils {
String
rk
=
GoblinRedisConst
.
BASIC_GOODS_SKU
.
concat
(
skuId
);
GoblinGoodsSkuInfoVo
vo
=
(
GoblinGoodsSkuInfoVo
)
redisUtil
.
get
(
rk
);
if
(
null
==
vo
&&
null
!=
(
vo
=
goblinMongoUtils
.
getGoodsSkuInfoVo
(
skuId
)))
{
redisUtil
.
set
(
rk
,
vo
);
// redisUtil.set(rk, vo);// TODO: 2022/1/4 zhanggb:暂不设置
}
return
vo
;
}
...
...
@@ -160,7 +160,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
);
// redisUtil.set(rk, vo);// TODO: 2022/1/4 zhanggb:暂不设置
}
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