rkljw hace 5 meses
padre
commit
181fc2c44e
Se han modificado 24 ficheros con 674 adiciones y 1061 borrados
  1. 11 11
      .env
  2. 0 11
      .gitignore
  3. 27 0
      app/Controller/AdController.php
  4. 418 4
      app/Controller/PublicController.php
  5. 18 0
      app/Controller/WebSocketController.php
  6. 10 0
      app/JsonRpc/NewsServiceInterface.php
  7. 50 0
      app/JsonRpc/PublicRpcService.php
  8. 49 0
      app/JsonRpc/WebsiteServiceInterface.php
  9. 12 1
      app/Listener/DbQueryExecutedListener.php
  10. 0 1
      config/autoload/amqp.php
  11. 0 40
      runtime/container/proxy/App_Amqp_Consumer_MqConsumer.proxy.php
  12. 0 43
      runtime/container/proxy/App_Controller_AbstractController.proxy.php
  13. 17 0
      runtime/container/proxy/App_Controller_NewsController.proxy.php
  14. 0 131
      runtime/container/proxy/App_Controller_WebSocketController.proxy.php
  15. 0 79
      runtime/container/proxy/App_JsonRpc_AdServiceInterface.rpc-client.proxy.php
  16. 0 299
      runtime/container/proxy/App_JsonRpc_ChatServiceInterface.rpc-client.proxy.php
  17. 0 35
      runtime/container/proxy/App_JsonRpc_LinkServiceInterface.rpc-client.proxy.php
  18. 16 1
      runtime/container/proxy/App_JsonRpc_NewsServiceInterface.rpc-client.proxy.php
  19. 0 139
      runtime/container/proxy/App_JsonRpc_PublicRpcServiceInterface.rpc-client.proxy.php
  20. 0 133
      runtime/container/proxy/App_JsonRpc_UserServiceInterface.rpc-client.proxy.php
  21. 46 1
      runtime/container/proxy/App_JsonRpc_WebsiteServiceInterface.rpc-client.proxy.php
  22. 0 35
      runtime/container/proxy/App_Service_RedisInterface.proxy.php
  23. 0 97
      runtime/container/proxy/App_Service_RedisService.proxy.php
  24. 0 0
      storage/languages/en/validation.php

+ 11 - 11
.env

@@ -2,24 +2,24 @@ APP_NAME=user_producer
 APP_ENV=dev
 HOST = http://127.0.0.1:9501/
 DB_DRIVER=mysql
-DB_HOST=127.0.0.1
-DB_PORT=3306
+DB_HOST=101.254.114.211
+DB_PORT=13306
 DB_DATABASE=hyperf
 DB_USERNAME=root
-DB_PASSWORD=root123
+DB_PASSWORD=xKmapDpKCxMMSkbe
 DB_CHARSET=utf8mb4
 DB_COLLATION=utf8mb4_unicode_ci
 DB_PREFIX=
 
-REDIS_HOST=192.168.1.201
-REDIS_AUTH=123456
-REDIS_PORT=6379
+REDIS_HOST=101.254.114.211
+REDIS_AUTH=YPWWnFnNebc7427B
+REDIS_PORT=26739
 REDIS_DB=0
 
-AMQP_HOST=192.168.1.201
-AMQP_PORT=5672
-AMQP_USER=admin
-AMQP_PASSWORD=123456
+AMQP_HOST=103.105.201.2
+AMQP_PORT=5673
+AMQP_USER=rabbitmq
+AMQP_PASSWORD=H8eDTAk6LY7EjJ8y
 
 
 #小程序获取openid
@@ -29,4 +29,4 @@ WECHAT = https://api.weixin.qq.com/
 APPID = wx830ada852dd1707f
 #小程序SECRET
 APP_SECRET = 09d1ac9287cb6f3c5e81aa27a6b7138e
-#12
+#1

+ 0 - 11
.gitignore

@@ -17,9 +17,7 @@ use Hyperf\HttpServer\Contract\RequestInterface;
 use Hyperf\HttpServer\Contract\ResponseInterface;
 
 
-use Hyperf\Logger\LoggerFactory;
 use Psr\Container\ContainerInterface;
-use Psr\Log\LoggerInterface;
 
 abstract class AbstractController
 {
@@ -32,14 +30,5 @@ abstract class AbstractController
     #[Inject]
     protected ResponseInterface $response;
 
-    /**
-     * @var LoggerInterface
-     */
-    private $logger;
-//    public function __construct(LoggerFactory $loggerFactory)
-//    {
-//        $this->logger =  $loggerFactory->get('admin_consumer:', 'default');
-//        $this->logger->info("项目启动访问一次");
-//    }
 
 }

+ 27 - 0
app/Controller/AdController.php

@@ -77,6 +77,7 @@ class NewsController extends AbstractController
             $errorMessage = $validator->errors()->first();
             return Result::error($errorMessage);
         }
+        $requireData['website_id'] = Context::get("SiteId");
         $result = $this->newsServiceClient->categoryList($requireData);
         $rep = PublicData::buildMenuTree($result['data']);
         return $result ? Result::success($rep) : Result::error($result['message']);
@@ -195,6 +196,7 @@ class NewsController extends AbstractController
     public function getArticleList()
     {
         $requireData = $this->request->all();
+
         $validator = $this->validationFactory->make(
             $requireData,
             [
@@ -212,6 +214,27 @@ class NewsController extends AbstractController
             $errorMessage = $validator->errors()->first();
             return Result::error($errorMessage);
         }
+        $requireData['website_id'] = Context::get("SiteId");
+        var_dump("资讯:",$requireData);
+        $result = $this->newsServiceClient->getArticleList($requireData);
+        //1通过,2待审核,3待发 4,拒绝 5删除
+        $statusList = [
+            '1'=>'通过',
+            '2'=>'待审核',
+            '3'=>'待发',
+            '4'=>'拒绝',
+            '5'=>'删除',
+        ];
+        if($result['data']){
+            foreach ($result['data']['rows'] as $k=>$v) {
+                $result['data']['rows'][$k]['cat_arr_id'] = $v['cat_arr_id']?json_decode($v['cat_arr_id']):[0];
+                $result['data']['rows'][$k]['tag'] = $v['tag']?json_decode($v['tag']):[];
+                $result['data']['rows'][$k]['status_name'] = $statusList[$v['status']];
+                $result['data']['rows'][$k]['level'] = (string)$v['level'];
+                $result['data']['rows'][$k]['islink'] = isset($v['islink']) && $v['islink']>0?true:false;
+            }
+
+        }
 
         $result = $this->newsServiceClient->getArticleList($requireData);
 
@@ -274,6 +297,7 @@ class NewsController extends AbstractController
 
         $loginIp = $this->request->getHeader('x-forwarded-for')[0] ?? $this->request->getHeader('x-real-ip')[0] ?? $this->request->getServerParams()['remote_addr'] ?? '0.0.0.0';
         $requireData['ip'] = $loginIp;
+        $requireData['website_id'] = Context::get("SiteId");
         $requireData['admin_user_id'] =Context::get("UserId");
         $requireData['level'] = isset($requireData['level']) &&  $requireData['level']?$requireData['level']:0;
         $requireData['hits'] = isset($requireData['hits']) &&  $requireData['hits']?$requireData['hits']:0;
@@ -363,6 +387,9 @@ class NewsController extends AbstractController
             $errorMessage = $validator->errors()->first();
             return Result::error($errorMessage);
         }
+
+        $requireData['website_id'] = Context::get("SiteId");
+
         $result = $this->newsServiceClient->delArticle($requireData);
         return $result['code']==200 ? Result::success($result['data']) : Result::error($result['message']);
     }

+ 418 - 4
app/Controller/PublicController.php

@@ -6,11 +6,13 @@ use App\JsonRpc\NewsServiceInterface;
 use App\JsonRpc\WebsiteServiceInterface;
 use App\Tools\PublicData;
 use Hyperf\Di\Annotation\Inject;
-use Hyperf\HttpServer\Annotation\AutoController;
 use App\Tools\Result;
 use Hyperf\Validation\Contract\ValidatorFactoryInterface;
 use App\Constants\ErrorCode;
