|
@@ -226,7 +226,20 @@ func SendWxMsgSpecialAuthor(specialId, status int) (err error) {
|
|
|
}
|
|
|
|
|
|
//func init() {
|
|
|
-// UpdateYanxuanSpecialResourceData(185)
|
|
|
+//
|
|
|
+// var condition string
|
|
|
+// var pars []interface{}
|
|
|
+//
|
|
|
+// condition = " AND a.user_id = 103354 "
|
|
|
+// list, tmpErr := models.GetYanxuanSpecialList(0, condition, pars)
|
|
|
+//
|
|
|
+// fmt.Println(len(list))
|
|
|
+// fmt.Println(tmpErr)
|
|
|
+//
|
|
|
+// for _, v := range list {
|
|
|
+// fmt.Println(v.Id)
|
|
|
+// EsAddYanxuanSpecial(v.Id)
|
|
|
+// }
|
|
|
//}
|
|
|
|
|
|
// 更新研选专栏 写入首页最新 cygx_resource_data 表
|
|
@@ -261,7 +274,13 @@ func UpdateYanxuanSpecialResourceData(sourceId int) {
|
|
|
err = errors.New("GetCygxReportSelectionBySourceAndId, Err: " + e.Error())
|
|
|
return
|
|
|
}
|
|
|
- publishDate := time.Now().Format(utils.FormatDateTime)
|
|
|
+
|
|
|
+ detail, e := models.GetYanxuanSpecialBySpecialId(sourceId)
|
|
|
+ if e != nil {
|
|
|
+ err = errors.New("GetYanxuanSpecialBySpecialId, Err: " + e.Error())
|
|
|
+ return
|
|
|
+ }
|
|
|
+ publishDate := detail.PublishTime
|
|
|
item := new(models.CygxResourceData)
|
|
|
item.SourceId = sourceId
|
|
|
item.Source = source
|