From cbf15f6c4919b59bcf6db6c7b9a7d515553ea7df Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=8B=8F=E5=B0=B9=E5=B2=9A?= <770236076@qq.com> Date: Tue, 17 Nov 2020 09:18:52 +0800 Subject: [PATCH] ceshi --- business/model/dao/dao_bill.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/business/model/dao/dao_bill.go b/business/model/dao/dao_bill.go index 7b36f4941..4c81d99de 100644 --- a/business/model/dao/dao_bill.go +++ b/business/model/dao/dao_bill.go @@ -29,7 +29,7 @@ func GetBillExpend(db *DaoDB, userID string, billType int, fromTime, toTime time sql := ` SELECT b.* FROM user_bill a - JOIN bill_expend b ON b.bill_id = a.bill_id + LEFT JOIN bill_expend b ON b.bill_id = a.bill_id WHERE a.deleted_at = ? ` sqlParams := []interface{}{utils.DefaultTimeValue} @@ -49,7 +49,7 @@ func GetBillExpend(db *DaoDB, userID string, billType int, fromTime, toTime time sql += ` AND b.created_at <= ?` sqlParams = append(sqlParams, toTime) } - err = GetRow(db, &billExpends, sql, sqlParams) + err = GetRows(db, &billExpends, sql, sqlParams) return billExpends, err }