feat: rbac迁移完成,并已部署至dev服务器

This commit is contained in:
Blizzard
2026-05-01 01:19:50 +08:00
parent f80a3dc064
commit 8b11068fef
250 changed files with 6314 additions and 13072 deletions
@@ -2,6 +2,7 @@ package logic
import (
"context"
"errors"
sysModel "sundynix-micro-go/app/system/model"
"sundynix-micro-go/app/system/rpc/internal/svc"
@@ -32,10 +33,11 @@ func (l *GetClientByIdLogic) GetClientById(in *system.GetClientByIdReq) (*system
var client sysModel.SundynixClient
err := l.svcCtx.DB.Where("client_id = ?", in.ClientId).First(&client).Error
if err != nil {
if err == gorm.ErrRecordNotFound {
if errors.Is(err, gorm.ErrRecordNotFound) {
l.Infof("[GetClientById] 客户端不存在 | clientId=%s", in.ClientId)
return nil, status.Error(codes.NotFound, "客户端不存在")
}
l.Errorf("查询客户端失败: %v", err)
l.Errorf("[GetClientById] ❌ 查询客户端失败 | clientId=%s | err=%v", in.ClientId, err)
return nil, status.Error(codes.Internal, "查询客户端失败")
}