|
@ -38,6 +38,7 @@ import com.epmet.commons.tools.scan.param.TextScanParamDTO; |
|
|
import com.epmet.commons.tools.scan.param.TextTaskDTO; |
|
|
import com.epmet.commons.tools.scan.param.TextTaskDTO; |
|
|
import com.epmet.commons.tools.scan.result.SyncScanResult; |
|
|
import com.epmet.commons.tools.scan.result.SyncScanResult; |
|
|
import com.epmet.commons.tools.security.dto.TokenDto; |
|
|
import com.epmet.commons.tools.security.dto.TokenDto; |
|
|
|
|
|
import com.epmet.commons.tools.security.user.LoginUserUtil; |
|
|
import com.epmet.commons.tools.utils.*; |
|
|
import com.epmet.commons.tools.utils.*; |
|
|
import com.epmet.commons.tools.validator.ValidatorUtils; |
|
|
import com.epmet.commons.tools.validator.ValidatorUtils; |
|
|
import com.epmet.constant.OrgInfoConstant; |
|
|
import com.epmet.constant.OrgInfoConstant; |
|
@ -102,7 +103,6 @@ import lombok.extern.slf4j.Slf4j; |
|
|
import org.apache.commons.lang3.StringUtils; |
|
|
import org.apache.commons.lang3.StringUtils; |
|
|
import org.apache.commons.logging.Log; |
|
|
import org.apache.commons.logging.Log; |
|
|
import org.apache.commons.logging.LogFactory; |
|
|
import org.apache.commons.logging.LogFactory; |
|
|
import org.jsoup.helper.StringUtil; |
|
|
|
|
|
import org.springframework.beans.factory.annotation.Autowired; |
|
|
import org.springframework.beans.factory.annotation.Autowired; |
|
|
import org.springframework.beans.factory.annotation.Value; |
|
|
import org.springframework.beans.factory.annotation.Value; |
|
|
import org.springframework.stereotype.Service; |
|
|
import org.springframework.stereotype.Service; |
|
@ -177,6 +177,9 @@ public class ResiTopicServiceImpl extends BaseServiceImpl<ResiTopicDao, ResiTopi |
|
|
@Autowired |
|
|
@Autowired |
|
|
private EpmetMessageOpenFeignClient epmetMessageOpenFeignClient; |
|
|
private EpmetMessageOpenFeignClient epmetMessageOpenFeignClient; |
|
|
|
|
|
|
|
|
|
|
|
@Autowired |
|
|
|
|
|
private LoginUserUtil loginUserUtil; |
|
|
|
|
|
|
|
|
@Value("${openapi.scan.server.url}") |
|
|
@Value("${openapi.scan.server.url}") |
|
|
private String scanApiUrl; |
|
|
private String scanApiUrl; |
|
|
@Value("${openapi.scan.method.textSyncScan}") |
|
|
@Value("${openapi.scan.method.textSyncScan}") |
|
@ -310,9 +313,14 @@ public class ResiTopicServiceImpl extends BaseServiceImpl<ResiTopicDao, ResiTopi |
|
|
logger.error(ModuleConstant.TOPIC_CONTENT_NUMBER_OF_WORDS_EXCEEDED); |
|
|
logger.error(ModuleConstant.TOPIC_CONTENT_NUMBER_OF_WORDS_EXCEEDED); |
|
|
throw new RenException(ModuleConstant.TOPIC_CONTENT_NUMBER_OF_WORDS_EXCEEDED); |
|
|
throw new RenException(ModuleConstant.TOPIC_CONTENT_NUMBER_OF_WORDS_EXCEEDED); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
String customerId = loginUserUtil.getLoginUserCustomerId(); |
|
|
|
|
|
|
|
|
ResiTopicEntity topic = ConvertUtils.sourceToTarget(resiTopicPublishFormDTO,ResiTopicEntity.class); |
|
|
ResiTopicEntity topic = ConvertUtils.sourceToTarget(resiTopicPublishFormDTO,ResiTopicEntity.class); |
|
|
topic.setCreatedBy(tokenDto.getUserId()); |
|
|
topic.setCreatedBy(tokenDto.getUserId()); |
|
|
topic.setStatus(TopicConstant.PUBLISHMENT); |
|
|
topic.setStatus(TopicConstant.PUBLISHMENT); |
|
|
|
|
|
//2021/1/29 客户Id
|
|
|
|
|
|
topic.setCustomerId(customerId); |
|
|
baseDao.insertOne(topic); |
|
|
baseDao.insertOne(topic); |
|
|
if(StringUtils.isBlank(topic.getId())){ |
|
|
if(StringUtils.isBlank(topic.getId())){ |
|
|
//没有返回主键
|
|
|
//没有返回主键
|
|
@ -329,6 +337,8 @@ public class ResiTopicServiceImpl extends BaseServiceImpl<ResiTopicDao, ResiTopi |
|
|
attachment.setAttachmentFormat(url.substring(url.lastIndexOf(".") + NumConstant.ONE).toLowerCase()); |
|
|
attachment.setAttachmentFormat(url.substring(url.lastIndexOf(".") + NumConstant.ONE).toLowerCase()); |
|
|
attachment.setSort(sort++); |
|
|
attachment.setSort(sort++); |
|
|
attachment.setAttachmentType("image"); |
|
|
attachment.setAttachmentType("image"); |
|
|
|
|
|
//2021/1/29 客户Id
|
|
|
|
|
|
attachment.setCustomerId(customerId); |
|
|
resiTopicAttachmentDao.insertOne(attachment); |
|
|
resiTopicAttachmentDao.insertOne(attachment); |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
@ -338,6 +348,8 @@ public class ResiTopicServiceImpl extends BaseServiceImpl<ResiTopicDao, ResiTopi |
|
|
operation.setTopicId(topic.getId()); |
|
|
operation.setTopicId(topic.getId()); |
|
|
operation.setOperationType(TopicConstant.PUBLISHMENT); |
|
|
operation.setOperationType(TopicConstant.PUBLISHMENT); |
|
|
operation.setCreatedBy(tokenDto.getUserId()); |
|
|
operation.setCreatedBy(tokenDto.getUserId()); |
|
|
|
|
|
//2021/1/29 客户Id
|
|
|
|
|
|
operation.setCustomerId(customerId); |
|
|
resiTopicOperationDao.insertOne(operation); |
|
|
resiTopicOperationDao.insertOne(operation); |
|
|
|
|
|
|
|
|
|
|
|
|
|
@ -356,6 +368,8 @@ public class ResiTopicServiceImpl extends BaseServiceImpl<ResiTopicDao, ResiTopi |
|
|
statistical2Update.setTotalTopics(null == statistical.get(NumConstant.ZERO).getTotalTopics() ? NumConstant.ONE : statistical.get(NumConstant.ZERO).getTotalTopics() + NumConstant.ONE); |
|
|
statistical2Update.setTotalTopics(null == statistical.get(NumConstant.ZERO).getTotalTopics() ? NumConstant.ONE : statistical.get(NumConstant.ZERO).getTotalTopics() + NumConstant.ONE); |
|
|
statistical2Update.setUpdatedBy(tokenDto.getUserId()); |
|
|
statistical2Update.setUpdatedBy(tokenDto.getUserId()); |
|
|
statistical2Update.setUpdatedTime(currentTime); |
|
|
statistical2Update.setUpdatedTime(currentTime); |
|
|
|
|
|
//2021/1/29 客户Id
|
|
|
|
|
|
statistical2Update.setCustomerId(customerId); |
|
|
resiGroupStatisticalDao.updateById(statistical2Update); |
|
|
resiGroupStatisticalDao.updateById(statistical2Update); |
|
|
} |
|
|
} |
|
|
}else{ |
|
|
}else{ |
|
@ -369,6 +383,8 @@ public class ResiTopicServiceImpl extends BaseServiceImpl<ResiTopicDao, ResiTopi |
|
|
ResiGroupEntity group2Update = new ResiGroupEntity(); |
|
|
ResiGroupEntity group2Update = new ResiGroupEntity(); |
|
|
group2Update.setId(resiTopicPublishFormDTO.getGroupId()); |
|
|
group2Update.setId(resiTopicPublishFormDTO.getGroupId()); |
|
|
group2Update.setLatestTopicPublishDate(currentTime); |
|
|
group2Update.setLatestTopicPublishDate(currentTime); |
|
|
|
|
|
//2021/1/29 客户Id
|
|
|
|
|
|
group2Update.setCustomerId(customerId); |
|
|
resiGroupDao.updateById(group2Update); |
|
|
resiGroupDao.updateById(group2Update); |
|
|
|
|
|
|
|
|
// 创建话题增加积分
|
|
|
// 创建话题增加积分
|
|
@ -556,12 +572,17 @@ public class ResiTopicServiceImpl extends BaseServiceImpl<ResiTopicDao, ResiTopi |
|
|
topicForUpdate.setUpdatedBy(tokenDto.getUserId()); |
|
|
topicForUpdate.setUpdatedBy(tokenDto.getUserId()); |
|
|
topicForUpdate.setStatus(TopicConstant.HIDDEN); |
|
|
topicForUpdate.setStatus(TopicConstant.HIDDEN); |
|
|
baseDao.update(topicForUpdate); |
|
|
baseDao.update(topicForUpdate); |
|
|
|
|
|
|
|
|
|
|
|
String customerId = loginUserUtil.getLoginUserCustomerId(); |
|
|
|
|
|
|
|
|
//3.话题操作记录
|
|
|
//3.话题操作记录
|
|
|
ResiTopicOperationEntity operationRecord = new ResiTopicOperationEntity(); |
|
|
ResiTopicOperationEntity operationRecord = new ResiTopicOperationEntity(); |
|
|
operationRecord.setTopicId(hiddenFormDTO.getTopicId()); |
|
|
operationRecord.setTopicId(hiddenFormDTO.getTopicId()); |
|
|
operationRecord.setOperationReason(hiddenFormDTO.getOperateReason()); |
|
|
operationRecord.setOperationReason(hiddenFormDTO.getOperateReason()); |
|
|
operationRecord.setOperationType(TopicConstant.HIDDEN); |
|
|
operationRecord.setOperationType(TopicConstant.HIDDEN); |
|
|
operationRecord.setCreatedBy(tokenDto.getUserId()); |
|
|
operationRecord.setCreatedBy(tokenDto.getUserId()); |
|
|
|
|
|
//2021/1/29 客户Id
|
|
|
|
|
|
operationRecord.setCustomerId(customerId); |
|
|
resiTopicOperationDao.insertOne(operationRecord); |
|
|
resiTopicOperationDao.insertOne(operationRecord); |
|
|
|
|
|
|
|
|
// 4.组话题数量-1 (对应的在解除屏蔽时组话题数量+1)
|
|
|
// 4.组话题数量-1 (对应的在解除屏蔽时组话题数量+1)
|
|
@ -618,6 +639,7 @@ public class ResiTopicServiceImpl extends BaseServiceImpl<ResiTopicDao, ResiTopi |
|
|
operation.setTopicId(id); |
|
|
operation.setTopicId(id); |
|
|
operation.setOperationType(TopicConstant.CANCEL_HIDDEN); |
|
|
operation.setOperationType(TopicConstant.CANCEL_HIDDEN); |
|
|
operation.setCreatedBy(tokenDto.getUserId()); |
|
|
operation.setCreatedBy(tokenDto.getUserId()); |
|
|
|
|
|
operation.setCustomerId(loginUserUtil.getLoginUserCustomerId()); |
|
|
resiTopicOperationDao.insertOne(operation); |
|
|
resiTopicOperationDao.insertOne(operation); |
|
|
} |
|
|
} |
|
|
QueryWrapper<ResiGroupStatisticalEntity> statisticalWrapper = new QueryWrapper<>(); |
|
|
QueryWrapper<ResiGroupStatisticalEntity> statisticalWrapper = new QueryWrapper<>(); |
|
@ -678,6 +700,8 @@ public class ResiTopicServiceImpl extends BaseServiceImpl<ResiTopicDao, ResiTopi |
|
|
operation.setOperationReason(closeFormDTO.getOperateReason()); |
|
|
operation.setOperationReason(closeFormDTO.getOperateReason()); |
|
|
operation.setCreatedBy(tokenDto.getUserId()); |
|
|
operation.setCreatedBy(tokenDto.getUserId()); |
|
|
operation.setOperationType(TopicConstant.CLOSED); |
|
|
operation.setOperationType(TopicConstant.CLOSED); |
|
|
|
|
|
//2021/1/29 客户Id
|
|
|
|
|
|
operation.setCustomerId(loginUserUtil.getLoginUserCustomerId()); |
|
|
resiTopicOperationDao.insertOne(operation); |
|
|
resiTopicOperationDao.insertOne(operation); |
|
|
|
|
|
|
|
|
return new Result(); |
|
|
return new Result(); |
|
@ -975,6 +999,8 @@ public class ResiTopicServiceImpl extends BaseServiceImpl<ResiTopicDao, ResiTopi |
|
|
List<String> ids = new ArrayList<>(); |
|
|
List<String> ids = new ArrayList<>(); |
|
|
List<ResiTopicOperationEntity> topicOperationList = new ArrayList<>(); |
|
|
List<ResiTopicOperationEntity> topicOperationList = new ArrayList<>(); |
|
|
ResiTopicOperationEntity resiTopicOperationEntity = null; |
|
|
ResiTopicOperationEntity resiTopicOperationEntity = null; |
|
|
|
|
|
//2021/1/29 客户Id
|
|
|
|
|
|
String customerId = loginUserUtil.getLoginUserCustomerId(); |
|
|
for (ResiTopicDTO dto : list) { |
|
|
for (ResiTopicDTO dto : list) { |
|
|
ids.add(dto.getId()); |
|
|
ids.add(dto.getId()); |
|
|
resiTopicOperationEntity = new ResiTopicOperationEntity(); |
|
|
resiTopicOperationEntity = new ResiTopicOperationEntity(); |
|
@ -985,6 +1011,7 @@ public class ResiTopicServiceImpl extends BaseServiceImpl<ResiTopicDao, ResiTopi |
|
|
resiTopicOperationEntity.setRevision(NumConstant.ZERO); |
|
|
resiTopicOperationEntity.setRevision(NumConstant.ZERO); |
|
|
resiTopicOperationEntity.setCreatedBy(removeMemberFormDTO.getUserId()); |
|
|
resiTopicOperationEntity.setCreatedBy(removeMemberFormDTO.getUserId()); |
|
|
resiTopicOperationEntity.setUpdatedBy(removeMemberFormDTO.getUserId()); |
|
|
resiTopicOperationEntity.setUpdatedBy(removeMemberFormDTO.getUserId()); |
|
|
|
|
|
resiGroupMemberEntity.setCustomerId(customerId); |
|
|
topicOperationList.add(resiTopicOperationEntity); |
|
|
topicOperationList.add(resiTopicOperationEntity); |
|
|
} |
|
|
} |
|
|
baseDao.cancelHiddenOrCloseBatch(ids, removeMemberFormDTO.getUserId(),TopicConstant.HIDDEN); |
|
|
baseDao.cancelHiddenOrCloseBatch(ids, removeMemberFormDTO.getUserId(),TopicConstant.HIDDEN); |
|
|