|
@@ -41,7 +41,7 @@ func (m MediumInvoiceDb) GetMediumInvoiceById(id int) (data *model.MediumInvoice |
|
|
func (m MediumInvoiceDb) FindMediumInvoiceList(uuid, types, mediumId string, page, limit int) (list []dao.MediumInvoiceGroup, total int64, err error) { |
|
|
func (m MediumInvoiceDb) FindMediumInvoiceList(uuid, types, mediumId string, page, limit int) (list []dao.MediumInvoiceGroup, total int64, err error) { |
|
|
sess := m.Db.OrderBy("medium_invoice.update_at desc,medium_invoice.id desc").Limit(limit, (page-1)*limit) |
|
|
sess := m.Db.OrderBy("medium_invoice.update_at desc,medium_invoice.id desc").Limit(limit, (page-1)*limit) |
|
|
if uuid != "" { |
|
|
if uuid != "" { |
|
|
sess.And("medium_settlement.uuid = ?", uuid) |
|
|
|
|
|
|
|
|
sess.And("medium_invoice.uuid = ?", uuid) |
|
|
} |
|
|
} |
|
|
if types != "" { |
|
|
if types != "" { |
|
|
sess.And("medium_invoice.type = ?", types) |
|
|
sess.And("medium_invoice.type = ?", types) |
|
|