fix
This commit is contained in:
parent
071526f7a7
commit
cc2f1489f3
|
@ -12,7 +12,8 @@ type FsFeishuWebhookLog struct {
|
||||||
EventId *string `gorm:"index;default:'';" json:"event_id"` // 事件唯一id
|
EventId *string `gorm:"index;default:'';" json:"event_id"` // 事件唯一id
|
||||||
EventType *string `gorm:"default:'';" json:"event_type"` // 事件名
|
EventType *string `gorm:"default:'';" json:"event_type"` // 事件名
|
||||||
HttpHeader *string `gorm:"default:'';" json:"http_header"` // http响应头信息
|
HttpHeader *string `gorm:"default:'';" json:"http_header"` // http响应头信息
|
||||||
HttpBody *string `gorm:"default:'';" json:"http_body"` // http body信息
|
Data *string `gorm:"default:'';" json:"data"` //
|
||||||
|
DecryptData *string `gorm:"default:'';" json:"decrypt_data"` //
|
||||||
MsgCtime *time.Time `gorm:"default:'0000-00-00 00:00:00';" json:"msg_ctime"` //
|
MsgCtime *time.Time `gorm:"default:'0000-00-00 00:00:00';" json:"msg_ctime"` //
|
||||||
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"` //
|
||||||
}
|
}
|
||||||
|
|
|
@ -105,7 +105,8 @@ func (l *WebhookLogic) Webhook(w http.ResponseWriter, r *http.Request) {
|
||||||
}
|
}
|
||||||
httpHeaderBytes, _ := json.Marshal(r.Header)
|
httpHeaderBytes, _ := json.Marshal(r.Header)
|
||||||
httpHeaderStr := string(httpHeaderBytes)
|
httpHeaderStr := string(httpHeaderBytes)
|
||||||
httpBodyStr := string(realMsgBytes)
|
//解密后的数据
|
||||||
|
decryptMsgStr := string(realMsgBytes)
|
||||||
feiShuMsgCreateTimeInt64, err := strconv.ParseInt(msgHeader.CreateTime, 10, 64)
|
feiShuMsgCreateTimeInt64, err := strconv.ParseInt(msgHeader.CreateTime, 10, 64)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
logx.Error("解析消息时间错误:", err)
|
logx.Error("解析消息时间错误:", err)
|
||||||
|
@ -119,7 +120,8 @@ func (l *WebhookLogic) Webhook(w http.ResponseWriter, r *http.Request) {
|
||||||
EventId: &msgHeader.EventId,
|
EventId: &msgHeader.EventId,
|
||||||
EventType: &msgHeader.EventType,
|
EventType: &msgHeader.EventType,
|
||||||
HttpHeader: &httpHeaderStr,
|
HttpHeader: &httpHeaderStr,
|
||||||
HttpBody: &httpBodyStr,
|
Data: &encryptMsg.Encrypt,
|
||||||
|
DecryptData: &decryptMsgStr,
|
||||||
MsgCtime: &feiShuMsgCreateTime,
|
MsgCtime: &feiShuMsgCreateTime,
|
||||||
Ctime: &now,
|
Ctime: &now,
|
||||||
})
|
})
|
||||||
|
|
Loading…
Reference in New Issue
Block a user