1、子订单增加过期时间

This commit is contained in:
2025-03-19 09:38:11 +08:00
parent cb3d4d0add
commit 7c246e4496
6 changed files with 110 additions and 3 deletions

View File

@ -42,8 +42,8 @@ func HasSuffix(data string, suffixs []string) bool {
}
// SplitSlice 将 []string 切片根据最大数量分割成二维数组
func SplitSlice(slice []string, maxSize int) [][]string {
var result [][]string
func SplitSlice[T any](slice []T, maxSize int) [][]T {
var result [][]T
// 遍历切片,每次取 maxSize 个元素
for i := 0; i < len(slice); i += maxSize {