+use App\Controller\PublicController;
 use Hyperf\Context\Context;
+use Hyperf\HttpServer\Contract\RequestInterface;
+use Hyperf\HttpServer\Contract\ResponseInterface;
 /**
  * Class WebController
  * @package App\Controller
@@ -19,7 +21,7 @@ class WebController extends AbstractController
 {
     #[Inject]
     protected ValidatorFactoryInterface $validationFactory;
-
+    private $publicServiceClient;
     /**
      * @var NewsServiceInterface
      */
@@ -32,23 +34,435 @@ class WebController extends AbstractController
     #[Inject]
     private $websiteServiceClient;
 
+    private $PublicController;
+
+    public function __construct(PublicController $PublicController)
+    {
+        $this->PublicController = $PublicController;
+    }
     /**
      * 获取栏目导航
      * @return array
      */
     public function getWebsiteCategory()
     {
+        $requireData = $this->request->all();
+        $validator = $this->validationFactory->make(
+            $requireData,
+            [
+                'pageSize' => 'required'
+            ],
+            [
+                'pageSize.required' => '显示条数不能为空'
+            ]
+        );
+        if ($validator->fails()){
+            $errorMessage = $validator->errors()->first();
+            return Result::error($errorMessage);
+        }
         $data = [
-            'website_id'=>Context::get("SiteId")
+            'website_id'=>Context::get("SiteId"),
+            'pageSize'=>$requireData['pageSize']
         ];
-        var_dump("网站id:",Context::get("SiteId"));
+        // var_dump("网站id:",Context::get("SiteId"));
         $result = $this->websiteServiceClient->getWebsiteCategory($data);
         if ($result['code'] != ErrorCode::SUCCESS) {
             return Result::error($result['message'],0,[]);
         }
         return Result::success($result['data']);
     }
+    /**
+     * 获取各省名称
+     */
+    public function getWebsiteDistrit()
+    {
+        $data= [
+            'pid' => 0,
+            'website_id'=>Context::get("SiteId")
+        ];
+        $result=$this->PublicController->getDistrictList($data);
+        
+        if ($result['code'] != ErrorCode::SUCCESS) {
+            return Result::error($result['message'],0,[]);
+        }
+        // var_dump($result['data']);
+        return Result::success($result['data']);
+        
+    }
+     /**
+     * 获取广告1
+     * @return array
+     */
+    public function getWebsiteAdvertisement()
+    {
+        $requireData = $this->request->all();
+        $validator = $this->validationFactory->make(
+            $requireData,
+            [
+                'adPlace' => 'required'
+            ],
+            [
+                'adPlace.required' => '广告位置编号不能为空'
+            ]
+        );
+        if ($validator->fails()){
+            $errorMessage = $validator->errors()->first();
+            return Result::error($errorMessage);
+        }
+        $data = [
+            'website_id'=>Context::get("SiteId"),
+            'ad_placeid'=>$requireData['adPlace']
+        ]; 
+        
+        $result = $this->websiteServiceClient->getWebsiteAdvertisement($data);
+
+        if ($result['code'] != ErrorCode::SUCCESS) {
+            return Result::error($result['message'],0,[]);
+        }
+        return Result::success($result['data']);
+    }
+    /**
+     * 搜索并获取职能部门
+     */
+    public function selectWebsiteDepartment(){
+        $requireData = $this->request->all();
+        $data = [
+            
+            'website_id'=>Context::get("SiteId")
+        ]; 
+       
+        if(!empty($requireData)){
+            $data = [
+                'keyword'=>$requireData['keyword'],
+                'website_id'=>Context::get("SiteId")
+            ]; 
+        }
+   
+        $result = $this->websiteServiceClient->selectWebsiteDepartment($data);
+        if ($result['code'] != ErrorCode::SUCCESS) {
+            return Result::error($result['message'],0,[]);
+        }
+        return Result::success($result['data']);
+    }
+    /**
+     *各省市查询 
+     */
+    public function selectWebsiteArea()
+    {
+        $requireData = $this->request->all();
+       
+        $data=[];
+        if(!empty($requireData)){
+            $validator = $this->validationFactory->make(
+                $requireData,
+                [
+                    'province' => 'required'
+                ],
+                [
+                    'province.required' => '请先选择省份'
+                ]
+            );
+            if ($validator->fails()){
+                $errorMessage = $validator->errors()->first();
+                return Result::error($errorMessage);
+            }
+            $data=[
+                'province' => $requireData['province']
+            ];
+            if(isset($requireData['city'])){
+                
+                $data=[
+                    'city' => $requireData['city'],
+                    'province' => $requireData['province']
+                    
+                ];
+                
+                if(isset($requireData['region'])){
+                    $data=[
+                        'province' => $requireData['province'],
+                        'city' => $requireData['city'],
+                        'region' => $requireData['region']
+                    ];
+                }
+            }
+        }
+        $result = $this->websiteServiceClient->selectWebsiteArea($data);
+        if ($result['code'] != ErrorCode::SUCCESS) {
+            return Result::error($result['message'],0,[]);
+        }
+        return Result::success($result['data']);
+    }
+    /**
+     * 获取新闻
+     */
+    public function getWebsiteArticlett()
+    {
+       
+        $requireData = $this->request->all();
+        $validator = $this->validationFactory->make(
+            $requireData,
+            [
+                'level' => 'required',
+                'pageSize' => 'required',
+            ],
+            [
+                'level.required' => '新闻类型不能为空',
+                'pageSize.required' => '显示条数不能为空',
+
+            ]
+        );
+        if ($validator->fails()){
+            $errorMessage = $validator->errors()->first();
+            return Result::error($errorMessage);
+        }
+        if(isset($requireData['placeid']) && !empty($requireData['placeid'])){
+            $data =[
+            'website_id'=>Context::get("SiteId"),
+            'level'=>$requireData['level'],
+            'pageSize'=>$requireData['pageSize'],
+            'placeid' => $requireData['placeid']
+            ];
+            
+        }else{
+            $data = [
+                'website_id'=>Context::get("SiteId"),
+                'level'=>$requireData['level'],
+                'pageSize'=>$requireData['pageSize']
+            ]; 
+        }
+        $result = $this->newsServiceClient->getWebsiteArticlett($data);
+        // var_dump($result);
+        if ($result['code'] != ErrorCode::SUCCESS) {
+            return Result::error($result['message'],0,[]);
+        }
+        return Result::success($result['data']);
+        
+    }
+     /**
+     * 获取模块新闻
+     */
+    public function getWebsiteModelArticles()
+    {
+        $requireData = $this->request->all();     
+        $validator = $this->validationFactory->make(
+            $requireData,
+            [
+                'catid' => 'required',
+                'level' => 'required',
+                'pagesize' => 'required'
+            ],
+            [
+                'catid.required' => '栏目id不能为空',
+                'level.required' => '新闻类型不能为空',
+                'pagesize.required' => '新闻条数不能为空'
+            ]
+        );
+        if ($validator->fails()){
+            $errorMessage = $validator->errors()->first();
+            return Result::error($errorMessage);
+        }
 
+        if(isset($requireData['placeid']) && !empty($requireData['placeid'])){
+            $data =[
+                'website_id'=>Context::get("SiteId"),
+                'catid' => $requireData['catid'],
+                'level' => $requireData['level'],
+                'pagesize' => $requireData['pagesize'],
+                'placeid' => $requireData['placeid']
+            ];
+        }else{
+            $data = [
+                'website_id'=>Context::get("SiteId"),
+                'catid' => $requireData['catid'],
+                'level' => $requireData['level'],
+                'pagesize' => $requireData['pagesize']
+            ];   
+        }      
+        $result = $this->newsServiceClient->getWebsiteModelArticles($data);
+        // var_dump($result);
+        if ($result['code'] != ErrorCode::SUCCESS) {
+            return Result::error($result['message'],0,[]);
+        }
+        return Result::success($result['data']);
+    }
+    /**
+     * 获取模块栏目
+     */
+    public function getWebsiteModelCategory()
+    {
+        $requireData = $this->request->all();     
+        $validator = $this->validationFactory->make(
+            $requireData,
+            [
+                'placeid' => 'required',
+                'pid' => 'required',
+                'num' => 'required'
+            ],
+            [
+                'placeid.required' => '栏目位置不能为空',
+                'pid' => '栏目类型不能为空',
+                'num' => '父级栏目数量'
+            ]
+        );
+        
+        if ($validator->fails()){
+            $errorMessage = $validator->errors()->first();
+            return Result::error($errorMessage);
+        }
+        $data = [
+            'website_id'=>Context::get("SiteId"),
+            'placeid' => $requireData['placeid'],
+            'pid' => $requireData['pid'],
+            'num' => $requireData['num']
+        ];    
+        $result=$this->websiteServiceClient->getWebsiteModelCategory($data);
+        
+        if ($result['code'] != ErrorCode::SUCCESS) {
+            return Result::error($result['message'],0,[]);
+        }
+        // var_dump($result['data']);
+        return Result::success($result['data']);
+        
+    }
+     /**
+     * 获取友情链接
+     * @return array
+     */
+    public function selectWebsiteLinks()
+    {
+        $requireData = $this->request->all();
+        $validator = $this->validationFactory->make(
+            $requireData,
+            [
+                'type' => 'required',
+                'num' => 'required'
+            ],
+            [
+                'type.required' => '友情链接类型不能为空',
+                'num.required' => '友情链接数量不能为空'
+            ]
+        );
+        if ($validator->fails()){
+            $errorMessage = $validator->errors()->first();
+            return Result::error($errorMessage);
+        }
+        $data = [
+            'website_id'=>Context::get("SiteId"),
+            'type'=>$requireData['type'],
+            'num' =>$requireData['num']
+        ];
+        $result = $this->websiteServiceClient->selectWebsiteLinks($data);
+        if ($result['code'] != ErrorCode::SUCCESS) {
+            return Result::error($result['message'],0,[]);
+        }
+        return Result::success($result['data']);
+    }
+    /**
+     * 获取文章列表
+     */
+    public function getWebsiteArticlesList()
+    {
+       
+        $requireData = $this->request->all();
+        if(isset($requireData['catid'])){
+            $validator = $this->validationFactory->make(
+            $requireData,
+            [
+                'catid' => 'required'
+            ],
+            [
+                'catid.required' => '栏目id不能为空'
 
+            ]
+            );
+            $data['catid'] =  $requireData['catid']; 
+        }elseif(isset($requireData['keyword'])){
+            $validator = $this->validationFactory->make(
+                $requireData,
+                [
+                    'keyword' => 'required'
+                ],
+                [
+                    'keyword.required' => '搜索词不能为空'
+    
+                ]
+            );
+            $data['keyword'] =  $requireData['keyword']; 
+        }else{
+            $validator = $this->validationFactory->make(
+                $requireData,
+                [
+                    'catid' => 'required',
+                    'keyword' => 'required'
+                ],
+                [
+                    'catid.required' => '栏目id不能为空',
+                    'keyword.required' => '搜索词不能为空'
+    
+                ]
+            );
+            $data['catid'] =  $requireData['catid']; 
+            $data['keyword'] =  $requireData['keyword']; 
+        }
+        $validator = $this->validationFactory->make(
+                $requireData,
+                [
+                    'page' => 'required',
+                    'pageSize' => 'required'
+                ],
+                [
+                    'page.required' => '分页不能为空',
+                    'pageSize.required' => '显示条数不能为空'
+    
+                ]
+            );
+            if ($validator->fails()){
+                $errorMessage = $validator->errors()->first();
+                return Result::error($errorMessage);
+            }
+            $data['website_id'] = Context::get("SiteId");
+            $data['pageSize'] = $requireData['pageSize']; 
+            $data['page'] = $requireData['page']; 
+        $result = $this->newsServiceClient->getArticleList($data);
+        // var_dump($result);
+        if ($result['code'] != ErrorCode::SUCCESS) {
+            return Result::error($result['message'],0,[]);
+        }
+        // $result = $data; 
+        return Result::success($result['data']);
+        
+    }
+     /**
+     * 获取文章详情
+     */
+    public function selectWebsiteArticleInfo()
+    {
+       
+        $requireData = $this->request->all();
+        $validator = $this->validationFactory->make(
+            $requireData,
+            [
+                'articleid' => 'required'
+            ],
+            [
+                'articleid.required' => '新闻id不能为空'
+            ]
+        );
+        if ($validator->fails()){
+            $errorMessage = $validator->errors()->first();
+            return Result::error($errorMessage);
+        }
+        $data = [
+            'website_id'=>Context::get("SiteId"),
+            'id'=>$requireData['articleid'],
+        ]; 
+        $result = $this->newsServiceClient->getArticleInfo($data);
+        // var_dump($result);
+        if ($result['code'] != ErrorCode::SUCCESS) {
+            return Result::error($result['message'],0,[]);
+        }
+        return Result::success($result['data']);
+        
+    }
 
 }

