- weimob api
This commit is contained in:
20
platformapi/weimobapi/goods.go
Normal file
20
platformapi/weimobapi/goods.go
Normal file
@@ -0,0 +1,20 @@
|
||||
package weimobapi
|
||||
|
||||
import (
|
||||
"git.rosy.net.cn/baseapi/utils"
|
||||
)
|
||||
|
||||
func (a *API) QueryGoodsList(pageNum, pageSize int) (retVal []map[string]interface{}, totalCount int, err error) {
|
||||
result, err := a.AccessAPI("goods/queryGoodsList", map[string]interface{}{
|
||||
"pageNum": pageNum,
|
||||
"pageSize": pageSize,
|
||||
})
|
||||
if err == nil {
|
||||
if pageList, ok := result["pageList"].([]interface{}); ok {
|
||||
retVal = utils.Slice2MapSlice(pageList)
|
||||
}
|
||||
totalCount = int(utils.MustInterface2Int64(result["totalCount"]))
|
||||
return retVal, totalCount, nil
|
||||
}
|
||||
return nil, 0, err
|
||||
}
|
||||
Reference in New Issue
Block a user