This commit is contained in:
laodaming
2023-06-19 14:53:21 +08:00
parent 6a9650b9d1
commit 7a19292ae2
3 changed files with 9 additions and 131 deletions

View File

@@ -1,7 +1,6 @@
package logic
import (
"encoding/json"
"fusenapi/model/gmodel"
"fusenapi/server/map-library/internal/svc"
"fusenapi/server/map-library/internal/types"
@@ -60,6 +59,7 @@ func (l *GetMapLibraryListLogic) GetMapLibraryList(userinfo *auth.UserInfo) (res
data := types.GetMapLibraryListRsp{
Mid: v.Id,
Ctime: time.Unix(*v.Ctime, 0).Format("2006-01-02 15:04:05"),
Info: *v.Info,
}
//tag拼装
if tagIndex, ok := mapTag[*v.TagId]; ok {
@@ -68,13 +68,6 @@ func (l *GetMapLibraryListLogic) GetMapLibraryList(userinfo *auth.UserInfo) (res
Title: *templateTagList[tagIndex].Title,
}
}
//解析info
var info types.MapLibraryListInfo
if err = json.Unmarshal([]byte(*v.Info), &info); err != nil {
logx.Error(err)
return resp.SetStatusWithMessage(basic.CodeServiceErr, "json parse info err")
}
data.Info = info
list = append(list, data)
}
return resp.SetStatusWithMessage(basic.CodeOK, "success", list)