+ 18 - 0
app/Controller/WebSocketController.php

@@ -126,4 +126,22 @@ class NewsService extends AbstractServiceClient implements NewsServiceInterface
     {
         return $this->__request(__FUNCTION__, $data);
     }
+     /*
+     * @param array $data
+     * @return array
+     */
+    public function getWebsiteArticlett(array $data)
+    {
+        return $this->__request(__FUNCTION__, $data);
+    }
+    /**
+     * @param array $data
+     * @return array
+     */
+    public function getWebsiteModelArticles(array $data)
+    {
+        return $this->__request(__FUNCTION__, $data);
+    }
+    
+
 }

+ 10 - 0
app/JsonRpc/NewsServiceInterface.php

@@ -58,6 +58,16 @@ interface NewsServiceInterface
      * @return mixed
      */
     public function getCategoryInfo(array $data);
+    /**
+     * @param array $data
+     *
+     */
+    public function getWebsiteArticlett(array $data);
+
+    /**
+     * @param array $data
+     */
+    public function getWebsiteModelArticles(array $data);
 
     /**
      * @param array $data

+ 50 - 0
app/JsonRpc/PublicRpcService.php

@@ -209,6 +209,55 @@ class WebsiteService extends AbstractServiceClient implements WebsiteServiceInte
     {
         return $this->__request(__FUNCTION__, $data);
     }
+    /**
+     * @param array $data
+     * @return array|mixed
+     */
+    public function getWebsiteAdvertisement(array $data)
+    {
+        return $this->__request(__FUNCTION__, $data);
+    }
+
+     /**
+     * @param array $data
+     * @return array|mixed
+     */
+    public function selectWebsiteDepartment(array $data)
+    {
+        return $this->__request(__FUNCTION__, $data);
+    }
+    /**
+     * @param array $data
+     * @return mixed
+     */
+    public function selectWebsiteArea(array $data)
+    {
+        return $this->__request(__FUNCTION__, $data);
+    }
+    /**
+     * @param array $data
+     * @return mixed
+     */
+    public function getWebsiteModelCategory(array $data)
+    {
+        return $this->__request(__FUNCTION__, $data);
+    }
+
+    /**
+     * @param array $data
+     * @return mixed
+     */
+    public function selectWebsiteLinks(array $data)
+    {
+        return $this->__request(__FUNCTION__, $data);
+    }
+
+
+
+
+
+
+
 
     /**
      * @param array $data
@@ -380,4 +429,5 @@ class WebsiteService extends AbstractServiceClient implements WebsiteServiceInte
     {
         return $this->__request(__FUNCTION__, $data);
     }
+
 }

+ 49 - 0
app/JsonRpc/WebsiteServiceInterface.php

@@ -130,6 +130,55 @@ interface WebsiteServiceInterface
      *
      */
     public function getWebsiteCategory(array $data);
