Skip to content
Toggle navigation
Toggle navigation
This project
Loading...
Sign in
legobackend
/
lego-manage
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Builds
Commits
Issue Boards
Files
Commits
Network
Compare
Branches
Tags
eb629319
authored
2025-06-28 17:50:16 +0800
by
chentao
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
增加课程排序
1 parent
d3c2e031
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
2 deletions
lego-core/src/main/java/com/lego/core/domin/Course.java
lego-core/src/main/java/com/lego/core/service/impl/CourseServiceImpl.java
lego-core/src/main/java/com/lego/core/domin/Course.java
View file @
eb62931
...
...
@@ -123,4 +123,9 @@ public class Course extends BaseEntity {
*/
private
Integer
canPack
;
/**
* 排序
*/
private
Long
sort
;
}
\ No newline at end of file
...
...
lego-core/src/main/java/com/lego/core/service/impl/CourseServiceImpl.java
View file @
eb62931
...
...
@@ -11,6 +11,7 @@ import com.lego.common.core.service.OssService;
import
com.lego.common.utils.MessageUtils
;
import
com.lego.common.utils.StreamUtils
;
import
com.lego.core.annotation.LanguageAnnotation
;
import
com.lego.core.domin.Advert
;
import
com.lego.core.domin.Course
;
import
com.lego.core.domin.bo.CourseBo
;
import
com.lego.core.domin.bo.CourseQueryBo
;
...
...
@@ -54,7 +55,7 @@ public class CourseServiceImpl implements ICourseService {
public
TableDataInfo
<
CourseVo
>
listPage
(
CourseQueryBo
query
,
String
language
)
{
Page
<
CourseVo
>
page
=
baseMapper
.
selectVoPage
(
query
.
build
(),
Wrappers
.<
Course
>
lambdaQuery
().
like
(
StrUtil
.
isNotBlank
(
query
.
getSearchKey
()),
Course:
:
getName
,
query
.
getSearchKey
())
.
eq
(
Course:
:
getLanguage
,
language
));
.
eq
(
Course:
:
getLanguage
,
language
)
.
orderByAsc
(
Course:
:
getSort
)
);
List
<
CourseVo
>
list
=
page
.
getRecords
();
if
(
ObjectUtil
.
isNotEmpty
(
list
))
{
Set
<
String
>
ids
=
StreamUtils
.
toSet
(
list
,
CourseVo:
:
getBuildingBlockId
);
...
...
@@ -94,7 +95,7 @@ public class CourseServiceImpl implements ICourseService {
*/
@Override
public
List
<
CourseVo
>
list
(
String
buildingBlockId
)
{
List
<
CourseVo
>
list
=
baseMapper
.
selectVoList
(
Wrappers
.<
Course
>
lambdaQuery
().
eq
(
Course:
:
getBuildingBlockId
,
buildingBlockId
));
List
<
CourseVo
>
list
=
baseMapper
.
selectVoList
(
Wrappers
.<
Course
>
lambdaQuery
().
eq
(
Course:
:
getBuildingBlockId
,
buildingBlockId
)
.
orderByAsc
(
Course:
:
getSort
)
);
for
(
CourseVo
vo
:
list
)
{
if
(
StrUtil
.
isNotBlank
(
vo
.
getTwoDimensionalOssId
())){
SysOssVo
oss
=
iSysOssService
.
getById
(
Long
.
valueOf
(
vo
.
getTwoDimensionalOssId
()));
...
...
Write
Preview
Styling with
Markdown
is supported
Attach a file
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 post a comment