This commit is contained in:
chenbo 2024-01-30 09:11:31 +08:00
parent 6a679c4669
commit 10a04f15f0
1 changed files with 22 additions and 0 deletions

View File

@ -5,6 +5,7 @@ namespace app\api\controller;
use app\adminapi\logic\fence_house\FenceHouseLogic; use app\adminapi\logic\fence_house\FenceHouseLogic;
use app\adminapi\validate\fence_house\FenceHouseValidate; use app\adminapi\validate\fence_house\FenceHouseValidate;
use app\api\lists\FenceHouseLists; use app\api\lists\FenceHouseLists;
use think\facade\Db;
use think\response\Json; use think\response\Json;
class FenceHouseController extends BaseApiController class FenceHouseController extends BaseApiController
@ -56,4 +57,25 @@ class FenceHouseController extends BaseApiController
$datas = (new FenceHouseLogic())->datas($params); $datas = (new FenceHouseLogic())->datas($params);
return $this->data($datas); return $this->data($datas);
} }
// 离栏操作
public function leave()
{
$params = $this->request->param();
$params['create_time'] = time();
$params['update_time'] = time();
Db::name('leave_fence_house_log')->insert($params);
return $this->success('离栏成功');
}
// 换栏操作
public function exchange()
{
$params = $this->request->param();
$params['create_time'] = time();
$params['update_time'] = time();
Db::name('change_fence_house_log')->insert($params);
return $this->success('换栏成功');
}
} }