+     
+
+
+
+
+    /**
+     * @param array $data
+     * @return mixed
+     *
+     */
+    public function getWebsiteAdvertisement(array $data);
+
+    /**
+     * @param array $data
+     * @return mixed
+     *
+     */
+    public function selectWebsiteDepartment(array $data);
+    /**
+     * @param array $data
+     * @return mixed
+     *
+     */
+    public function selectWebsiteArea(array $data);
+    /**
+     * @param array $data
+     * @return mixed
+     *
+     */
+    public function getWebsiteModelCategory(array $data);
+
+    /**
+     * @param array $data
+     * @return mixed
+     *
+     */
+    public function selectWebsiteLinks(array $data);
+
+
+
+
+
+
+
+
+
+
+
+
 
     /**
      * @param array $data

+ 12 - 1
app/Listener/DbQueryExecutedListener.php

@@ -7,8 +7,19 @@ use Hyperf\HttpServer\Router\Router;
 use App\Middleware\Auth\WebMiddleware;
 Router::addGroup(
     '/web', function () {
-                Router::get('/getWebsiteId', [WebController::class, 'getWebsiteId']);
+
                 Router::get('/getWebsiteCategory', [WebController::class, 'getWebsiteCategory']);
+                Router::get('/getWebsiteDistrit', [WebController::class, 'getWebsiteDistrit']);
+                Router::get('/getWebsiteAdvertisement', [WebController::class, 'getWebsiteAdvertisement']);
+                Router::get('/selectWebsiteDepartment', [WebController::class, 'selectWebsiteDepartment']);
+                Router::get('/selectWebsiteArea', [WebController::class, 'selectWebsiteArea']);
+
+                Router::get('/getWebsiteArticlett', [WebController::class, 'getWebsiteArticlett']);
+                Router::get('/getWebsiteModelArticles', [WebController::class, 'getWebsiteModelArticles']);
+                Router::get('/getWebsiteModelCategory', [WebController::class, 'getWebsiteModelCategory']);
+                Router::get('/getWebsiteArticlesList', [WebController::class, 'getWebsiteArticlesList']);
+                Router::get('/selectWebsiteArticleInfo', [WebController::class, 'selectWebsiteArticleInfo']);
+                Router::get('/selectWebsiteLinks', [WebController::class, 'selectWebsiteLinks']);
             },
     ['middleware' => [WebMiddleware::class]]
 );

+ 0 - 1
config/autoload/amqp.php

@@ -1 +0,0 @@
-a:9:{i:0;s:52:"DeathSatan\Hyperf\Validate\Aspect\ControllerValidate";i:1;s:35:"Hyperf\Cache\Aspect\CacheableAspect";i:2;s:36:"Hyperf\Cache\Aspect\CacheAheadAspect";i:3;s:36:"Hyperf\Cache\Aspect\CacheEvictAspect";i:4;s:34:"Hyperf\Cache\Aspect\CachePutAspect";i:5;s:35:"Hyperf\Cache\Aspect\FailCacheAspect";i:6;s:36:"Hyperf\Config\Annotation\ValueAspect";i:7;s:44:"Hyperf\DbConnection\Aspect\TransactionAspect";i:8;s:33:"Hyperf\Di\Annotation\InjectAspect";}

+ 0 - 40
runtime/container/proxy/App_Amqp_Consumer_MqConsumer.proxy.php

@@ -1,40 +0,0 @@
-<?php
-
-declare (strict_types=1);
-namespace App\Amqp\Consumer;
-
-use Hyperf\Amqp\Result;
-use Hyperf\Amqp\Annotation\Consumer;
-use Hyperf\Amqp\Message\ConsumerMessage;
-use Hyperf\Di\Annotation\Inject;
-use PhpAmqpLib\Message\AMQPMessage;
-use App\JsonRpc\ChatServiceInterface;
-#[Consumer(exchange: 'hyperf', routingKey: 'hyperf', queue: 'hyperf', name: "MqConsumer", nums: 1)]
-class MqConsumer extends ConsumerMessage
-{
-    use \Hyperf\Di\Aop\ProxyTrait;
-    use \Hyperf\Di\Aop\PropertyHandlerTrait;
-    function __construct()
-    {
-        if (method_exists(parent::class, '__construct')) {
-            parent::__construct(...func_get_args());
-        }
-        $this->__handlePropertyHandler(__CLASS__);
-    }
-    /**
-     * @var ChatServiceInterface
-     */
-    #[Inject]
-    private $chatServiceClient;
-    public function consumeMessage($data, AMQPMessage $message) : Result
-    {
-        //数据存储
-        $result = $this->chatServiceClient->addTalkRecords($data);
-        var_dump("消费成功:", $result);
-        return Result::ACK;
-    }
-    //    public function isEnable(): bool
-    //    {
-    //        return false;
-    //    }
-}

+ 0 - 43
runtime/container/proxy/App_Controller_AbstractController.proxy.php

@@ -1,43 +0,0 @@
-<?php
-
-declare (strict_types=1);
-/**
- * This file is part of Hyperf.
- *
- * @link     https://www.hyperf.io
- * @document https://hyperf.wiki
- * @contact  group@hyperf.io
- * @license  https://github.com/hyperf/hyperf/blob/master/LICENSE
- */
-namespace App\Controller;
-
-use Hyperf\Di\Annotation\Inject;
-use Hyperf\HttpServer\Contract\RequestInterface;
-use Hyperf\HttpServer\Contract\ResponseInterface;
-use Hyperf\Logger\LoggerFactory;
-use Psr\Container\ContainerInterface;
-use Psr\Log\LoggerInterface;
-abstract class AbstractController
-{
-    use \Hyperf\Di\Aop\ProxyTrait;
-    use \Hyperf\Di\Aop\PropertyHandlerTrait;
-    function __construct()
-    {
-        $this->__handlePropertyHandler(__CLASS__);
-    }
-    #[Inject]
-    protected ContainerInterface $container;
-    #[Inject]
-    protected RequestInterface $request;
-    #[Inject]
-    protected ResponseInterface $response;
-    /**
-     * @var LoggerInterface
-     */
-    private $logger;
-    //    public function __construct(LoggerFactory $loggerFactory)
-    //    {
-    //        $this->logger =  $loggerFactory->get('admin_consumer:', 'default');
-    //        $this->logger->info("项目启动访问一次");
-    //    }
-}

+ 17 - 0
runtime/container/proxy/App_Controller_NewsController.proxy.php

@@ -65,6 +65,7 @@ class NewsController extends AbstractController
             $errorMessage = $validator->errors()->first();
             return Result::error($errorMessage);
         }
+        $requireData['website_id'] = Context::get("SiteId");
         $result = $this->newsServiceClient->categoryList($requireData);
         $rep = PublicData::buildMenuTree($result['data']);
         return $result ? Result::success($rep) : Result::error($result['message']);
@@ -138,6 +139,20 @@ class NewsController extends AbstractController
             $errorMessage = $validator->errors()->first();
             return Result::error($errorMessage);
         }
+        $requireData['website_id'] = Context::get("SiteId");
+        var_dump("资讯:", $requireData);
+        $result = $this->newsServiceClient->getArticleList($requireData);
+        //1通过,2待审核,3待发 4,拒绝 5删除
+        $statusList = ['1' => '通过', '2' => '待审核', '3' => '待发', '4' => '拒绝', '5' => '删除'];
+        if ($result['data']) {
+            foreach ($result['data']['rows'] as $k => $v) {
+                $result['data']['rows'][$k]['cat_arr_id'] = $v['cat_arr_id'] ? json_decode($v['cat_arr_id']) : [0];
+                $result['data']['rows'][$k]['tag'] = $v['tag'] ? json_decode($v['tag']) : [];
+                $result['data']['rows'][$k]['status_name'] = $statusList[$v['status']];
+                $result['data']['rows'][$k]['level'] = (string) $v['level'];
+                $result['data']['rows'][$k]['islink'] = isset($v['islink']) && $v['islink'] > 0 ? true : false;
+            }
+        }
         $result = $this->newsServiceClient->getArticleList($requireData);
         return $result['code'] == 200 ? Result::success($result['data']) : Result::error($result['message']);
     }
