记得上下班打卡 | 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
760c081a
Commit
760c081a
authored
Jan 14, 2022
by
zhengfuxin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改魔方bug,开发分类
parent
3affdc03
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
64 additions
and
7 deletions
+64
-7
GoblinFrontCategoryListVo.java
...dnet/service/goblin/dto/vo/GoblinFrontCategoryListVo.java
+38
-0
GoblinFrontCubeVo.java
...om/liquidnet/service/goblin/dto/vo/GoblinFrontCubeVo.java
+2
-2
GoblinFrontController.java
...dnet/service/goblin/controller/GoblinFrontController.java
+2
-2
GoblinFrontServiceImpl.java
...t/service/goblin/service/impl/GoblinFrontServiceImpl.java
+22
-3
No files found.
liquidnet-bus-api/liquidnet-service-goblin-api/src/main/java/com/liquidnet/service/goblin/dto/vo/GoblinFrontCategoryListVo.java
0 → 100644
View file @
760c081a
package
com
.
liquidnet
.
service
.
goblin
.
dto
.
vo
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
import
lombok.EqualsAndHashCode
;
import
java.io.Serializable
;
import
java.util.List
;
/**
* <p>
* 订单退单退款表
* </p>
*
* @author liquidnet
* @since 2021-12-27
*/
@Data
@EqualsAndHashCode
(
callSuper
=
false
)
public
class
GoblinFrontCategoryListVo
implements
Serializable
,
Cloneable
{
private
static
final
long
serialVersionUID
=
1L
;
@ApiModelProperty
(
value
=
"spu信息"
)
private
List
<
GoblinGoodsInfoVo
>
spuList
;
@ApiModelProperty
(
value
=
"数据条数"
)
private
long
count
;
private
static
final
GoblinFrontCategoryListVo
obj
=
new
GoblinFrontCategoryListVo
();
public
static
GoblinFrontCategoryListVo
getNew
()
{
try
{
return
(
GoblinFrontCategoryListVo
)
obj
.
clone
();
}
catch
(
CloneNotSupportedException
e
)
{
e
.
printStackTrace
();
}
return
new
GoblinFrontCategoryListVo
();
}
}
liquidnet-bus-api/liquidnet-service-goblin-api/src/main/java/com/liquidnet/service/goblin/dto/vo/GoblinFrontCubeVo.java
View file @
760c081a
...
...
@@ -4,13 +4,13 @@ import com.baomidou.mybatisplus.annotation.IdType;
import
com.baomidou.mybatisplus.annotation.TableId
;
import
com.fasterxml.jackson.annotation.JsonFormat
;
import
com.liquidnet.commons.lang.util.DateUtil
;
import
com.liquidnet.service.goblin.entity.GoblinGoods
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
import
lombok.EqualsAndHashCode
;
import
java.io.Serializable
;
import
java.time.LocalDateTime
;
import
java.util.List
;
/**
* <p>
...
...
@@ -85,7 +85,7 @@ public class GoblinFrontCubeVo implements Serializable {
* spu
*/
@ApiModelProperty
(
value
=
"spu信息"
)
private
GoblinGoods
goblinGoods
;
private
List
<
GoblinGoodsInfoVo
>
goblinGoodsInfoVoList
;
private
static
final
GoblinFrontCubeVo
obj
=
new
GoblinFrontCubeVo
();
...
...
liquidnet-bus-service/liquidnet-service-goblin/liquidnet-service-goblin-impl/src/main/java/com/liquidnet/service/goblin/controller/GoblinFrontController.java
View file @
760c081a
...
...
@@ -88,8 +88,8 @@ public class GoblinFrontController {
}
@GetMapping
(
"getCategory"
)
@ApiOperation
(
"获取分类"
)
public
ResponseDto
getCategory
(
String
type
,
String
categoryId
)
throws
ParseException
{
return
ResponseDto
.
success
(
goblinFrontService
.
getC
ube
(
));
public
ResponseDto
getCategory
(
@RequestParam
(
name
=
"type"
,
required
=
true
)
String
type
,
@RequestParam
(
name
=
"categoryId"
,
required
=
true
)
String
categoryId
,
@RequestParam
(
name
=
"page"
,
required
=
true
)
int
page
,
@RequestParam
(
name
=
"pageSize"
,
required
=
true
)
int
pageSize
)
throws
ParseException
{
return
ResponseDto
.
success
(
goblinFrontService
.
getC
ategoryList
(
type
,
categoryId
,
page
,
pageSize
));
}
...
...
liquidnet-bus-service/liquidnet-service-goblin/liquidnet-service-goblin-impl/src/main/java/com/liquidnet/service/goblin/service/impl/GoblinFrontServiceImpl.java
View file @
760c081a
...
...
@@ -255,9 +255,20 @@ public class GoblinFrontServiceImpl implements GoblinFrontService {
*/
public
GoblinFrontCubeVo
getCube
(){
GoblinFrontCubeVo
goblinFrontCubeVo
=
GoblinFrontCubeVo
.
getNew
();
ArrayList
<
GoblinGoodsInfoVo
>
goblinGoodsInfoVoArrayList
=
ObjectUtil
.
getGoblinGoodsInfoVos
();
List
<
GoblinFrontCube
>
list
=
(
List
<
GoblinFrontCube
>)
redisUtil
.
get
(
GoblinRedisConst
.
FRONT_GOBLINFRONTCUBE
);
if
(
list
.
size
()>
0
){
BeanUtils
.
copyProperties
(
list
.
get
(
0
),
goblinFrontCubeVo
);
for
(
String
spuid:
goblinFrontCubeVo
.
getSpuId
().
split
(
","
)){
GoblinGoodsInfoVo
goblinGoodsInfoVo
=
goblinRedisUtils
.
getGoodsInfoVo
(
spuid
);
if
(
null
!=
goblinGoodsInfoVo
){
GoblinGoodsInfoVo
goblinGoodsInfoVo1
=
GoblinGoodsInfoVo
.
getNew
();
BeanUtils
.
copyProperties
(
goblinGoodsInfoVo
,
goblinGoodsInfoVo1
);
goblinGoodsInfoVoArrayList
.
add
(
goblinGoodsInfoVo1
);
}
}
goblinFrontCubeVo
.
setGoblinGoodsInfoVoList
(
goblinGoodsInfoVoArrayList
);
}
return
goblinFrontCubeVo
;
}
...
...
@@ -266,10 +277,9 @@ public class GoblinFrontServiceImpl implements GoblinFrontService {
* 获取分类列表
* 1、销量优先、2、新品优先、3、价格降序、4、价格升序
*/
public
void
getCategoryList
(
String
type
,
String
categoryId
,
int
page
,
int
pageSize
){
public
GoblinFrontCategoryListVo
getCategoryList
(
String
type
,
String
categoryId
,
int
page
,
int
pageSize
){
//
Query
query
=
new
Query
();
//Criteria.where("cateSid").is(categoryId)
query
.
addCriteria
(
new
Criteria
().
andOperator
(
Criteria
.
where
(
"cateSid"
).
is
(
categoryId
),
Criteria
.
where
(
"cateTid"
).
is
(
categoryId
)
...
...
@@ -295,7 +305,16 @@ public class GoblinFrontServiceImpl implements GoblinFrontService {
query
.
with
(
pageable
);
}
List
<
GoblinGoodsInfoVo
>
list
=
mongoTemplate
.
find
(
query
,
GoblinGoodsInfoVo
.
class
,
GoblinGoodsInfoVo
.
class
.
getSimpleName
());
if
(
list
.
size
()>
0
&&
isRe
){
Collections
.
sort
(
list
,
new
Comparator
<
GoblinGoodsInfoVo
>()
{
public
int
compare
(
GoblinGoodsInfoVo
arg0
,
GoblinGoodsInfoVo
arg1
)
{
return
-(
arg0
.
getCount
().
compareTo
(
arg1
.
getCount
()));
}});
}
GoblinFrontCategoryListVo
goblinFrontCategoryListVo
=
GoblinFrontCategoryListVo
.
getNew
();
goblinFrontCategoryListVo
.
setCount
(
count
);
goblinFrontCategoryListVo
.
setSpuList
(
list
);
return
goblinFrontCategoryListVo
;
}
...
...
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