This commit is contained in:
wh_zcy 2023-03-13 19:26:13 +08:00
parent c63fb776d5
commit ae261afdad
8 changed files with 264 additions and 119 deletions

View File

@ -137,7 +137,7 @@ func (d *DispatchView) CreateView(t *model.TestCase) fyne.CanvasObject {
weekReceiveBtn := widget.NewButton("周奖励", func() {
if err := service.GetPttService().SendToClient(
t.MainType,
"weekreceive",
"weekrecive",
&pb.DispatchWeekReciveReq{
Idx: 1,
},
@ -174,6 +174,10 @@ func (a *DispatchView) noticeList() {
return
}
if rsp.Dispatch == nil {
return
}
a.noticeLabl.SetText(fmt.Sprintf("公告等级:%v 免费次数:%v 刷新次数:%v 任务数:%v 周任务数:%v 周奖励领取:%v",
rsp.Dispatch.Lv,
rsp.Dispatch.FreeCount,

View File

@ -40,6 +40,8 @@ func (a *apiComp) Autoreceive(session comm.IUserSession, req *pb.DispatchAutoRec
return
}
var rss []*pb.DispatchTaskRsp
//奖励
for _, t := range oldTasks {
gd, err := a.module.configure.getDispatchTaskConf(t.TaskId)
@ -48,11 +50,17 @@ func (a *apiComp) Autoreceive(session comm.IUserSession, req *pb.DispatchAutoRec
}
a.module.DispenseRes(session, gd.Reward, true)
rs := &pb.DispatchTaskRsp{
TaskId: t.TaskId,
}
if t.Exaward {
rs.Exaward = t.Exaward
a.module.DispenseRes(session, gd.Rewardex, true)
}
rss = append(rss, rs)
}
rsp.Task = rss
session.SendMsg(string(a.module.GetType()), "autoreceive", rsp)
return
}

View File

@ -21,10 +21,38 @@ func (a *apiComp) Notice(session comm.IUserSession, req *pb.DispatchNoticeReq) (
code = pb.ErrorCode_DataNotFound
return
}
uid := session.GetUserId()
rsp := &pb.DispatchNoticeResp{}
if len(d.Nb.Tasks) == 0 {
rsp.Dispatch = a.module.modelDispatch.initDispatch(session.GetUserId(), d)
tasks, err := a.module.modelDispatch.taskRandom(uid, d)
if err != nil {
return
}
if len(tasks) == 0 {
return
}
freeCount := a.module.configure.GetGlobalConf().DispatchFreecheck
ticketCount := a.module.configure.GetGlobalConf().DispatchNumoftimes
nb := &pb.Noticeboard{
Lv: 1, //公告初始升级
FreeCount: freeCount,
Tasks: tasks,
CreateTime: configure.Now().Unix(),
}
update := map[string]interface{}{
"nb": nb,
"ticket": ticketCount,
}
if err := a.module.modelDispatch.Change(uid, update); err != nil {
code = pb.ErrorCode_DBError
return
}
d.Nb = nb
} else {
//周任务重置
n := utils.DiffDays(d.Nb.CreateTime, configure.Now().Unix())
@ -35,9 +63,9 @@ func (a *apiComp) Notice(session comm.IUserSession, req *pb.DispatchNoticeReq) (
}
a.module.modelDispatch.updateNotice(session.GetUserId(), d)
rsp.Dispatch = d.Nb
}
rsp.Dispatch = d.Nb
session.SendMsg(string(a.module.GetType()), "notice", rsp)
return
}

View File

@ -42,7 +42,7 @@ func (a *apiComp) Receive(session comm.IUserSession, req *pb.DispatchReceiveReq)
return
}
tasks, oldTaskIds := a.module.modelDispatch.replaceTask(session.GetUserId(), req.TaskId, d)
tasks, oldTask := a.module.modelDispatch.replaceTask(session.GetUserId(), req.TaskId, d)
//更新公告任务
if err := a.module.modelDispatch.updateTasks(session.GetUserId(), d.Nb, tasks); err != nil {
@ -51,23 +51,24 @@ func (a *apiComp) Receive(session comm.IUserSession, req *pb.DispatchReceiveReq)
}
//奖励
for _, t := range oldTaskIds {
if t.TaskId == req.TaskId {
gd, err := a.module.configure.getDispatchTaskConf(t.TaskId)
if oldTask != nil && oldTask.TaskId == req.TaskId {
gd, err := a.module.configure.getDispatchTaskConf(oldTask.TaskId)
if err != nil {
break
}
a.module.DispenseRes(session, gd.Reward, true)
if t.Exaward {
if oldTask.Exaward {
a.module.DispenseRes(session, gd.Rewardex, true)
}
break
}
}
rsp := &pb.DispatchReceiveResp{
Rsp: &pb.DispatchTaskRsp{
TaskId: req.TaskId,
Exaward: oldTask.Exaward,
},
}
session.SendMsg(string(a.module.GetType()), "receive", rsp)

View File

@ -72,7 +72,7 @@ func (a *apiComp) Refresh(session comm.IUserSession, req *pb.DispatchRefreshReq)
rsp := &pb.DispatchRefreshResp{
FreeCount: d.Nb.FreeCount,
RefreshCount: d.Nb.FreeCount,
RefreshCount: d.Nb.RefreshCount,
}
session.SendMsg(string(a.module.GetType()), "refresh", rsp)

View File

@ -7,15 +7,15 @@ import (
"google.golang.org/protobuf/proto"
)
func (a *apiComp) WeekreceiveCheck(session comm.IUserSession, req *pb.DispatchWeekReciveReq) (code pb.ErrorCode) {
func (a *apiComp) WeekreciveCheck(session comm.IUserSession, req *pb.DispatchWeekReciveReq) (code pb.ErrorCode) {
if req.Idx == 0 {
code = pb.ErrorCode_ReqParameterError
}
return
}
func (a *apiComp) Weekreceive(session comm.IUserSession, req *pb.DispatchWeekReciveReq) (code pb.ErrorCode, data proto.Message) {
if code = a.WeekreceiveCheck(session, req); code != pb.ErrorCode_Success {
func (a *apiComp) Weekrecive(session comm.IUserSession, req *pb.DispatchWeekReciveReq) (code pb.ErrorCode, data proto.Message) {
if code = a.WeekreciveCheck(session, req); code != pb.ErrorCode_Success {
return
}
rsp := &pb.DispatchWeekReciveResp{}
@ -43,6 +43,6 @@ func (a *apiComp) Weekreceive(session comm.IUserSession, req *pb.DispatchWeekRec
}
}
session.SendMsg(string(a.module.GetType()), "weekreceive", rsp)
session.SendMsg(string(a.module.GetType()), "weekrecive", rsp)
return
}

View File

@ -32,6 +32,7 @@ func (this *modelDispatch) Init(service core.IService, module core.IModule, comp
}
// 初始玩家公告
// Deprecated
func (this *modelDispatch) initDispatch(uid string, dispatch *pb.DBDispatch) *pb.Noticeboard {
tasks, err := this.taskRandom(uid, dispatch)
if err != nil {
@ -91,11 +92,12 @@ func (this *modelDispatch) getTasksWeight(uid string, noticeLv int32) []int32 {
}
conf, err := this.module.configure.getDispatchLvConf(noticeLv)
if err != nil {
if err != nil || conf == nil {
this.module.Error("配置不存在", log.Field{Key: "error", Value: err})
return []int32{}
}
var items []*comm.WeightItem
items := make([]*comm.WeightItem, 0)
for i, v := range conf.Probability {
items = append(items, &comm.WeightItem{Id: (i + 1), Weight: int(v)})
}
@ -125,7 +127,7 @@ func (this *modelDispatch) taskRandom(uid string, dispatch *pb.DBDispatch) (task
}
conf, err := this.module.configure.getDispatchLvConf(dispatch.Nb.Lv)
if err != nil {
if err != nil || conf == nil {
return nil, err
}
@ -184,7 +186,10 @@ func (this *modelDispatch) taskRandom(uid string, dispatch *pb.DBDispatch) (task
}
//追加随机
for i := 0; i < randCount; i++ {
tasks = append(tasks, this.addRandomTask(uid, dispatch))
task := this.addRandomTask(uid, dispatch)
if task != nil {
tasks = append(tasks, task)
}
}
}
@ -193,6 +198,9 @@ func (this *modelDispatch) taskRandom(uid string, dispatch *pb.DBDispatch) (task
func (this *modelDispatch) addRandomTask(uid string, dispatch *pb.DBDispatch) *pb.DispatchTask {
randomTaskIds := this.getTasksWeight(uid, dispatch.Nb.Lv)
if len(randomTaskIds) == 0 {
return nil
}
//追加一条随机任务
ids := utils.RandomNumbers(1, len(randomTaskIds), 1)
if len(ids) <= 0 {
@ -214,7 +222,7 @@ func (this *modelDispatch) addRandomTask(uid string, dispatch *pb.DBDispatch) *p
}
// 替换指定的已完成任务
func (this *modelDispatch) replaceTask(uid string, taskId int32, dispatch *pb.DBDispatch) (tasks []*pb.DispatchTask, oldTaskIds []*pb.DispatchTask) {
func (this *modelDispatch) replaceTask(uid string, taskId int32, dispatch *pb.DBDispatch) (tasks []*pb.DispatchTask, oldTask *pb.DispatchTask) {
tasks = dispatch.Nb.Tasks
var randCount int
for i := 0; i < len(tasks); i++ {
@ -223,17 +231,20 @@ func (this *modelDispatch) replaceTask(uid string, taskId int32, dispatch *pb.DB
if taskId != tasks[i].TaskId {
continue
}
oldTaskIds = append(oldTaskIds, tasks[i])
oldTask = tasks[i]
//删除
tasks = append(tasks[:i], tasks[i+1:]...)
i--
randCount++
break
}
}
for i := 0; i < randCount; i++ {
tasks = append(tasks, this.addRandomTask(uid, dispatch))
if randCount > 0 {
task := this.addRandomTask(uid, dispatch)
if task != nil {
tasks = append(tasks, task)
}
}
return
}
@ -255,7 +266,10 @@ func (this *modelDispatch) replaceFinishedTask(uid string, dispatch *pb.DBDispat
}
for i := 0; i < randCount; i++ {
tasks = append(tasks, this.addRandomTask(uid, dispatch))
task := this.addRandomTask(uid, dispatch)
if task != nil {
tasks = append(tasks, task)
}
}
return
}
@ -397,12 +411,20 @@ func (this *modelDispatch) updateNotice(uid string, dispatch *pb.DBDispatch) err
dispatch.Nb.Tasks[i].LeftTime = 0
//升级
conf, err := this.module.configure.getDispatchLvConf(dispatch.Nb.Lv)
if err != nil || conf == nil {
return err
}
if dispatch.Nb.TaskCount >= conf.Upgrade {
//判断是否有下一等级
nextConf, err := this.module.configure.getDispatchLvConf(dispatch.Nb.Lv + 1)
if err != nil {
return err
}
if dispatch.Nb.WeekCount >= conf.Upgrade {
if nextConf != nil {
dispatch.Nb.Lv++
}
}
//累计任务数
dispatch.Nb.TaskCount++
dispatch.Nb.WeekCount++
@ -410,8 +432,6 @@ func (this *modelDispatch) updateNotice(uid string, dispatch *pb.DBDispatch) err
}
if dispatch.Nb.Tasks[i].Status == 0 {
this.module.Debug("uid", log.Field{Key: "duration", Value: dispatch.Nb.Tasks[i].Duration},
log.Field{Key: "now", Value: configure.Now().Unix()})
//判断到期时间
if dispatch.Nb.Tasks[i].Duration != 0 &&
dispatch.Nb.Tasks[i].Duration <= configure.Now().Unix() {
@ -423,8 +443,16 @@ func (this *modelDispatch) updateNotice(uid string, dispatch *pb.DBDispatch) err
}
}
this.module.Debug("随机数量:", log.Field{Key: "count", Value: randCount})
count := len(dispatch.Nb.Tasks)
if count < 6 {
randCount = 6 - count
}
for i := 0; i < randCount; i++ {
dispatch.Nb.Tasks = append(dispatch.Nb.Tasks, this.addRandomTask(uid, dispatch))
task := this.addRandomTask(uid, dispatch)
if task != nil {
dispatch.Nb.Tasks = append(dispatch.Nb.Tasks, task)
}
}
return this.updateTasks(uid, dispatch.Nb, dispatch.Nb.Tasks)

View File

@ -200,6 +200,61 @@ func (x *DispatchRefreshResp) GetRefreshCount() int32 {
return 0
}
type DispatchTaskRsp struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
TaskId int32 `protobuf:"varint,1,opt,name=taskId,proto3" json:"taskId"`
Exaward bool `protobuf:"varint,2,opt,name=exaward,proto3" json:"exaward"`
}
func (x *DispatchTaskRsp) Reset() {
*x = DispatchTaskRsp{}
if protoimpl.UnsafeEnabled {
mi := &file_dispatch_dispatch_msg_proto_msgTypes[4]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *DispatchTaskRsp) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*DispatchTaskRsp) ProtoMessage() {}
func (x *DispatchTaskRsp) ProtoReflect() protoreflect.Message {
mi := &file_dispatch_dispatch_msg_proto_msgTypes[4]
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 DispatchTaskRsp.ProtoReflect.Descriptor instead.
func (*DispatchTaskRsp) Descriptor() ([]byte, []int) {
return file_dispatch_dispatch_msg_proto_rawDescGZIP(), []int{4}
}
func (x *DispatchTaskRsp) GetTaskId() int32 {
if x != nil {
return x.TaskId
}
return 0
}
func (x *DispatchTaskRsp) GetExaward() bool {
if x != nil {
return x.Exaward
}
return false
}
// 领取任务奖励
type DispatchReceiveReq struct {
state protoimpl.MessageState
@ -212,7 +267,7 @@ type DispatchReceiveReq struct {
func (x *DispatchReceiveReq) Reset() {
*x = DispatchReceiveReq{}
if protoimpl.UnsafeEnabled {
mi := &file_dispatch_dispatch_msg_proto_msgTypes[4]
mi := &file_dispatch_dispatch_msg_proto_msgTypes[5]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@ -225,7 +280,7 @@ func (x *DispatchReceiveReq) String() string {
func (*DispatchReceiveReq) ProtoMessage() {}
func (x *DispatchReceiveReq) ProtoReflect() protoreflect.Message {
mi := &file_dispatch_dispatch_msg_proto_msgTypes[4]
mi := &file_dispatch_dispatch_msg_proto_msgTypes[5]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@ -238,7 +293,7 @@ func (x *DispatchReceiveReq) ProtoReflect() protoreflect.Message {
// Deprecated: Use DispatchReceiveReq.ProtoReflect.Descriptor instead.
func (*DispatchReceiveReq) Descriptor() ([]byte, []int) {
return file_dispatch_dispatch_msg_proto_rawDescGZIP(), []int{4}
return file_dispatch_dispatch_msg_proto_rawDescGZIP(), []int{5}
}
func (x *DispatchReceiveReq) GetTaskId() int32 {
@ -253,13 +308,13 @@ type DispatchReceiveResp struct {
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
TaskId int32 `protobuf:"varint,1,opt,name=taskId,proto3" json:"taskId"`
Rsp *DispatchTaskRsp `protobuf:"bytes,1,opt,name=rsp,proto3" json:"rsp"`
}
func (x *DispatchReceiveResp) Reset() {
*x = DispatchReceiveResp{}
if protoimpl.UnsafeEnabled {
mi := &file_dispatch_dispatch_msg_proto_msgTypes[5]
mi := &file_dispatch_dispatch_msg_proto_msgTypes[6]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@ -272,7 +327,7 @@ func (x *DispatchReceiveResp) String() string {
func (*DispatchReceiveResp) ProtoMessage() {}
func (x *DispatchReceiveResp) ProtoReflect() protoreflect.Message {
mi := &file_dispatch_dispatch_msg_proto_msgTypes[5]
mi := &file_dispatch_dispatch_msg_proto_msgTypes[6]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@ -285,14 +340,14 @@ func (x *DispatchReceiveResp) ProtoReflect() protoreflect.Message {
// Deprecated: Use DispatchReceiveResp.ProtoReflect.Descriptor instead.
func (*DispatchReceiveResp) Descriptor() ([]byte, []int) {
return file_dispatch_dispatch_msg_proto_rawDescGZIP(), []int{5}
return file_dispatch_dispatch_msg_proto_rawDescGZIP(), []int{6}
}
func (x *DispatchReceiveResp) GetTaskId() int32 {
func (x *DispatchReceiveResp) GetRsp() *DispatchTaskRsp {
if x != nil {
return x.TaskId
return x.Rsp
}
return 0
return nil
}
//一键领取任务奖励
@ -305,7 +360,7 @@ type DispatchAutoReceiveReq struct {
func (x *DispatchAutoReceiveReq) Reset() {
*x = DispatchAutoReceiveReq{}
if protoimpl.UnsafeEnabled {
mi := &file_dispatch_dispatch_msg_proto_msgTypes[6]
mi := &file_dispatch_dispatch_msg_proto_msgTypes[7]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@ -318,7 +373,7 @@ func (x *DispatchAutoReceiveReq) String() string {
func (*DispatchAutoReceiveReq) ProtoMessage() {}
func (x *DispatchAutoReceiveReq) ProtoReflect() protoreflect.Message {
mi := &file_dispatch_dispatch_msg_proto_msgTypes[6]
mi := &file_dispatch_dispatch_msg_proto_msgTypes[7]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@ -331,7 +386,7 @@ func (x *DispatchAutoReceiveReq) ProtoReflect() protoreflect.Message {
// Deprecated: Use DispatchAutoReceiveReq.ProtoReflect.Descriptor instead.
func (*DispatchAutoReceiveReq) Descriptor() ([]byte, []int) {
return file_dispatch_dispatch_msg_proto_rawDescGZIP(), []int{6}
return file_dispatch_dispatch_msg_proto_rawDescGZIP(), []int{7}
}
type DispatchAutoReceiveResp struct {
@ -339,13 +394,13 @@ type DispatchAutoReceiveResp struct {
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
TaskId []int32 `protobuf:"varint,1,rep,packed,name=taskId,proto3" json:"taskId"` //领取奖励的任务ID
Task []*DispatchTaskRsp `protobuf:"bytes,1,rep,name=task,proto3" json:"task"` //领取奖励的任务ID
}
func (x *DispatchAutoReceiveResp) Reset() {
*x = DispatchAutoReceiveResp{}
if protoimpl.UnsafeEnabled {
mi := &file_dispatch_dispatch_msg_proto_msgTypes[7]
mi := &file_dispatch_dispatch_msg_proto_msgTypes[8]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@ -358,7 +413,7 @@ func (x *DispatchAutoReceiveResp) String() string {
func (*DispatchAutoReceiveResp) ProtoMessage() {}
func (x *DispatchAutoReceiveResp) ProtoReflect() protoreflect.Message {
mi := &file_dispatch_dispatch_msg_proto_msgTypes[7]
mi := &file_dispatch_dispatch_msg_proto_msgTypes[8]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@ -371,12 +426,12 @@ func (x *DispatchAutoReceiveResp) ProtoReflect() protoreflect.Message {
// Deprecated: Use DispatchAutoReceiveResp.ProtoReflect.Descriptor instead.
func (*DispatchAutoReceiveResp) Descriptor() ([]byte, []int) {
return file_dispatch_dispatch_msg_proto_rawDescGZIP(), []int{7}
return file_dispatch_dispatch_msg_proto_rawDescGZIP(), []int{8}
}
func (x *DispatchAutoReceiveResp) GetTaskId() []int32 {
func (x *DispatchAutoReceiveResp) GetTask() []*DispatchTaskRsp {
if x != nil {
return x.TaskId
return x.Task
}
return nil
}
@ -394,7 +449,7 @@ type DispatchDoReq struct {
func (x *DispatchDoReq) Reset() {
*x = DispatchDoReq{}
if protoimpl.UnsafeEnabled {
mi := &file_dispatch_dispatch_msg_proto_msgTypes[8]
mi := &file_dispatch_dispatch_msg_proto_msgTypes[9]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@ -407,7 +462,7 @@ func (x *DispatchDoReq) String() string {
func (*DispatchDoReq) ProtoMessage() {}
func (x *DispatchDoReq) ProtoReflect() protoreflect.Message {
mi := &file_dispatch_dispatch_msg_proto_msgTypes[8]
mi := &file_dispatch_dispatch_msg_proto_msgTypes[9]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@ -420,7 +475,7 @@ func (x *DispatchDoReq) ProtoReflect() protoreflect.Message {
// Deprecated: Use DispatchDoReq.ProtoReflect.Descriptor instead.
func (*DispatchDoReq) Descriptor() ([]byte, []int) {
return file_dispatch_dispatch_msg_proto_rawDescGZIP(), []int{8}
return file_dispatch_dispatch_msg_proto_rawDescGZIP(), []int{9}
}
func (x *DispatchDoReq) GetTaskId() int32 {
@ -448,7 +503,7 @@ type DispatchDoResp struct {
func (x *DispatchDoResp) Reset() {
*x = DispatchDoResp{}
if protoimpl.UnsafeEnabled {
mi := &file_dispatch_dispatch_msg_proto_msgTypes[9]
mi := &file_dispatch_dispatch_msg_proto_msgTypes[10]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@ -461,7 +516,7 @@ func (x *DispatchDoResp) String() string {
func (*DispatchDoResp) ProtoMessage() {}
func (x *DispatchDoResp) ProtoReflect() protoreflect.Message {
mi := &file_dispatch_dispatch_msg_proto_msgTypes[9]
mi := &file_dispatch_dispatch_msg_proto_msgTypes[10]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@ -474,7 +529,7 @@ func (x *DispatchDoResp) ProtoReflect() protoreflect.Message {
// Deprecated: Use DispatchDoResp.ProtoReflect.Descriptor instead.
func (*DispatchDoResp) Descriptor() ([]byte, []int) {
return file_dispatch_dispatch_msg_proto_rawDescGZIP(), []int{9}
return file_dispatch_dispatch_msg_proto_rawDescGZIP(), []int{10}
}
func (x *DispatchDoResp) GetIsSucc() bool {
@ -496,7 +551,7 @@ type DispatchWeekReciveReq struct {
func (x *DispatchWeekReciveReq) Reset() {
*x = DispatchWeekReciveReq{}
if protoimpl.UnsafeEnabled {
mi := &file_dispatch_dispatch_msg_proto_msgTypes[10]
mi := &file_dispatch_dispatch_msg_proto_msgTypes[11]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@ -509,7 +564,7 @@ func (x *DispatchWeekReciveReq) String() string {
func (*DispatchWeekReciveReq) ProtoMessage() {}
func (x *DispatchWeekReciveReq) ProtoReflect() protoreflect.Message {
mi := &file_dispatch_dispatch_msg_proto_msgTypes[10]
mi := &file_dispatch_dispatch_msg_proto_msgTypes[11]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@ -522,7 +577,7 @@ func (x *DispatchWeekReciveReq) ProtoReflect() protoreflect.Message {
// Deprecated: Use DispatchWeekReciveReq.ProtoReflect.Descriptor instead.
func (*DispatchWeekReciveReq) Descriptor() ([]byte, []int) {
return file_dispatch_dispatch_msg_proto_rawDescGZIP(), []int{10}
return file_dispatch_dispatch_msg_proto_rawDescGZIP(), []int{11}
}
func (x *DispatchWeekReciveReq) GetIdx() int32 {
@ -543,7 +598,7 @@ type DispatchWeekReciveResp struct {
func (x *DispatchWeekReciveResp) Reset() {
*x = DispatchWeekReciveResp{}
if protoimpl.UnsafeEnabled {
mi := &file_dispatch_dispatch_msg_proto_msgTypes[11]
mi := &file_dispatch_dispatch_msg_proto_msgTypes[12]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@ -556,7 +611,7 @@ func (x *DispatchWeekReciveResp) String() string {
func (*DispatchWeekReciveResp) ProtoMessage() {}
func (x *DispatchWeekReciveResp) ProtoReflect() protoreflect.Message {
mi := &file_dispatch_dispatch_msg_proto_msgTypes[11]
mi := &file_dispatch_dispatch_msg_proto_msgTypes[12]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@ -569,7 +624,7 @@ func (x *DispatchWeekReciveResp) ProtoReflect() protoreflect.Message {
// Deprecated: Use DispatchWeekReciveResp.ProtoReflect.Descriptor instead.
func (*DispatchWeekReciveResp) Descriptor() ([]byte, []int) {
return file_dispatch_dispatch_msg_proto_rawDescGZIP(), []int{11}
return file_dispatch_dispatch_msg_proto_rawDescGZIP(), []int{12}
}
func (x *DispatchWeekReciveResp) GetIdx() int32 {
@ -597,31 +652,37 @@ var file_dispatch_dispatch_msg_proto_rawDesc = []byte{
0x72, 0x65, 0x65, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x09,
0x66, 0x72, 0x65, 0x65, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x22, 0x0a, 0x0c, 0x72, 0x65, 0x66,
0x72, 0x65, 0x73, 0x68, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52,
0x0c, 0x72, 0x65, 0x66, 0x72, 0x65, 0x73, 0x68, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0x2c, 0x0a,
0x12, 0x44, 0x69, 0x73, 0x70, 0x61, 0x74, 0x63, 0x68, 0x52, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65,
0x52, 0x65, 0x71, 0x12, 0x16, 0x0a, 0x06, 0x74, 0x61, 0x73, 0x6b, 0x49, 0x64, 0x18, 0x01, 0x20,
0x01, 0x28, 0x05, 0x52, 0x06, 0x74, 0x61, 0x73, 0x6b, 0x49, 0x64, 0x22, 0x2d, 0x0a, 0x13, 0x44,
0x69, 0x73, 0x70, 0x61, 0x74, 0x63, 0x68, 0x52, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x52, 0x65,
0x73, 0x70, 0x12, 0x16, 0x0a, 0x06, 0x74, 0x61, 0x73, 0x6b, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01,
0x28, 0x05, 0x52, 0x06, 0x74, 0x61, 0x73, 0x6b, 0x49, 0x64, 0x22, 0x18, 0x0a, 0x16, 0x44, 0x69,
0x73, 0x70, 0x61, 0x74, 0x63, 0x68, 0x41, 0x75, 0x74, 0x6f, 0x52, 0x65, 0x63, 0x65, 0x69, 0x76,
0x65, 0x52, 0x65, 0x71, 0x22, 0x31, 0x0a, 0x17, 0x44, 0x69, 0x73, 0x70, 0x61, 0x74, 0x63, 0x68,
0x41, 0x75, 0x74, 0x6f, 0x52, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x52, 0x65, 0x73, 0x70, 0x12,
0x16, 0x0a, 0x06, 0x74, 0x61, 0x73, 0x6b, 0x49, 0x64, 0x18, 0x01, 0x20, 0x03, 0x28, 0x05, 0x52,
0x06, 0x74, 0x61, 0x73, 0x6b, 0x49, 0x64, 0x22, 0x41, 0x0a, 0x0d, 0x44, 0x69, 0x73, 0x70, 0x61,
0x74, 0x63, 0x68, 0x44, 0x6f, 0x52, 0x65, 0x71, 0x12, 0x16, 0x0a, 0x06, 0x74, 0x61, 0x73, 0x6b,
0x0c, 0x72, 0x65, 0x66, 0x72, 0x65, 0x73, 0x68, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0x43, 0x0a,
0x0f, 0x44, 0x69, 0x73, 0x70, 0x61, 0x74, 0x63, 0x68, 0x54, 0x61, 0x73, 0x6b, 0x52, 0x73, 0x70,
0x12, 0x16, 0x0a, 0x06, 0x74, 0x61, 0x73, 0x6b, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05,
0x52, 0x06, 0x74, 0x61, 0x73, 0x6b, 0x49, 0x64, 0x12, 0x18, 0x0a, 0x07, 0x65, 0x78, 0x61, 0x77,
0x61, 0x72, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, 0x65, 0x78, 0x61, 0x77, 0x61,
0x72, 0x64, 0x22, 0x2c, 0x0a, 0x12, 0x44, 0x69, 0x73, 0x70, 0x61, 0x74, 0x63, 0x68, 0x52, 0x65,
0x63, 0x65, 0x69, 0x76, 0x65, 0x52, 0x65, 0x71, 0x12, 0x16, 0x0a, 0x06, 0x74, 0x61, 0x73, 0x6b,
0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x74, 0x61, 0x73, 0x6b, 0x49, 0x64,
0x12, 0x18, 0x0a, 0x07, 0x68, 0x65, 0x72, 0x6f, 0x49, 0x64, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28,
0x09, 0x52, 0x07, 0x68, 0x65, 0x72, 0x6f, 0x49, 0x64, 0x73, 0x22, 0x28, 0x0a, 0x0e, 0x44, 0x69,
0x73, 0x70, 0x61, 0x74, 0x63, 0x68, 0x44, 0x6f, 0x52, 0x65, 0x73, 0x70, 0x12, 0x16, 0x0a, 0x06,
0x69, 0x73, 0x53, 0x75, 0x63, 0x63, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x06, 0x69, 0x73,
0x53, 0x75, 0x63, 0x63, 0x22, 0x29, 0x0a, 0x15, 0x44, 0x69, 0x73, 0x70, 0x61, 0x74, 0x63, 0x68,
0x57, 0x65, 0x65, 0x6b, 0x52, 0x65, 0x63, 0x69, 0x76, 0x65, 0x52, 0x65, 0x71, 0x12, 0x10, 0x0a,
0x03, 0x69, 0x64, 0x78, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x03, 0x69, 0x64, 0x78, 0x22,
0x2a, 0x0a, 0x16, 0x44, 0x69, 0x73, 0x70, 0x61, 0x74, 0x63, 0x68, 0x57, 0x65, 0x65, 0x6b, 0x52,
0x65, 0x63, 0x69, 0x76, 0x65, 0x52, 0x65, 0x73, 0x70, 0x12, 0x10, 0x0a, 0x03, 0x69, 0x64, 0x78,
0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x03, 0x69, 0x64, 0x78, 0x42, 0x06, 0x5a, 0x04, 0x2e,
0x3b, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
0x22, 0x39, 0x0a, 0x13, 0x44, 0x69, 0x73, 0x70, 0x61, 0x74, 0x63, 0x68, 0x52, 0x65, 0x63, 0x65,
0x69, 0x76, 0x65, 0x52, 0x65, 0x73, 0x70, 0x12, 0x22, 0x0a, 0x03, 0x72, 0x73, 0x70, 0x18, 0x01,
0x20, 0x01, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x44, 0x69, 0x73, 0x70, 0x61, 0x74, 0x63, 0x68, 0x54,
0x61, 0x73, 0x6b, 0x52, 0x73, 0x70, 0x52, 0x03, 0x72, 0x73, 0x70, 0x22, 0x18, 0x0a, 0x16, 0x44,
0x69, 0x73, 0x70, 0x61, 0x74, 0x63, 0x68, 0x41, 0x75, 0x74, 0x6f, 0x52, 0x65, 0x63, 0x65, 0x69,
0x76, 0x65, 0x52, 0x65, 0x71, 0x22, 0x3f, 0x0a, 0x17, 0x44, 0x69, 0x73, 0x70, 0x61, 0x74, 0x63,
0x68, 0x41, 0x75, 0x74, 0x6f, 0x52, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x52, 0x65, 0x73, 0x70,
0x12, 0x24, 0x0a, 0x04, 0x74, 0x61, 0x73, 0x6b, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x10,
0x2e, 0x44, 0x69, 0x73, 0x70, 0x61, 0x74, 0x63, 0x68, 0x54, 0x61, 0x73, 0x6b, 0x52, 0x73, 0x70,
0x52, 0x04, 0x74, 0x61, 0x73, 0x6b, 0x22, 0x41, 0x0a, 0x0d, 0x44, 0x69, 0x73, 0x70, 0x61, 0x74,
0x63, 0x68, 0x44, 0x6f, 0x52, 0x65, 0x71, 0x12, 0x16, 0x0a, 0x06, 0x74, 0x61, 0x73, 0x6b, 0x49,
0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x74, 0x61, 0x73, 0x6b, 0x49, 0x64, 0x12,
0x18, 0x0a, 0x07, 0x68, 0x65, 0x72, 0x6f, 0x49, 0x64, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09,
0x52, 0x07, 0x68, 0x65, 0x72, 0x6f, 0x49, 0x64, 0x73, 0x22, 0x28, 0x0a, 0x0e, 0x44, 0x69, 0x73,
0x70, 0x61, 0x74, 0x63, 0x68, 0x44, 0x6f, 0x52, 0x65, 0x73, 0x70, 0x12, 0x16, 0x0a, 0x06, 0x69,
0x73, 0x53, 0x75, 0x63, 0x63, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x06, 0x69, 0x73, 0x53,
0x75, 0x63, 0x63, 0x22, 0x29, 0x0a, 0x15, 0x44, 0x69, 0x73, 0x70, 0x61, 0x74, 0x63, 0x68, 0x57,
0x65, 0x65, 0x6b, 0x52, 0x65, 0x63, 0x69, 0x76, 0x65, 0x52, 0x65, 0x71, 0x12, 0x10, 0x0a, 0x03,
0x69, 0x64, 0x78, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x03, 0x69, 0x64, 0x78, 0x22, 0x2a,
0x0a, 0x16, 0x44, 0x69, 0x73, 0x70, 0x61, 0x74, 0x63, 0x68, 0x57, 0x65, 0x65, 0x6b, 0x52, 0x65,
0x63, 0x69, 0x76, 0x65, 0x52, 0x65, 0x73, 0x70, 0x12, 0x10, 0x0a, 0x03, 0x69, 0x64, 0x78, 0x18,
0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x03, 0x69, 0x64, 0x78, 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x3b,
0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
}
var (
@ -636,29 +697,32 @@ func file_dispatch_dispatch_msg_proto_rawDescGZIP() []byte {
return file_dispatch_dispatch_msg_proto_rawDescData
}
var file_dispatch_dispatch_msg_proto_msgTypes = make([]protoimpl.MessageInfo, 12)
var file_dispatch_dispatch_msg_proto_msgTypes = make([]protoimpl.MessageInfo, 13)
var file_dispatch_dispatch_msg_proto_goTypes = []interface{}{
(*DispatchNoticeReq)(nil), // 0: DispatchNoticeReq
(*DispatchNoticeResp)(nil), // 1: DispatchNoticeResp
(*DispatchRefreshReq)(nil), // 2: DispatchRefreshReq
(*DispatchRefreshResp)(nil), // 3: DispatchRefreshResp
(*DispatchReceiveReq)(nil), // 4: DispatchReceiveReq
(*DispatchReceiveResp)(nil), // 5: DispatchReceiveResp
(*DispatchAutoReceiveReq)(nil), // 6: DispatchAutoReceiveReq
(*DispatchAutoReceiveResp)(nil), // 7: DispatchAutoReceiveResp
(*DispatchDoReq)(nil), // 8: DispatchDoReq
(*DispatchDoResp)(nil), // 9: DispatchDoResp
(*DispatchWeekReciveReq)(nil), // 10: DispatchWeekReciveReq
(*DispatchWeekReciveResp)(nil), // 11: DispatchWeekReciveResp
(*Noticeboard)(nil), // 12: Noticeboard
(*DispatchTaskRsp)(nil), // 4: DispatchTaskRsp
(*DispatchReceiveReq)(nil), // 5: DispatchReceiveReq
(*DispatchReceiveResp)(nil), // 6: DispatchReceiveResp
(*DispatchAutoReceiveReq)(nil), // 7: DispatchAutoReceiveReq
(*DispatchAutoReceiveResp)(nil), // 8: DispatchAutoReceiveResp
(*DispatchDoReq)(nil), // 9: DispatchDoReq
(*DispatchDoResp)(nil), // 10: DispatchDoResp
(*DispatchWeekReciveReq)(nil), // 11: DispatchWeekReciveReq
(*DispatchWeekReciveResp)(nil), // 12: DispatchWeekReciveResp
(*Noticeboard)(nil), // 13: Noticeboard
}
var file_dispatch_dispatch_msg_proto_depIdxs = []int32{
12, // 0: DispatchNoticeResp.dispatch:type_name -> Noticeboard
1, // [1:1] is the sub-list for method output_type
1, // [1:1] is the sub-list for method input_type
1, // [1:1] is the sub-list for extension type_name
1, // [1:1] is the sub-list for extension extendee
0, // [0:1] is the sub-list for field type_name
13, // 0: DispatchNoticeResp.dispatch:type_name -> Noticeboard
4, // 1: DispatchReceiveResp.rsp:type_name -> DispatchTaskRsp
4, // 2: DispatchAutoReceiveResp.task:type_name -> DispatchTaskRsp
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_dispatch_dispatch_msg_proto_init() }
@ -717,7 +781,7 @@ func file_dispatch_dispatch_msg_proto_init() {
}
}
file_dispatch_dispatch_msg_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*DispatchReceiveReq); i {
switch v := v.(*DispatchTaskRsp); i {
case 0:
return &v.state
case 1:
@ -729,7 +793,7 @@ func file_dispatch_dispatch_msg_proto_init() {
}
}
file_dispatch_dispatch_msg_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*DispatchReceiveResp); i {
switch v := v.(*DispatchReceiveReq); i {
case 0:
return &v.state
case 1:
@ -741,7 +805,7 @@ func file_dispatch_dispatch_msg_proto_init() {
}
}
file_dispatch_dispatch_msg_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*DispatchAutoReceiveReq); i {
switch v := v.(*DispatchReceiveResp); i {
case 0:
return &v.state
case 1:
@ -753,7 +817,7 @@ func file_dispatch_dispatch_msg_proto_init() {
}
}
file_dispatch_dispatch_msg_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*DispatchAutoReceiveResp); i {
switch v := v.(*DispatchAutoReceiveReq); i {
case 0:
return &v.state
case 1:
@ -765,7 +829,7 @@ func file_dispatch_dispatch_msg_proto_init() {
}
}
file_dispatch_dispatch_msg_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*DispatchDoReq); i {
switch v := v.(*DispatchAutoReceiveResp); i {
case 0:
return &v.state
case 1:
@ -777,7 +841,7 @@ func file_dispatch_dispatch_msg_proto_init() {
}
}
file_dispatch_dispatch_msg_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*DispatchDoResp); i {
switch v := v.(*DispatchDoReq); i {
case 0:
return &v.state
case 1:
@ -789,7 +853,7 @@ func file_dispatch_dispatch_msg_proto_init() {
}
}
file_dispatch_dispatch_msg_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*DispatchWeekReciveReq); i {
switch v := v.(*DispatchDoResp); i {
case 0:
return &v.state
case 1:
@ -801,6 +865,18 @@ func file_dispatch_dispatch_msg_proto_init() {
}
}
file_dispatch_dispatch_msg_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*DispatchWeekReciveReq); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_dispatch_dispatch_msg_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*DispatchWeekReciveResp); i {
case 0:
return &v.state
@ -819,7 +895,7 @@ func file_dispatch_dispatch_msg_proto_init() {
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: file_dispatch_dispatch_msg_proto_rawDesc,
NumEnums: 0,
NumMessages: 12,
NumMessages: 13,
NumExtensions: 0,
NumServices: 0,
},