记得上下班打卡 | 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
f5841133
Commit
f5841133
authored
Jan 21, 2022
by
zhengfuxin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改精选商品,修改bug
parent
b6e6f97f
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
12 additions
and
1 deletion
+12
-1
GoblinRedisConst.java
...m/liquidnet/service/goblin/constant/GoblinRedisConst.java
+1
-0
GoblinFrontSelectGoodsServiceImpl.java
...oblin/service/impl/GoblinFrontSelectGoodsServiceImpl.java
+3
-0
GoblinFrontServiceImpl.java
...t/service/goblin/service/impl/GoblinFrontServiceImpl.java
+8
-1
No files found.
liquidnet-bus-api/liquidnet-service-goblin-api/src/main/java/com/liquidnet/service/goblin/constant/GoblinRedisConst.java
View file @
f5841133
...
...
@@ -77,6 +77,7 @@ public class GoblinRedisConst {
public
static
final
String
FRONT_SECKILL
=
PREFIX
.
concat
(
"front_seckill"
);
//前端 秒杀列表
public
static
final
String
SELECT_GOODS
=
PREFIX
.
concat
(
"select_goods"
);
//配置的精选商品
public
static
final
String
SELECT_GOODS_PAGE1
=
PREFIX
.
concat
(
"select_goods_page1"
);
//精选商品 第一页
public
static
final
String
SELECT_GOODS_SORT
=
PREFIX
.
concat
(
"select_goods_sort"
);
//精选商品 第一页
public
static
final
String
SELECT_GOODS_SPUIDS
=
PREFIX
.
concat
(
"select_goods_SPUIDS"
);
//精选商品 spuids
public
static
final
String
MOUDLE_INDEX
=
PREFIX
.
concat
(
"moudle_index"
);
//moudle_index 组件排序
public
static
final
String
COMPLIATIONS
=
PREFIX
.
concat
(
"goblinFrontCompilations"
);
// 合集
...
...
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 @
f5841133
...
...
@@ -159,10 +159,13 @@ public class GoblinFrontSelectGoodsServiceImpl extends ServiceImpl<GoblinFrontSe
//删除 mogndob
Query
query
=
Query
.
query
(
Criteria
.
where
(
"delTag"
).
is
(
"0"
));
mongoTemplate
.
findAllAndRemove
(
query
,
GoblinFrontSelectGoods
.
class
);
int
sortType
=
0
;
if
(
list
.
size
()>
0
){
for
(
GoblinFrontSelectGoods
goblinFrontSelectGoods:
list
){
sortType
=
goblinFrontSelectGoods
.
getOrderType
();
mongoTemplate
.
save
(
goblinFrontSelectGoods
,
GoblinFrontSelectGoods
.
class
.
getSimpleName
());
}
redisGoblinUtil
.
set
(
GoblinRedisConst
.
SELECT_GOODS_SORT
,
sortType
);
redisGoblinUtil
.
set
(
GoblinRedisConst
.
SELECT_GOODS
,
list
);
redisGoblinUtil
.
del
(
GoblinRedisConst
.
SELECT_GOODS_SPUIDS
);
redisGoblinUtil
.
del
(
GoblinRedisConst
.
SELECT_GOODS_PAGE1
);
...
...
liquidnet-bus-service/liquidnet-service-goblin/liquidnet-service-goblin-impl/src/main/java/com/liquidnet/service/goblin/service/impl/GoblinFrontServiceImpl.java
View file @
f5841133
...
...
@@ -57,7 +57,10 @@ public class GoblinFrontServiceImpl implements GoblinFrontService {
if
(
null
!=
goblinFrontBanner
.
getEndTime
()){
if
(
nowTime
.
isAfter
(
goblinFrontBanner
.
getEndTime
())){
}
else
{
goblinFrontBannerArrayList
.
add
(
goblinFrontBanner
);
if
(
nowTime
.
isBefore
(
goblinFrontBanner
.
getStartTime
())){
}
else
{
goblinFrontBannerArrayList
.
add
(
goblinFrontBanner
);
}
}
}
}
...
...
@@ -534,8 +537,12 @@ public class GoblinFrontServiceImpl implements GoblinFrontService {
query
.
addCriteria
(
Criteria
.
where
(
"spuId"
).
nin
(
spuids
.
split
(
","
)));
}
query
.
addCriteria
(
Criteria
.
where
(
"delFlg"
).
is
(
"0"
).
and
(
"shelvesStatus"
).
is
(
"3"
));
//redis里面获取排序规则 1、上架时间2、销量3、价格高到低4、价格低到高
int
sortType
=
0
;
if
(
redisUtil
.
hasKey
(
GoblinRedisConst
.
SELECT_GOODS_SORT
)){
sortType
=
(
int
)
redisUtil
.
get
(
GoblinRedisConst
.
SELECT_GOODS_SORT
);
}
Sort
sortName
=
null
;
if
(
sortType
==
1
){
sortName
=
Sort
.
by
(
Sort
.
Direction
.
DESC
,
"shelvesAt"
);
...
...
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