rkljw 1 month ago
parent
commit
0c9ba5e1f6

+ 5 - 2
.env

@@ -1,6 +1,8 @@
-APP_NAME=news_producer
+APP_NAME=user_producer
 APP_ENV=dev
+
 HOST = http://101.254.114.211:13306/
+
 DB_DRIVER=mysql
 DB_HOST=192.168.1.123
 DB_PORT=13306
@@ -10,7 +12,7 @@ DB_PASSWORD=zxt_mysql_dev
 DB_CHARSET=utf8mb4
 DB_COLLATION=utf8mb4_unicode_ci
 DB_PREFIX=
-# APP_ENV=dev
+
 
 REDIS_HOST=101.254.114.211
 REDIS_AUTH=YPWWnFnNebc7427B
@@ -21,3 +23,4 @@ AMQP_HOST=103.105.201.2
 AMQP_PORT=5673
 AMQP_USER=rabbitmq
 AMQP_PASSWORD=H8eDTAk6LY7EjJ8y
+

+ 2 - 0
app/Controller/IndexController.php

@@ -10,6 +10,7 @@ declare(strict_types=1);
  * @license  https://github.com/hyperf/hyperf/blob/master/LICENSE
  */
 
+
 namespace App\Controller;
 
 class IndexController extends AbstractController
@@ -23,5 +24,6 @@ class IndexController extends AbstractController
             'method' => $method,
             'message' => "Hello {$user}.",
         ];
+        // master
     }
 }

+ 21 - 0
app/JsonRpc/NewsService.php

@@ -786,4 +786,25 @@ class NewsService implements NewsServiceInterface
         }
         return Result::error("参数必填!");
     }
+    /**
+     * 验证导航名称是否重复
+     * @return void
+     */
+    public function checkCategoryName(array $data): array
+    {
+        $result = Category::when($data, function ($query) use ($data) {
+            if(isset($data['name']) && $data['name']) {
+                $query->where("name", $data['name']);
+            }
+            if(isset($data['id']) && $data['id']) {
+                $query->where("id","!=" ,$data['id']);
+            }
+        })->first();
+        if($result){
+            return Result::error("已存在");
+        }else{
+            return Result::success();
+        }
+    }
+
 }

+ 1 - 0
app/JsonRpc/NewsServiceInterface.php

@@ -126,4 +126,5 @@ interface NewsServiceInterface
      */
     public function addWebsiteSurveyVote(array $data):array;
 
+
 }

File diff suppressed because it is too large
+ 0 - 0
runtime/container/scan.cache


+ 10 - 0
runtime/logs/hyperf.log

@@ -0,0 +1,10 @@
+<<<<<<< HEAD
+=======
+[2024-12-30T06:38:12.496098+00:00] sql.INFO: [709.21] select `category`.*, `category`.`id` as `category_id` from `category` where (`pid` = '7') [] []
+[2024-12-30T06:38:47.428649+00:00] sql.INFO: [17.24] select `category`.*, `category`.`id` as `category_id` from `category` where (`pid` = '5') [] []
+[2024-12-30T06:51:39.863013+00:00] sql.INFO: [65.56] select `category`.*, `category`.`id` as `category_id` from `category` where (`pid` = '5') [] []
+[2024-12-30T06:54:42.876483+00:00] sql.INFO: [68.75] select `category`.*, `category`.`id` as `category_id` from `category` where (`pid` = '5') [] []
+[2024-12-30T06:54:56.791140+00:00] sql.INFO: [3328.19] select `category`.*, `category`.`id` as `category_id` from `category` where (`pid` = '0') [] []
+[2024-12-30T06:56:06.854836+00:00] sql.INFO: [67] select `category`.*, `category`.`id` as `category_id` from `category` where (`pid` = '0') [] []
+[2024-12-30T06:56:15.144154+00:00] sql.INFO: [17.25] select `category`.*, `category`.`id` as `category_id` from `category` where (`pid` = '5') [] []
+>>>>>>> bugfix_02025_02_24

Some files were not shown because too many files changed in this diff