|
@@ -172,6 +172,11 @@ func SendToThs(sendDetailId, reportId int, reportType string) (err error) {
|
|
|
if tmpErr != nil {
|
|
|
err = tmpErr
|
|
|
}
|
|
|
+ case "研报线上路演":
|
|
|
+ tmpErr := SendYbRoadVideoToThs(reportId)
|
|
|
+ if tmpErr != nil {
|
|
|
+ err = tmpErr
|
|
|
+ }
|
|
|
case "研报价格驱动":
|
|
|
tmpErr := SendYbPriceDrivenToThs(reportId)
|
|
|
if tmpErr != nil {
|
|
@@ -538,6 +543,28 @@ func SendYbCommunityVideoToThs(videoId int) (err error) {
|
|
|
return
|
|
|
}
|
|
|
|
|
|
+// SendYbRoadVideoToThs 推送研报路演视频客群消息
|
|
|
+func SendYbRoadVideoToThs(videoId int) (err error) {
|
|
|
+ defer func() {
|
|
|
+ if err != nil {
|
|
|
+ go alarm_msg.SendAlarmMsg("SendYbRoadVideoToThs-延时任务发送报告至同花顺失败, RoadVideoId:"+strconv.Itoa(videoId)+", ErrMsg:"+err.Error(), 3)
|
|
|
+ }
|
|
|
+ }()
|
|
|
+ video, e := yb.GetRoadVideoById(videoId)
|
|
|
+ if e != nil {
|
|
|
+ err = errors.New("获取视频信息失败, Err:" + e.Error())
|
|
|
+ return
|
|
|
+ }
|
|
|
+ permissionName := "宏观" // 所有客群都推
|
|
|
+ title := video.Title
|
|
|
+ jumpUrl := fmt.Sprint(utils.WxYbAppId+`/pages/roadShowVideo/videoList?videoId=`, videoId)
|
|
|
+ logoUrl := `https://hongze.oss-cn-shanghai.aliyuncs.com/hzyj.png`
|
|
|
+ // 推送至同花顺
|
|
|
+ dataType := "2"
|
|
|
+ err = SendThs(title, permissionName, title, jumpUrl, logoUrl, dataType)
|
|
|
+ return
|
|
|
+}
|
|
|
+
|
|
|
// SendYbVoiceBroadcastToThs 推送研报小程序语音播报客群消息
|
|
|
func SendYbVoiceBroadcastToThs(voiceId int) (err error) {
|
|
|
defer func() {
|