Browse Source

update

add_mode
DengBiao 1 year ago
parent
commit
f6f7abb082
1 changed files with 2 additions and 2 deletions
  1. +2
    -2
      app/admin/hdl/hdl_home_page.go

+ 2
- 2
app/admin/hdl/hdl_home_page.go View File

@@ -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)


Loading…
Cancel
Save