浏览代码

update

add_mode
DengBiao 1年前
父节点
当前提交
f6f7abb082
共有 1 个文件被更改,包括 2 次插入2 次删除
  1. +2
    -2
      app/admin/hdl/hdl_home_page.go

+ 2
- 2
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)


正在加载...
取消
保存