更新app版本管理
This commit is contained in:
parent
0e9a22bbc5
commit
00c5aad51b
@ -48,5 +48,9 @@ class AppUpdateDao extends BaseDao
|
|||||||
$query->where('type',$where['type']);
|
$query->where('type',$where['type']);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
public function delete(int $id)
|
||||||
|
{
|
||||||
|
return ($this->getModel()::getDB())->where('id', $id)->delete();
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -55,4 +55,10 @@ class LhappRepository extends BaseRepository
|
|||||||
return $find;
|
return $find;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function delete($id)
|
||||||
|
{
|
||||||
|
$res = $this->dao->delete($id);
|
||||||
|
return $res;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -53,12 +53,23 @@ class Lhapp extends BaseController
|
|||||||
$this->repository->update($id, $this->getValidParams());
|
$this->repository->update($id, $this->getValidParams());
|
||||||
return app('json')->success('修改成功');
|
return app('json')->success('修改成功');
|
||||||
}
|
}
|
||||||
|
|
||||||
public function detail($id)
|
public function detail($id)
|
||||||
{
|
{
|
||||||
$data = $this->repository->detail($id);
|
$data = $this->repository->detail($id);
|
||||||
return app('json')->success($data);
|
return app('json')->success($data);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function delete($id)
|
||||||
|
{
|
||||||
|
$res = $this->repository->delete($id);
|
||||||
|
if ($res) {
|
||||||
|
return app('json')->success('删除成功');
|
||||||
|
} else {
|
||||||
|
return app('json')->fail('删除失败');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
protected function getValidParams()
|
protected function getValidParams()
|
||||||
{
|
{
|
||||||
$data = $this->request->params(['title', 'content', 'type', 'phone_brand', 'version', 'dow_url', 'force', 'quiet']);
|
$data = $this->request->params(['title', 'content', 'type', 'phone_brand', 'version', 'dow_url', 'force', 'quiet']);
|
||||||
|
@ -183,6 +183,9 @@ Route::group(function () {
|
|||||||
Route::post('edit/:id', '/update')->name('appVersionEdit')->option([
|
Route::post('edit/:id', '/update')->name('appVersionEdit')->option([
|
||||||
'_alias' => '编辑APP版本',
|
'_alias' => '编辑APP版本',
|
||||||
]);
|
]);
|
||||||
|
Route::post('delete/:id', '/delete')->name('appVersionEdit')->option([
|
||||||
|
'_alias' => '删除APP版本',
|
||||||
|
]);
|
||||||
})->prefix('admin.system.Lhapp')->option([
|
})->prefix('admin.system.Lhapp')->option([
|
||||||
'_path' => '/app/version',
|
'_path' => '/app/version',
|
||||||
'_auth' => true,
|
'_auth' => true,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user