Browse Source

项目时间

wangshan 5 years ago
parent
commit
80dd1a4848
1 changed files with 16 additions and 16 deletions
  1. 16 16
      src/jfw/front/follow.go

+ 16 - 16
src/jfw/front/follow.go

@@ -208,14 +208,14 @@ func (m *Follow) ShareFW(tp string) error {
 	fields := `"_id","title","comeintime","projectcode","projectname","bidopentime","projectcode","area","toptype","subtype","type","href","publishtime","area"`
 	data := elastic.GetByIdField("bidding", "bidding", id, fields)
 	bidopentime := (*data)["bidopentime"]
-	if bidopentime != nil {
+	if bidopentime != nil && util.Int64All(bidopentime) != 0 {
 		m.T["bidopentime"] = util.FormatDateWithObj(&bidopentime, "2006年01月02日 15时") + " " + convertWeekday(time.Unix(util.Int64All(bidopentime), 0).Weekday().String())
 		m.T["l_bidopentime"] = bidopentime
 	}
-	if remindtime := (*data)["remindtime"]; remindtime != nil {
+	if remindtime := (*data)["remindtime"]; remindtime != nil && util.Int64All(remindtime) != 0 {
 		m.T["remindtime"] = util.FormatDateWithObj(&remindtime, "2006年01月02日 15时") + " " + convertWeekday(time.Unix(util.Int64All(remindtime), 0).Weekday().String())
 		m.T["l_remindtime"] = remindtime
-	} else if bidopentime != nil {
+	} else if bidopentime != nil && util.Int64All(bidopentime) != 0 {
 		date := time.Unix(util.Int64All(bidopentime), 0).AddDate(0, 0, -1)
 		m.T["remindtime"] = util.FormatDate(&date, "2006年01月02日 15时") + " " + convertWeekday(date.Weekday().String())
 		m.T["l_remindtime"] = date.Unix()
@@ -355,14 +355,14 @@ func (m *Follow) Photo(tp string) error {
 		m.T["l_lastpushtime"] = (*data)["l_lastpushtime"]
 		m.T["a_lastpushids"] = (*data)["a_lastpushids"]
 		l_bidopentime := (*data)["l_bidopentime"]
-		if l_bidopentime != nil && l_bidopentime != "" {
+		if l_bidopentime != nil && l_bidopentime != "" && util.Int64All(l_bidopentime) != 0 {
 			m.T["bidopentime"] = util.FormatDateWithObj(&l_bidopentime, "2006年01月02日 15时") + " " + convertWeekday(time.Unix(util.Int64All(l_bidopentime), 0).Weekday().String())
 			m.T["l_bidopentime"] = l_bidopentime
 		}
-		if l_remindtime := (*data)["l_remindtime"]; l_remindtime != nil && l_remindtime != "" {
+		if l_remindtime := (*data)["l_remindtime"]; l_remindtime != nil && l_remindtime != "" && util.Int64All(l_remindtime) != 0 {
 			m.T["remindtime"] = util.FormatDateWithObj(&l_remindtime, "2006年01月02日 15时") + " " + convertWeekday(time.Unix(util.Int64All(l_remindtime), 0).Weekday().String())
 			m.T["l_remindtime"] = l_remindtime
-		} else if l_bidopentime != nil && l_bidopentime != "" {
+		} else if l_bidopentime != nil && l_bidopentime != "" && util.Int64All(l_bidopentime) != 0 {
 			date := time.Unix(util.Int64All(l_bidopentime), 0).AddDate(0, 0, -1)
 			m.T["remindtime"] = util.FormatDate(&date, "2006年01月02日 15时") + " " + convertWeekday(date.Weekday().String())
 			m.T["l_remindtime"] = date.Unix()
@@ -394,14 +394,14 @@ func (m *Follow) Photo(tp string) error {
 			}
 			////////////////////////
 			bidopentime := (*data)["bidopentime"]
-			if bidopentime != nil && bidopentime != "" {
+			if bidopentime != nil && bidopentime != "" && util.Int64All(bidopentime) != 0 {
 				m.T["bidopentime"] = util.FormatDateWithObj(&bidopentime, "2006年01月02日 15时") + " " + convertWeekday(time.Unix(util.Int64All(bidopentime), 0).Weekday().String())
 				m.T["l_bidopentime"] = bidopentime
 			}
-			if remindtime := (*data)["remindtime"]; remindtime != nil && remindtime != "" {
+			if remindtime := (*data)["remindtime"]; remindtime != nil && remindtime != "" && util.Int64All(remindtime) != 0 {
 				m.T["remindtime"] = util.FormatDateWithObj(&remindtime, "2006年01月02日 15时") + " " + convertWeekday(time.Unix(util.Int64All(remindtime), 0).Weekday().String())
 				m.T["l_remindtime"] = remindtime
-			} else if bidopentime != nil && bidopentime != "" {
+			} else if bidopentime != nil && bidopentime != "" && util.Int64All(bidopentime) != 0 {
 				date := time.Unix(util.Int64All(bidopentime), 0).AddDate(0, 0, -1)
 				m.T["remindtime"] = util.FormatDate(&date, "2006年01月02日 15时") + " " + convertWeekday(date.Weekday().String())
 				m.T["l_remindtime"] = date.Unix()
@@ -646,7 +646,7 @@ func (m *Follow) Addsave() error {
 				data["s_title"] = d["title"]
 				data["s_area"] = d["area"]
 				data["s_province"] = d["area"]
-				if bidopentime := d["bidopentime"]; bidopentime != nil {
+				if bidopentime := d["bidopentime"]; bidopentime != nil && util.Int64All(bidopentime) != 0 {
 					data["l_bidopentime"] = bidopentime
 				}
 				if d["projectcode"] != nil {
@@ -737,14 +737,14 @@ func (m *Follow) Set(tp, id string) error {
 			mySelf["l_publishtime"] = (*data)["publishtime"]
 			////////////////////////
 			bidopentime := (*data)["bidopentime"]
-			if bidopentime != nil && bidopentime != "" {
+			if bidopentime != nil && bidopentime != "" && util.Int64All(bidopentime) != 0 {
 				m.T["bidopentime"] = util.FormatDateWithObj(&bidopentime, "2006年01月02日 15时") + " " + convertWeekday(time.Unix(util.Int64All(bidopentime), 0).Weekday().String())
 				m.T["l_bidopentime"] = bidopentime
 			}
-			if remindtime := (*data)["remindtime"]; remindtime != nil && remindtime != "" {
+			if remindtime := (*data)["remindtime"]; remindtime != nil && remindtime != "" && util.Int64All(remindtime) != 0 {
 				m.T["remindtime"] = util.FormatDateWithObj(&remindtime, "2006年01月02日 15时") + " " + convertWeekday(time.Unix(util.Int64All(remindtime), 0).Weekday().String())
 				m.T["l_remindtime"] = remindtime
-			} else if bidopentime != nil && bidopentime != "" {
+			} else if bidopentime != nil && bidopentime != "" && util.Int64All(bidopentime) != 0 {
 				date := time.Unix(util.Int64All(bidopentime), 0).AddDate(0, 0, -1)
 				m.T["remindtime"] = util.FormatDate(&date, "2006年01月02日 15时") + " " + convertWeekday(date.Weekday().String())
 				m.T["l_remindtime"] = date.Unix()
@@ -804,14 +804,14 @@ func (m *Follow) Set(tp, id string) error {
 		m.T["l_lastpushtime"] = (*data)["l_lastpushtime"]
 		m.T["a_lastpushids"] = (*data)["a_lastpushids"]
 		l_bidopentime := (*data)["l_bidopentime"]
-		if l_bidopentime != nil && l_bidopentime != "" {
+		if l_bidopentime != nil && l_bidopentime != "" && util.Int64All(l_bidopentime) != 0 {
 			m.T["bidopentime"] = util.FormatDateWithObj(&l_bidopentime, "2006年01月02日 15时") + " " + convertWeekday(time.Unix(util.Int64All(l_bidopentime), 0).Weekday().String())
 			m.T["l_bidopentime"] = l_bidopentime
 		}
-		if l_remindtime := (*data)["l_remindtime"]; l_remindtime != nil && l_remindtime != "" {
+		if l_remindtime := (*data)["l_remindtime"]; l_remindtime != nil && l_remindtime != "" && util.Int64All(l_remindtime) != 0 {
 			m.T["remindtime"] = util.FormatDateWithObj(&l_remindtime, "2006年01月02日 15时") + " " + convertWeekday(time.Unix(util.Int64All(l_remindtime), 0).Weekday().String())
 			m.T["l_remindtime"] = l_remindtime
-		} else if l_bidopentime != nil && l_bidopentime != "" {
+		} else if l_bidopentime != nil && l_bidopentime != "" && util.Int64All(l_bidopentime) != 0 {
 			date := time.Unix(util.Int64All(l_bidopentime), 0).AddDate(0, 0, -1)
 			m.T["remindtime"] = util.FormatDate(&date, "2006年01月02日 15时") + " " + convertWeekday(date.Weekday().String())
 			m.T["l_remindtime"] = date.Unix()