@@ -172,6 +187,7 @@ class NewsController extends AbstractController
         $requireData['cat_arr_id'] = isset($requireData['cat_arr_id']) ? json_encode($requireData['cat_arr_id']) : '';
         $loginIp = $this->request->getHeader('x-forwarded-for')[0] ?? $this->request->getHeader('x-real-ip')[0] ?? $this->request->getServerParams()['remote_addr'] ?? '0.0.0.0';
         $requireData['ip'] = $loginIp;
+        $requireData['website_id'] = Context::get("SiteId");
         $requireData['admin_user_id'] = Context::get("UserId");
         $requireData['level'] = isset($requireData['level']) && $requireData['level'] ? $requireData['level'] : 0;
         $requireData['hits'] = isset($requireData['hits']) && $requireData['hits'] ? $requireData['hits'] : 0;
@@ -225,6 +241,7 @@ class NewsController extends AbstractController
             $errorMessage = $validator->errors()->first();
             return Result::error($errorMessage);
         }
+        $requireData['website_id'] = Context::get("SiteId");
         $result = $this->newsServiceClient->delArticle($requireData);
         return $result['code'] == 200 ? Result::success($result['data']) : Result::error($result['message']);
     }

+ 0 - 131
runtime/container/proxy/App_Controller_WebSocketController.proxy.php

@@ -1,131 +0,0 @@
-<?php
-
-declare (strict_types=1);
-namespace App\Controller;
-
-use App\Amqp\Producer\MqProducer;
-use Hyperf\Amqp\Producer;
-use Hyperf\Context\ApplicationContext as ContextApplicationContext;
-use Hyperf\Contract\OnCloseInterface;
-use Hyperf\Contract\OnMessageInterface;
-use Hyperf\Contract\OnOpenInterface;
-use Hyperf\Engine\WebSocket\Frame;
-use Hyperf\Engine\WebSocket\Response;
-use Hyperf\WebSocketServer\Annotation\MessageHandler;
-use Hyperf\WebSocketServer\Context\WebSocketContext;
-use Hyperf\WebSocketServer\Message\Text;
-use Hyperf\Di\Annotation\Inject;
-use Phper666\JWTAuth\JWT;
-use App\JsonRpc\ChatServiceInterface;
-use Hyperf\WebSocketServer\Constant\Opcode;
-use App\Service\RedisService;
-use App\Service\Message\ReceiveHandleService;
-use http\Client\Request;
-use App\Controller\AbstractController;
-use App\JsonRpc\UserServiceInterface;
-class WebSocketController implements OnMessageInterface, OnOpenInterface, OnCloseInterface
-{
-    use \Hyperf\Di\Aop\ProxyTrait;
-    use \Hyperf\Di\Aop\PropertyHandlerTrait;
-    function __construct()
-    {
-        $this->__handlePropertyHandler(__CLASS__);
-    }
-    #[Inject]
-    protected JWT $jwt;
-    /**
-     * @var ChatServiceInterface
-     */
-    #[Inject]
-    private $chatServiceClient;
-    /**
-     * @var UserServiceInterface
-     */
-    #[Inject]
-    private $userServiceClient;
-    /**
-     * @Inject
-     * @var ReceiveHandleService
-     */
-    protected $receiveHandle;
-    public function onMessage($server, $frame) : void
-    {
-        //把数据推给前端
-        $redisClient = new RedisService();
-        $userId = $redisClient->findUser((string) $frame->fd);
-        //存入队列
-        $result = json_decode($frame->data, true);
-        $result['user_id'] = $userId;
-        $userInfo = $redisClient->getUserInfo($userId);
-        if ($userInfo) {
-            $userInfoArr = json_decode($userInfo);
-            $result['user_avatar'] = $userInfoArr['avatar'];
-        } else {
-            $userInfos = $this->userServiceClient->getUserInfo((int) $userId);
-            $redisClient->setUserInfo($userId, $userInfos['data']);
-            $result['user_avatar'] = $userInfos['data']['avatar'];
-        }
-        var_dump("接收到的数据:", $result);
-        $message = new MqProducer($result);
-        $producer = ContextApplicationContext::getContainer()->get(Producer::class);
-        $producer->produce($message);
-        //推送给前台
-        //组装数据+头像
-        if ($result['talk_type'] == 1) {
-            //给自己推一条数据
-            if ($server->isEstablished($frame->fd)) {
-                $server->push($frame->fd, json_encode($result));
-            }
-            //给好友推送消息
-            $fd = $redisClient->findFd((int) $result['receiver_id']);
-            //            $result['user_id'] = $result['friend_id'];
-            if ($server->isEstablished((int) $fd)) {
-                $b = $server->push((int) $fd, json_encode($result));
-                var_dump("推送成功:", $b);
-            }
-        } else {
-            if ($result['talk_type'] == 2) {
-                //根据群找到 群用户,群发一遍消息
-                $groupUserList = $this->chatServiceClient->getAllTalkGroupMember(['group_id' => $result['receiver_id']]);
-                var_dump($groupUserList['data']);
-                if ($groupUserList['data']) {
-                    foreach ($groupUserList['data'] as $val) {
-                        $fd = $redisClient->findFd((int) $val['user_id']);
-                        if ($server->isEstablished((int) $fd)) {
-                            $server->push((int) $fd, json_encode($result));
-                        }
-                    }
-                }
-            }
-        }
-    }
-    public function onClose($server, int $fd, int $reactorId) : void
-    {
-        var_dump('closed::::::::::::::::::', $fd, "======", $reactorId, "+++++++++++");
-        //        $data = [
-        //            'fd'=>$fd
-        //        ];
-        //        $this->chatServiceClient->delChatChannel($data);
-        $redisClient = new RedisService();
-        $userId = $redisClient->findUser((string) $fd);
-        $redisClient->unbind((string) $fd, (int) $userId);
-    }
-    public function onOpen($server, $request) : void
-    {
-        $token = $request->get['token'];
-        $userInfo = $this->jwt->getClaimsByToken($token);
-        $response = (new Response($server))->init($request);
-        $fd = $response->getFd();
-        //        var_dump("管道ID:",$fd);
-        //        $data = [
-        //            'user_id'=>$userInfo['uid'],
-        //            'fd'=>$fd
-        //        ];
-        //        var_dump(SERVER_RUN_ID,"+++++++++++++");
-        //      $this->chatServiceClient->addChatChannel($data);
-        $server->bind($fd, $userInfo['uid']);
-        $redisClient = new RedisService();
-        $redisClient->bind((string) $fd, $userInfo['uid']);
-        $server->push($request->fd, json_encode(["event" => "connect", "content" => ["ping_interval" => 20, "ping_timeout" => 20 * 3, "content" => "连接成功"]]));
-    }
-}

+ 0 - 79
runtime/container/proxy/App_JsonRpc_AdServiceInterface.rpc-client.proxy.php

@@ -1,79 +0,0 @@
-<?php
-
-namespace App\JsonRpc;
-
-class AdServiceInterface_3ac41e1a91edce2a03e766c3d95a7c11 extends \Hyperf\RpcClient\Proxy\AbstractProxyService implements AdServiceInterface
-{
-    /**
-     * @param array $data
-     * @return array
-     */
-    public function createAd(array $data)
-    {
-        return $this->client->__call(__FUNCTION__, func_get_args());
-    }
-    /**
-     * @param int $id
-     * @return array
-     */
-    public function getAdInfo(int $id)
-    {
-        return $this->client->__call(__FUNCTION__, func_get_args());
-    }
-    /**
-     * @param array $data
-     * @return mixed
-     */
-    public function getAdList(array $data)
-    {
-        return $this->client->__call(__FUNCTION__, func_get_args());
-    }
-    /**
-     * @param array $data
-     * @return mixed
-     */
-    public function updateAd(array $data)
-    {
-        return $this->client->__call(__FUNCTION__, func_get_args());
-    }
-    /**
-     * @param array $data
-     * @return mixed
-     */
-    public function delAd(array $data)
-    {
-        return $this->client->__call(__FUNCTION__, func_get_args());
-    }
-    /**
-     * @param array $data
-     * @return mixed
-     */
-    public function getAdPlaceList(array $data)
-    {
-        return $this->client->__call(__FUNCTION__, func_get_args());
-    }
-    /**
-     * @param array $data
-     * @return mixed
-     */
-    public function createAdPlace(array $data)
-    {
-        return $this->client->__call(__FUNCTION__, func_get_args());
-    }
-    /**
-     * @param array $data
-     * @return mixed
-     */
-    public function updateAdPlace(array $data)
-    {
-        return $this->client->__call(__FUNCTION__, func_get_args());
-    }
-    /**
-     * @param array $data
-     * @return mixed
-     */
-    public function delAdPlace(array $data)
-    {
-        return $this->client->__call(__FUNCTION__, func_get_args());
-    }
-}

