|
@@ -134,3 +134,80 @@ func init12() {
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
+
|
|
|
+func initpy() {
|
|
|
+
|
|
|
+ //python3 main.py
|
|
|
+
|
|
|
+ var condition string
|
|
|
+ var pars []interface{}
|
|
|
+ //listVoice, err := cygx.GetActivityVoiceList(condition, pars)
|
|
|
+ //if err != nil && err.Error() != utils.ErrNoRow() {
|
|
|
+ // fmt.Println(err)
|
|
|
+ // return
|
|
|
+ //}
|
|
|
+ //
|
|
|
+ //for _, v := range listVoice {
|
|
|
+ // shareImg, _ := MakeCygxMp3HtmlImg(v.VoicePlaySeconds) //生成分享图片
|
|
|
+ // v.ShareImg = shareImg
|
|
|
+ // err = cygx.UpdateCygxActivityVoice(v)
|
|
|
+ // if err != nil {
|
|
|
+ // err = errors.New("UpdateCygxActivityVoice" + err.Error())
|
|
|
+ // return
|
|
|
+ // }
|
|
|
+ // fmt.Println(err)
|
|
|
+ //}
|
|
|
+
|
|
|
+ //listVideo, err := cygx.GetCygxActivityVideoList(condition, pars)
|
|
|
+ //if err != nil && err.Error() != utils.ErrNoRow() {
|
|
|
+ // fmt.Println(err)
|
|
|
+ // return
|
|
|
+ //}
|
|
|
+ //
|
|
|
+ //for _, v := range listVideo {
|
|
|
+ // shareImg, _ := MakeCygxMp4HtmlImg(v.VideoDuration) //生成分享图片
|
|
|
+ // v.ShareImg = shareImg
|
|
|
+ // err = cygx.UpdateCygxActivityVideo(v)
|
|
|
+ // if err != nil {
|
|
|
+ // err = errors.New("UpdateCygxActivityVideo" + err.Error())
|
|
|
+ // return
|
|
|
+ // }
|
|
|
+ // fmt.Println(err)
|
|
|
+ //}
|
|
|
+
|
|
|
+ //listVideo, err := cygx.GetCygxMicroRoadshowVideoList(condition, pars, 0, 1000)
|
|
|
+ //if err != nil && err.Error() != utils.ErrNoRow() {
|
|
|
+ // fmt.Println(err)
|
|
|
+ // return
|
|
|
+ //}
|
|
|
+ //
|
|
|
+ //for _, v := range listVideo {
|
|
|
+ // shareImg, _ := MakeCygxMp4HtmlImg(v.VideoDuration) //生成分享图片
|
|
|
+ // v.ShareImgUrl = shareImg
|
|
|
+ // err = cygx.UpdateCygxMicroRoadshowVideo(v)
|
|
|
+ // if err != nil {
|
|
|
+ // err = errors.New("UpdateCygxMicroRoadshowVideo" + err.Error())
|
|
|
+ // return
|
|
|
+ // }
|
|
|
+ // fmt.Println(err)
|
|
|
+ //}
|
|
|
+
|
|
|
+ listVoice, err := cygx.GetCygxAskserieVideoList(condition, pars, 0, 1000)
|
|
|
+ if err != nil && err.Error() != utils.ErrNoRow() {
|
|
|
+ fmt.Println(err)
|
|
|
+ return
|
|
|
+ }
|
|
|
+
|
|
|
+ for _, v := range listVoice {
|
|
|
+ shareImg, _ := MakeCygxMp3HtmlImg(v.VideoDuration) //生成分享图片
|
|
|
+ v.ShareImg = shareImg
|
|
|
+ err = cygx.EditCygxAskserieVideoShareImg(shareImg, v.AskserieVideoId)
|
|
|
+ if err != nil {
|
|
|
+ err = errors.New("EditCygxAskserieVideoShareImg" + err.Error())
|
|
|
+ return
|
|
|
+ }
|
|
|
+ fmt.Println(err)
|
|
|
+ }
|
|
|
+
|
|
|
+ return
|
|
|
+}
|