From 23ee9cd923ad549934d0c2f3df597673c82685b4 Mon Sep 17 00:00:00 2001 From: chenbo <709206448@qq.com> Date: Wed, 31 Jan 2024 17:44:40 +0800 Subject: [PATCH] update --- app/api/controller/OperationLogController.php | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/app/api/controller/OperationLogController.php b/app/api/controller/OperationLogController.php index 6a744da..fa12d69 100644 --- a/app/api/controller/OperationLogController.php +++ b/app/api/controller/OperationLogController.php @@ -2,6 +2,7 @@ namespace app\api\controller; +use app\common\model\suyuan_operation\AnimalOperateAction; use think\facade\Db; class OperationLogController extends BaseApiController @@ -9,12 +10,7 @@ class OperationLogController extends BaseApiController public function index() { $fenceHouseId = $this->request->param('fence_house_id'); - $list = []; - $list[] = Db::name('operation_deworming_log')->where('fence_house_id', $fenceHouseId)->order('id desc')->find(); - $list[] = Db::name('operation_disinfect_log')->where('fence_house_id', $fenceHouseId)->order('id desc')->find(); - $list[] = Db::name('operation_feeding_log')->where('fence_house_id', $fenceHouseId)->order('id desc')->find(); - $list[] = Db::name('operation_vaccinum_log')->where('fence_house_id', $fenceHouseId)->order('id desc')->find(); - $list[] = Db::name('operation_water_log')->where('fence_house_id', $fenceHouseId)->order('id desc')->find(); + $list = AnimalOperateAction::where('fence_house_id', $fenceHouseId)->order('id desc')->select()->limit(5); return $this->success('成功', $list); } } \ No newline at end of file