This commit is contained in:
chenbo 2024-01-31 17:44:40 +08:00
parent aaaedd247a
commit 23ee9cd923
1 changed files with 2 additions and 6 deletions

View File

@ -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);
}
}