mirror of
https://gitee.com/dromara/mayfly-go
synced 2026-05-05 18:45:20 +08:00
refactor: dbms与标签管理优化
This commit is contained in:
@@ -13,12 +13,13 @@ import (
|
||||
"mayfly-go/pkg/model"
|
||||
"mayfly-go/pkg/req"
|
||||
"mayfly-go/pkg/utils/collx"
|
||||
"mayfly-go/pkg/utils/conv"
|
||||
"mayfly-go/pkg/utils/cryptox"
|
||||
"mayfly-go/pkg/utils/structx"
|
||||
"strconv"
|
||||
"strings"
|
||||
"time"
|
||||
|
||||
"github.com/may-fly/cast"
|
||||
)
|
||||
|
||||
const (
|
||||
@@ -136,7 +137,7 @@ func (a *Account) SimpleAccounts(rc *req.Ctx) {
|
||||
idsStr := rc.Query("ids")
|
||||
if idsStr != "" {
|
||||
condition.Ids = collx.ArrayMap[string, uint64](strings.Split(idsStr, ","), func(val string) uint64 {
|
||||
return uint64(conv.Str2Int(val, 0))
|
||||
return cast.ToUint64(val)
|
||||
})
|
||||
}
|
||||
res, err := a.AccountApp.GetPageList(condition, rc.GetPageParam(), new([]vo.SimpleAccountVO))
|
||||
|
||||
@@ -7,10 +7,11 @@ import (
|
||||
"mayfly-go/internal/sys/domain/entity"
|
||||
"mayfly-go/pkg/biz"
|
||||
"mayfly-go/pkg/req"
|
||||
"mayfly-go/pkg/utils/anyx"
|
||||
"mayfly-go/pkg/utils/collx"
|
||||
"strconv"
|
||||
"strings"
|
||||
|
||||
"github.com/may-fly/cast"
|
||||
)
|
||||
|
||||
type Role struct {
|
||||
@@ -24,7 +25,7 @@ func (r *Role) Roles(rc *req.Ctx) {
|
||||
notIdsStr := rc.Query("notIds")
|
||||
if notIdsStr != "" {
|
||||
cond.NotIds = collx.ArrayMap[string, uint64](strings.Split(notIdsStr, ","), func(val string) uint64 {
|
||||
return uint64(anyx.ConvInt(val))
|
||||
return cast.ToUint64(val)
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user