+ 0 - 299
runtime/container/proxy/App_JsonRpc_ChatServiceInterface.rpc-client.proxy.php

@@ -1,299 +0,0 @@
-<?php
-
-namespace App\JsonRpc;
-
-class ChatServiceInterface_0cd93fa44e0f203faeac10c82cbfb519 extends \Hyperf\RpcClient\Proxy\AbstractProxyService implements ChatServiceInterface
-{
-    /**
-     * @param array $data
-     * @return array
-     */
-    public function getChatChannelList(array $data)
-    {
-        return $this->client->__call(__FUNCTION__, func_get_args());
-    }
-    /**
-     * @param array $data
-     * @return mixed
-     */
-    public function delChatChannel(array $data)
-    {
-        return $this->client->__call(__FUNCTION__, func_get_args());
-    }
-    /**
-     * @param array $data
-     * @return mixed
-     */
-    public function addChatChannel(array $data)
-    {
-        return $this->client->__call(__FUNCTION__, func_get_args());
-    }
-    /**
-     * 添加申请
-     * @param array $data
-     * @return array
-     */
-    public function addContactApply(array $data)
-    {
-        return $this->client->__call(__FUNCTION__, func_get_args());
-    }
-    /**
-     * 更新申请
-     * @param array $data
-     * @return array
-     */
-    public function updateContactApply(array $data)
-    {
-        return $this->client->__call(__FUNCTION__, func_get_args());
-    }
-    /**
-     * 好友申请列表
-     * @param array $data
-     * @return array
-     */
-    public function getContactApplyList(array $data)
-    {
-        return $this->client->__call(__FUNCTION__, func_get_args());
-    }
-    /**
-     * 好有查询
-     * @param array $data
-     * @return array
-     */
-    public function getContactList(array $data)
-    {
-        return $this->client->__call(__FUNCTION__, func_get_args());
-    }
-    /**
-     * 添加好友
-     * @param array $data
-     * @return array
-     */
-    public function addContact(array $data)
-    {
-        return $this->client->__call(__FUNCTION__, func_get_args());
-    }
-    /**
-     * 更新好友
-     * @param array $data
-     * @return array
-     */
-    public function updateContact(array $data)
-    {
-        return $this->client->__call(__FUNCTION__, func_get_args());
-    }
-    /**
-     * 删除好友
-     * @param array $data
-     * @return array
-     */
-    public function delContact(array $data)
-    {
-        return $this->client->__call(__FUNCTION__, func_get_args());
-    }
-    /**
-     * 会话列表
-     * @param array $data
-     * @return array
-     */
-    public function getTalkSessionList(array $data)
-    {
-        return $this->client->__call(__FUNCTION__, func_get_args());
-    }
-    /**
-     * 添加会话
-     * @param array $data
-     * @return array
-     */
-    public function addTalkSession(array $data)
-    {
-        return $this->client->__call(__FUNCTION__, func_get_args());
-    }
-    /**
-     * 更新会话
-     * @param array $data
-     * @return array
-     */
-    public function updateTalkSession(array $data)
-    {
-        return $this->client->__call(__FUNCTION__, func_get_args());
-    }
-    /**
-     * 删除会话
-     * @param array $data
-     * @return array
-     */
-    public function delTalkSession(array $data)
-    {
-        return $this->client->__call(__FUNCTION__, func_get_args());
-    }
-    /**
-     * 聊天内容
-     * @param array $data
-     * @return array
-     */
-    public function getTalkRecordsList(array $data)
-    {
-        return $this->client->__call(__FUNCTION__, func_get_args());
-    }
-    /**
-     * 添加聊天内容
-     * @param array $data
-     * @return array
-     */
-    public function addTalkRecords(array $data)
-    {
-        return $this->client->__call(__FUNCTION__, func_get_args());
-    }
-    /**
-     * 更新聊天内容
-     * @param array $data
-     * @return array
-     */
-    public function updateTalkRecords(array $data)
-    {
-        return $this->client->__call(__FUNCTION__, func_get_args());
-    }
-    /**
-     * 删除聊天内容
-     * @param array $data
-     * @return array
-     */
-    public function delTalkRecords(array $data)
-    {
-        return $this->client->__call(__FUNCTION__, func_get_args());
-    }
-    /**
-     * 聊天内容-附件列表
-     * @param array $data
-     * @return array
-     */
-    public function getTalkRecordsFileList(array $data)
-    {
-        return $this->client->__call(__FUNCTION__, func_get_args());
-    }
-    /**
-     * 聊天内容-添加附件
-     * @param array $data
-     * @return array
-     */
-    public function addTalkRecordsFile(array $data)
-    {
-        return $this->client->__call(__FUNCTION__, func_get_args());
-    }
-    /**
-     * 聊天内容 - 更新附件
-     * @param array $data
-     * @return array
-     */
-    public function updateTalkRecordsFile(array $data)
-    {
-        return $this->client->__call(__FUNCTION__, func_get_args());
-    }
-    /**
-     * 聊天内容 - 删除附件
-     * @param array $data
-     * @return array
-     */
-    public function delTalkRecordsFile(array $data)
-    {
-        return $this->client->__call(__FUNCTION__, func_get_args());
-    }
-    /**
-     * 群组 - 群列表
-     * @param array $data
-     * @return array
-     */
-    public function getTalkGroupList(array $data)
-    {
-        return $this->client->__call(__FUNCTION__, func_get_args());
-    }
-    /**
-     * 群组 - 创建群
-     * @param array $data
-     * @return array
-     */
-    public function addTalkGroup(array $data)
-    {
-        return $this->client->__call(__FUNCTION__, func_get_args());
-    }
-    /**
-     * 群组 - 更新群
-     * @param array $data
-     * @return array
-     */
-    public function updateTalkGroup(array $data)
-    {
-        return $this->client->__call(__FUNCTION__, func_get_args());
-    }
-    /**
-     * 群组 - 删除群
-     * @param array $data
-     * @return array
-     */
-    public function delTalkGroup(array $data)
-    {
-        return $this->client->__call(__FUNCTION__, func_get_args());
-    }
-    /**
-     * 群组 - 群用户列表
-     * @param array $data
-     * @return array
-     */
-    public function getTalkGroupMember(array $data)
-    {
-        return $this->client->__call(__FUNCTION__, func_get_args());
-    }
-    /**
-     * 群组 - 全部群用户列表
-     * @param array $data
-     * @return array
-     */
-    public function getAllTalkGroupMember(array $data)
-    {
-        return $this->client->__call(__FUNCTION__, func_get_args());
-    }
-    /**
-     * 群组 - 创建群用户
-     * @param array $data
-     * @return array
-     */
-    public function addTalkGroupMember(array $data)
-    {
-        return $this->client->__call(__FUNCTION__, func_get_args());
-    }
-    /**
-     * 群组 - 更新群用户
-     * @param array $data
-     * @return array
-     */
-    public function updateTalkGroupMember(array $data)
-    {
-        return $this->client->__call(__FUNCTION__, func_get_args());
-    }
-    /**
-     * 群组 - 删除群用户
-     * @param array $data
-     * @return array
-     */
-    public function delTalkGroupMember(array $data)
-    {
-        return $this->client->__call(__FUNCTION__, func_get_args());
-    }
-    /**
-     * @param array $data
-     * @return mixed
-     */
-    public function addTalkSessionAssociation(array $data)
-    {
-        return $this->client->__call(__FUNCTION__, func_get_args());
-    }
-    /**
-     * @param array $data
-     * @return mixed
-     */
-    public function updateTalkSessionAssociation(array $data)
-    {
-        return $this->client->__call(__FUNCTION__, func_get_args());
-    }
-}

