mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/per-boe/java-servers.git
synced 2025-12-07 01:46:47 +08:00
课程详情页显示标签
This commit is contained in:
@@ -887,7 +887,7 @@ 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())){
|
||||
if (StringUtils.isNotBlank(c.getTags()) && c.getTags().matches("[0-9,]+")) {
|
||||
List<CourseTag> tagList = courseTagService.getTagsByIds(c.getTags());
|
||||
String tags = tagList.stream().map(CourseTag::getTagName).collect(Collectors.joining(","));
|
||||
c.setTags(tags);
|
||||
|
||||
Reference in New Issue
Block a user