This commit is contained in:
zhangwenjian committed 2020-04-13 00:30:58 +08:00
1 parent f25da5f1ee
commit 1df55e75e5
72 files changed
+1401 -1559

No files matched your search

+22
View File
@@ -0,0 +1,22 @@
package utils
import (
"github.com/gin-gonic/gin"
"strings"
)
//获取URL中批量id并解析
func IdsStrToIdsIntGroup(key string, c *gin.Context) []int {
return idsStrToIdsIntGroup(c.Param(key))
}
func idsStrToIdsIntGroup(keys string) []int {
IDS := make([]int, 0)
ids := strings.Split(keys, ",")
for i := 0; i < len(ids); i++ {
ID, _ := StringToInt(ids[i])
IDS = append(IDS, ID)
}
return IDS
}