dataLists(new AssetLeaseLists()); } /** * @notes 添加资产 * @return \think\response\Json * @author heshihu * @date 2022/2/22 9:57 */ public function add() { $params = (new AssetLeaseValidate())->post()->goCheck('add'); $result =AssetLeaseLists::add($params); if ($result['code'] <> 200) { return $this->fail($result['msg']); } return $this->success($result['msg'], [], 1, 1); } /** * @notes 编辑资产 * @return \think\response\Json * @author heshihu * @date 2022/2/22 10:12 */ public function edit() { $params = (new AssetValidate())->post()->goCheck('edit'); $result = AssetLists::edit($params); if (true === $result) { return $this->success('编辑成功', [], 1, 1); } return $this->fail(AssetLists::getError()); } /** * @notes 删除资讯 * @return \think\response\Json * @author heshihu * @date 2022/2/22 10:17 */ public function delete() { $params = (new AssetValidate())->post()->goCheck('delete'); AssetLists::delete($params); return $this->success('删除成功', [], 1, 1); } /** * @notes 资产详情 * @return \think\response\Json * @author heshihu * @date 2022/2/22 10:15 */ public function detail() { $params = (new AssetValidate())->goCheck('detail'); $result = AssetLists::detail($params); return $this->data($result); } /** * @notes 获取可租赁房产 * @return \think\response\Json * @author 段誉 * @date 2022/3/29 11:18 */ public function getAssetForRent() { $params = $this->request->get(); $result = AssetLists::getRentAssetList($params); return $this->success('查询成功', $result, 1, 1); } }