...
|
...
|
@@ -794,6 +794,7 @@ func MySubmitChance(header *protocol.RequestHeader, request *protocol.MySubmitCh |
|
|
CreateTime: chance.CreateTime.Unix() * 1000,
|
|
|
}
|
|
|
jsonUnmarshal(chance.SourceContent, &item.FormList)
|
|
|
item.FormList = clearEmptyForm(item.FormList)
|
|
|
jsonUnmarshal(chance.Images, &item.Pictures)
|
|
|
jsonUnmarshal(chance.Voices, &item.Speechs)
|
|
|
jsonUnmarshal(chance.Videos, &item.Videos)
|
...
|
...
|
@@ -843,24 +844,31 @@ func MyApproveChance(header *protocol.RequestHeader, request *protocol.MyApprove |
|
|
//CreateTime: chance.CreateTime.Unix() * 1000,
|
|
|
}
|
|
|
jsonUnmarshal(chance.SourceContent, &item.FormList)
|
|
|
item.FormList = clearEmptyForm(item.FormList)
|
|
|
jsonUnmarshal(chance.Images, &item.Pictures)
|
|
|
jsonUnmarshal(chance.Voices, &item.Speechs)
|
|
|
jsonUnmarshal(chance.Videos, &item.Videos)
|
|
|
commItem.Chance = item
|
|
|
}
|
|
|
}
|
|
|
commItem.Approve = protocol.Approve{
|
|
|
approve := protocol.Approve{
|
|
|
ProcessId: chance.Id,
|
|
|
//Provider:provider,
|
|
|
CreateTime: chance.ProcessCreateTime.Unix() * 1000,
|
|
|
ApproveTime: chance.ApproveTime.Unix() * 1000,
|
|
|
CreateTime: chance.ProcessCreateTime.Unix() * 1000,
|
|
|
}
|
|
|
//审核过的才有审核时间
|
|
|
if request.ReviewStatus != protocol.ReviewStatusAuditging {
|
|
|
approve.ApproveTime = chance.ApproveTime.Unix() * 1000
|
|
|
}
|
|
|
commItem.Approve = approve
|
|
|
//审核完有审核数据
|
|
|
if request.ReviewStatus == protocol.ReviewStatusAuditging {
|
|
|
commItem.Message = chance.ApproveMessage
|
|
|
}
|
|
|
if request.ReviewStatus == protocol.ReviewStatusPass {
|
|
|
jsonUnmarshal(chance.ApproveData, &commItem.ApproveData)
|
|
|
var approveData *protocol.ApproveData
|
|
|
jsonUnmarshal(chance.ApproveData, &approveData)
|
|
|
commItem.Score = approveData.Score
|
|
|
}
|
|
|
rsp.List = append(rsp.List, commItem)
|
|
|
}
|
...
|
...
|
@@ -876,6 +884,20 @@ func jsonUnmarshal(jsonData string, v interface{}) { |
|
|
}
|
|
|
}
|
|
|
|
|
|
//清楚未填写的表单数据
|
|
|
func clearEmptyForm(inputFormList []*protocol.Form) (FormList []*protocol.Form) {
|
|
|
if len(inputFormList) == 0 {
|
|
|
return
|
|
|
}
|
|
|
for i := range inputFormList {
|
|
|
item := inputFormList[i]
|
|
|
if len(item.Value) > 0 {
|
|
|
FormList = append(FormList, item)
|
|
|
}
|
|
|
}
|
|
|
return
|
|
|
}
|
|
|
|
|
|
//机会详情
|
|
|
func ChanceDetail(header *protocol.RequestHeader, request *protocol.ChanceDetailRequest) (rsp *protocol.ChanceDetailResponse, err error) {
|
|
|
var (
|
...
|
...
|
|