2022-11-16.sql 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107
  1. CREATE TABLE `l_linked_earnings` (
  2. `id` bigint(20) NOT NULL COMMENT 'id',
  3. `order_id` bigint(12) DEFAULT NULL COMMENT '收益订单id',
  4. `buy_user_id` bigint(20) NOT NULL COMMENT '购买人id',
  5. `buy_user_name` varchar(255) DEFAULT NULL COMMENT '购买人名称',
  6. `benefit_user_id` bigint(20) NOT NULL COMMENT '受益人id',
  7. `amount` decimal(10,2) DEFAULT NULL COMMENT '收益金额',
  8. `before_amount` decimal(10,2) DEFAULT NULL COMMENT '之前收益',
  9. `after_amount` decimal(10,2) DEFAULT NULL COMMENT '之后收益',
  10. `type` int(12) DEFAULT NULL COMMENT '收益类型:0,消费收益,1、直推收益,2、间推收益,3、贡献收益',
  11. `remake` varchar(255) DEFAULT NULL COMMENT '收益说明',
  12. `create_time` datetime DEFAULT NULL COMMENT '创建时间',
  13. `create_user_id` bigint(255) DEFAULT NULL COMMENT '创建人',
  14. `is_delete` int(255) DEFAULT NULL COMMENT 'is_delete;0为未删除,1为已删除',
  15. `update_user_id` bigint(255) DEFAULT NULL COMMENT '更新人',
  16. `update_time` datetime DEFAULT NULL COMMENT '更新时间',
  17. PRIMARY KEY (`id`) USING BTREE
  18. ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='用户收益明细表';
  19. CREATE TABLE `linked_bind_log` (
  20. `id` bigint(255) NOT NULL COMMENT 'id',
  21. `user_id` varchar(255) DEFAULT NULL COMMENT '用户id',
  22. `out_order_id` bigint(255) DEFAULT NULL COMMENT '出局订单id',
  23. `out_sort` int(12) DEFAULT NULL COMMENT '出局位置',
  24. `create_time` datetime DEFAULT NULL COMMENT '创建时间',
  25. `create_user_id` bigint(255) DEFAULT NULL COMMENT '创建人',
  26. `is_delete` int(255) DEFAULT NULL COMMENT 'is_delete;0为未删除,1为已删除',
  27. `update_user_id` bigint(255) DEFAULT NULL COMMENT '更新人',
  28. `update_time` datetime DEFAULT NULL COMMENT '更新时间',
  29. `before_parent_id` bigint(255) DEFAULT NULL COMMENT '换绑之前的上级id',
  30. `after_parent_id` bigint(255) DEFAULT NULL COMMENT '换绑之后的上级id',
  31. `type` int(255) DEFAULT NULL COMMENT '记录类型,1:上级变化,2:晋升成为合伙人,3:出局',
  32. `order_id` bigint(255) DEFAULT NULL COMMENT '入局订单id',
  33. `type_msg` varchar(255) DEFAULT NULL COMMENT '记录类型说明',
  34. `user_name` varchar(255) DEFAULT NULL COMMENT '用户名称',
  35. `before_parent_name` varchar(255) DEFAULT NULL COMMENT '换绑之前的上级姓名',
  36. `after_parent_name` varchar(255) DEFAULT NULL COMMENT '换绑之后的上级姓名',
  37. `sort` int(12) DEFAULT NULL COMMENT '排序',
  38. PRIMARY KEY (`id`) USING BTREE
  39. ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='绑定记录表';
  40. CREATE TABLE `linked_contribute_log` (
  41. `id` bigint(255) NOT NULL COMMENT 'id',
  42. `create_user_id` bigint(255) DEFAULT NULL COMMENT '创建人id',
  43. `update_user_id` bigint(255) DEFAULT NULL COMMENT '修改人id',
  44. `create_time` datetime DEFAULT NULL COMMENT '创建时间',
  45. `update_time` datetime DEFAULT NULL COMMENT '修改时间',
  46. `is_delete` int(36) DEFAULT NULL COMMENT '1:删除。0:未删除',
  47. `user_id` bigint(255) DEFAULT NULL COMMENT '贡献人id',
  48. `user_name` varchar(255) DEFAULT NULL COMMENT '贡献人姓名',
  49. `jie_user_id` bigint(255) DEFAULT NULL COMMENT '接收人id',
  50. `jie_user_name` varchar(255) DEFAULT NULL COMMENT '接收人姓名',
  51. `bei_user_id` bigint(255) DEFAULT NULL COMMENT '被贡献人id',
  52. `bei_user_name` varchar(255) DEFAULT NULL COMMENT '被贡献人姓名',
  53. `type` int(36) DEFAULT NULL COMMENT '1:成为合伙人时贡献,2:之前贡献的人进小黑屋时再次贡献',
  54. `linked_bind_id` bigint(255) DEFAULT NULL COMMENT '对应的绑定记录id',
  55. `remark` varchar(255) DEFAULT NULL COMMENT '备注',
  56. PRIMARY KEY (`id`)
  57. ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
  58. CREATE TABLE `linked_order` (
  59. `id` bigint(255) NOT NULL COMMENT 'id',
  60. `order_id` bigint(255) DEFAULT NULL COMMENT '订单id',
  61. `user_id` varchar(255) DEFAULT NULL COMMENT '用户id',
  62. `is_out` int(12) DEFAULT NULL COMMENT '是否出局',
  63. `sort` int(12) DEFAULT NULL COMMENT '购买排序',
  64. `create_time` datetime DEFAULT NULL COMMENT '创建时间',
  65. `create_user_id` bigint(255) DEFAULT NULL COMMENT '创建人',
  66. `is_delete` int(255) DEFAULT NULL COMMENT 'is_delete;0为未删除,1为已删除',
  67. `update_user_id` bigint(255) DEFAULT NULL COMMENT '更新人',
  68. `update_time` datetime DEFAULT NULL COMMENT '更新时间',
  69. `recommend_id` bigint(255) DEFAULT NULL COMMENT '推荐人id',
  70. `recommend_name` varchar(255) DEFAULT NULL COMMENT '推荐人名称',
  71. `promotion_no` varchar(255) DEFAULT NULL COMMENT '推广码',
  72. `user_name` varchar(255) DEFAULT NULL COMMENT '用户名称',
  73. PRIMARY KEY (`id`) USING BTREE
  74. ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='联动模式订单表';
  75. CREATE TABLE `linked_user_info` (
  76. `id` bigint(255) NOT NULL COMMENT 'id',
  77. `user_id` bigint(255) NOT NULL COMMENT '用户id',
  78. `user_name` varchar(255) DEFAULT NULL COMMENT '用户名称',
  79. `is_out` int(12) DEFAULT NULL COMMENT '是否出局',
  80. `is_weed` int(12) DEFAULT NULL COMMENT '是否淘汰',
  81. `promotion_no` varchar(20) DEFAULT NULL COMMENT '推广码',
  82. `earnings` decimal(20,2) DEFAULT NULL COMMENT '收益金额',
  83. `parent_id` bigint(20) DEFAULT NULL COMMENT '当前上级id',
  84. `parent_name` varchar(255) DEFAULT NULL COMMENT '上级名称',
  85. `recommend_id` bigint(20) DEFAULT NULL COMMENT '推荐人id',
  86. `recommend_name` varchar(255) DEFAULT NULL COMMENT '推荐人名称',
  87. `is_partner` int(12) DEFAULT NULL COMMENT '是否合伙人',
  88. `create_time` datetime DEFAULT NULL COMMENT '创建时间',
  89. `create_user_id` bigint(255) DEFAULT NULL COMMENT '创建人',
  90. `is_delete` int(255) DEFAULT NULL COMMENT 'is_delete;0为未删除,1为已删除',
  91. `update_user_id` bigint(255) DEFAULT NULL COMMENT '更新人',
  92. `update_time` datetime DEFAULT NULL COMMENT '更新时间',
  93. `contribute_time` datetime DEFAULT NULL COMMENT '贡献时间',
  94. PRIMARY KEY (`id`) USING BTREE
  95. ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='联动模式用户信息表';
  96. INSERT INTO `linked_user_info` (`id`, `user_id`, `user_name`, `is_out`, `is_weed`, `promotion_no`, `earnings`, `parent_id`, `parent_name`, `recommend_id`, `recommend_name`, `is_partner`, `create_time`, `create_user_id`, `is_delete`, `update_user_id`, `update_time`, `contribute_time`) VALUES (1, 1123598821738675201, '平台', 0, 0, 'ADMIN', 0, NULL, NULL, NULL, NULL, 1, '2018-11-10 00:00:00', 1123598821738675201, 0, 1123598821738675201, '2022-11-15 00:37:37', NULL);
  97. INSERT INTO `linked_user_info` (`id`, `user_id`, `user_name`, `is_out`, `is_weed`, `promotion_no`, `earnings`, `parent_id`, `parent_name`, `recommend_id`, `recommend_name`, `is_partner`, `create_time`, `create_user_id`, `is_delete`, `update_user_id`, `update_time`, `contribute_time`) VALUES (2, 1513355662565462018, '王萍', 0, 0, 'WANGPI', 0, 1123598821738675201, '平台', 1123598821738675201, '平台', 1, NOW(), 1513355662565462018, 0, 1513355662565462018, NOW(), NULL);
  98. INSERT INTO `linked_user_info` (`id`, `user_id`, `user_name`, `is_out`, `is_weed`, `promotion_no`, `earnings`, `parent_id`, `parent_name`, `recommend_id`, `recommend_name`, `is_partner`, `create_time`, `create_user_id`, `is_delete`, `update_user_id`, `update_time`, `contribute_time`) VALUES (3, 1558385292179341314, '姜文勇', 0, 0, 'JWYONG', 0, 1123598821738675201, '平台', 1123598821738675201, '平台', 1, NOW(), 1558385292179341314, 0, 1558385292179341314, NOW(), NULL);
  99. INSERT INTO `blade_param` (`id`, `param_name`, `param_key`, `param_value`, `remark`, `create_user`, `create_dept`, `create_time`, `update_user`, `update_time`, `status`, `is_deleted`) VALUES (1591459626831884290, '贡献人员接受账号推荐码', 'linked:contribute:code', 'JWYONG', '', 1123598821738675201, 1123598813738675201, NOW(), 1123598821738675201, NOW(), 1, 0);
  100. INSERT INTO `blade_param` (`id`, `param_name`, `param_key`, `param_value`, `remark`, `create_user`, `create_dept`, `create_time`, `update_user`, `update_time`, `status`, `is_deleted`) VALUES (1590586285097873410, '出局排位数', 'linked:out:num', '10', '', 1123598821738675201, 1123598813738675201, '2022-11-10 14:04:57', 1123598821738675201, '2022-11-14 11:35:46', 1, 0);
  101. INSERT INTO `blade_param` (`id`, `param_name`, `param_key`, `param_value`, `remark`, `create_user`, `create_dept`, `create_time`, `update_user`, `update_time`, `status`, `is_deleted`) VALUES (1590586185504124930, '联动间推收益', 'linked:earnings:indirect', '500', NULL, 1123598821738675201, 1123598813738675201, '2022-11-10 14:04:33', 1123598821738675201, '2022-11-10 14:04:33', 1, 0);
  102. INSERT INTO `blade_param` (`id`, `param_name`, `param_key`, `param_value`, `remark`, `create_user`, `create_dept`, `create_time`, `update_user`, `update_time`, `status`, `is_deleted`) VALUES (1590585738047385601, '联动贡献收益比例', 'linked:earnings:ratio', '0.1', '', 1123598821738675201, 1123598813738675201, '2022-11-10 14:02:46', 1123598821738675201, '2022-11-10 14:04:05', 1, 0);
  103. INSERT INTO `blade_param` (`id`, `param_name`, `param_key`, `param_value`, `remark`, `create_user`, `create_dept`, `create_time`, `update_user`, `update_time`, `status`, `is_deleted`) VALUES (1590585434916646913, '联动直推收益', 'linked:earnings:direct', '700', NULL, 1123598821738675201, 1123598813738675201, '2022-11-10 14:01:34', 1123598821738675201, '2022-11-10 14:01:34', 1, 0);
  104. INSERT INTO `blade_param` (`id`, `param_name`, `param_key`, `param_value`, `remark`, `create_user`, `create_dept`, `create_time`, `update_user`, `update_time`, `status`, `is_deleted`) VALUES (1590585218192764929, '联动消费收益', 'linked:earnings:consumption', '200', NULL, 1123598821738675201, 1123598813738675201, '2022-11-10 14:00:42', 1123598821738675201, '2022-11-10 14:00:42', 1, 0);