-- 分销测试用户(备用 SQL,推荐使用 PHP 脚本自动初始化) -- php addons/shopro/tests/commission_setup_test_users.php -- -- 统一密码: Test@123456 -- salt: fxtest01 SET @ts = UNIX_TIMESTAMP(); SET @pwd = '2e6b7166bb58caa2a84dd3eca3391f67'; SET @salt = 'fxtest01'; INSERT INTO `fa_user` (`id`,`username`,`nickname`,`password`,`salt`,`mobile`,`email`,`parent_user_id`,`level`,`score`,`money`,`total_consume`,`jointime`,`joinip`,`logintime`,`loginip`,`prevtime`,`createtime`,`updatetime`,`status`) VALUES (900001,'test_agent_a','测试A-三级',@pwd,@salt,'19900000001','19900000001@test.local',0,1,0,0,0,@ts,'127.0.0.1',@ts,'127.0.0.1',@ts,@ts,@ts,'normal'), (900002,'test_agent_b','测试B-二级',@pwd,@salt,'19900000002','19900000002@test.local',900001,1,0,0,0,@ts,'127.0.0.1',@ts,'127.0.0.1',@ts,@ts,@ts,'normal'), (900003,'test_agent_c','测试C-直推',@pwd,@salt,'19900000003','19900000003@test.local',900002,1,0,0,0,@ts,'127.0.0.1',@ts,'127.0.0.1',@ts,@ts,@ts,'normal'), (900004,'test_buyer_d','测试D-买家',@pwd,@salt,'19900000004','19900000004@test.local',900003,1,0,0,0,@ts,'127.0.0.1',@ts,'127.0.0.1',@ts,@ts,@ts,'normal') ON DUPLICATE KEY UPDATE nickname=VALUES(nickname), password=VALUES(password), salt=VALUES(salt), mobile=VALUES(mobile), parent_user_id=VALUES(parent_user_id), status='normal', updatetime=@ts; INSERT INTO `fa_shopro_commission_agent` (`user_id`,`level`,`parent_agent_id`,`status`,`info_status`,`becometime`,`createtime`,`updatetime`) VALUES (900001,3,0,'normal',1,@ts,@ts,@ts), (900002,2,900001,'normal',1,@ts,@ts,@ts), (900003,1,900002,'normal',1,@ts,@ts,@ts) ON DUPLICATE KEY UPDATE level=VALUES(level), parent_agent_id=VALUES(parent_agent_id), status='normal', info_status=1, updatetime=@ts;