fix
This commit is contained in:
parent
6a9650b9d1
commit
7a19292ae2
|
@ -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)
|
||||
|
|
|
@ -9,67 +9,7 @@ type GetMapLibraryListRsp struct {
|
|||
Mid int64 `json:"mid"`
|
||||
Ctime string `json:"ctime"`
|
||||
Tag MapLibraryListTag `json:"tag"`
|
||||
Info MapLibraryListInfo `json:"info"`
|
||||
}
|
||||
|
||||
type MapLibraryListInfo struct {
|
||||
Id string `json:"id"`
|
||||
Tag string `json:"tag"`
|
||||
Title string `json:"title"`
|
||||
Type string `json:"type"`
|
||||
Text string `json:"text"`
|
||||
Fill string `json:"fill"`
|
||||
FontSize int64 `json:"fontSize"`
|
||||
FontFamily string `json:"fontFamily"`
|
||||
IfBr bool `json:"ifBr"`
|
||||
IfShow bool `json:"ifShow"`
|
||||
IfGroup bool `json:"ifGroup"`
|
||||
MaxNum int64 `json:"maxNum"`
|
||||
Rotation int64 `json:"rotation"`
|
||||
Align string `json:"align"`
|
||||
VerticalAlign string `json:"verticalAlign"`
|
||||
Material string `json:"material"`
|
||||
QRcodeType int64 `json:"QRcodeType"`
|
||||
Width float64 `json:"width"`
|
||||
Height float64 `json:"height"`
|
||||
X float64 `json:"x"`
|
||||
Y float64 `json:"y"`
|
||||
Opacity float64 `json:"opacity"`
|
||||
OptionalColor []MapLibraryListOptionalColorItem `json:"optionalColor"`
|
||||
ZIndex int64 `json:"zIndex"`
|
||||
SvgPath string `json:"svgPath"`
|
||||
Follow MapLibraryListFollow `json:"follow"`
|
||||
Group []MapLibraryListGroup `json:"group"`
|
||||
CameraStand MapLibraryListCameraStand `json:"cameraStand"`
|
||||
MaterialTime string `json:"materialTime"`
|
||||
MaterialName string `json:"materialName"`
|
||||
}
|
||||
|
||||
type MapLibraryListCameraStand struct {
|
||||
X int64 `json:"x"`
|
||||
Y int64 `json:"y"`
|
||||
Z int64 `json:"z"`
|
||||
}
|
||||
|
||||
type MapLibraryListGroup struct {
|
||||
Tag string `json:"tag"`
|
||||
Text string `json:"text"`
|
||||
Title string `json:"title"`
|
||||
IfBr bool `json:"ifBr"`
|
||||
IfShow bool `json:"ifShow"`
|
||||
MaxNum int64 `json:"maxNum"`
|
||||
}
|
||||
|
||||
type MapLibraryListFollow struct {
|
||||
Fill string `json:"fill"`
|
||||
IfShow string `json:"ifShow"`
|
||||
Content string `json:"content"`
|
||||
}
|
||||
|
||||
type MapLibraryListOptionalColorItem struct {
|
||||
Color string `json:"color"`
|
||||
Name string `json:"name"`
|
||||
Default bool `json:"default"`
|
||||
Info string `json:"info"`
|
||||
}
|
||||
|
||||
type MapLibraryListTag struct {
|
||||
|
|
|
@ -19,62 +19,7 @@ type GetMapLibraryListRsp {
|
|||
Mid int64 `json:"mid"`
|
||||
Ctime string `json:"ctime"`
|
||||
Tag MapLibraryListTag `json:"tag"`
|
||||
Info MapLibraryListInfo `json:"info"`
|
||||
}
|
||||
type MapLibraryListInfo {
|
||||
Id string `json:"id"`
|
||||
Tag string `json:"tag"`
|
||||
Title string `json:"title"`
|
||||
Type string `json:"type"`
|
||||
Text string `json:"text"`
|
||||
Fill string `json:"fill"`
|
||||
FontSize int64 `json:"fontSize"`
|
||||
FontFamily string `json:"fontFamily"`
|
||||
IfBr bool `json:"ifBr"`
|
||||
IfShow bool `json:"ifShow"`
|
||||
IfGroup bool `json:"ifGroup"`
|
||||
MaxNum int64 `json:"maxNum"`
|
||||
Rotation int64 `json:"rotation"`
|
||||
Align string `json:"align"`
|
||||
VerticalAlign string `json:"verticalAlign"`
|
||||
Material string `json:"material"`
|
||||
QRcodeType int64 `json:"QRcodeType"`
|
||||
Width float64 `json:"width"`
|
||||
Height float64 `json:"height"`
|
||||
X float64 `json:"x"`
|
||||
Y float64 `json:"y"`
|
||||
Opacity float64 `json:"opacity"`
|
||||
OptionalColor []MapLibraryListOptionalColorItem `json:"optionalColor"`
|
||||
ZIndex int64 `json:"zIndex"`
|
||||
SvgPath string `json:"svgPath"`
|
||||
Follow MapLibraryListFollow `json:"follow"`
|
||||
Group []MapLibraryListGroup `json:"group"`
|
||||
CameraStand MapLibraryListCameraStand `json:"cameraStand"`
|
||||
MaterialTime string `json:"materialTime"`
|
||||
MaterialName string `json:"materialName"`
|
||||
}
|
||||
type MapLibraryListCameraStand {
|
||||
X int64 `json:"x"`
|
||||
Y int64 `json:"y"`
|
||||
Z int64 `json:"z"`
|
||||
}
|
||||
type MapLibraryListGroup {
|
||||
Tag string `json:"tag"`
|
||||
Text string `json:"text"`
|
||||
Title string `json:"title"`
|
||||
IfBr bool `json:"ifBr"`
|
||||
IfShow bool `json:"ifShow"`
|
||||
MaxNum int64 `json:"maxNum"`
|
||||
}
|
||||
type MapLibraryListFollow {
|
||||
Fill string `json:"fill"`
|
||||
IfShow string `json:"ifShow"`
|
||||
Content string `json:"content"`
|
||||
}
|
||||
type MapLibraryListOptionalColorItem {
|
||||
Color string `json:"color"`
|
||||
Name string `json:"name"`
|
||||
Default bool `json:"default"`
|
||||
Info string `json:"info"`
|
||||
}
|
||||
type MapLibraryListTag {
|
||||
Id int64 `json:"id"`
|
||||
|
|
Loading…
Reference in New Issue
Block a user