记得上下班打卡 | 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
577eff87
Commit
577eff87
authored
Jan 10, 2022
by
zhengfuxin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改bug
parent
9f2204b2
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
71 additions
and
25 deletions
+71
-25
GoblinRedisConst.java
...m/liquidnet/service/goblin/constant/GoblinRedisConst.java
+3
-1
GoblinFrontBannerController.java
...ntroller/zhengzai/goblin/GoblinFrontBannerController.java
+10
-5
GoblinFrontBannerServiceImpl.java
...zai/goblin/service/impl/GoblinFrontBannerServiceImpl.java
+30
-2
GoblinFrontCubeServiceImpl.java
...ngzai/goblin/service/impl/GoblinFrontCubeServiceImpl.java
+27
-4
GoblinFrontHotWordServiceImpl.java
...ai/goblin/service/impl/GoblinFrontHotWordServiceImpl.java
+0
-12
GoblinFrontSelectGoodsServiceImpl.java
...oblin/service/impl/GoblinFrontSelectGoodsServiceImpl.java
+1
-1
No files found.
liquidnet-bus-api/liquidnet-service-goblin-api/src/main/java/com/liquidnet/service/goblin/constant/GoblinRedisConst.java
View file @
577eff87
...
@@ -28,7 +28,8 @@ public class GoblinRedisConst {
...
@@ -28,7 +28,8 @@ public class GoblinRedisConst {
/* ----------------------------------------------------------------- */
/* ----------------------------------------------------------------- */
public
static
final
String
FRONT_BANNER
=
PREFIX
.
concat
(
"front_banner"
);
//前端banner
public
static
final
String
FRONT_TOP_BANNER
=
PREFIX
.
concat
(
"front_top_banner"
);
//前端顶部banner
public
static
final
String
FRONT_MIDDLE_BANNER
=
PREFIX
.
concat
(
"front_top_banner"
);
//前端中部banner
public
static
final
String
FRONT_NAVIGATION
=
PREFIX
.
concat
(
"front_navigation"
);
//前端banner
public
static
final
String
FRONT_NAVIGATION
=
PREFIX
.
concat
(
"front_navigation"
);
//前端banner
public
static
final
String
FRONT_HOTWORD
=
PREFIX
.
concat
(
"front_hot_word"
);
//前端banner
public
static
final
String
FRONT_HOTWORD
=
PREFIX
.
concat
(
"front_hot_word"
);
//前端banner
public
static
final
String
FRONT_HOTWORD_INDEX
=
PREFIX
.
concat
(
"front_hot_word_index"
);
//前端banner index
public
static
final
String
FRONT_HOTWORD_INDEX
=
PREFIX
.
concat
(
"front_hot_word_index"
);
//前端banner index
...
@@ -37,6 +38,7 @@ public class GoblinRedisConst {
...
@@ -37,6 +38,7 @@ public class GoblinRedisConst {
public
static
final
String
SELECT_GOODS
=
PREFIX
.
concat
(
"select_goods"
);
//精选商品
public
static
final
String
SELECT_GOODS
=
PREFIX
.
concat
(
"select_goods"
);
//精选商品
public
static
final
String
MOUDLE_INDEX
=
PREFIX
.
concat
(
"moudle_index"
);
//moudle_index 组件排序
public
static
final
String
MOUDLE_INDEX
=
PREFIX
.
concat
(
"moudle_index"
);
//moudle_index 组件排序
public
static
final
String
COMPLIATIONS
=
PREFIX
.
concat
(
"goblinFrontCompilations"
);
// 合集
public
static
final
String
COMPLIATIONS
=
PREFIX
.
concat
(
"goblinFrontCompilations"
);
// 合集
public
static
final
String
FRONT_GOBLINFRONTCUBE
=
PREFIX
.
concat
(
"goblinFrontCube"
);
// 合集
/* ----------------------------------------------------------------- */
/* ----------------------------------------------------------------- */
...
...
liquidnet-bus-client/liquidnet-client-admin/liquidnet-client-admin-web/src/main/java/com/liquidnet/client/admin/web/controller/zhengzai/goblin/GoblinFrontBannerController.java
View file @
577eff87
...
@@ -43,6 +43,8 @@ public class GoblinFrontBannerController extends BaseController {
...
@@ -43,6 +43,8 @@ public class GoblinFrontBannerController extends BaseController {
GoblinFrontMoudleIndexServiceImpl
goblinFrontMoudleIndexService
;
GoblinFrontMoudleIndexServiceImpl
goblinFrontMoudleIndexService
;
@Autowired
@Autowired
GoblinFrontCompilationsServiceImpl
goblinFrontCompilationsService
;
GoblinFrontCompilationsServiceImpl
goblinFrontCompilationsService
;
@Autowired
GoblinFrontCubeServiceImpl
goblinFrontCubeService
;
/**
/**
* @author zhangfuxin
* @author zhangfuxin
...
@@ -130,17 +132,20 @@ public class GoblinFrontBannerController extends BaseController {
...
@@ -130,17 +132,20 @@ public class GoblinFrontBannerController extends BaseController {
boolean
bannerResult
=
goblinFrontBannerService
.
online
();
boolean
bannerResult
=
goblinFrontBannerService
.
online
();
logger
.
info
(
"bannerResult,{}"
,
bannerResult
);
logger
.
info
(
"bannerResult,{}"
,
bannerResult
);
boolean
hotWordResult
=
goblinFrontHotWordService
.
online
();
boolean
hotWordResult
=
goblinFrontHotWordService
.
online
();
logger
.
info
(
"
hotWordResult
,{}"
,
hotWordResult
);
logger
.
info
(
"
热词
,{}"
,
hotWordResult
);
boolean
navigationResult
=
goblinFrontNavigationService
.
online
();
boolean
navigationResult
=
goblinFrontNavigationService
.
online
();
logger
.
info
(
"
navigationResult
,{}"
,
navigationResult
);
logger
.
info
(
"
导航栏
,{}"
,
navigationResult
);
boolean
secillResult
=
goblinFrontSeckillService
.
online
();
boolean
secillResult
=
goblinFrontSeckillService
.
online
();
logger
.
info
(
"
secillResult
,{}"
,
secillResult
);
logger
.
info
(
"
限时秒杀
,{}"
,
secillResult
);
boolean
selectGoods
=
goblinFrontSelectGoodsService
.
online
();
boolean
selectGoods
=
goblinFrontSelectGoodsService
.
online
();
logger
.
info
(
"精选商品{}"
,
selectGoods
);
logger
.
info
(
"精选商品{}"
,
selectGoods
);
boolean
moudleIndexResult
=
goblinFrontMoudleIndexService
.
online
();
boolean
moudleIndexResult
=
goblinFrontMoudleIndexService
.
online
();
logger
.
info
(
"组件排序{}"
,
moudleIndexResult
);
logger
.
info
(
"组件排序{}"
,
moudleIndexResult
);
boolean
hejiReult
=
goblinFrontCompilationsService
.
online
();
//魔方
logger
.
info
(
"合集{}"
,
hejiReult
);
boolean
cubeResult
=
goblinFrontCubeService
.
online
();
logger
.
info
(
"魔方{}"
,
cubeResult
);
/* boolean hejiReult=goblinFrontCompilationsService.online();
logger.info("合集{}",hejiReult);*/
if
(
bannerResult
&&
hotWordResult
&&
navigationResult
)
{
if
(
bannerResult
&&
hotWordResult
&&
navigationResult
)
{
return
success
(
"操作成功"
);
return
success
(
"操作成功"
);
}
else
{
}
else
{
...
...
liquidnet-bus-client/liquidnet-client-admin/liquidnet-client-admin-zhengzai/src/main/java/com/liquidnet/client/admin/zhengzai/goblin/service/impl/GoblinFrontBannerServiceImpl.java
View file @
577eff87
...
@@ -143,9 +143,12 @@ public class GoblinFrontBannerServiceImpl extends ServiceImpl<GoblinFrontBannerM
...
@@ -143,9 +143,12 @@ public class GoblinFrontBannerServiceImpl extends ServiceImpl<GoblinFrontBannerM
return
list1
;
return
list1
;
}
}
public
boolean
online
(){
public
boolean
online
(){
//首页顶部
//banner
//banner
LambdaQueryWrapper
<
GoblinFrontBanner
>
queryWrapper
=
Wrappers
.
lambdaQuery
(
GoblinFrontBanner
.
class
);
LambdaQueryWrapper
<
GoblinFrontBanner
>
queryWrapper
=
Wrappers
.
lambdaQuery
(
GoblinFrontBanner
.
class
);
queryWrapper
.
ne
(
GoblinFrontBanner:
:
getDelTag
,
1
);
queryWrapper
.
ne
(
GoblinFrontBanner:
:
getDelTag
,
1
);
//bannerType
queryWrapper
.
eq
(
GoblinFrontBanner:
:
getBannerType
,
1
);
queryWrapper
.
orderByDesc
(
GoblinFrontBanner:
:
getIndexs
);
queryWrapper
.
orderByDesc
(
GoblinFrontBanner:
:
getIndexs
);
List
<
GoblinFrontBanner
>
list
=
goblinFrontBannerMapper
.
selectList
(
queryWrapper
);
List
<
GoblinFrontBanner
>
list
=
goblinFrontBannerMapper
.
selectList
(
queryWrapper
);
//mongodb
//mongodb
...
@@ -162,10 +165,35 @@ public class GoblinFrontBannerServiceImpl extends ServiceImpl<GoblinFrontBannerM
...
@@ -162,10 +165,35 @@ public class GoblinFrontBannerServiceImpl extends ServiceImpl<GoblinFrontBannerM
}
}
}
}
//redis
//redis
redisDataSourceUtil
.
getRedisGoblinUtil
().
del
(
GoblinRedisConst
.
FRONT_BANNER
);
redisDataSourceUtil
.
getRedisGoblinUtil
().
set
(
GoblinRedisConst
.
FRONT_TOP_BANNER
,
list
);
redisDataSourceUtil
.
getRedisGoblinUtil
().
set
(
GoblinRedisConst
.
FRONT_BANNER
,
list
);
//中部
return
true
;
return
true
;
}
}
public
void
middle
(){
LambdaQueryWrapper
<
GoblinFrontBanner
>
queryWrapper
=
Wrappers
.
lambdaQuery
(
GoblinFrontBanner
.
class
);
queryWrapper
.
ne
(
GoblinFrontBanner:
:
getDelTag
,
1
);
//bannerType
queryWrapper
.
eq
(
GoblinFrontBanner:
:
getBannerType
,
2
);
queryWrapper
.
orderByDesc
(
GoblinFrontBanner:
:
getIndexs
);
List
<
GoblinFrontBanner
>
list
=
goblinFrontBannerMapper
.
selectList
(
queryWrapper
);
//mongodb
for
(
GoblinFrontBanner
goblinFrontBanner:
list
){
GoblinFrontBanner
goblinFrontBanner1
=
mongoTemplate
.
findOne
(
Query
.
query
(
Criteria
.
where
(
"bannerId"
).
is
(
goblinFrontBanner
.
getBannerId
())),
GoblinFrontBanner
.
class
,
GoblinFrontBanner
.
class
.
getSimpleName
());
if
(
null
==
goblinFrontBanner1
){
mongoTemplate
.
save
(
goblinFrontBanner
,
GoblinFrontBanner
.
class
.
getSimpleName
());
}
else
{
BasicDBObject
orderObject
=
new
BasicDBObject
(
"$set"
,
JSON
.
parse
(
JsonUtils
.
toJson
(
goblinFrontBanner
)));
mongoTemplate
.
getCollection
(
GoblinFrontBanner
.
class
.
getSimpleName
()).
updateOne
(
Query
.
query
(
Criteria
.
where
(
"bannerId"
).
is
(
goblinFrontBanner
.
getBannerId
())).
getQueryObject
(),
orderObject
);
}
}
//redis
redisDataSourceUtil
.
getRedisGoblinUtil
().
set
(
GoblinRedisConst
.
FRONT_MIDDLE_BANNER
,
list
);
}
...
...
liquidnet-bus-client/liquidnet-client-admin/liquidnet-client-admin-zhengzai/src/main/java/com/liquidnet/client/admin/zhengzai/goblin/service/impl/GoblinFrontCubeServiceImpl.java
View file @
577eff87
package
com
.
liquidnet
.
client
.
admin
.
zhengzai
.
goblin
.
service
.
impl
;
package
com
.
liquidnet
.
client
.
admin
.
zhengzai
.
goblin
.
service
.
impl
;
import
com.alibaba.fastjson.JSON
;
import
com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper
;
import
com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper
;
import
com.baomidou.mybatisplus.core.toolkit.Wrappers
;
import
com.baomidou.mybatisplus.core.toolkit.Wrappers
;
import
com.baomidou.mybatisplus.extension.service.impl.ServiceImpl
;
import
com.baomidou.mybatisplus.extension.service.impl.ServiceImpl
;
import
com.liquidnet.client.admin.zhengzai.goblin.service.IGoblinFrontCubeService
;
import
com.liquidnet.client.admin.zhengzai.goblin.service.IGoblinFrontCubeService
;
import
com.liquidnet.common.cache.redis.util.RedisDataSourceUtil
;
import
com.liquidnet.common.cache.redis.util.RedisDataSourceUtil
;
import
com.liquidnet.commons.lang.util.IDGenerator
;
import
com.liquidnet.commons.lang.util.IDGenerator
;
import
com.liquidnet.commons.lang.util.JsonUtils
;
import
com.liquidnet.service.goblin.constant.GoblinRedisConst
;
import
com.liquidnet.service.goblin.entity.GoblinFrontCube
;
import
com.liquidnet.service.goblin.entity.GoblinFrontCube
;
import
com.liquidnet.service.goblin.entity.GoblinGoods
;
import
com.liquidnet.service.goblin.entity.GoblinGoods
;
import
com.liquidnet.service.goblin.mapper.GoblinFrontCubeMapper
;
import
com.liquidnet.service.goblin.mapper.GoblinFrontCubeMapper
;
import
com.liquidnet.service.goblin.mapper.GoblinGoodsMapper
;
import
com.liquidnet.service.goblin.mapper.GoblinGoodsMapper
;
import
com.liquidnet.service.goblin.param.GoblinFrontCubeParam
;
import
com.liquidnet.service.goblin.param.GoblinFrontCubeParam
;
import
com.mongodb.BasicDBObject
;
import
org.springframework.beans.BeanUtils
;
import
org.springframework.beans.BeanUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.data.mongodb.core.MongoTemplate
;
import
org.springframework.data.mongodb.core.MongoTemplate
;
import
org.springframework.data.mongodb.core.query.Criteria
;
import
org.springframework.data.mongodb.core.query.Query
;
import
org.springframework.stereotype.Service
;
import
org.springframework.stereotype.Service
;
import
java.time.LocalDateTime
;
import
java.time.LocalDateTime
;
...
@@ -86,13 +92,30 @@ public class GoblinFrontCubeServiceImpl extends ServiceImpl<GoblinFrontCubeMappe
...
@@ -86,13 +92,30 @@ public class GoblinFrontCubeServiceImpl extends ServiceImpl<GoblinFrontCubeMappe
goblinFrontCubeParam
.
setGoblinGoods
(
goodsList
.
get
(
0
));
goblinFrontCubeParam
.
setGoblinGoods
(
goodsList
.
get
(
0
));
list1
.
add
(
goblinFrontCubeParam
);
list1
.
add
(
goblinFrontCubeParam
);
}
}
}
}
return
list1
;
return
list1
;
}
}
public
boolean
online
(){
LambdaQueryWrapper
<
GoblinFrontCube
>
queryWrapper
=
Wrappers
.
lambdaQuery
(
GoblinFrontCube
.
class
);
queryWrapper
.
ne
(
GoblinFrontCube:
:
getDelTag
,
1
);
List
<
GoblinFrontCube
>
list
=
goblinFrontCubeMapper
.
selectList
(
queryWrapper
);
//mongodb
for
(
GoblinFrontCube
goblinFrontCube:
list
){
GoblinFrontCube
goblinFrontCube1
=
mongoTemplate
.
findOne
(
Query
.
query
(
Criteria
.
where
(
"cubeId"
).
is
(
goblinFrontCube
.
getCubeId
())),
GoblinFrontCube
.
class
,
GoblinFrontCube
.
class
.
getSimpleName
());
if
(
null
==
goblinFrontCube1
){
mongoTemplate
.
save
(
goblinFrontCube
,
GoblinFrontCube
.
class
.
getSimpleName
());
}
else
{
BasicDBObject
orderObject
=
new
BasicDBObject
(
"$set"
,
JSON
.
parse
(
JsonUtils
.
toJson
(
goblinFrontCube
)));
mongoTemplate
.
getCollection
(
GoblinFrontCube
.
class
.
getSimpleName
()).
updateOne
(
Query
.
query
(
Criteria
.
where
(
"cubeId"
).
is
(
goblinFrontCube
.
getCubeId
())).
getQueryObject
(),
orderObject
);
}
}
//redis
redisDataSourceUtil
.
getRedisGoblinUtil
().
set
(
GoblinRedisConst
.
FRONT_GOBLINFRONTCUBE
,
list
);
return
true
;
}
}
}
liquidnet-bus-client/liquidnet-client-admin/liquidnet-client-admin-zhengzai/src/main/java/com/liquidnet/client/admin/zhengzai/goblin/service/impl/GoblinFrontHotWordServiceImpl.java
View file @
577eff87
...
@@ -160,18 +160,6 @@ public class GoblinFrontHotWordServiceImpl extends ServiceImpl<GoblinFrontHotWor
...
@@ -160,18 +160,6 @@ public class GoblinFrontHotWordServiceImpl extends ServiceImpl<GoblinFrontHotWor
}
}
}
}
/* GoblinFrontHotWord goblinFrontHotWord=list.get(0);
if(null!=goblinFrontHotWord){
//redis
if(null!=goblinFrontHotWord.getChangeTime()&&goblinFrontHotWord.getChangeTime()>0){
redisDataSourceUtil.getRedisGoblinUtil().set(GoblinRedisConst.FRONT_HOTWORD,list,goblinFrontHotWord.getChangeTime());
redisDataSourceUtil.getRedisGoblinUtil().set(GoblinRedisConst.FRONT_HOTWORD_INDEX,0);
}else{
redisDataSourceUtil.getRedisGoblinUtil().set(GoblinRedisConst.FRONT_HOTWORD,list);
redisDataSourceUtil.getRedisGoblinUtil().set(GoblinRedisConst.FRONT_HOTWORD_INDEX,0);
}
}*/
redisDataSourceUtil
.
getRedisGoblinUtil
().
set
(
GoblinRedisConst
.
FRONT_HOTWORD
,
list
);
redisDataSourceUtil
.
getRedisGoblinUtil
().
set
(
GoblinRedisConst
.
FRONT_HOTWORD
,
list
);
return
true
;
return
true
;
}
}
...
...
liquidnet-bus-client/liquidnet-client-admin/liquidnet-client-admin-zhengzai/src/main/java/com/liquidnet/client/admin/zhengzai/goblin/service/impl/GoblinFrontSelectGoodsServiceImpl.java
View file @
577eff87
...
@@ -124,7 +124,7 @@ public class GoblinFrontSelectGoodsServiceImpl extends ServiceImpl<GoblinFrontSe
...
@@ -124,7 +124,7 @@ public class GoblinFrontSelectGoodsServiceImpl extends ServiceImpl<GoblinFrontSe
GoblinFrontSelectGoods
goblinFrontSelectGoods
=
list
.
get
(
0
);
GoblinFrontSelectGoods
goblinFrontSelectGoods
=
list
.
get
(
0
);
GoblinFrontSelectGoods
goblinFrontSelectGoods1
=
mongoTemplate
.
findOne
(
Query
.
query
(
Criteria
.
where
(
"selectGoodsId"
).
is
(
goblinFrontSelectGoods
.
getSelectGoodsId
())),
GoblinFrontSelectGoods
.
class
,
GoblinFrontSelectGoods
.
class
.
getSimpleName
());
GoblinFrontSelectGoods
goblinFrontSelectGoods1
=
mongoTemplate
.
findOne
(
Query
.
query
(
Criteria
.
where
(
"selectGoodsId"
).
is
(
goblinFrontSelectGoods
.
getSelectGoodsId
())),
GoblinFrontSelectGoods
.
class
,
GoblinFrontSelectGoods
.
class
.
getSimpleName
());
if
(
null
==
goblinFrontSelectGoods1
){
if
(
null
==
goblinFrontSelectGoods1
){
mongoTemplate
.
save
(
goblinFrontSelectGoods
1
,
GoblinFrontSelectGoods
.
class
.
getSimpleName
());
mongoTemplate
.
save
(
goblinFrontSelectGoods
,
GoblinFrontSelectGoods
.
class
.
getSimpleName
());
}
else
{
}
else
{
BasicDBObject
orderObject
=
new
BasicDBObject
(
"$set"
,
JSON
.
parse
(
JsonUtils
.
toJson
(
goblinFrontSelectGoods
)));
BasicDBObject
orderObject
=
new
BasicDBObject
(
"$set"
,
JSON
.
parse
(
JsonUtils
.
toJson
(
goblinFrontSelectGoods
)));
mongoTemplate
.
getCollection
(
GoblinFrontSelectGoods
.
class
.
getSimpleName
()).
updateOne
(
mongoTemplate
.
getCollection
(
GoblinFrontSelectGoods
.
class
.
getSimpleName
()).
updateOne
(
...
...
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