Compare commits

...

2 Commits

Author SHA1 Message Date
qhd
69a50a4d0e Merge branch 'dev' of http://116.204.74.41:3000/red-future/assets into dev
# Conflicts:
#	go.mod
2026-04-11 18:26:43 +08:00
qhd
25a5358ab1 fix: 移除资产服务冗余类型转换 2026-04-11 18:26:19 +08:00
2 changed files with 2 additions and 5 deletions

1
go.sum
View File

@@ -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=

View File

@@ -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)