...
|
...
|
@@ -150,7 +150,7 @@ func GetAuditList(param protocol.RequestAuditList, companyid int64, userid int64 |
|
|
}
|
|
|
|
|
|
type ResponseChanceInfo struct {
|
|
|
CreateTime int64 `json:"create_time"`
|
|
|
CreateTime string `json:"create_time"`
|
|
|
UserName string `json:"user_name"`
|
|
|
ChanceTypeName string `json:"chance_type_name"`
|
|
|
TemplateName string `json:"template_name"`
|
...
|
...
|
@@ -170,10 +170,10 @@ func GetChanceDetail(chanceid int64, companyid int64) (ResponseChanceInfo, error |
|
|
returnData = ResponseChanceInfo{
|
|
|
BaseContent: make([]protocol.InputElement, 0),
|
|
|
ExtraContent: make([]protocol.InputElement, 0),
|
|
|
ImageData: make([]models.ChanceDataImage, 0),
|
|
|
VideoData: make([]models.ChanceDataVideos, 0),
|
|
|
SpeechData: make([]models.ChanceDataSpeechs, 0),
|
|
|
FlowLog: make([]protocol.ChanceFlowLog, 0),
|
|
|
// ImageData: make([]models.ChanceDataImage, 0),
|
|
|
// VideoData: make([]models.ChanceDataVideos, 0),
|
|
|
// SpeechData: make([]models.ChanceDataSpeechs, 0),
|
|
|
// FlowLog: make([]protocol.ChanceFlowLog, 0),
|
|
|
}
|
|
|
)
|
|
|
chanceInfo, err = models.GetChanceById(chanceid)
|
...
|
...
|
@@ -185,7 +185,7 @@ func GetChanceDetail(chanceid int64, companyid int64) (ResponseChanceInfo, error |
|
|
log.Error("机会的公司不匹配")
|
|
|
return returnData, protocol.NewErrWithMessage("1")
|
|
|
}
|
|
|
returnData.CreateTime = chanceInfo.CreateAt.Unix()
|
|
|
returnData.CreateTime = chanceInfo.CreateAt.Format("2006-01-02 15:16:17")
|
|
|
|
|
|
var (
|
|
|
chanceContent []protocol.InputElement
|
...
|
...
|
@@ -202,6 +202,20 @@ func GetChanceDetail(chanceid int64, companyid int64) (ResponseChanceInfo, error |
|
|
returnData.ExtraContent = append(returnData.ExtraContent, chanceContent[i])
|
|
|
}
|
|
|
}
|
|
|
var (
|
|
|
imgData = make([]models.ChanceDataImage, 0)
|
|
|
videosData = make([]models.ChanceDataVideos, 0)
|
|
|
speechsData = make([]models.ChanceDataSpeechs, 0)
|
|
|
)
|
|
|
chancedata, err := models.GetChanceDataByChanceId(chanceid)
|
|
|
if err == nil {
|
|
|
json.Unmarshal([]byte(chancedata.Images), &imgData)
|
|
|
json.Unmarshal([]byte(chancedata.Videos), &videosData)
|
|
|
json.Unmarshal([]byte(chancedata.Speechs), &speechsData)
|
|
|
}
|
|
|
returnData.ImageData = imgData
|
|
|
returnData.VideoData = videosData
|
|
|
returnData.SpeechData = speechsData
|
|
|
ucompany, err := models.GetUserCompanyById(chanceInfo.UserId)
|
|
|
if err == nil {
|
|
|
userinfo, err := models.GetUserById(ucompany.UserId)
|
...
|
...
|
@@ -230,6 +244,7 @@ func GetChanceDetail(chanceid int64, companyid int64) (ResponseChanceInfo, error |
|
|
log.Warn("获取获取记录失败")
|
|
|
}
|
|
|
returnData.FlowLog = flowlogs
|
|
|
|
|
|
return returnData, nil
|
|
|
}
|
|
|
|
...
|
...
|
|