+ QueryPageStores

This commit is contained in:
gazebo
2019-06-25 10:24:10 +08:00
parent 6cfc7091d1
commit 6559fb212e
5 changed files with 138 additions and 6 deletions

View File

@@ -172,3 +172,12 @@ func value2Value(srcValue, dstValue reflect.Value, copyType int) {
func IsVendorThingIDEmpty(vendorThingID string) bool {
return vendorThingID == "" || vendorThingID == "0"
}
func FormalizePageSize(pageSize int) int {
if pageSize == 0 {
return model.DefPageSize
} else if pageSize < 0 {
return model.UnlimitedPageSize
}
return pageSize
}