no message

This commit is contained in:
hajimi
2026-06-11 12:15:29 +08:00
parent 10ebe39c30
commit 96efa1d905
5859 changed files with 815501 additions and 5 deletions
@@ -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);
}
}