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
178b7146
Commit
178b7146
authored
Sep 02, 2021
by
liuyang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
课程添加用户标签
parent
7711dc6c
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
7 deletions
+4
-7
CourseService.java
...java/com/qkdata/biz/management/service/CourseService.java
+3
-6
SaveCourseModel.java
...in/java/com/qkdata/biz/management/vo/SaveCourseModel.java
+1
-1
No files found.
src/main/java/com/qkdata/biz/management/service/CourseService.java
View file @
178b7146
...
@@ -29,6 +29,7 @@ import com.qkdata.common.base.exception.BusinessException;
...
@@ -29,6 +29,7 @@ import com.qkdata.common.base.exception.BusinessException;
import
com.qkdata.common.base.model.PageResult
;
import
com.qkdata.common.base.model.PageResult
;
import
com.qkdata.common.oauth.AuthorizedUser
;
import
com.qkdata.common.oauth.AuthorizedUser
;
import
com.qkdata.common.util.UserContext
;
import
com.qkdata.common.util.UserContext
;
import
org.apache.logging.log4j.util.Strings
;
import
org.springframework.beans.BeanUtils
;
import
org.springframework.beans.BeanUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
org.springframework.stereotype.Service
;
...
@@ -448,14 +449,10 @@ public class CourseService extends ServiceImpl<CourseMapper, CoursePO> {
...
@@ -448,14 +449,10 @@ public class CourseService extends ServiceImpl<CourseMapper, CoursePO> {
po
.
setSeriesId
(
model
.
getSeriesId
());
po
.
setSeriesId
(
model
.
getSeriesId
());
po
.
setAllow
(
model
.
getAllow
());
po
.
setAllow
(
model
.
getAllow
());
if
(
po
.
getAllow
()
==
CourseAllowEnum
.
USER_TAG
){
if
(
po
.
getAllow
()
==
CourseAllowEnum
.
USER_TAG
){
if
(
CollUtil
.
isEmpty
(
model
.
getUserTagIds
())){
if
(
Strings
.
isBlank
(
model
.
getUserTagIds
())){
throw
new
BusinessException
(
"请选择用户标签"
);
throw
new
BusinessException
(
"请选择用户标签"
);
}
}
List
<
String
>
ids
=
Lists
.
newArrayList
();
po
.
setUserTagIds
(
model
.
getUserTagIds
());
for
(
Long
userTagId
:
model
.
getUserTagIds
()){
ids
.
add
(
String
.
valueOf
(
userTagId
));
}
po
.
setUserTagIds
(
String
.
join
(
","
,
ids
));
}
else
{
}
else
{
po
.
setUserTagIds
(
""
);
po
.
setUserTagIds
(
""
);
}
}
...
...
src/main/java/com/qkdata/biz/management/vo/SaveCourseModel.java
View file @
178b7146
...
@@ -88,5 +88,5 @@ public class SaveCourseModel {
...
@@ -88,5 +88,5 @@ public class SaveCourseModel {
/**
/**
* 指定的用户标签
* 指定的用户标签
*/
*/
private
List
<
Long
>
userTagIds
;
private
String
userTagIds
;
}
}
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