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.
24 lines
513 B
24 lines
513 B
package service |
|
|
|
import ( |
|
"context" |
|
|
|
"go-common/library/ecode" |
|
) |
|
|
|
// ReadPing 处理用户阅读心跳 |
|
func (s *Service) ReadPing(c context.Context, buvid string, aid int64, mid int64, ip string, cur int64, source string) (err error) { |
|
var last int64 |
|
if last, err = s.dao.GetsetReadPing(c, buvid, aid, cur); err != nil { |
|
err = ecode.RequestErr |
|
return |
|
} |
|
if last != 0 { |
|
return |
|
} |
|
if s.dao.AddReadPingSet(c, buvid, aid, mid, ip, cur, source); err != nil { |
|
err = ecode.RequestErr |
|
return |
|
} |
|
return |
|
}
|
|
|