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
@@ -0,0 +1,30 @@
package logic
import (
"context"
sysModel "sundynix-micro-go/app/system/model"
"sundynix-micro-go/app/system/rpc/internal/svc"
"sundynix-micro-go/app/system/rpc/system"
"sundynix-micro-go/common/utils/hash"
"github.com/zeromicro/go-zero/core/logx"
)
type ResetPasswordLogic struct {
ctx context.Context
svcCtx *svc.ServiceContext
logx.Logger
}
func NewResetPasswordLogic(ctx context.Context, svcCtx *svc.ServiceContext) *ResetPasswordLogic {
return &ResetPasswordLogic{ctx: ctx, svcCtx: svcCtx, Logger: logx.WithContext(ctx)}
}
func (l *ResetPasswordLogic) ResetPassword(in *system.ResetPasswordReq) (*system.CommonResp, error) {
if err := l.svcCtx.DB.Model(&sysModel.SundynixUser{}).Where("id = ?", in.Id).
Update("password", hash.BcryptHash(in.Password)).Error; err != nil {
return nil, err
}
return &system.CommonResp{Code: 200, Msg: "success"}, nil
}