From 25a5358ab1c9c821cbe0c956f5b7471f06e8f72b Mon Sep 17 00:00:00 2001 From: qhd <1766646056@qq.com> Date: Sat, 11 Apr 2026 18:26:19 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E7=A7=BB=E9=99=A4=E8=B5=84=E4=BA=A7?= =?UTF-8?q?=E6=9C=8D=E5=8A=A1=E5=86=97=E4=BD=99=E7=B1=BB=E5=9E=8B=E8=BD=AC?= =?UTF-8?q?=E6=8D=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- go.mod | 4 ++-- go.sum | 1 + service/asset/asset_service.go | 6 +----- 3 files changed, 4 insertions(+), 7 deletions(-) diff --git a/go.mod b/go.mod index fc6b1e2..584fb9e 100644 --- a/go.mod +++ b/go.mod @@ -3,7 +3,7 @@ module assets go 1.26.0 require ( - gitea.com/red-future/common v0.0.11 + gitea.com/red-future/common v0.0.12 github.com/bjang03/gmq v0.0.0-20251219093200-000000000000 github.com/gogf/gf/contrib/drivers/pgsql/v2 v2.10.0 github.com/gogf/gf/v2 v2.10.0 @@ -12,7 +12,7 @@ require ( go.mongodb.org/mongo-driver/v2 v2.5.0 ) -//replace gitea.com/red-future/common v0.0.11 => ../common +//replace gitea.com/red-future/common v0.0.12 => ../common replace github.com/bjang03/gmq => ../gmq diff --git a/go.sum b/go.sum index 2095434..000c5b8 100644 --- a/go.sum +++ b/go.sum @@ -1,6 +1,7 @@ cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= gitea.com/red-future/common v0.0.11 h1:AV7W3G0uZ8aPpHHSHd4ZHmLWe5+2STPKe/AYPoPCWVc= gitea.com/red-future/common v0.0.11/go.mod h1:B8syUI4XbLCDQSeRHURYxEwnWw8mEFgmqCxjC+lM+NU= +gitea.com/red-future/common v0.0.12/go.mod h1:3a7cwZNvgpKw5FzE8x5MZImd7NBePGXRGFSMjt90158= github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= github.com/BurntSushi/toml v1.5.0 h1:W5quZX/G/csjUnuI8SUYlsHs9M38FC7znL0lIO+DvMg= github.com/BurntSushi/toml v1.5.0/go.mod h1:ukJfTF/6rtPPRCnwkur4qwRxa8vTRFBF0uk2lLoLwho= diff --git a/service/asset/asset_service.go b/service/asset/asset_service.go index 2d510e6..6c1bc07 100644 --- a/service/asset/asset_service.go +++ b/service/asset/asset_service.go @@ -82,10 +82,6 @@ func (s *asset) GetOne(ctx context.Context, req *dto.GetAssetReq) (res *dto.GetA if assetOne, err = dao.Asset.GetOne(ctx, req); err != nil { return } - var assetListItem *entity.Asset - if err = gconv.Struct(assetOne, &assetListItem); err != nil { - return - } getCategoryRes, err := dao.Category.GetOne(ctx, &dto.GetCategoryReq{ Id: assetOne.CategoryId, }) @@ -93,7 +89,7 @@ func (s *asset) GetOne(ctx context.Context, req *dto.GetAssetReq) (res *dto.GetA return } res = &dto.GetAssetRes{ - Asset: assetListItem, + Asset: assetOne, CategoryName: getCategoryRes.Name, } res.ImgAddressPrefix, err = utils.GetFileAddressPrefix(ctx)