周任务结构更新
This commit is contained in:
parent
11f54ef56b
commit
20d3a6e4b6
@ -91,7 +91,7 @@ func (this *TaskListView) dataListener() {
|
|||||||
for _, v := range rsp.List {
|
for _, v := range rsp.List {
|
||||||
item := common.Item{
|
item := common.Item{
|
||||||
Id: cast.ToString(v.TaskId),
|
Id: cast.ToString(v.TaskId),
|
||||||
Text: fmt.Sprintf("%s 是否完成:%d 是否领奖:%d 进度:%d", cast.ToString(v.TaskId), v.Status, v.Received, v.Progress),
|
Text: fmt.Sprintf("%s 是否完成:%d 是否领奖:%d ", cast.ToString(v.TaskId), v.Status, v.Received),
|
||||||
}
|
}
|
||||||
this.itemList.AddItem(item)
|
this.itemList.AddItem(item)
|
||||||
}
|
}
|
||||||
|
@ -74,6 +74,9 @@ func (this *ModelTask) checkTaskStatus(uid string, list []*pb.TaskData) []*pb.Ta
|
|||||||
for _, cond := range conds {
|
for _, cond := range conds {
|
||||||
if v.TypeId == cond.Conid {
|
if v.TypeId == cond.Conid {
|
||||||
v.Cond = cond
|
v.Cond = cond
|
||||||
|
if cond.State == pb.BuriedItemFinishState_buried_finish {
|
||||||
|
v.Status = 1
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -145,7 +148,7 @@ func (this *ModelTask) getTaskListByTag(uid string, taskTag comm.TaskTag) *pb.DB
|
|||||||
|
|
||||||
// 成就列表
|
// 成就列表
|
||||||
var achieveList []*pb.TaskData
|
var achieveList []*pb.TaskData
|
||||||
|
|
||||||
if taskTag == comm.TASK_ACHIEVE {
|
if taskTag == comm.TASK_ACHIEVE {
|
||||||
for _, v := range task.AchieveList {
|
for _, v := range task.AchieveList {
|
||||||
if curTask := this.moduleTask.configure.getTaskById(v.TaskId); curTask != nil {
|
if curTask := this.moduleTask.configure.getTaskById(v.TaskId); curTask != nil {
|
||||||
@ -171,12 +174,12 @@ func (this *ModelTask) getTaskListByTag(uid string, taskTag comm.TaskTag) *pb.DB
|
|||||||
}
|
}
|
||||||
|
|
||||||
achieveList = this.checkTaskStatus(uid, achieveList)
|
achieveList = this.checkTaskStatus(uid, achieveList)
|
||||||
|
|
||||||
update["achieveList"] = achieveList
|
update["achieveList"] = achieveList
|
||||||
if err := this.moduleTask.modelTask.Change(uid, update); err != nil {
|
if err := this.moduleTask.modelTask.Change(uid, update); err != nil {
|
||||||
log.Error("err", log.Field{Key: "uid", Value: uid})
|
log.Error("err", log.Field{Key: "uid", Value: uid})
|
||||||
}
|
}
|
||||||
|
|
||||||
task.AchieveList = achieveList
|
task.AchieveList = achieveList
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user