作者 yangfu

修改 筛选历史项详情 / 筛选池(浏览数)

... ... @@ -695,6 +695,7 @@ func GetSiftingChance(uid int64, submitStatus int, checkResultStatus int, offset
sql := fmt.Sprintf(`select a.*,b.images,b.speechs,b.videos
from (
select a.*,b.user_id chance_user_id,b.source_content,b.enable_status,b.review_status,b.audit_template_id,b.chance_type_id,b.create_at,
b.view_total,
b.update_at,b.approve_time chance_approve_time,b.status,b.self_checks,b.check_result_status,b.check_time
from (
select max(id) id,approve_time,approve_data,uid,chance_id,submit_check_status,submit_check_time,level
... ... @@ -738,7 +739,8 @@ func GetSiftingResults(uid int64, submitStatus, checkResultStatus int, offset in
sql := fmt.Sprintf(`select a.*,b.images,b.speechs,b.videos
from (
select a.*,b.user_id chance_user_id,b.source_content,b.enable_status,b.review_status,b.audit_template_id,b.chance_type_id,b.create_at,
b.update_at,b.approve_time chance_approve_time,b.status,b.self_checks,b.check_result_status,b.check_time
b.view_total,
b.update_at,b.approve_time chance_approve_time,b.status,b.self_checks,b.check_result_status,b.check_time
from (
select max(id) id,approve_time,approve_data,uid,chance_id,submit_check_status,submit_check_time,level
from audit_flow_process a,(select MAX(id) AS max_id from audit_flow_process as t where t.uid=%v group by chance_id) b
... ...
... ... @@ -361,12 +361,14 @@ type SiftingResultsItemDetailRequest struct {
}
type SiftingResultsItemDetailResponse struct {
SiftingResultDetails []SiftingResultDetail `json:"siftingResultDetails"`
TotalSubmitters int `json:"totalSubmitters"` //总提交人数
}
//筛选结果详情
type SiftingResultDetail struct {
Option string `json:"option"` //选项:是 否 不清楚
Items SiftingCommitItems `json:"items"`
Option string `json:"option"` //选项:是 否 不清楚
Items SiftingCommitItems `json:"items"`
TotalSubmitters int `json:"totalSubmitters"` //总提交人数
}
//筛选结果提交人项
... ...
... ... @@ -40,6 +40,13 @@ func SiftingPool(header *protocol.RequestHeader, request *protocol.SiftingPoolRe
if request.SubmitStatus == protocol.Submited {
commItem.Chance.CreateTime = ormItem.SubmitCheckTime.Unix() * 1000
}
//点赞评论数据
var chanceData = protocol.ChanceData{
PageViewTotal: ormItem.ViewTotal,
}
commItem.ChanceData = chanceData
rsp.List = append(rsp.List, commItem)
}
... ... @@ -69,6 +76,12 @@ func SiftingResults(header *protocol.RequestHeader, request *protocol.SiftingRes
ormItem := ormItems[i]
commItem := agg.NewCommonListItem(header, ormItem.CommChanceItemOrm)
commItem.Chance.CreateTime = ormItem.CheckTime.Unix() * 1000
//点赞评论数据
var chanceData = protocol.ChanceData{
PageViewTotal: ormItem.ViewTotal,
}
commItem.ChanceData = chanceData
rsp.List = append(rsp.List, commItem)
}
return
... ... @@ -360,6 +373,7 @@ func SiftingResultsItemDetail(header *protocol.RequestHeader, request *protocol.
var (
checkResults []*models.ChanceCheckResult
sortList []string = []string{protocol.OptionYes, protocol.OptionNo, protocol.OptionNoCertain}
ids []int64
)
rsp = &protocol.SiftingResultsItemDetailResponse{}
if checkResults, err = models.GetCheckResultsByCheckId(request.ChanceId, request.CheckId); err != nil {
... ... @@ -398,8 +412,12 @@ func SiftingResultsItemDetail(header *protocol.RequestHeader, request *protocol.
}
for i := range sortList {
if v, ok := tmpMap[sortList[i]]; ok {
v.TotalSubmitters = len(v.Items)
rsp.SiftingResultDetails = append(rsp.SiftingResultDetails, v)
}
}
if ids, err = models.GetCheckResultAllSubmitters(request.ChanceId); err == nil {
rsp.TotalSubmitters = len(ids)
}
return
}
... ...