first commit

This commit is contained in:
root
2025-06-18 10:31:43 +08:00
commit d9f820b55d
981 changed files with 449311 additions and 0 deletions

27
app/Rpc/v1/ShowsService.php Executable file
View File

@ -0,0 +1,27 @@
<?php
namespace App\Rpc\v1;
use App\FormModel\rpc\v1\RpcIndexModel;
use App\Model\AppArticle;
use App\Rpc\BaseService;
use Hyperf\RpcServer\Annotation\RpcService;
// #[RpcService(name: "shows", server: "jsonrpc-http", protocol: "jsonrpc-http", publishTo: 'nacos')]
class ShowsService extends BaseService
{
public function view($aid): array
{
$data = AppArticle::formatQuery(['images', 'title', 'cover', 'brand_name'])
->select(['brand', 'aid', 'title', 'cover', 'brand as brand_name', 'images', 'description'])
->where('aid', $aid)
->first()
->toArray();
$data['more'] = AppArticle::formatQuery(['images', 'title', 'cover', 'brand_name'])
->where('brand', '=', $data['brand'])
->orderBy('published_at', 'DESC')
->limit(25);
return $this->getResponse()->setPageModule($data)->send();
}
}