fix
This commit is contained in:
parent
e999672037
commit
ca6f0c51e5
@ -13,9 +13,8 @@ type LdapGroups struct {
|
|||||||
Creator *string `gorm:"default:'';" json:"creator"` //
|
Creator *string `gorm:"default:'';" json:"creator"` //
|
||||||
GroupType *string `gorm:"default:'';" json:"group_type"` //
|
GroupType *string `gorm:"default:'';" json:"group_type"` //
|
||||||
ParentId *int64 `gorm:"default:0;" json:"parent_id"` //
|
ParentId *int64 `gorm:"default:0;" json:"parent_id"` //
|
||||||
SourceDeptId *string `gorm:"default:'';" json:"source_dept_id"` //
|
DeptId *string `gorm:"default:'';" json:"dept_id"` //
|
||||||
Source *string `gorm:"default:'';" json:"source"` //
|
DeptParentId *string `gorm:"default:'';" json:"dept_parent_id"` //
|
||||||
SourceDeptParentId *string `gorm:"default:'';" json:"source_dept_parent_id"` //
|
|
||||||
GroupDn *string `gorm:"default:'';" json:"group_dn"` //
|
GroupDn *string `gorm:"default:'';" json:"group_dn"` //
|
||||||
SyncState *int64 `gorm:"default:0;" json:"sync_state"` //
|
SyncState *int64 `gorm:"default:0;" json:"sync_state"` //
|
||||||
Ctime *time.Time `gorm:"default:'0000-00-00 00:00:00';" json:"ctime"` //
|
Ctime *time.Time `gorm:"default:'0000-00-00 00:00:00';" json:"ctime"` //
|
||||||
|
@ -8,8 +8,7 @@ import (
|
|||||||
// ldap_users
|
// ldap_users
|
||||||
type LdapUsers struct {
|
type LdapUsers struct {
|
||||||
Id int64 `gorm:"primary_key;default:0;auto_increment;" json:"id"` //
|
Id int64 `gorm:"primary_key;default:0;auto_increment;" json:"id"` //
|
||||||
Source *int64 `gorm:"default:0;" json:"source"` // 来源 1飞书
|
UserId *string `gorm:"default:'';" json:"user_id"` //
|
||||||
AppId *string `gorm:"default:'';" json:"app_id"` //
|
|
||||||
OpenId *string `gorm:"default:'';" json:"open_id"` //
|
OpenId *string `gorm:"default:'';" json:"open_id"` //
|
||||||
UnionId *string `gorm:"default:'';" json:"union_id"` //
|
UnionId *string `gorm:"default:'';" json:"union_id"` //
|
||||||
Name *string `gorm:"default:'';" json:"name"` //
|
Name *string `gorm:"default:'';" json:"name"` //
|
||||||
|
@ -115,10 +115,8 @@ func (l *WebhookLogic) OnUserChange(data []byte) error {
|
|||||||
feiShuMsgCreateTime := time.UnixMilli(feiShuMsgCreateTimeInt64)
|
feiShuMsgCreateTime := time.UnixMilli(feiShuMsgCreateTimeInt64)
|
||||||
departmentIds := strings.Join(msg.Event.Object.DepartmentIds, ",")
|
departmentIds := strings.Join(msg.Event.Object.DepartmentIds, ",")
|
||||||
joinTime := time.Unix(msg.Event.Object.Joint64ime, 0)
|
joinTime := time.Unix(msg.Event.Object.Joint64ime, 0)
|
||||||
source := int64(1)
|
|
||||||
return l.svcCtx.AllModels.LdapUsers.CreateOrUpdate(l.ctx, msg.Header.AppId, msg.Event.Object.OpenId, &gmodel.LdapUsers{
|
return l.svcCtx.AllModels.LdapUsers.CreateOrUpdate(l.ctx, msg.Header.AppId, msg.Event.Object.OpenId, &gmodel.LdapUsers{
|
||||||
Source: &source,
|
UserId: &msg.Event.Object.UserId,
|
||||||
AppId: &msg.Header.AppId,
|
|
||||||
OpenId: &msg.Event.Object.OpenId,
|
OpenId: &msg.Event.Object.OpenId,
|
||||||
UnionId: &msg.Event.Object.UnionId,
|
UnionId: &msg.Event.Object.UnionId,
|
||||||
Name: &msg.Event.Object.Name,
|
Name: &msg.Event.Object.Name,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user