fix: 缓存使用redis无法set问题修复&admin账号默认有所有菜单

This commit is contained in:
meilin.huang
2023-10-12 21:50:55 +08:00
parent d300f604f1
commit e0f1f40ba0
14 changed files with 35 additions and 245 deletions

View File

@@ -1,7 +1,6 @@
package api
import (
"fmt"
"mayfly-go/internal/common/utils"
msgapp "mayfly-go/internal/msg/application"
"mayfly-go/internal/sys/api/form"
@@ -153,7 +152,7 @@ func (a *Account) ChangeStatus(rc *req.Ctx) {
account := &entity.Account{}
account.Id = uint64(ginx.PathParamInt(g, "id"))
account.Status = int8(ginx.PathParamInt(g, "status"))
rc.ReqParam = fmt.Sprintf("accountId: %d, status: %d", account.Id, account.Status)
rc.ReqParam = collx.Kvs("accountId", account.Id, "status", account.Status)
a.AccountApp.Update(account)
}
@@ -208,6 +207,6 @@ func (a *Account) ResetOtpSecret(rc *req.Ctx) {
account := &entity.Account{OtpSecret: "-"}
accountId := uint64(ginx.PathParamInt(rc.GinCtx, "id"))
account.Id = accountId
rc.ReqParam = fmt.Sprintf("accountId = %d", accountId)
rc.ReqParam = collx.Kvs("accountId", accountId)
a.AccountApp.Update(account)
}