|
@@ -150,7 +150,7 @@ func GetAuditList(param protocol.RequestAuditList, companyid int64, userid int64 |
|
@@ -150,7 +150,7 @@ func GetAuditList(param protocol.RequestAuditList, companyid int64, userid int64 |
150
|
}
|
150
|
}
|
151
|
|
151
|
|
152
|
type ResponseChanceInfo struct {
|
152
|
type ResponseChanceInfo struct {
|
153
|
- CreateTime int64 `json:"create_time"`
|
153
|
+ CreateTime string `json:"create_time"`
|
154
|
UserName string `json:"user_name"`
|
154
|
UserName string `json:"user_name"`
|
155
|
ChanceTypeName string `json:"chance_type_name"`
|
155
|
ChanceTypeName string `json:"chance_type_name"`
|
156
|
TemplateName string `json:"template_name"`
|
156
|
TemplateName string `json:"template_name"`
|
|
@@ -170,10 +170,10 @@ func GetChanceDetail(chanceid int64, companyid int64) (ResponseChanceInfo, error |
|
@@ -170,10 +170,10 @@ func GetChanceDetail(chanceid int64, companyid int64) (ResponseChanceInfo, error |
170
|
returnData = ResponseChanceInfo{
|
170
|
returnData = ResponseChanceInfo{
|
171
|
BaseContent: make([]protocol.InputElement, 0),
|
171
|
BaseContent: make([]protocol.InputElement, 0),
|
172
|
ExtraContent: make([]protocol.InputElement, 0),
|
172
|
ExtraContent: make([]protocol.InputElement, 0),
|
173
|
- ImageData: make([]models.ChanceDataImage, 0),
|
|
|
174
|
- VideoData: make([]models.ChanceDataVideos, 0),
|
|
|
175
|
- SpeechData: make([]models.ChanceDataSpeechs, 0),
|
|
|
176
|
- FlowLog: make([]protocol.ChanceFlowLog, 0),
|
173
|
+ // ImageData: make([]models.ChanceDataImage, 0),
|
|
|
174
|
+ // VideoData: make([]models.ChanceDataVideos, 0),
|
|
|
175
|
+ // SpeechData: make([]models.ChanceDataSpeechs, 0),
|
|
|
176
|
+ // FlowLog: make([]protocol.ChanceFlowLog, 0),
|
177
|
}
|
177
|
}
|
178
|
)
|
178
|
)
|
179
|
chanceInfo, err = models.GetChanceById(chanceid)
|
179
|
chanceInfo, err = models.GetChanceById(chanceid)
|
|
@@ -185,7 +185,7 @@ func GetChanceDetail(chanceid int64, companyid int64) (ResponseChanceInfo, error |
|
@@ -185,7 +185,7 @@ func GetChanceDetail(chanceid int64, companyid int64) (ResponseChanceInfo, error |
185
|
log.Error("机会的公司不匹配")
|
185
|
log.Error("机会的公司不匹配")
|
186
|
return returnData, protocol.NewErrWithMessage("1")
|
186
|
return returnData, protocol.NewErrWithMessage("1")
|
187
|
}
|
187
|
}
|
188
|
- returnData.CreateTime = chanceInfo.CreateAt.Unix()
|
188
|
+ returnData.CreateTime = chanceInfo.CreateAt.Format("2006-01-02 15:16:17")
|
189
|
|
189
|
|
190
|
var (
|
190
|
var (
|
191
|
chanceContent []protocol.InputElement
|
191
|
chanceContent []protocol.InputElement
|
|
@@ -202,6 +202,20 @@ func GetChanceDetail(chanceid int64, companyid int64) (ResponseChanceInfo, error |
|
@@ -202,6 +202,20 @@ func GetChanceDetail(chanceid int64, companyid int64) (ResponseChanceInfo, error |
202
|
returnData.ExtraContent = append(returnData.ExtraContent, chanceContent[i])
|
202
|
returnData.ExtraContent = append(returnData.ExtraContent, chanceContent[i])
|
203
|
}
|
203
|
}
|
204
|
}
|
204
|
}
|
|
|
205
|
+ var (
|
|
|
206
|
+ imgData = make([]models.ChanceDataImage, 0)
|
|
|
207
|
+ videosData = make([]models.ChanceDataVideos, 0)
|
|
|
208
|
+ speechsData = make([]models.ChanceDataSpeechs, 0)
|
|
|
209
|
+ )
|
|
|
210
|
+ chancedata, err := models.GetChanceDataByChanceId(chanceid)
|
|
|
211
|
+ if err == nil {
|
|
|
212
|
+ json.Unmarshal([]byte(chancedata.Images), &imgData)
|
|
|
213
|
+ json.Unmarshal([]byte(chancedata.Videos), &videosData)
|
|
|
214
|
+ json.Unmarshal([]byte(chancedata.Speechs), &speechsData)
|
|
|
215
|
+ }
|
|
|
216
|
+ returnData.ImageData = imgData
|
|
|
217
|
+ returnData.VideoData = videosData
|
|
|
218
|
+ returnData.SpeechData = speechsData
|
205
|
ucompany, err := models.GetUserCompanyById(chanceInfo.UserId)
|
219
|
ucompany, err := models.GetUserCompanyById(chanceInfo.UserId)
|
206
|
if err == nil {
|
220
|
if err == nil {
|
207
|
userinfo, err := models.GetUserById(ucompany.UserId)
|
221
|
userinfo, err := models.GetUserById(ucompany.UserId)
|
|
@@ -230,6 +244,7 @@ func GetChanceDetail(chanceid int64, companyid int64) (ResponseChanceInfo, error |
|
@@ -230,6 +244,7 @@ func GetChanceDetail(chanceid int64, companyid int64) (ResponseChanceInfo, error |
230
|
log.Warn("获取获取记录失败")
|
244
|
log.Warn("获取获取记录失败")
|
231
|
}
|
245
|
}
|
232
|
returnData.FlowLog = flowlogs
|
246
|
returnData.FlowLog = flowlogs
|
|
|
247
|
+
|
233
|
return returnData, nil
|
248
|
return returnData, nil
|
234
|
}
|
249
|
}
|
235
|
|
250
|
|