12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697 |
- package com.ruoyi.system.service.impl;
- import com.ruoyi.common.utils.DateUtils;
- import com.ruoyi.system.domain.communityNews.CommentContent;
- import com.ruoyi.system.mapper.CommentContentMapper;
- import com.ruoyi.system.service.ICommentContentService;
- import org.springframework.beans.factory.annotation.Autowired;
- import org.springframework.stereotype.Service;
- import java.util.List;
- /**
- * 社区资讯评论内容Service业务层处理
- *
- * @author boman
- * @date 2025-02-25
- */
- @Service
- public class CommentContentServiceImpl implements ICommentContentService
- {
- @Autowired
- private CommentContentMapper commentContentMapper;
- /**
- * 查询社区资讯评论内容
- *
- * @param contentId 社区资讯评论内容主键
- * @return 社区资讯评论内容
- */
- @Override
- public CommentContent selectCommentContentByContentId(Long contentId)
- {
- return commentContentMapper.selectCommentContentByContentId(contentId);
- }
- /**
- * 查询社区资讯评论内容列表
- *
- * @param commentContent 社区资讯评论内容
- * @return 社区资讯评论内容
- */
- @Override
- public List<CommentContent> selectCommentContentList(CommentContent commentContent)
- {
- return commentContentMapper.selectCommentContentList(commentContent);
- }
- /**
- * 新增社区资讯评论内容
- *
- * @param commentContent 社区资讯评论内容
- * @return 结果
- */
- @Override
- public int insertCommentContent(CommentContent commentContent)
- {
- commentContent.setCreateTime(DateUtils.getNowDate());
- return commentContentMapper.insertCommentContent(commentContent);
- }
- /**
- * 修改社区资讯评论内容
- *
- * @param commentContent 社区资讯评论内容
- * @return 结果
- */
- @Override
- public int updateCommentContent(CommentContent commentContent)
- {
- commentContent.setUpdateTime(DateUtils.getNowDate());
- return commentContentMapper.updateCommentContent(commentContent);
- }
- /**
- * 批量删除社区资讯评论内容
- *
- * @param contentIds 需要删除的社区资讯评论内容主键
- * @return 结果
- */
- @Override
- public int deleteCommentContentByContentIds(Long[] contentIds)
- {
- return commentContentMapper.deleteCommentContentByContentIds(contentIds);
- }
- /**
- * 删除社区资讯评论内容信息
- *
- * @param contentId 社区资讯评论内容主键
- * @return 结果
- */
- @Override
- public int deleteCommentContentByContentId(Long contentId)
- {
- return commentContentMapper.deleteCommentContentByContentId(contentId);
- }
- }
|