From d9cffa70b7e8f9dcc505c72e0fd87e9e553e7901 Mon Sep 17 00:00:00 2001
From: “mitao” <“2763622819@qq.com”>
Date: 星期三, 18 三月 2026 19:35:04 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/master'

---
 xp-robotaxi-operation-boot/src/main/java/com/xiaopeng/operation/controller/XpBannerManagementController.java |   22 ++++++++++++++++++++--
 1 files changed, 20 insertions(+), 2 deletions(-)

diff --git a/xp-robotaxi-operation-boot/src/main/java/com/xiaopeng/operation/controller/XpBannerManagementController.java b/xp-robotaxi-operation-boot/src/main/java/com/xiaopeng/operation/controller/XpBannerManagementController.java
index 3d7fb11..102b3ed 100644
--- a/xp-robotaxi-operation-boot/src/main/java/com/xiaopeng/operation/controller/XpBannerManagementController.java
+++ b/xp-robotaxi-operation-boot/src/main/java/com/xiaopeng/operation/controller/XpBannerManagementController.java
@@ -1,10 +1,13 @@
 package com.xiaopeng.operation.controller;
 
+import com.alibaba.fastjson2.JSON;
+import com.alibaba.fastjson2.JSONObject;
 import com.xiaopeng.api.model.operation.XpBanner;
 import com.xiaopeng.api.model.operation.XpWhitelist;
 import com.xiaopeng.common.core.domain.R;
 import com.xiaopeng.common.core.web.controller.BaseController;
 import com.xiaopeng.common.core.web.page.PageInfo;
+import com.xiaopeng.evi.oss.service.AliOssService;
 import com.xiaopeng.operation.query.BannerPageListQuery;
 import com.xiaopeng.operation.query.WhitelistPageListQuery;
 import com.xiaopeng.operation.service.XpBannerService;
@@ -14,6 +17,7 @@
 import lombok.extern.slf4j.Slf4j;
 import org.springframework.web.bind.annotation.*;
 
+import java.io.UnsupportedEncodingException;
 import java.util.List;
 
 @Slf4j
@@ -24,9 +28,11 @@
 
     // banner实现类
     private final XpBannerService xpBannerService;
+    private final AliOssService aliOssService;
 
-    public XpBannerManagementController(XpBannerService xpBannerService) {
+    public XpBannerManagementController(XpBannerService xpBannerService, AliOssService aliOssService) {
         this.xpBannerService = xpBannerService;
+        this.aliOssService = aliOssService;
     }
 
 
@@ -51,7 +57,19 @@
     @ApiOperation(value = "详情banner")
     @GetMapping("/detailBanner")
     public R<XpBanner> detailBanner(Long id) {
-        return R.ok(xpBannerService.getById(id));
+        XpBanner xpBanner = xpBannerService.getById(id);
+
+        JSONObject jsonObject = JSON.parseArray(xpBanner.getBannerPictures()).getJSONObject(0);
+        String downloadUrl = null;
+        try {
+            downloadUrl = aliOssService.getDownloadUrl(jsonObject.getString("id"), jsonObject.getString("name"), true);
+        } catch (UnsupportedEncodingException e) {
+            throw new RuntimeException(e);
+        }
+        xpBanner.setBannerPictures(downloadUrl);
+
+
+        return R.ok(xpBanner);
     }
     @ApiOperation(value = "删除banner")
     @DeleteMapping("/deleteBanner")

--
Gitblit v1.7.1