+ 0 - 35
runtime/container/proxy/App_JsonRpc_LinkServiceInterface.rpc-client.proxy.php

@@ -1,35 +0,0 @@
-<?php
-
-namespace App\JsonRpc;
-
-class LinkServiceInterface_d8f22ae5023232e70650b2dfcba3359c extends \Hyperf\RpcClient\Proxy\AbstractProxyService implements LinkServiceInterface
-{
-    /**
-     * @param array $data
-     */
-    public function getLinkList(array $data)
-    {
-        return $this->client->__call(__FUNCTION__, func_get_args());
-    }
-    /**
-     * @param array $data
-     */
-    public function createLink(array $data)
-    {
-        return $this->client->__call(__FUNCTION__, func_get_args());
-    }
-    /**
-     * @param array $data
-     */
-    public function updateLink(array $data)
-    {
-        return $this->client->__call(__FUNCTION__, func_get_args());
-    }
-    /**
-     * @param array $data
-     */
-    public function delLink(array $data)
-    {
-        return $this->client->__call(__FUNCTION__, func_get_args());
-    }
-}

+ 16 - 1
runtime/container/proxy/App_JsonRpc_NewsServiceInterface.rpc-client.proxy.php

@@ -2,7 +2,7 @@
 
 namespace App\JsonRpc;
 
-class NewsServiceInterface_1dc952f30391d3623e254f507249f1da extends \Hyperf\RpcClient\Proxy\AbstractProxyService implements NewsServiceInterface
+class NewsServiceInterface_5754771ce906b41891d5f6190d493bc2 extends \Hyperf\RpcClient\Proxy\AbstractProxyService implements NewsServiceInterface
 {
     /**
      * @param array $data
@@ -82,6 +82,21 @@ class NewsServiceInterface_1dc952f30391d3623e254f507249f1da extends \Hyperf\RpcC
     {
         return $this->client->__call(__FUNCTION__, func_get_args());
     }
+    /**
+     * @param array $data
+     *
+     */
+    public function getWebsiteArticlett(array $data)
+    {
+        return $this->client->__call(__FUNCTION__, func_get_args());
+    }
+    /**
+     * @param array $data
+     */
+    public function getWebsiteModelArticles(array $data)
+    {
+        return $this->client->__call(__FUNCTION__, func_get_args());
+    }
     /**
      * @param array $data
      * @return mixed

+ 0 - 139
runtime/container/proxy/App_JsonRpc_PublicRpcServiceInterface.rpc-client.proxy.php

@@ -1,139 +0,0 @@
-<?php
-
-namespace App\JsonRpc;
-
-class PublicRpcServiceInterface_a72b5b36f26115c554ccfe849ff5bf29 extends \Hyperf\RpcClient\Proxy\AbstractProxyService implements PublicRpcServiceInterface
-{
-    /**
-     * @param array $data
-     */
-    public function getDistrictList(array $data)
-    {
-        return $this->client->__call(__FUNCTION__, func_get_args());
-    }
-    /**
-     * @param array $data
-     */
-    public function getUserLevelList(array $data)
-    {
-        return $this->client->__call(__FUNCTION__, func_get_args());
-    }
-    /**
-     * @param array $data
-     */
-    public function addUserLevel(array $data)
-    {
-        return $this->client->__call(__FUNCTION__, func_get_args());
-    }
-    /**
-     * @param array $data
-     */
-    public function delUserLevel(array $data)
-    {
-        return $this->client->__call(__FUNCTION__, func_get_args());
-    }
-    /**
-     * @param array $data
-     */
-    public function updateUserLevel(array $data)
-    {
-        return $this->client->__call(__FUNCTION__, func_get_args());
-    }
-    /**
-     * @param array $data
-     * @return mixed
-     */
-    public function getLetterOfComplaint(array $data)
-    {
-        return $this->client->__call(__FUNCTION__, func_get_args());
-    }
-    /**
-     * @param array $data
-     * @return mixed
-     */
-    public function addLetterOfComplaint(array $data)
-    {
-        return $this->client->__call(__FUNCTION__, func_get_args());
-    }
-    /**
-     * @param array $data
-     * @return mixed
-     */
-    public function upLetterOfComplaint(array $data)
-    {
-        return $this->client->__call(__FUNCTION__, func_get_args());
-    }
-    /**
-     * 用户端更新投诉举报信息
-     * @param array $data
-     * @return mixed
-     */
-    public function userUpLetterOfComplaint(array $data)
-    {
-        return $this->client->__call(__FUNCTION__, func_get_args());
-    }
-    /**
-     * @param array $data
-     * @return mixed
-     */
-    public function getLetterOfComplaintInfo(array $data)
-    {
-        return $this->client->__call(__FUNCTION__, func_get_args());
-    }
-    /**
-     * @param array $data
-     * @return mixed
-     */
-    public function delLetterOfComplaint(array $data)
-    {
-        return $this->client->__call(__FUNCTION__, func_get_args());
-    }
-    /**
-     * @param array $data
-     * @return mixed
-     */
-    public function getLetterType(array $data)
-    {
-        return $this->client->__call(__FUNCTION__, func_get_args());
-    }
-    /**
-     * @param array $data
-     * @return mixed
-     */
-    public function upLetterType(array $data)
-    {
-        return $this->client->__call(__FUNCTION__, func_get_args());
-    }
-    /**
-     * @param array $data
-     * @return mixed
-     */
-    public function addLetterType(array $data)
-    {
-        return $this->client->__call(__FUNCTION__, func_get_args());
-    }
-    /**
-     * @param array $data
-     * @return mixed
-     */
-    public function delLetterType(array $data)
-    {
-        return $this->client->__call(__FUNCTION__, func_get_args());
-    }
-    /**
-     * @param array $data
-     * @return mixed
-     */
-    public function checkMeasure(array $data)
-    {
-        return $this->client->__call(__FUNCTION__, func_get_args());
-    }
-    /**
-     * @param array $data
-     * @return mixed
-     */
-    public function getDepartment(array $data)
-    {
-        return $this->client->__call(__FUNCTION__, func_get_args());
-    }
-}

+ 0 - 133
runtime/container/proxy/App_JsonRpc_UserServiceInterface.rpc-client.proxy.php

