From 9d94b31cf5ba8e7cd767b642c505595b588ce059 Mon Sep 17 00:00:00 2001 From: hujiebin Date: Thu, 7 Dec 2023 17:38:16 +0800 Subject: [PATCH] 2 --- script/group_room_visit500.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/script/group_room_visit500.go b/script/group_room_visit500.go index 4ecd47e..10bb62b 100644 --- a/script/group_room_visit500.go +++ b/script/group_room_visit500.go @@ -68,7 +68,7 @@ func getArea(country string) string { func getConsume(groupId string) string { var result int64 if err := mysql.ProdReadOnlyDB.Table("room_day_consume").Where("group_id = ?", groupId).Select("SUM(diamond)").Scan(&result).Error; err != nil { - panic(err) + //panic(err) } return cast.ToString(result) } @@ -98,6 +98,7 @@ func main() { d.Country = country d.Area = area d.Consume = consume + data = append(data, d) } excelFileName := fmt.Sprintf("./房间500热度.xlsx") xlFile := xlsx.NewFile() -- 2.22.0