newcomer

package
v0.0.0-...-83adff0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 6, 2020 License: GPL-3.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Dao

type Dao struct {
	// contains filtered or unexported fields
}

Dao is search dao.

func New

func New(c *conf.Config) (d *Dao)

New new a search dao.

func (*Dao) AllGiftRewards

func (d *Dao) AllGiftRewards(c context.Context) (res map[int8][]*model.GiftReward, err error)

AllGiftRewards get all GiftRewards for cache

func (*Dao) BaseRewardCount

func (d *Dao) BaseRewardCount(c context.Context, mid int64) (res int, err error)

BaseRewardCount get received base reward count

func (*Dao) CheckTaskComplete

func (d *Dao) CheckTaskComplete(c context.Context, mid int64, tid int64) bool

CheckTaskComplete check task complete state

func (*Dao) CheckTaskState

func (d *Dao) CheckTaskState(c context.Context, MID, TaskID int64) (*grpc.TaskReply, error)

CheckTaskState call grpc client.

func (*Dao) CheckTasksForRewardNotify

func (d *Dao) CheckTasksForRewardNotify(c context.Context, index string, id int64, startMtime, endMtime time.Time, limit int) (res []*model.UserTask, err error)

CheckTasksForRewardNotify get finish task send notify to user.

func (*Dao) Close

func (d *Dao) Close(c context.Context) (err error)

Close close grpc.

func (*Dao) GiftRewardCount

func (d *Dao) GiftRewardCount(c context.Context, mid int64) (res int, err error)

GiftRewardCount get received gift reward count

func (*Dao) Ping

func (d *Dao) Ping(c context.Context) (err error)

Ping ping grpc.

func (*Dao) SendNotify

func (d *Dao) SendNotify(c context.Context, mids []int64, mc, title, context string) (err error)

SendNotify send msg notify user

func (*Dao) TaskByTID

func (d *Dao) TaskByTID(c context.Context, mid int64, tid int64) (res *model.Task, err error)

TaskByTID get task by task_id

func (*Dao) Tasks

func (d *Dao) Tasks(c context.Context) (res []*model.Task, err error)

Tasks get all task.

func (*Dao) UpUserTask

func (d *Dao) UpUserTask(c context.Context, mid, tid int64) (int64, error)

UpUserTask update user task finish state

func (*Dao) UserTasks

func (d *Dao) UserTasks(c context.Context, index string, id int64, limit int) (res []*model.UserTask, err error)

UserTasks get user unfinish task.

func (*Dao) UserTasksByMID

func (d *Dao) UserTasksByMID(c context.Context, mid int64) (res []*model.UserTask, err error)

UserTasksByMID get user unfinish task by mid.

func (*Dao) UserTasksByMIDAndState

func (d *Dao) UserTasksByMIDAndState(c context.Context, mid int64, state int) (res []*model.UserTask, err error)

UserTasksByMIDAndState get user unfinish task by mid & state.

func (*Dao) UserTasksNotify

func (d *Dao) UserTasksNotify(c context.Context, index string, id int64, start, end string, limit int) (res []*model.UserTask, err error)

UserTasksNotify get unfinish task send notify to user.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL