Jianghan 5 lat temu
rodzic
commit
1557547047
1 zmienionych plików z 6 dodań i 0 usunięć
  1. 6 0
      src/util/parsxlsx.go

+ 6 - 0
src/util/parsxlsx.go

@@ -185,6 +185,8 @@ func ResponseXlsx(id string) string {
 					row.AddCell().SetValue(v["subtype"])
 					if v["publishtime"] != nil {
 						row.AddCell().SetValue(time.Unix(util.Int64All(v["publishtime"]), 0).Format("2006-01-02"))
+					}else {
+						row.AddCell()
 					}
 					row.AddCell().SetValue(v["buyer"])
 					row.AddCell().SetValue(v["winner"])
@@ -216,6 +218,8 @@ func ResponseXlsx(id string) string {
 					row.AddCell().SetValue(v["detail"])
 					if v["publishtime"] != nil {
 						row.AddCell().SetValue(time.Unix(util.Int64All(v["publishtime"]), 0).Format("2006-01-02"))
+					}else {
+						row.AddCell()
 					}
 					row.AddCell().SetValue(v["href"])
 					row.AddCell().SetValue(v["s_jyhref"])
@@ -225,6 +229,8 @@ func ResponseXlsx(id string) string {
 					row.AddCell().SetFloat(util.Float64All(v["bidamount"]) / 10000)
 					if v["bidopentime"] != nil {
 						row.AddCell().SetValue(time.Unix(util.Int64All(v["bidopentime"]), 0).Format("2006-01-02"))
+					}else {
+						row.AddCell()
 					}
 					row.AddCell().SetValue(v["buyer"])
 					row.AddCell().SetValue(v["buyerperson"])