Initial commit

This commit is contained in:
Donny
2019-04-22 20:46:32 +08:00
commit 49ab8aadd1
25441 changed files with 4055000 additions and 0 deletions

View File

@@ -0,0 +1,27 @@
package dao
import (
"context"
"go-common/app/admin/main/workflow/model/param"
"go-common/library/ecode"
)
const _userNotifyURI = "http://message.bilibili.co/api/notify/send.user.notify.do"
// SendMessage send message to upper.
func (d *Dao) SendMessage(c context.Context, msg *param.MessageParam) (err error) {
uri := _userNotifyURI
params := msg.Query()
var res struct {
Code int `json:"code"`
}
if err = d.httpWrite.Post(c, uri, "", params, &res); err != nil {
return
}
if res.Code != 0 {
err = ecode.Int(res.Code)
return
}
return
}