@@ -323,3 +323,10 @@ func UpdateYanxuanSpecialMomentsImg(momentsImg string, id int) (err error) {
_, err = o.Raw(sql, momentsImg, id).Exec()
return
}
+
+func GetYanxuanSpecialListByconditioninit() (items []*CygxYanxuanSpecialItem, err error) {
+ o := orm.NewOrm()
+ sql := `SELECT a.* FROM cygx_yanxuan_special AS a WHERE 1=1 AND moments_img is NULL`
+ _, err = o.Raw(sql).QueryRows(&items)
+ return
+}
@@ -67,7 +67,15 @@ func Html2ImgHttpPost(url, postData string, params ...string) ([]byte, error) {
//func init() {
-// MakeYanxuanSpecialMomentsImg(185)
+// //MakeYanxuanSpecialMomentsImg(185)
+// list, err := models.GetYanxuanSpecialListByconditioninit()
+// if err != nil {
+// fmt.Println(err)
+// }
+// for _, v := range list {
+// fmt.Println(v.Id)
+// MakeYanxuanSpecialMomentsImg(v.Id)
//}
// 生成研选专栏分享到朋友圈的图片