新版仿ok交易所-后端
1
zj
2025-07-10 f15406ac788fb4e17a630c4d48129943af89fb9c
trading-order-admin/src/main/java/com/yami/trading/api/controller/ApiNewsController.java
@@ -4,6 +4,7 @@
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.yami.trading.bean.cms.News;
import com.yami.trading.common.constants.Constants;
import com.yami.trading.common.domain.Result;
import com.yami.trading.common.exception.YamiShopBindException;
import com.yami.trading.common.util.DateUtils;
@@ -54,7 +55,7 @@
        }
        if (StringUtils.isNotEmpty(news.getImgUrl())) {
            news.setImgUrl(awsS3OSSFileService.getUrl(news.getImgUrl()));
            news.setImgUrl(Constants.IMAGES_HTTP+news.getImgUrl());
        }
        return Result.succeed(news);
@@ -101,7 +102,7 @@
                    news.setShow(news.getUserId().equals(SecurityUtils.getCurrentUserId()));
                }
                if (StringUtils.isNotEmpty(news.getImgUrl())) {
                    news.setImgUrl(awsS3OSSFileService.getUrl(news.getImgUrl()));
                    news.setImgUrl(news.getImgUrl());
                }
            }
@@ -148,7 +149,7 @@
                list.get(i).setCreateTimeStr(DateUtils.format(list.get(i).getCreateTime(), DateUtils.DF_yyyyMMddHHmmss));
                News news = list.get(i);
                if (StringUtils.isNotEmpty(news.getImgUrl())) {
                    news.setImgUrl(awsS3OSSFileService.getUrl(news.getImgUrl()));
                    news.setImgUrl(Constants.IMAGES_HTTP+news.getImgUrl());
                }
            }
@@ -195,7 +196,7 @@
                list.get(i).setCreateTimeStr(DateUtils.format(list.get(i).getCreateTime(), DateUtils.DF_yyyyMMddHHmmss));
                News news = list.get(i);
                if (StringUtils.isNotEmpty(news.getImgUrl())) {
                    news.setImgUrl(awsS3OSSFileService.getUrl(news.getImgUrl()));
                    news.setImgUrl(Constants.IMAGES_HTTP+news.getImgUrl());
                }
            }