127 lines
13 KiB
PHP
127 lines
13 KiB
PHP
<?php
|
||
|
||
use Illuminate\Database\Seeder;
|
||
|
||
class MerchantTableSeeder extends Seeder
|
||
{
|
||
/**
|
||
* Run the database seeds.
|
||
*
|
||
* @return void
|
||
*/
|
||
public function run()
|
||
{
|
||
//
|
||
/*$merchants = array(
|
||
array('id' => '10', 'sort' => '0', 'next_ratio' => '0', 'origin_password' => '123456', 'password' => '$2y$10$UnfcgtTx0Sio/tMPotSq1.xeMopJvGV.b231lEys3LNxOqjf7BgqO', 'name' => '大股东A', 'ip' => '', 'host' => '', 'app_key' => '20190301114921twArPT', 'token' => 'WxWSJTbo6kA0SfoVTguxzcoCCGVWlrGu', 'draw_type' => '1', 'min_money' => '0', 'realname' => '', 'idcard' => NULL, 'address' => '', 'email' => '1551411757@qq.com', 'mobile' => '', 'ratio' => '20', 'qq' => '', 'is_proxy' => '0', 'from_id' => '0', 'is_checked' => '1', 'login_status' => '1', 'last_number' => '1', 'login_ip' => '127.0.0.1', 'last_time' => '2019-03-02 18:11:03', 'remember_token' => '6kZEkPPZM7oiw4BhriiGwtM7lVBjvOzhcyR1qe8BvYx54nr4g5iiVFj23WeY', 'check_status' => '1', 'check_at' => NULL, 'created_at' => '2019-03-01 11:49:21', 'updated_at' => '2019-03-02 18:11:03', 'deleted_at' => NULL, 'level' => '1', 'gateways_id' => '0', 'max_price' => '45000', 'min_price' => '1', 'draw_day_money_ratio' => '-1'),
|
||
array('id' => '11', 'sort' => '0', 'next_ratio' => '0', 'origin_password' => '123456', 'password' => '$2y$10$4SGafWyUjpUzuA8CI.fo0uhdd/MC/aqDHrM5kEY2CtbHwsA5.UYd6', 'name' => '大股东B', 'ip' => '', 'host' => '', 'app_key' => '20190301114947VeflUS', 'token' => 'SznzD5dGdSxe9J9jHyIoRmRbeytDykrV', 'draw_type' => '0', 'min_money' => '0', 'realname' => '', 'idcard' => NULL, 'address' => '', 'email' => '1551412165@qq.com', 'mobile' => '', 'ratio' => '30', 'qq' => '', 'is_proxy' => '0', 'from_id' => '0', 'is_checked' => '1', 'login_status' => '1', 'last_number' => '1', 'login_ip' => '127.0.0.1', 'last_time' => '2019-03-02 18:12:07', 'remember_token' => 'QzBshEtp4KJ606YMQcSRXnUI4mbha7vEVgtTEYfLnXpHkh7tQFJBBHkYGXap', 'check_status' => '1', 'check_at' => NULL, 'created_at' => '2019-03-01 11:49:47', 'updated_at' => '2019-03-02 18:12:07', 'deleted_at' => NULL, 'level' => '1', 'gateways_id' => '0', 'max_price' => '45000', 'min_price' => '1', 'draw_day_money_ratio' => '-1'),
|
||
array('id' => '12', 'sort' => '0', 'next_ratio' => '0', 'origin_password' => '1551412192', 'password' => '$2y$10$apBdpcZTR8tJRxQoOSS7dukHeGEInzeKcDy54Yl1KwqpwZtwREUIi', 'name' => '大股东B->商户b1', 'ip' => '', 'host' => '', 'app_key' => '20190301115025Nuy2Gs', 'token' => 'ypzF3CBshRuCzVpS0p5Z7Sa6tcG7jzDh', 'draw_type' => '0', 'min_money' => '0', 'realname' => '', 'idcard' => NULL, 'address' => '', 'email' => '1551412192@qq.com', 'mobile' => '', 'ratio' => '40', 'qq' => '', 'is_proxy' => '0', 'from_id' => '11', 'is_checked' => '1', 'login_status' => '1', 'last_number' => '0', 'login_ip' => '127.0.0.1', 'last_time' => NULL, 'remember_token' => NULL, 'check_status' => '1', 'check_at' => NULL, 'created_at' => '2019-03-01 11:50:25', 'updated_at' => '2019-03-01 11:50:25', 'deleted_at' => NULL, 'level' => '3', 'gateways_id' => '0', 'max_price' => '45000', 'min_price' => '1', 'draw_day_money_ratio' => '-1'),
|
||
array('id' => '13', 'sort' => '0', 'next_ratio' => '30', 'origin_password' => '1551412229', 'password' => '$2y$10$2udrJJrpTFxJC1.BnWMmHu3T2NFowWvllimam03iVMopEdOo3HShG', 'name' => '大股东B的代理B1', 'ip' => '', 'host' => '', 'app_key' => '20190301115051YMBtuG', 'token' => 'gCxIryld0QB0b48NPFicycu1y9B7YVLg', 'draw_type' => '0', 'min_money' => '0', 'realname' => '', 'idcard' => NULL, 'address' => '', 'email' => '1551412229@qq.com', 'mobile' => '', 'ratio' => '50', 'qq' => '', 'is_proxy' => '0', 'from_id' => '11', 'is_checked' => '1', 'login_status' => '1', 'last_number' => '0', 'login_ip' => '127.0.0.1', 'last_time' => NULL, 'remember_token' => NULL, 'check_status' => '1', 'check_at' => NULL, 'created_at' => '2019-03-01 11:50:51', 'updated_at' => '2019-03-02 15:57:27', 'deleted_at' => NULL, 'level' => '2', 'gateways_id' => '0', 'max_price' => '45000', 'min_price' => '1', 'draw_day_money_ratio' => '-1'),
|
||
array('id' => '14', 'sort' => '0', 'next_ratio' => '50', 'origin_password' => '111111', 'password' => '$2y$10$wUVnDjnLkrGkKXg.YVfPdeZ7PYzqBp5oE9lLk3gZhQf6yEwYGnS1y', 'name' => '大股东B的代理B1的商户b2', 'ip' => '', 'host' => '', 'app_key' => '20190301115132dkQMhx', 'token' => 's9RWhDqahUMugvaoq2gr9YtnwipNdFHS', 'draw_type' => '0', 'min_money' => '0', 'realname' => '大股东B的代理B1', 'idcard' => NULL, 'address' => '', 'email' => '1551412256@qq.com', 'mobile' => '', 'ratio' => '60', 'qq' => '', 'is_proxy' => '0', 'from_id' => '13', 'is_checked' => '1', 'login_status' => '1', 'last_number' => '1', 'login_ip' => '127.0.0.1', 'last_time' => '2019-03-02 18:09:13', 'remember_token' => 'e8utg2BP0nxDg9RWSWY16FQhNEJcXlfewWqMTrJgotRsO4yLodb0O0iw31Fh', 'check_status' => '1', 'check_at' => NULL, 'created_at' => '2019-03-01 11:51:32', 'updated_at' => '2019-03-02 18:09:13', 'deleted_at' => NULL, 'level' => '3', 'gateways_id' => '0', 'max_price' => '45000', 'min_price' => '1', 'draw_day_money_ratio' => '-1')
|
||
);
|
||
DB::table('merchants')->truncate();
|
||
DB::table('merchants')->insert($merchants);
|
||
$merchant_wallets = array(
|
||
array('id' => '8', 'merchant_id' => '10', 'money' => '0.00', 'total_money' => '0.00', 'draw_money' => '0.00', 'other_money' => '0.00', 'trans_money' => '0.00', 'trans_ok_number' => '0', 'trans_fail_number' => '0', 'created_at' => '2019-03-01 11:49:21', 'updated_at' => '2019-03-02 18:11:14', 'commission_money' => '0.00', 'pay_fail_money' => '0.00'),
|
||
array('id' => '9', 'merchant_id' => '11', 'money' => '0.00', 'total_money' => '0.00', 'draw_money' => '0.00', 'other_money' => '0.00', 'trans_money' => '0.00', 'trans_ok_number' => '0', 'trans_fail_number' => '0', 'created_at' => '2019-03-01 11:49:47', 'updated_at' => '2019-03-02 18:12:11', 'commission_money' => '0.00', 'pay_fail_money' => '0.00'),
|
||
array('id' => '10', 'merchant_id' => '12', 'money' => '0.00', 'total_money' => '0.00', 'draw_money' => '0.00', 'other_money' => '0.00', 'trans_money' => '0.00', 'trans_ok_number' => '0', 'trans_fail_number' => '0', 'created_at' => '2019-03-01 11:50:25', 'updated_at' => '2019-03-01 11:50:25', 'commission_money' => '0.00', 'pay_fail_money' => '0.00'),
|
||
array('id' => '11', 'merchant_id' => '13', 'money' => '0.00', 'total_money' => '0.00', 'draw_money' => '0.00', 'other_money' => '0.00', 'trans_money' => '0.00', 'trans_ok_number' => '0', 'trans_fail_number' => '0', 'created_at' => '2019-03-01 11:50:51', 'updated_at' => '2019-03-02 18:08:22', 'commission_money' => '0.00', 'pay_fail_money' => '0.00'),
|
||
array('id' => '12', 'merchant_id' => '14', 'money' => '0.00', 'total_money' => '0.00', 'draw_money' => '0.00', 'other_money' => '0.00', 'trans_money' => '0.00', 'trans_ok_number' => '0', 'trans_fail_number' => '0', 'created_at' => '2019-03-01 11:51:32', 'updated_at' => '2019-03-02 18:09:17', 'commission_money' => '0.00', 'pay_fail_money' => '0.00')
|
||
);
|
||
$merchant_ratios = array(
|
||
array('id' => '3', 'level' => '3', 'hierarchy' => '2', 'parent_id' => '11', 'merchant_id' => '12', 'ratio' => '40', 'is_self' => '1', 'created_at' => NULL, 'updated_at' => NULL),
|
||
array('id' => '6', 'level' => '2', 'hierarchy' => '2', 'parent_id' => '11', 'merchant_id' => '13', 'ratio' => '50', 'is_self' => '1', 'created_at' => NULL, 'updated_at' => NULL),
|
||
array('id' => '7', 'level' => '3', 'hierarchy' => '2', 'parent_id' => '13', 'merchant_id' => '14', 'ratio' => '60', 'is_self' => '1', 'created_at' => NULL, 'updated_at' => NULL),
|
||
array('id' => '8', 'level' => '1', 'hierarchy' => '1', 'parent_id' => '0', 'merchant_id' => '10', 'ratio' => '20', 'is_self' => '1', 'created_at' => NULL, 'updated_at' => NULL),
|
||
array('id' => '9', 'level' => '1', 'hierarchy' => '1', 'parent_id' => '0', 'merchant_id' => '11', 'ratio' => '30', 'is_self' => '1', 'created_at' => NULL, 'updated_at' => NULL)
|
||
);
|
||
DB::table('merchant_wallets')->truncate();
|
||
DB::table('merchant_wallets')->insert($merchant_wallets);
|
||
DB::table('merchant_ratios')->truncate();
|
||
DB::table('merchant_ratios')->insert($merchant_ratios);*/
|
||
|
||
$configs = [
|
||
['id' => '1', 'ename' => 'file', 'content' => ''],
|
||
['id' => '2', 'ename' => 'logo', 'content' => '/upload/images/20190302/461a7ab7435c067700ada4d5823f1cff34110.png'],
|
||
['id' => '3', 'ename' => 'sitename', 'content' => '144'],
|
||
['id' => '4', 'ename' => 'subname', 'content' => '155'],
|
||
['id' => '5', 'ename' => 'keyword', 'content' => '166'],
|
||
['id' => '6', 'ename' => 'description', 'content' => '177'],
|
||
['id' => '7', 'ename' => 'copyright', 'content' => '88'],
|
||
['id' => '8', 'ename' => 'icp', 'content' => '99'],
|
||
['id' => '9', 'ename' => 'mobile', 'content' => ''],
|
||
['id' => '10', 'ename' => 'tongji', 'content' => '66'],
|
||
['id' => '11', 'ename' => 'wx_mchid', 'content' => '56111'],
|
||
['id' => '12', 'ename' => 'wx_appkey', 'content' => '5546'],
|
||
['id' => '13', 'ename' => 'wx_appid', 'content' => '65664'],
|
||
['id' => '14', 'ename' => 'wx_appsert', 'content' => '5664'],
|
||
['id' => '15', 'ename' => 'al_account', 'content' => '6456655465'],
|
||
['id' => '16', 'ename' => 'al_appkey', 'content' => '6566656'],
|
||
['id' => '17', 'ename' => 'al_partner', 'content' => '46565'],
|
||
['id' => '18', 'ename' => 'sms_name', 'content' => ''],
|
||
['id' => '19', 'ename' => 'sms_appid', 'content' => ''],
|
||
['id' => '20', 'ename' => 'sms_appkey', 'content' => ''],
|
||
['id' => '21', 'ename' => 'stmp_name', 'content' => '1'],
|
||
['id' => '22', 'ename' => 'stmp_port', 'content' => '1'],
|
||
['id' => '23', 'ename' => 'stmp_account', 'content' => '1'],
|
||
['id' => '24', 'ename' => 'stmp_password', 'content' => '1'],
|
||
['id' => '25', 'ename' => 'stmp_accept_email', 'content' => '1'],
|
||
['id' => '27', 'ename' => 'config_name', 'content' => 'draw_config'],
|
||
['id' => '28', 'ename' => 'draw_min_money', 'content' => '10'],
|
||
['id' => '29', 'ename' => 'draw_max_money', 'content' => '50000'],
|
||
['id' => '30', 'ename' => 'draw_day_max_money', 'content' => '500000'],
|
||
['id' => '31', 'ename' => 'draw_day_times', 'content' => '5'],
|
||
['id' => '32', 'ename' => 'draw_email', 'content' => '531833998@qq.com'],
|
||
['id' => '33', 'ename' => 'draw_open', 'content' => '1'],
|
||
['id' => '34', 'ename' => '_token', 'content' => 'rIs9W549SiEpqjHmRH6imt1ZG2hNTBVIWyao3IOe'],
|
||
['id' => '35', 'ename' => 'draw_day_money_ratio', 'content' => '20'],
|
||
['id' => '36', 'ename' => 'draw_time_limit', 'content' => '0-24'],
|
||
['id' => '37', 'ename' => 'doc', 'content' => '/upload/zips/20190302/bded6284dae6ec41d96806cc67a00eeb12639.zip'],
|
||
['id' => '38', 'ename' => 'api_pay_url', 'content' => 'https://www.wujie.la/order/order'],
|
||
['id' => '39', 'ename' => 'api_pay_url2', 'content' => ''],
|
||
['id' => '40', 'ename' => 'api_pay_url3', 'content' => ''],
|
||
['id' => '41', 'ename' => 'demo_pay_url', 'content' => 'http://localhost/phpdemo/demo2/'],
|
||
['id' => '42', 'ename' => 'admin_res_version', 'content' => '133344455455'],
|
||
['id' => '43', 'ename' => 'merchant_res_version', 'content' => '1344466454'],
|
||
['id' => '44', 'ename' => 'merchant_gudong_check', 'content' => '0'],
|
||
['id' => '45', 'ename' => 'merchant_daili_check', 'content' => '0'],
|
||
['id' => '46', 'ename' => 'draw_tips', 'content' => '本平台支持D0、T0、D1、T1提现。
|
||
D日是指自然日,包括周末和节假日均可办理提现。
|
||
T日是指交易日
|
||
+0的含义是指资金清算时间为本日, 而非实时到
|
||
+1的含义是指正常清算时间为第二个工作日
|
||
D0一般到账时间为2小时内,处理时间为自然日9:00-20:00
|
||
T0一般到账时间为2小时内,处理时间为工作日9:00-20:00
|
||
D1一般到账时间为2小时内,处理时间为自然日9:00-22:00
|
||
T1一般到账时间为2小时内,处理时间为工作日9:00-22:00'],
|
||
['id' => '47', 'ename' => 'draw_money_ratio', 'content' => '0.3'],
|
||
['id' => '48', 'ename' => 'admin_path', 'content' => ''],
|
||
['id' => '49', 'ename' => 'merchant_path', 'content' => ''],
|
||
['id' => '50', 'ename' => 'merchant_regist_min_money', 'content' => ''],
|
||
['id' => '51', 'ename' => 'merchant_regist_has_ratio', 'content' => '10'],
|
||
['id' => '52', 'ename' => 'merchant_regist_min_ratio', 'content' => '60'],
|
||
['id' => '53', 'ename' => 'merchant_regist_pay_account_id', 'content' => ''],
|
||
['id' => '54', 'ename' => 'merchant_regist', 'content' => '1'],
|
||
['id' => '55', 'ename' => 'merchant_regist_money_list', 'content' => '500
|
||
1000
|
||
1500
|
||
2000
|
||
2500
|
||
3500
|
||
4500
|
||
5000
|
||
5500
|
||
6000
|
||
6500'],
|
||
['id' => '56', 'ename' => 'order_tips_time', 'content' => '15'],
|
||
['id' => '57', 'ename' => 'draw_tips_time', 'content' => '1800'],
|
||
['id' => '58', 'ename' => 'ma_to_share', 'content' => '0']
|
||
];
|
||
DB::table('configs')->truncate();
|
||
DB::table('configs')->insert($configs);
|
||
//初始化缓存去掉
|
||
\Illuminate\Support\Facades\Cache::forget('config');
|
||
|
||
}
|
||
}
|