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