feat: rbac迁移完成,并已部署至dev服务器
This commit is contained in:
@@ -0,0 +1,31 @@
|
||||
package logic
|
||||
|
||||
import (
|
||||
sysModel "sundynix-micro-go/app/system/model"
|
||||
"sundynix-micro-go/app/system/rpc/system"
|
||||
)
|
||||
|
||||
// convertUserToProto 将 model 转为 proto UserInfo
|
||||
func convertUserToProto(u *sysModel.SundynixUser) *system.UserInfo {
|
||||
info := &system.UserInfo{
|
||||
Id: u.ID,
|
||||
TenantId: u.TenantID,
|
||||
ClientId: u.ClientID,
|
||||
Name: u.Name,
|
||||
Account: u.Account,
|
||||
NickName: u.NickName,
|
||||
Phone: u.Phone,
|
||||
SessionKey: u.SessionKey,
|
||||
UnionId: u.UnionID,
|
||||
OpenId: u.OpenID,
|
||||
SaOpenId: u.SaOpenID,
|
||||
AvatarId: u.AvatarID,
|
||||
Gender: int32(u.Gender),
|
||||
CreatedAt: u.CreatedAt.Unix(),
|
||||
UpdatedAt: u.UpdatedAt.Unix(),
|
||||
}
|
||||
if u.LastLoginAt != nil {
|
||||
info.LastLoginAt = u.LastLoginAt.Unix()
|
||||
}
|
||||
return info
|
||||
}
|
||||
Reference in New Issue
Block a user