|
@@ -10,6 +10,7 @@ import (
|
|
|
"jybxseo/internal/consts"
|
|
|
"jybxseo/utility"
|
|
|
"strings"
|
|
|
+ "time"
|
|
|
)
|
|
|
|
|
|
type (
|
|
@@ -85,7 +86,12 @@ func (query *SeoBiddingQuery) dataFormat(data []map[string]interface{}) (bList [
|
|
|
if len(data) > 0 {
|
|
|
titleReduction := map[string]int{}
|
|
|
for _, v := range data {
|
|
|
- publishTime := gconv.Int64(v["publish_time"]) + 3600*24
|
|
|
+ var publishTime int64
|
|
|
+ if gconv.Int64(v["publish_time"])+3600*24 > time.Now().Unix() {
|
|
|
+ publishTime = gconv.Int64(v["publish_time"])
|
|
|
+ } else {
|
|
|
+ publishTime = gconv.Int64(v["publish_time"]) + 3600*24
|
|
|
+ }
|
|
|
bl := &InfoList{
|
|
|
Title: gconv.String(fmt.Sprintf("【%s】%s", consts.TopTypeMap[gconv.String(v["toptype"])], v["title"])),
|
|
|
Url: fmt.Sprintf("/jybx/%s_%s.html", gtime.NewFromTimeStamp(publishTime).Format("Ymd"), gconv.String(v["seo_id"])),
|
|
@@ -100,7 +106,6 @@ func (query *SeoBiddingQuery) dataFormat(data []map[string]interface{}) (bList [
|
|
|
if val := titleReduction[bl.Title]; val > 1 {
|
|
|
bl.Title = fmt.Sprintf("%s%d", bl.Title, val-1)
|
|
|
}
|
|
|
-
|
|
|
bl.PublishTime = publishTime //增加一天 更新天数
|
|
|
|
|
|
if gconv.String(v["area"]) == "剑鱼信息发布平台" {
|