|
|
@ -38,11 +38,12 @@ import com.epmet.commons.tools.utils.DateUtils; |
|
|
|
import com.epmet.commons.tools.utils.Result; |
|
|
|
import com.epmet.commons.tools.utils.ScanContentUtils; |
|
|
|
import com.epmet.commons.tools.validator.ValidatorUtils; |
|
|
|
import com.epmet.commons.tools.validator.group.AddGroup; |
|
|
|
import com.epmet.commons.tools.validator.group.DefaultGroup; |
|
|
|
import com.epmet.constant.*; |
|
|
|
import com.epmet.dao.*; |
|
|
|
import com.epmet.dto.*; |
|
|
|
import com.epmet.dto.ArticleVisitRecordDTO; |
|
|
|
import com.epmet.dto.CustomerStaffDTO; |
|
|
|
import com.epmet.dto.DraftCoverDTO; |
|
|
|
import com.epmet.dto.DraftDTO; |
|
|
|
import com.epmet.dto.form.*; |
|
|
|
import com.epmet.dto.result.*; |
|
|
|
import com.epmet.entity.*; |
|
|
@ -66,7 +67,6 @@ import org.springframework.transaction.annotation.Propagation; |
|
|
|
import org.springframework.transaction.annotation.Transactional; |
|
|
|
import org.springframework.util.CollectionUtils; |
|
|
|
|
|
|
|
import javax.swing.text.StringContent; |
|
|
|
import java.util.*; |
|
|
|
import java.util.concurrent.atomic.AtomicBoolean; |
|
|
|
import java.util.stream.Collectors; |
|
|
@ -173,6 +173,12 @@ public class ArticleServiceImpl extends BaseServiceImpl<ArticleDao, ArticleEntit |
|
|
|
log.debug("saveOrUpdateContent param:{}", JSON.toJSONString(fromDTO)); |
|
|
|
if (required) { |
|
|
|
ValidatorUtils.validateEntity(fromDTO); |
|
|
|
if (StringUtils.isBlank(fromDTO.getTitle())){ |
|
|
|
throw new RenException(ModuleConstant.ARTICLE_TITLE_IS_NULL); |
|
|
|
} |
|
|
|
if (CollectionUtils.isEmpty(fromDTO.getContentList())){ |
|
|
|
throw new RenException(ModuleConstant.ARTICLE_CONTENT_IS_NULL); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
DraftEntity draftEntity = null; |
|
|
|