作者 tangxvhui

bug 修复

... ... @@ -79,7 +79,7 @@ func (c *OpenApiController) GetChangeMedia() {
chanceData, err = models.GetChanceDataByChanceId(chanceId)
rsp := []map[string]interface{}{}
if err != nil {
msg = protocol.NewReturnResponse(nil, nil)
msg = protocol.NewReturnResponse(rsp, nil)
return
}
json.Unmarshal([]byte(chanceData.Images), &imageData)
... ...
... ... @@ -149,7 +149,7 @@ func GetAuditListSql(param protocol.RequestAuditList, companyid int64, userid in
s1 := `SELECT a.id,a.department_id,a.audit_template_id,a.chance_type_id
,a.publish_status,a.create_at,a.review_status,a.status
,a.discovery_score,a.comment_total ,a.code,d.nick_name,d.id as user_id
,a.type,a.reserve_type_id,a.source_content
,a.type,a.reserve_type_id,a.source_content,a.approve_time
FROM chance AS a
JOIN user_company AS c ON c.id = a.user_id
JOIN user AS d ON c.user_id = d.id
... ...
... ... @@ -127,7 +127,9 @@ func GetAuditListForExcel(param protocol.RequestAuditList, companyid int64, user
frontHost = "https://mmm-web-open-test.fjmaimaimai.com/#/ability/opportunity/export-detail"
}
soureData[i]["media"] = fmt.Sprintf("%s?chance_id=%v&check_sum=%s", frontHost, soureData[i]["id"], signString)
if soureData[i]["review_status"] == "0" || soureData[i]["review_status"] == "1" {
soureData[i]["approve_time"] = ""
}
}
excelhead := []exceltool.ExcelHead{
exceltool.ExcelHead{Key: "type", Name: "类型"},
... ... @@ -138,12 +140,13 @@ func GetAuditListForExcel(param protocol.RequestAuditList, companyid int64, user
exceltool.ExcelHead{Key: "nick_name", Name: "提交人"},
exceltool.ExcelHead{Key: "department", Name: "提交部门"},
exceltool.ExcelHead{Key: "create_at", Name: "提交时间"},
exceltool.ExcelHead{Key: "approve_time", Name: "审批通过时间"}, //
exceltool.ExcelHead{Key: "publish_status", Name: "公开状态"},
exceltool.ExcelHead{Key: "review_status", Name: "审核状态"},
exceltool.ExcelHead{Key: "status", Name: "关闭状态"},
exceltool.ExcelHead{Key: "source_content", Name: "内容"},
exceltool.ExcelHead{Key: "media", Name: "视频/图片/语音"},
exceltool.ExcelHead{Key: "discovery_score", Name: "得分"},
exceltool.ExcelHead{Key: "discovery_score", Name: "发现得分"},
}
return soureData, excelhead
}
... ...