Browse Source

fix:seo发布时间展示问题修改

duxin 2 months ago
parent
commit
80eb522545
2 changed files with 2 additions and 2 deletions
  1. 1 1
      internal/service/detailStruct.go
  2. 1 1
      internal/service/queryStruct.go

+ 1 - 1
internal/service/detailStruct.go

@@ -41,7 +41,7 @@ func (dRoot *DetailRoot) GetDetail(ctx context.Context, seoId string, isLogin bo
 		}
 		}
 		obj["title"] = gconv.String(fmt.Sprintf("【%s】%s", consts.TopTypeMap[gconv.String(obj["toptype"])], obj["title"]))
 		obj["title"] = gconv.String(fmt.Sprintf("【%s】%s", consts.TopTypeMap[gconv.String(obj["toptype"])], obj["title"]))
 		var publishTime int64
 		var publishTime int64
-		tm := time.Date(time.Now().Year(), time.Now().Month(), time.Now().Day(), 23, 59, 59, 59, time.Now().Location())
+		tm := time.Date(time.Now().Year(), time.Now().Month(), time.Now().Day(), 23, 59, 59, 0, time.Now().Location())
 		if gconv.Int64(obj["publish_time"])+3600*24 > tm.Unix() {
 		if gconv.Int64(obj["publish_time"])+3600*24 > tm.Unix() {
 			publishTime = gconv.Int64(obj["publish_time"])
 			publishTime = gconv.Int64(obj["publish_time"])
 		} else {
 		} else {

+ 1 - 1
internal/service/queryStruct.go

@@ -87,7 +87,7 @@ func (query *SeoBiddingQuery) dataFormat(data []map[string]interface{}) (bList [
 		titleReduction := map[string]int{}
 		titleReduction := map[string]int{}
 		for _, v := range data {
 		for _, v := range data {
 			var publishTime int64
 			var publishTime int64
-			tm := time.Date(time.Now().Year(), time.Now().Month(), time.Now().Day(), 23, 59, 59, 59, time.Now().Location())
+			tm := time.Date(time.Now().Year(), time.Now().Month(), time.Now().Day(), 23, 59, 59, 0, time.Now().Location())
 			if gconv.Int64(v["publish_time"])+3600*24 > tm.Unix() {
 			if gconv.Int64(v["publish_time"])+3600*24 > tm.Unix() {
 				publishTime = gconv.Int64(v["publish_time"])
 				publishTime = gconv.Int64(v["publish_time"])
 			} else {
 			} else {