@@ -1,133 +0,0 @@
-<?php
-
-namespace App\JsonRpc;
-
-class UserServiceInterface_c87d81348545884dd699f8f3dd42aaf4 extends \Hyperf\RpcClient\Proxy\AbstractProxyService implements UserServiceInterface
-{
-    /**
-     * @param array $data
-     */
-    public function createUser(array $data)
-    {
-        return $this->client->__call(__FUNCTION__, func_get_args());
-    }
-    /**
-     * @param int $id
-     */
-    public function getUserInfo(int $id)
-    {
-        return $this->client->__call(__FUNCTION__, func_get_args());
-    }
-    /**
-     * @param array $data
-     */
-    public function getUserList(array $data)
-    {
-        return $this->client->__call(__FUNCTION__, func_get_args());
-    }
-    /**
-     * @param array $data
-     * @return array
-     */
-    public function verifyUserInfo(array $data)
-    {
-        return $this->client->__call(__FUNCTION__, func_get_args());
-    }
-    /**
-     * @remark 创建登录日志信息
-     * @param array $data
-     * @return array
-     */
-    public function createUserLogin(array $data)
-    {
-        return $this->client->__call(__FUNCTION__, func_get_args());
-    }
-    /**
-     * 更新用户信息
-     * @param array $data
-     * @return array
-     */
-    public function updateUser(array $data)
-    {
-        return $this->client->__call(__FUNCTION__, func_get_args());
-    }
-    /**
-     * 更新用户
-     * @param array $data
-     * @return array
-     */
-    public function updateUserInfo(array $data)
-    {
-        return $this->client->__call(__FUNCTION__, func_get_args());
-    }
-    /**
-     * 删除用户
-     * @param int $id
-     * @return array
-     */
-    public function delUser(int $id)
-    {
-        return $this->client->__call(__FUNCTION__, func_get_args());
-    }
-    /**
-     * 添加角色
-     * @param array $data
-     * @return array
-     */
-    public function addRole(array $data)
-    {
-        return $this->client->__call(__FUNCTION__, func_get_args());
-    }
-    /**
-     * 删除角色
-     * @param array $data
-     * @return array
-     */
-    public function delRole(array $data)
-    {
-        return $this->client->__call(__FUNCTION__, func_get_args());
-    }
-    /**
-     * 更新角色
-     * @param array $data
-     * @return array
-     */
-    public function updateRole(array $data)
-    {
-        return $this->client->__call(__FUNCTION__, func_get_args());
-    }
-    /**
-     * 角色列表
-     * @param array $data
-     * @return array
-     */
-    public function roleList(array $data)
-    {
-        return $this->client->__call(__FUNCTION__, func_get_args());
-    }
-    /**
-     * 角色信息
-     * @param array $data
-     * @return array
-     */
-    public function roleInfo(array $data)
-    {
-        return $this->client->__call(__FUNCTION__, func_get_args());
-    }
-    /**
-     * @param array $data
-     * @return mixed
-     */
-    public function getWechatInfo(array $data)
-    {
-        return $this->client->__call(__FUNCTION__, func_get_args());
-    }
-    /**
-     * @param array $data
-     * @return mixed
-     */
-    public function addWechatInfo(array $data)
-    {
-        return $this->client->__call(__FUNCTION__, func_get_args());
-    }
-}

+ 46 - 1
runtime/container/proxy/App_JsonRpc_WebsiteServiceInterface.rpc-client.proxy.php

@@ -2,7 +2,7 @@
 
 namespace App\JsonRpc;
 
-class WebsiteServiceInterface_a6099ced51bfe0de46ae02499a201262 extends \Hyperf\RpcClient\Proxy\AbstractProxyService implements WebsiteServiceInterface
+class WebsiteServiceInterface_959420a0fc6b6fbefe87e711052495ed extends \Hyperf\RpcClient\Proxy\AbstractProxyService implements WebsiteServiceInterface
 {
     /**
      * @param string $keyword
@@ -174,6 +174,51 @@ class WebsiteServiceInterface_a6099ced51bfe0de46ae02499a201262 extends \Hyperf\R
     {
         return $this->client->__call(__FUNCTION__, func_get_args());
     }
+    /**
+     * @param array $data
+     * @return mixed
+     *
+     */
+    public function getWebsiteAdvertisement(array $data)
+    {
+        return $this->client->__call(__FUNCTION__, func_get_args());
+    }
+    /**
+     * @param array $data
+     * @return mixed
+     *
+     */
+    public function selectWebsiteDepartment(array $data)
+    {
+        return $this->client->__call(__FUNCTION__, func_get_args());
+    }
+    /**
+     * @param array $data
+     * @return mixed
+     *
+     */
+    public function selectWebsiteArea(array $data)
+    {
+        return $this->client->__call(__FUNCTION__, func_get_args());
+    }
+    /**
+     * @param array $data
+     * @return mixed
+     *
+     */
+    public function getWebsiteModelCategory(array $data)
+    {
+        return $this->client->__call(__FUNCTION__, func_get_args());
+    }
+    /**
+     * @param array $data
+     * @return mixed
+     *
+     */
+    public function selectWebsiteLinks(array $data)
+    {
+        return $this->client->__call(__FUNCTION__, func_get_args());
+    }
     /**
      * @param array $data
      * @return mixed

+ 0 - 35
runtime/container/proxy/App_Service_RedisInterface.proxy.php

@@ -1,35 +0,0 @@
-<?php
-
-declare (strict_types=1);
-/**
- * This file is part of Hyperf.
- *
- * @link     https://www.hyperf.io
- * @document https://hyperf.wiki
- * @contact  group@hyperf.io
- * @license  https://github.com/hyperf/hyperf/blob/master/LICENSE
- */
-namespace App\Service;
-
-use Hyperf\Di\Annotation\Inject;
-use Psr\Container\ContainerInterface;
-abstract class RedisInterface
-{
-    use \Hyperf\Di\Aop\ProxyTrait;
-    use \Hyperf\Di\Aop\PropertyHandlerTrait;
-    protected $redis;
-    #[Inject]
-    protected ContainerInterface $container;
-    public function __construct()
-    {
-        $this->__handlePropertyHandler(__CLASS__);
-        /**
-         * 生成图片验证码
-         * @return string
-         * @throws \Psr\Container\ContainerExceptionInterface
-         * @throws \Psr\Container\NotFoundExceptionInterface
-         * @throws \RedisException
-         */
-        $this->redis = $this->container->get(\Hyperf\Redis\Redis::class);
-    }
-}

+ 0 - 97
runtime/container/proxy/App_Service_RedisService.proxy.php

@@ -1,97 +0,0 @@
-<?php
-
-namespace App\Service;
-
-use App\Cache\SocketFdBindUser;
-use App\Cache\SocketUserBindFds;
-/**
- * websocket关系存储
- *
- * @package App\Service
- */
-class RedisService extends RedisInterface
-{
-    use \Hyperf\Di\Aop\ProxyTrait;
-    use \Hyperf\Di\Aop\PropertyHandlerTrait;
-    function __construct()
-    {
-        if (method_exists(parent::class, '__construct')) {
-            parent::__construct(...func_get_args());
-        }
-        $this->__handlePropertyHandler(__CLASS__);
-    }
-    protected $prefix_fn = 'chat_fn';
-    protected $prefix_user = 'chat_user';
-    protected $prefix_user_info = 'userListInfo';
-    /**
-     * 绑定fd和用户关系
-     * @param string $fid
-     * @param int $userId
-     * @param $run_id
-     * @return void
-     * @throws \RedisException
-     */
-    public function bind(string $fid, int $userId, $run_id = SERVER_RUN_ID)
-    {
-        //站点通道+用户
-        $this->redis->hSet($run_id, $this->prefix_fn . $fid, $userId);
-        //站点用户+通道
-        $this->redis->hSet($run_id, $this->prefix_user . $userId, $fid);
-    }
-    /**
-     * 解绑通道和用户关系
-     * @param string $fid
-     * @param int $userId
-     * @param $run_id
-     * @return void
-     * @throws \RedisException
-     */
-    public function unbind(string $fid, int $userId, $run_id = SERVER_RUN_ID)
-    {
-        $this->redis->hDel($run_id, $this->prefix_fn . $fid);
-        $this->redis->hDel($run_id, $this->prefix_user . $userId);
-    }
-    /**
-     * 通过FD获取userID
-     * @param string $fid
-     * @param $run_id
-     * @return false|\Redis|string
-     * @throws \RedisException
-     */
-    public function findUser(string $fid, $run_id = SERVER_RUN_ID)
-    {
-        return $this->redis->hGet($run_id, $this->prefix_fn . $fid);
-    }
-    /**
-     * 通过UserID 获取fd
-     * @param int $userId
-     * @param $run_id
-     * @return false|\Redis|string
-     * @throws \RedisException
-     */
-    public function findFd(int $userId, $run_id = SERVER_RUN_ID)
-    {
-        return $this->redis->hGet($run_id, $this->prefix_user . $userId);
-    }
-    /**
-     * 存储用户信息
-     * @param int $userId
-     * @param array $data
-     * @return void
-     * @throws \RedisException
-     */
-    public function setUserInfo(string $userId, array $data)
-    {
-        $this->redis->hSet($this->prefix_user_info, $userId, json_encode($data));
-    }
-    /**
-     * 获取用户信息
-     * @param int $userId
-     * @return void
-     * @throws \RedisException
-     */
-    public function getUserInfo(string $userId)
-    {
-        $this->redis->hGet($this->prefix_user_info, $userId);
-    }
-}

+ 0 - 0
storage/languages/en/validation.php