no message
This commit is contained in:
@@ -0,0 +1,33 @@
|
||||
<?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);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,70 @@
|
||||
<?php
|
||||
|
||||
namespace app\adminapi\controller\community;
|
||||
|
||||
use app\adminapi\controller\BaseAdminController;
|
||||
use app\adminapi\lists\community\CommunityPostLists;
|
||||
use app\adminapi\logic\community\CommunityPostLogic;
|
||||
use app\adminapi\validate\community\CommunityPostValidate;
|
||||
|
||||
class CommunityPostController extends BaseAdminController
|
||||
{
|
||||
public function lists()
|
||||
{
|
||||
return $this->dataLists(new CommunityPostLists());
|
||||
}
|
||||
|
||||
public function detail()
|
||||
{
|
||||
$params = (new CommunityPostValidate())->goCheck('detail');
|
||||
$result = CommunityPostLogic::detail($params);
|
||||
return $this->data($result);
|
||||
}
|
||||
|
||||
public function updateStatus()
|
||||
{
|
||||
$params = (new CommunityPostValidate())->post()->goCheck('status');
|
||||
$result = CommunityPostLogic::updateStatus($params);
|
||||
if (true === $result) {
|
||||
return $this->success('修改成功', [], 1, 1);
|
||||
}
|
||||
return $this->fail(CommunityPostLogic::getError());
|
||||
}
|
||||
|
||||
public function setTop()
|
||||
{
|
||||
$params = (new CommunityPostValidate())->post()->goCheck('top');
|
||||
$result = CommunityPostLogic::setTop($params);
|
||||
if (true === $result) {
|
||||
return $this->success('设置成功', [], 1, 1);
|
||||
}
|
||||
return $this->fail(CommunityPostLogic::getError());
|
||||
}
|
||||
|
||||
public function setHot()
|
||||
{
|
||||
$params = (new CommunityPostValidate())->post()->goCheck('hot');
|
||||
$result = CommunityPostLogic::setHot($params);
|
||||
if (true === $result) {
|
||||
return $this->success('设置成功', [], 1, 1);
|
||||
}
|
||||
return $this->fail(CommunityPostLogic::getError());
|
||||
}
|
||||
|
||||
public function setRecommend()
|
||||
{
|
||||
$params = (new CommunityPostValidate())->post()->goCheck('recommend');
|
||||
$result = CommunityPostLogic::setRecommend($params);
|
||||
if (true === $result) {
|
||||
return $this->success('设置成功', [], 1, 1);
|
||||
}
|
||||
return $this->fail(CommunityPostLogic::getError());
|
||||
}
|
||||
|
||||
public function delete()
|
||||
{
|
||||
$params = (new CommunityPostValidate())->post()->goCheck('delete');
|
||||
CommunityPostLogic::delete($params);
|
||||
return $this->success('删除成功', [], 1, 1);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,53 @@
|
||||
<?php
|
||||
|
||||
namespace app\adminapi\controller\community;
|
||||
|
||||
use app\adminapi\controller\BaseAdminController;
|
||||
use app\adminapi\lists\community\CommunityTagLists;
|
||||
use app\adminapi\logic\community\CommunityTagLogic;
|
||||
use app\adminapi\validate\community\CommunityTagValidate;
|
||||
|
||||
class CommunityTagController extends BaseAdminController
|
||||
{
|
||||
public function lists()
|
||||
{
|
||||
return $this->dataLists(new CommunityTagLists());
|
||||
}
|
||||
|
||||
public function all()
|
||||
{
|
||||
$result = CommunityTagLogic::all();
|
||||
return $this->data($result);
|
||||
}
|
||||
|
||||
public function add()
|
||||
{
|
||||
$params = (new CommunityTagValidate())->post()->goCheck('add');
|
||||
CommunityTagLogic::add($params);
|
||||
return $this->success('添加成功', [], 1, 1);
|
||||
}
|
||||
|
||||
public function edit()
|
||||
{
|
||||
$params = (new CommunityTagValidate())->post()->goCheck('edit');
|
||||
$result = CommunityTagLogic::edit($params);
|
||||
if (true === $result) {
|
||||
return $this->success('编辑成功', [], 1, 1);
|
||||
}
|
||||
return $this->fail(CommunityTagLogic::getError());
|
||||
}
|
||||
|
||||
public function delete()
|
||||
{
|
||||
$params = (new CommunityTagValidate())->post()->goCheck('delete');
|
||||
CommunityTagLogic::delete($params);
|
||||
return $this->success('删除成功', [], 1, 1);
|
||||
}
|
||||
|
||||
public function detail()
|
||||
{
|
||||
$params = (new CommunityTagValidate())->goCheck('detail');
|
||||
$result = CommunityTagLogic::detail($params);
|
||||
return $this->data($result);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user