refactor: dbms与标签管理优化

This commit is contained in:
meilin.huang
2024-03-21 17:15:52 +08:00
parent b13d27ccd6
commit b2cfd1517c
43 changed files with 536 additions and 564 deletions

View File

@@ -8,8 +8,9 @@ import (
"mayfly-go/pkg/gormx"
"mayfly-go/pkg/model"
"mayfly-go/pkg/utils/collx"
"strconv"
"strings"
"github.com/may-fly/cast"
)
type machineRepoImpl struct {
@@ -31,8 +32,7 @@ func (m *machineRepoImpl) GetMachineList(condition *entity.MachineQuery, pagePar
if condition.Ids != "" {
// ,分割id转为id数组
qd.In("id", collx.ArrayMap[string, uint64](strings.Split(condition.Ids, ","), func(val string) uint64 {
id, _ := strconv.Atoi(val)
return uint64(id)
return cast.ToUint64(val)
}))
}