浏览代码

修改获取用户选择的模板信息

15313670163 2 月之前
父节点
当前提交
52f0859020
共有 4 个文件被更改,包括 37 次插入6 次删除
  1. 6 5
      app/JsonRpc/WebsiteService.php
  2. 0 0
      runtime/container/scan.cache
  3. 1 1
      runtime/hyperf.pid
  4. 30 0
      runtime/logs/hyperf.log

+ 6 - 5
app/JsonRpc/WebsiteService.php

@@ -1472,6 +1472,11 @@ class WebsiteService implements WebsiteServiceInterface
             'website_template_info.page_type',
             'website_template_info.website_id')
         ->first();
+
+        if(empty($result)){
+            return Result::error("没有查找到相关数据",0);
+        }
+        
         // return Result::success($result);
         // 过滤 template_img 字段  只获取 基础信息中 包含的模板图片
         $template_img = $result['template_img'] !== null ? json_decode($result['template_img'], true) : [];
@@ -1501,11 +1506,7 @@ class WebsiteService implements WebsiteServiceInterface
         //     $pages--;
         // }
 
-        if(empty($result)){
-            return Result::error("没有查找到相关数据",0);
-        }else{
-            return Result::success($result);
-        }
+        return Result::success($result);
     }
     
 }

文件差异内容过多而无法显示
+ 0 - 0
runtime/container/scan.cache


+ 1 - 1
runtime/hyperf.pid

@@ -1 +1 @@
-8851
+4228

+ 30 - 0
runtime/logs/hyperf.log

@@ -3581,3 +3581,33 @@
 [2025-02-07T14:29:03.523525+08:00] sql.INFO: [15.47] select * from `website` where `website`.`id` = '2' limit 1 [] []
 [2025-02-07T14:29:03.541318+08:00] sql.INFO: [16.67] select * from `website_template_info` where (`website_id` = '2') limit 1 [] []
 [2025-02-07T14:29:03.557914+08:00] sql.INFO: [15.64] update `website_template_info` set `page_type` = '["1","2","7","5","6"]', `statement` = '不是一个人的王者,而是团队的荣耀!', `organizer` = '王者荣耀', `copyright_information` = '全军出击', `contact_number` = '您已被举报!您已被举报!您已被举报!您已被举报!', `company_address` = '王者峡谷', `project_logo` = 'Timi', `project_name` = '排位赛', `project_url` = '请选择你要去往的分路!', `company_logo` = '匹配赛', `company_name` = '召集模式;我很急!', `company_url` = '要不你顺着网线爬过来?', `record_number` = '666777777', `record_number_url` = '请文明发言', `icp_number` = '您已被举报!', `icp_number_url` = '您已被禁言!', `customer_service_qq` = '46132135464', `communications` = '46846844684', `website_template_info`.`updated_at` = '2025-02-07 14:29:03' where (`website_id` = '2') [] []
