M230712024155InsertQimallRabcAuthItem.php 7.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110
  1. <?php
  2. namespace app\migrations;
  3. use yii\db\Migration;
  4. /**
  5. * Class M230712024155InsertQimallRabcAuthItem
  6. */
  7. class M230712024155InsertQimallRabcAuthItem extends Migration
  8. {
  9. /**
  10. * {@inheritdoc}
  11. */
  12. public function safeUp()
  13. {
  14. try {
  15. $sql="INSERT INTO `qimall_rbac_auth_item` ( `name`, `title`, `app_id`, `addons_name`, `pid`, `level`, `is_addon`, `sort`, `tree`, `status`, `created_at`, `updated_at`, `cate_id`) VALUES ( 'admin/setting/notice-del', '删除', 'backend', '', 3848, 3, 0, 999, 'tr_0 tr_3413 tr_3848 ', 1, 1689129573, 1689129573, 1);";
  16. $this->execute($sql);
  17. $sql="INSERT INTO `qimall_rbac_auth_item` ( `name`, `title`, `app_id`, `addons_name`, `pid`, `level`, `is_addon`, `sort`, `tree`, `status`, `created_at`, `updated_at`, `cate_id`) VALUES ( 'admin/setting/notice-edit', '新增/编辑', 'backend', '', 3848, 3, 0, 999, 'tr_0 tr_3413 tr_3848', 1, 1689129562, 1689129585, 1);";
  18. $this->execute($sql);
  19. $sql="INSERT INTO `qimall_rbac_auth_item` ( `name`, `title`, `app_id`, `addons_name`, `pid`, `level`, `is_addon`, `sort`, `tree`, `status`, `created_at`, `updated_at`, `cate_id`) VALUES ( 'admin/task/executed-record-del', '删除', 'backend', '', 274262, 3, 0, 999, 'tr_0tr_2499 tr_274262 ', 1, 1689128073, 1689128073, 1);";
  20. $this->execute($sql);
  21. $sql="INSERT INTO `qimall_rbac_auth_item` ( `name`, `title`, `app_id`, `addons_name`, `pid`, `level`, `is_addon`, `sort`, `tree`, `status`, `created_at`, `updated_at`, `cate_id`) VALUES ( 'admin/task/executed-detail', '查看详情', 'backend', '', 274262, 3, 0, 999, 'tr_0tr_2499 tr_274262 ', 1, 1689128049, 1689128049, 1);";
  22. $this->execute($sql);
  23. $sql="INSERT INTO `qimall_rbac_auth_item` ( `name`, `title`, `app_id`, `addons_name`, `pid`, `level`, `is_addon`, `sort`, `tree`, `status`, `created_at`, `updated_at`, `cate_id`) VALUES ( 'admin/task/delete', '删除', 'backend', '', 274261, 3, 0, 999, 'tr_0tr_2499 tr_274261 ', 1, 1689128024, 1689128024, 1);";
  24. $this->execute($sql);
  25. $sql="INSERT INTO `qimall_rbac_auth_item` ( `name`, `title`, `app_id`, `addons_name`, `pid`, `level`, `is_addon`, `sort`, `tree`, `status`, `created_at`, `updated_at`, `cate_id`) VALUES ( 'admin/task/edit', '新增/编辑', 'backend', '', 274261, 3, 0, 999, 'tr_0tr_2499 tr_274261 ', 1, 1689127985, 1689127985, 1);";
  26. $this->execute($sql);
  27. $sql="INSERT INTO `qimall_rbac_auth_item` ( `name`, `title`, `app_id`, `addons_name`, `pid`, `level`, `is_addon`, `sort`, `tree`, `status`, `created_at`, `updated_at`, `cate_id`) VALUES ( 'admin/task/executed-list', '任务记录', 'backend', '', 2499, 2, 0, 999, 'tr_0tr_2499 ', 1, 1689127965, 1689127965, 1);";
  28. $this->execute($sql);
  29. $sql="INSERT INTO `qimall_rbac_auth_item` ( `name`, `title`, `app_id`, `addons_name`, `pid`, `level`, `is_addon`, `sort`, `tree`, `status`, `created_at`, `updated_at`, `cate_id`) VALUES ( 'admin/task/index', '任务列表', 'backend', '', 2499, 2, 0, 999, 'tr_0tr_2499 ', 1, 1689127943, 1689127943, 1);";
  30. $this->execute($sql);
  31. $sql="INSERT INTO `qimall_rbac_auth_item` ( `name`, `title`, `app_id`, `addons_name`, `pid`, `level`, `is_addon`, `sort`, `tree`, `status`, `created_at`, `updated_at`, `cate_id`) VALUES ( 'admin/account/del', '删除', 'backend', '', 2264, 4, 0, 999, 'tr_0 tr_2278 tr_2262 tr_2264 ', 1, 1689127130, 1689127130, 1);";
  32. $this->execute($sql);
  33. $sql="INSERT INTO `qimall_rbac_auth_item` ( `name`, `title`, `app_id`, `addons_name`, `pid`, `level`, `is_addon`, `sort`, `tree`, `status`, `created_at`, `updated_at`, `cate_id`) VALUES ( 'admin/account/edit', '新增/编辑', 'backend', '', 2264, 4, 0, 999, 'tr_0 tr_2278 tr_2262 tr_2264', 1, 1689127115, 1689127239, 1);";
  34. $this->execute($sql);
  35. $sql="INSERT INTO `qimall_rbac_auth_item` ( `name`, `title`, `app_id`, `addons_name`, `pid`, `level`, `is_addon`, `sort`, `tree`, `status`, `created_at`, `updated_at`, `cate_id`) VALUES ( 'admin/account/edit', '新增/编辑', 'backend', '', 2264, 4, 0, 999, 'tr_0 tr_2278 tr_2262 tr_2264', 1, 1689127115, 1689127239, 1);";
  36. $this->execute($sql);
  37. $sql="UPDATE qimall_rbac_auth_item set name = 'admin/setting/index',title = '系统设置' where id = 3414";
  38. $this->execute($sql);
  39. $sql="INSERT INTO `qimall_rbac_auth_item` ( `name`, `title`, `app_id`, `addons_name`, `pid`, `level`, `is_addon`, `sort`, `tree`, `status`, `created_at`, `updated_at`, `cate_id`) VALUES ( 'mall/data-census/driving-window', '总裁驾驶窗', 'backend', '', 2816, 2, 0, 999, 'tr_0tr_2816 ', 1, 1689130872, 1689130872, 2);";
  40. $this->execute($sql);
  41. $sql="INSERT INTO `qimall_rbac_auth_item` ( `name`, `title`, `app_id`, `addons_name`, `pid`, `level`, `is_addon`, `sort`, `tree`, `status`, `created_at`, `updated_at`, `cate_id`) VALUES ( 'mall/data-census/flowan-alyse', '流量分析', 'backend', '', 274269, 3, 0, 999, 'tr_0tr_2816 tr_274269 ', 1, 1689131666, 1689131666, 2);";
  42. $this->execute($sql);
  43. $sql="INSERT INTO `qimall_rbac_auth_item` ( `name`, `title`, `app_id`, `addons_name`, `pid`, `level`, `is_addon`, `sort`, `tree`, `status`, `created_at`, `updated_at`, `cate_id`) VALUES ( 'mall/data-census/goods-statistics', '商品数据', 'backend', '', 274269, 3, 0, 999, 'tr_0tr_2816 tr_274269 ', 1, 1689131684, 1689131684, 2);";
  44. $this->execute($sql);
  45. $sql="INSERT INTO `qimall_rbac_auth_item` ( `name`, `title`, `app_id`, `addons_name`, `pid`, `level`, `is_addon`, `sort`, `tree`, `status`, `created_at`, `updated_at`, `cate_id`) VALUES ( 'mall/statistics/car-user-data', '会员分析', 'backend', '', 274269, 3, 0, 999, 'tr_0tr_2816 tr_274269 ', 1, 1689131699, 1689131699, 2);";
  46. $this->execute($sql);
  47. $sql="INSERT INTO `qimall_rbac_auth_item` ( `name`, `title`, `app_id`, `addons_name`, `pid`, `level`, `is_addon`, `sort`, `tree`, `status`, `created_at`, `updated_at`, `cate_id`) VALUES ( 'mall/statistics/car-user-trad-data', '交易数据', 'backend', '', 274269, 3, 0, 999, 'tr_0tr_2816 tr_274269 ', 1, 1689131712, 1689131712, 2);"; $this->execute($sql);
  48. $sql="INSERT INTO `qimall_rbac_auth_item` ( `name`, `title`, `app_id`, `addons_name`, `pid`, `level`, `is_addon`, `sort`, `tree`, `status`, `created_at`, `updated_at`, `cate_id`) VALUES ( 'mall/statistics/car-analysis', '价值分析', 'backend', '', 274269, 3, 0, 999, 'tr_0tr_2816 tr_274269 ', 1, 1689131743, 1689131743, 2);";
  49. $this->execute($sql);
  50. $sql="update qimall_rbac_auth_item set title='新增/编辑' where name ='mall/diy/edit'";
  51. $this->execute($sql);
  52. $sql="update qimall_rbac_auth_item set title='新增/编辑' where name ='mall/goods/edit'";
  53. $this->execute($sql);
  54. $sql="update qimall_rbac_auth_item set title='新增/编辑' where name ='mall/cate/edit'";
  55. $this->execute($sql);
  56. }catch (\Exception $e){
  57. }
  58. }
  59. /**
  60. * {@inheritdoc}
  61. */
  62. public function safeDown()
  63. {
  64. echo "M230712024155InsertQimallRabcAuthItem cannot be reverted.\n";
  65. return false;
  66. }
  67. /*
  68. // Use up()/down() to run migration code without a transaction.
  69. public function up()
  70. {
  71. }
  72. public function down()
  73. {
  74. echo "M230712024155InsertQimallRabcAuthItem cannot be reverted.\n";
  75. return false;
  76. }
  77. */
  78. }