From c3a54409757210daa8ddf9eb528779f2ba3a49cf Mon Sep 17 00:00:00 2001 From: wangxinglong <2371974647@qq.com> Date: Thu, 7 Apr 2022 17:52:45 +0800 Subject: [PATCH] setter --- app/repository/BillRepository.php | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/app/repository/BillRepository.php b/app/repository/BillRepository.php index ac7cece..a18c747 100644 --- a/app/repository/BillRepository.php +++ b/app/repository/BillRepository.php @@ -190,12 +190,13 @@ class BillRepository extends Repository ->when(!empty($startTime), function ($q) use ($startTime) { $q->whereTime("a.create_time", ">=", $startTime); }) - ->when(!empty($keyword), function ($q) use ($keyword) { - $q->where("c.business_name|e.name", "like", "%" . $keyword . "%"); - }) ->when(!empty($endTime), function ($q) use ($endTime) { $q->whereTime("a.create_time", "<=", $endTime); }) + ->when(!empty($keyword), function ($q) use ($keyword) { + $q->where("c.business_name|e.name", "like", "%" . $keyword . "%"); + }) + ->field( [ "a.money",