diff --git a/README.md b/README.md index de8b8d3b3..2bf25f605 100644 --- a/README.md +++ b/README.md @@ -84,7 +84,7 @@ http://www.rageframe.com ### 插件 -- 微商城:https://github.com/jianyan74/Wechat +- 微商城:https://github.com/jianyan74/TinyShop - 微信公众号:https://github.com/jianyan74/Wechat - 商家管理:https://github.com/jianyan74/Merchants - 在线文档:https://github.com/jianyan74/RfOnlineDoc diff --git a/addons/Merchants/Install.php b/addons/Merchants/Install.php index 25e4a7c06..d7e5e8896 100644 --- a/addons/Merchants/Install.php +++ b/addons/Merchants/Install.php @@ -24,8 +24,8 @@ class Install extends Migration implements AddonWidget */ public function run($addon) { - MigrateHelper::upByPath([ - '@addons/Merchants/console/migrations/' - ]); +// MigrateHelper::upByPath([ +// '@addons/Merchants/console/migrations/' +// ]); } } \ No newline at end of file diff --git a/addons/Merchants/UnInstall.php b/addons/Merchants/UnInstall.php index 5abb7ae87..c499e1748 100644 --- a/addons/Merchants/UnInstall.php +++ b/addons/Merchants/UnInstall.php @@ -34,8 +34,8 @@ public function run($addon) // 清理配置 ConfigValue::deleteAll(['app_id' => AppEnum::MERCHANT]); - MigrateHelper::downByPath([ - '@addons/Merchants/console/migrations/' - ]); +// MigrateHelper::downByPath([ +// '@addons/Merchants/console/migrations/' +// ]); } } \ No newline at end of file diff --git a/console/migrations/m200529_152446_merchant_bank_account.php b/console/migrations/m200529_152446_merchant_bank_account.php deleted file mode 100644 index 16a74276b..000000000 --- a/console/migrations/m200529_152446_merchant_bank_account.php +++ /dev/null @@ -1,48 +0,0 @@ -execute('SET foreign_key_checks = 0'); - - /* 创建表 */ - $this->createTable('{{%merchant_bank_account}}', [ - 'id' => "int(11) NOT NULL AUTO_INCREMENT", - 'merchant_id' => "int(10) unsigned NULL DEFAULT '0' COMMENT '商户id'", - 'branch_bank_name' => "varchar(50) NULL COMMENT '支行信息'", - 'realname' => "varchar(50) NOT NULL DEFAULT '' COMMENT '真实姓名'", - 'account_number' => "varchar(50) NULL DEFAULT '' COMMENT '银行账号'", - 'bank_code' => "varchar(50) NULL DEFAULT '' COMMENT '银行编号'", - 'mobile' => "varchar(20) NOT NULL DEFAULT '' COMMENT '手机号'", - 'is_default' => "int(11) NULL DEFAULT '0' COMMENT '是否默认账号'", - 'account_type' => "int(11) NULL DEFAULT '1' COMMENT '账户类型,1:银行卡,2:微信,3:支付宝'", - 'account_type_name' => "varchar(30) NULL DEFAULT '银行卡' COMMENT '账户类型名称:银行卡,微信,支付宝'", - 'ali_number' => "varchar(50) NULL DEFAULT '' COMMENT '支付宝账号'", - 'status' => "tinyint(4) NULL DEFAULT '1' COMMENT '状态[-1:删除;0:禁用;1启用]'", - 'created_at' => "int(10) unsigned NULL DEFAULT '0' COMMENT '创建时间'", - 'updated_at' => "int(10) unsigned NULL DEFAULT '0' COMMENT '修改时间'", - 'PRIMARY KEY (`id`)' - ], "ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='会员提现账号'"); - - /* 索引设置 */ - - - /* 表数据 */ - - /* 设置外键约束 */ - $this->execute('SET foreign_key_checks = 1;'); - } - - public function down() - { - $this->execute('SET foreign_key_checks = 0'); - /* 删除表 */ - $this->dropTable('{{%merchant_bank_account}}'); - $this->execute('SET foreign_key_checks = 1;'); - } -} - diff --git a/console/migrations/m200529_152446_merchant_commission_withdraw.php b/console/migrations/m200529_152446_merchant_commission_withdraw.php deleted file mode 100644 index 34a0c6916..000000000 --- a/console/migrations/m200529_152446_merchant_commission_withdraw.php +++ /dev/null @@ -1,58 +0,0 @@ -execute('SET foreign_key_checks = 0'); - - /* 创建表 */ - $this->createTable('{{%merchant_commission_withdraw}}', [ - 'id' => "int(11) NOT NULL AUTO_INCREMENT", - 'merchant_id' => "int(10) unsigned NULL DEFAULT '0' COMMENT '商户id'", - 'withdraw_no' => "varchar(100) NULL DEFAULT '' COMMENT '提现流水号'", - 'account_type' => "int(11) NULL DEFAULT '1' COMMENT '账户类型,1:银行卡,2:微信,3:支付宝'", - 'bank_name' => "varchar(50) NULL DEFAULT '' COMMENT '提现银行名称'", - 'account_number' => "varchar(50) NULL DEFAULT '' COMMENT '提现银行账号'", - 'ali_number' => "varchar(50) NULL DEFAULT '' COMMENT '支付宝账号'", - 'realname' => "varchar(30) NULL DEFAULT '' COMMENT '提现账户姓名'", - 'mobile' => "varchar(20) NULL DEFAULT '' COMMENT '手机'", - 'cash' => "decimal(10,2) NULL DEFAULT '0.00' COMMENT '提现金额'", - 'memo' => "varchar(200) NULL DEFAULT '' COMMENT '备注'", - 'payment_date' => "int(11) NULL DEFAULT '0' COMMENT '到账日期'", - 'transfer_type' => "int(11) NULL DEFAULT '1' COMMENT '转账方式 1 线下转账 2线上转账'", - 'transfer_name' => "varchar(50) NULL DEFAULT '' COMMENT '转账银行名称'", - 'transfer_money' => "decimal(10,2) NULL DEFAULT '0.00' COMMENT '转账金额'", - 'transfer_status' => "int(11) NULL DEFAULT '0' COMMENT '转账状态 0未转账 1已转账 -1转账失败'", - 'transfer_remark' => "varchar(200) NULL DEFAULT '' COMMENT '转账备注'", - 'transfer_result' => "varchar(200) NULL DEFAULT '' COMMENT '转账结果'", - 'transfer_no' => "varchar(100) NULL DEFAULT '' COMMENT '转账流水号'", - 'transfer_account_no' => "varchar(100) NULL DEFAULT '' COMMENT '转账银行账号'", - 'state' => "smallint(6) NULL DEFAULT '0' COMMENT '当前状态 0已申请(等待处理) 1已同意 -1 已拒绝'", - 'status' => "tinyint(4) NULL DEFAULT '1' COMMENT '状态[-1:删除;0:禁用;1启用]'", - 'created_at' => "int(10) unsigned NULL DEFAULT '0' COMMENT '创建时间'", - 'updated_at' => "int(10) unsigned NULL DEFAULT '0' COMMENT '修改时间'", - 'PRIMARY KEY (`id`)' - ], "ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='会员_余额提现记录表'"); - - /* 索引设置 */ - - - /* 表数据 */ - - /* 设置外键约束 */ - $this->execute('SET foreign_key_checks = 1;'); - } - - public function down() - { - $this->execute('SET foreign_key_checks = 0'); - /* 删除表 */ - $this->dropTable('{{%merchant_commission_withdraw}}'); - $this->execute('SET foreign_key_checks = 1;'); - } -} - diff --git a/console/migrations/m200529_152446_merchant_member_auth.php b/console/migrations/m200529_152446_merchant_member_auth.php deleted file mode 100644 index c8111f5a3..000000000 --- a/console/migrations/m200529_152446_merchant_member_auth.php +++ /dev/null @@ -1,52 +0,0 @@ -execute('SET foreign_key_checks = 0'); - - /* 创建表 */ - $this->createTable('{{%merchant_member_auth}}', [ - 'id' => "int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT '主键'", - 'merchant_id' => "int(10) unsigned NULL DEFAULT '0' COMMENT '商户id'", - 'member_id' => "int(10) unsigned NULL DEFAULT '0' COMMENT '用户id'", - 'unionid' => "varchar(64) NULL DEFAULT '' COMMENT '唯一ID'", - 'oauth_client' => "varchar(20) NULL DEFAULT '' COMMENT '授权组别'", - 'oauth_client_user_id' => "varchar(100) NULL DEFAULT '' COMMENT '授权id'", - 'gender' => "tinyint(1) unsigned NULL DEFAULT '0' COMMENT '性别[0:未知;1:男;2:女]'", - 'nickname' => "varchar(100) NULL DEFAULT '' COMMENT '昵称'", - 'head_portrait' => "varchar(150) NULL DEFAULT '' COMMENT '头像'", - 'birthday' => "date NULL COMMENT '生日'", - 'country' => "varchar(100) NULL DEFAULT '' COMMENT '国家'", - 'province' => "varchar(100) NULL DEFAULT '' COMMENT '省'", - 'city' => "varchar(100) NULL DEFAULT '' COMMENT '市'", - 'status' => "tinyint(4) NULL DEFAULT '1' COMMENT '状态(-1:已删除,0:禁用,1:正常)'", - 'created_at' => "int(10) unsigned NULL DEFAULT '0' COMMENT '创建时间'", - 'updated_at' => "int(10) unsigned NULL DEFAULT '0' COMMENT '修改时间'", - 'PRIMARY KEY (`id`)' - ], "ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='用户_第三方登录'"); - - /* 索引设置 */ - $this->createIndex('oauth_client','{{%merchant_member_auth}}','oauth_client, oauth_client_user_id',0); - $this->createIndex('member_id','{{%merchant_member_auth}}','member_id',0); - - - /* 表数据 */ - - /* 设置外键约束 */ - $this->execute('SET foreign_key_checks = 1;'); - } - - public function down() - { - $this->execute('SET foreign_key_checks = 0'); - /* 删除表 */ - $this->dropTable('{{%merchant_member_auth}}'); - $this->execute('SET foreign_key_checks = 1;'); - } -} -