记得上下班打卡 | 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
d93e5d60
Commit
d93e5d60
authored
Jan 14, 2022
by
zhengfuxin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改魔方
parent
760c081a
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
5 deletions
+11
-5
GoblinFrontController.java
...dnet/service/goblin/controller/GoblinFrontController.java
+2
-5
GoblinFrontServiceImpl.java
...t/service/goblin/service/impl/GoblinFrontServiceImpl.java
+9
-0
No files found.
liquidnet-bus-service/liquidnet-service-goblin/liquidnet-service-goblin-impl/src/main/java/com/liquidnet/service/goblin/controller/GoblinFrontController.java
View file @
d93e5d60
...
@@ -2,10 +2,7 @@ package com.liquidnet.service.goblin.controller;
...
@@ -2,10 +2,7 @@ package com.liquidnet.service.goblin.controller;
import
com.liquidnet.common.cache.redis.util.RedisUtil
;
import
com.liquidnet.common.cache.redis.util.RedisUtil
;
import
com.liquidnet.service.base.ResponseDto
;
import
com.liquidnet.service.base.ResponseDto
;
import
com.liquidnet.service.goblin.dto.vo.GoblinFrontBannerVo
;
import
com.liquidnet.service.goblin.dto.vo.*
;
import
com.liquidnet.service.goblin.dto.vo.GoblinFrontGoodDetailVo
;
import
com.liquidnet.service.goblin.dto.vo.GoblinFrontSeckillVo
;
import
com.liquidnet.service.goblin.dto.vo.GoblinFrontSelectGoodVo
;
import
com.liquidnet.service.goblin.entity.GoblinFrontHotWord
;
import
com.liquidnet.service.goblin.entity.GoblinFrontHotWord
;
import
com.liquidnet.service.goblin.entity.GoblinFrontNavigation
;
import
com.liquidnet.service.goblin.entity.GoblinFrontNavigation
;
import
com.liquidnet.service.goblin.service.impl.GoblinFrontServiceImpl
;
import
com.liquidnet.service.goblin.service.impl.GoblinFrontServiceImpl
;
...
@@ -83,7 +80,7 @@ public class GoblinFrontController {
...
@@ -83,7 +80,7 @@ public class GoblinFrontController {
}
}
@GetMapping
(
"getCube"
)
@GetMapping
(
"getCube"
)
@ApiOperation
(
"获取魔方"
)
@ApiOperation
(
"获取魔方"
)
public
ResponseDto
getCube
()
throws
ParseException
{
public
ResponseDto
<
GoblinFrontCubeVo
>
getCube
()
throws
ParseException
{
return
ResponseDto
.
success
(
goblinFrontService
.
getCube
());
return
ResponseDto
.
success
(
goblinFrontService
.
getCube
());
}
}
@GetMapping
(
"getCategory"
)
@GetMapping
(
"getCategory"
)
...
...
liquidnet-bus-service/liquidnet-service-goblin/liquidnet-service-goblin-impl/src/main/java/com/liquidnet/service/goblin/service/impl/GoblinFrontServiceImpl.java
View file @
d93e5d60
...
@@ -306,6 +306,15 @@ public class GoblinFrontServiceImpl implements GoblinFrontService {
...
@@ -306,6 +306,15 @@ public class GoblinFrontServiceImpl implements GoblinFrontService {
}
}
List
<
GoblinGoodsInfoVo
>
list
=
mongoTemplate
.
find
(
query
,
GoblinGoodsInfoVo
.
class
,
GoblinGoodsInfoVo
.
class
.
getSimpleName
());
List
<
GoblinGoodsInfoVo
>
list
=
mongoTemplate
.
find
(
query
,
GoblinGoodsInfoVo
.
class
,
GoblinGoodsInfoVo
.
class
.
getSimpleName
());
if
(
list
.
size
()>
0
&&
isRe
){
if
(
list
.
size
()>
0
&&
isRe
){
//找到 销量
for
(
GoblinGoodsInfoVo
goblinGoodsInfoVo:
list
){
Integer
counts
=
goblinRedisUtils
.
getSpuSaleCount
(
goblinGoodsInfoVo
.
getSpuId
());
if
(
counts
==
null
){
goblinGoodsInfoVo
.
setCount
(
0
);
}
else
{
goblinGoodsInfoVo
.
setCount
(
counts
);
}
}
Collections
.
sort
(
list
,
new
Comparator
<
GoblinGoodsInfoVo
>()
{
Collections
.
sort
(
list
,
new
Comparator
<
GoblinGoodsInfoVo
>()
{
public
int
compare
(
GoblinGoodsInfoVo
arg0
,
GoblinGoodsInfoVo
arg1
)
{
public
int
compare
(
GoblinGoodsInfoVo
arg0
,
GoblinGoodsInfoVo
arg1
)
{
return
-(
arg0
.
getCount
().
compareTo
(
arg1
.
getCount
()));
return
-(
arg0
.
getCount
().
compareTo
(
arg1
.
getCount
()));
...
...
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