添加世界任务group参数

This commit is contained in:
wh_zcy 2022-11-10 10:06:52 +08:00
parent 99c043fff7
commit 1f17b9ffe0
3 changed files with 6 additions and 2 deletions

View File

@ -49,6 +49,8 @@ func (this *WorldtaskMineView) CreateView(t *model.TestCase) fyne.CanvasObject {
// 接取任务
this.juqingBtn = widget.NewButton("接取任务", func() {
groupId := widget.NewEntry()
groupId.PlaceHolder = "分组ID"
taskIdEntry := widget.NewEntry()
taskIdEntry.PlaceHolder = "任务ID"
form := widget.NewForm(
@ -62,7 +64,8 @@ func (this *WorldtaskMineView) CreateView(t *model.TestCase) fyne.CanvasObject {
t.MainType,
worldtask.WorldtaskSubtypeFinish,
&pb.WorldtaskFinishReq{
TaskId: cast.ToInt32(taskIdEntry.Text),
GroupId: cast.ToInt32(groupId.Text),
TaskId: cast.ToInt32(taskIdEntry.Text),
}); err != nil {
logrus.Error(err)
}

View File

@ -274,6 +274,7 @@ func (this *ModuleRtask) SendToRtask(session comm.IUserSession, rtaskType comm.T
}, uid); err != nil {
log.Errorf("任务条件达成推送失败 err:%v", err)
}
log.Errorf("任务条件达成 uid:%v condId:%v", uid, v.cfg.Id)
module, err := this.service.GetModule(comm.ModuleWorldtask)
if err == nil {
if worldtask, ok := module.(comm.IWorldtask); ok {

View File

@ -10,7 +10,7 @@ import (
// 任务完成
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
}
return