+[2025-02-08T15:51:39.576033+08:00] sql.INFO: [65.25] select * from `website_template_info` where `website_id` = '2' limit 1 [] []
+[2025-02-08T15:51:45.682686+08:00] sql.INFO: [16.51] select * from `website_template_info` where `website_id` = '5' limit 1 [] []
+[2025-02-08T15:51:45.709374+08:00] sql.INFO: [16.74] select `template`.`template_name`, `template`.`template_img`, `template`.`id` as `tid`, `template_class`.`name`, `template_class`.`id` as `class_id`, `website_template_info`.`page_type`, `website_template_info`.`website_id` from `website_template_info` left join `template` on `template`.`id` = `website_template_info`.`template_id` left join `template_class` on `template_class`.`id` = `template`.`template_class_id` where (`website_template_info`.`website_id` = '5' and `template_id` is not null) and (json_contains(`template`.`template_img`, '{"value":"1"}') or json_contains(`template`.`template_img`, '{"value":"7"}') or json_contains(`template`.`template_img`, '{"value":"3"}') or json_contains(`template`.`template_img`, '{"value":"4"}')) limit 1 [] []
+[2025-02-08T15:52:15.466076+08:00] sql.INFO: [17.2] select * from `website_template_info` where `website_id` = '5' limit 1 [] []
+[2025-02-08T15:52:15.483916+08:00] sql.INFO: [16.88] select `template`.`template_name`, `template`.`template_img`, `template`.`id` as `tid`, `template_class`.`name`, `template_class`.`id` as `class_id`, `website_template_info`.`page_type`, `website_template_info`.`website_id` from `website_template_info` left join `template` on `template`.`id` = `website_template_info`.`template_id` left join `template_class` on `template_class`.`id` = `template`.`template_class_id` where (`website_template_info`.`website_id` = '5' and `template_id` is not null) and (json_contains(`template`.`template_img`, '{"value":"1"}') or json_contains(`template`.`template_img`, '{"value":"7"}') or json_contains(`template`.`template_img`, '{"value":"3"}') or json_contains(`template`.`template_img`, '{"value":"4"}')) limit 1 [] []
+[2025-02-08T15:52:25.015419+08:00] sql.INFO: [4227.49] select * from `website_template_info` where `website_id` = '5' limit 1 [] []
+[2025-02-08T15:52:25.263937+08:00] sql.INFO: [230.01] select `template`.`template_name`, `template`.`template_img`, `template`.`id` as `tid`, `website_template_info`.`page_type`, `website_template_info`.`website_id` from `website_template_info` left join `template` on `template`.`id` = `website_template_info`.`template_id` where (`website_template_info`.`website_id` = '5' and `template_id` is not null) and (json_contains(`template`.`template_img`, '{"value":"1"}') or json_contains(`template`.`template_img`, '{"value":"7"}') or json_contains(`template`.`template_img`, '{"value":"3"}') or json_contains(`template`.`template_img`, '{"value":"4"}')) limit 1 [] []
+[2025-02-08T15:52:38.528724+08:00] sql.INFO: [520.81] select * from `website_template_info` where `website_id` = '5' limit 1 [] []
+[2025-02-08T15:52:38.543557+08:00] sql.INFO: [13.74] select `template`.`template_name`, `template`.`template_img`, `template`.`id` as `tid`, `website_template_info`.`page_type`, `website_template_info`.`website_id` from `website_template_info` left join `template` on `template`.`id` = `website_template_info`.`template_id` where (`website_template_info`.`website_id` = '5' and `template_id` is not null) and (json_contains(`template`.`template_img`, '{"value":"1"}') or json_contains(`template`.`template_img`, '{"value":"7"}') or json_contains(`template`.`template_img`, '{"value":"3"}') or json_contains(`template`.`template_img`, '{"value":"4"}')) limit 1 [] []
+[2025-02-08T15:52:40.101201+08:00] sql.INFO: [518.99] select * from `website_template_info` where `website_id` = '5' limit 1 [] []
+[2025-02-08T15:52:40.344855+08:00] sql.INFO: [242.26] select `template`.`template_name`, `template`.`template_img`, `template`.`id` as `tid`, `website_template_info`.`page_type`, `website_template_info`.`website_id` from `website_template_info` left join `template` on `template`.`id` = `website_template_info`.`template_id` where (`website_template_info`.`website_id` = '5' and `template_id` is not null) and (json_contains(`template`.`template_img`, '{"value":"1"}') or json_contains(`template`.`template_img`, '{"value":"7"}') or json_contains(`template`.`template_img`, '{"value":"3"}') or json_contains(`template`.`template_img`, '{"value":"4"}')) limit 1 [] []
+[2025-02-08T15:52:43.303780+08:00] sql.INFO: [168.44] select * from `website_template_info` where `website_id` = '5' limit 1 [] []
+[2025-02-08T15:52:49.855752+08:00] sql.INFO: [15.11] select * from `website_template_info` where `website_id` = '5' limit 1 [] []
+[2025-02-08T15:52:50.844064+08:00] sql.INFO: [16.13] select * from `website_template_info` where `website_id` = '5' limit 1 [] []
+[2025-02-08T15:52:54.917574+08:00] sql.INFO: [65.18] select * from `website_template_info` where `website_id` = '5' limit 1 [] []
+[2025-02-08T15:52:54.945288+08:00] sql.INFO: [13.5] select `website_template_info`.`page_type`, `website_template_info`.`website_id` from `website_template_info` where (`website_template_info`.`website_id` = '5' and `template_id` is not null) limit 1 [] []
+[2025-02-08T15:55:55.044549+08:00] sql.INFO: [64.42] select * from `website` where `website`.`id` = '2' limit 1 [] []
+[2025-02-08T15:55:55.058451+08:00] sql.INFO: [12.98] select `page_type` from `website_template_info` where `website_id` = '2' limit 1 [] []
+[2025-02-08T15:56:04.734301+08:00] sql.INFO: [17.38] select * from `website` where `website`.`id` = '5' limit 1 [] []
+[2025-02-08T15:56:04.964287+08:00] sql.INFO: [229.2] select `page_type` from `website_template_info` where `website_id` = '5' limit 1 [] []
+[2025-02-08T15:56:04.985232+08:00] sql.INFO: [15.5] select * from `template` where (json_contains(`template_img`, '{"value":"1"}') and json_contains(`template_img`, '{"value":"7"}') and json_contains(`template_img`, '{"value":"3"}') and json_contains(`template_img`, '{"value":"4"}')) order by `template`.`updated_at` desc limit 10 offset 0 [] []
+[2025-02-08T15:56:05.213194+08:00] sql.INFO: [227.01] select count(*) as aggregate from `template` where (json_contains(`template_img`, '{"value":"1"}') and json_contains(`template_img`, '{"value":"7"}') and json_contains(`template_img`, '{"value":"3"}') and json_contains(`template_img`, '{"value":"4"}')) [] []
+[2025-02-08T15:56:26.829989+08:00] sql.INFO: [16.88] select * from `website` where `website`.`id` = '1' limit 1 [] []
+[2025-02-08T15:56:26.844361+08:00] sql.INFO: [13.57] select `page_type` from `website_template_info` where `website_id` = '1' limit 1 [] []
+[2025-02-08T15:56:26.862069+08:00] sql.INFO: [16.63] select * from `template` where (json_contains(`template_img`, '{"value":"1"}') and json_contains(`template_img`, '{"value":"7"}') and json_contains(`template_img`, '{"value":"2"}') and json_contains(`template_img`, '{"value":"5"}') and json_contains(`template_img`, '{"value":"6"}')) order by `template`.`updated_at` desc limit 10 offset 0 [] []
+[2025-02-08T15:56:26.876566+08:00] sql.INFO: [13.74] select count(*) as aggregate from `template` where (json_contains(`template_img`, '{"value":"1"}') and json_contains(`template_img`, '{"value":"7"}') and json_contains(`template_img`, '{"value":"2"}') and json_contains(`template_img`, '{"value":"5"}') and json_contains(`template_img`, '{"value":"6"}')) [] []
+[2025-02-08T15:56:35.046406+08:00] sql.INFO: [17.61] select * from `website` where `website`.`id` = '5' limit 1 [] []
+[2025-02-08T15:56:35.062261+08:00] sql.INFO: [14.8] select `page_type` from `website_template_info` where `website_id` = '5' limit 1 [] []
+[2025-02-08T15:56:35.078018+08:00] sql.INFO: [14.61] select * from `template` where (json_contains(`template_img`, '{"value":"1"}') and json_contains(`template_img`, '{"value":"7"}') and json_contains(`template_img`, '{"value":"3"}') and json_contains(`template_img`, '{"value":"4"}')) order by `template`.`updated_at` desc limit 10 offset 0 [] []
+[2025-02-08T15:56:35.093473+08:00] sql.INFO: [14.66] select count(*) as aggregate from `template` where (json_contains(`template_img`, '{"value":"1"}') and json_contains(`template_img`, '{"value":"7"}') and json_contains(`template_img`, '{"value":"3"}') and json_contains(`template_img`, '{"value":"4"}')) [] []

部分文件因为文件数量过多而无法显示