Updata:更新发票时间检索
This commit is contained in:
parent
f219ed3b05
commit
deaac40fad
@ -127,10 +127,10 @@ func GetInvoiceList(req *bundle.GetInvoiceListReq) (data []*model.InvoiceInfo, t
|
|||||||
}
|
}
|
||||||
if req.ApplyTimeStart != "" {
|
if req.ApplyTimeStart != "" {
|
||||||
// 使用 COALESCE 后的 apply_time 进行筛选
|
// 使用 COALESCE 后的 apply_time 进行筛选
|
||||||
query = query.Where("COALESCE(invoice.apply_time, pia.apply_time) >= ?", req.ApplyTimeStart)
|
query = query.Where("pia.apply_time >= ?", req.ApplyTimeStart)
|
||||||
}
|
}
|
||||||
if req.ApplyTimeEnd != "" {
|
if req.ApplyTimeEnd != "" {
|
||||||
query = query.Where("COALESCE(invoice.apply_time, pia.apply_time) <= ?", req.ApplyTimeEnd)
|
query = query.Where("pia.apply_time <= ?", req.ApplyTimeEnd)
|
||||||
}
|
}
|
||||||
if req.Name != "" {
|
if req.Name != "" {
|
||||||
// 使用 COALESCE 后的 name 进行模糊筛选,统一 collation 避免 Illegal mix of collations
|
// 使用 COALESCE 后的 name 进行模糊筛选,统一 collation 避免 Illegal mix of collations
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user