添加世界任务group参数
This commit is contained in:
parent
99c043fff7
commit
1f17b9ffe0
@ -49,6 +49,8 @@ func (this *WorldtaskMineView) CreateView(t *model.TestCase) fyne.CanvasObject {
|
|||||||
|
|
||||||
// 接取任务
|
// 接取任务
|
||||||
this.juqingBtn = widget.NewButton("接取任务", func() {
|
this.juqingBtn = widget.NewButton("接取任务", func() {
|
||||||
|
groupId := widget.NewEntry()
|
||||||
|
groupId.PlaceHolder = "分组ID"
|
||||||
taskIdEntry := widget.NewEntry()
|
taskIdEntry := widget.NewEntry()
|
||||||
taskIdEntry.PlaceHolder = "任务ID"
|
taskIdEntry.PlaceHolder = "任务ID"
|
||||||
form := widget.NewForm(
|
form := widget.NewForm(
|
||||||
@ -62,7 +64,8 @@ func (this *WorldtaskMineView) CreateView(t *model.TestCase) fyne.CanvasObject {
|
|||||||
t.MainType,
|
t.MainType,
|
||||||
worldtask.WorldtaskSubtypeFinish,
|
worldtask.WorldtaskSubtypeFinish,
|
||||||
&pb.WorldtaskFinishReq{
|
&pb.WorldtaskFinishReq{
|
||||||
TaskId: cast.ToInt32(taskIdEntry.Text),
|
GroupId: cast.ToInt32(groupId.Text),
|
||||||
|
TaskId: cast.ToInt32(taskIdEntry.Text),
|
||||||
}); err != nil {
|
}); err != nil {
|
||||||
logrus.Error(err)
|
logrus.Error(err)
|
||||||
}
|
}
|
||||||
|
@ -274,6 +274,7 @@ func (this *ModuleRtask) SendToRtask(session comm.IUserSession, rtaskType comm.T
|
|||||||
}, uid); err != nil {
|
}, uid); err != nil {
|
||||||
log.Errorf("任务条件达成推送失败 err:%v", err)
|
log.Errorf("任务条件达成推送失败 err:%v", err)
|
||||||
}
|
}
|
||||||
|
log.Errorf("任务条件达成 uid:%v condId:%v", uid, v.cfg.Id)
|
||||||
module, err := this.service.GetModule(comm.ModuleWorldtask)
|
module, err := this.service.GetModule(comm.ModuleWorldtask)
|
||||||
if err == nil {
|
if err == nil {
|
||||||
if worldtask, ok := module.(comm.IWorldtask); ok {
|
if worldtask, ok := module.(comm.IWorldtask); ok {
|
||||||
|
@ -10,7 +10,7 @@ import (
|
|||||||
// 任务完成
|
// 任务完成
|
||||||
|
|
||||||
func (this *apiComp) FinishCheck(session comm.IUserSession, req *pb.WorldtaskFinishReq) (code pb.ErrorCode) {
|
func (this *apiComp) FinishCheck(session comm.IUserSession, req *pb.WorldtaskFinishReq) (code pb.ErrorCode) {
|
||||||
if req.TaskId == 0 {
|
if req.GroupId == 0 || req.TaskId == 0 {
|
||||||
code = pb.ErrorCode_ReqParameterError
|
code = pb.ErrorCode_ReqParameterError
|
||||||
}
|
}
|
||||||
return
|
return
|
||||||
|
Loading…
Reference in New Issue
Block a user