|
|
@@ -1,5 +1,6 @@
|
|
|
package cn.tr.module.smart.common.service.impl;
|
|
|
|
|
|
+import cn.hutool.core.util.ObjectUtil;
|
|
|
import cn.hutool.core.util.StrUtil;
|
|
|
import cn.tr.core.exception.TRExcCode;
|
|
|
import cn.tr.core.strategy.LoginUserStrategy;
|
|
|
@@ -140,6 +141,11 @@ public class BizReasearchQueueServiceImpl implements IBizReasearchQueueService {
|
|
|
|
|
|
private void validateSource(BizReasearchQueueDTO source){
|
|
|
ValidationUtils.validate(source.getTimePoints());
|
|
|
+ List<BizReasearchPushPointEntity> timePoints = source.getTimePoints();
|
|
|
+ Set<BizReasearchPushPointEntity> reasearchPushPointEntities = new HashSet<>(source.getTimePoints());
|
|
|
+ if (ObjectUtil.equals(CollectionUtil.size(timePoints), CollectionUtil.size(reasearchPushPointEntities))) {
|
|
|
+ throw new ServiceException(TRExcCode.SYSTEM_ERROR_B0001,"推送时间点重复");
|
|
|
+ }
|
|
|
for (BizReasearchPushPointEntity timePoint : source.getTimePoints()) {
|
|
|
if (!isValidTimePointFormat(timePoint.getTimePoint())) {
|
|
|
throw new ServiceException(TRExcCode.SYSTEM_ERROR_B0001,"时间点格式错误");
|