|
|
@ -1856,7 +1856,7 @@ public class ArticleServiceImpl extends BaseServiceImpl<ArticleDao, ArticleEntit |
|
|
|
articleOperateRecord.setArticleId(formDTO.getArticleId()); |
|
|
|
articleOperateRecord.setGridIds(CollectionUtils.isEmpty(formDTO.getGridIdList()) ? "" : formDTO.getGridIdList().stream().collect(Collectors.joining(":"))); |
|
|
|
articleOperateRecord.setOpUser(staffInfo.getAgencyName().concat("-").concat(staffInfo.getRealName())); |
|
|
|
articleOperateRecord.setContent(articleOperateRecord.getOpUser() + "发布文章【" +formDTO.getTitle() + "】"); |
|
|
|
articleOperateRecord.setContent(articleOperateRecord.getOpUser() + "编辑文章【" +formDTO.getTitle() + "】"); |
|
|
|
articleOperateRecord.setOpType(ArticleConstant.UPDATE_ARTICEL); |
|
|
|
articleOperateRecord.setOpTime(new Date()); |
|
|
|
articleOperateRecordService.insert(articleOperateRecord); |
|
|
@ -1866,7 +1866,7 @@ public class ArticleServiceImpl extends BaseServiceImpl<ArticleDao, ArticleEntit |
|
|
|
formDTO.getGridIdList().forEach(g -> { |
|
|
|
GridInfoCache gridInfoCache = CustomerOrgRedis.getGridInfo(g); |
|
|
|
if (null == gridInfoCache){ |
|
|
|
throw new EpmetException("未查询到网格信息:"+g); |
|
|
|
throw new EpmetException(EpmetErrorCode.EPMET_COMMON_OPERATION_FAIL.getCode(),"gridId:"+g,"发布范围:网格信息查询异常"); |
|
|
|
} |
|
|
|
ArticlePublishRangeEntity articlePublishRange = ConvertUtils.sourceToTarget(gridInfoCache,ArticlePublishRangeEntity.class); |
|
|
|
articlePublishRange.setCustomerId(formDTO.getCustomerId()); |
|
|
@ -1876,8 +1876,9 @@ public class ArticleServiceImpl extends BaseServiceImpl<ArticleDao, ArticleEntit |
|
|
|
articlePublishRange.setAgencyId(gridInfoCache.getPid()); |
|
|
|
AgencyInfoCache agencyInfoCache = CustomerOrgRedis.getAgencyInfo(gridInfoCache.getPid()); |
|
|
|
if (null == agencyInfoCache){ |
|
|
|
throw new EpmetException("未查询到组织信息:"+gridInfoCache.getPid()); |
|
|
|
throw new EpmetException(EpmetErrorCode.EPMET_COMMON_OPERATION_FAIL.getCode(),"agencyId:"+gridInfoCache.getPid(),"发布范围:网格所属组织信息查询异常"); |
|
|
|
} |
|
|
|
//组织id的所有上级
|
|
|
|
articlePublishRange.setPids(agencyInfoCache.getPids()); |
|
|
|
articlePublishRange.setPublishStatus(ArticleConstant.PUBLISHED); |
|
|
|
articlePublishRange.setId(null); |
|
|
@ -1918,7 +1919,7 @@ public class ArticleServiceImpl extends BaseServiceImpl<ArticleDao, ArticleEntit |
|
|
|
this.updateCacheGridTag(updateGridTagCacheDTOS); |
|
|
|
} catch (Exception e) { |
|
|
|
//我觉着没必要抛出异常吧,日志打印一下吧
|
|
|
|
log.warn("scanAllPassPublishArticle update redis exception", e); |
|
|
|
log.warn("updateArticle update redis exception", e); |
|
|
|
// throw new RenException(EpmetErrorCode.SERVER_ERROR.getCode(), EpmetErrorCode.SERVER_ERROR.getMsg());
|
|
|
|
} |
|
|
|
|
|
|
|