Updata:完善检索逻辑

This commit is contained in:
jiaji.H 2026-02-03 09:26:26 +08:00
parent dfd82b87b8
commit 420a169c65

View File

@ -102,7 +102,11 @@ func GetInvoiceList(req *bundle.GetInvoiceListReq) (data []*model.InvoiceInfo, t
Joins("LEFT JOIN `micro-account`.real_name AS rn ON user.real_name_id = rn.id and rn.deleted_at = 0")
if req.IsExpress != 0 {
if req.IsExpress == 2 && req.IsApplyInvocice == 1 {
query = query.Where("invoice.paper_invocie_status = ?", req.IsApplyInvocice)
} else {
query = query.Where("invoice.paper_invocie_status = ?", req.IsExpress)
}
} else {
if req.IsApplyInvocice == 2 {
query = query.Where("invoice.paper_invocie_status >= ?", req.IsApplyInvocice)