fix:接口调整
This commit is contained in:
parent
2c427662a8
commit
56acf68393
|
@ -1,6 +1,7 @@
|
|||
Name: inventory
|
||||
Host: 0.0.0.0
|
||||
Port: 9905
|
||||
|
||||
SourceMysql: fusentest:XErSYmLELKMnf3Dh@tcp(110.41.19.98:3306)/fusentest
|
||||
Auth:
|
||||
AccessSecret: fusen2023
|
||||
|
|
|
@ -18,7 +18,7 @@ func RegisterHandlers(server *rest.Server, serverCtx *svc.ServiceContext) {
|
|||
Handler: TakeHandler(serverCtx),
|
||||
},
|
||||
{
|
||||
Method: http.MethodGet,
|
||||
Method: http.MethodPost,
|
||||
Path: "/api/inventory/list",
|
||||
Handler: GetCloudListHandler(serverCtx),
|
||||
},
|
||||
|
|
|
@ -16,9 +16,9 @@ type TakeForm struct {
|
|||
}
|
||||
|
||||
type GetCloudListReq struct {
|
||||
Page int `form:"page"`
|
||||
PageSize int `form:"page_size"`
|
||||
Size int64 `form:"size"`
|
||||
Page int `json:"page"`
|
||||
PageSize int `json:"page_size"`
|
||||
Size int64 `json:"size"`
|
||||
}
|
||||
|
||||
type GetCloudListRsp struct {
|
||||
|
|
12
server/inventory/inventory_test.go
Normal file
12
server/inventory/inventory_test.go
Normal file
|
@ -0,0 +1,12 @@
|
|||
package main
|
||||
|
||||
import (
|
||||
"testing"
|
||||
)
|
||||
|
||||
// var configFile = flag.String("f", "etc/home-user-auth.yaml", "the config file")
|
||||
|
||||
func TestMain(t *testing.T) {
|
||||
// log.Println(model.RawFieldNames[FsCanteenType]())
|
||||
main()
|
||||
}
|
|
@ -14,7 +14,7 @@ service inventory {
|
|||
post /api/inventory/take(TakeReq) returns (response);
|
||||
//获取云仓库存列表
|
||||
@handler GetCloudListHandler
|
||||
get /api/inventory/list(GetCloudListReq) returns (response);
|
||||
post /api/inventory/list(GetCloudListReq) returns (response);
|
||||
//云仓补货
|
||||
@handler SupplementHandler
|
||||
post /api/inventory/supplement(SupplementReq) returns (response);
|
||||
|
@ -34,9 +34,9 @@ type TakeForm {
|
|||
}
|
||||
//获取云仓库存列表
|
||||
type GetCloudListReq {
|
||||
Page int `form:"page"`
|
||||
PageSize int `form:"page_size"`
|
||||
Size int64 `form:"size"`
|
||||
Page int `json:"page"`
|
||||
PageSize int `json:"page_size"`
|
||||
Size int64 `json:"size"`
|
||||
}
|
||||
type GetCloudListRsp {
|
||||
WarehouseBoxes int64 `json:"warehouse_boxes"`
|
||||
|
|
Loading…
Reference in New Issue
Block a user