作者 yangfu

修改 筛选池

... ... @@ -686,11 +686,7 @@ func (this *ChanceController) SiftingPool() {
msg = m
return
}
if request.SubmitStatus == protocol.Submiting {
request.SiftedStatus = protocol.None
} else if request.SubmitStatus == protocol.Submited {
request.SiftedStatus = protocol.None
} else {
if !(request.SubmitStatus == protocol.Submiting || request.SubmitStatus == protocol.Submited) {
msg = protocol.BadRequestParamWithMessage(2, "obj.SubmitStatus must in (0,1)")
return
}
... ...
... ... @@ -703,7 +703,7 @@ from (
where a.uid=%v and b.max_id=a.id and a.submit_check_status=%v and level>0
GROUP BY chance_id
)a left outer join chance b on a.chance_id = b.id
where b.review_status=3 and b.enable_status=1 and b.status=1 and b.check_result_status =%v and a.level=b.audit_level and length(b.self_checks)>5
where b.review_status=3 and b.enable_status=1 and b.status=1 and b.check_result_status <=%v and a.level=b.audit_level and length(b.self_checks)>5
)a left outer join chance_data b on a.chance_id =b.chance_id
%v
limit %v,%v`, uid, uid, submitStatus, checkResultStatus, where, offset, pageSize) //,update_at process_create_time
... ... @@ -718,7 +718,7 @@ from (
where a.uid=%v and b.max_id=a.id and a.submit_check_status=%v and level>0
GROUP BY chance_id
)a left outer join chance b on a.chance_id = b.id
where b.review_status=3 and b.enable_status=1 and b.status=1 and b.check_result_status =%v and a.level=b.audit_level and length(b.self_checks)>5
where b.review_status=3 and b.enable_status=1 and b.status=1 and b.check_result_status <=%v and a.level=b.audit_level and length(b.self_checks)>5
)a
`, uid, uid, submitStatus, checkResultStatus) //and enable_status =1
if err = utils.ExecuteQueryOne(&total, sqlCount); err != nil {
... ...
... ... @@ -25,7 +25,7 @@ func SiftingPool(header *protocol.RequestHeader, request *protocol.SiftingPoolRe
if request.Uid != 0 {
header.UserId = request.Uid
}
if rsp.Total, err = models.GetSiftingChance(header.UserId, request.SubmitStatus, request.SiftedStatus, request.Offset(), request.PageSize, &ormItems); err != nil {
if rsp.Total, err = models.GetSiftingChance(header.UserId, request.SubmitStatus, protocol.Waiting, request.Offset(), request.PageSize, &ormItems); err != nil {
if err == orm.ErrNoRows {
err = nil
return
... ... @@ -37,6 +37,8 @@ func SiftingPool(header *protocol.RequestHeader, request *protocol.SiftingPoolRe
ormItem := ormItems[i]
commItem := agg.NewCommonListItem(header, ormItem.CommChanceItemOrm)
commItem.Chance.CreateTime = ormItem.ChanceApproveTime.Unix() * 1000
commItem.Chance.UpdateTime = 0
commItem.Chance.ApproveTime = 0
if request.SubmitStatus == protocol.Submited {
commItem.Chance.CreateTime = ormItem.SubmitCheckTime.Unix() * 1000
}
... ... @@ -76,6 +78,8 @@ func SiftingResults(header *protocol.RequestHeader, request *protocol.SiftingRes
ormItem := ormItems[i]
commItem := agg.NewCommonListItem(header, ormItem.CommChanceItemOrm)
commItem.Chance.CreateTime = ormItem.CheckTime.Unix() * 1000
commItem.Chance.UpdateTime = 0
commItem.Chance.ApproveTime = 0
//点赞评论数据
var chanceData = protocol.ChanceData{
... ...