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: 28 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Service

type Service struct {

	//reward
	RewardCache         []*ncMDL.Reward
	RewardMapCache      map[int64]*ncMDL.Reward
	RewardTyPIDMapCache map[int8]int64 //存储奖励 类型-分类id对应关系
	RewardPIDTyMapCache map[int64]int8 //存储奖励 分类id-类型对应关系
	//task
	TaskCache          []*ncMDL.Task
	TaskMapCache       map[int64]*ncMDL.Task
	TaskTypeMapCache   map[int8][]*ncMDL.Task
	TaskRewardMapCache map[int64][]*ncMDL.TaskRewardEntity
	//taskgroup-reward
	TaskGroupRewardMapCache map[int64][]*ncMDL.TaskGroupReward
	//gift-reward
	GiftRewardMapCache map[int8][]*ncMDL.GiftReward

	// task-group
	TaskGroupCache    []*ncMDL.TaskGroupEntity
	TaskGroupMapCache map[int64]*ncMDL.TaskGroupEntity
	// contains filtered or unexported fields
}

Service struct

func New

func New(c *conf.Config, rpcdaos *service.RPCDaos) *Service

New get service

func (*Service) AppIndexNewcomer

func (s *Service) AppIndexNewcomer(c context.Context, mid int64, plat string) (res *newcomer.AppIndexNewcomer, err error)

AppIndexNewcomer index newcomer

func (*Service) CheckTaskState

func (s *Service) CheckTaskState(c context.Context, req *newcomer.CheckTaskStateReq) (state bool)

CheckTaskState check task state by mid & task id

func (*Service) CheckUserTaskBind

func (s *Service) CheckUserTaskBind(c context.Context, mid int64) (count int64, err error)

CheckUserTaskBind determine if the user has bound the task

func (*Service) Close

func (s *Service) Close()

Close dao

func (*Service) DriveStateByUser

func (s *Service) DriveStateByUser(c context.Context, mid int64)

DriveStateByUser drive new hand & advanced task state

func (*Service) H5TaskList

func (s *Service) H5TaskList(c context.Context, mid int64, from string) (res *newcomer.H5TaskRewardList, err error)

H5TaskList for H5 detail task list

func (*Service) IndexNewcomer

func (s *Service) IndexNewcomer(c context.Context, mid int64) (res *newcomer.IndexNewcomer, err error)

IndexNewcomer index newcomer

func (*Service) Ping

func (s *Service) Ping(c context.Context) (err error)

Ping service

func (*Service) RewardActivate

func (s *Service) RewardActivate(c context.Context, mid, id int64, ip string) (res int64, err error)

RewardActivate insert reward receive records.

func (*Service) RewardReceive

func (s *Service) RewardReceive(c context.Context, mid int64, rid int64, ty int8, ip string) (res string, err error)

RewardReceive insert reward receive records.

func (*Service) RewardReceives

func (s *Service) RewardReceives(c context.Context, mid int64) (res []*newcomer.RewardReceiveGroup, err error)

RewardReceives get reward receive records.

func (*Service) SendPendantReceiveLog

func (s *Service) SendPendantReceiveLog(c context.Context, mid int64) (err error)

SendPendantReceiveLog for reward receive.

func (*Service) SendRewardReceiveLog

func (s *Service) SendRewardReceiveLog(c context.Context, mid int64) (err error)

SendRewardReceiveLog for reward receive.

func (*Service) TaskBind

func (s *Service) TaskBind(c context.Context, mid int64) (res int64, err error)

TaskBind user bind tasks

func (*Service) TaskList

func (s *Service) TaskList(c context.Context, mid int64, ty int8) (res *newcomer.TaskRewardList, err error)

TaskList for task detail

func (*Service) TaskMakeup

func (s *Service) TaskMakeup(c context.Context, mid int64) (err error)

TaskMakeup fix unfinish task state

func (*Service) TaskPubList

func (s *Service) TaskPubList(c context.Context, mid int64) (res *newcomer.PubTaskList, err error)

TaskPubList to apply task list

type UserTaskInfo

type UserTaskInfo struct {
	Mid           int64
	UserTaskLevel int8
	Follower      int64
	IsChange      bool
}

UserTaskInfo def user task info

Jump to

Keyboard shortcuts

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