|
@@ -292,9 +292,9 @@ func SyncTacticsListAddreport() (err error) {
|
|
|
}()
|
|
|
fmt.Println("同步数据")
|
|
|
//indexName := utils.IndexName
|
|
|
- //endDate := time.Now().AddDate(0, 0, -30).Format(utils.FormatDate)
|
|
|
- //list, err := models.GetTacticsList2(endDate)
|
|
|
- list, err := models.GetTacticsListAll2()
|
|
|
+ endDate := time.Now().AddDate(0, 0, -30).Format(utils.FormatDate)
|
|
|
+ list, err := models.GetTacticsList2(endDate)
|
|
|
+ //list, err := models.GetTacticsListAll2()
|
|
|
if err != nil {
|
|
|
fmt.Println("GetTacticsList Err:", err.Error())
|
|
|
return
|
|
@@ -539,6 +539,7 @@ func SyncTacticsListToEs() (err error) {
|
|
|
//body 解析
|
|
|
func BodyAnalysis2(body string) (expertNumStr, expertContentStr, interviewDateStr, fileLink, bodyReturn string) {
|
|
|
body = html.UnescapeString(body)
|
|
|
+ //fmt.Println(body)
|
|
|
doc, err := goquery.NewDocumentFromReader(strings.NewReader(body))
|
|
|
if err != nil {
|
|
|
fmt.Println("create doc err:", err.Error())
|
|
@@ -659,9 +660,10 @@ func BodyAnalysis2(body string) (expertNumStr, expertContentStr, interviewDateSt
|
|
|
}
|
|
|
body = strings.Replace(body, "完整报告请点击链接:", "", -1)
|
|
|
body = strings.Replace(body, "PDF格式报告下载.pdf", "", -1)
|
|
|
+ body = strings.Replace(body, "报告全文():", "", -1)
|
|
|
}
|
|
|
bodyReturn = body
|
|
|
- //fmt.Println(body)
|
|
|
+ //fmt.Println(bodyReturn)
|
|
|
//fmt.Println("_________________")
|
|
|
//fmt.Println(fileLink)
|
|
|
//body = strings.Replace(body, "报告全文(", "", -1)
|