Merge branch 'develop' of gitee.com:fusenpack/fusenapi into develop
This commit is contained in:
commit
3641a40a69
|
@ -30,6 +30,7 @@ type FsFeishuUser struct {
|
|||
EmployeeNo *string `gorm:"default:'';" json:"employee_no"` //
|
||||
EmployeeType *int64 `gorm:"default:0;" json:"employee_type"` // 0:未设置 1:正式员工 2:实习生 3:外包 4:劳务 5:顾问
|
||||
Orders *[]byte `gorm:"default:'';" json:"orders"` //
|
||||
JoinTime *time.Time `gorm:"default:'0000-00-00 00:00:00';" json:"join_time"` //
|
||||
Ctime *time.Time `gorm:"default:'0000-00-00 00:00:00';" json:"ctime"` //
|
||||
Utime *time.Time `gorm:"default:'0000-00-00 00:00:00';" json:"utime"` //
|
||||
}
|
||||
|
|
|
@ -26,5 +26,6 @@ func (u *FsFeishuUserModel) CreateOrUpdate(ctx context.Context, appId, openId st
|
|||
}
|
||||
return err
|
||||
}
|
||||
data.Ctime = nil
|
||||
return u.Update(ctx, data)
|
||||
}
|
||||
|
|
|
@ -115,6 +115,7 @@ func (l *WebhookLogic) OnUserChange(data []byte) error {
|
|||
return err
|
||||
}
|
||||
feiShuMsgCreateTime := time.UnixMilli(feiShuMsgCreateTimeInt64)
|
||||
joinTime := time.Unix(msg.Event.Object.Joint64ime, 0)
|
||||
return l.svcCtx.AllModels.FsFeishuUser.CreateOrUpdate(l.ctx, msg.Header.AppId, msg.Event.Object.OpenId, &gmodel.FsFeishuUser{
|
||||
AppId: &msg.Header.AppId,
|
||||
OpenId: &msg.Event.Object.OpenId,
|
||||
|
@ -138,6 +139,7 @@ func (l *WebhookLogic) OnUserChange(data []byte) error {
|
|||
EmployeeNo: &msg.Event.Object.EmployeeNo,
|
||||
EmployeeType: &msg.Event.Object.EmployeeType,
|
||||
Orders: &orders,
|
||||
JoinTime: &joinTime,
|
||||
Ctime: &feiShuMsgCreateTime,
|
||||
Utime: &feiShuMsgCreateTime,
|
||||
})
|
||||
|
|
Loading…
Reference in New Issue
Block a user