v1.1.24.sql 8.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100
  1. START TRANSACTION;
  2. # 好物圈设置表
  3. CREATE TABLE `yoshop_wow_setting` (
  4. `key` varchar(30) NOT NULL DEFAULT '' COMMENT '设置项标示',
  5. `describe` varchar(255) NOT NULL DEFAULT '' COMMENT '设置项描述',
  6. `values` mediumtext NOT NULL COMMENT '设置内容(json格式)',
  7. `wxapp_id` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '小程序id',
  8. `update_time` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '更新时间',
  9. UNIQUE KEY `unique_key` (`key`,`wxapp_id`)
  10. ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='好物圈设置表';
  11. # 好物圈商品收藏记录表
  12. CREATE TABLE `yoshop_wow_shoping` (
  13. `id` int(11) unsigned NOT NULL AUTO_INCREMENT COMMENT '主键id',
  14. `goods_id` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '商品id',
  15. `user_id` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '用户id',
  16. `is_delete` tinyint(3) unsigned NOT NULL DEFAULT '0' COMMENT '是否删除',
  17. `wxapp_id` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '小程序id',
  18. `create_time` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '创建时间',
  19. PRIMARY KEY (`id`)
  20. ) ENGINE=InnoDB AUTO_INCREMENT=10001 DEFAULT CHARSET=utf8 COMMENT='好物圈商品收藏记录表';
  21. # 好物圈订单同步记录表
  22. CREATE TABLE `yoshop_wow_order` (
  23. `id` int(11) unsigned NOT NULL AUTO_INCREMENT COMMENT '主键id',
  24. `order_id` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '订单id',
  25. `order_type` tinyint(3) unsigned NOT NULL DEFAULT '10' COMMENT '订单类型(10商城订单 20拼团订单)',
  26. `user_id` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '用户id',
  27. `status` tinyint(3) unsigned NOT NULL DEFAULT '0' COMMENT '订单状态(3支付完成 4已发货 5已退款 100已完成)',
  28. `last_time` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '最后更新时间',
  29. `is_delete` tinyint(3) unsigned NOT NULL DEFAULT '0' COMMENT '是否删除',
  30. `wxapp_id` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '小程序id',
  31. `create_time` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '创建时间',
  32. `update_time` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '更新时间',
  33. PRIMARY KEY (`id`)
  34. ) ENGINE=InnoDB AUTO_INCREMENT=10001 DEFAULT CHARSET=utf8 COMMENT='好物圈订单同步记录表';
  35. # 更新权限排序
  36. UPDATE `yoshop_store_access` SET `sort`='105' WHERE (`access_id`='10335');
  37. UPDATE `yoshop_store_access` SET `sort`='105' WHERE (`access_id`='10051');
  38. UPDATE `yoshop_store_access` SET `sort`='115' WHERE (`access_id`='10387');
  39. # 新增好物圈管理管理
  40. INSERT INTO `yoshop_store_access` (`access_id`, `name`, `url`, `parent_id`, `sort`, `create_time`, `update_time`) VALUES ('10400', '好物圈', 'apps.wow', '10074', '110', '1557037952', '1557037952');
  41. INSERT INTO `yoshop_store_access` (`access_id`, `name`, `url`, `parent_id`, `sort`, `create_time`, `update_time`) VALUES ('10401', '商品收藏', 'apps.wow.shoping', '10400', '100', '1557037952', '1557037952');
  42. INSERT INTO `yoshop_store_access` (`access_id`, `name`, `url`, `parent_id`, `sort`, `create_time`, `update_time`) VALUES ('10402', '订单信息', 'apps.wow.order', '10400', '105', '1557037952', '1557037952');
  43. INSERT INTO `yoshop_store_access` (`access_id`, `name`, `url`, `parent_id`, `sort`, `create_time`, `update_time`) VALUES ('10403', '基础设置', 'apps.wow.setting/index', '10400', '110', '1557037952', '1557037952');
  44. INSERT INTO `yoshop_store_access` (`access_id`, `name`, `url`, `parent_id`, `sort`, `create_time`, `update_time`) VALUES ('10404', '商品收藏记录', 'apps.wow.shoping/index', '10401', '100', '1557037952', '1557037952');
  45. INSERT INTO `yoshop_store_access` (`access_id`, `name`, `url`, `parent_id`, `sort`, `create_time`, `update_time`) VALUES ('10405', '取消同步', 'apps.wow.shoping/delete', '10401', '105', '1557037952', '1557037952');
  46. INSERT INTO `yoshop_store_access` (`access_id`, `name`, `url`, `parent_id`, `sort`, `create_time`, `update_time`) VALUES ('10406', '订单同步记录', 'apps.wow.order/index', '10402', '100', '1557037952', '1557037952');
  47. INSERT INTO `yoshop_store_access` (`access_id`, `name`, `url`, `parent_id`, `sort`, `create_time`, `update_time`) VALUES ('10407', '取消同步', 'apps.wow.order/delete', '10402', '105', '1557037952', '1557037952');
  48. # 新增用户充值权限
  49. INSERT INTO `yoshop_store_access` (`access_id`, `name`, `url`, `parent_id`, `sort`, `create_time`, `update_time`) VALUES ('10408', '用户充值', 'user/recharge', '10049', '110', '1557037952', '1557037952');
  50. # 删除冗余的权限
  51. DELETE FROM `yoshop_store_access` WHERE (`access_id`='10013');
  52. DELETE FROM `yoshop_store_access` WHERE (`access_id`='10014');
  53. DELETE FROM `yoshop_store_access` WHERE (`access_id`='10015');
  54. DELETE FROM `yoshop_store_access` WHERE (`access_id`='10016');
  55. DELETE FROM `yoshop_store_access` WHERE (`access_id`='10017');
  56. # 整理地区表
  57. UPDATE `yoshop_region` SET `name`='香港岛(废弃)' WHERE (`id`='3717');
  58. UPDATE `yoshop_region` SET `name`='九龙(废弃)' WHERE (`id`='3722');
  59. UPDATE `yoshop_region` SET `name`='新界(废弃)' WHERE (`id`='3728');
  60. INSERT INTO `yoshop_region` VALUES ('3999', '3716', '香港', '香港特别行政区', '中国,香港特别行政区', '2', 'hongkong', null, null, null, null, null);
  61. INSERT INTO `yoshop_region` VALUES ('4000', '3999', '中西区', '中西区', '中国,香港特别行政区,中西区', '3', 'zhongxin', null, null, null, null, null);
  62. INSERT INTO `yoshop_region` VALUES ('4001', '3999', '东区', '东区', '中国,香港特别行政区,东区', '3', 'dong', null, null, null, null, null);
  63. INSERT INTO `yoshop_region` VALUES ('4002', '3999', '九龙城区', '九龙城区', '中国,香港特别行政区,九龙城区', '3', 'jiulong', null, null, null, null, null);
  64. INSERT INTO `yoshop_region` VALUES ('4003', '3999', '观塘区', '观塘区', '中国,香港特别行政区,观塘区', '3', 'guantang', null, null, null, null, null);
  65. INSERT INTO `yoshop_region` VALUES ('4004', '3999', '南区', '南区', '中国,香港特别行政区,南区', '3', 'nan', null, null, null, null, null);
  66. INSERT INTO `yoshop_region` VALUES ('4005', '3999', '深水埗区', '深水埗区', '中国,香港特别行政区,深水埗区', '3', 'shenshuibu', null, null, null, null, null);
  67. INSERT INTO `yoshop_region` VALUES ('4006', '3999', '湾仔区', '湾仔区', '中国,香港特别行政区,湾仔区', '3', 'wanzi', null, null, null, null, null);
  68. INSERT INTO `yoshop_region` VALUES ('4007', '3999', '黄大仙区', '黄大仙区', '中国,香港特别行政区,黄大仙区', '3', 'huangdaxian', null, null, null, null, null);
  69. INSERT INTO `yoshop_region` VALUES ('4008', '3999', '油尖旺区', '油尖旺区', '中国,香港特别行政区,油尖旺区', '3', 'youjianwang', null, null, null, null, null);
  70. INSERT INTO `yoshop_region` VALUES ('4009', '3999', '离岛区', '离岛区', '中国,香港特别行政区,离岛区', '3', 'lidao', null, null, null, null, null);
  71. INSERT INTO `yoshop_region` VALUES ('4010', '3999', '葵青区', '葵青区', '中国,香港特别行政区,葵青区', '3', 'kuiqing', null, null, null, null, null);
  72. INSERT INTO `yoshop_region` VALUES ('4011', '3999', '北区', '北区', '中国,香港特别行政区,北区', '3', 'bei', null, null, null, null, null);
  73. INSERT INTO `yoshop_region` VALUES ('4012', '3999', '西贡区', '西贡区', '中国,香港特别行政区,西贡区', '3', 'xigong', null, null, null, null, null);
  74. INSERT INTO `yoshop_region` VALUES ('4013', '3999', '沙田区', '沙田区', '中国,香港特别行政区,沙田区', '3', 'shatian', null, null, null, null, null);
  75. INSERT INTO `yoshop_region` VALUES ('4014', '3999', '屯门区', '屯门区', '中国,香港特别行政区,屯门区', '3', 'tunmen', null, null, null, null, null);
  76. INSERT INTO `yoshop_region` VALUES ('4015', '3999', '大埔区', '大埔区', '中国,香港特别行政区,大埔区', '3', 'dapu', null, null, null, null, null);
  77. INSERT INTO `yoshop_region` VALUES ('4016', '3999', '荃湾区', '荃湾区', '中国,香港特别行政区,荃湾区', '3', 'quanwan', null, null, null, null, null);
  78. INSERT INTO `yoshop_region` VALUES ('4017', '3999', '元朗区', '元朗区', '中国,香港特别行政区,元朗区', '3', 'yuanlang', null, null, null, null, null);
  79. ALTER TABLE `yoshop_region` AUTO_INCREMENT=50001;
  80. COMMIT;