Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Q
qk_backend
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
quanku
qk_backend
Commits
42c2e40c
Commit
42c2e40c
authored
Apr 11, 2024
by
shiyu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
推荐列表详情2
parent
4c302b0d
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
27 additions
and
26 deletions
+27
-26
ch-wx-api/src/main/java/com/wwdz/ch/wx/impl/distribution/SupplierItemServiceImpl.java
...wwdz/ch/wx/impl/distribution/SupplierItemServiceImpl.java
+27
-26
No files found.
ch-wx-api/src/main/java/com/wwdz/ch/wx/impl/distribution/SupplierItemServiceImpl.java
View file @
42c2e40c
...
@@ -712,34 +712,35 @@ public class SupplierItemServiceImpl implements SupplierItemService {
...
@@ -712,34 +712,35 @@ public class SupplierItemServiceImpl implements SupplierItemService {
//查询商品所属标签
//查询商品所属标签
List
<
CollectionItemsRelation
>
collectionItemsRelations
=
collectionItemsRelationDao
.
findByItemId
(
itemId
);
List
<
CollectionItemsRelation
>
collectionItemsRelations
=
collectionItemsRelationDao
.
findByItemId
(
itemId
);
List
<
Long
>
collectBookIds
=
collectionItemsRelations
.
stream
().
map
(
CollectionItemsRelation:
:
getCollectionBookId
).
collect
(
Collectors
.
toList
());
List
<
Long
>
collectBookIds
=
collectionItemsRelations
.
stream
().
map
(
CollectionItemsRelation:
:
getCollectionBookId
).
collect
(
Collectors
.
toList
());
CollectionBookRequestDto
collectionBookRequestDto
=
new
CollectionBookRequestDto
();
//商品要有所属的分组才进行排序操作,并返回
collectionBookRequestDto
.
setIds
(
collectBookIds
);
if
(!
CollectionUtils
.
isEmpty
(
collectBookIds
))
{
List
<
CollectionBook
>
collectionBookList
=
collectionBookDao
.
find
(
collectionBookRequestDto
);
CollectionBookRequestDto
collectionBookRequestDto
=
new
CollectionBookRequestDto
();
collectionBookRequestDto
.
setIds
(
collectBookIds
);
List
<
CollectionBook
>
collectionBookList
=
collectionBookDao
.
find
(
collectionBookRequestDto
);
//用户自定义排序
//用户自定义排序
//查询标签排序记录
//查询标签排序记录
List
<
Map
<
String
,
Object
>>
list
=
new
ArrayList
<>();
List
<
Map
<
String
,
Object
>>
list
=
new
ArrayList
<>();
CollectionBookSort
collectionBookSort
=
collectionBookSortDao
.
find
(
userId
);
CollectionBookSort
collectionBookSort
=
collectionBookSortDao
.
find
(
userId
);
if
(
collectionBookSort
==
null
)
{
if
(
collectionBookSort
==
null
)
{
supplierItemVo
.
setBookIdList
(
collectionBookList
);
supplierItemVo
.
setBookIdList
(
collectionBookList
);
}
else
{
}
else
{
String
sortInfo
=
collectionBookSort
.
getSortInfo
();
String
sortInfo
=
collectionBookSort
.
getSortInfo
();
Map
<
Long
,
String
>
bookMap
=
collectionBookList
.
stream
().
collect
(
Collectors
.
toMap
(
CollectionBook:
:
getId
,
CollectionBook:
:
getTitle
,
(
k1
,
k2
)
->
k1
));
Map
<
Long
,
String
>
bookMap
=
collectionBookList
.
stream
().
collect
(
Collectors
.
toMap
(
CollectionBook:
:
getId
,
CollectionBook:
:
getTitle
,
(
k1
,
k2
)
->
k1
));
List
<
String
>
sortList
=
Arrays
.
asList
(
sortInfo
.
split
(
","
));
List
<
String
>
sortList
=
Arrays
.
asList
(
sortInfo
.
split
(
","
));
for
(
String
sort
:
sortList
)
{
for
(
String
sort
:
sortList
)
{
Map
<
String
,
Object
>
map
=
new
HashMap
<>();
Map
<
String
,
Object
>
map
=
new
HashMap
<>();
long
sortNum
=
Long
.
valueOf
(
sort
);
long
sortNum
=
Long
.
valueOf
(
sort
);
if
(
sortNum
==
0
||
CollectionBookConstants
.
DefaultBookEnum
.
getNameByCode
(
sortNum
)
!=
null
)
{
if
(
sortNum
==
0
||
CollectionBookConstants
.
DefaultBookEnum
.
getNameByCode
(
sortNum
)
!=
null
)
{
continue
;
continue
;
}
}
if
(
bookMap
.
get
(
sortNum
)
!=
null
)
{
if
(
bookMap
.
get
(
sortNum
)
!=
null
)
{
map
.
put
(
"id"
,
sortNum
);
map
.
put
(
"id"
,
sortNum
);
map
.
put
(
"title"
,
bookMap
.
get
(
sortNum
));
map
.
put
(
"title"
,
bookMap
.
get
(
sortNum
));
list
.
add
(
map
);
list
.
add
(
map
);
}
}
}
supplierItemVo
.
setBookIdList
(
list
);
}
}
supplierItemVo
.
setBookIdList
(
list
);
}
}
return
Result
.
success
(
supplierItemVo
);
return
Result
.
success
(
supplierItemVo
);
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
...
...
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