AI Assistant 6 mesiacov pred
rodič
commit
4d0d6d0b49

+ 3 - 2
.augment-guidelines

@@ -1,7 +1,8 @@
 # Augment Guidelines for KKU Laravel Project
 
 ## 项目概述
-这是一个基于Laravel 11的农场游戏系统,本地使用Docker运行,访问地址:http://kku_laravel.local.gd
+- 这是一个基于Laravel 11的农场游戏系统
+- 项目本地使用Docker运行,访问地址:http://kku_laravel.local.gd
 - 当前项目处理维护期,不得随意对数据库的表结构进行修改,不得对涉及游戏数值的表进行修改
 
 ## 工作流程规范
@@ -89,7 +90,7 @@
 - 接口数据问题时优先检查数据结构字段名匹配
 - 注意Logic层返回字段名与Handler中访问字段名一致
 - Handler处理protobuf响应时确保所有必需字段有正确数据源
-- 使用 `php artisan debug:reproduce-error` 命令回放错误请求进行调试验证
+- 使用 `php artisan debug:reproduce-error {请求ID}` 命令回放错误请求进行调试验证,
 
 ## 特殊注意事项
 - 不使用数据库迁移,不注册路由(使用注解),不包含视图/前端资源/中间件/计划任务

+ 6 - 2
app/Module/Game/Services/ConsumeTypeDescriptor.php

@@ -102,11 +102,15 @@ class ConsumeTypeDescriptor
     /**
      * 获取消耗类型的目标选项(用于表单)
      *
-     * @param int $consumeType 消耗类型
+     * @param int|null $consumeType 消耗类型
      * @return array 目标选项数组
      */
-    public static function getTargetOptions(int $consumeType): array
+    public static function getTargetOptions(?int $consumeType): array
     {
+        // 如果消耗类型为null,返回空数组
+        if ($consumeType === null) {
+            return [];
+        }
 
 //        dd($consumeType);
         switch ($consumeType) {

+ 2 - 2
docker-compose.yml

@@ -1,5 +1,5 @@
 networks:
-    ggggg:
+    aaaaa:
         external: true
 services:
   dev:
@@ -17,4 +17,4 @@ services:
     ports:
        - 36019:80
     networks:
-        - ggggg
+        - aaaaa