34 lines
1.0 KiB
PHP
34 lines
1.0 KiB
PHP
<?php
|
|
|
|
namespace app\adminapi\controller\community;
|
|
|
|
use app\adminapi\controller\BaseAdminController;
|
|
use app\adminapi\lists\community\CommunityCommentLists;
|
|
use app\adminapi\logic\community\CommunityCommentLogic;
|
|
use app\adminapi\validate\community\CommunityCommentValidate;
|
|
|
|
class CommunityCommentController extends BaseAdminController
|
|
{
|
|
public function lists()
|
|
{
|
|
return $this->dataLists(new CommunityCommentLists());
|
|
}
|
|
|
|
public function updateStatus()
|
|
{
|
|
$params = (new CommunityCommentValidate())->post()->goCheck('status');
|
|
$result = CommunityCommentLogic::updateStatus($params);
|
|
if (true === $result) {
|
|
return $this->success('修改成功', [], 1, 1);
|
|
}
|
|
return $this->fail(CommunityCommentLogic::getError());
|
|
}
|
|
|
|
public function delete()
|
|
{
|
|
$params = (new CommunityCommentValidate())->post()->goCheck('delete');
|
|
CommunityCommentLogic::delete($params);
|
|
return $this->success('删除成功', [], 1, 1);
|
|
}
|
|
}
|