From e8b39741911284ffc33e995757489d2d33616ee9 Mon Sep 17 00:00:00 2001 From: Anyon Date: Thu, 2 Apr 2026 12:55:23 +0800 Subject: [PATCH] =?UTF-8?q?fix(wemall):=20=E4=BF=AE=E5=A4=8D=E7=BA=A6?= =?UTF-8?q?=E6=9D=9F=E8=BF=81=E7=A7=BB=E5=85=BC=E5=AE=B9=E5=B9=B6=E9=81=BF?= =?UTF-8?q?=E8=AE=A9=E7=89=88=E6=9C=AC=E5=86=B2=E7=AA=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...ints.php => 20241010000010_fix_wemall_constraints.php} | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) rename plugin/think-plugs-wemall/stc/database/{20241010000008_fix_wemall_constraints.php => 20241010000010_fix_wemall_constraints.php} (95%) diff --git a/plugin/think-plugs-wemall/stc/database/20241010000008_fix_wemall_constraints.php b/plugin/think-plugs-wemall/stc/database/20241010000010_fix_wemall_constraints.php similarity index 95% rename from plugin/think-plugs-wemall/stc/database/20241010000008_fix_wemall_constraints.php rename to plugin/think-plugs-wemall/stc/database/20241010000010_fix_wemall_constraints.php index 897aeaaeb..fe7864add 100644 --- a/plugin/think-plugs-wemall/stc/database/20241010000008_fix_wemall_constraints.php +++ b/plugin/think-plugs-wemall/stc/database/20241010000010_fix_wemall_constraints.php @@ -58,13 +58,13 @@ class FixWemallConstraints extends Migrator $table = $this->table('plugin_wemall_user_rebate'); // 添加订单商品项ID字段(用于精确追踪返佣) - if (!$this->hasColumn('plugin_wemall_user_rebate', 'order_item_id')) { + if (!$table->hasColumn('order_item_id')) { $table->addColumn('order_item_id', 'biginteger', ['limit' => 20, 'default' => 0, 'null' => true, 'comment' => '订单商品项ID']) ->update(); } // 添加返佣规则ID字段(用于追溯规则版本) - if (!$this->hasColumn('plugin_wemall_user_rebate', 'rebate_rule_id')) { + if (!$table->hasColumn('rebate_rule_id')) { $table->addColumn('rebate_rule_id', 'biginteger', ['limit' => 20, 'default' => 0, 'null' => true, 'comment' => '返佣规则ID']) ->update(); } @@ -80,7 +80,7 @@ class FixWemallConstraints extends Migrator { // 修复余额表 $table = $this->table('plugin_payment_balance'); - if (!$this->hasColumn('plugin_payment_balance', 'source_type')) { + if (!$table->hasColumn('source_type')) { $table->addColumn('source_type', 'string', ['limit' => 50, 'default' => '', 'null' => true, 'comment' => '资金来源类型']) ->addColumn('source_id', 'string', ['limit' => 50, 'default' => '', 'null' => true, 'comment' => '资金来源ID']) ->update(); @@ -88,7 +88,7 @@ class FixWemallConstraints extends Migrator // 修复积分表 $table = $this->table('plugin_payment_integral'); - if (!$this->hasColumn('plugin_payment_integral', 'source_type')) { + if (!$table->hasColumn('source_type')) { $table->addColumn('source_type', 'string', ['limit' => 50, 'default' => '', 'null' => true, 'comment' => '积分来源类型']) ->addColumn('source_id', 'string', ['limit' => 50, 'default' => '', 'null' => true, 'comment' => '积分来源ID']) ->update();