作者 yangfu

修改 筛选池

@@ -686,11 +686,7 @@ func (this *ChanceController) SiftingPool() { @@ -686,11 +686,7 @@ func (this *ChanceController) SiftingPool() {
686 msg = m 686 msg = m
687 return 687 return
688 } 688 }
689 - if request.SubmitStatus == protocol.Submiting {  
690 - request.SiftedStatus = protocol.None  
691 - } else if request.SubmitStatus == protocol.Submited {  
692 - request.SiftedStatus = protocol.None  
693 - } else { 689 + if !(request.SubmitStatus == protocol.Submiting || request.SubmitStatus == protocol.Submited) {
694 msg = protocol.BadRequestParamWithMessage(2, "obj.SubmitStatus must in (0,1)") 690 msg = protocol.BadRequestParamWithMessage(2, "obj.SubmitStatus must in (0,1)")
695 return 691 return
696 } 692 }
@@ -703,7 +703,7 @@ from ( @@ -703,7 +703,7 @@ from (
703 where a.uid=%v and b.max_id=a.id and a.submit_check_status=%v and level>0 703 where a.uid=%v and b.max_id=a.id and a.submit_check_status=%v and level>0
704 GROUP BY chance_id 704 GROUP BY chance_id
705 )a left outer join chance b on a.chance_id = b.id 705 )a left outer join chance b on a.chance_id = b.id
706 - 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 706 + 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
707 )a left outer join chance_data b on a.chance_id =b.chance_id 707 )a left outer join chance_data b on a.chance_id =b.chance_id
708 %v 708 %v
709 limit %v,%v`, uid, uid, submitStatus, checkResultStatus, where, offset, pageSize) //,update_at process_create_time 709 limit %v,%v`, uid, uid, submitStatus, checkResultStatus, where, offset, pageSize) //,update_at process_create_time
@@ -718,7 +718,7 @@ from ( @@ -718,7 +718,7 @@ from (
718 where a.uid=%v and b.max_id=a.id and a.submit_check_status=%v and level>0 718 where a.uid=%v and b.max_id=a.id and a.submit_check_status=%v and level>0
719 GROUP BY chance_id 719 GROUP BY chance_id
720 )a left outer join chance b on a.chance_id = b.id 720 )a left outer join chance b on a.chance_id = b.id
721 - 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 721 + 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
722 )a 722 )a
723 `, uid, uid, submitStatus, checkResultStatus) //and enable_status =1 723 `, uid, uid, submitStatus, checkResultStatus) //and enable_status =1
724 if err = utils.ExecuteQueryOne(&total, sqlCount); err != nil { 724 if err = utils.ExecuteQueryOne(&total, sqlCount); err != nil {
@@ -25,7 +25,7 @@ func SiftingPool(header *protocol.RequestHeader, request *protocol.SiftingPoolRe @@ -25,7 +25,7 @@ func SiftingPool(header *protocol.RequestHeader, request *protocol.SiftingPoolRe
25 if request.Uid != 0 { 25 if request.Uid != 0 {
26 header.UserId = request.Uid 26 header.UserId = request.Uid
27 } 27 }
28 - if rsp.Total, err = models.GetSiftingChance(header.UserId, request.SubmitStatus, request.SiftedStatus, request.Offset(), request.PageSize, &ormItems); err != nil { 28 + if rsp.Total, err = models.GetSiftingChance(header.UserId, request.SubmitStatus, protocol.Waiting, request.Offset(), request.PageSize, &ormItems); err != nil {
29 if err == orm.ErrNoRows { 29 if err == orm.ErrNoRows {
30 err = nil 30 err = nil
31 return 31 return
@@ -37,6 +37,8 @@ func SiftingPool(header *protocol.RequestHeader, request *protocol.SiftingPoolRe @@ -37,6 +37,8 @@ func SiftingPool(header *protocol.RequestHeader, request *protocol.SiftingPoolRe
37 ormItem := ormItems[i] 37 ormItem := ormItems[i]
38 commItem := agg.NewCommonListItem(header, ormItem.CommChanceItemOrm) 38 commItem := agg.NewCommonListItem(header, ormItem.CommChanceItemOrm)
39 commItem.Chance.CreateTime = ormItem.ChanceApproveTime.Unix() * 1000 39 commItem.Chance.CreateTime = ormItem.ChanceApproveTime.Unix() * 1000
  40 + commItem.Chance.UpdateTime = 0
  41 + commItem.Chance.ApproveTime = 0
40 if request.SubmitStatus == protocol.Submited { 42 if request.SubmitStatus == protocol.Submited {
41 commItem.Chance.CreateTime = ormItem.SubmitCheckTime.Unix() * 1000 43 commItem.Chance.CreateTime = ormItem.SubmitCheckTime.Unix() * 1000
42 } 44 }
@@ -76,6 +78,8 @@ func SiftingResults(header *protocol.RequestHeader, request *protocol.SiftingRes @@ -76,6 +78,8 @@ func SiftingResults(header *protocol.RequestHeader, request *protocol.SiftingRes
76 ormItem := ormItems[i] 78 ormItem := ormItems[i]
77 commItem := agg.NewCommonListItem(header, ormItem.CommChanceItemOrm) 79 commItem := agg.NewCommonListItem(header, ormItem.CommChanceItemOrm)
78 commItem.Chance.CreateTime = ormItem.CheckTime.Unix() * 1000 80 commItem.Chance.CreateTime = ormItem.CheckTime.Unix() * 1000
  81 + commItem.Chance.UpdateTime = 0
  82 + commItem.Chance.ApproveTime = 0
79 83
80 //点赞评论数据 84 //点赞评论数据
81 var chanceData = protocol.ChanceData{ 85 var chanceData = protocol.ChanceData{