You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
39 lines
913 B
39 lines
913 B
package dao |
|
|
|
import ( |
|
"context" |
|
"fmt" |
|
|
|
notice "go-common/app/service/bbq/notice-service/api/v1" |
|
"go-common/library/log" |
|
) |
|
|
|
// PushLogin . |
|
func (d *Dao) PushLogin(c context.Context, req *notice.UserPushDev) (err error) { |
|
_, err = d.noticeClient.PushLogin(c, req) |
|
if err != nil { |
|
log.Errorv(c, log.KV("log", fmt.Sprintf("push login fail: req=%s", req.String()))) |
|
} |
|
return |
|
} |
|
|
|
// PushLogout . |
|
func (d *Dao) PushLogout(c context.Context, req *notice.UserPushDev) (err error) { |
|
_, err = d.noticeClient.PushLogout(c, req) |
|
if err != nil { |
|
log.Errorv(c, log.KV("log", fmt.Sprintf("push logout fail: req=%s", req.String()))) |
|
} |
|
return |
|
} |
|
|
|
// PushCallback . |
|
func (d *Dao) PushCallback(c context.Context, tid string, nid string, mid int64, buvid string) (err error) { |
|
_, err = d.noticeClient.PushCallback(c, ¬ice.PushCallbackRequest{ |
|
Tid: tid, |
|
Nid: nid, |
|
Mid: mid, |
|
Buvid: buvid, |
|
}) |
|
|
|
return |
|
}
|
|
|