作者 tangxvhui

bug 修复

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