diff --git a/app/admin/hdl/hdl_home_page.go b/app/admin/hdl/hdl_home_page.go index 5ea328c..39edba7 100644 --- a/app/admin/hdl/hdl_home_page.go +++ b/app/admin/hdl/hdl_home_page.go @@ -106,8 +106,8 @@ func ThisWeekData(c *gin.Context) { var list []map[string]interface{} for i := -6; i <= 0; i++ { day := now.AddDate(0, 0, i).Format("2006-01-02") //7日前 - dayStart := now.AddDate(0, 0, i).Format("2006-01-02 15:04:05") - dayEnd := now.AddDate(0, 0, i+1).Format("2006-01-02 15:04:05") + dayStart := now.AddDate(0, 0, i).Format("2006-01-02") + dayEnd := now.AddDate(0, 0, i+1).Format("2006-01-02") sql1 := fmt.Sprintf("SELECT sum(trade_amount) as total FROM self_support_for_school_ord where order_status = 2 and face_time >= '%s' and face_time < '%s'", dayStart, dayEnd) //统计今日"自营-学校"收益 sql2 := fmt.Sprintf("SELECT sum(total_price) as total FROM central_kitchen_for_school_package_ord where state = 1 and create_at >= '%s' and create_at < '%s'", dayStart, dayEnd) //统计今日"央厨-学校"收益 mapArr1, err := db.QueryNativeString(db.Db, sql1)