go_dreamfactory/modules/linestory/api_chapter.go
2022-11-15 19:39:38 +08:00

27 lines
706 B
Go

package linestory
import (
"go_dreamfactory/comm"
"go_dreamfactory/pb"
"google.golang.org/protobuf/proto"
)
// 支线剧情任务-章节
func (this *apiComp) ChapterCheck(session comm.IUserSession, req *pb.LinestoryChapterReq) (code pb.ErrorCode) {
return
}
func (this *apiComp) Chapter(session comm.IUserSession, req *pb.LinestoryChapterReq) (code pb.ErrorCode, data proto.Message) {
uid := session.GetUserId()
taskMap := this.moduleLinestory.modelLinestory.getChapters(uid)
rsp := &pb.LinestoryChapterResp{
TaskChapter: taskMap,
}
if err := session.SendMsg(string(this.moduleLinestory.GetType()), LinestorySubTypeChapter, rsp); err != nil {
code = pb.ErrorCode_SystemError
}
return
}