|
@@ -3,6 +3,7 @@ package community
|
|
|
import (
|
|
|
"errors"
|
|
|
"hongze/hongze_yb/models/response"
|
|
|
+ "hongze/hongze_yb/models/tables/company_product"
|
|
|
"hongze/hongze_yb/models/tables/yb_community_video"
|
|
|
"hongze/hongze_yb/models/tables/yb_community_video_play_log"
|
|
|
"hongze/hongze_yb/services/user"
|
|
@@ -60,9 +61,21 @@ func SaveVideoPlayLog(userInfo user.UserInfo, videoId, sourceAgent int) (errMsg
|
|
|
err = errors.New("获取视频信息失败, Err: " + e.Error())
|
|
|
return
|
|
|
}
|
|
|
+ companyInfo, e := company_product.GetByCompany2ProductId(userInfo.CompanyID, 1)
|
|
|
+ if e != nil {
|
|
|
+ errMsg = "保存失败"
|
|
|
+ err = errors.New("获取客户信息失败, Err: " + e.Error())
|
|
|
+ return
|
|
|
+ }
|
|
|
item := &yb_community_video_play_log.YbCommunityVideoPlayLog{
|
|
|
CommunityVideoID: video.CommunityVideoID,
|
|
|
UserID: int(userInfo.UserID),
|
|
|
+ Mobile: userInfo.Mobile,
|
|
|
+ RealName: userInfo.RealName,
|
|
|
+ NickName: userInfo.NickName,
|
|
|
+ CompanyID: int(userInfo.CompanyID),
|
|
|
+ CompanyName: companyInfo.CompanyName,
|
|
|
+ CompanyStatus: companyInfo.Status,
|
|
|
SourceAgent: sourceAgent,
|
|
|
CreateTime: time.Now().Local(),
|
|
|
}
|