最新的api路径

This commit is contained in:
eson
2023-07-12 14:11:04 +08:00
parent 3c9fb417aa
commit 4dbb77b306
29 changed files with 221 additions and 162 deletions

View File

@@ -14,27 +14,27 @@ func RegisterHandlers(server *rest.Server, serverCtx *svc.ServiceContext) {
[]rest.Route{
{
Method: http.MethodGet,
Path: "/product-template/detail",
Path: "/api/product-template/detail",
Handler: GetTemplatevDetailHandler(serverCtx),
},
{
Method: http.MethodGet,
Path: "/product-template/base-map-list",
Path: "/api/product-template/base-map-list",
Handler: GetBaseMapListHandler(serverCtx),
},
{
Method: http.MethodPost,
Path: "/product-template/base-map-update",
Path: "/api/product-template/base-map-update",
Handler: SaveBaseMapHandler(serverCtx),
},
{
Method: http.MethodPost,
Path: "/product-template/base-map-add",
Path: "/api/product-template/base-map-add",
Handler: AddBaseMapHandler(serverCtx),
},
{
Method: http.MethodPost,
Path: "/product-template/update-template",
Path: "/api/product-template/update-template",
Handler: UpdateTemplateHandler(serverCtx),
},
},

View File

@@ -81,6 +81,20 @@ type Auth struct {
RefreshAfter int64 `json:"refreshAfter"`
}
type File struct {
Filename string `fsfile:"filename"`
Header map[string][]string `fsfile:"header"`
Size int64 `fsfile:"size"`
Data []byte `fsfile:"data"`
}
type Meta struct {
TotalCount int64 `json:"totalCount"`
PageCount int64 `json:"pageCount"`
CurrentPage int `json:"currentPage"`
PerPage int `json:"perPage"`
}
// Set 设置Response的Code和Message值
func (resp *Response) Set(Code int, Message string) *Response {
return &Response{