提交修改
This commit is contained in:
parent
b94962d80c
commit
35b11e7247
@ -36,12 +36,12 @@ func (this *ModelTask) Init(service core.IService, module core.IModule, comp cor
|
||||
|
||||
// 查询完成的且未领取的任务 发现未领取返回true
|
||||
func (this *ModelTask) noReceiveTask(uid string, taskTag comm.TaskTag) (bool, error) {
|
||||
list := []*pb.DBTask{}
|
||||
if err := this.GetList(uid, &list); err != nil {
|
||||
var task *pb.DBTask
|
||||
if err := this.GetList(uid, &task); err != nil {
|
||||
this.moduleTask.Errorf("getTaskList err %v", err)
|
||||
return false, err
|
||||
}
|
||||
for _, v := range list {
|
||||
for _, v := range task.List {
|
||||
if v.Tag == int32(taskTag) && v.Status == 1 && v.Received == 0 {
|
||||
return true, nil
|
||||
}
|
||||
@ -51,15 +51,15 @@ func (this *ModelTask) noReceiveTask(uid string, taskTag comm.TaskTag) (bool, er
|
||||
|
||||
//获取玩家任务列表
|
||||
func (this *ModelTask) getTaskListByTag(uid string, taskTag comm.TaskTag) (newlist []*pb.DBTask) {
|
||||
list := []*pb.DBTask{}
|
||||
if err := this.GetList(uid, &list); err != nil {
|
||||
var task *pb.DBTask
|
||||
if err := this.GetList(uid, &task); err != nil {
|
||||
this.moduleTask.Errorf("getTaskList err %v", err)
|
||||
return
|
||||
}
|
||||
|
||||
// 排序
|
||||
sort.SliceStable(list, func(i, j int) bool {
|
||||
return list[i].Sort < list[j].Sort
|
||||
sort.SliceStable(task.List, func(i, j int) bool {
|
||||
return task.List[i].Sort < task.List[j].Sort
|
||||
})
|
||||
|
||||
dr := this.moduleTask.ModuleRtask.GetCondiData(uid)
|
||||
@ -68,9 +68,9 @@ func (this *ModelTask) getTaskListByTag(uid string, taskTag comm.TaskTag) (newli
|
||||
}
|
||||
|
||||
// 筛选出指定tag的任务
|
||||
var taskList []*pb.DBTask
|
||||
for _, v := range list {
|
||||
if v.Tag == int32(taskTag) {
|
||||
var taskList []*pb.TaskData
|
||||
for _, v := range task.List {
|
||||
if task.Tag == int32(taskTag) {
|
||||
if p, ok := dr.Vals[v.TypeId]; ok {
|
||||
if len(p.Data) > 0 {
|
||||
v.Progress = p.Data[0]
|
||||
@ -154,21 +154,24 @@ func (this *ModelTask) getTaskById(uid string, taskId int32) (newlist []*pb.DBTa
|
||||
//初始化任务
|
||||
func (this *ModelTask) initTask(uid string, taskTag comm.TaskTag) error {
|
||||
data := this.moduleTask.configure.getTaskByTag(int32(taskTag))
|
||||
objId := primitive.NewObjectID().Hex()
|
||||
task := &pb.DBTask{
|
||||
Uid: uid,
|
||||
Id: objId,
|
||||
}
|
||||
for _, cnf := range data {
|
||||
objId := primitive.NewObjectID().Hex()
|
||||
task := &pb.DBTask{
|
||||
Id: objId,
|
||||
Tag: cnf.IdTag,
|
||||
Uid: uid,
|
||||
task.List = append(task.List, &pb.TaskData{
|
||||
Tag: cnf.IdTag,
|
||||
TypeId: cnf.TypeId,
|
||||
TaskId: cnf.Key,
|
||||
Active: cnf.Active,
|
||||
Sort: cnf.IdList,
|
||||
}
|
||||
if err := this.AddList(uid, task.Id, task); err != nil {
|
||||
this.moduleTask.Errorf("initTask addlists err %v", err)
|
||||
return err
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
if err := this.AddList(uid, task.Id, task); err != nil {
|
||||
this.moduleTask.Errorf("initTask addlists err %v", err)
|
||||
return err
|
||||
}
|
||||
|
||||
return nil
|
||||
|
@ -406,7 +406,9 @@ type MainlineChallengeOverResp struct {
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
Data *DBMainline `protobuf:"bytes,1,opt,name=data,proto3" json:"data"` //当前章节信息
|
||||
Data *DBMainline `protobuf:"bytes,1,opt,name=data,proto3" json:"data"` //当前章节信息
|
||||
Newheros []string `protobuf:"bytes,2,rep,name=newheros,proto3" json:"newheros"` //获得的新英雄
|
||||
Olv int32 `protobuf:"varint,3,opt,name=olv,proto3" json:"olv"` //以前的等级
|
||||
}
|
||||
|
||||
func (x *MainlineChallengeOverResp) Reset() {
|
||||
@ -448,6 +450,20 @@ func (x *MainlineChallengeOverResp) GetData() *DBMainline {
|
||||
return nil
|
||||
}
|
||||
|
||||
func (x *MainlineChallengeOverResp) GetNewheros() []string {
|
||||
if x != nil {
|
||||
return x.Newheros
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (x *MainlineChallengeOverResp) GetOlv() int32 {
|
||||
if x != nil {
|
||||
return x.Olv
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
// 推送新章节
|
||||
type MainlineNewChapterPush struct {
|
||||
state protoimpl.MessageState
|
||||
@ -540,16 +556,19 @@ var file_mainline_mainline_msg_proto_rawDesc = []byte{
|
||||
0x6e, 0x65, 0x49, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x0a, 0x6d, 0x61, 0x69, 0x6e,
|
||||
0x6c, 0x69, 0x6e, 0x65, 0x49, 0x64, 0x12, 0x25, 0x0a, 0x06, 0x72, 0x65, 0x70, 0x6f, 0x72, 0x74,
|
||||
0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x42, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x52,
|
||||
0x65, 0x70, 0x6f, 0x72, 0x74, 0x52, 0x06, 0x72, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x22, 0x3c, 0x0a,
|
||||
0x65, 0x70, 0x6f, 0x72, 0x74, 0x52, 0x06, 0x72, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x22, 0x6a, 0x0a,
|
||||
0x19, 0x4d, 0x61, 0x69, 0x6e, 0x6c, 0x69, 0x6e, 0x65, 0x43, 0x68, 0x61, 0x6c, 0x6c, 0x65, 0x6e,
|
||||
0x67, 0x65, 0x4f, 0x76, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x12, 0x1f, 0x0a, 0x04, 0x64, 0x61,
|
||||
0x74, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0b, 0x2e, 0x44, 0x42, 0x4d, 0x61, 0x69,
|
||||
0x6e, 0x6c, 0x69, 0x6e, 0x65, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x22, 0x39, 0x0a, 0x16, 0x4d,
|
||||
0x61, 0x69, 0x6e, 0x6c, 0x69, 0x6e, 0x65, 0x4e, 0x65, 0x77, 0x43, 0x68, 0x61, 0x70, 0x74, 0x65,
|
||||
0x72, 0x50, 0x75, 0x73, 0x68, 0x12, 0x1f, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x01, 0x20,
|
||||
0x01, 0x28, 0x0b, 0x32, 0x0b, 0x2e, 0x44, 0x42, 0x4d, 0x61, 0x69, 0x6e, 0x6c, 0x69, 0x6e, 0x65,
|
||||
0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x3b, 0x70, 0x62, 0x62, 0x06,
|
||||
0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
|
||||
0x6e, 0x6c, 0x69, 0x6e, 0x65, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x12, 0x1a, 0x0a, 0x08, 0x6e,
|
||||
0x65, 0x77, 0x68, 0x65, 0x72, 0x6f, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, 0x08, 0x6e,
|
||||
0x65, 0x77, 0x68, 0x65, 0x72, 0x6f, 0x73, 0x12, 0x10, 0x0a, 0x03, 0x6f, 0x6c, 0x76, 0x18, 0x03,
|
||||
0x20, 0x01, 0x28, 0x05, 0x52, 0x03, 0x6f, 0x6c, 0x76, 0x22, 0x39, 0x0a, 0x16, 0x4d, 0x61, 0x69,
|
||||
0x6e, 0x6c, 0x69, 0x6e, 0x65, 0x4e, 0x65, 0x77, 0x43, 0x68, 0x61, 0x70, 0x74, 0x65, 0x72, 0x50,
|
||||
0x75, 0x73, 0x68, 0x12, 0x1f, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28,
|
||||
0x0b, 0x32, 0x0b, 0x2e, 0x44, 0x42, 0x4d, 0x61, 0x69, 0x6e, 0x6c, 0x69, 0x6e, 0x65, 0x52, 0x04,
|
||||
0x64, 0x61, 0x74, 0x61, 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x3b, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72,
|
||||
0x6f, 0x74, 0x6f, 0x33,
|
||||
}
|
||||
|
||||
var (
|
||||
|
301
pb/task_db.pb.go
301
pb/task_db.pb.go
@ -25,16 +25,11 @@ type DBTask struct {
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
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
|
||||
TaskId int32 `protobuf:"varint,3,opt,name=taskId,proto3" json:"taskId" bson:"taskId"` //任务Id
|
||||
Tag int32 `protobuf:"varint,4,opt,name=tag,proto3" json:"tag" bson:"tag"` //标签
|
||||
Progress int32 `protobuf:"varint,5,opt,name=progress,proto3" json:"progress" bson:"progress"` //任务进度/完成次数
|
||||
Active int32 `protobuf:"varint,6,opt,name=active,proto3" json:"active" bson:"active"` //活跃度
|
||||
Status int32 `protobuf:"varint,7,opt,name=status,proto3" json:"status" bson:"status"` // 任务状态 默认0未完成 1已完成
|
||||
Received int32 `protobuf:"varint,8,opt,name=received,proto3" json:"received" bson:"received"` //领取状态 默认0未领取 1已领取
|
||||
TypeId int32 `protobuf:"varint,9,opt,name=typeId,proto3" json:"typeId" bson:"typeId"`
|
||||
Sort int32 `protobuf:"varint,10,opt,name=sort,proto3" json:"sort" bson:"sort"`
|
||||
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
|
||||
DayList []*TaskData `protobuf:"bytes,4,rep,name=dayList,proto3" json:"dayList" bson:"dayList"` //日常任务列表
|
||||
WeekList []*TaskData `protobuf:"bytes,5,rep,name=weekList,proto3" json:"weekList" bson:"weekList"` //周常任务列表
|
||||
ActivityList []*ActivityData `protobuf:"bytes,6,rep,name=activityList,proto3" json:"activityList" bson:"activityList"` //活跃度列表
|
||||
}
|
||||
|
||||
func (x *DBTask) Reset() {
|
||||
@ -83,76 +78,44 @@ func (x *DBTask) GetUid() string {
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *DBTask) GetTaskId() int32 {
|
||||
func (x *DBTask) GetDayList() []*TaskData {
|
||||
if x != nil {
|
||||
return x.TaskId
|
||||
return x.DayList
|
||||
}
|
||||
return 0
|
||||
return nil
|
||||
}
|
||||
|
||||
func (x *DBTask) GetTag() int32 {
|
||||
func (x *DBTask) GetWeekList() []*TaskData {
|
||||
if x != nil {
|
||||
return x.Tag
|
||||
return x.WeekList
|
||||
}
|
||||
return 0
|
||||
return nil
|
||||
}
|
||||
|
||||
func (x *DBTask) GetProgress() int32 {
|
||||
func (x *DBTask) GetActivityList() []*ActivityData {
|
||||
if x != nil {
|
||||
return x.Progress
|
||||
return x.ActivityList
|
||||
}
|
||||
return 0
|
||||
return nil
|
||||
}
|
||||
|
||||
func (x *DBTask) GetActive() int32 {
|
||||
if x != nil {
|
||||
return x.Active
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *DBTask) GetStatus() int32 {
|
||||
if x != nil {
|
||||
return x.Status
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *DBTask) GetReceived() int32 {
|
||||
if x != nil {
|
||||
return x.Received
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *DBTask) GetTypeId() int32 {
|
||||
if x != nil {
|
||||
return x.TypeId
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *DBTask) GetSort() int32 {
|
||||
if x != nil {
|
||||
return x.Sort
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
type DBTaskActive struct {
|
||||
type TaskData struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
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
|
||||
RId int32 `protobuf:"varint,3,opt,name=rId,proto3" json:"rId" bson:"taskId"` //rewardId
|
||||
Tag int32 `protobuf:"varint,4,opt,name=tag,proto3" json:"tag" bson:"tag"` //标签
|
||||
Received int32 `protobuf:"varint,5,opt,name=received,proto3" json:"received" bson:"received"` //领取状态 默认0未领取 1已领取
|
||||
TaskId int32 `protobuf:"varint,3,opt,name=taskId,proto3" json:"taskId" bson:"taskId"` //任务Id
|
||||
Tag int32 `protobuf:"varint,4,opt,name=tag,proto3" json:"tag" bson:"tag"` //标签
|
||||
Progress int32 `protobuf:"varint,5,opt,name=progress,proto3" json:"progress" bson:"progress"` //任务进度/完成次数
|
||||
Active int32 `protobuf:"varint,6,opt,name=active,proto3" json:"active" bson:"active"` //活跃度
|
||||
Status int32 `protobuf:"varint,7,opt,name=status,proto3" json:"status" bson:"status"` // 任务状态 默认0未完成 1已完成
|
||||
Received int32 `protobuf:"varint,8,opt,name=received,proto3" json:"received" bson:"received"` //领取状态 默认0未领取 1已领取
|
||||
TypeId int32 `protobuf:"varint,9,opt,name=typeId,proto3" json:"typeId" bson:"typeId"`
|
||||
Sort int32 `protobuf:"varint,10,opt,name=sort,proto3" json:"sort" bson:"sort"`
|
||||
}
|
||||
|
||||
func (x *DBTaskActive) Reset() {
|
||||
*x = DBTaskActive{}
|
||||
func (x *TaskData) Reset() {
|
||||
*x = TaskData{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_task_task_db_proto_msgTypes[1]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
@ -160,13 +123,13 @@ func (x *DBTaskActive) Reset() {
|
||||
}
|
||||
}
|
||||
|
||||
func (x *DBTaskActive) String() string {
|
||||
func (x *TaskData) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*DBTaskActive) ProtoMessage() {}
|
||||
func (*TaskData) ProtoMessage() {}
|
||||
|
||||
func (x *DBTaskActive) ProtoReflect() protoreflect.Message {
|
||||
func (x *TaskData) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_task_task_db_proto_msgTypes[1]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
@ -178,40 +141,124 @@ func (x *DBTaskActive) ProtoReflect() protoreflect.Message {
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use DBTaskActive.ProtoReflect.Descriptor instead.
|
||||
func (*DBTaskActive) Descriptor() ([]byte, []int) {
|
||||
// Deprecated: Use TaskData.ProtoReflect.Descriptor instead.
|
||||
func (*TaskData) Descriptor() ([]byte, []int) {
|
||||
return file_task_task_db_proto_rawDescGZIP(), []int{1}
|
||||
}
|
||||
|
||||
func (x *DBTaskActive) GetId() string {
|
||||
func (x *TaskData) GetTaskId() int32 {
|
||||
if x != nil {
|
||||
return x.Id
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *DBTaskActive) GetUid() string {
|
||||
if x != nil {
|
||||
return x.Uid
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *DBTaskActive) GetRId() int32 {
|
||||
if x != nil {
|
||||
return x.RId
|
||||
return x.TaskId
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *DBTaskActive) GetTag() int32 {
|
||||
func (x *TaskData) GetTag() int32 {
|
||||
if x != nil {
|
||||
return x.Tag
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *DBTaskActive) GetReceived() int32 {
|
||||
func (x *TaskData) GetProgress() int32 {
|
||||
if x != nil {
|
||||
return x.Progress
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *TaskData) GetActive() int32 {
|
||||
if x != nil {
|
||||
return x.Active
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *TaskData) GetStatus() int32 {
|
||||
if x != nil {
|
||||
return x.Status
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *TaskData) GetReceived() int32 {
|
||||
if x != nil {
|
||||
return x.Received
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *TaskData) GetTypeId() int32 {
|
||||
if x != nil {
|
||||
return x.TypeId
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *TaskData) GetSort() int32 {
|
||||
if x != nil {
|
||||
return x.Sort
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
type ActivityData struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
RId int32 `protobuf:"varint,3,opt,name=rId,proto3" json:"rId" bson:"taskId"` //rewardId
|
||||
Tag int32 `protobuf:"varint,4,opt,name=tag,proto3" json:"tag" bson:"tag"` //标签
|
||||
Received int32 `protobuf:"varint,5,opt,name=received,proto3" json:"received" bson:"received"` //领取状态 默认0未领取 1已领取
|
||||
}
|
||||
|
||||
func (x *ActivityData) Reset() {
|
||||
*x = ActivityData{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_task_task_db_proto_msgTypes[2]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
}
|
||||
|
||||
func (x *ActivityData) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*ActivityData) ProtoMessage() {}
|
||||
|
||||
func (x *ActivityData) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_task_task_db_proto_msgTypes[2]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
return ms
|
||||
}
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use ActivityData.ProtoReflect.Descriptor instead.
|
||||
func (*ActivityData) Descriptor() ([]byte, []int) {
|
||||
return file_task_task_db_proto_rawDescGZIP(), []int{2}
|
||||
}
|
||||
|
||||
func (x *ActivityData) GetRId() int32 {
|
||||
if x != nil {
|
||||
return x.RId
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *ActivityData) GetTag() int32 {
|
||||
if x != nil {
|
||||
return x.Tag
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *ActivityData) GetReceived() int32 {
|
||||
if x != nil {
|
||||
return x.Received
|
||||
}
|
||||
@ -222,30 +269,36 @@ var File_task_task_db_proto protoreflect.FileDescriptor
|
||||
|
||||
var file_task_task_db_proto_rawDesc = []byte{
|
||||
0x0a, 0x12, 0x74, 0x61, 0x73, 0x6b, 0x2f, 0x74, 0x61, 0x73, 0x6b, 0x5f, 0x64, 0x62, 0x2e, 0x70,
|
||||
0x72, 0x6f, 0x74, 0x6f, 0x22, 0xe8, 0x01, 0x0a, 0x06, 0x44, 0x42, 0x54, 0x61, 0x73, 0x6b, 0x12,
|
||||
0x72, 0x6f, 0x74, 0x6f, 0x22, 0xa9, 0x01, 0x0a, 0x06, 0x44, 0x42, 0x54, 0x61, 0x73, 0x6b, 0x12,
|
||||
0x0e, 0x0a, 0x02, 0x69, 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, 0x16, 0x0a, 0x06, 0x74, 0x61, 0x73, 0x6b, 0x49, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28,
|
||||
0x05, 0x52, 0x06, 0x74, 0x61, 0x73, 0x6b, 0x49, 0x64, 0x12, 0x10, 0x0a, 0x03, 0x74, 0x61, 0x67,
|
||||
0x18, 0x04, 0x20, 0x01, 0x28, 0x05, 0x52, 0x03, 0x74, 0x61, 0x67, 0x12, 0x1a, 0x0a, 0x08, 0x70,
|
||||
0x72, 0x6f, 0x67, 0x72, 0x65, 0x73, 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x70,
|
||||
0x72, 0x6f, 0x67, 0x72, 0x65, 0x73, 0x73, 0x12, 0x16, 0x0a, 0x06, 0x61, 0x63, 0x74, 0x69, 0x76,
|
||||
0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x61, 0x63, 0x74, 0x69, 0x76, 0x65, 0x12,
|
||||
0x16, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x07, 0x20, 0x01, 0x28, 0x05, 0x52,
|
||||
0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x1a, 0x0a, 0x08, 0x72, 0x65, 0x63, 0x65, 0x69,
|
||||
0x76, 0x65, 0x64, 0x18, 0x08, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x72, 0x65, 0x63, 0x65, 0x69,
|
||||
0x76, 0x65, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x74, 0x79, 0x70, 0x65, 0x49, 0x64, 0x18, 0x09, 0x20,
|
||||
0x01, 0x28, 0x05, 0x52, 0x06, 0x74, 0x79, 0x70, 0x65, 0x49, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x73,
|
||||
0x6f, 0x72, 0x74, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x05, 0x52, 0x04, 0x73, 0x6f, 0x72, 0x74, 0x22,
|
||||
0x70, 0x0a, 0x0c, 0x44, 0x42, 0x54, 0x61, 0x73, 0x6b, 0x41, 0x63, 0x74, 0x69, 0x76, 0x65, 0x12,
|
||||
0x0e, 0x0a, 0x02, 0x69, 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, 0x10, 0x0a, 0x03, 0x72, 0x49, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x03,
|
||||
0x72, 0x49, 0x64, 0x12, 0x10, 0x0a, 0x03, 0x74, 0x61, 0x67, 0x18, 0x04, 0x20, 0x01, 0x28, 0x05,
|
||||
0x52, 0x03, 0x74, 0x61, 0x67, 0x12, 0x1a, 0x0a, 0x08, 0x72, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65,
|
||||
0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x72, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65,
|
||||
0x64, 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x3b, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f,
|
||||
0x33,
|
||||
0x64, 0x12, 0x23, 0x0a, 0x07, 0x64, 0x61, 0x79, 0x4c, 0x69, 0x73, 0x74, 0x18, 0x04, 0x20, 0x03,
|
||||
0x28, 0x0b, 0x32, 0x09, 0x2e, 0x54, 0x61, 0x73, 0x6b, 0x44, 0x61, 0x74, 0x61, 0x52, 0x07, 0x64,
|
||||
0x61, 0x79, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x25, 0x0a, 0x08, 0x77, 0x65, 0x65, 0x6b, 0x4c, 0x69,
|
||||
0x73, 0x74, 0x18, 0x05, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x09, 0x2e, 0x54, 0x61, 0x73, 0x6b, 0x44,
|
||||
0x61, 0x74, 0x61, 0x52, 0x08, 0x77, 0x65, 0x65, 0x6b, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x31, 0x0a,
|
||||
0x0c, 0x61, 0x63, 0x74, 0x69, 0x76, 0x69, 0x74, 0x79, 0x4c, 0x69, 0x73, 0x74, 0x18, 0x06, 0x20,
|
||||
0x03, 0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x41, 0x63, 0x74, 0x69, 0x76, 0x69, 0x74, 0x79, 0x44, 0x61,
|
||||
0x74, 0x61, 0x52, 0x0c, 0x61, 0x63, 0x74, 0x69, 0x76, 0x69, 0x74, 0x79, 0x4c, 0x69, 0x73, 0x74,
|
||||
0x22, 0xc8, 0x01, 0x0a, 0x08, 0x54, 0x61, 0x73, 0x6b, 0x44, 0x61, 0x74, 0x61, 0x12, 0x16, 0x0a,
|
||||
0x06, 0x74, 0x61, 0x73, 0x6b, 0x49, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x74,
|
||||
0x61, 0x73, 0x6b, 0x49, 0x64, 0x12, 0x10, 0x0a, 0x03, 0x74, 0x61, 0x67, 0x18, 0x04, 0x20, 0x01,
|
||||
0x28, 0x05, 0x52, 0x03, 0x74, 0x61, 0x67, 0x12, 0x1a, 0x0a, 0x08, 0x70, 0x72, 0x6f, 0x67, 0x72,
|
||||
0x65, 0x73, 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x70, 0x72, 0x6f, 0x67, 0x72,
|
||||
0x65, 0x73, 0x73, 0x12, 0x16, 0x0a, 0x06, 0x61, 0x63, 0x74, 0x69, 0x76, 0x65, 0x18, 0x06, 0x20,
|
||||
0x01, 0x28, 0x05, 0x52, 0x06, 0x61, 0x63, 0x74, 0x69, 0x76, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x73,
|
||||
0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x07, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x73, 0x74, 0x61,
|
||||
0x74, 0x75, 0x73, 0x12, 0x1a, 0x0a, 0x08, 0x72, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x64, 0x18,
|
||||
0x08, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x72, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x64, 0x12,
|
||||
0x16, 0x0a, 0x06, 0x74, 0x79, 0x70, 0x65, 0x49, 0x64, 0x18, 0x09, 0x20, 0x01, 0x28, 0x05, 0x52,
|
||||
0x06, 0x74, 0x79, 0x70, 0x65, 0x49, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x73, 0x6f, 0x72, 0x74, 0x18,
|
||||
0x0a, 0x20, 0x01, 0x28, 0x05, 0x52, 0x04, 0x73, 0x6f, 0x72, 0x74, 0x22, 0x4e, 0x0a, 0x0c, 0x41,
|
||||
0x63, 0x74, 0x69, 0x76, 0x69, 0x74, 0x79, 0x44, 0x61, 0x74, 0x61, 0x12, 0x10, 0x0a, 0x03, 0x72,
|
||||
0x49, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x03, 0x72, 0x49, 0x64, 0x12, 0x10, 0x0a,
|
||||
0x03, 0x74, 0x61, 0x67, 0x18, 0x04, 0x20, 0x01, 0x28, 0x05, 0x52, 0x03, 0x74, 0x61, 0x67, 0x12,
|
||||
0x1a, 0x0a, 0x08, 0x72, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28,
|
||||
0x05, 0x52, 0x08, 0x72, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x64, 0x42, 0x06, 0x5a, 0x04, 0x2e,
|
||||
0x3b, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
|
||||
}
|
||||
|
||||
var (
|
||||
@ -260,17 +313,21 @@ func file_task_task_db_proto_rawDescGZIP() []byte {
|
||||
return file_task_task_db_proto_rawDescData
|
||||
}
|
||||
|
||||
var file_task_task_db_proto_msgTypes = make([]protoimpl.MessageInfo, 2)
|
||||
var file_task_task_db_proto_msgTypes = make([]protoimpl.MessageInfo, 3)
|
||||
var file_task_task_db_proto_goTypes = []interface{}{
|
||||
(*DBTask)(nil), // 0: DBTask
|
||||
(*DBTaskActive)(nil), // 1: DBTaskActive
|
||||
(*TaskData)(nil), // 1: TaskData
|
||||
(*ActivityData)(nil), // 2: ActivityData
|
||||
}
|
||||
var file_task_task_db_proto_depIdxs = []int32{
|
||||
0, // [0:0] is the sub-list for method output_type
|
||||
0, // [0:0] is the sub-list for method input_type
|
||||
0, // [0:0] is the sub-list for extension type_name
|
||||
0, // [0:0] is the sub-list for extension extendee
|
||||
0, // [0:0] is the sub-list for field type_name
|
||||
1, // 0: DBTask.dayList:type_name -> TaskData
|
||||
1, // 1: DBTask.weekList:type_name -> TaskData
|
||||
2, // 2: DBTask.activityList:type_name -> ActivityData
|
||||
3, // [3:3] is the sub-list for method output_type
|
||||
3, // [3:3] is the sub-list for method input_type
|
||||
3, // [3:3] is the sub-list for extension type_name
|
||||
3, // [3:3] is the sub-list for extension extendee
|
||||
0, // [0:3] is the sub-list for field type_name
|
||||
}
|
||||
|
||||
func init() { file_task_task_db_proto_init() }
|
||||
@ -292,7 +349,19 @@ func file_task_task_db_proto_init() {
|
||||
}
|
||||
}
|
||||
file_task_task_db_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*DBTaskActive); i {
|
||||
switch v := v.(*TaskData); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
return &v.sizeCache
|
||||
case 2:
|
||||
return &v.unknownFields
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
file_task_task_db_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*ActivityData); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
@ -310,7 +379,7 @@ func file_task_task_db_proto_init() {
|
||||
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
|
||||
RawDescriptor: file_task_task_db_proto_rawDesc,
|
||||
NumEnums: 0,
|
||||
NumMessages: 2,
|
||||
NumMessages: 3,
|
||||
NumExtensions: 0,
|
||||
NumServices: 0,
|
||||
},
|
||||
|
@ -271,7 +271,7 @@ type TaskActiveListResp struct {
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
List []*DBTaskActive `protobuf:"bytes,1,rep,name=list,proto3" json:"list"` //活跃度列表
|
||||
List []*ActivityData `protobuf:"bytes,1,rep,name=list,proto3" json:"list"` //活跃度列表
|
||||
Active int32 `protobuf:"varint,2,opt,name=active,proto3" json:"active"` //活跃度值
|
||||
}
|
||||
|
||||
@ -307,7 +307,7 @@ func (*TaskActiveListResp) Descriptor() ([]byte, []int) {
|
||||
return file_task_task_msg_proto_rawDescGZIP(), []int{5}
|
||||
}
|
||||
|
||||
func (x *TaskActiveListResp) GetList() []*DBTaskActive {
|
||||
func (x *TaskActiveListResp) GetList() []*ActivityData {
|
||||
if x != nil {
|
||||
return x.List
|
||||
}
|
||||
@ -597,8 +597,8 @@ var file_task_task_msg_proto_rawDesc = []byte{
|
||||
0x61, 0x73, 0x6b, 0x54, 0x61, 0x67, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x07, 0x74, 0x61,
|
||||
0x73, 0x6b, 0x54, 0x61, 0x67, 0x22, 0x4f, 0x0a, 0x12, 0x54, 0x61, 0x73, 0x6b, 0x41, 0x63, 0x74,
|
||||
0x69, 0x76, 0x65, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x73, 0x70, 0x12, 0x21, 0x0a, 0x04, 0x6c,
|
||||
0x69, 0x73, 0x74, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x44, 0x42, 0x54, 0x61,
|
||||
0x73, 0x6b, 0x41, 0x63, 0x74, 0x69, 0x76, 0x65, 0x52, 0x04, 0x6c, 0x69, 0x73, 0x74, 0x12, 0x16,
|
||||
0x69, 0x73, 0x74, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x41, 0x63, 0x74, 0x69,
|
||||
0x76, 0x69, 0x74, 0x79, 0x44, 0x61, 0x74, 0x61, 0x52, 0x04, 0x6c, 0x69, 0x73, 0x74, 0x12, 0x16,
|
||||
0x0a, 0x06, 0x61, 0x63, 0x74, 0x69, 0x76, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06,
|
||||
0x61, 0x63, 0x74, 0x69, 0x76, 0x65, 0x22, 0x40, 0x0a, 0x14, 0x54, 0x61, 0x73, 0x6b, 0x41, 0x63,
|
||||
0x74, 0x69, 0x76, 0x65, 0x52, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x52, 0x65, 0x71, 0x12, 0x18,
|
||||
@ -647,11 +647,11 @@ var file_task_task_msg_proto_goTypes = []interface{}{
|
||||
(*TaskDoStrategyResp)(nil), // 9: TaskDoStrategyResp
|
||||
(*TaskFinishedPush)(nil), // 10: TaskFinishedPush
|
||||
(*DBTask)(nil), // 11: DBTask
|
||||
(*DBTaskActive)(nil), // 12: DBTaskActive
|
||||
(*ActivityData)(nil), // 12: ActivityData
|
||||
}
|
||||
var file_task_task_msg_proto_depIdxs = []int32{
|
||||
11, // 0: TaskListResp.list:type_name -> DBTask
|
||||
12, // 1: TaskActiveListResp.list:type_name -> DBTaskActive
|
||||
12, // 1: TaskActiveListResp.list:type_name -> ActivityData
|
||||
2, // [2:2] is the sub-list for method output_type
|
||||
2, // [2:2] is the sub-list for method input_type
|
||||
2, // [2:2] is the sub-list for extension type_name
|
||||
|
Loading…
Reference in New Issue
Block a user