Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
O
online-edu-backend
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Redmine
Redmine
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
online-edu
online-edu-backend
Commits
94b7d0c6
Commit
94b7d0c6
authored
Jul 22, 2021
by
liuyang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fixed bug:后台配置的推荐视频未生效
parent
445b7c4a
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
1 deletion
+10
-1
RecommendConfigController.java
.../biz/management/controller/RecommendConfigController.java
+9
-0
courseMapper.xml
src/main/resources/mappers/management/courseMapper.xml
+1
-1
No files found.
src/main/java/com/qkdata/biz/management/controller/RecommendConfigController.java
View file @
94b7d0c6
package
com
.
qkdata
.
biz
.
management
.
controller
;
import
com.baomidou.mybatisplus.core.conditions.Wrapper
;
import
com.baomidou.mybatisplus.core.toolkit.Wrappers
;
import
com.qkdata.biz.common.BizConstants
;
import
com.qkdata.biz.management.entity.RecommendConfigPO
;
import
com.qkdata.biz.management.service.CourseService
;
...
...
@@ -63,8 +65,15 @@ public class RecommendConfigController {
@RequiresRoles
(
value
=
{
BizConstants
.
ROLE_ADMIN
,
BizConstants
.
ROLE_OPERATOR
},
logical
=
Logical
.
OR
)
@SysLog
(
"添加推荐"
)
public
Result
<
String
>
add
(
@RequestBody
List
<
RecommendConfigPO
>
list
){
int
sortNo
=
0
;
RecommendConfigPO
recommendConfigPO
=
configService
.
getOne
(
Wrappers
.<
RecommendConfigPO
>
lambdaQuery
().
orderByDesc
(
RecommendConfigPO:
:
getSortNo
).
last
(
"limit 1"
));
if
(
recommendConfigPO
!=
null
){
sortNo
=
recommendConfigPO
.
getSortNo
()
+
1
;
}
for
(
RecommendConfigPO
po
:
list
){
po
.
setSortNo
(
sortNo
);
configService
.
save
(
po
);
sortNo
++;
}
return
Result
.
succeed
(
"ok"
);
}
...
...
src/main/resources/mappers/management/courseMapper.xml
View file @
94b7d0c6
...
...
@@ -94,7 +94,7 @@
WHERE c.is_del = 0
and c.`status` = 'UP'
and c.allow = 'ALL'
ORDER BY sort_no ASC
,c.create_time
DESC
ORDER BY sort_no ASC DESC
</select>
<select
id=
"findListByTags"
resultType=
"com.qkdata.biz.management.entity.CoursePO"
>
SELECT c.*
...
...
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