|
@@ -398,7 +398,12 @@ func SyncTacticsListAddreport() (err error) {
|
|
|
// 7资金流向 、11大类资产 、51每日复盘 、80医药周报、9估值研究
|
|
|
if v.CategoryId == 7 || v.CategoryId == 11 || v.CategoryId == 51 || v.CategoryId == 9 {
|
|
|
if v.UpdateFrequency == "daily" {
|
|
|
- titleNew = v.Title + "(" + strconv.Itoa(v.PublishDate.Year())[2:len(strconv.Itoa(v.PublishDate.Year()))-0] + v.PublishDate.Format("01") + strconv.Itoa(v.PublishDate.Day()) + ")"
|
|
|
+ var daystr string
|
|
|
+ daystr = strconv.Itoa(v.PublishDate.Day())
|
|
|
+ if len(daystr) == 1 {
|
|
|
+ daystr = "0" + daystr
|
|
|
+ }
|
|
|
+ titleNew = v.Title + "(" + strconv.Itoa(v.PublishDate.Year())[2:len(strconv.Itoa(v.PublishDate.Year()))-0] + v.PublishDate.Format("01") + daystr + ")"
|
|
|
} else if v.UpdateFrequency == "weekly" {
|
|
|
titleNew = v.Title + utils.WeekByDate(v.PublishDate)
|
|
|
}
|
|
@@ -682,7 +687,9 @@ func BodyAnalysis2(body string) (expertNumStr, expertContentStr, interviewDateSt
|
|
|
numEnd := strings.Index(v, ".pdf")
|
|
|
fileLink = v[numStar : numEnd+4]
|
|
|
}
|
|
|
- body = strings.Replace(body, v, "", -1)
|
|
|
+ if strings.Index(v, ".pdf") > 0 {
|
|
|
+ body = strings.Replace(body, v, "", -1)
|
|
|
+ }
|
|
|
}
|
|
|
if !strings.HasPrefix(fileLink, "https") && len(fileLink) > 0 {
|
|
|
fileLink = "https" + fileLink[4:len(fileLink)]
|