diff --git a/business/model/dao/store.go b/business/model/dao/store.go index c53c61894..9fa3a02b5 100644 --- a/business/model/dao/store.go +++ b/business/model/dao/store.go @@ -1403,7 +1403,7 @@ func GetBrandBillOrderExpend(db *DaoDB, brandId int, vendorOrderID string) (int, Price int }{} - sql := `SELECT IFNULL(SUM(price),0) balance FROM brand_bill + sql := `SELECT IFNULL(SUM(price),0) price FROM brand_bill WHERE brand_id = ? AND bill_type = ? AND vendor_order_id = ? AND fee_type IN (?,?,?) ` sqlParam := []interface{}{brandId, model.BrandBillTypeExpend, vendorOrderID, model.BrandBillFeeTypeDelivery, model.BrandBillFeeTypeTipFee, model.BrandBillFeeTypeDeductFee} @@ -1417,7 +1417,7 @@ func GetBrandBillOrderIncome(db *DaoDB, brandId int, vendorOrderID string) (int, Price int }{} - sql := `SELECT IFNULL(SUM(price),0) balance FROM brand_bill + sql := `SELECT IFNULL(SUM(price),0) price FROM brand_bill WHERE brand_id = ? AND bill_type = ? AND vendor_order_id = ? AND fee_type IN (?,?,?) ` sqlParam := []interface{}{brandId, model.BrandBillTypeIncome, vendorOrderID, model.BrandBillFeeTypeDelivery, model.BrandBillFeeTypeTipFee, model.BrandBillFeeTypeDeductFee}