v1.1.29.sql 4.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283
  1. ALTER TABLE `yoshop_user`
  2. ADD COLUMN `points` int(11) UNSIGNED NOT NULL DEFAULT 0 COMMENT '用户可用积分' AFTER `balance`;
  3. CREATE TABLE `yoshop_user_points_log` (
  4. `log_id` int(11) unsigned NOT NULL AUTO_INCREMENT COMMENT '主键id',
  5. `user_id` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '用户id',
  6. `value` int(11) NOT NULL DEFAULT '0.00' COMMENT '变动数量',
  7. `describe` varchar(500) NOT NULL DEFAULT '' COMMENT '描述/说明',
  8. `remark` varchar(500) NOT NULL DEFAULT '' COMMENT '管理员备注',
  9. `wxapp_id` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '小程序商城id',
  10. `create_time` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '创建时间',
  11. PRIMARY KEY (`log_id`)
  12. ) ENGINE=InnoDB AUTO_INCREMENT=10001 DEFAULT CHARSET=utf8 COMMENT='用户积分变动明细表';
  13. ALTER TABLE `yoshop_order`
  14. ADD COLUMN `points_money` decimal(10,2) UNSIGNED NOT NULL DEFAULT 0 COMMENT '积分抵扣金额' AFTER `coupon_money`;
  15. ALTER TABLE `yoshop_order`
  16. ADD COLUMN `points_num` int(11) UNSIGNED NOT NULL DEFAULT 0 COMMENT '积分抵扣数量' AFTER `points_money`;
  17. ALTER TABLE `yoshop_order`
  18. ADD COLUMN `points_bonus` int(11) UNSIGNED NOT NULL DEFAULT 0 COMMENT '赠送的积分数量' AFTER `order_status`;
  19. ALTER TABLE `yoshop_order`
  20. CHANGE COLUMN `is_user_expend` `is_settled` tinyint(3) UNSIGNED NOT NULL DEFAULT 0 COMMENT '订单是否已结算(0未结算 1已结算)' AFTER `points_bonus`;
  21. ALTER TABLE `yoshop_sharing_order`
  22. ADD COLUMN `points_money` decimal(10,2) UNSIGNED NOT NULL DEFAULT 0 COMMENT '积分抵扣金额' AFTER `coupon_money`;
  23. ALTER TABLE `yoshop_sharing_order`
  24. ADD COLUMN `points_num` int(11) UNSIGNED NOT NULL DEFAULT 0 COMMENT '积分抵扣数量' AFTER `points_money`;
  25. ALTER TABLE `yoshop_sharing_order`
  26. ADD COLUMN `points_bonus` int(11) UNSIGNED NOT NULL DEFAULT 0 COMMENT '赠送的积分数量' AFTER `order_status`;
  27. ALTER TABLE `yoshop_sharing_order`
  28. CHANGE COLUMN `is_user_expend` `is_settled` tinyint(3) UNSIGNED NOT NULL DEFAULT 0 COMMENT '订单是否已结算(0未结算 1已结算)' AFTER `points_bonus`;
  29. ALTER TABLE `yoshop_goods`
  30. ADD COLUMN `is_points_gift` tinyint(3) UNSIGNED NOT NULL DEFAULT 1 COMMENT '是否开启积分赠送(1开启 0关闭)' AFTER `delivery_id`;
  31. ALTER TABLE `yoshop_goods`
  32. ADD COLUMN `is_points_discount` tinyint(3) UNSIGNED NOT NULL DEFAULT 1 COMMENT '是否允许使用积分抵扣(1允许 0不允许)' AFTER `is_points_gift`;
  33. ALTER TABLE `yoshop_order_goods`
  34. ADD COLUMN `points_money` decimal(10,2) UNSIGNED NOT NULL DEFAULT 0.00 COMMENT '积分金额' AFTER `coupon_money`,
  35. ADD COLUMN `points_num` int(11) UNSIGNED NOT NULL DEFAULT 0 COMMENT '积分抵扣数量' AFTER `points_money`,
  36. ADD COLUMN `points_bonus` int(11) UNSIGNED NOT NULL DEFAULT 0 COMMENT '赠送的积分数量' AFTER `points_num`;
  37. ALTER TABLE `yoshop_sharing_goods`
  38. ADD COLUMN `is_points_gift` tinyint(3) UNSIGNED NOT NULL DEFAULT 1 COMMENT '是否开启积分赠送(1开启 0关闭)' AFTER `delivery_id`;
  39. ALTER TABLE `yoshop_sharing_goods`
  40. ADD COLUMN `is_points_discount` tinyint(3) UNSIGNED NOT NULL DEFAULT 1 COMMENT '是否允许使用积分抵扣(1允许 0不允许)' AFTER `is_points_gift`;
  41. ALTER TABLE `yoshop_sharing_order_goods`
  42. ADD COLUMN `points_money` decimal(10,2) UNSIGNED NOT NULL DEFAULT 0.00 COMMENT '积分金额' AFTER `coupon_money`,
  43. ADD COLUMN `points_num` int(11) UNSIGNED NOT NULL DEFAULT 0 COMMENT '积分抵扣数量' AFTER `points_money`,
  44. ADD COLUMN `points_bonus` int(11) UNSIGNED NOT NULL DEFAULT 0 COMMENT '赠送的积分数量' AFTER `points_num`;
  45. UPDATE `yoshop_store_access` SET `sort`='125' WHERE (`access_id`='10370');
  46. INSERT INTO `yoshop_store_access` VALUES ('10443', '活跃用户', 'market.push/user', '10441', '105', '1561080384', '1561080384');
  47. INSERT INTO `yoshop_store_access` VALUES ('10442', '发送消息', 'market.push/send', '10441', '100', '1561080384', '1561080384');
  48. INSERT INTO `yoshop_store_access` VALUES ('10441', '消息推送', 'market.push', '10052', '120', '1561080292', '1561080292');
  49. INSERT INTO `yoshop_store_access` VALUES ('10440', '积分明细', 'market.points/log', '10438', '105', '1561080384', '1561080384');
  50. INSERT INTO `yoshop_store_access` VALUES ('10439', '积分设置', 'market.points/setting', '10438', '100', '1561080384', '1561080384');
  51. INSERT INTO `yoshop_store_access` VALUES ('10438', '积分管理', 'market.points', '10052', '115', '1561080292', '1561080292');