加日志

This commit is contained in:
wh_zcy 2022-10-14 16:03:41 +08:00
parent c8db8bbfe6
commit f109832c7a
16 changed files with 87 additions and 235 deletions

View File

@ -131,9 +131,9 @@ func (this *Items) AddItems(source *comm.ModuleCallSource, session comm.IUserSes
change []*pb.DB_UserItemData change []*pb.DB_UserItemData
) )
defer this.Debugf("给用户添加物品 uId:%s items:%d items:%v", session.GetUserId(), items, err == nil) defer this.Debugf("给用户添加物品 uId:%s items:%v items:%v", session.GetUserId(), items, err == nil)
if change, err = this.modelItems.AddItemsToUserPack(session.GetUserId(), items); err != nil { if change, err = this.modelItems.AddItemsToUserPack(session.GetUserId(), items); err != nil {
this.Errorf("给用户添加物品 uId:%s items:%d err:%v", session.GetUserId(), items, err) this.Errorf("给用户添加物品 uId:%s items:%v err:%v", session.GetUserId(), items, err)
if err == ItemNotEnoughError { if err == ItemNotEnoughError {
code = pb.ErrorCode_ItemsNoEnough code = pb.ErrorCode_ItemsNoEnough
} else if err == PackGridNumUpper { } else if err == PackGridNumUpper {

View File

@ -14,110 +14,12 @@ func (this *apiComp) ChooseCheck(session comm.IUserSession, req *pb.RtaskChooseR
return return
} }
// Deprecated: Use
func (this *apiComp) Choose(session comm.IUserSession, req *pb.RtaskChooseReq) (code pb.ErrorCode, data proto.Message) { func (this *apiComp) Choose(session comm.IUserSession, req *pb.RtaskChooseReq) (code pb.ErrorCode, data proto.Message) {
if code = this.ChooseCheck(session, req); code != pb.ErrorCode_Success { if code = this.ChooseCheck(session, req); code != pb.ErrorCode_Success {
return return
} }
// 获取玩家的任务
// rtask := &pb.DBRtask{}
// if err := this.moduleRtask.modelRtask.Get(session.GetUserId(), rtask); err != nil {
// return
// }
// // 获取当前任务配置
// conf := this.moduleRtask.configure.getRtaskById(req.RtaskId)
// if conf == nil {
// code = pb.ErrorCode_ConfigNoFound
// return
// }
// // 获取支线任务配置
// sideConf := this.moduleRtask.configure.getRtaskSidById(req.RtaskSubId)
// if sideConf == nil {
// code = pb.ErrorCode_ConfigNoFound
// return
// }
// //获取选项配置
// chooseCnf := this.moduleRtask.configure.getRtaskChooseCfg(req.ChooseId)
// if chooseCnf == nil {
// code = pb.ErrorCode_ConfigNoFound
// return
// }
// // 校验限定条件
// if chooseCnf.PreTid != 0 {
// if err, ok := this.moduleRtask.modelRtask.checkCondi(session.GetUserId(), chooseCnf.PreTid); !ok {
// this.moduleRtask.Errorf("no reach condi err: %v", err)
// code = pb.ErrorCode_RtaskCondiNoReach
// return
// }
// }
// var (
// frtaskArr *pb.FrtaskIds //完成的任务
// ok bool
// )
// if frtaskArr, ok = rtask.FrtaskIds[conf.Group]; !ok {
// frtaskArr = &pb.FrtaskIds{}
// }
// //验证该任务是否已完成
// if _, ok := utils.Findx(frtaskArr.RtaskIds, req.RtaskId); ok {
// code = pb.ErrorCode_RtaskFinished
// return
// }
// if chooseCnf.NextTid != 0 {
// // 校验完成条件
// for _, v := range sideConf.EndTid {
// if v == -1 {
// continue
// }
// if err, ok := this.moduleRtask.modelRtask.checkCondi(session.GetUserId(), v); !ok {
// if err != nil {
// this.moduleRtask.Error(err.Error())
// }
// code = pb.ErrorCode_RtaskCondiNoReach
// return
// }
// }
// // 更新完成的任务
// frtaskArr.RtaskIds = append(frtaskArr.RtaskIds, req.RtaskId)
// if rtask.FrtaskIds == nil {
// rtask.FrtaskIds = make(map[int32]*pb.FrtaskIds)
// }
// rtask.FrtaskIds[conf.Group] = frtaskArr
// update := map[string]interface{}{
// "frtaskIds": rtask.FrtaskIds,
// }
// if err := this.moduleRtask.modelRtask.Change(session.GetUserId(), update); err != nil {
// code = pb.ErrorCode_SystemError
// return
// }
// // userexpand update
// if err := this.moduleRtask.modelRtask.updateUserRtaskId(session.GetUserId(), req.RtaskId); err != nil {
// this.moduleRtask.Errorf("update user rtaskId err %v", err)
// }
// // 发奖励
// for _, v := range sideConf.Reward {
// if v.ChooseId == req.ChooseId {
// code = this.moduleRtask.DispenseRes(session, v.Reward, true)
// }
// }
// rsp := &pb.RtaskFinishPush{
// RtaskId: req.RtaskId,
// }
// if err := session.SendMsg(string(this.moduleRtask.GetType()), "finish", rsp); err != nil {
// code = pb.ErrorCode_SystemError
// }
// }
rsp := &pb.RtaskChooseResp{ rsp := &pb.RtaskChooseResp{
RtaskId: req.RtaskId, RtaskId: req.RtaskId,
ChooseId: req.ChooseId, ChooseId: req.ChooseId,

View File

@ -11,6 +11,8 @@ func (this *apiComp) GetrecordCheck(session comm.IUserSession, req *pb.RtaskGetr
return return
} }
// 获取玩家任务条件记录
// 客户端会在登录时拉取此数据
func (this *apiComp) Getrecord(session comm.IUserSession, req *pb.RtaskGetrecordReq) (code pb.ErrorCode, data proto.Message) { func (this *apiComp) Getrecord(session comm.IUserSession, req *pb.RtaskGetrecordReq) (code pb.ErrorCode, data proto.Message) {
rsp := &pb.RtaskGetrecordResp{} rsp := &pb.RtaskGetrecordResp{}
record := this.moduleRtask.modelRtaskRecord.getRecord(session.GetUserId()) record := this.moduleRtask.modelRtaskRecord.getRecord(session.GetUserId())

View File

@ -12,8 +12,7 @@ func (this *apiComp) ListCheck(session comm.IUserSession, req *pb.RtasklistReq)
} }
func (this *apiComp) List(session comm.IUserSession, req *pb.RtasklistReq) (code pb.ErrorCode, data proto.Message) { func (this *apiComp) List(session comm.IUserSession, req *pb.RtasklistReq) (code pb.ErrorCode, data proto.Message) {
// 获取当前玩家随机任务
// 获取当前玩家
rtask := this.moduleRtask.modelRtask.GetRtask(session.GetUserId()) rtask := this.moduleRtask.modelRtask.GetRtask(session.GetUserId())
if rtask == nil { if rtask == nil {
code = pb.ErrorCode_RtaskNoRtask code = pb.ErrorCode_RtaskNoRtask
@ -22,6 +21,7 @@ func (this *apiComp) List(session comm.IUserSession, req *pb.RtasklistReq) (code
ids := make([]int32, 0) ids := make([]int32, 0)
// 查询分组ID对应的任务
if v, ok := rtask.FrtaskIds[req.GroupId]; ok { if v, ok := rtask.FrtaskIds[req.GroupId]; ok {
ids = v.RtaskIds ids = v.RtaskIds
} }
@ -30,9 +30,10 @@ func (this *apiComp) List(session comm.IUserSession, req *pb.RtasklistReq) (code
RtaskIds: ids, RtaskIds: ids,
GroupId: req.GroupId, GroupId: req.GroupId,
} }
if err := session.SendMsg(string(this.moduleRtask.GetType()), RtaskSubTypeList, rsp); err != nil { if err := session.SendMsg(string(this.moduleRtask.GetType()), RtaskSubTypeList, rsp); err != nil {
code = pb.ErrorCode_SystemError code = pb.ErrorCode_SystemError
return
} }
return return
} }

View File

@ -2,7 +2,6 @@ package rtask
import ( import (
"go_dreamfactory/comm" "go_dreamfactory/comm"
"go_dreamfactory/lego/sys/log"
"go_dreamfactory/pb" "go_dreamfactory/pb"
"google.golang.org/protobuf/proto" "google.golang.org/protobuf/proto"
@ -24,7 +23,7 @@ func (this *apiComp) GetReward(session comm.IUserSession, req *pb.RtaskGetReward
sideConf := this.moduleRtask.configure.getRtaskSidById(req.RtaskSubId) sideConf := this.moduleRtask.configure.getRtaskSidById(req.RtaskSubId)
if sideConf == nil { if sideConf == nil {
code = pb.ErrorCode_ConfigNoFound code = pb.ErrorCode_ConfigNoFound
log.Errorf("rdtask_side %v no found", req.RtaskSubId) this.moduleRtask.Errorf("uid:%v rdtask_side:%v config no found", session.GetUserId(), req.RtaskSubId)
return return
} }
@ -50,13 +49,16 @@ func (this *apiComp) GetReward(session comm.IUserSession, req *pb.RtaskGetReward
//发奖励 //发奖励
for _, v := range sideConf.Reward { for _, v := range sideConf.Reward {
code = this.moduleRtask.DispenseRes(session, v.Reward, true) code = this.moduleRtask.DispenseRes(session, v.Reward, true)
this.moduleRtask.Infof("uid:%v 发奖励:%v code:%v", session.GetUserId(), v.Reward, code)
} }
// 更新奖励领取状态
update := map[string]interface{}{ update := map[string]interface{}{
"isReward": true, "isReward": true,
} }
if err := this.moduleRtask.modelRtask.Change(session.GetUserId(), update); err != nil { if err := this.moduleRtask.modelRtask.Change(session.GetUserId(), update); err != nil {
code = pb.ErrorCode_SystemError code = pb.ErrorCode_SystemError
return
} }
rsp := &pb.RtaskGetRewardResp{ rsp := &pb.RtaskGetRewardResp{

View File

@ -1,4 +1,3 @@
// 匹配类型和参数返回任务条件ID
package rtask package rtask
import ( import (

View File

@ -10,6 +10,7 @@ import (
"github.com/pkg/errors" "github.com/pkg/errors"
"go.mongodb.org/mongo-driver/bson/primitive" "go.mongodb.org/mongo-driver/bson/primitive"
"go.mongodb.org/mongo-driver/mongo"
) )
type ModelRtaskRecord struct { type ModelRtaskRecord struct {
@ -36,34 +37,37 @@ func (this *ModelRtaskRecord) GetVerifyData(uid string, condiId int32) (*pb.Rtas
return record.Vals[condiId], nil return record.Vals[condiId], nil
} }
// 获取玩家随机任务记录 // 获取玩家任务条件记录
// 配置表: rdtask_condi
func (this *ModelRtaskRecord) getRecord(uid string) *pb.DBRtaskRecord { func (this *ModelRtaskRecord) getRecord(uid string) *pb.DBRtaskRecord {
record := &pb.DBRtaskRecord{} record := &pb.DBRtaskRecord{}
if err := this.Get(uid, record); err != nil { if err := this.Get(uid, record); err != nil {
log.Warnf("get rtask record err:%v", err) if err != mongo.ErrNoDocuments {
log.Warnf("获取玩家任务条件 err:%v", err)
}
} }
return record return record
} }
// 初始化任务条件数据 // 初始化任务条件数据
// 玩家登录时调用
func (this *ModelRtaskRecord) initCondiData(uid string) error { func (this *ModelRtaskRecord) initCondiData(uid string) error {
// t := time.Now()
// defer func() {
// log.Debugf("初始化条件耗时:%v", time.Since(t))
// }()
dr := this.getRecord(uid) dr := this.getRecord(uid)
// 获取rdtask_condi配置表数据
grc, err := this.moduleRtask.configure.getRtaskCondiCfg() grc, err := this.moduleRtask.configure.getRtaskCondiCfg()
if err != nil { if err != nil {
return err return err
} }
if grc == nil { if grc == nil {
return errors.New("getRtaskCondiCfg err") return errors.New("配置空[rdtaskcondi] err")
} }
if dr != nil && dr.Vals == nil { // 判断是否有记录
if dr.Vals == nil || len(dr.Vals) == 0 {
record := &pb.DBRtaskRecord{Uid: uid} record := &pb.DBRtaskRecord{Uid: uid}
record.Id = primitive.NewObjectID().Hex() record.Id = primitive.NewObjectID().Hex()
record.Vals = make(map[int32]*pb.RtaskData) record.Vals = make(map[int32]*pb.RtaskData)
//遍历所有配置数据
for _, v := range grc.GetDataList() { for _, v := range grc.GetDataList() {
// 不符合参数配置长度则不初始化 // 不符合参数配置长度则不初始化
if len(v.Inited) != 5 { if len(v.Inited) != 5 {
@ -71,12 +75,13 @@ func (this *ModelRtaskRecord) initCondiData(uid string) error {
} }
vals := []int32{} vals := []int32{}
// 遍历初始化参数字段
for _, p := range v.Inited { for _, p := range v.Inited {
if p == 1 { if p == 1 { // 1表示需要初始0
vals = append(vals, 0) vals = append(vals, 0)
} else if p == 0 { } else if p == 0 { // 0表示需要初始实际值
vals = append(vals) vals = append(vals, p)
} else if p == -1 { } else if p == -1 { //-1 表示不初始任何值
break break
} }
} }
@ -91,52 +96,6 @@ func (this *ModelRtaskRecord) initCondiData(uid string) error {
if err := this.Add(uid, record); err != nil { if err := this.Add(uid, record); err != nil {
return err return err
} }
} }
// else {
// //遍历所有配置
// for _, v := range grc.GetDataList() {
// if len(v.Inited) != 5 {
// continue
// }
// if _, ok := dr.Vals[v.Id]; ok {
// continue
// }
// vals := []int32{}
// // 遍历需要初始化的配置
// for i, p := range v.Inited {
// if p == 1 {
// vals = append(vals, 0)
// } else if p == 0 {
// sv := int32(0)
// switch i {
// case 0:
// sv = v.Data1
// case 1:
// sv = v.Data2
// case 2:
// sv = v.Data3
// case 3:
// sv = v.Data4
// case 4:
// sv = v.Data5
// }
// vals = append(vals, sv)
// } else if p == -1 {
// break
// }
// }
// dr.Vals[v.Id] = &pb.RtaskData{
// Data: toMap(vals...),
// Rtype: v.Type,
// Timestamp: time.Now().Unix(),
// }
// }
// update := map[string]interface{}{
// "vals": dr.Vals,
// }
// err = this.Change(uid, update)
// }
return nil return nil
} }

View File

@ -199,10 +199,6 @@ func (this *ModuleRtask) initRtaskVerifyHandle() {
} }
func (this *ModuleRtask) SendToRtask(session comm.IUserSession, rtaskType comm.TaskType, params ...int32) (code pb.ErrorCode) { func (this *ModuleRtask) SendToRtask(session comm.IUserSession, rtaskType comm.TaskType, params ...int32) (code pb.ErrorCode) {
// t := time.Now()
// defer func() {
// log.Debugf("任务发送耗时:%v", time.Since(t))
// }()
this.Debug("任务事件触发", log.Field{"uid", session.GetUserId()}, log.Field{"taskType", rtaskType}, log.Field{"params", params}) this.Debug("任务事件触发", log.Field{"uid", session.GetUserId()}, log.Field{"taskType", rtaskType}, log.Field{"params", params})
var ( var (
err error err error

View File

@ -4,12 +4,14 @@ import (
"go_dreamfactory/comm" "go_dreamfactory/comm"
"go_dreamfactory/pb" "go_dreamfactory/pb"
cfg "go_dreamfactory/sys/configure/structs" cfg "go_dreamfactory/sys/configure/structs"
"strings"
"google.golang.org/protobuf/proto" "google.golang.org/protobuf/proto"
) )
func (this *apiComp) CreateCheck(session comm.IUserSession, req *pb.UserCreateReq) (code pb.ErrorCode) { func (this *apiComp) CreateCheck(session comm.IUserSession, req *pb.UserCreateReq) (code pb.ErrorCode) {
if req.NickName == "" { name := strings.TrimSpace(req.NickName)
if name == "" || len(name) > 30 {
code = pb.ErrorCode_UserNickNameEmpty code = pb.ErrorCode_UserNickNameEmpty
} }
@ -22,13 +24,6 @@ func (this *apiComp) Create(session comm.IUserSession, req *pb.UserCreateReq) (c
return return
} }
defer func() {
err := session.SendMsg(string(this.module.GetType()), UserSubTypeCreate, &pb.UserCreateResp{IsSucc: true})
if err != nil {
code = pb.ErrorCode_SystemError
}
}()
//获取用户 //获取用户
self := this.module.modelUser.GetUser(session.GetUserId()) self := this.module.modelUser.GetUser(session.GetUserId())
if self == nil { if self == nil {
@ -55,6 +50,7 @@ func (this *apiComp) Create(session comm.IUserSession, req *pb.UserCreateReq) (c
if err := this.module.modelUser.Change(session.GetUserId(), update); err != nil { if err := this.module.modelUser.Change(session.GetUserId(), update); err != nil {
code = pb.ErrorCode_DBError code = pb.ErrorCode_DBError
this.module.Errorf("创角失败 uid:%v name:%v err:%v", session.GetUserId(), req.NickName, err)
return return
} }
@ -64,31 +60,26 @@ func (this *apiComp) Create(session comm.IUserSession, req *pb.UserCreateReq) (c
} }
if err := this.module.modelExpand.ChangeUserExpand(session.GetUserId(), initUpdate); err != nil { if err := this.module.modelExpand.ChangeUserExpand(session.GetUserId(), initUpdate); err != nil {
code = pb.ErrorCode_DBError code = pb.ErrorCode_DBError
this.module.Errorf("更新修改名称次数失败 uid:%v err:%v", session.GetUserId(), err)
return return
} }
var ( var (
res []*cfg.Gameatn res []*cfg.Gameatn
) )
//初始化英雄卡 //初始化英雄卡
if val, err := this.module.configure.GetGlobalInitConf(); err == nil { if val, err := this.module.configure.GetGlobalInitConf(); err == nil {
for _, v := range val.GetDataList() { for _, v := range val.GetDataList() {
res = append(res, v.Var...) res = append(res, v.Var...)
} }
code = this.module.DispenseRes(session, res, true) _ = this.module.DispenseRes(session, res, true)
if code != pb.ErrorCode_Success {
this.module.Errorf("资源发放失败,%v", code)
}
//defaultHero := utils.TrInt32(val)
// err = this.hero.CreateHeroes(session.GetUserId(), defaultHero...)
// if err != nil {
// code = pb.ErrorCode_HeroInitCreat
// return
// }
} }
//初始化用户设置 //初始化用户设置
this.module.modelSetting.InitSetting(session.GetUserId()) this.module.modelSetting.InitSetting(session.GetUserId())
if err := session.SendMsg(string(this.module.GetType()), UserSubTypeCreate, &pb.UserCreateResp{IsSucc: true}); err != nil {
code = pb.ErrorCode_SystemError
}
return return
} }

View File

@ -143,6 +143,7 @@ func (this *apiComp) Login(session comm.IUserSession, req *pb.UserLoginReq) (cod
} }
// 初始化随机任务数据 // 初始化随机任务数据
// TODO: 判断次功能开启时再初始化
go this.module.ModuleRtask.InitCondiData(user.Uid) go this.module.ModuleRtask.InitCondiData(user.Uid)
// 日常登录任务 // 日常登录任务

View File

@ -34,6 +34,7 @@ func (this *apiComp) Modifyavatar(session comm.IUserSession, req *pb.UserModifya
if err := this.module.modelUser.Change(session.GetUserId(), update); err != nil { if err := this.module.modelUser.Change(session.GetUserId(), update); err != nil {
code = pb.ErrorCode_DBError code = pb.ErrorCode_DBError
this.module.Errorf("更新头像失败 uid:%v avatarId:%v err:%v", session.GetUserId(), req.AvatarId, err)
return return
} }

View File

@ -32,6 +32,7 @@ func (this *apiComp) Modifybgp(session comm.IUserSession, req *pb.UserModifybgpR
if err := this.module.modelUser.Change(session.GetUserId(), update); err != nil { if err := this.module.modelUser.Change(session.GetUserId(), update); err != nil {
code = pb.ErrorCode_DBError code = pb.ErrorCode_DBError
this.module.Errorf("更新背景失败 uid:%v bgpId:%v err:%v", session.GetUserId(), req.BgpId, err)
return return
} }

View File

@ -32,6 +32,7 @@ func (this *apiComp) Modifyfigure(session comm.IUserSession, req *pb.UserModifyf
if err := this.module.modelUser.Change(session.GetUserId(), update); err != nil { if err := this.module.modelUser.Change(session.GetUserId(), update); err != nil {
code = pb.ErrorCode_DBError code = pb.ErrorCode_DBError
this.module.Errorf("更新形象失败 uid:%v figureId:%v err:%v", session.GetUserId(), req.FigureId, err)
return return
} }

View File

@ -41,9 +41,11 @@ func (this *apiComp) Modifyname(session comm.IUserSession, req *pb.UserModifynam
//校验名称修改次数 //校验名称修改次数
if expand.ModifynameCount <= 0 { if expand.ModifynameCount <= 0 {
if code = this.module.ConsumeRes(session, globalCnf.Var, true); code != pb.ErrorCode_Success { code = this.module.ConsumeRes(session, globalCnf.Var, true)
if code != pb.ErrorCode_Success {
return return
} }
this.module.Infof("修改昵称 uid:%v 消耗:%v code:%v", session.GetUserId(), globalCnf.Var, code)
} }
//修改名称次数 //修改名称次数
@ -56,6 +58,7 @@ func (this *apiComp) Modifyname(session comm.IUserSession, req *pb.UserModifynam
} }
if err := this.module.modelExpand.ChangeUserExpand(session.GetUserId(), mc); err != nil { if err := this.module.modelExpand.ChangeUserExpand(session.GetUserId(), mc); err != nil {
code = pb.ErrorCode_DBError code = pb.ErrorCode_DBError
this.module.Errorf("更新昵称失败 uid:%v name:%v err:%v", session.GetUserId(), req.Name, err)
return return
} }

View File

@ -31,7 +31,10 @@ func (this *apiComp) Modifysign(session comm.IUserSession, req *pb.UserModifysig
update := map[string]interface{}{ update := map[string]interface{}{
"sign": req.Sign, "sign": req.Sign,
} }
this.module.ChangeUserExpand(session.GetUserId(), update) if err := this.module.ChangeUserExpand(session.GetUserId(), update); err != nil {
code = pb.ErrorCode_DBError
this.module.Errorf("更新签名失败 uid:%v sign:%v err:%v", session.GetUserId(), req.Sign, err)
}
} }
if err = session.SendMsg(string(this.module.GetType()), UserSubTypeModifySign, &pb.UserModifysignResp{ if err = session.SendMsg(string(this.module.GetType()), UserSubTypeModifySign, &pb.UserModifysignResp{

View File

@ -73,11 +73,10 @@ type DBRtask struct {
sizeCache protoimpl.SizeCache sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields unknownFields protoimpl.UnknownFields
Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id" bson:"_id"` //ID Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id" bson:"_id"` //ID
Uid string `protobuf:"bytes,2,opt,name=uid,proto3" json:"uid" bson:"uid"` //用户ID Uid string `protobuf:"bytes,2,opt,name=uid,proto3" json:"uid" bson:"uid"` //用户ID
FrtaskIds map[int32]*FrtaskIds `protobuf:"bytes,3,rep,name=frtaskIds,proto3" json:"frtaskIds" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3" bson:"frtaskIds"` //已完成的任务Id FrtaskIds map[int32]*FrtaskIds `protobuf:"bytes,3,rep,name=frtaskIds,proto3" json:"frtaskIds" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3" bson:"frtaskIds"` //已完成的任务Id
NextRtaskId int32 `protobuf:"varint,4,opt,name=nextRtaskId,proto3" json:"nextRtaskId" bson:"nextRtaskId"` //下个任务Id IsReward bool `protobuf:"varint,5,opt,name=isReward,proto3" json:"isReward" bson:"isReward"` //接收奖励
IsReward bool `protobuf:"varint,5,opt,name=isReward,proto3" json:"isReward" bson:"isReward"` //接收奖励
} }
func (x *DBRtask) Reset() { func (x *DBRtask) Reset() {
@ -133,13 +132,6 @@ func (x *DBRtask) GetFrtaskIds() map[int32]*FrtaskIds {
return nil return nil
} }
func (x *DBRtask) GetNextRtaskId() int32 {
if x != nil {
return x.NextRtaskId
}
return 0
}
func (x *DBRtask) GetIsReward() bool { func (x *DBRtask) GetIsReward() bool {
if x != nil { if x != nil {
return x.IsReward return x.IsReward
@ -281,43 +273,41 @@ var file_rtask_rtask_db_proto_rawDesc = []byte{
0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x27, 0x0a, 0x09, 0x66, 0x72, 0x74, 0x61, 0x73, 0x6b, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x27, 0x0a, 0x09, 0x66, 0x72, 0x74, 0x61, 0x73, 0x6b,
0x49, 0x64, 0x73, 0x12, 0x1a, 0x0a, 0x08, 0x72, 0x74, 0x61, 0x73, 0x6b, 0x49, 0x64, 0x73, 0x18, 0x49, 0x64, 0x73, 0x12, 0x1a, 0x0a, 0x08, 0x72, 0x74, 0x61, 0x73, 0x6b, 0x49, 0x64, 0x73, 0x18,
0x01, 0x20, 0x03, 0x28, 0x05, 0x52, 0x08, 0x72, 0x74, 0x61, 0x73, 0x6b, 0x49, 0x64, 0x73, 0x22, 0x01, 0x20, 0x03, 0x28, 0x05, 0x52, 0x08, 0x72, 0x74, 0x61, 0x73, 0x6b, 0x49, 0x64, 0x73, 0x22,
0xea, 0x01, 0x0a, 0x07, 0x44, 0x42, 0x52, 0x74, 0x61, 0x73, 0x6b, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0xc8, 0x01, 0x0a, 0x07, 0x44, 0x42, 0x52, 0x74, 0x61, 0x73, 0x6b, 0x12, 0x0e, 0x0a, 0x02, 0x69,
0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x10, 0x0a, 0x03, 0x75,
0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, 0x69, 0x64, 0x12, 0x35, 0x0a, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, 0x69, 0x64, 0x12, 0x35, 0x0a,
0x09, 0x66, 0x72, 0x74, 0x61, 0x73, 0x6b, 0x49, 0x64, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x09, 0x66, 0x72, 0x74, 0x61, 0x73, 0x6b, 0x49, 0x64, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b,
0x32, 0x17, 0x2e, 0x44, 0x42, 0x52, 0x74, 0x61, 0x73, 0x6b, 0x2e, 0x46, 0x72, 0x74, 0x61, 0x73, 0x32, 0x17, 0x2e, 0x44, 0x42, 0x52, 0x74, 0x61, 0x73, 0x6b, 0x2e, 0x46, 0x72, 0x74, 0x61, 0x73,
0x6b, 0x49, 0x64, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x09, 0x66, 0x72, 0x74, 0x61, 0x73, 0x6b, 0x49, 0x64, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x09, 0x66, 0x72, 0x74, 0x61, 0x73,
0x6b, 0x49, 0x64, 0x73, 0x12, 0x20, 0x0a, 0x0b, 0x6e, 0x65, 0x78, 0x74, 0x52, 0x74, 0x61, 0x73, 0x6b, 0x49, 0x64, 0x73, 0x12, 0x1a, 0x0a, 0x08, 0x69, 0x73, 0x52, 0x65, 0x77, 0x61, 0x72, 0x64,
0x6b, 0x49, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0b, 0x6e, 0x65, 0x78, 0x74, 0x52, 0x18, 0x05, 0x20, 0x01, 0x28, 0x08, 0x52, 0x08, 0x69, 0x73, 0x52, 0x65, 0x77, 0x61, 0x72, 0x64,
0x74, 0x61, 0x73, 0x6b, 0x49, 0x64, 0x12, 0x1a, 0x0a, 0x08, 0x69, 0x73, 0x52, 0x65, 0x77, 0x61, 0x1a, 0x48, 0x0a, 0x0e, 0x46, 0x72, 0x74, 0x61, 0x73, 0x6b, 0x49, 0x64, 0x73, 0x45, 0x6e, 0x74,
0x72, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x08, 0x52, 0x08, 0x69, 0x73, 0x52, 0x65, 0x77, 0x61, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52,
0x72, 0x64, 0x1a, 0x48, 0x0a, 0x0e, 0x46, 0x72, 0x74, 0x61, 0x73, 0x6b, 0x49, 0x64, 0x73, 0x45, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x20, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20,
0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x01, 0x28, 0x0b, 0x32, 0x0a, 0x2e, 0x66, 0x72, 0x74, 0x61, 0x73, 0x6b, 0x49, 0x64, 0x73, 0x52,
0x05, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x20, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0xa2, 0x01, 0x0a, 0x09, 0x72,
0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0a, 0x2e, 0x66, 0x72, 0x74, 0x61, 0x73, 0x6b, 0x49, 0x64, 0x74, 0x61, 0x73, 0x6b, 0x44, 0x61, 0x74, 0x61, 0x12, 0x28, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61,
0x73, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0xa2, 0x01, 0x0a, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x72, 0x74, 0x61, 0x73, 0x6b, 0x44, 0x61,
0x09, 0x72, 0x74, 0x61, 0x73, 0x6b, 0x44, 0x61, 0x74, 0x61, 0x12, 0x28, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x44, 0x61, 0x74, 0x61, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x04, 0x64, 0x61,
0x74, 0x61, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x72, 0x74, 0x61, 0x73, 0x6b, 0x74, 0x61, 0x12, 0x14, 0x0a, 0x05, 0x72, 0x74, 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28,
0x44, 0x61, 0x74, 0x61, 0x2e, 0x44, 0x61, 0x74, 0x61, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x04, 0x05, 0x52, 0x05, 0x72, 0x74, 0x79, 0x70, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x74, 0x69, 0x6d, 0x65,
0x64, 0x61, 0x74, 0x61, 0x12, 0x14, 0x0a, 0x05, 0x72, 0x74, 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x74, 0x69, 0x6d,
0x01, 0x28, 0x05, 0x52, 0x05, 0x72, 0x74, 0x79, 0x70, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x74, 0x69, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x1a, 0x37, 0x0a, 0x09, 0x44, 0x61, 0x74, 0x61, 0x45, 0x6e,
0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x74, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05,
0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x1a, 0x37, 0x0a, 0x09, 0x44, 0x61, 0x74, 0x61, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02,
0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22,
0x28, 0x05, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0xa4, 0x01, 0x0a, 0x0d, 0x44, 0x42, 0x52, 0x74, 0x61, 0x73, 0x6b, 0x52, 0x65, 0x63, 0x6f, 0x72,
0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x64, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69,
0x01, 0x22, 0xa4, 0x01, 0x0a, 0x0d, 0x44, 0x42, 0x52, 0x74, 0x61, 0x73, 0x6b, 0x52, 0x65, 0x63, 0x64, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03,
0x6f, 0x72, 0x64, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x75, 0x69, 0x64, 0x12, 0x2c, 0x0a, 0x04, 0x76, 0x61, 0x6c, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28,
0x02, 0x69, 0x64, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x0b, 0x32, 0x18, 0x2e, 0x44, 0x42, 0x52, 0x74, 0x61, 0x73, 0x6b, 0x52, 0x65, 0x63, 0x6f, 0x72,
0x52, 0x03, 0x75, 0x69, 0x64, 0x12, 0x2c, 0x0a, 0x04, 0x76, 0x61, 0x6c, 0x73, 0x18, 0x03, 0x20, 0x64, 0x2e, 0x56, 0x61, 0x6c, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x04, 0x76, 0x61, 0x6c,
0x03, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x44, 0x42, 0x52, 0x74, 0x61, 0x73, 0x6b, 0x52, 0x65, 0x63, 0x73, 0x1a, 0x43, 0x0a, 0x09, 0x56, 0x61, 0x6c, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10,
0x6f, 0x72, 0x64, 0x2e, 0x56, 0x61, 0x6c, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x04, 0x76, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x03, 0x6b, 0x65, 0x79,
0x61, 0x6c, 0x73, 0x1a, 0x43, 0x0a, 0x09, 0x56, 0x61, 0x6c, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x20, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32,
0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x03, 0x6b, 0x0a, 0x2e, 0x72, 0x74, 0x61, 0x73, 0x6b, 0x44, 0x61, 0x74, 0x61, 0x52, 0x05, 0x76, 0x61, 0x6c,
0x65, 0x79, 0x12, 0x20, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x3b, 0x70, 0x62, 0x62, 0x06,
0x0b, 0x32, 0x0a, 0x2e, 0x72, 0x74, 0x61, 0x73, 0x6b, 0x44, 0x61, 0x74, 0x61, 0x52, 0x05, 0x76, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x3b, 0x70, 0x62,
0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
} }
var ( var (