|
@@ -3,7 +3,6 @@ package db
|
|
|
import (
|
|
|
context "context"
|
|
|
"encoding/json"
|
|
|
- "fmt"
|
|
|
"github.com/issue9/conv"
|
|
|
"github.com/sirupsen/logrus"
|
|
|
"time"
|
|
@@ -191,7 +190,7 @@ func GetInvoiceRecords(ctx context.Context, req *http_model.GetInvoiceRecordRequ
|
|
|
var invoiceRecords []*gorm_model.YounggeeInvoiceRecord
|
|
|
db = db.Debug().Model(gorm_model.YounggeeInvoiceRecord{}).Where("status = 2")
|
|
|
if req.BillingAt != "" {
|
|
|
- db.Debug().Where(fmt.Sprintf(" billing_at like '%s%%'", req.BillingAt))
|
|
|
+ db = db.Where("billing_at like ?", req.BillingAt+"%")
|
|
|
}
|
|
|
err := db.Order("billing_at desc").Find(&invoiceRecords).Error
|
|
|
if err != nil {
|