mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/per-boe/java-servers.git
synced 2025-12-11 11:56:50 +08:00
课程详情页显示标签
This commit is contained in:
@@ -887,7 +887,7 @@ public class CourseServiceImpl implements ICourseService {
|
|||||||
public Course getAddView(String id) {
|
public Course getAddView(String id) {
|
||||||
Course c = courseDao.get(id);
|
Course c = courseDao.get(id);
|
||||||
courseDao.updateFieldById(id, "views", c.getViews() + 1);
|
courseDao.updateFieldById(id, "views", c.getViews() + 1);
|
||||||
if (StringUtils.isNotBlank(c.getTags())){
|
if (StringUtils.isNotBlank(c.getTags()) && c.getTags().matches("[0-9,]+")) {
|
||||||
List<CourseTag> tagList = courseTagService.getTagsByIds(c.getTags());
|
List<CourseTag> tagList = courseTagService.getTagsByIds(c.getTags());
|
||||||
String tags = tagList.stream().map(CourseTag::getTagName).collect(Collectors.joining(","));
|
String tags = tagList.stream().map(CourseTag::getTagName).collect(Collectors.joining(","));
|
||||||
c.setTags(tags);
|
c.setTags(tags);
|
||||||
|
|||||||
Reference in New Issue
Block a user