|
|
@ -43,6 +43,7 @@ import com.epmet.resi.group.dto.act.result.CommentResultDTO; |
|
|
|
import com.epmet.resi.group.dto.group.result.CommentFileDTO; |
|
|
|
import com.epmet.resi.group.dto.notice.form.NoticeFileDTO; |
|
|
|
import com.github.pagehelper.PageHelper; |
|
|
|
import org.apache.commons.lang3.StringUtils; |
|
|
|
import org.springframework.beans.factory.annotation.Autowired; |
|
|
|
import org.springframework.beans.factory.annotation.Value; |
|
|
|
import org.springframework.stereotype.Service; |
|
|
@ -89,6 +90,9 @@ public class ActCommentServiceImpl extends BaseServiceImpl<ActCommentDao, ActCom |
|
|
|
@Override |
|
|
|
@Transactional(rollbackFor = Exception.class) |
|
|
|
public void submitComment(CommentFormDTO formDTO) { |
|
|
|
if(StringUtils.isBlank(formDTO.getCommentContent())&& org.apache.commons.collections4.CollectionUtils.isEmpty(formDTO.getImageList())){ |
|
|
|
throw new RenException("请至少填写评论内容或上传评论图片!"); |
|
|
|
} |
|
|
|
//1、关闭和已取消不能评论
|
|
|
|
GroupActInfoDTO groupActInfoDTO = groupActInfoService.getGroupActInfoDTO(formDTO.getGroupActId()); |
|
|
|
if (GroupActConstant.CLOSED.equals(groupActInfoDTO.getStatus())) { |
|
|
|