Commit cd80f09d authored by 刘基明's avatar 刘基明

resizeurl fix

parent 5bdd4c15
......@@ -444,16 +444,16 @@ public class BatchFeignCallService {
//多图写入图片宽高,压缩图片url
List<ImagesDTO> imgList = themeContent.getImgList();
for (ImagesDTO imagesDTO : imgList) {
//压缩图片地址
imagesDTO.setResizeUrl(imagesDTO.getRemark() + CommunityConstant.OSS_RESIZE_RATIO);
if (imgUrlMap.containsKey(imagesDTO.getRelId())) {
FileRecordEntity imgEntity = imgUrlMap.get(themeContent.getValue());
FileRecordEntity imgEntity = imgUrlMap.get(imagesDTO.getRelId());
String extInfo = imgEntity.getExtInfo();
if (!StringUtils.isEmpty(extInfo)) {
Map<String, Object> extMap = JsonUtil.toMap(extInfo);
imagesDTO.setImgHeight((Integer) extMap.get("height"));
imagesDTO.setImgWidth((Integer) extMap.get("width"));
}
//压缩图片地址
imagesDTO.setResizeUrl(imgEntity.getUrl() + CommunityConstant.OSS_RESIZE_RATIO);
}
}
......
......@@ -9,6 +9,7 @@ import com.tanpu.community.dao.mapper.community.RankLogMapper;
import com.tanpu.community.util.BizUtils;
import org.apache.commons.collections4.CollectionUtils;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import javax.annotation.Resource;
import java.time.LocalDateTime;
......@@ -25,6 +26,7 @@ public class RankLogService {
//话题排序日志
@Transactional
public void logTopicRank(List<TopicRankQo> rankList, LocalDateTime logTime, Long cost) {
if (CollectionUtils.isEmpty(rankList)) {
return;
......@@ -51,6 +53,7 @@ public class RankLogService {
}
//主题排序日志
@Transactional
public void logThemeRank(List<ThemeAnalysDO> themeList, LocalDateTime logTime, Long cost) {
if (CollectionUtils.isEmpty(themeList)) {
return;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment