作者 yangfu

修改 筛选池列表

... ... @@ -689,7 +689,7 @@ func (this *ChanceController) SiftingPool() {
if request.SubmitStatus == protocol.Submiting {
request.SiftedStatus = protocol.None
} else if request.SubmitStatus == protocol.Submited {
request.SiftedStatus = protocol.Waiting
request.SiftedStatus = protocol.None
} else {
msg = protocol.BadRequestParamWithMessage(2, "obj.SubmitStatus must in (0,1)")
return
... ...
... ... @@ -267,17 +267,18 @@ func GetCheckQuestionsByTemplateId(id int64) (rsp []*protocol.CheckQuestion, err
var tmpGroupId int64
var idx int = 0
var groupIdx = 0
var parentId = 0
for i := range checks {
c := checks[i]
if tmpGroupId != c.Pid {
groupIdx++
idx = 0
parentId = i + 1
}
tmpGroupId = c.Pid
item := protocol.NewCheckQuestion(c.Title, getQuestionTitle(groupIdx, idx, c.Title), c.Pid, protocol.CheckOptionsCommit)
item.Id = c.Id
item.ParentId = c.ParentId
item.Id, item.ParentId = genCustomizeQuestionId(i, idx, int64(parentId))
rsp = append(rsp, item)
idx++
}
... ... @@ -326,9 +327,9 @@ func GetCheckQuestionsByChanceId(header *protocol.RequestHeader, id int64) (rsp
item.Answer = c.Answer
}
}
if item.Id == 0 {
item.Id, item.ParentId = genCustomizeQuestionId(i, idx, int64(parentId))
}
//if item.Id == 0 {
item.Id, item.ParentId = genCustomizeQuestionId(i, idx, int64(parentId))
//}
rsp = append(rsp, item)
idx++
}
... ...