/*
Navicat MySQL Data Transfer

Source Server         : localhost_3306
Source Server Version : 50553
Source Host           : localhost:3306
Source Database       : canyin2

Target Server Type    : MYSQL
Target Server Version : 50553
File Encoding         : 65001

Date: 2018-12-27 17:01:05
*/

SET FOREIGN_KEY_CHECKS=0;

-- ----------------------------
-- Table structure for am_address
-- ----------------------------
DROP TABLE IF EXISTS `am_address`;
CREATE TABLE `am_address` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `user_id` int(11) NOT NULL COMMENT '用户id',
  `name` varchar(30) NOT NULL COMMENT '联系人',
  `mobile` varchar(20) NOT NULL COMMENT '手机号',
  `address` varchar(255) NOT NULL COMMENT '收货地址',
  `create_time` int(11) NOT NULL,
  PRIMARY KEY (`id`),
  KEY `user_id` (`user_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='我的地址';

-- ----------------------------
-- Records of am_address
-- ----------------------------

-- ----------------------------
-- Table structure for am_admin
-- ----------------------------
DROP TABLE IF EXISTS `am_admin`;
CREATE TABLE `am_admin` (
  `id` int(11) NOT NULL AUTO_INCREMENT COMMENT '主键',
  `username` varchar(64) COLLATE utf8_unicode_ci NOT NULL COMMENT '用户名',
  `password` varchar(32) COLLATE utf8_unicode_ci NOT NULL COMMENT '密码（MD5）',
  `group_id` int(11) DEFAULT NULL COMMENT '分组ID',
  `status` tinyint(4) DEFAULT '1' COMMENT '1 正常 -1 禁用',
  `business_name` varchar(100) COLLATE utf8_unicode_ci DEFAULT NULL COMMENT '商户名',
  `business_phone` varchar(100) COLLATE utf8_unicode_ci DEFAULT NULL COMMENT '商家联系电话',
  `business_des` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL COMMENT '商家介绍',
  `business_address` varchar(100) COLLATE utf8_unicode_ci DEFAULT NULL COMMENT '商户地址',
  `up_to_send` decimal(5,2) NOT NULL DEFAULT '0.00' COMMENT '起送费',
  `boxes` decimal(5,2) NOT NULL DEFAULT '0.00' COMMENT '餐盒费',
  `delivery` decimal(5,2) NOT NULL DEFAULT '0.00' COMMENT '配送费',
  `picture_environment` varchar(100) COLLATE utf8_unicode_ci DEFAULT NULL COMMENT '商户环境图片',
  `is_on_waimai` tinyint(1) NOT NULL DEFAULT '1' COMMENT '是否禁用外卖 1启用 2禁用',
  `picture` varchar(100) COLLATE utf8_unicode_ci DEFAULT NULL COMMENT '图片',
  `is_business` tinyint(1) NOT NULL DEFAULT '2' COMMENT '是否是商户 1是-2否',
  `lnglat` varchar(100) COLLATE utf8_unicode_ci DEFAULT NULL COMMENT '经纬度',
  `service_time` varchar(100) COLLATE utf8_unicode_ci DEFAULT NULL COMMENT '营业时间',
  `login_num` int(11) DEFAULT '0' COMMENT '登录次数',
  `lasttime` int(11) DEFAULT NULL COMMENT '最后登录时间',
  `lastip` varchar(64) COLLATE utf8_unicode_ci DEFAULT NULL COMMENT '最后登录IP',
  `create_ip` varchar(64) COLLATE utf8_unicode_ci DEFAULT NULL COMMENT '创建IP',
  `create_time` int(11) DEFAULT NULL COMMENT '创建时间',
  `edit_ip` varchar(64) COLLATE utf8_unicode_ci DEFAULT NULL COMMENT '修改IP',
  `edit_time` int(11) DEFAULT NULL COMMENT '修改时间',
  `parent_id` int(11) DEFAULT '0' COMMENT '多门店账号--主账号id',
  `index_status` tinyint(4) DEFAULT '0' COMMENT '0为不上首页状态，1为上首页状态',
  `investment_information` text COLLATE utf8_unicode_ci COMMENT '招商信息',
  `about_us` text COLLATE utf8_unicode_ci COMMENT '关于我们',
  `sign_in` int(11) DEFAULT '0' COMMENT '签到所获得积分',
  `dada_origin_shop_id` varchar(20) COLLATE utf8_unicode_ci DEFAULT NULL COMMENT '达达门店编号',
  `send_email` varchar(50) COLLATE utf8_unicode_ci DEFAULT NULL COMMENT '接收邮箱',
  PRIMARY KEY (`id`),
  UNIQUE KEY `username` (`username`) USING BTREE,
  KEY `group_id` (`group_id`),
  KEY `status` (`status`),
  KEY `is_business` (`is_business`),
  KEY `is_on_waimai` (`is_on_waimai`),
  KEY `index_status` (`index_status`),
  KEY `parent_id` (`parent_id`)
) ENGINE=MyISAM AUTO_INCREMENT=113 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci COMMENT='管理员';

-- ----------------------------
-- Records of am_admin
-- ----------------------------
INSERT INTO `am_admin` VALUES ('1', 'shenmijisu', '342dc8c3390c315ab4cd7183c5ebf12b', '1', '1', null, null, null, null, '0.00', '0.00', '0.00', null, '0', 'admin_busisness/5a445fd1a1e9b.jpg', '2', null, null, '1154', '1538115410', '119.23.123.17', null, null, null, null, '0', '0', null, null, '20', null, null);
INSERT INTO `am_admin` VALUES ('112', 'FNB', '738a88f1824c482223bac37cb0990016', '13', '1', 'Page Modules Sdn Bhd', '138212915', 'PageModulesFNB,PageModulesFNB,PageModulesFNB', 'No.231, 1st Floor, Lot 2577, Central park Commercial Centre, 2 1/2 Rock Road 93250, Kuching Sarawak', '0.00', '0.00', '0.00', null, '2', 'admin_busisness/5b9c758063929.png', '1', '114.014145,22.637157', '9：00~23:00', '38', '1539840649', '47.104.50.48', '119.23.123.9', '1536311915', '119.23.123.12', '1536315789', '0', '0', '&lt;p&gt;.&lt;/p&gt;', '', '20', null, 'pagemodulestech@gmail.com');

-- ----------------------------
-- Table structure for am_appointment
-- ----------------------------
DROP TABLE IF EXISTS `am_appointment`;
CREATE TABLE `am_appointment` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `admin_id` int(11) NOT NULL,
  `user_id` int(11) NOT NULL,
  `time` varchar(50) NOT NULL,
  `time_interval` tinyint(1) NOT NULL COMMENT '时段  1早上   2中午 3晚上 ',
  `nums` int(11) NOT NULL DEFAULT '1' COMMENT '用餐人数',
  `name` varchar(100) NOT NULL COMMENT '顾客姓名',
  `mobile` varchar(20) NOT NULL COMMENT '联系方式',
  `status` tinyint(1) NOT NULL DEFAULT '1' COMMENT '1新订单   2已确认 3已完成',
  `table_id` varchar(20) NOT NULL COMMENT '桌位',
  `app_status` tinyint(1) NOT NULL DEFAULT '2' COMMENT '是否需要定金  1需要定金  2不需要定金',
  `money` decimal(10,2) NOT NULL DEFAULT '0.00' COMMENT '定金',
  `p_money` decimal(10,2) NOT NULL DEFAULT '0.00' COMMENT '消费金额',
  `remark` varchar(255) DEFAULT NULL COMMENT '备注',
  `pay_no` varchar(30) DEFAULT NULL COMMENT '支付编号',
  `pay_return` text COMMENT '预支付订单信息',
  `create_time` int(11) DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `user_id` (`user_id`)
) ENGINE=InnoDB AUTO_INCREMENT=214 DEFAULT CHARSET=utf8;

-- ----------------------------
-- Records of am_appointment
-- ----------------------------

-- ----------------------------
-- Table structure for am_appointment_config
-- ----------------------------
DROP TABLE IF EXISTS `am_appointment_config`;
CREATE TABLE `am_appointment_config` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `admin_id` int(11) NOT NULL,
  `status` tinyint(1) NOT NULL DEFAULT '2' COMMENT '1需要定金  2不需要定金',
  `money` decimal(5,2) NOT NULL DEFAULT '100.00' COMMENT '定金',
  `create_time` int(11) DEFAULT NULL,
  `update_time` int(11) DEFAULT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `admin_id` (`admin_id`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8 COMMENT='预约设置表';

-- ----------------------------
-- Records of am_appointment_config
-- ----------------------------
INSERT INTO `am_appointment_config` VALUES ('1', '0', '1', '101.00', '1514948327', '1514948360');

-- ----------------------------
-- Table structure for am_big_wheel_config
-- ----------------------------
DROP TABLE IF EXISTS `am_big_wheel_config`;
CREATE TABLE `am_big_wheel_config` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `admin_id` int(11) NOT NULL,
  `int` int(11) NOT NULL DEFAULT '88' COMMENT '每次消耗积分',
  `status` tinyint(4) NOT NULL DEFAULT '2' COMMENT '状态 1开启  2关闭',
  `create_time` int(11) DEFAULT NULL,
  `update_time` int(11) DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `admin_id` (`admin_id`),
  KEY `status` (`status`)
) ENGINE=InnoDB AUTO_INCREMENT=32 DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='大转盘设置';

-- ----------------------------
-- Records of am_big_wheel_config
-- ----------------------------
INSERT INTO `am_big_wheel_config` VALUES ('31', '112', '2', '1', '1536316615', '1536981652');

-- ----------------------------
-- Table structure for am_big_wheel_goods
-- ----------------------------
DROP TABLE IF EXISTS `am_big_wheel_goods`;
CREATE TABLE `am_big_wheel_goods` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `admin_id` int(11) NOT NULL,
  `goods_name` varchar(100) COLLATE utf8_bin DEFAULT NULL COMMENT '商品名称',
  `img` varchar(100) COLLATE utf8_bin DEFAULT NULL COMMENT '商品图片',
  `status` tinyint(1) NOT NULL DEFAULT '2' COMMENT '是否是奖品  1是 2不是',
  `probability` varchar(11) COLLATE utf8_bin DEFAULT '0.00' COMMENT '概率',
  `create_time` int(11) DEFAULT NULL,
  `update_time` int(11) DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `admin_id` (`admin_id`),
  KEY `status` (`status`)
) ENGINE=InnoDB AUTO_INCREMENT=66 DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='大转盘商品设置';

-- ----------------------------
-- Records of am_big_wheel_goods
-- ----------------------------

-- ----------------------------
-- Table structure for am_big_wheel_winning_record
-- ----------------------------
DROP TABLE IF EXISTS `am_big_wheel_winning_record`;
CREATE TABLE `am_big_wheel_winning_record` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `user_id` int(11) NOT NULL COMMENT '用户id',
  `admin_id` int(11) NOT NULL,
  `bw_goods_id` int(11) NOT NULL COMMENT '商品id',
  `status` tinyint(1) NOT NULL DEFAULT '2' COMMENT '状态  1已入录物流单号  2未入录   3未中奖',
  `name` varchar(50) COLLATE utf8_bin DEFAULT NULL COMMENT '收货人',
  `address` varchar(100) COLLATE utf8_bin DEFAULT NULL COMMENT '收货地址',
  `mobile` varchar(20) COLLATE utf8_bin DEFAULT NULL COMMENT '联系方式',
  `logistics_no` varchar(50) COLLATE utf8_bin DEFAULT NULL COMMENT '物流单号',
  `create_time` int(11) DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `user_id` (`user_id`),
  KEY `admin_id` (`admin_id`),
  KEY `bw_goods_id` (`bw_goods_id`),
  KEY `status` (`status`)
) ENGINE=InnoDB AUTO_INCREMENT=80 DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='大转盘获奖记录';

-- ----------------------------
-- Records of am_big_wheel_winning_record
-- ----------------------------

-- ----------------------------
-- Table structure for am_bond_log
-- ----------------------------
DROP TABLE IF EXISTS `am_bond_log`;
CREATE TABLE `am_bond_log` (
  `id` int(11) unsigned NOT NULL AUTO_INCREMENT,
  `uid` int(11) NOT NULL COMMENT '村长uid',
  `identity_village_id` int(11) NOT NULL COMMENT '村ID',
  `bond_sn` varchar(36) NOT NULL COMMENT '订单编号',
  `transaction_id` varchar(36) NOT NULL COMMENT '微信订单号',
  `money` decimal(10,2) NOT NULL DEFAULT '0.00' COMMENT '支付金额',
  `pay_time` varchar(36) NOT NULL COMMENT '支付时间戳',
  `pay_status` int(2) NOT NULL COMMENT ' 支付状态 1为未支付，2为已支付，3为已退回',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=36 DEFAULT CHARSET=utf8 COMMENT='村长缴纳保证金记录表';

-- ----------------------------
-- Records of am_bond_log
-- ----------------------------

-- ----------------------------
-- Table structure for am_car
-- ----------------------------
DROP TABLE IF EXISTS `am_car`;
CREATE TABLE `am_car` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `admin_id` int(11) DEFAULT NULL,
  `users_id` int(11) DEFAULT NULL,
  `order_sn` varchar(255) DEFAULT NULL COMMENT '订单号',
  `car_content` text COMMENT '购物车信息  goods_id、 goods_num、price',
  `create_time` int(11) DEFAULT NULL COMMENT '添加时间',
  `update_time` int(11) DEFAULT NULL COMMENT '更新时间',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=2388 DEFAULT CHARSET=utf8mb4 COMMENT='订单商品表';

-- ----------------------------
-- Records of am_car
-- ----------------------------

-- ----------------------------
-- Table structure for am_cards
-- ----------------------------
DROP TABLE IF EXISTS `am_cards`;
CREATE TABLE `am_cards` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `admin_id` int(11) NOT NULL COMMENT '商户id',
  `money` decimal(10,2) NOT NULL COMMENT '充值金额',
  `preferential_money` decimal(10,2) NOT NULL DEFAULT '0.00' COMMENT '到账金额',
  `create_time` int(11) NOT NULL COMMENT '添加时间',
  `update_time` int(11) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=43 DEFAULT CHARSET=utf8 COMMENT='充值面额表';

-- ----------------------------
-- Records of am_cards
-- ----------------------------

-- ----------------------------
-- Table structure for am_cards_log
-- ----------------------------
DROP TABLE IF EXISTS `am_cards_log`;
CREATE TABLE `am_cards_log` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `user_id` int(11) NOT NULL COMMENT '用户id',
  `money` decimal(10,2) NOT NULL COMMENT '充值金额',
  `title` varchar(100) DEFAULT NULL,
  `preferential_money` decimal(10,2) NOT NULL COMMENT '到账金额',
  `status` tinyint(1) NOT NULL COMMENT '充值状态  1未支付  2已支付',
  `pay_no` varchar(50) NOT NULL COMMENT '支付单号',
  `pay_time` int(11) DEFAULT NULL COMMENT '支付时间',
  `pay_return` text COMMENT '预支付订单信息',
  `transaction_id` varchar(100) DEFAULT NULL COMMENT '微信内部订单号',
  `create_time` int(11) NOT NULL COMMENT '添加时间',
  PRIMARY KEY (`id`),
  UNIQUE KEY `pay_no` (`pay_no`),
  KEY `user_id` (`user_id`)
) ENGINE=InnoDB AUTO_INCREMENT=528 DEFAULT CHARSET=utf8 COMMENT='用户充值记录';

-- ----------------------------
-- Records of am_cards_log
-- ----------------------------

-- ----------------------------
-- Table structure for am_carousel
-- ----------------------------
DROP TABLE IF EXISTS `am_carousel`;
CREATE TABLE `am_carousel` (
  `id` int(11) NOT NULL AUTO_INCREMENT COMMENT '主键',
  `sort` int(11) DEFAULT '10' COMMENT '排序',
  `village_id` int(11) DEFAULT '0' COMMENT '村ID (商城轮播为0)',
  `good_id` int(11) NOT NULL COMMENT '商品ID',
  `img` text NOT NULL COMMENT '图片',
  PRIMARY KEY (`id`),
  KEY `village_id` (`village_id`)
) ENGINE=MyISAM AUTO_INCREMENT=44 DEFAULT CHARSET=utf8 COMMENT='农村地区轮播图';

-- ----------------------------
-- Records of am_carousel
-- ----------------------------

-- ----------------------------
-- Table structure for am_carousel_city
-- ----------------------------
DROP TABLE IF EXISTS `am_carousel_city`;
CREATE TABLE `am_carousel_city` (
  `id` int(11) NOT NULL AUTO_INCREMENT COMMENT '主键',
  `sort` int(11) DEFAULT '10' COMMENT '排序 (默认10)',
  `village_id` int(11) DEFAULT '0' COMMENT '小区ID (商城轮播为0)',
  `img` text NOT NULL COMMENT '图片',
  PRIMARY KEY (`id`),
  KEY `village_id` (`village_id`)
) ENGINE=MyISAM AUTO_INCREMENT=8 DEFAULT CHARSET=utf8 COMMENT='城市地区轮播图';

-- ----------------------------
-- Records of am_carousel_city
-- ----------------------------

-- ----------------------------
-- Table structure for am_carousel_village
-- ----------------------------
DROP TABLE IF EXISTS `am_carousel_village`;
CREATE TABLE `am_carousel_village` (
  `id` int(11) NOT NULL AUTO_INCREMENT COMMENT '主键',
  `sort` int(11) DEFAULT '10' COMMENT '排序 (默认10)',
  `village_id` int(11) NOT NULL COMMENT '村ID',
  `img` text NOT NULL COMMENT '图片',
  PRIMARY KEY (`id`),
  KEY `village_id` (`village_id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COMMENT='各村独立轮播图';

-- ----------------------------
-- Records of am_carousel_village
-- ----------------------------

-- ----------------------------
-- Table structure for am_cash_apply
-- ----------------------------
DROP TABLE IF EXISTS `am_cash_apply`;
CREATE TABLE `am_cash_apply` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `user_id` int(11) DEFAULT NULL,
  `money` varchar(255) DEFAULT NULL,
  `name` varchar(255) DEFAULT NULL,
  `card_number` int(11) DEFAULT NULL,
  `bank` varchar(255) DEFAULT NULL,
  `addtime` int(11) DEFAULT NULL,
  `status` int(11) DEFAULT '0',
  `is_del` tinyint(2) DEFAULT '0',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=7 DEFAULT CHARSET=utf8 COMMENT='佣金提现申请表';

-- ----------------------------
-- Records of am_cash_apply
-- ----------------------------

-- ----------------------------
-- Table structure for am_cate
-- ----------------------------
DROP TABLE IF EXISTS `am_cate`;
CREATE TABLE `am_cate` (
  `id` int(11) NOT NULL AUTO_INCREMENT COMMENT 'id',
  `title` varchar(255) DEFAULT NULL COMMENT '标题',
  `img` varchar(255) DEFAULT NULL COMMENT 'logo图',
  `status` tinyint(1) DEFAULT NULL COMMENT '状态',
  `sort` int(11) DEFAULT NULL COMMENT '排序',
  `addtime` int(11) DEFAULT NULL COMMENT '添加时间',
  `admin_id` int(11) DEFAULT NULL COMMENT '商户id',
  PRIMARY KEY (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=35 DEFAULT CHARSET=utf8;

-- ----------------------------
-- Records of am_cate
-- ----------------------------
INSERT INTO `am_cate` VALUES ('31', 'New Item Recommend', null, '1', '0', '1537249429', '112');
INSERT INTO `am_cate` VALUES ('32', 'Offered Package', null, '1', '1', '1537249429', '112');
INSERT INTO `am_cate` VALUES ('33', 'Signature Recommended', null, '1', '2', '1537249429', '112');
INSERT INTO `am_cate` VALUES ('34', 'Limited Time Discount', null, '1', '3', '1537249429', '112');

-- ----------------------------
-- Table structure for am_cat_config
-- ----------------------------
DROP TABLE IF EXISTS `am_cat_config`;
CREATE TABLE `am_cat_config` (
  `id` int(11) NOT NULL AUTO_INCREMENT COMMENT 'id',
  `status` tinyint(1) DEFAULT NULL COMMENT '状态',
  `admin_id` int(11) DEFAULT NULL COMMENT '商户id',
  PRIMARY KEY (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=5 DEFAULT CHARSET=utf8;

-- ----------------------------
-- Records of am_cat_config
-- ----------------------------
INSERT INTO `am_cat_config` VALUES ('4', '1', '112');

-- ----------------------------
-- Table structure for am_chart
-- ----------------------------
DROP TABLE IF EXISTS `am_chart`;
CREATE TABLE `am_chart` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `admin_id` int(11) DEFAULT NULL,
  `img` varchar(100) COLLATE utf8_bin DEFAULT NULL COMMENT '图片',
  `title` varchar(50) COLLATE utf8_bin DEFAULT NULL COMMENT '标题',
  `des` text COLLATE utf8_bin COMMENT '详情',
  `sort` int(11) DEFAULT '0' COMMENT '排序',
  `status` tinyint(1) NOT NULL DEFAULT '1' COMMENT '状态 1启用，2禁用',
  `create_time` int(11) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=181 DEFAULT CHARSET=utf8 COLLATE=utf8_bin;

-- ----------------------------
-- Records of am_chart
-- ----------------------------
INSERT INTO `am_chart` VALUES ('179', '112', 'chart/2018-09-07/5b925216c0a0b.jpg', '1', null, null, '1', '1536315926');

-- ----------------------------
-- Table structure for am_chart_config
-- ----------------------------
DROP TABLE IF EXISTS `am_chart_config`;
CREATE TABLE `am_chart_config` (
  `id` int(11) NOT NULL AUTO_INCREMENT COMMENT 'id',
  `status` tinyint(1) DEFAULT NULL,
  `admin_id` int(11) DEFAULT NULL COMMENT '商户id',
  PRIMARY KEY (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=4 DEFAULT CHARSET=utf8;

-- ----------------------------
-- Records of am_chart_config
-- ----------------------------
INSERT INTO `am_chart_config` VALUES ('3', '1', '112');

-- ----------------------------
-- Table structure for am_collect
-- ----------------------------
DROP TABLE IF EXISTS `am_collect`;
CREATE TABLE `am_collect` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `goods_id` int(11) NOT NULL COMMENT '商品id',
  `user_id` int(11) NOT NULL COMMENT '用户id',
  `create_time` int(11) NOT NULL,
  PRIMARY KEY (`id`),
  KEY `goods_id` (`goods_id`),
  KEY `user_id` (`user_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='收藏表';

-- ----------------------------
-- Records of am_collect
-- ----------------------------

-- ----------------------------
-- Table structure for am_comunity_keyword
-- ----------------------------
DROP TABLE IF EXISTS `am_comunity_keyword`;
CREATE TABLE `am_comunity_keyword` (
  `id` int(5) NOT NULL AUTO_INCREMENT,
  `mkeyword` varchar(100) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=utf8 COMMENT='小区关键字';

-- ----------------------------
-- Records of am_comunity_keyword
-- ----------------------------
INSERT INTO `am_comunity_keyword` VALUES ('1', '九方');
INSERT INTO `am_comunity_keyword` VALUES ('2', '专卖');
INSERT INTO `am_comunity_keyword` VALUES ('4', '锤子');

-- ----------------------------
-- Table structure for am_consum
-- ----------------------------
DROP TABLE IF EXISTS `am_consum`;
CREATE TABLE `am_consum` (
  `id` int(11) NOT NULL AUTO_INCREMENT COMMENT 'id',
  `title` varchar(20) DEFAULT NULL COMMENT '标题',
  `type` tinyint(1) DEFAULT NULL COMMENT '模式类型',
  `status` tinyint(1) DEFAULT NULL COMMENT '状态',
  `create_time` int(11) DEFAULT NULL COMMENT '添加时间',
  `admin_id` int(11) DEFAULT NULL COMMENT '商户id',
  PRIMARY KEY (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=19 DEFAULT CHARSET=utf8;

-- ----------------------------
-- Records of am_consum
-- ----------------------------
INSERT INTO `am_consum` VALUES ('17', 'The selling point me', '1', '2', '1537247959', '112');

-- ----------------------------
-- Table structure for am_dada_business
-- ----------------------------
DROP TABLE IF EXISTS `am_dada_business`;
CREATE TABLE `am_dada_business` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `admin_id` int(11) NOT NULL COMMENT '商户id',
  `source_id` varchar(20) NOT NULL DEFAULT '' COMMENT '商户id',
  `app_key` varchar(32) NOT NULL,
  `app_secret` varchar(32) NOT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `admin_id` (`admin_id`) USING BTREE,
  KEY `source_id` (`source_id`)
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8 COMMENT='达达商户配置表';

-- ----------------------------
-- Records of am_dada_business
-- ----------------------------

-- ----------------------------
-- Table structure for am_dinner
-- ----------------------------
DROP TABLE IF EXISTS `am_dinner`;
CREATE TABLE `am_dinner` (
  `id` int(11) NOT NULL AUTO_INCREMENT COMMENT '主键',
  `openid` varchar(255) NOT NULL COMMENT '用户小程序openid',
  `village_id` int(11) NOT NULL COMMENT '村ID',
  `cook_openid` varchar(255) DEFAULT NULL COMMENT '厨师openid',
  `group_openid` varchar(255) DEFAULT NULL COMMENT '组管理员openid',
  `dinner_sn` varchar(255) NOT NULL COMMENT '预订编号',
  `transaction_id` varchar(255) DEFAULT NULL COMMENT '微信订单号',
  `total_fee` decimal(10,2) unsigned NOT NULL COMMENT '总价',
  `pre_fee` decimal(10,2) unsigned NOT NULL COMMENT '订金',
  `end_fee` decimal(10,2) unsigned NOT NULL COMMENT '尾款',
  `name` varchar(255) NOT NULL COMMENT '姓名',
  `tel` varchar(255) NOT NULL COMMENT '手机',
  `address` text NOT NULL COMMENT '举办地址',
  `table_num` int(10) unsigned NOT NULL COMMENT '桌数',
  `form_id` varchar(255) NOT NULL COMMENT '小程序表单ID',
  `prepay_id` varchar(255) DEFAULT NULL COMMENT '预支付ID',
  `status` tinyint(4) DEFAULT '1' COMMENT '1.待确认 2.待支付 3.已付定金 4.已收尾款 5.已回收退货 6.已完成 -1.取消',
  `dtb_status` tinyint(4) DEFAULT '1' COMMENT '佣金状态 1.冻结 2.解冻',
  `create_time` int(11) NOT NULL COMMENT '下单时间',
  `arrive_time` int(11) NOT NULL COMMENT '预计到达时间',
  `dinner_time` int(11) NOT NULL COMMENT '预计尾款结算时间',
  `pay_time` int(11) DEFAULT NULL COMMENT '付款时间',
  `sure_time` int(11) DEFAULT NULL COMMENT '预订确认时间',
  `finish_time` int(11) DEFAULT NULL COMMENT '完成时间',
  `cancel_time` int(11) DEFAULT NULL COMMENT '取消时间',
  PRIMARY KEY (`id`),
  UNIQUE KEY `dinner_sn` (`dinner_sn`),
  KEY `openid` (`openid`,`village_id`,`status`,`create_time`)
) ENGINE=MyISAM AUTO_INCREMENT=108 DEFAULT CHARSET=utf8 COMMENT='宴席套餐记录';

-- ----------------------------
-- Records of am_dinner
-- ----------------------------

-- ----------------------------
-- Table structure for am_dinner_dish
-- ----------------------------
DROP TABLE IF EXISTS `am_dinner_dish`;
CREATE TABLE `am_dinner_dish` (
  `id` int(11) NOT NULL AUTO_INCREMENT COMMENT '主键',
  `dinner_id` int(11) NOT NULL COMMENT '宴席ID',
  `dish_id` int(11) NOT NULL COMMENT '宴席产品ID',
  `price` decimal(10,2) NOT NULL COMMENT '套餐价',
  PRIMARY KEY (`id`),
  KEY `dish_id` (`dish_id`),
  KEY `dinner_id` (`dinner_id`)
) ENGINE=MyISAM AUTO_INCREMENT=108 DEFAULT CHARSET=utf8 COMMENT='宴席套餐副表';

-- ----------------------------
-- Records of am_dinner_dish
-- ----------------------------

-- ----------------------------
-- Table structure for am_dinner_dish_good
-- ----------------------------
DROP TABLE IF EXISTS `am_dinner_dish_good`;
CREATE TABLE `am_dinner_dish_good` (
  `id` int(11) NOT NULL AUTO_INCREMENT COMMENT '主键',
  `dinner_id` int(11) NOT NULL COMMENT '订单ID',
  `good_id` int(11) NOT NULL COMMENT '商品ID',
  `goods_price` decimal(10,2) DEFAULT '0.00' COMMENT '购买单价',
  `dinner_dish_id` int(11) DEFAULT '0' COMMENT '副表ID 追加商品为 0',
  `num` int(10) unsigned NOT NULL COMMENT '用量',
  PRIMARY KEY (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=251 DEFAULT CHARSET=utf8 COMMENT='订单材料副表';

-- ----------------------------
-- Records of am_dinner_dish_good
-- ----------------------------

-- ----------------------------
-- Table structure for am_dinner_good_return
-- ----------------------------
DROP TABLE IF EXISTS `am_dinner_good_return`;
CREATE TABLE `am_dinner_good_return` (
  `id` int(11) NOT NULL AUTO_INCREMENT COMMENT '主键',
  `dinner_id` int(11) NOT NULL COMMENT '订单ID',
  `good_id` int(11) NOT NULL COMMENT '商品ID',
  `goods_price` decimal(10,2) DEFAULT '0.00' COMMENT '购买单价',
  `num` int(10) unsigned NOT NULL COMMENT '数量',
  PRIMARY KEY (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=28 DEFAULT CHARSET=utf8 COMMENT='多余商品退货单';

-- ----------------------------
-- Records of am_dinner_good_return
-- ----------------------------

-- ----------------------------
-- Table structure for am_dish
-- ----------------------------
DROP TABLE IF EXISTS `am_dish`;
CREATE TABLE `am_dish` (
  `id` int(11) NOT NULL AUTO_INCREMENT COMMENT '主键',
  `sort` int(11) DEFAULT '50' COMMENT '排序 （默认50）',
  `village_id` int(11) NOT NULL COMMENT '村ID',
  `name` varchar(255) NOT NULL COMMENT '名称',
  `thumb` text NOT NULL COMMENT '缩略图',
  `describe` text COMMENT '简介',
  PRIMARY KEY (`id`),
  KEY `village_id` (`village_id`)
) ENGINE=MyISAM AUTO_INCREMENT=78 DEFAULT CHARSET=utf8 COMMENT='宴席产品';

-- ----------------------------
-- Records of am_dish
-- ----------------------------

-- ----------------------------
-- Table structure for am_dish_caipin
-- ----------------------------
DROP TABLE IF EXISTS `am_dish_caipin`;
CREATE TABLE `am_dish_caipin` (
  `id` int(11) NOT NULL AUTO_INCREMENT COMMENT '主键',
  `dish_id` int(11) NOT NULL COMMENT '套餐ID',
  `name` varchar(255) NOT NULL COMMENT '名称',
  `thumb` text NOT NULL COMMENT '缩略图',
  PRIMARY KEY (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=225 DEFAULT CHARSET=utf8 COMMENT='菜品';

-- ----------------------------
-- Records of am_dish_caipin
-- ----------------------------

-- ----------------------------
-- Table structure for am_dish_good
-- ----------------------------
DROP TABLE IF EXISTS `am_dish_good`;
CREATE TABLE `am_dish_good` (
  `id` int(11) NOT NULL AUTO_INCREMENT COMMENT '主键',
  `sort` int(11) DEFAULT '50' COMMENT '排序 （默认50）',
  `dish_id` int(11) NOT NULL COMMENT '套餐ID',
  `good_id` int(11) NOT NULL COMMENT '商品（材料）ID',
  `num` int(10) unsigned NOT NULL COMMENT '每桌使用量',
  PRIMARY KEY (`id`),
  KEY `dish_id` (`dish_id`)
) ENGINE=MyISAM AUTO_INCREMENT=244 DEFAULT CHARSET=utf8 COMMENT='宴席套餐材料副表';

-- ----------------------------
-- Records of am_dish_good
-- ----------------------------

-- ----------------------------
-- Table structure for am_distribution_apply
-- ----------------------------
DROP TABLE IF EXISTS `am_distribution_apply`;
CREATE TABLE `am_distribution_apply` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `user_id` int(11) DEFAULT NULL,
  `status` int(11) DEFAULT NULL COMMENT '0未审核  1已审核  2未通过',
  `addtime` int(11) DEFAULT NULL,
  `endtime` int(11) DEFAULT NULL,
  `name` varchar(255) DEFAULT NULL,
  `phone` varchar(255) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=29 DEFAULT CHARSET=utf8 COMMENT='分销用户表';

-- ----------------------------
-- Records of am_distribution_apply
-- ----------------------------

-- ----------------------------
-- Table structure for am_distribution_config
-- ----------------------------
DROP TABLE IF EXISTS `am_distribution_config`;
CREATE TABLE `am_distribution_config` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `admin_id` int(11) NOT NULL COMMENT '商户id',
  `amount` decimal(10,2) NOT NULL DEFAULT '200.00' COMMENT '分销身份消费门槛',
  `one_share` decimal(10,2) NOT NULL DEFAULT '0.02' COMMENT '一级佣金',
  `two_share` decimal(10,2) NOT NULL DEFAULT '0.01' COMMENT '二级佣金',
  `switch` tinyint(1) NOT NULL DEFAULT '0' COMMENT '分销总开关   0关闭  1开启',
  PRIMARY KEY (`id`),
  UNIQUE KEY `admin_id` (`admin_id`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=22 DEFAULT CHARSET=utf8 COMMENT='分销配置表';

-- ----------------------------
-- Records of am_distribution_config
-- ----------------------------
INSERT INTO `am_distribution_config` VALUES ('21', '112', '200.00', '0.02', '0.01', '0');

-- ----------------------------
-- Table structure for am_distribution_rec
-- ----------------------------
DROP TABLE IF EXISTS `am_distribution_rec`;
CREATE TABLE `am_distribution_rec` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `user_id` int(11) NOT NULL COMMENT '用户id',
  `order_sn` varchar(32) NOT NULL COMMENT '订单号',
  `order_money` decimal(10,2) NOT NULL COMMENT '订单金额',
  `money` decimal(10,2) NOT NULL COMMENT '佣金',
  `status` tinyint(1) NOT NULL COMMENT '0待返 1已返',
  `addtime` int(11) NOT NULL COMMENT '添加时间',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=29 DEFAULT CHARSET=utf8 COMMENT='佣金记录表';

-- ----------------------------
-- Records of am_distribution_rec
-- ----------------------------

-- ----------------------------
-- Table structure for am_ele_config
-- ----------------------------
DROP TABLE IF EXISTS `am_ele_config`;
CREATE TABLE `am_ele_config` (
  `id` int(11) NOT NULL,
  `app_id` char(36) NOT NULL,
  `secret_key` char(36) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='饿了么蜂鸟专送配置参数';

-- ----------------------------
-- Records of am_ele_config
-- ----------------------------
INSERT INTO `am_ele_config` VALUES ('1', '34d16bf0-fb7a-4e38-bece-564bca85e357', '15629e0a-ab5c-4dee-b708-1a36889baef6');

-- ----------------------------
-- Table structure for am_exchange
-- ----------------------------
DROP TABLE IF EXISTS `am_exchange`;
CREATE TABLE `am_exchange` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `user_id` int(11) DEFAULT NULL COMMENT '用户id',
  `int_market_id` int(11) DEFAULT NULL COMMENT '积分商品id',
  `exchange_no` varchar(50) DEFAULT NULL COMMENT '兑换编号',
  `status` tinyint(1) NOT NULL DEFAULT '2' COMMENT '状态 1已受理(已发货) 2未受理',
  `name` varchar(100) DEFAULT NULL COMMENT '收货人',
  `mobile` varchar(30) DEFAULT NULL COMMENT '手机号，联系方式',
  `address` varchar(250) DEFAULT NULL COMMENT '收货地址',
  `logistics_no` varchar(50) DEFAULT NULL COMMENT '物流编号',
  `int` int(11) DEFAULT NULL COMMENT '兑换积分',
  `create_time` int(11) DEFAULT NULL COMMENT '添加时间，兑换时间',
  PRIMARY KEY (`id`),
  UNIQUE KEY `Unique` (`exchange_no`),
  KEY `Normal` (`user_id`,`int_market_id`,`status`)
) ENGINE=InnoDB AUTO_INCREMENT=68 DEFAULT CHARSET=utf8 COMMENT='积分兑换记录\r\n';

-- ----------------------------
-- Records of am_exchange
-- ----------------------------

-- ----------------------------
-- Table structure for am_exhibition
-- ----------------------------
DROP TABLE IF EXISTS `am_exhibition`;
CREATE TABLE `am_exhibition` (
  `id` int(11) unsigned NOT NULL AUTO_INCREMENT,
  `title` varchar(255) DEFAULT NULL,
  `info` text,
  `img` varchar(255) DEFAULT NULL,
  `business_id` int(11) DEFAULT NULL,
  `addtime` int(11) DEFAULT NULL,
  `status` tinyint(1) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=26 DEFAULT CHARSET=utf8;

-- ----------------------------
-- Records of am_exhibition
-- ----------------------------
INSERT INTO `am_exhibition` VALUES ('24', 'testing', '                      testing                                    ', 'exhibition/2018-09-18/5ba079b77aab8.png', '112', '1537243575', '2');

-- ----------------------------
-- Table structure for am_facutime
-- ----------------------------
DROP TABLE IF EXISTS `am_facutime`;
CREATE TABLE `am_facutime` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `admin_id` int(11) DEFAULT NULL,
  `addtime1` varchar(20) DEFAULT NULL,
  `endtime1` varchar(20) DEFAULT NULL,
  `addtime2` varchar(20) DEFAULT NULL,
  `endtime2` varchar(20) DEFAULT NULL,
  `status` tinyint(1) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

-- ----------------------------
-- Records of am_facutime
-- ----------------------------

-- ----------------------------
-- Table structure for am_footimg
-- ----------------------------
DROP TABLE IF EXISTS `am_footimg`;
CREATE TABLE `am_footimg` (
  `id` int(11) NOT NULL AUTO_INCREMENT COMMENT 'id',
  `img` varchar(255) DEFAULT NULL COMMENT '图片地址',
  `admin_id` int(11) DEFAULT NULL COMMENT '商户id',
  `create_time` int(11) DEFAULT NULL COMMENT '添加时间',
  PRIMARY KEY (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=6 DEFAULT CHARSET=utf8;

-- ----------------------------
-- Records of am_footimg
-- ----------------------------
INSERT INTO `am_footimg` VALUES ('5', 'footimg/2018-09-24/5ba8831085c1f.png', '112', '1537250037');

-- ----------------------------
-- Table structure for am_fund_apply
-- ----------------------------
DROP TABLE IF EXISTS `am_fund_apply`;
CREATE TABLE `am_fund_apply` (
  `id` int(11) NOT NULL AUTO_INCREMENT COMMENT '主键',
  `openid` varchar(255) NOT NULL COMMENT '小程序openid',
  `money` decimal(10,2) unsigned NOT NULL COMMENT '提现金额',
  `log_id` text NOT NULL COMMENT '佣金记录id，为避免一次提现过多，用text',
  `name` varchar(255) NOT NULL COMMENT '申请时名字',
  `mobile` varchar(255) NOT NULL COMMENT '申请时电话',
  `identity` tinyint(4) NOT NULL COMMENT '申请时身份',
  `identity_village_id` int(11) NOT NULL COMMENT '申请时村',
  `partner_trade_no` varchar(255) NOT NULL COMMENT '商户单号',
  `payment_no` varchar(255) DEFAULT NULL COMMENT '微信单号',
  `status` tinyint(4) DEFAULT '1' COMMENT '状态 1.未处理 2.已提现 -1.驳回',
  `reason` text COMMENT '驳回理由',
  `create_time` int(11) NOT NULL COMMENT '申请时间',
  PRIMARY KEY (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=28 DEFAULT CHARSET=utf8 COMMENT='佣金提现申请';

-- ----------------------------
-- Records of am_fund_apply
-- ----------------------------

-- ----------------------------
-- Table structure for am_fund_log
-- ----------------------------
DROP TABLE IF EXISTS `am_fund_log`;
CREATE TABLE `am_fund_log` (
  `id` int(11) NOT NULL AUTO_INCREMENT COMMENT '主键',
  `type` tinyint(4) NOT NULL COMMENT '类型 1.订单佣金 2.宴席佣金',
  `target` tinyint(4) NOT NULL COMMENT '受益对象 1.村管理员 2.组管理员 3.厨师',
  `openid` varchar(255) NOT NULL COMMENT '受益者 openid',
  `benefit` decimal(10,2) unsigned NOT NULL COMMENT '佣金金额',
  `order_id` int(11) DEFAULT '0' COMMENT '订单ID 宴席填 0',
  `dinner_id` int(11) DEFAULT '0' COMMENT '宴席预订ID 订单填 0',
  `good_id` int(11) DEFAULT '0' COMMENT '商品ID 宴席填 0',
  `status` tinyint(4) DEFAULT '1' COMMENT '状态 1.冻结 2.解冻',
  `apply_status` tinyint(4) NOT NULL COMMENT '0订单未完成1未申请2已申请3已提现',
  `create_time` int(11) NOT NULL COMMENT '产生时间',
  `thaw_time` int(11) NOT NULL COMMENT '解冻时间',
  `apply_time` int(11) NOT NULL COMMENT '申请提现时间',
  PRIMARY KEY (`id`),
  KEY `openid` (`openid`)
) ENGINE=MyISAM AUTO_INCREMENT=160 DEFAULT CHARSET=utf8 COMMENT='am_fund_log';

-- ----------------------------
-- Records of am_fund_log
-- ----------------------------

-- ----------------------------
-- Table structure for am_goods
-- ----------------------------
DROP TABLE IF EXISTS `am_goods`;
CREATE TABLE `am_goods` (
  `id` int(11) NOT NULL AUTO_INCREMENT COMMENT '主键',
  `cat_id1` int(11) DEFAULT NULL COMMENT '分类id',
  `admin_id` int(11) NOT NULL COMMENT '商户id',
  `content` varchar(500) DEFAULT NULL COMMENT '商品描述',
  `seat_no` int(11) DEFAULT '500' COMMENT '排序 默认500',
  `title` varchar(255) NOT NULL COMMENT '名称',
  `pcate` int(11) NOT NULL COMMENT '分类id',
  `price` decimal(10,2) NOT NULL COMMENT '商品价格',
  `special_price` decimal(10,2) NOT NULL DEFAULT '-1.00' COMMENT '优惠价格    -1表示没有优惠价格',
  `total` int(11) DEFAULT NULL,
  `max_buy` int(11) NOT NULL DEFAULT '0' COMMENT '商品最大购买数',
  `img` varchar(255) DEFAULT NULL COMMENT '商品图片',
  `model` varchar(100) DEFAULT NULL COMMENT '商品编号',
  `false_sell` int(11) DEFAULT NULL COMMENT '虚拟销量',
  `in_price` decimal(11,2) NOT NULL COMMENT '进货价',
  `status` tinyint(1) DEFAULT NULL COMMENT '上下架',
  `unit_name` varchar(255) NOT NULL COMMENT '单位',
  `thumb` text NOT NULL COMMENT '缩略图',
  `carousel` text COMMENT '轮播图',
  `parameter` text COMMENT '参数',
  `des` text COMMENT '描述',
  `goods_number` varchar(255) NOT NULL COMMENT '商品编码',
  `goods_barcode` varchar(255) NOT NULL COMMENT '商品条形码',
  `intro` text COMMENT '详情长图',
  `fake_storage` int(10) unsigned DEFAULT '0' COMMENT '虚拟库存 优先显示，为0则显示 分库存+总仓库存',
  `fake_volume` int(10) unsigned DEFAULT '0' COMMENT '虚拟销量 显示 虚拟销量 + 实际销量 总和',
  `sales_volume` int(10) unsigned DEFAULT '0' COMMENT '实际销量 显示 虚拟销量 + 实际销量 总和',
  `home_show` tinyint(4) DEFAULT '1' COMMENT '是否首页推荐 1否 2是',
  `is_sale` tinyint(4) DEFAULT '1' COMMENT '是否上架 1.否 2.是',
  `is_daily` tinyint(4) DEFAULT '1' COMMENT '每日特价 1.否 2.是',
  `is_hot` tinyint(4) DEFAULT '1' COMMENT '热销商品  1.否 2.是',
  `is_new` tinyint(4) DEFAULT '1' COMMENT '新品上线  1.否 2.是',
  `buy_limit` int(11) NOT NULL COMMENT '限制购买件数',
  `village_expect` int(11) unsigned DEFAULT '1' COMMENT '分仓库预计送达时间（天）',
  `total_expect_enough` int(10) unsigned DEFAULT '2' COMMENT '总仓库库存充足预计送达时间',
  `sales` int(11) NOT NULL DEFAULT '0' COMMENT '销量',
  `browse_num` int(11) NOT NULL DEFAULT '0' COMMENT '流量次数',
  `total_expect_lack` int(10) unsigned DEFAULT '5' COMMENT '总仓库库存不足预计送达时间',
  `is_self` tinyint(4) DEFAULT '1' COMMENT '佣金比例独立 1.否 2.是',
  `village_percent` int(10) unsigned DEFAULT '0' COMMENT '村管理员佣金比例',
  `group_percent` int(10) unsigned DEFAULT '0' COMMENT '组管理员佣金比例',
  `is_material` tinyint(4) NOT NULL COMMENT '宴席材料 1.否 2.是',
  `return_able` tinyint(4) DEFAULT '1' COMMENT '可否退货 1.可以 -1.不可以',
  `audit_neet` tinyint(4) NOT NULL DEFAULT '-1' COMMENT '退货是否需要总后台审核 1.需要 -1.不需要',
  `everage_point` decimal(2,1) unsigned DEFAULT '5.0' COMMENT '评分',
  `comment_times` int(10) unsigned DEFAULT '0' COMMENT '评价次数',
  `deleted` tinyint(4) DEFAULT '-1' COMMENT '1.已删除  -1.正常',
  PRIMARY KEY (`id`),
  KEY `deleted` (`deleted`),
  KEY `INDEX` (`is_sale`) USING BTREE,
  KEY `pcate` (`pcate`),
  KEY `admin_id` (`admin_id`),
  KEY `status` (`status`),
  KEY `special_price` (`special_price`)
) ENGINE=MyISAM AUTO_INCREMENT=3509 DEFAULT CHARSET=utf8 COMMENT='商品';

-- ----------------------------
-- Records of am_goods
-- ----------------------------

-- ----------------------------
-- Table structure for am_goods_attr
-- ----------------------------
DROP TABLE IF EXISTS `am_goods_attr`;
CREATE TABLE `am_goods_attr` (
  `id` int(11) unsigned NOT NULL AUTO_INCREMENT,
  `goods_id` int(11) DEFAULT NULL,
  `cateattr_id` int(11) DEFAULT NULL,
  `attr_title` varchar(255) DEFAULT NULL,
  `attr_price` decimal(9,2) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=615 DEFAULT CHARSET=utf8;

-- ----------------------------
-- Records of am_goods_attr
-- ----------------------------

-- ----------------------------
-- Table structure for am_goods_car
-- ----------------------------
DROP TABLE IF EXISTS `am_goods_car`;
CREATE TABLE `am_goods_car` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `user_id` int(11) NOT NULL COMMENT '用户id',
  `goods_id` int(11) NOT NULL,
  `goods_num` int(11) NOT NULL COMMENT '商品数量',
  `create_time` int(11) NOT NULL COMMENT '添加时间',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='购物车';

-- ----------------------------
-- Records of am_goods_car
-- ----------------------------

-- ----------------------------
-- Table structure for am_goods_cat
-- ----------------------------
DROP TABLE IF EXISTS `am_goods_cat`;
CREATE TABLE `am_goods_cat` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `admin_id` int(11) NOT NULL COMMENT 'admin表id /  商户id',
  `pid` int(11) DEFAULT '0' COMMENT '上级id',
  `seat_no` int(11) unsigned NOT NULL COMMENT '排序',
  `title` varchar(255) COLLATE utf8_unicode_ci NOT NULL COMMENT '标题',
  `img` varchar(255) COLLATE utf8_unicode_ci NOT NULL COMMENT '图片url',
  `url` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL COMMENT '图片跳转地址',
  `link` varchar(255) COLLATE utf8_unicode_ci NOT NULL COMMENT '分类跳转地址',
  `status` int(11) NOT NULL COMMENT '启用状态',
  `home_show` int(11) NOT NULL COMMENT '是否首页展示 0否1是',
  `create_time` int(11) NOT NULL COMMENT '创建时间',
  PRIMARY KEY (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=500 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

-- ----------------------------
-- Records of am_goods_cat
-- ----------------------------

-- ----------------------------
-- Table structure for am_goods_cateattr
-- ----------------------------
DROP TABLE IF EXISTS `am_goods_cateattr`;
CREATE TABLE `am_goods_cateattr` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `admin_id` int(11) DEFAULT NULL,
  `cate_id` int(11) DEFAULT NULL COMMENT '分类id',
  `title` varchar(255) DEFAULT NULL COMMENT '分类属性标题',
  `sort` int(255) DEFAULT NULL COMMENT '排序',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=70 DEFAULT CHARSET=utf8;

-- ----------------------------
-- Records of am_goods_cateattr
-- ----------------------------

-- ----------------------------
-- Table structure for am_goods_categories
-- ----------------------------
DROP TABLE IF EXISTS `am_goods_categories`;
CREATE TABLE `am_goods_categories` (
  `id` int(11) NOT NULL AUTO_INCREMENT COMMENT '主键',
  `sort` int(11) DEFAULT '50' COMMENT '排序（默认50）',
  `name` varchar(255) NOT NULL COMMENT '分类名称',
  `img` text NOT NULL COMMENT '分类图片',
  PRIMARY KEY (`id`),
  UNIQUE KEY `name` (`name`)
) ENGINE=MyISAM AUTO_INCREMENT=24 DEFAULT CHARSET=utf8 COMMENT='商城商品分类';

-- ----------------------------
-- Records of am_goods_categories
-- ----------------------------

-- ----------------------------
-- Table structure for am_goods_comment
-- ----------------------------
DROP TABLE IF EXISTS `am_goods_comment`;
CREATE TABLE `am_goods_comment` (
  `id` int(11) NOT NULL AUTO_INCREMENT COMMENT '主键',
  `openid` varchar(255) NOT NULL COMMENT '小程序openid',
  `good_id` int(11) NOT NULL COMMENT '商品ID',
  `order_id` int(11) NOT NULL COMMENT '订单ID',
  `village_id` int(11) NOT NULL COMMENT '村ID',
  `img` text COMMENT '图片(序列化数组)',
  `content` text COMMENT '评论',
  `create_time` int(11) NOT NULL COMMENT '评价时间',
  PRIMARY KEY (`id`),
  KEY `good_id` (`good_id`),
  KEY `village_id` (`village_id`),
  FULLTEXT KEY `content` (`content`)
) ENGINE=MyISAM AUTO_INCREMENT=12 DEFAULT CHARSET=utf8 COMMENT='商城商品评价';

-- ----------------------------
-- Records of am_goods_comment
-- ----------------------------

-- ----------------------------
-- Table structure for am_goods_stock_urgent
-- ----------------------------
DROP TABLE IF EXISTS `am_goods_stock_urgent`;
CREATE TABLE `am_goods_stock_urgent` (
  `id` int(11) NOT NULL COMMENT 'id',
  `num` int(11) DEFAULT NULL COMMENT '少于次数目则在首页显示库存告急',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='商品库存告急设置';

-- ----------------------------
-- Records of am_goods_stock_urgent
-- ----------------------------
INSERT INTO `am_goods_stock_urgent` VALUES ('1', '10');

-- ----------------------------
-- Table structure for am_goods_storage
-- ----------------------------
DROP TABLE IF EXISTS `am_goods_storage`;
CREATE TABLE `am_goods_storage` (
  `id` int(11) NOT NULL AUTO_INCREMENT COMMENT '主键',
  `village_id` int(11) DEFAULT '0' COMMENT '村ID 如在总仓库记为0, 表明商品在哪个村的分仓库',
  `good_id` int(11) NOT NULL COMMENT '商品ID',
  `storage` int(11) DEFAULT '0' COMMENT '库存量 可以 < 0',
  PRIMARY KEY (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=5077 DEFAULT CHARSET=utf8 COMMENT='商品库存';

-- ----------------------------
-- Records of am_goods_storage
-- ----------------------------

-- ----------------------------
-- Table structure for am_goods_village_set
-- ----------------------------
DROP TABLE IF EXISTS `am_goods_village_set`;
CREATE TABLE `am_goods_village_set` (
  `id` int(11) NOT NULL AUTO_INCREMENT COMMENT '主键',
  `good_id` int(11) NOT NULL COMMENT '商品ID',
  `village_id` int(11) NOT NULL COMMENT '村ID',
  `price` decimal(10,2) DEFAULT NULL COMMENT '价格',
  `expect_time` int(11) DEFAULT NULL COMMENT '送达时间(天)',
  `is_daily` tinyint(4) NOT NULL DEFAULT '1' COMMENT '每日特价 1.否 2.是',
  `is_hot` tinyint(4) NOT NULL DEFAULT '1' COMMENT '热销商品 1.否 2.是',
  `is_new` tinyint(4) NOT NULL DEFAULT '1' COMMENT '新品上线 1.否 2.是',
  `buy_limit` int(11) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=100 DEFAULT CHARSET=utf8 COMMENT='商品的村独立价格';

-- ----------------------------
-- Records of am_goods_village_set
-- ----------------------------

-- ----------------------------
-- Table structure for am_group
-- ----------------------------
DROP TABLE IF EXISTS `am_group`;
CREATE TABLE `am_group` (
  `id` int(11) NOT NULL AUTO_INCREMENT COMMENT '主键',
  `groupname` varchar(64) COLLATE utf8_unicode_ci NOT NULL COMMENT '组名',
  `auth` text COLLATE utf8_unicode_ci COMMENT '权限 “,”拼接',
  `create_ip` varchar(64) COLLATE utf8_unicode_ci NOT NULL COMMENT '创建IP',
  `create_time` int(11) NOT NULL COMMENT '创建时间',
  `edit_ip` varchar(64) COLLATE utf8_unicode_ci DEFAULT NULL COMMENT '修改IP',
  `edit_time` int(11) DEFAULT NULL COMMENT '修改时间',
  PRIMARY KEY (`id`),
  UNIQUE KEY `groupname` (`groupname`)
) ENGINE=MyISAM AUTO_INCREMENT=18 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci COMMENT='分组';

-- ----------------------------
-- Records of am_group
-- ----------------------------
INSERT INTO `am_group` VALUES ('1', '超管组', 'index_node,index_index_node,menu_node,menu_add_node,menu_menu_list_node,menu_edit_node,menu_delete_node,order_node,order_order_list_node,order_detail_node,order_refund_node,order_sure_order_complete_node,order_CheckNewOrder_node,order_appointment_order_node,order_sure_complete_node,order_delete_node,order_commit_remark_node,order_sure_o_node,order_zhiorder_node,auth_node,auth_admin_list_node,auth_group_edit_node,auth_admin_add_node,auth_admin_edit_node,auth_admin_del_node,auth_password_reset_node,auth_group_list_node,auth_group_add_node,auth_group_del_node,auth_all_node_node,auth_gourp_op_node,business_node,business_index_node,business_add_node,business_edit_node,business_delete_node,business_wechat_config_node,users_node,users_userList_node,users_usersDel_node,goods_node,goods_goods_node,goods_goods_op_node,goods_goods_cat_node,goods_goods_cat_op_node,goods_special_goods_node,goods_add_special_goods_node,goods_edit_special_goods_node,goods_delete_special_goods_node,goods_good_type_node,goods_good_type_add_node,goods_good_type_edit_node,goods_good_type_del_node,goods_get_attr_node,int_node,int_chart_node,int_add_chart_node,int_edit_chart_node,int_delete_chart_node,int_exchange_node,int_detail_node,int_logistics_no_node,int_index_node,int_add_int_node,int_edit_node,int_delete_node,zixun_node,zixun_show_node,zixun_index_node,zixun_Comment_node,zixun_add_node,zixun_edit_node,zixun_delete_node,zixun_delete_comment_node,share_node,share_index_node,share_shared_node,game_node,game_bw_index_node,game_bw_delete_node,game_bw_add_goods_node,game_bw_edit_goods_node,game_bw_config_node,game_bw_winning_record_node,game_bw_logistics_no_node,game_bw_delete_record_node,game_sc_delete_record_node,game_sge_index_node,game_sge_delete_node,game_sge_add_goods_node,game_sge_edit_goods_node,game_sge_config_node,game_sge_winning_record_node,game_sge_logistics_no_node,game_sge_delete_record_node,game_sc_index_node,game_sc_delete_node,game_sc_add_goods_node,game_sc_edit_goods_node,game_sc_config_node,game_sc_winning_record_node,game_sc_logistics_no_node,sysset_node,sysset_edit_info_node,sysset_index_seats_node,sysset_layer_list_node,sysset_add_seat_node,sysset_add_layer_node,sysset_edit_layer_node,sysset_delete_node,sysset_index_seats_node,sysset_edit_seat_node,sysset_print_list_node,sysset_print_config_node,sysset_print_add_node,sysset_print_delete_node,sysset_print_edit_node,sysset_member_node,sysset_appointment_config_node,sysset_InvestmentInformation_node,sysset_IndexShowPicture_node,sysset_AddIndexShowPicture_node,sysset_DelIndexShowPicture_node,sysset_SignInPointSet_node,sysset_member_level_node,sysset_level_add_node,sysset_level_edit_node,sysset_level_del_node,sysset_reduction_node,sysset_reduction_add_node,sysset_reduction_edit_node,sysset_reduction_delete_node,chart_kaiguan_node,nav_kaiguan_node,goods_kaiguan_node,sysset_shengji_node,chart_node,chart_index_node,chart_delete_node,chart_edit_node,chart_add_node,manystore_node,manystore_AddSubsidiaryStore_node,manystore_SubsidiaryStore_node,manystore_AlterSubsidiaryStore_node,manystore_DelSubsidiaryStore_node,waiyu_node,waiyu_index_node,waiyu_add_node,waiyu_edit_node,waiyu_delete_node,waiyu_scope_node,waiyu_scope_add_node,waiyu_scope_edit_node,waiyu_scope_delete_node,waiyu_facutime_node,cards_node,cards_denomination_node,cards_add_node,cards_edit_node,cards_delete_node,cards_log_node,pre_node,pre_index_node,pre_add_node,pre_edit_node,pre_delete_node,pre_set_red_node,pre_preimg_node,pre_addpreimg_node,pre_editpreimg_node,pre_delpreimg_node,distribution_node,distribution_share_config_node,distribution_share_apply_node,distribution_pass_apply_node,distribution_share_apply_del_node,distribution_cash_apply_node,distribution_pass_cash_node,distribution_del_cash_apply_node,support_node,support_sales_subsidiary_node,support_sales_ranking_node,support_conversion_rate_node,support_member_consumption_rank_node,support_membership_growth_trend_node,support_order_statistics_node,support_sales_statistics_node,dada_node,dada_shopDetail_node,dada_BusinessDetail_node,dada_config_node,order_reAddOrder_node,order_addOrder_node,order_cancelReasons_node,order_formalCancel_node,order_complaintReason_node,order_complaintDada_node,exhibition_node,exhibition_exhi_add_node,exhibition_index_node,exhibition_edit_node,exhibition_delete_node,vedio_node,vedio_index_node,vedio_add_node,vedio_edit_node,vedio_del_node,consum_node,consum_index_node,consum_add_node,consum_edit_node,consum_del_node,nav_node,nav_index_node,nav_add_node,nav_edit_node,nav_del_node,cate_node,cate_index_node,cate_add_node,cate_edit_node,cate_del_node,notice_node,notice_index_node,notice_add_node,notice_edit_node,notice_del_node,footimg_node,footimg_show_node', '116.25.226.16', '1495262993', '127.0.0.1', '1536025358');
INSERT INTO `am_group` VALUES ('2', '商户组', 'index_node,index_index_node,order_node,order_order_list_node,order_detail_node,order_refund_node,order_sure_order_complete_node,order_CheckNewOrder_node,users_node,users_userList_node,users_usersDel_node,goods_node,goods_goods_node,goods_goods_op_node,goods_goods_cat_node,goods_goods_cat_op_node,sysset_node,sysset_edit_info_node,sysset_index_seats_node,sysset_layer_list_node,sysset_add_seat_node,sysset_add_layer_node,sysset_edit_layer_node,sysset_delete_node,sysset_index_seats_node,sysset_edit_seat_node', '175.11.9.172', '1498297576', '119.23.123.15', '1533369988');
INSERT INTO `am_group` VALUES ('3', '便利店组', 'index_node,index_index_node,order_node,order_order_list_node,order_detail_node,order_refund_node,order_sure_order_complete_node,order_CheckNewOrder_node,users_node,users_userList_node,users_usersDel_node,goods_node,goods_goods_node,goods_goods_op_node,goods_goods_cat_node,goods_goods_cat_op_node,sysset_node,sysset_edit_info_node,sysset_index_seats_node,sysset_layer_list_node,sysset_add_seat_node,sysset_add_layer_node,sysset_edit_layer_node,sysset_delete_node,sysset_index_seats_node,sysset_edit_seat_node', '116.25.226.16', '1498297576', '119.23.123.3', '1533370003');
INSERT INTO `am_group` VALUES ('9', '商户组+卡券', 'index_node,index_index_node,order_node,order_order_list_node,order_detail_node,order_refund_node,order_sure_order_complete_node,order_CheckNewOrder_node,users_node,users_userList_node,users_usersDel_node,goods_node,goods_goods_node,goods_goods_op_node,goods_goods_cat_node,goods_goods_cat_op_node,sysset_edit_info_node,sysset_index_seats_node,sysset_layer_list_node,sysset_add_seat_node,sysset_add_layer_node,sysset_edit_layer_node,sysset_delete_node,sysset_index_seats_node,sysset_edit_seat_node,chart_node,chart_index_node,chart_delete_node,chart_edit_node,chart_add_node,cards_node,cards_denomination_node,cards_add_node,cards_edit_node,cards_delete_node,cards_log_node,pre_node,pre_index_node,pre_add_node,pre_edit_node,pre_delete_node', '113.118.185.156', '1520493902', '119.23.123.23', '1533370054');
INSERT INTO `am_group` VALUES ('7', '商户组+预约', 'index_node,index_index_node,order_node,order_order_list_node,order_detail_node,order_refund_node,order_sure_order_complete_node,order_CheckNewOrder_node,users_node,users_userList_node,users_usersDel_node,goods_node,goods_goods_node,goods_goods_op_node,goods_goods_cat_node,goods_goods_cat_op_node,sysset_node,sysset_edit_info_node,sysset_index_seats_node,sysset_layer_list_node,sysset_add_seat_node,sysset_add_layer_node,sysset_edit_layer_node,sysset_delete_node,sysset_index_seats_node,sysset_edit_seat_node,chart_node,chart_index_node,chart_delete_node,chart_edit_node,chart_add_node,waiyu_node,waiyu_index_node,waiyu_add_node,waiyu_edit_node,waiyu_delete_node', '127.0.0.1', '1515064683', '119.23.123.28', '1533370019');
INSERT INTO `am_group` VALUES ('10', '商户组+分销', 'index_node,index_index_node,order_node,order_order_list_node,order_detail_node,order_refund_node,order_sure_order_complete_node,order_CheckNewOrder_node,order_appointment_order_node,order_sure_complete_node,order_delete_node,order_commit_remark_node,order_sure_o_node,users_node,users_userList_node,users_usersDel_node,goods_node,goods_goods_node,goods_goods_op_node,goods_goods_cat_node,goods_goods_cat_op_node,int_node,int_chart_node,int_add_chart_node,int_edit_chart_node,int_delete_chart_node,int_exchange_node,int_detail_node,int_logistics_no_node,int_index_node,int_add_int_node,int_edit_node,int_delete_node,share_node,share_index_node,share_shared_node,game_node,game_bw_index_node,game_bw_delete_node,game_bw_add_goods_node,game_bw_edit_goods_node,game_bw_config_node,game_bw_winning_record_node,game_bw_logistics_no_node,game_bw_delete_record_node,game_sc_delete_record_node,game_sge_index_node,game_sge_delete_node,game_sge_add_goods_node,game_sge_edit_goods_node,game_sge_config_node,game_sge_winning_record_node,game_sge_logistics_no_node,game_sge_delete_record_node,game_sc_index_node,game_sc_delete_node,game_sc_add_goods_node,game_sc_edit_goods_node,game_sc_config_node,game_sc_winning_record_node,game_sc_logistics_no_node,sysset_node,sysset_edit_info_node,sysset_index_seats_node,sysset_layer_list_node,sysset_add_seat_node,sysset_add_layer_node,sysset_edit_layer_node,sysset_delete_node,sysset_index_seats_node,sysset_edit_seat_node,sysset_member_node,sysset_InvestmentInformation_node,sysset_IndexShowPicture_node,sysset_AddIndexShowPicture_node,sysset_DelIndexShowPicture_node,sysset_SignInPointSet_node,sysset_member_level_node,sysset_level_add_node,sysset_level_edit_node,sysset_level_del_node,sysset_reduction_node,sysset_reduction_add_node,sysset_reduction_edit_node,sysset_reduction_delete_node,chart_node,chart_index_node,chart_delete_node,chart_edit_node,chart_add_node,cards_node,cards_denomination_node,cards_add_node,cards_edit_node,cards_delete_node,cards_log_node,pre_node,pre_index_node,pre_add_node,pre_edit_node,pre_delete_node,pre_set_red_node,distribution_node,distribution_share_config_node,distribution_share_apply_node,distribution_pass_apply_node,distribution_share_apply_del_node,distribution_cash_apply_node,distribution_pass_cash_node,distribution_del_cash_apply_node,support_node,support_sales_subsidiary_node,support_sales_ranking_node,support_conversion_rate_node', '113.118.184.117', '1520993709', '119.23.123.1', '1533370071');
INSERT INTO `am_group` VALUES ('8', '商户组+多门店', 'index_node,index_index_node,order_node,order_order_list_node,order_detail_node,order_refund_node,order_sure_order_complete_node,order_CheckNewOrder_node,users_node,users_userList_node,users_usersDel_node,goods_node,goods_goods_node,goods_goods_op_node,goods_goods_cat_node,goods_goods_cat_op_node,int_node,int_chart_node,int_add_chart_node,int_edit_chart_node,int_delete_chart_node,int_exchange_node,int_detail_node,int_logistics_no_node,int_index_node,int_add_int_node,int_edit_node,int_delete_node,zixun_node,zixun_show_node,zixun_index_node,zixun_Comment_node,zixun_add_node,zixun_edit_node,zixun_delete_node,zixun_delete_comment_node,share_node,share_index_node,share_shared_node,game_node,game_bw_index_node,game_bw_delete_node,game_bw_add_goods_node,game_bw_edit_goods_node,game_bw_config_node,game_bw_winning_record_node,game_bw_logistics_no_node,game_bw_delete_record_node,game_sc_delete_record_node,game_sge_index_node,game_sge_delete_node,game_sge_add_goods_node,game_sge_edit_goods_node,game_sge_config_node,game_sge_winning_record_node,game_sge_logistics_no_node,game_sge_delete_record_node,game_sc_index_node,game_sc_delete_node,game_sc_add_goods_node,game_sc_edit_goods_node,game_sc_config_node,game_sc_winning_record_node,game_sc_logistics_no_node,sysset_node,sysset_edit_info_node,sysset_index_seats_node,sysset_layer_list_node,sysset_add_seat_node,sysset_add_layer_node,sysset_edit_layer_node,sysset_delete_node,sysset_index_seats_node,sysset_edit_seat_node,sysset_member_node,sysset_InvestmentInformation_node,sysset_IndexShowPicture_node,sysset_AddIndexShowPicture_node,sysset_DelIndexShowPicture_node,sysset_SignInPointSet_node,chart_node,chart_index_node,chart_delete_node,chart_edit_node,chart_add_node,manystore_node,manystore_AddSubsidiaryStore_node,manystore_SubsidiaryStore_node,manystore_AlterSubsidiaryStore_node,manystore_DelSubsidiaryStore_node', '113.118.185.4', '1516171577', '119.23.123.28', '1533370040');
INSERT INTO `am_group` VALUES ('11', '商户组+达达配送', 'index_node,index_index_node,order_node,order_order_list_node,order_detail_node,order_refund_node,order_sure_order_complete_node,order_CheckNewOrder_node,users_node,users_userList_node,users_usersDel_node,goods_node,goods_goods_node,goods_goods_op_node,goods_goods_cat_node,goods_goods_cat_op_node,sysset_node,sysset_edit_info_node,sysset_index_seats_node,sysset_layer_list_node,sysset_add_seat_node,sysset_add_layer_node,sysset_edit_layer_node,sysset_delete_node,sysset_index_seats_node,sysset_edit_seat_node,dada_node,dada_shopDetail_node,dada_BusinessDetail_node,dada_config_node,order_reAddOrder_node,order_addOrder_node,order_cancelReasons_node,order_formalCancel_node,order_complaintReason_node,order_complaintDada_node', '127.0.0.1', '1522141501', '119.23.123.12', '1533370083');
INSERT INTO `am_group` VALUES ('12', '便利店组+优惠券', 'index_node,index_index_node,order_node,order_order_list_node,order_detail_node,order_refund_node,order_sure_order_complete_node,order_CheckNewOrder_node,users_node,users_userList_node,users_usersDel_node,goods_node,goods_goods_node,goods_goods_op_node,goods_goods_cat_node,goods_goods_cat_op_node,sysset_node,sysset_edit_info_node,sysset_index_seats_node,sysset_layer_list_node,sysset_add_seat_node,sysset_add_layer_node,sysset_edit_layer_node,sysset_delete_node,sysset_index_seats_node,sysset_edit_seat_node,pre_node,pre_index_node,pre_add_node,pre_edit_node,pre_delete_node,pre_set_red_node', '113.118.184.200', '1522227068', '119.23.123.19', '1533370098');
INSERT INTO `am_group` VALUES ('15', '商户组+优惠劵+达达配送', 'index_node,index_index_node,order_node,order_order_list_node,order_detail_node,order_refund_node,order_sure_order_complete_node,order_CheckNewOrder_node,goods_node,goods_goods_node,goods_goods_op_node,goods_goods_cat_node,goods_goods_cat_op_node,sysset_node,sysset_edit_info_node,sysset_index_seats_node,sysset_layer_list_node,sysset_add_seat_node,sysset_add_layer_node,sysset_edit_layer_node,sysset_delete_node,sysset_index_seats_node,sysset_edit_seat_node,pre_node,pre_index_node,pre_add_node,pre_edit_node,pre_delete_node,pre_set_red_node,dada_node,dada_shopDetail_node,dada_BusinessDetail_node,dada_config_node,order_reAddOrder_node,order_addOrder_node,order_cancelReasons_node,order_formalCancel_node,order_complaintReason_node,order_complaintDada_node', '119.23.123.25', '1529997680', '119.23.123.18', '1533370146');
INSERT INTO `am_group` VALUES ('17', '商户组+分销+规格', 'index_node,index_index_node,order_node,order_order_list_node,order_detail_node,order_refund_node,order_sure_order_complete_node,order_CheckNewOrder_node,order_appointment_order_node,order_sure_complete_node,order_delete_node,order_commit_remark_node,order_sure_o_node,users_node,users_userList_node,users_usersDel_node,goods_node,goods_goods_node,goods_goods_op_node,goods_goods_cat_node,goods_goods_cat_op_node,goods_good_type_node,goods_good_type_add_node,goods_good_type_edit_node,goods_good_type_del_node,goods_get_attr_node,int_node,int_chart_node,int_add_chart_node,int_edit_chart_node,int_delete_chart_node,int_exchange_node,int_detail_node,int_logistics_no_node,int_index_node,int_add_int_node,int_edit_node,int_delete_node,share_node,share_index_node,share_shared_node,game_node,game_bw_index_node,game_bw_delete_node,game_bw_add_goods_node,game_bw_edit_goods_node,game_bw_config_node,game_bw_winning_record_node,game_bw_logistics_no_node,game_bw_delete_record_node,game_sc_delete_record_node,game_sge_index_node,game_sge_delete_node,game_sge_add_goods_node,game_sge_edit_goods_node,game_sge_config_node,game_sge_winning_record_node,game_sge_logistics_no_node,game_sge_delete_record_node,game_sc_index_node,game_sc_delete_node,game_sc_add_goods_node,game_sc_edit_goods_node,game_sc_config_node,game_sc_winning_record_node,game_sc_logistics_no_node,sysset_node,sysset_edit_info_node,sysset_index_seats_node,sysset_layer_list_node,sysset_add_seat_node,sysset_add_layer_node,sysset_edit_layer_node,sysset_delete_node,sysset_index_seats_node,sysset_edit_seat_node,sysset_member_node,sysset_InvestmentInformation_node,sysset_IndexShowPicture_node,sysset_AddIndexShowPicture_node,sysset_DelIndexShowPicture_node,sysset_SignInPointSet_node,sysset_reduction_node,sysset_reduction_add_node,sysset_reduction_edit_node,sysset_reduction_delete_node,chart_node,chart_index_node,chart_delete_node,chart_edit_node,chart_add_node,cards_node,cards_denomination_node,cards_add_node,cards_edit_node,cards_delete_node,cards_log_node,pre_node,pre_index_node,pre_add_node,pre_edit_node,pre_delete_node,pre_set_red_node,distribution_node,distribution_share_config_node,distribution_share_apply_node,distribution_pass_apply_node,distribution_share_apply_del_node,distribution_cash_apply_node,distribution_pass_cash_node,distribution_del_cash_apply_node,support_node,support_sales_subsidiary_node,support_sales_ranking_node,support_conversion_rate_node', '119.23.123.25', '1533174097', '119.23.123.14', '1533370178');
INSERT INTO `am_group` VALUES ('13', '商户+分销+配送', 'index_node,index_index_node,order_node,order_order_list_node,order_detail_node,order_refund_node,order_sure_order_complete_node,order_CheckNewOrder_node,order_appointment_order_node,order_sure_complete_node,order_delete_node,order_commit_remark_node,order_sure_o_node,users_node,users_userList_node,users_usersDel_node,goods_node,goods_goods_node,goods_goods_op_node,goods_goods_cat_node,goods_goods_cat_op_node,goods_good_type_node,goods_good_type_add_node,goods_good_type_edit_node,goods_good_type_del_node,goods_get_attr_node,int_node,int_chart_node,int_add_chart_node,int_edit_chart_node,int_delete_chart_node,int_exchange_node,int_detail_node,int_logistics_no_node,int_index_node,int_add_int_node,int_edit_node,int_delete_node,zixun_node,zixun_show_node,zixun_index_node,zixun_Comment_node,zixun_add_node,zixun_edit_node,zixun_delete_node,zixun_delete_comment_node,share_node,share_index_node,share_shared_node,game_node,game_bw_index_node,game_bw_delete_node,game_bw_add_goods_node,game_bw_edit_goods_node,game_bw_config_node,game_bw_winning_record_node,game_bw_logistics_no_node,game_bw_delete_record_node,game_sc_delete_record_node,game_sge_index_node,game_sge_delete_node,game_sge_add_goods_node,game_sge_edit_goods_node,game_sge_config_node,game_sge_winning_record_node,game_sge_logistics_no_node,game_sge_delete_record_node,game_sc_index_node,game_sc_delete_node,game_sc_add_goods_node,game_sc_edit_goods_node,game_sc_config_node,game_sc_winning_record_node,game_sc_logistics_no_node,sysset_node,sysset_edit_info_node,sysset_index_seats_node,sysset_layer_list_node,sysset_add_seat_node,sysset_add_layer_node,sysset_edit_layer_node,sysset_delete_node,sysset_index_seats_node,sysset_edit_seat_node,sysset_member_node,sysset_InvestmentInformation_node,sysset_SignInPointSet_node,sysset_reduction_node,sysset_reduction_add_node,sysset_reduction_edit_node,sysset_reduction_delete_node,chart_kaiguan_node,nav_kaiguan_node,goods_kaiguan_node,sysset_shengji_node,chart_node,chart_index_node,chart_delete_node,chart_edit_node,chart_add_node,waiyu_node,waiyu_scope_node,waiyu_scope_add_node,waiyu_scope_edit_node,waiyu_scope_delete_node,cards_node,cards_denomination_node,cards_add_node,cards_edit_node,cards_delete_node,cards_log_node,pre_node,pre_index_node,pre_add_node,pre_edit_node,pre_delete_node,pre_set_red_node,distribution_node,distribution_share_config_node,distribution_share_apply_node,distribution_pass_apply_node,distribution_share_apply_del_node,distribution_cash_apply_node,distribution_pass_cash_node,distribution_del_cash_apply_node,exhibition_node,exhibition_exhi_add_node,exhibition_index_node,exhibition_edit_node,exhibition_delete_node,vedio_node,vedio_index_node,vedio_add_node,vedio_edit_node,vedio_del_node,consum_node,consum_index_node,consum_add_node,consum_edit_node,consum_del_node,nav_node,nav_index_node,nav_add_node,nav_edit_node,nav_del_node,cate_node,cate_index_node,cate_add_node,cate_edit_node,cate_del_node,notice_node,notice_index_node,notice_add_node,notice_edit_node,notice_del_node,footimg_node,footimg_show_node', '119.23.123.25', '1529056683', '119.23.123.19', '1533370118');
INSERT INTO `am_group` VALUES ('14', '商户组+优惠券', 'index_node,index_index_node,order_node,order_order_list_node,order_detail_node,order_refund_node,order_sure_order_complete_node,order_CheckNewOrder_node,users_node,users_userList_node,users_usersDel_node,goods_node,goods_goods_node,goods_goods_op_node,goods_goods_cat_node,goods_goods_cat_op_node,sysset_node,sysset_edit_info_node,sysset_index_seats_node,sysset_layer_list_node,sysset_add_seat_node,sysset_add_layer_node,sysset_edit_layer_node,sysset_delete_node,sysset_index_seats_node,sysset_edit_seat_node,pre_node,pre_index_node,pre_add_node,pre_edit_node,pre_delete_node,pre_set_red_node', '119.23.123.25', '1529057784', '119.23.123.18', '1533370131');
INSERT INTO `am_group` VALUES ('16', '商户组+分销+优惠买单', 'index_node,index_index_node,order_node,order_order_list_node,order_detail_node,order_refund_node,order_sure_order_complete_node,order_CheckNewOrder_node,order_appointment_order_node,order_sure_complete_node,order_delete_node,order_commit_remark_node,order_sure_o_node,order_zhiorder_node,users_node,users_userList_node,users_usersDel_node,goods_node,goods_goods_node,goods_goods_op_node,goods_goods_cat_node,goods_goods_cat_op_node,int_node,int_chart_node,int_add_chart_node,int_edit_chart_node,int_delete_chart_node,int_exchange_node,int_detail_node,int_logistics_no_node,int_index_node,int_add_int_node,int_edit_node,int_delete_node,share_node,share_index_node,share_shared_node,game_node,game_bw_index_node,game_bw_delete_node,game_bw_add_goods_node,game_bw_edit_goods_node,game_bw_config_node,game_bw_winning_record_node,game_bw_logistics_no_node,game_bw_delete_record_node,game_sc_delete_record_node,game_sge_index_node,game_sge_delete_node,game_sge_add_goods_node,game_sge_edit_goods_node,game_sge_config_node,game_sge_winning_record_node,game_sge_logistics_no_node,game_sge_delete_record_node,game_sc_index_node,game_sc_delete_node,game_sc_add_goods_node,game_sc_edit_goods_node,game_sc_config_node,game_sc_winning_record_node,game_sc_logistics_no_node,sysset_node,sysset_edit_info_node,sysset_index_seats_node,sysset_layer_list_node,sysset_add_seat_node,sysset_add_layer_node,sysset_edit_layer_node,sysset_delete_node,sysset_index_seats_node,sysset_edit_seat_node,sysset_member_node,sysset_InvestmentInformation_node,sysset_IndexShowPicture_node,sysset_AddIndexShowPicture_node,sysset_DelIndexShowPicture_node,sysset_SignInPointSet_node,sysset_member_level_node,sysset_level_add_node,sysset_level_edit_node,sysset_level_del_node,sysset_reduction_node,sysset_reduction_add_node,sysset_reduction_edit_node,sysset_reduction_delete_node,chart_node,chart_index_node,chart_delete_node,chart_edit_node,chart_add_node,cards_node,cards_denomination_node,cards_add_node,cards_edit_node,cards_delete_node,cards_log_node,pre_node,pre_index_node,pre_add_node,pre_edit_node,pre_delete_node,pre_set_red_node,distribution_node,distribution_share_config_node,distribution_share_apply_node,distribution_pass_apply_node,distribution_share_apply_del_node,distribution_cash_apply_node,distribution_pass_cash_node,distribution_del_cash_apply_node,support_node,support_sales_subsidiary_node,support_sales_ranking_node,support_conversion_rate_node', '119.23.123.25', '1530857363', '119.23.123.17', '1533370158');

-- ----------------------------
-- Table structure for am_group_copy
-- ----------------------------
DROP TABLE IF EXISTS `am_group_copy`;
CREATE TABLE `am_group_copy` (
  `id` int(11) NOT NULL AUTO_INCREMENT COMMENT '主键',
  `groupname` varchar(64) COLLATE utf8_unicode_ci NOT NULL COMMENT '组名',
  `auth` text COLLATE utf8_unicode_ci COMMENT '权限 “,”拼接',
  `create_ip` varchar(64) COLLATE utf8_unicode_ci NOT NULL COMMENT '创建IP',
  `create_time` int(11) NOT NULL COMMENT '创建时间',
  `edit_ip` varchar(64) COLLATE utf8_unicode_ci DEFAULT NULL COMMENT '修改IP',
  `edit_time` int(11) DEFAULT NULL COMMENT '修改时间',
  PRIMARY KEY (`id`),
  UNIQUE KEY `groupname` (`groupname`)
) ENGINE=MyISAM AUTO_INCREMENT=5 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci COMMENT='分组';

-- ----------------------------
-- Records of am_group_copy
-- ----------------------------
INSERT INTO `am_group_copy` VALUES ('1', '超管组', 'auth_menu,business_menu,users_menu,order_menu,goods_menu,sysset_menu', '116.25.226.16', '1495262993', '127.0.0.1', '1504963734');
INSERT INTO `am_group_copy` VALUES ('2', '商户组', 'users_menu,order_menu,goods_menu,sysset_menu', '175.11.9.172', '1498297576', '127.0.0.1', '1505702605');

-- ----------------------------
-- Table structure for am_index_show_picture
-- ----------------------------
DROP TABLE IF EXISTS `am_index_show_picture`;
CREATE TABLE `am_index_show_picture` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `admin_id` int(11) NOT NULL,
  `picture` varchar(255) NOT NULL,
  PRIMARY KEY (`id`),
  KEY `admin_id` (`admin_id`)
) ENGINE=InnoDB AUTO_INCREMENT=189 DEFAULT CHARSET=utf8;

-- ----------------------------
-- Records of am_index_show_picture
-- ----------------------------

-- ----------------------------
-- Table structure for am_int_chart
-- ----------------------------
DROP TABLE IF EXISTS `am_int_chart`;
CREATE TABLE `am_int_chart` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `admin_id` int(11) DEFAULT NULL,
  `img` varchar(100) DEFAULT NULL,
  `title` varchar(50) DEFAULT NULL,
  `status` tinyint(1) DEFAULT '1' COMMENT '状态 1启用 2禁用',
  `create_time` int(11) DEFAULT NULL,
  `update_time` int(11) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=44 DEFAULT CHARSET=utf8;

-- ----------------------------
-- Records of am_int_chart
-- ----------------------------

-- ----------------------------
-- Table structure for am_int_market
-- ----------------------------
DROP TABLE IF EXISTS `am_int_market`;
CREATE TABLE `am_int_market` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `admin_id` int(11) DEFAULT NULL,
  `sort` int(11) NOT NULL DEFAULT '0' COMMENT '排序',
  `img` varchar(250) DEFAULT NULL COMMENT '积分商品图片',
  `status` tinyint(1) DEFAULT NULL COMMENT '上下架 1上架 2下架',
  `name` varchar(100) DEFAULT NULL COMMENT '商品名称',
  `int` int(11) NOT NULL DEFAULT '0' COMMENT '积分',
  `sales_volume` int(11) NOT NULL DEFAULT '0' COMMENT '兑换量',
  `create_time` int(11) DEFAULT NULL COMMENT '添加时间',
  `update_time` int(11) DEFAULT NULL COMMENT '更新时间',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=85 DEFAULT CHARSET=utf8 COMMENT='积分商城';

-- ----------------------------
-- Records of am_int_market
-- ----------------------------

-- ----------------------------
-- Table structure for am_link
-- ----------------------------
DROP TABLE IF EXISTS `am_link`;
CREATE TABLE `am_link` (
  `id` int(11) unsigned NOT NULL AUTO_INCREMENT,
  `name` varchar(255) DEFAULT NULL,
  `phone` varchar(255) DEFAULT NULL,
  `user_id` int(11) DEFAULT NULL,
  `address_area` varchar(100) DEFAULT NULL COMMENT '省市区',
  `address_info` varchar(100) DEFAULT NULL COMMENT '具体地址',
  PRIMARY KEY (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=363 DEFAULT CHARSET=utf8;

-- ----------------------------
-- Records of am_link
-- ----------------------------

-- ----------------------------
-- Table structure for am_member_config
-- ----------------------------
DROP TABLE IF EXISTS `am_member_config`;
CREATE TABLE `am_member_config` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `admin_id` int(11) DEFAULT NULL,
  `discount` int(11) NOT NULL DEFAULT '8' COMMENT '会员折扣',
  `birth_discount` int(11) NOT NULL DEFAULT '5' COMMENT '生日折扣',
  `int_rate` varchar(50) NOT NULL DEFAULT '1:1' COMMENT '可获得积分比（金额：积分）',
  `create_time` int(11) DEFAULT NULL,
  `update_time` int(11) DEFAULT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `Unique` (`admin_id`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=53 DEFAULT CHARSET=utf8 COMMENT='购买可获得积分';

-- ----------------------------
-- Records of am_member_config
-- ----------------------------
INSERT INTO `am_member_config` VALUES ('52', '112', '8', '5', '1:1', '1536316093', null);

-- ----------------------------
-- Table structure for am_member_level
-- ----------------------------
DROP TABLE IF EXISTS `am_member_level`;
CREATE TABLE `am_member_level` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `admin_id` int(11) NOT NULL COMMENT '商户id',
  `level_name` varchar(50) NOT NULL COMMENT '等级名称',
  `money` decimal(10,2) NOT NULL COMMENT '累计购买金额',
  `create_time` int(11) NOT NULL COMMENT '添加时间',
  `update_time` int(11) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=26 DEFAULT CHARSET=utf8 COMMENT='会员等级设置';

-- ----------------------------
-- Records of am_member_level
-- ----------------------------

-- ----------------------------
-- Table structure for am_nav
-- ----------------------------
DROP TABLE IF EXISTS `am_nav`;
CREATE TABLE `am_nav` (
  `id` int(11) NOT NULL AUTO_INCREMENT COMMENT 'id',
  `admin_id` int(11) DEFAULT NULL COMMENT '商户id',
  `title` varchar(20) DEFAULT NULL COMMENT '标题',
  `status` tinyint(1) DEFAULT NULL COMMENT '状态',
  `sort` int(11) DEFAULT NULL COMMENT '排序',
  PRIMARY KEY (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=169 DEFAULT CHARSET=utf8;

-- ----------------------------
-- Records of am_nav
-- ----------------------------
INSERT INTO `am_nav` VALUES ('153', '112', 'Redemption Mall', '1', '0');
INSERT INTO `am_nav` VALUES ('154', '112', 'Member Card', '1', '0');
INSERT INTO `am_nav` VALUES ('155', '112', 'Get Voucher', '1', '0');
INSERT INTO `am_nav` VALUES ('156', '112', 'About Us', '1', '0');
INSERT INTO `am_nav` VALUES ('157', '112', 'Scan & Order', '1', '0');
INSERT INTO `am_nav` VALUES ('158', '112', 'Distributor', '2', '0');
INSERT INTO `am_nav` VALUES ('159', '112', 'Offer', '1', '0');
INSERT INTO `am_nav` VALUES ('160', '112', 'Reservation', '1', '0');
INSERT INTO `am_nav` VALUES ('161', '112', 'Order Center', '1', '0');
INSERT INTO `am_nav` VALUES ('162', '112', 'Distribution Center', '1', '0');
INSERT INTO `am_nav` VALUES ('163', '112', 'C2C', '1', '0');
INSERT INTO `am_nav` VALUES ('164', '112', 'Food Info\r', '1', '0');
INSERT INTO `am_nav` VALUES ('165', '112', 'Scratch & Win\r', '1', '0');
INSERT INTO `am_nav` VALUES ('166', '112', 'Spin Wheel\r', '1', '0');
INSERT INTO `am_nav` VALUES ('167', '112', 'Golden Egg', '1', '0');
INSERT INTO `am_nav` VALUES ('168', '112', 'Sign In', '1', '0');

-- ----------------------------
-- Table structure for am_nav_config
-- ----------------------------
DROP TABLE IF EXISTS `am_nav_config`;
CREATE TABLE `am_nav_config` (
  `id` int(11) NOT NULL AUTO_INCREMENT COMMENT 'id',
  `status` tinyint(1) DEFAULT NULL COMMENT '状态',
  `admin_id` int(11) DEFAULT NULL COMMENT '商户id',
  PRIMARY KEY (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=3 DEFAULT CHARSET=utf8;

-- ----------------------------
-- Records of am_nav_config
-- ----------------------------
INSERT INTO `am_nav_config` VALUES ('2', '1', '112');

-- ----------------------------
-- Table structure for am_node
-- ----------------------------
DROP TABLE IF EXISTS `am_node`;
CREATE TABLE `am_node` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `level` tinyint(1) NOT NULL DEFAULT '1' COMMENT '等级 1一级菜单（节点）   2二级菜单（节点）   3三级菜单（节点）',
  `pid` int(11) NOT NULL DEFAULT '0',
  `title` varchar(100) NOT NULL COMMENT '权限标题',
  `auth_name` varchar(100) NOT NULL COMMENT '权限名称',
  `url` varchar(100) NOT NULL COMMENT 'url',
  `status` tinyint(1) NOT NULL DEFAULT '2' COMMENT '状态 2隐藏   1显示',
  `remark` varchar(255) DEFAULT NULL COMMENT '备注',
  `create_time` int(11) DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `pid` (`pid`),
  KEY `status` (`status`)
) ENGINE=InnoDB AUTO_INCREMENT=241 DEFAULT CHARSET=utf8 COMMENT='菜单表';

-- ----------------------------
-- Records of am_node
-- ----------------------------
INSERT INTO `am_node` VALUES ('1', '1', '0', 'Index', 'index_node', '/Smi/Index', '1', '', '1514532133');
INSERT INTO `am_node` VALUES ('2', '1', '0', 'Menu', 'menu_node', '/Smi/Menu', '1', '管理员权限，包括子节点', '1514533409');
INSERT INTO `am_node` VALUES ('7', '2', '1', 'Index', 'index_index_node', '/Smi/Index/index', '1', '', '1514532618');
INSERT INTO `am_node` VALUES ('8', '1', '0', 'Order Management', 'order_node', '/Smi/Order', '1', '', '1514532954');
INSERT INTO `am_node` VALUES ('9', '1', '0', 'authority', 'auth_node', '/Smi/Auth', '1', '管理员权限，包括子节点', '1514532994');
INSERT INTO `am_node` VALUES ('10', '1', '0', 'merchant', 'business_node', '/Smi/Business', '1', '管理员权限，包括子节点', '1514533080');
INSERT INTO `am_node` VALUES ('11', '1', '0', 'Member', 'users_node', '/Smi/Users', '1', '', '1514533114');
INSERT INTO `am_node` VALUES ('12', '1', '0', 'Product Management', 'goods_node', '/Smi/Goods', '1', '', '1514533134');
INSERT INTO `am_node` VALUES ('13', '1', '0', 'Redeem Mall Management', 'int_node', '/Smi/Int', '1', '', '1514533154');
INSERT INTO `am_node` VALUES ('14', '1', '0', 'Food Info Managemen', 'zixun_node', '/Smi/Zixun', '1', '', '1514533190');
INSERT INTO `am_node` VALUES ('15', '1', '0', 'C2C Management', 'share_node', '/Smi/Share', '1', '', '1514533245');
INSERT INTO `am_node` VALUES ('16', '1', '0', 'Mini Game Management', 'game_node', '/Smi/Game', '1', '', '1514533272');
INSERT INTO `am_node` VALUES ('17', '1', '0', 'Setting', 'sysset_node', '/Smi/Sysset', '1', '', '1514533343');
INSERT INTO `am_node` VALUES ('19', '2', '2', 'Add menu', 'menu_add_node', '/Smi/Menu/add', '1', '', '1514533805');
INSERT INTO `am_node` VALUES ('20', '2', '2', 'Menu list', 'menu_menu_list_node', '/Smi/Menu/menu_list', '1', '', '1514533850');
INSERT INTO `am_node` VALUES ('21', '2', '8', 'Order List', 'order_order_list_node', '/Smi/Order/order_list', '1', '', '1514533921');
INSERT INTO `am_node` VALUES ('22', '2', '9', ' Administrator', 'auth_admin_list_node', '/Smi/Auth/admin_list', '1', '', '1514534012');
INSERT INTO `am_node` VALUES ('23', '2', '9', 'permission-group', 'auth_group_list_node', '/Smi/Auth/group_list', '1', '', '1514534075');
INSERT INTO `am_node` VALUES ('24', '2', '10', 'Merchant list', 'business_index_node', '/Smi/Business/index', '1', '', '1514534131');
INSERT INTO `am_node` VALUES ('25', '2', '11', 'Member List', 'users_userList_node', '/Smi/Users/userList', '1', '', '1514534177');
INSERT INTO `am_node` VALUES ('26', '2', '12', 'Product List', 'goods_goods_node', '/Smi/Goods/goods', '1', '', '1514534226');
INSERT INTO `am_node` VALUES ('27', '2', '12', 'Product Category', 'goods_goods_cat_node', '/Smi/Goods/goods_cat', '1', '', '1514534264');
INSERT INTO `am_node` VALUES ('28', '2', '13', 'Slideshow', 'int_chart_node', '/Smi/Int/chart', '1', '', '1514534794');
INSERT INTO `am_node` VALUES ('29', '2', '13', 'Redeem Mall Redeem Record', 'int_exchange_node', '/Smi/Int/exchange', '1', '', '1514534995');
INSERT INTO `am_node` VALUES ('30', '2', '13', 'Redeem Mall Product', 'int_index_node', '/Smi/Int/index', '1', '', '1514535052');
INSERT INTO `am_node` VALUES ('31', '2', '14', 'Food Info Cover Image', 'zixun_show_node', '/Smi/Zixun/show', '1', '', '1514535100');
INSERT INTO `am_node` VALUES ('32', '2', '14', 'Food Info List', 'zixun_index_node', '/Smi/Zixun/index', '1', '', '1514535143');
INSERT INTO `am_node` VALUES ('33', '2', '14', 'Comment List', 'zixun_Comment_node', '/Smi/Zixun/Comment', '1', '', '1514535266');
INSERT INTO `am_node` VALUES ('34', '2', '15', 'C2C Setting', 'share_index_node', '/Smi/Share/index', '1', '', '1514535336');
INSERT INTO `am_node` VALUES ('35', '2', '15', 'C2C Record', 'share_shared_node', '/Smi/Share/shared', '1', '', '1514535391');
INSERT INTO `am_node` VALUES ('36', '2', '16', 'Spin Wheel', 'game_bw_index_node', '/Smi/Game/bw_index', '1', '', '1514535498');
INSERT INTO `am_node` VALUES ('37', '2', '16', 'Golden Egg', 'game_sge_index_node', '/Smi/Game/sge_index', '1', '', '1514535526');
INSERT INTO `am_node` VALUES ('38', '2', '16', 'Scratch &amp; Win', 'game_sc_index_node', '/Smi/Game/sc_index', '1', '', '1514535561');
INSERT INTO `am_node` VALUES ('39', '2', '17', 'Personal Info Edit', 'sysset_edit_info_node', '/Smi/Sysset/edit_info', '1', '', '1514535627');
INSERT INTO `am_node` VALUES ('40', '2', '17', 'Table Management', 'sysset_index_seats_node', '/Smi/Sysset/index_seats', '1', '', '1514535672');
INSERT INTO `am_node` VALUES ('41', '2', '17', 'Printer', 'sysset_print_list_node', '/Smi/Sysset/print_list', '1', '管理员权限，包括子节点', '1514535726');
INSERT INTO `am_node` VALUES ('42', '2', '17', 'Purchase Point Given Setting', 'sysset_member_node', '/Smi/Sysset/member', '1', '', '1514535796');
INSERT INTO `am_node` VALUES ('43', '3', '20', '编辑节点', 'menu_edit_node', '/Smi/Menu/edit', '2', null, '1514815680');
INSERT INTO `am_node` VALUES ('44', '3', '20', '删除节点', 'menu_delete_node', '/Smi/Menu/delete', '2', null, '1514816158');
INSERT INTO `am_node` VALUES ('45', '3', '22', '编辑权限组', 'auth_group_edit_node', '/Smi/Auth/group_edit', '2', null, '1514818447');
INSERT INTO `am_node` VALUES ('46', '3', '21', '订单详情', 'order_detail_node', '/Smi/Order/detail', '2', null, '1514819176');
INSERT INTO `am_node` VALUES ('47', '3', '23', '添加权限组', 'auth_group_add_node', '/Smi/Auth/group_add', '2', null, '1514819446');
INSERT INTO `am_node` VALUES ('48', '3', '23', '删除权限组', 'auth_group_del_node', '/Smi/Auth/group_del', '2', null, '1514819568');
INSERT INTO `am_node` VALUES ('49', '3', '22', '入录管理员', 'auth_admin_add_node', '/Smi/Auth/admin_add', '2', null, '1514819658');
INSERT INTO `am_node` VALUES ('50', '3', '22', '编辑管理员', 'auth_admin_edit_node', '/Smi/Auth/admin_edit', '2', null, '1514819744');
INSERT INTO `am_node` VALUES ('51', '3', '22', '删除管理员', 'auth_admin_del_node', '/Smi/Auth/admin_del', '2', null, '1514819894');
INSERT INTO `am_node` VALUES ('52', '3', '22', '重置密码', 'auth_password_reset_node', '/Smi/Auth/password_reset', '2', null, '1514819931');
INSERT INTO `am_node` VALUES ('53', '3', '24', '新建商户', 'business_add_node', '/Smi/Business/add', '2', null, '1514820090');
INSERT INTO `am_node` VALUES ('54', '3', '24', '编辑商户', 'business_edit_node', '/Smi/Business/edit', '2', null, '1514820184');
INSERT INTO `am_node` VALUES ('55', '3', '24', '删除商户', 'business_delete_node', '/Smi/Business/delete', '2', null, '1514820227');
INSERT INTO `am_node` VALUES ('56', '3', '24', '微信配置', 'business_wechat_config_node', '/Smi/Business/wechat_config', '2', null, '1514820425');
INSERT INTO `am_node` VALUES ('57', '3', '25', '删除用户', 'users_usersDel_node', '/Smi/Users/usersDel', '2', null, '1514820512');
INSERT INTO `am_node` VALUES ('58', '3', '26', '商品操作', 'goods_goods_op_node', '/Smi/Goods/goods_op', '2', '添加|编辑|删除', '1514820697');
INSERT INTO `am_node` VALUES ('59', '3', '27', '商品分类操作', 'goods_goods_cat_op_node', '/Smi/Goods/goods_cat_op', '2', '添加|编辑|删除', '1514820839');
INSERT INTO `am_node` VALUES ('60', '3', '40', '楼层列表', 'sysset_layer_list_node', '/Smi/Sysset/layer_list', '2', null, '1514821102');
INSERT INTO `am_node` VALUES ('61', '3', '40', '添加桌位', 'sysset_add_seat_node', '/Smi/Sysset/add_seat', '2', null, '1514821145');
INSERT INTO `am_node` VALUES ('62', '3', '40', '添加楼层', 'sysset_add_layer_node', '/Smi/Sysset/add_layer', '2', null, '1514821303');
INSERT INTO `am_node` VALUES ('63', '3', '40', '编辑楼层', 'sysset_edit_layer_node', '/Smi/Sysset/edit_layer', '2', null, '1514821408');
INSERT INTO `am_node` VALUES ('64', '3', '40', '删除楼层|桌位', 'sysset_delete_node', '/Smi/Sysset/delete', '2', null, '1514821589');
INSERT INTO `am_node` VALUES ('65', '3', '40', '桌位列表', 'sysset_index_seats_node', '/Smi/Sysset/index_seats', '2', null, '1514821690');
INSERT INTO `am_node` VALUES ('66', '3', '40', '编辑桌位', 'sysset_edit_seat_node', '/Smi/Sysset/edit_seat', '2', null, '1514821737');
INSERT INTO `am_node` VALUES ('67', '2', '17', 'appointment set', 'sysset_appointment_config_node', '/Smi/Sysset/appointment_config', '1', '暂时不配置', '1514948303');
INSERT INTO `am_node` VALUES ('68', '2', '8', 'Reservation', 'order_appointment_order_node', '/Smi/Order/appointment_order', '1', '', '1514950456');
INSERT INTO `am_node` VALUES ('69', '3', '68', '确认预约订单已完成', 'order_sure_complete_node', '/Smi/Order/sure_complete', '2', '', '1515063999');
INSERT INTO `am_node` VALUES ('70', '3', '68', '删除预约订单', 'order_delete_node', '/Smi/Order/delete', '2', '', '1515064046');
INSERT INTO `am_node` VALUES ('71', '3', '68', '提交备注信息', 'order_commit_remark_node', '/Smi/Order/commit_remark', '2', '', '1515064092');
INSERT INTO `am_node` VALUES ('72', '1', '0', 'Slideshow Management', 'chart_node', '/Smi/Chart', '1', '', '1515742365');
INSERT INTO `am_node` VALUES ('73', '2', '72', 'Slideshow List', 'chart_index_node', '/Smi/Chart/index', '1', '', '1515742479');
INSERT INTO `am_node` VALUES ('74', '2', '72', 'Add Slide', 'chart_add_node', '/Smi/Chart/add', '1', '', '1515742627');
INSERT INTO `am_node` VALUES ('75', '3', '73', '删除轮播图', 'chart_delete_node', '/Smi/Chart/delete', '2', '', '1515743551');
INSERT INTO `am_node` VALUES ('76', '3', '73', '编辑轮播图', 'chart_edit_node', '/Smi/Chart/edit', '2', '', '1515743609');
INSERT INTO `am_node` VALUES ('77', '1', '0', 'child stores', 'manystore_node', '/Smi/ManyStore', '1', '仅限多门店小程序，包括子节点', '1516153772');
INSERT INTO `am_node` VALUES ('78', '2', '77', '添加门店', 'manystore_AddSubsidiaryStore_node', '/Smi/ManyStore/AddSubsidiaryStore', '2', '', '1516153825');
INSERT INTO `am_node` VALUES ('79', '2', '77', 'Sub-store list', 'manystore_SubsidiaryStore_node', '/Smi/ManyStore/SubsidiaryStore', '1', '', '1516154211');
INSERT INTO `am_node` VALUES ('80', '2', '77', '子门店编辑', 'manystore_AlterSubsidiaryStore_node', '/Smi/ManyStore/AlterSubsidiaryStore', '2', '', '1516154247');
INSERT INTO `am_node` VALUES ('81', '2', '77', '子门店删除', 'manystore_DelSubsidiaryStore_node', '/Smi/ManyStore/DelSubsidiaryStore', '2', '', '1516154270');
INSERT INTO `am_node` VALUES ('82', '3', '68', '确认订单', 'order_sure_o_node', '/Smi/Order/sure_o', '2', '', '1516253840');
INSERT INTO `am_node` VALUES ('83', '2', '14', '添加资讯', 'zixun_add_node', '/Smi/Zixun/add', '2', '', '1516428343');
INSERT INTO `am_node` VALUES ('84', '2', '14', '编辑资讯', 'zixun_edit_node', '/Smi/Zixun/edit', '2', '', '1516428381');
INSERT INTO `am_node` VALUES ('85', '2', '14', '删除资讯', 'zixun_delete_node', '/Smi/Zixun/delete', '2', '', '1516428464');
INSERT INTO `am_node` VALUES ('86', '2', '14', '删除评论', 'zixun_delete_comment_node', '/Smi/Zixun/delete_comment', '2', '', '1516431067');
INSERT INTO `am_node` VALUES ('87', '2', '17', 'Collaboration Info', 'sysset_InvestmentInformation_node', '/Smi/Sysset/InvestmentInformation', '1', '', '1516432574');
INSERT INTO `am_node` VALUES ('88', '1', '0', 'Delivery Management', 'waiyu_node', '/Smi/Waiyu', '1', '仅外卖预约，包括子节点', '1516596448');
INSERT INTO `am_node` VALUES ('89', '2', '88', 'Send the meal time ', 'waiyu_index_node', '/Smi/Waiyu/index', '1', '', '1516596511');
INSERT INTO `am_node` VALUES ('90', '3', '89', '添加', 'waiyu_add_node', '/Smi/Waiyu/add', '2', '', '1516600032');
INSERT INTO `am_node` VALUES ('91', '3', '89', '编辑', 'waiyu_edit_node', '/Smi/Waiyu/edit', '2', '', '1516600060');
INSERT INTO `am_node` VALUES ('92', '3', '89', '删除', 'waiyu_delete_node', '/Smi/Waiyu/delete', '2', '', '1516600983');
INSERT INTO `am_node` VALUES ('93', '2', '17', 'Home page', 'sysset_IndexShowPicture_node', '/Smi/Sysset/IndexShowPicture', '1', '', '1516603776');
INSERT INTO `am_node` VALUES ('94', '3', '93', '添加图片', 'sysset_AddIndexShowPicture_node', '/Smi/Sysset/AddIndexShowPicture', '2', '', '1516603831');
INSERT INTO `am_node` VALUES ('95', '3', '93', '删除图片', 'sysset_DelIndexShowPicture_node', '/Smi/Sysset/DelIndexShowPicture', '2', '', '1516603882');
INSERT INTO `am_node` VALUES ('96', '3', '41', '打印机配置', 'sysset_print_config_node', '/Smi/Sysset/print_config', '2', '', '1517208151');
INSERT INTO `am_node` VALUES ('97', '3', '41', '添加打印机', 'sysset_print_add_node', '/Smi/Sysset/print_add', '2', '', '1517208269');
INSERT INTO `am_node` VALUES ('98', '3', '41', '删除打印机', 'sysset_print_delete_node', '/Smi/Sysset/print_delete', '2', '', '1517217653');
INSERT INTO `am_node` VALUES ('99', '3', '41', '编辑打印机', 'sysset_print_edit_node', '/Smi/Sysset/print_edit', '2', '', '1517217738');
INSERT INTO `am_node` VALUES ('100', '2', '17', 'Check-in Point Setting', 'sysset_SignInPointSet_node', '/Smi/Sysset/SignInPointSet', '1', '', '1517902959');
INSERT INTO `am_node` VALUES ('101', '3', '30', '添加积分商品', 'int_add_int_node', '/Smi/Int/add_int', '2', '', '1517908332');
INSERT INTO `am_node` VALUES ('102', '3', '30', '编辑积分商品', 'int_edit_node', '/Smi/Int/edit', '2', '', '1517908392');
INSERT INTO `am_node` VALUES ('103', '3', '30', '删除积分商品', 'int_delete_node', '/Smi/Int/delete', '2', '', '1517908878');
INSERT INTO `am_node` VALUES ('104', '3', '29', '兑换详情', 'int_detail_node', '/Smi/Int/detail', '2', '', '1517908923');
INSERT INTO `am_node` VALUES ('105', '3', '29', '入录物流单号', 'int_logistics_no_node', '/Smi/Int/logistics_no', '2', '', '1517908968');
INSERT INTO `am_node` VALUES ('106', '3', '28', '添加轮播图', 'int_add_chart_node', '/Smi/Int/add_chart', '2', '', '1517909027');
INSERT INTO `am_node` VALUES ('107', '3', '28', '编辑轮播图', 'int_edit_chart_node', '/Smi/Int/edit_chart', '2', '', '1517909068');
INSERT INTO `am_node` VALUES ('108', '3', '28', '删除轮播图', 'int_delete_chart_node', '/Smi/Int/delete_chart', '2', '', '1517909179');
INSERT INTO `am_node` VALUES ('109', '3', '36', '删除奖品', 'game_bw_delete_node', '/Smi/Game/bw_delete', '2', '', '1517915274');
INSERT INTO `am_node` VALUES ('110', '3', '36', '添加奖品', 'game_bw_add_goods_node', '/Smi/Game/bw_add_goods', '2', '', '1517915326');
INSERT INTO `am_node` VALUES ('111', '3', '36', '编辑商品', 'game_bw_edit_goods_node', '/Smi/Game/bw_edit_goods', '2', '', '1517915382');
INSERT INTO `am_node` VALUES ('112', '3', '36', '大转盘配置', 'game_bw_config_node', '/Smi/Game/bw_config', '2', '', '1517915423');
INSERT INTO `am_node` VALUES ('113', '3', '36', '中奖纪录', 'game_bw_winning_record_node', '/Smi/Game/bw_winning_record', '2', '', '1517915468');
INSERT INTO `am_node` VALUES ('114', '3', '36', '入录物流单号', 'game_bw_logistics_no_node', '/Smi/Game/bw_logistics_no', '2', '', '1517915509');
INSERT INTO `am_node` VALUES ('115', '3', '36', '删除中奖纪录', 'game_bw_delete_record_node', '/Smi/Game/bw_delete_record', '2', '', '1517915540');
INSERT INTO `am_node` VALUES ('116', '3', '38', '删除奖品', 'game_sc_delete_node', '/Smi/Game/sc_delete', '2', '', '1517916061');
INSERT INTO `am_node` VALUES ('117', '3', '38', '添加奖品', 'game_sc_add_goods_node', '/Smi/Game/sc_add_goods', '2', '', '1517916133');
INSERT INTO `am_node` VALUES ('118', '3', '38', '编辑奖品', 'game_sc_edit_goods_node', '/Smi/Game/sc_edit_goods', '2', '', '1517916165');
INSERT INTO `am_node` VALUES ('119', '3', '38', '配置', 'game_sc_config_node', '/Smi/Game/sc_config', '2', '', '1517916192');
INSERT INTO `am_node` VALUES ('120', '3', '38', '中奖纪录', 'game_sc_winning_record_node', '/Smi/Game/sc_winning_record', '2', '', '1517916220');
INSERT INTO `am_node` VALUES ('121', '3', '38', '入录物流单号', 'game_sc_logistics_no_node', '/Smi/Game/sc_logistics_no', '2', '', '1517916451');
INSERT INTO `am_node` VALUES ('122', '3', '36', '删除获奖记录', 'game_sc_delete_record_node', '/Smi/Game/sc_delete_record', '2', '', '1517916496');
INSERT INTO `am_node` VALUES ('123', '3', '37', '删除商品', 'game_sge_delete_node', '/Smi/Game/sge_delete', '2', '', '1517916532');
INSERT INTO `am_node` VALUES ('124', '3', '37', '添加商品', 'game_sge_add_goods_node', '/Smi/Game/sge_add_goods', '2', '', '1517916558');
INSERT INTO `am_node` VALUES ('125', '3', '37', '编辑商品', 'game_sge_edit_goods_node', '/Smi/Game/sge_edit_goods', '2', '', '1517916595');
INSERT INTO `am_node` VALUES ('126', '3', '37', '配置', 'game_sge_config_node', '/Smi/Game/sge_config', '2', '', '1517916624');
INSERT INTO `am_node` VALUES ('127', '3', '37', '中奖记录', 'game_sge_winning_record_node', '/Smi/Game/sge_winning_record', '2', '', '1517916648');
INSERT INTO `am_node` VALUES ('128', '3', '37', '入录物流单号', 'game_sge_logistics_no_node', '/Smi/Game/sge_logistics_no', '2', '', '1517916686');
INSERT INTO `am_node` VALUES ('129', '3', '37', '删除获奖记录', 'game_sge_delete_record_node', '/Smi/Game/sge_delete_record', '2', '', '1517916717');
INSERT INTO `am_node` VALUES ('130', '2', '17', 'Membership grade', 'sysset_member_level_node', '/Smi/Sysset/member_level', '1', '', '1518071226');
INSERT INTO `am_node` VALUES ('131', '3', '130', '添加会员等级', 'sysset_level_add_node', '/Smi/Sysset/level_add', '2', '', '1518072279');
INSERT INTO `am_node` VALUES ('132', '3', '130', '编辑会员等级', 'sysset_level_edit_node', '/Smi/Sysset/level_edit', '2', '', '1518072315');
INSERT INTO `am_node` VALUES ('133', '3', '130', '删除会员', 'sysset_level_del_node', '/Smi/Sysset/level_del', '2', '', '1518077146');
INSERT INTO `am_node` VALUES ('134', '1', '0', 'Prepaid Card Management', 'cards_node', '/Smi/Cards', '1', '会员卡', '1518090883');
INSERT INTO `am_node` VALUES ('135', '2', '134', 'Top-up Management', 'cards_denomination_node', '/Smi/Cards/denomination', '1', '', '1518090952');
INSERT INTO `am_node` VALUES ('136', '3', '135', '添加面额', 'cards_add_node', '/Smi/Cards/add', '2', '', '1518090987');
INSERT INTO `am_node` VALUES ('137', '3', '135', '编辑面额', 'cards_edit_node', '/Smi/Cards/edit', '2', '', '1518091023');
INSERT INTO `am_node` VALUES ('138', '3', '135', '删除面额', 'cards_delete_node', '/Smi/Cards/delete', '2', '', '1518091048');
INSERT INTO `am_node` VALUES ('139', '2', '134', 'Top-up Records', 'cards_log_node', '/Smi/Cards/log', '1', '', '1518143580');
INSERT INTO `am_node` VALUES ('140', '1', '0', 'E-Voucher Management', 'pre_node', '/Smi/Pre', '1', '', '1519353843');
INSERT INTO `am_node` VALUES ('141', '2', '140', 'E-Voucher List', 'pre_index_node', '/Smi/Pre/index', '1', '', '1519353918');
INSERT INTO `am_node` VALUES ('142', '3', '141', '添加优惠券', 'pre_add_node', '/Smi/Pre/add', '2', '', '1519356180');
INSERT INTO `am_node` VALUES ('143', '3', '141', '编辑优惠券', 'pre_edit_node', '/Smi/Pre/edit', '2', '', '1519356213');
INSERT INTO `am_node` VALUES ('144', '3', '141', '删除优惠券', 'pre_delete_node', '/Smi/Pre/delete', '2', '', '1519356353');
INSERT INTO `am_node` VALUES ('145', '3', '23', '获取权限节点', 'auth_all_node_node', '/Smi/Auth/all_node', '2', '', '1519801969');
INSERT INTO `am_node` VALUES ('146', '3', '23', '权限操作', 'auth_gourp_op_node', '/Smi/Auth/gourp_op', '2', '', '1520495471');
INSERT INTO `am_node` VALUES ('147', '3', '21', '订单退款', 'order_refund_node', '/Smi/Order/refund', '2', '', '1520650803');
INSERT INTO `am_node` VALUES ('148', '3', '21', '确认订单完成', 'order_sure_order_complete_node', '/Smi/Order/sure_order_complete', '2', '', '1520669704');
INSERT INTO `am_node` VALUES ('149', '1', '0', 'Distributor Management', 'distribution_node', '/Smi/Distribution', '1', '', '1520922868');
INSERT INTO `am_node` VALUES ('150', '2', '149', 'Distribution Setting', 'distribution_share_config_node', '/Smi/Distribution/share_config', '1', '', '1520994255');
INSERT INTO `am_node` VALUES ('151', '2', '149', 'Distributor Apply List', 'distribution_share_apply_node', '/Smi/Distribution/share_apply', '1', '', '1520994845');
INSERT INTO `am_node` VALUES ('152', '2', '149', 'Withdrawal List', 'distribution_cash_apply_node', '/Smi/Distribution/cash_apply', '1', '', '1520995336');
INSERT INTO `am_node` VALUES ('153', '2', '17', 'Discount Activity Setting', 'sysset_reduction_node', '/Smi/Sysset/reduction', '1', '', '1521019212');
INSERT INTO `am_node` VALUES ('154', '3', '153', '添加满减活动', 'sysset_reduction_add_node', '/Smi/Sysset/reduction_add', '2', '', '1521022273');
INSERT INTO `am_node` VALUES ('155', '3', '153', '编辑满减活动', 'sysset_reduction_edit_node', '/Smi/Sysset/reduction_edit', '2', '', '1521022308');
INSERT INTO `am_node` VALUES ('156', '3', '153', '删除满减活动', 'sysset_reduction_delete_node', '/Smi/Sysset/reduction_delete', '2', '', '1521022742');
INSERT INTO `am_node` VALUES ('157', '3', '141', '设置为红包', 'pre_set_red_node', '/Smi/Pre/set_red', '2', '', '1521104798');
INSERT INTO `am_node` VALUES ('158', '2', '12', 'bargain goods', 'goods_special_goods_node', '/Smi/Goods/special_goods', '1', '秒杀的替代功能', '1521172078');
INSERT INTO `am_node` VALUES ('159', '3', '158', '添加特价商品', 'goods_add_special_goods_node', '/Smi/Goods/add_special_goods', '2', '', '1521185215');
INSERT INTO `am_node` VALUES ('160', '3', '158', '编辑特价商品', 'goods_edit_special_goods_node', '/Smi/Goods/edit_special_goods', '2', '', '1521185267');
INSERT INTO `am_node` VALUES ('161', '3', '158', '删除特价商品', 'goods_delete_special_goods_node', '/Smi/Goods/delete_special_goods', '2', '', '1521185298');
INSERT INTO `am_node` VALUES ('162', '1', '0', 'Decision support', 'support_node', '/Smi/Support', '1', '', '1521427172');
INSERT INTO `am_node` VALUES ('163', '2', '162', 'Sales details', 'support_sales_subsidiary_node', '/Smi/Support/sales_subsidiary', '1', '', '1521427331');
INSERT INTO `am_node` VALUES ('164', '2', '162', 'Sales ranking', 'support_sales_ranking_node', '/Smi/Support/sales_ranking', '1', '', '1521427419');
INSERT INTO `am_node` VALUES ('165', '2', '162', 'Sales conversion', 'support_conversion_rate_node', '/Smi/Support/conversion_rate', '1', '', '1521427553');
INSERT INTO `am_node` VALUES ('166', '2', '162', 'Membership spending', 'support_member_consumption_rank_node', '/Smi/Support/member_consumption_rank', '1', '', '1521427651');
INSERT INTO `am_node` VALUES ('167', '2', '162', 'Membership growth trend', 'support_membership_growth_trend_node', '/Smi/Support/membership_growth_trend', '1', '', '1521428199');
INSERT INTO `am_node` VALUES ('168', '2', '162', 'Order statistics', 'support_order_statistics_node', '/Smi/Support/order_statistics', '1', '', '1521428248');
INSERT INTO `am_node` VALUES ('169', '2', '162', 'Sales statistics', 'support_sales_statistics_node', '/Smi/Support/sales_statistics', '1', '', '1521428283');
INSERT INTO `am_node` VALUES ('170', '3', '151', '分销员审核通过', 'distribution_pass_apply_node', '/Smi/Distribution/pass_apply', '2', '', '1522056686');
INSERT INTO `am_node` VALUES ('171', '3', '151', '分销员删除', 'distribution_share_apply_del_node', '/Smi/Distribution/share_apply_del', '2', '', '1522056975');
INSERT INTO `am_node` VALUES ('172', '1', '0', 'Dada logistics', 'dada_node', '/Smi/Dada', '1', '', '1522126707');
INSERT INTO `am_node` VALUES ('174', '2', '172', 'Add/update/view stores', 'dada_shopDetail_node', '/Smi/Dada/shopDetail', '1', '', '1522126751');
INSERT INTO `am_node` VALUES ('178', '2', '172', 'Merchant details', 'dada_BusinessDetail_node', '/Smi/Dada/BusinessDetail', '1', '多门店子账号没有权限', '1522204159');
INSERT INTO `am_node` VALUES ('179', '2', '172', 'Add configuration parameters', 'dada_config_node', '/Smi/Dada/config', '2', '多门店-子门店没有该权限', '1522206598');
INSERT INTO `am_node` VALUES ('180', '2', '172', '订单重发', 'order_reAddOrder_node', '/Smi/Order/reAddOrder', '2', '', '1522229162');
INSERT INTO `am_node` VALUES ('181', '2', '172', '发单失败、重发', 'order_addOrder_node', '/Smi/Order/addOrder', '2', '', '1522321468');
INSERT INTO `am_node` VALUES ('182', '2', '172', '获取取消原因列表', 'order_cancelReasons_node', '/Smi/Order/cancelReasons', '2', '', '1522335191');
INSERT INTO `am_node` VALUES ('184', '2', '172', '取消配送订单', 'order_formalCancel_node', '/Smi/Order/formalCancel', '2', '', '1522375820');
INSERT INTO `am_node` VALUES ('185', '2', '172', '获取商家投诉原因', 'order_complaintReason_node', '/Smi/Order/complaintReason', '2', '', '1522384952');
INSERT INTO `am_node` VALUES ('186', '2', '172', '商家投诉达达', 'order_complaintDada_node', '/Smi/Order/complaintDada', '2', '', '1522385332');
INSERT INTO `am_node` VALUES ('187', '3', '152', '佣金提现审核', 'distribution_pass_cash_node', '/Smi/Distribution/pass_cash', '2', '', '1523606928');
INSERT INTO `am_node` VALUES ('188', '3', '152', '分销申请删除', 'distribution_del_cash_apply_node', '/Smi/Distribution/del_cash_apply', '2', '', '1523606958');
INSERT INTO `am_node` VALUES ('189', '1', '0', 'Showcase Image Management', 'exhibition_node', '/Smi/Exhibition', '1', '', '1528352811');
INSERT INTO `am_node` VALUES ('190', '2', '189', 'Add Image', 'exhibition_exhi_add_node', '/Smi/Exhibition/exhi_add', '1', '', '1528353062');
INSERT INTO `am_node` VALUES ('191', '2', '189', 'Showcase List', 'exhibition_index_node', '/Smi/Exhibition/index', '1', '', '1528353132');
INSERT INTO `am_node` VALUES ('192', '2', '189', '编辑展示图', 'exhibition_edit_node', '/Smi/Exhibition/edit', '2', '', '1528353332');
INSERT INTO `am_node` VALUES ('193', '2', '189', '删除展示图', 'exhibition_delete_node', '/Smi/Exhibition/delete', '2', '', '1528353393');
INSERT INTO `am_node` VALUES ('194', '2', '12', 'Product Specification', 'goods_good_type_node', '/Smi/Goods/good_type', '1', '', '1528696765');
INSERT INTO `am_node` VALUES ('195', '3', '194', '添加规格', 'goods_good_type_add_node', '/Smi/Goods/good_type_add', '1', '', '1528696802');
INSERT INTO `am_node` VALUES ('196', '3', '194', '编辑规格', 'goods_good_type_edit_node', '/Smi/Goods/good_type_edit', '1', '', '1528696841');
INSERT INTO `am_node` VALUES ('197', '3', '194', '删除规格', 'goods_good_type_del_node', '/Smi/Goods/good_type_del', '2', '', '1528696881');
INSERT INTO `am_node` VALUES ('198', '3', '194', '获取规格', 'goods_get_attr_node', '/Smi/Goods/get_attr', '2', '', '1528696912');
INSERT INTO `am_node` VALUES ('199', '2', '88', 'Delivery Area', 'waiyu_scope_node', '/Smi/Waiyu/scope', '1', '', '1528791889');
INSERT INTO `am_node` VALUES ('200', '3', '199', '添加配送范围', 'waiyu_scope_add_node', '/Smi/Waiyu/scope_add', '1', '', '1528791938');
INSERT INTO `am_node` VALUES ('201', '3', '199', '编辑范围', 'waiyu_scope_edit_node', '/Smi/Waiyu/scope_edit', '2', '', '1528791971');
INSERT INTO `am_node` VALUES ('202', '3', '199', '删除范围', 'waiyu_scope_delete_node', '/Smi/Waiyu/scope_delete', '2', '', '1528791999');
INSERT INTO `am_node` VALUES ('203', '2', '140', 'home page', 'pre_preimg_node', '/Smi/Pre/preimg', '1', '', '1530265861');
INSERT INTO `am_node` VALUES ('204', '3', '203', '添加图片', 'pre_addpreimg_node', '/Smi/Pre/addpreimg', '1', '', '1530265896');
INSERT INTO `am_node` VALUES ('205', '3', '203', '编辑图片', 'pre_editpreimg_node', '/Smi/Pre/editpreimg', '1', '', '1530265927');
INSERT INTO `am_node` VALUES ('206', '3', '203', '删除图片', 'pre_delpreimg_node', '/Smi/Pre/delpreimg', '1', '', '1530265962');
INSERT INTO `am_node` VALUES ('207', '1', '0', 'Video Management', 'vedio_node', '/Smi/vedio', '1', '', '1530266472');
INSERT INTO `am_node` VALUES ('208', '2', '207', 'Video List', 'vedio_index_node', '/Smi/vedio/index', '1', '', '1530266518');
INSERT INTO `am_node` VALUES ('209', '3', '208', '上传视频', 'vedio_add_node', '/Smi/vedio/add', '1', '', '1530266557');
INSERT INTO `am_node` VALUES ('210', '3', '208', '编辑视频', 'vedio_edit_node', '/Smi/vedio/edit', '1', '', '1530266589');
INSERT INTO `am_node` VALUES ('211', '3', '208', '删除视频', 'vedio_del_node', '/Smi/vedio/del', '1', '', '1530266621');
INSERT INTO `am_node` VALUES ('212', '1', '0', 'Purchase Mode', 'consum_node', '/Smi/consum', '1', '', '1530267048');
INSERT INTO `am_node` VALUES ('213', '2', '212', 'List of Purchase Mode', 'consum_index_node', '/Smi/consum/index', '1', '', '1530267087');
INSERT INTO `am_node` VALUES ('214', '3', '213', '添加消费模式', 'consum_add_node', '/Smi/consum/add', '1', '', '1530267128');
INSERT INTO `am_node` VALUES ('215', '3', '213', '编辑消费模式', 'consum_edit_node', '/Smi/consum/edit', '1', '', '1530267160');
INSERT INTO `am_node` VALUES ('216', '3', '213', '删除消费模式', 'consum_del_node', '/Smi/consum/del', '1', '', '1530267188');
INSERT INTO `am_node` VALUES ('217', '1', '0', 'Main Menu Management', 'nav_node', '/Smi/nav', '1', '', '1530267486');
INSERT INTO `am_node` VALUES ('218', '2', '217', 'Main Menu List', 'nav_index_node', '/Smi/nav/index', '1', '', '1530267523');
INSERT INTO `am_node` VALUES ('219', '3', '218', '添加导航', 'nav_add_node', '/Smi/nav/add', '1', '', '1530267558');
INSERT INTO `am_node` VALUES ('220', '3', '218', '编辑导航', 'nav_edit_node', '/Smi/nav/edit', '1', '', '1530267581');
INSERT INTO `am_node` VALUES ('221', '3', '218', '删除导航', 'nav_del_node', '/Smi/nav/del', '1', '', '1530267615');
INSERT INTO `am_node` VALUES ('222', '2', '17', 'Slideshow Setting', 'chart_kaiguan_node', '/Smi/Chart/kaiguan', '1', '', '1530268647');
INSERT INTO `am_node` VALUES ('223', '2', '17', 'Main Menu Setting', 'nav_kaiguan_node', '/Smi/nav/kaiguan', '1', '', '1530268694');
INSERT INTO `am_node` VALUES ('224', '2', '17', 'Category Menu Setting', 'goods_kaiguan_node', '/Smi/goods/kaiguan', '1', '', '1530268742');
INSERT INTO `am_node` VALUES ('225', '2', '17', 'Version Upgrade', 'sysset_shengji_node', '/Smi/sysset/shengji', '1', '', '1530501583');
INSERT INTO `am_node` VALUES ('226', '1', '0', 'Category Management', 'cate_node', '/Smi/Cate', '1', '', '1530668821');
INSERT INTO `am_node` VALUES ('227', '2', '226', 'Classification List', 'cate_index_node', '/Smi/Cate/index', '1', '', '1530668851');
INSERT INTO `am_node` VALUES ('228', '3', '227', '添加分类', 'cate_add_node', '/Smi/Cate/add', '1', '', '1530668884');
INSERT INTO `am_node` VALUES ('229', '3', '227', '编辑分类', 'cate_edit_node', '/Smi/Cate/edit', '1', '', '1530668922');
INSERT INTO `am_node` VALUES ('230', '3', '227', '删除分类', 'cate_del_node', '/Smi/Cate/del', '1', '', '1530668950');
INSERT INTO `am_node` VALUES ('231', '2', '8', 'Discounts order', 'order_zhiorder_node', '/Smi/order/zhiorder', '1', '', '1530848973');
INSERT INTO `am_node` VALUES ('232', '1', '0', 'Announcement Management', 'notice_node', '/Smi/Notice', '1', '', '1531361738');
INSERT INTO `am_node` VALUES ('233', '2', '232', 'Announcement List', 'notice_index_node', '/Smi/Notice/index', '1', '', '1531361770');
INSERT INTO `am_node` VALUES ('234', '3', '233', '新增公告', 'notice_add_node', '/Smi/Notice/add', '1', '', '1531361804');
INSERT INTO `am_node` VALUES ('235', '3', '233', '编辑公告', 'notice_edit_node', '/Smi/Notice/edit', '1', '', '1531361839');
INSERT INTO `am_node` VALUES ('236', '3', '233', '删除公告', 'notice_del_node', '/Smi/Notice/del', '1', '', '1531361921');
INSERT INTO `am_node` VALUES ('237', '1', '0', 'Bottom Image Management', 'footimg_node', '/Smi/Footimg', '1', '', '1531363486');
INSERT INTO `am_node` VALUES ('238', '2', '237', 'Edit Bottom Image', 'footimg_show_node', '/Smi/Footimg/show', '1', '', '1531363529');
INSERT INTO `am_node` VALUES ('239', '2', '88', 'Time range of service', 'waiyu_facutime_node', '/Smi/Waiyu/facutime', '1', '', '1532674509');
INSERT INTO `am_node` VALUES ('240', '3', '21', '检查是否有新订单', 'order_CheckNewOrder_node', '/Smi/Order/CheckNewOrder', '2', '', '1533369966');

-- ----------------------------
-- Table structure for am_notice
-- ----------------------------
DROP TABLE IF EXISTS `am_notice`;
CREATE TABLE `am_notice` (
  `id` int(11) NOT NULL AUTO_INCREMENT COMMENT 'id',
  `admin_id` int(11) DEFAULT NULL COMMENT '商家id',
  `title` varchar(255) DEFAULT NULL COMMENT '标题',
  `content` text COMMENT '内容',
  `status` tinyint(1) DEFAULT '1' COMMENT '状态',
  `create_time` int(11) DEFAULT NULL COMMENT '创建时间',
  PRIMARY KEY (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=13 DEFAULT CHARSET=utf8;

-- ----------------------------
-- Records of am_notice
-- ----------------------------

-- ----------------------------
-- Table structure for am_order
-- ----------------------------
DROP TABLE IF EXISTS `am_order`;
CREATE TABLE `am_order` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `uid` int(11) NOT NULL,
  `admin_id` varchar(50) COLLATE utf8_unicode_ci DEFAULT NULL COMMENT '经销商id',
  `admin_title` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL COMMENT '商家店名(订单名称)',
  `order_sn` varchar(255) COLLATE utf8_unicode_ci NOT NULL COMMENT '订单号',
  `pay_type` tinyint(1) NOT NULL DEFAULT '1' COMMENT '支付类型  1微信支付（默认）  2余额支付',
  `result` varchar(400) COLLATE utf8_unicode_ci DEFAULT NULL,
  `car_id` varchar(255) COLLATE utf8_unicode_ci NOT NULL COMMENT ' 购物车/ 订单商品id',
  `delivery` decimal(5,2) DEFAULT '0.00' COMMENT '配送费',
  `meals_num` int(11) NOT NULL DEFAULT '1' COMMENT '用餐人数',
  `boxes` decimal(5,2) DEFAULT '0.00' COMMENT '餐盒费',
  `price` decimal(10,2) DEFAULT NULL COMMENT '实际支付价格',
  `total_price` decimal(10,2) DEFAULT NULL COMMENT '订单总价格',
  `pre_money` decimal(10,2) NOT NULL DEFAULT '0.00' COMMENT '优惠券优惠金额',
  `seat` varchar(5) COLLATE utf8_unicode_ci DEFAULT NULL COMMENT '桌位',
  `out_refund_no` varchar(32) COLLATE utf8_unicode_ci DEFAULT NULL COMMENT '退款编号',
  `transaction_id` varchar(20) COLLATE utf8_unicode_ci DEFAULT NULL COMMENT '微信订单内部编号',
  `status` int(11) NOT NULL COMMENT '1待付   2已下单 3已完成  4已退款  5已取消',
  `order_type` int(2) DEFAULT NULL COMMENT '订单类型 1外卖   2店内扫码',
  `user_pre_id` int(11) DEFAULT NULL COMMENT '用户优惠券id',
  `mark` varchar(500) COLLATE utf8_unicode_ci DEFAULT NULL COMMENT '订单备注',
  `create_time` int(11) NOT NULL COMMENT '下单时间',
  `pay_time` int(11) DEFAULT NULL COMMENT '支付时间',
  `fachu_time` int(11) DEFAULT NULL COMMENT '发货时间',
  `address_name` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL COMMENT '收货人',
  `address_phone` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL COMMENT '收货电话',
  `address_area` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL COMMENT '收货区域',
  `int` int(11) NOT NULL DEFAULT '0' COMMENT '获得积分',
  `address_info` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL COMMENT '收货详细地址',
  `deliveryNo` varchar(30) COLLATE utf8_unicode_ci DEFAULT NULL COMMENT '达达平台唯一编号',
  `is_del` tinyint(2) DEFAULT '0' COMMENT '用户端显示状态（0显示1不显示）',
  `kexiao_sn` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL COMMENT '核销码',
  `qucan_time` int(11) DEFAULT NULL COMMENT '取餐时间',
  `pop_status` tinyint(1) DEFAULT '0' COMMENT '弹出状态',
  PRIMARY KEY (`id`),
  UNIQUE KEY `order_sn` (`order_sn`),
  KEY `uid` (`uid`),
  KEY `admin_id` (`admin_id`),
  KEY `pay_type` (`pay_type`),
  KEY `car_id` (`car_id`),
  KEY `order_type` (`order_type`),
  KEY `status` (`status`)
) ENGINE=MyISAM AUTO_INCREMENT=2502 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

-- ----------------------------
-- Records of am_order
-- ----------------------------

-- ----------------------------
-- Table structure for am_order_city
-- ----------------------------
DROP TABLE IF EXISTS `am_order_city`;
CREATE TABLE `am_order_city` (
  `id` int(11) NOT NULL AUTO_INCREMENT COMMENT '主键',
  `openid` varchar(255) NOT NULL COMMENT '小程序openid',
  `store_id` int(11) NOT NULL COMMENT '商家ID',
  `order_sn` varchar(255) NOT NULL COMMENT '订单编号 "SN商家ID年月日时分秒"',
  `total_fee` decimal(10,2) NOT NULL COMMENT '总价',
  `dispatch_fee` decimal(10,2) DEFAULT '0.00' COMMENT '配送费',
  `name` varchar(255) NOT NULL COMMENT '收货人',
  `mobile` varchar(255) NOT NULL COMMENT '联系方式',
  `address` text NOT NULL COMMENT '收货地址',
  `form_id` varchar(255) NOT NULL COMMENT '小程序表单ID',
  `status` tinyint(4) DEFAULT '1' COMMENT '状态 1.待确认 2.待送货 3.已完成 -1.订单取消 -2.拒绝接单',
  `reason` text COMMENT '取消原因 商家取消时应存为“商家取消”',
  `expect_time` int(11) NOT NULL COMMENT '预计到达时间',
  `create_time` int(11) NOT NULL COMMENT '下单时间',
  `finish_time` int(11) DEFAULT NULL COMMENT '完成时间',
  `is_aman` tinyint(4) DEFAULT NULL COMMENT '是否自营订单1自营-1非自营',
  PRIMARY KEY (`id`),
  UNIQUE KEY `order_sn` (`order_sn`),
  KEY `openid` (`openid`),
  KEY `status` (`status`)
) ENGINE=MyISAM AUTO_INCREMENT=213 DEFAULT CHARSET=utf8 COMMENT='城市订单';

-- ----------------------------
-- Records of am_order_city
-- ----------------------------

-- ----------------------------
-- Table structure for am_order_city_good
-- ----------------------------
DROP TABLE IF EXISTS `am_order_city_good`;
CREATE TABLE `am_order_city_good` (
  `id` int(11) NOT NULL AUTO_INCREMENT COMMENT '主键',
  `order_id` int(11) NOT NULL COMMENT '订单ID',
  `good_id` int(11) NOT NULL COMMENT '商品ID',
  `num` int(10) unsigned NOT NULL COMMENT '商品数量',
  PRIMARY KEY (`id`),
  KEY `order_id` (`order_id`)
) ENGINE=MyISAM AUTO_INCREMENT=450 DEFAULT CHARSET=utf8 COMMENT='城市订单商品副表';

-- ----------------------------
-- Records of am_order_city_good
-- ----------------------------

-- ----------------------------
-- Table structure for am_order_comment
-- ----------------------------
DROP TABLE IF EXISTS `am_order_comment`;
CREATE TABLE `am_order_comment` (
  `id` int(11) NOT NULL AUTO_INCREMENT COMMENT '主键',
  `order_id` int(11) NOT NULL COMMENT '订单ID',
  `openid` varchar(255) NOT NULL COMMENT '小程序openid',
  `opinion` text COMMENT '评价',
  `img` text COMMENT '图片(序列化数组)',
  `create_time` int(11) NOT NULL COMMENT '评价时间',
  PRIMARY KEY (`id`),
  KEY `order_id` (`order_id`)
) ENGINE=MyISAM AUTO_INCREMENT=11 DEFAULT CHARSET=utf8 COMMENT='农村订单评价';

-- ----------------------------
-- Records of am_order_comment
-- ----------------------------

-- ----------------------------
-- Table structure for am_order_good
-- ----------------------------
DROP TABLE IF EXISTS `am_order_good`;
CREATE TABLE `am_order_good` (
  `id` int(11) NOT NULL AUTO_INCREMENT COMMENT '主键',
  `openid` varchar(255) NOT NULL COMMENT '小程序openid',
  `order_id` int(11) NOT NULL COMMENT '订单ID',
  `smi_id` int(11) NOT NULL COMMENT '分表ID',
  `good_id` int(11) NOT NULL COMMENT '商品ID',
  `num` int(11) unsigned NOT NULL COMMENT '商品数量',
  `unit_price` decimal(10,2) NOT NULL COMMENT '当时单价',
  `kind_price` decimal(10,2) NOT NULL COMMENT '本商品总价 用于退款',
  `expect_time` int(11) NOT NULL COMMENT '预计送达时间 日期时间戳',
  `reason` text COMMENT '村管理员/总后台拒绝退换货理由',
  `back_reason` text COMMENT '退换原因',
  `form_id_back` varchar(255) DEFAULT NULL,
  `out_refund_no` varchar(255) DEFAULT NULL COMMENT '退款单号 "订单编号_记录ID"',
  `refund_type` tinyint(4) DEFAULT '0' COMMENT '0.正常 1.换货 2.退货',
  `refund_status` tinyint(4) DEFAULT '1' COMMENT '1.不退换 2.待退换 3.村审核通过 4.总后台审核通过 5.组管理员已收 6.村管理员已收 7.退款中 8.完成 -1.拒绝退换',
  `refund_time` int(11) DEFAULT NULL COMMENT '申请退换时间',
  `refund_village_get_time` int(11) NOT NULL COMMENT '村长收货时间',
  PRIMARY KEY (`id`),
  UNIQUE KEY `out_refund_no` (`out_refund_no`),
  KEY `INDEX` (`openid`,`order_id`,`smi_id`,`refund_status`)
) ENGINE=MyISAM AUTO_INCREMENT=741 DEFAULT CHARSET=utf8 COMMENT='农村订单商品副表';

-- ----------------------------
-- Records of am_order_good
-- ----------------------------

-- ----------------------------
-- Table structure for am_order_smi
-- ----------------------------
DROP TABLE IF EXISTS `am_order_smi`;
CREATE TABLE `am_order_smi` (
  `id` int(11) NOT NULL AUTO_INCREMENT COMMENT '主键',
  `order_id` int(11) NOT NULL COMMENT '订单ID',
  `storage_status` tinyint(4) NOT NULL COMMENT '库存状态 1.充足 2.当日不足',
  `smi_sn` varchar(255) NOT NULL COMMENT '分订单编号 总仓库订单:"订单编号_库存状态", 分仓库订单:订单编号',
  `deliveryman` int(11) DEFAULT NULL COMMENT '仓库送货员ID',
  `dispatcher` varchar(255) DEFAULT NULL COMMENT '组配送员openid',
  `dpc_id` int(11) NOT NULL COMMENT '配送员id',
  `status` tinyint(4) DEFAULT '1' COMMENT '状态 1.未付款 2.待发货 3.待收货 4.已送达 5.已完成',
  `send_time` int(11) DEFAULT NULL COMMENT '发货时间',
  `get_time` int(11) DEFAULT NULL COMMENT '收货时间',
  `finish_time` int(11) DEFAULT NULL COMMENT '完成时间',
  PRIMARY KEY (`id`),
  UNIQUE KEY `smi_sn` (`smi_sn`),
  KEY `order_id` (`order_id`)
) ENGINE=MyISAM AUTO_INCREMENT=501 DEFAULT CHARSET=utf8 COMMENT='分订单';

-- ----------------------------
-- Records of am_order_smi
-- ----------------------------

-- ----------------------------
-- Table structure for am_order_supply
-- ----------------------------
DROP TABLE IF EXISTS `am_order_supply`;
CREATE TABLE `am_order_supply` (
  `id` int(11) NOT NULL AUTO_INCREMENT COMMENT '主键',
  `order_id` int(11) DEFAULT '0' COMMENT '订单ID',
  `good_id` int(11) NOT NULL COMMENT '商品ID',
  `supply_sn` varchar(255) NOT NULL COMMENT '补货单号 BHxxx',
  `num` int(11) NOT NULL COMMENT '商品数量',
  `village_id` int(11) NOT NULL COMMENT '需要送到的村的ID',
  `deliveryman` int(11) NOT NULL COMMENT '仓库送货员ID',
  `status` tinyint(4) DEFAULT '1' COMMENT '1.待发货 2.待收货 3.已收货',
  `arrive_time` int(11) DEFAULT NULL COMMENT '送达时间',
  `send_time` int(11) DEFAULT NULL COMMENT '发货时间',
  `create_time` int(11) NOT NULL COMMENT '记录时间',
  PRIMARY KEY (`id`),
  UNIQUE KEY `supply_sn` (`supply_sn`),
  KEY `INDEX` (`village_id`,`status`)
) ENGINE=MyISAM AUTO_INCREMENT=43 DEFAULT CHARSET=utf8 COMMENT='补货订单';

-- ----------------------------
-- Records of am_order_supply
-- ----------------------------

-- ----------------------------
-- Table structure for am_pre
-- ----------------------------
DROP TABLE IF EXISTS `am_pre`;
CREATE TABLE `am_pre` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `admin_id` int(11) NOT NULL COMMENT '商户id',
  `pre_money` decimal(10,2) NOT NULL COMMENT '优惠金额',
  `full_money` decimal(10,2) NOT NULL COMMENT '满多少金额优惠',
  `nums` int(11) NOT NULL COMMENT '优惠券总数量',
  `re_nums` int(11) NOT NULL DEFAULT '0' COMMENT '已被领取优惠券数量',
  `num` int(11) NOT NULL DEFAULT '1' COMMENT '每人可领取优惠券数量',
  `validity_day` int(11) NOT NULL COMMENT '有效期',
  `is_red` tinyint(1) NOT NULL DEFAULT '0' COMMENT '是否红包  0不是   1是',
  `create_time` int(11) NOT NULL COMMENT '添加时间',
  `update_time` int(11) DEFAULT NULL COMMENT '更新时间',
  PRIMARY KEY (`id`),
  KEY `admin_id` (`admin_id`),
  KEY `is_red` (`is_red`)
) ENGINE=InnoDB AUTO_INCREMENT=39 DEFAULT CHARSET=utf8;

-- ----------------------------
-- Records of am_pre
-- ----------------------------

-- ----------------------------
-- Table structure for am_preimg
-- ----------------------------
DROP TABLE IF EXISTS `am_preimg`;
CREATE TABLE `am_preimg` (
  `id` int(11) NOT NULL AUTO_INCREMENT COMMENT 'id',
  `img` varchar(255) DEFAULT NULL COMMENT '图片',
  `status` tinyint(1) DEFAULT NULL COMMENT '状态',
  `admin_id` int(11) DEFAULT NULL COMMENT '商户id',
  `create_time` int(11) DEFAULT NULL COMMENT '添加时间',
  PRIMARY KEY (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=3 DEFAULT CHARSET=utf8;

-- ----------------------------
-- Records of am_preimg
-- ----------------------------

-- ----------------------------
-- Table structure for am_print
-- ----------------------------
DROP TABLE IF EXISTS `am_print`;
CREATE TABLE `am_print` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `print_name` varchar(50) NOT NULL COMMENT '设备名称',
  `uuid` varchar(32) NOT NULL COMMENT '打印机设备唯一编号',
  `admin_id` int(11) NOT NULL DEFAULT '1' COMMENT 'admin表id， 商户id',
  `open_user_id` int(11) DEFAULT NULL COMMENT '对对机平台用户唯一编号',
  `create_time` int(11) NOT NULL COMMENT '添加时间',
  `update_time` int(11) DEFAULT NULL COMMENT '更新时间',
  PRIMARY KEY (`id`),
  KEY `uuid` (`uuid`),
  KEY `admin_id` (`admin_id`),
  KEY `open_user_id` (`open_user_id`)
) ENGINE=InnoDB AUTO_INCREMENT=35 DEFAULT CHARSET=utf8mb4;

-- ----------------------------
-- Records of am_print
-- ----------------------------

-- ----------------------------
-- Table structure for am_print_config
-- ----------------------------
DROP TABLE IF EXISTS `am_print_config`;
CREATE TABLE `am_print_config` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `app_key` varchar(32) NOT NULL,
  `app_secret` varchar(32) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8mb4;

-- ----------------------------
-- Records of am_print_config
-- ----------------------------
INSERT INTO `am_print_config` VALUES ('2', '75c15ec83b92', '49bc85ef53fbe4670209');

-- ----------------------------
-- Table structure for am_purchase
-- ----------------------------
DROP TABLE IF EXISTS `am_purchase`;
CREATE TABLE `am_purchase` (
  `id` int(11) NOT NULL AUTO_INCREMENT COMMENT '主键',
  `openid` varchar(255) NOT NULL COMMENT '小程序openid',
  `village_id` int(11) NOT NULL COMMENT '村ID',
  `good_id` int(11) DEFAULT '0' COMMENT '商品ID 出售其他商品填 0',
  `else` varchar(255) DEFAULT NULL COMMENT '其他商品的名称',
  `img_1` text COMMENT '图片1',
  `img_2` text COMMENT '图片2',
  `img_3` varchar(255) NOT NULL COMMENT '图片3',
  `name` varchar(255) NOT NULL COMMENT '姓名',
  `tel` varchar(255) NOT NULL COMMENT '电话',
  `num` varchar(255) NOT NULL COMMENT '出售数量',
  `address` text NOT NULL COMMENT '家庭住址',
  `status` tinyint(4) DEFAULT '1' COMMENT '申请状态 1.待审核 2.待采购 3.已完成 -1.采购取消',
  `reason` text COMMENT '取消原因',
  `create_time` varchar(30) NOT NULL COMMENT '申请时间',
  PRIMARY KEY (`id`),
  KEY `openid` (`openid`),
  KEY `status` (`status`)
) ENGINE=MyISAM AUTO_INCREMENT=276 DEFAULT CHARSET=utf8 COMMENT='农产品收购申请';

-- ----------------------------
-- Records of am_purchase
-- ----------------------------

-- ----------------------------
-- Table structure for am_purchase_goods
-- ----------------------------
DROP TABLE IF EXISTS `am_purchase_goods`;
CREATE TABLE `am_purchase_goods` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `purchase_type` tinyint(1) NOT NULL COMMENT '收购方式 0 统一收购 1 某村收购',
  `village_id` varchar(100) DEFAULT NULL COMMENT '村ID',
  `goods_name` varchar(100) NOT NULL COMMENT '商品名称',
  `pic_goods` varchar(300) NOT NULL COMMENT '商品轮播图',
  `create_time` int(11) NOT NULL COMMENT '创建时间',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=78 DEFAULT CHARSET=utf8 COMMENT='添加商品收购表';

-- ----------------------------
-- Records of am_purchase_goods
-- ----------------------------

-- ----------------------------
-- Table structure for am_reduction
-- ----------------------------
DROP TABLE IF EXISTS `am_reduction`;
CREATE TABLE `am_reduction` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `admin_id` int(11) NOT NULL COMMENT '商户id',
  `full_money` decimal(10,2) NOT NULL COMMENT '满多少金额',
  `reduction_money` decimal(10,2) NOT NULL COMMENT '减多少金额',
  PRIMARY KEY (`id`),
  KEY `admin_id` (`admin_id`)
) ENGINE=InnoDB AUTO_INCREMENT=37 DEFAULT CHARSET=utf8 COMMENT='满减表';

-- ----------------------------
-- Records of am_reduction
-- ----------------------------

-- ----------------------------
-- Table structure for am_refund
-- ----------------------------
DROP TABLE IF EXISTS `am_refund`;
CREATE TABLE `am_refund` (
  `id` int(11) NOT NULL AUTO_INCREMENT COMMENT '主键',
  `order_good_id` int(11) NOT NULL COMMENT '副表ID',
  `status` tinyint(4) DEFAULT '1' COMMENT '状态 1.未退款 2.已退款',
  `create_time` int(11) NOT NULL COMMENT '申请时间',
  `refund_time` int(11) DEFAULT NULL COMMENT '退款时间',
  PRIMARY KEY (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=10 DEFAULT CHARSET=utf8 COMMENT='退货记录 (企业付款用) (已弃用)';

-- ----------------------------
-- Records of am_refund
-- ----------------------------

-- ----------------------------
-- Table structure for am_region_city
-- ----------------------------
DROP TABLE IF EXISTS `am_region_city`;
CREATE TABLE `am_region_city` (
  `id` int(11) NOT NULL AUTO_INCREMENT COMMENT '主键',
  `sort` int(11) DEFAULT '50' COMMENT '排序 默认50',
  `province_id` int(11) NOT NULL COMMENT '省ID',
  `name` varchar(255) NOT NULL COMMENT '名称',
  PRIMARY KEY (`id`),
  KEY `province_id` (`province_id`)
) ENGINE=MyISAM AUTO_INCREMENT=38 DEFAULT CHARSET=utf8 COMMENT='市';

-- ----------------------------
-- Records of am_region_city
-- ----------------------------

-- ----------------------------
-- Table structure for am_region_county
-- ----------------------------
DROP TABLE IF EXISTS `am_region_county`;
CREATE TABLE `am_region_county` (
  `id` int(11) NOT NULL AUTO_INCREMENT COMMENT '主键',
  `sort` int(11) DEFAULT '10' COMMENT '排序 默认10',
  `city_id` int(11) NOT NULL COMMENT '市ID',
  `name` varchar(255) NOT NULL COMMENT '名称',
  PRIMARY KEY (`id`),
  KEY `city_id` (`city_id`)
) ENGINE=MyISAM AUTO_INCREMENT=23 DEFAULT CHARSET=utf8 COMMENT='县/区';

-- ----------------------------
-- Records of am_region_county
-- ----------------------------

-- ----------------------------
-- Table structure for am_region_province
-- ----------------------------
DROP TABLE IF EXISTS `am_region_province`;
CREATE TABLE `am_region_province` (
  `id` int(11) NOT NULL AUTO_INCREMENT COMMENT '主键',
  `sort` int(11) DEFAULT '50' COMMENT '排序 默认50',
  `name` varchar(255) NOT NULL COMMENT '名称',
  PRIMARY KEY (`id`),
  UNIQUE KEY `name` (`name`)
) ENGINE=MyISAM AUTO_INCREMENT=6 DEFAULT CHARSET=utf8 COMMENT='省';

-- ----------------------------
-- Records of am_region_province
-- ----------------------------

-- ----------------------------
-- Table structure for am_region_village
-- ----------------------------
DROP TABLE IF EXISTS `am_region_village`;
CREATE TABLE `am_region_village` (
  `id` int(11) NOT NULL AUTO_INCREMENT COMMENT '主键',
  `county_id` int(11) NOT NULL COMMENT '县/区ID',
  `type` tinyint(4) NOT NULL COMMENT '1.村 2.小区',
  `name` varchar(255) NOT NULL COMMENT '名称',
  `is_self` tinyint(4) DEFAULT '1' COMMENT '佣金独立 1.否 2.是',
  `village_percent` int(10) unsigned DEFAULT '0' COMMENT '村管理员佣金比例',
  `group_percent` int(10) unsigned DEFAULT '0' COMMENT '组管理员佣金比例',
  `cook_percent` int(10) unsigned DEFAULT '0' COMMENT '厨师佣金比例',
  `audit_neet` tinyint(4) NOT NULL DEFAULT '-1' COMMENT '退货是否需要总后台审核 1.需要 -1.不需要',
  PRIMARY KEY (`id`),
  KEY `INDEX` (`county_id`,`type`)
) ENGINE=MyISAM AUTO_INCREMENT=49 DEFAULT CHARSET=utf8 COMMENT='村/小区';

-- ----------------------------
-- Records of am_region_village
-- ----------------------------

-- ----------------------------
-- Table structure for am_reimburse
-- ----------------------------
DROP TABLE IF EXISTS `am_reimburse`;
CREATE TABLE `am_reimburse` (
  `id` int(11) NOT NULL AUTO_INCREMENT COMMENT '主键',
  `type` tinyint(4) DEFAULT '1' COMMENT '1.村报损 2.总后台报损',
  `sn` varchar(255) NOT NULL COMMENT '报损编号 "RB村ID年月日时分秒"',
  `village_id` int(11) NOT NULL COMMENT '村ID',
  `goods_name` varchar(255) NOT NULL COMMENT '商品名称',
  `num` int(10) unsigned NOT NULL COMMENT '数量',
  `thumb_1` text COMMENT '缩略图',
  `thumb_2` text COMMENT '缩略图',
  `thumb_3` text COMMENT '缩略图',
  `thumb_4` text COMMENT '缩略图',
  `status` tinyint(4) DEFAULT '1' COMMENT '1.待审核 2.已审核',
  `create_time` varchar(30) NOT NULL COMMENT '时间',
  PRIMARY KEY (`id`),
  UNIQUE KEY `sn` (`sn`),
  KEY `village_id` (`village_id`)
) ENGINE=MyISAM AUTO_INCREMENT=48 DEFAULT CHARSET=utf8 COMMENT='商品报损';

-- ----------------------------
-- Records of am_reimburse
-- ----------------------------

-- ----------------------------
-- Table structure for am_scope
-- ----------------------------
DROP TABLE IF EXISTS `am_scope`;
CREATE TABLE `am_scope` (
  `id` int(11) unsigned NOT NULL AUTO_INCREMENT,
  `scope` decimal(10,2) DEFAULT NULL,
  `status` tinyint(1) DEFAULT NULL,
  `create_time` int(11) DEFAULT NULL,
  `admin_id` int(11) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=15 DEFAULT CHARSET=utf8;

-- ----------------------------
-- Records of am_scope
-- ----------------------------

-- ----------------------------
-- Table structure for am_scratch_card_config
-- ----------------------------
DROP TABLE IF EXISTS `am_scratch_card_config`;
CREATE TABLE `am_scratch_card_config` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `admin_id` int(11) NOT NULL,
  `int` int(11) NOT NULL DEFAULT '88' COMMENT '每次消耗积分',
  `status` tinyint(4) NOT NULL DEFAULT '2' COMMENT '状态 1开启  2关闭',
  `create_time` int(11) DEFAULT NULL,
  `update_time` int(11) DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `admin_id` (`admin_id`),
  KEY `status` (`status`)
) ENGINE=InnoDB AUTO_INCREMENT=27 DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='刮刮卡设置';

-- ----------------------------
-- Records of am_scratch_card_config
-- ----------------------------
INSERT INTO `am_scratch_card_config` VALUES ('26', '112', '2', '2', '1536316623', '1537234190');

-- ----------------------------
-- Table structure for am_scratch_card_goods
-- ----------------------------
DROP TABLE IF EXISTS `am_scratch_card_goods`;
CREATE TABLE `am_scratch_card_goods` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `admin_id` int(11) NOT NULL,
  `goods_name` varchar(100) COLLATE utf8_bin DEFAULT NULL COMMENT '商品名称',
  `img` varchar(100) COLLATE utf8_bin DEFAULT NULL COMMENT '商品图片',
  `status` tinyint(1) NOT NULL DEFAULT '2' COMMENT '是否是奖品  1是 2不是',
  `probability` varchar(11) COLLATE utf8_bin DEFAULT '0.00' COMMENT '概率',
  `create_time` int(11) DEFAULT NULL,
  `update_time` int(11) DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `admin_id` (`admin_id`)
) ENGINE=InnoDB AUTO_INCREMENT=7 DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='刮刮卡商品设置';

-- ----------------------------
-- Records of am_scratch_card_goods
-- ----------------------------
INSERT INTO `am_scratch_card_goods` VALUES ('5', '112', 'Voucher', 'scratch_card/2018-09-18/5ba05422d27ed.jpg', '1', '100', '1537233954', '1537757126');

-- ----------------------------
-- Table structure for am_scratch_card_winning_record
-- ----------------------------
DROP TABLE IF EXISTS `am_scratch_card_winning_record`;
CREATE TABLE `am_scratch_card_winning_record` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `admin_id` int(11) DEFAULT NULL,
  `user_id` int(11) NOT NULL COMMENT '用户id',
  `bw_goods_id` int(11) NOT NULL COMMENT '商品id',
  `status` tinyint(1) NOT NULL DEFAULT '2' COMMENT '状态  1已入录物流单号  2未入录  3未中奖',
  `name` varchar(50) COLLATE utf8_bin DEFAULT NULL COMMENT '收货人',
  `address` varchar(100) COLLATE utf8_bin DEFAULT NULL COMMENT '收货地址',
  `mobile` varchar(20) COLLATE utf8_bin DEFAULT NULL COMMENT '联系方式',
  `logistics_no` varchar(50) COLLATE utf8_bin DEFAULT NULL COMMENT '物流单号',
  `create_time` int(11) DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `admin_id` (`admin_id`),
  KEY `user_id` (`user_id`),
  KEY `bw_goods_id` (`bw_goods_id`),
  KEY `status` (`status`)
) ENGINE=InnoDB AUTO_INCREMENT=25 DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='刮刮卡获奖记录';

-- ----------------------------
-- Records of am_scratch_card_winning_record
-- ----------------------------
INSERT INTO `am_scratch_card_winning_record` VALUES ('24', '112', '7800', '2', '2', '张三', '广东省广州市海珠区新港中路397号', '020-81167888', null, '1538129565');

-- ----------------------------
-- Table structure for am_setting
-- ----------------------------
DROP TABLE IF EXISTS `am_setting`;
CREATE TABLE `am_setting` (
  `name` varchar(255) NOT NULL,
  `value` varchar(255) NOT NULL,
  `mark` varchar(255) NOT NULL,
  UNIQUE KEY `name` (`name`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='村长保证金';

-- ----------------------------
-- Records of am_setting
-- ----------------------------
INSERT INTO `am_setting` VALUES ('villager_bond_price', '0.01', '村长保证金');

-- ----------------------------
-- Table structure for am_set_dinner
-- ----------------------------
DROP TABLE IF EXISTS `am_set_dinner`;
CREATE TABLE `am_set_dinner` (
  `id` int(11) NOT NULL AUTO_INCREMENT COMMENT '主键',
  `earnest_percent` int(10) unsigned DEFAULT '0' COMMENT '定金比例(%)',
  `earnest_limit` int(10) unsigned DEFAULT '10000' COMMENT '封顶金额(元)',
  `arrive_day` int(10) unsigned DEFAULT '1' COMMENT '几天后到达',
  `arrive_clock` int(10) unsigned DEFAULT '16' COMMENT '几点到达',
  PRIMARY KEY (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=3 DEFAULT CHARSET=utf8 COMMENT='宴席设置';

-- ----------------------------
-- Records of am_set_dinner
-- ----------------------------
INSERT INTO `am_set_dinner` VALUES ('1', '10', '10000', '1', '0');

-- ----------------------------
-- Table structure for am_set_else
-- ----------------------------
DROP TABLE IF EXISTS `am_set_else`;
CREATE TABLE `am_set_else` (
  `id` int(11) NOT NULL AUTO_INCREMENT COMMENT '主键',
  `refresh_time` varchar(255) DEFAULT '21:00' COMMENT '上一天数据截止时间 (24小时制)',
  `sure_get` int(11) DEFAULT '2' COMMENT '确认送达时间 (2天)',
  `sure_complete` int(11) NOT NULL COMMENT '订单自动完成时间(天)',
  PRIMARY KEY (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=2 DEFAULT CHARSET=utf8 COMMENT='其他设置';

-- ----------------------------
-- Records of am_set_else
-- ----------------------------
INSERT INTO `am_set_else` VALUES ('1', '23:00', '2', '2');

-- ----------------------------
-- Table structure for am_set_fund
-- ----------------------------
DROP TABLE IF EXISTS `am_set_fund`;
CREATE TABLE `am_set_fund` (
  `id` int(11) NOT NULL AUTO_INCREMENT COMMENT '主键',
  `village_percent` int(10) unsigned DEFAULT '0' COMMENT '村管理员抽佣比例(%)',
  `group_percent` int(10) unsigned DEFAULT '0' COMMENT '组管理员抽佣比例(%)',
  `cook_percent` int(10) unsigned DEFAULT '0' COMMENT '厨师抽佣比例(%)',
  `unlock_time` int(10) unsigned DEFAULT '3' COMMENT '佣金解冻时间(天)',
  PRIMARY KEY (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=2 DEFAULT CHARSET=utf8 COMMENT='佣金设置';

-- ----------------------------
-- Records of am_set_fund
-- ----------------------------
INSERT INTO `am_set_fund` VALUES ('1', '10', '10', '10', '6');

-- ----------------------------
-- Table structure for am_set_store
-- ----------------------------
DROP TABLE IF EXISTS `am_set_store`;
CREATE TABLE `am_set_store` (
  `id` int(11) NOT NULL AUTO_INCREMENT COMMENT '主键',
  `radius` int(10) unsigned DEFAULT '5000' COMMENT '有效半径(m)',
  `fee` text COMMENT '续费价格',
  PRIMARY KEY (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=2 DEFAULT CHARSET=utf8 COMMENT='商家设置';

-- ----------------------------
-- Records of am_set_store
-- ----------------------------
INSERT INTO `am_set_store` VALUES ('1', '5000', 'a:4:{i:0;a:2:{s:5:\"money\";s:4:\"0.01\";s:4:\"days\";s:2:\"30\";}i:1;a:2:{s:5:\"money\";s:4:\"0.02\";s:4:\"days\";s:2:\"60\";}i:2;a:2:{s:5:\"money\";s:4:\"0.03\";s:4:\"days\";s:2:\"90\";}i:3;a:2:{s:5:\"money\";s:4:\"0.06\";s:4:\"days\";s:3:\"180\";}}');

-- ----------------------------
-- Table structure for am_share
-- ----------------------------
DROP TABLE IF EXISTS `am_share`;
CREATE TABLE `am_share` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `user_id` int(11) NOT NULL COMMENT '分享用户',
  `share_id` int(11) NOT NULL COMMENT '被分享用户',
  `int` int(11) DEFAULT NULL COMMENT '分享获得积分',
  `create_time` int(11) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=1029 DEFAULT CHARSET=utf8;

-- ----------------------------
-- Records of am_share
-- ----------------------------

-- ----------------------------
-- Table structure for am_share_config
-- ----------------------------
DROP TABLE IF EXISTS `am_share_config`;
CREATE TABLE `am_share_config` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `admin_id` int(11) DEFAULT NULL COMMENT '商户id',
  `num` int(11) NOT NULL DEFAULT '3' COMMENT '每天转发次数',
  `acc` int(11) NOT NULL DEFAULT '2' COMMENT '每次转发可获得积分',
  `status` tinyint(1) NOT NULL DEFAULT '1' COMMENT '状态 1开始 2关闭',
  `create_time` int(11) NOT NULL,
  `update_time` int(11) DEFAULT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `Unique` (`admin_id`)
) ENGINE=MyISAM AUTO_INCREMENT=35 DEFAULT CHARSET=utf8;

-- ----------------------------
-- Records of am_share_config
-- ----------------------------
INSERT INTO `am_share_config` VALUES ('34', '112', '3', '2', '1', '1536901901', '1537518226');

-- ----------------------------
-- Table structure for am_sign_in
-- ----------------------------
DROP TABLE IF EXISTS `am_sign_in`;
CREATE TABLE `am_sign_in` (
  `id` int(11) NOT NULL AUTO_INCREMENT COMMENT '主键id',
  `uid` int(11) NOT NULL COMMENT '签到的uid',
  `create_time` int(11) NOT NULL COMMENT '签到时间',
  `business_id` int(11) NOT NULL COMMENT '商户id',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=540 DEFAULT CHARSET=utf8;

-- ----------------------------
-- Records of am_sign_in
-- ----------------------------

-- ----------------------------
-- Table structure for am_smash_golden_eggs_config
-- ----------------------------
DROP TABLE IF EXISTS `am_smash_golden_eggs_config`;
CREATE TABLE `am_smash_golden_eggs_config` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `admin_id` int(11) NOT NULL,
  `int` int(11) NOT NULL DEFAULT '88' COMMENT '每次消耗积分',
  `status` tinyint(4) NOT NULL DEFAULT '2' COMMENT '状态 1开启  2关闭',
  `create_time` int(11) DEFAULT NULL,
  `update_time` int(11) DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `admin_id` (`admin_id`),
  KEY `status` (`status`)
) ENGINE=InnoDB AUTO_INCREMENT=29 DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='砸金蛋设置';

-- ----------------------------
-- Records of am_smash_golden_eggs_config
-- ----------------------------
INSERT INTO `am_smash_golden_eggs_config` VALUES ('28', '112', '2', '1', '1536316623', '1537756075');

-- ----------------------------
-- Table structure for am_smash_golden_eggs_goods
-- ----------------------------
DROP TABLE IF EXISTS `am_smash_golden_eggs_goods`;
CREATE TABLE `am_smash_golden_eggs_goods` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `admin_id` int(11) NOT NULL,
  `goods_name` varchar(100) COLLATE utf8_bin DEFAULT NULL COMMENT '商品名称',
  `img` varchar(100) COLLATE utf8_bin DEFAULT NULL COMMENT '商品图片',
  `status` tinyint(1) NOT NULL DEFAULT '2' COMMENT '是否是奖品  1是 2不是',
  `probability` varchar(11) COLLATE utf8_bin DEFAULT '0.00' COMMENT '概率',
  `create_time` int(11) DEFAULT NULL,
  `update_time` int(11) DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `admin_id` (`admin_id`),
  KEY `status` (`status`)
) ENGINE=InnoDB AUTO_INCREMENT=18 DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='砸金蛋商品设置';

-- ----------------------------
-- Records of am_smash_golden_eggs_goods
-- ----------------------------
INSERT INTO `am_smash_golden_eggs_goods` VALUES ('6', '112', 'Iphone 8', 'smash_golden_eggs/2018-09-18/5ba04cf3d1d2b.png', '2', '0', '1537232115', '1537753490');
INSERT INTO `am_smash_golden_eggs_goods` VALUES ('7', '112', 'Voucher', 'smash_golden_eggs/2018-09-18/5ba04e7155ca0.jpg', '1', '100', '1537232497', null);

-- ----------------------------
-- Table structure for am_smash_golden_eggs_winning_record
-- ----------------------------
DROP TABLE IF EXISTS `am_smash_golden_eggs_winning_record`;
CREATE TABLE `am_smash_golden_eggs_winning_record` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `admin_id` int(11) NOT NULL,
  `user_id` int(11) NOT NULL COMMENT '用户id',
  `bw_goods_id` int(11) NOT NULL COMMENT '商品id',
  `status` tinyint(1) NOT NULL DEFAULT '2' COMMENT '状态  1已入录物流单号  2未入录   3未中奖',
  `name` varchar(50) COLLATE utf8_bin DEFAULT NULL COMMENT '收货人',
  `address` varchar(100) COLLATE utf8_bin DEFAULT NULL COMMENT '收货地址',
  `mobile` varchar(20) COLLATE utf8_bin DEFAULT NULL COMMENT '联系方式',
  `logistics_no` varchar(50) COLLATE utf8_bin DEFAULT NULL COMMENT '物流单号',
  `create_time` int(11) DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `admin_id` (`admin_id`),
  KEY `user_id` (`user_id`),
  KEY `bw_goods_id` (`bw_goods_id`),
  KEY `status` (`status`)
) ENGINE=InnoDB AUTO_INCREMENT=35 DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='砸金蛋获奖记录';

-- ----------------------------
-- Records of am_smash_golden_eggs_winning_record
-- ----------------------------
INSERT INTO `am_smash_golden_eggs_winning_record` VALUES ('30', '112', '7798', '7', '1', '郑元程', '甘肃省兰州市城关区123', '13233333335', '1234567890', '1537588237');
INSERT INTO `am_smash_golden_eggs_winning_record` VALUES ('31', '112', '7800', '7', '2', '张三', '广东省广州市海珠区新港中路397号', '020-81167888', null, '1538123675');
INSERT INTO `am_smash_golden_eggs_winning_record` VALUES ('32', '112', '7800', '7', '2', '张三', '广东省广州市海珠区新港中路397号', '020-81167888', null, '1538129558');
INSERT INTO `am_smash_golden_eggs_winning_record` VALUES ('33', '112', '7799', '7', '2', '子叶', '广东省深圳市龙华新区淘金地大厦(潜龙曼海宁东100米) 淘金地大厦E座', '13565585465', null, '1538129950');
INSERT INTO `am_smash_golden_eggs_winning_record` VALUES ('34', '112', '7801', '7', '2', '何源冲', '湖南省岳阳市岳阳楼区云梦路立新驾校北大青鸟', '15873008091', null, '1539305381');

-- ----------------------------
-- Table structure for am_storage_dpc
-- ----------------------------
DROP TABLE IF EXISTS `am_storage_dpc`;
CREATE TABLE `am_storage_dpc` (
  `id` int(11) NOT NULL AUTO_INCREMENT COMMENT '主键',
  `name` varchar(255) NOT NULL COMMENT '姓名',
  `mobile` varchar(255) NOT NULL COMMENT '电话',
  PRIMARY KEY (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=5 DEFAULT CHARSET=utf8 COMMENT='总仓库配送员';

-- ----------------------------
-- Records of am_storage_dpc
-- ----------------------------
INSERT INTO `am_storage_dpc` VALUES ('1', '韵达', '15000000000');
INSERT INTO `am_storage_dpc` VALUES ('3', '申通', '15100000000');
INSERT INTO `am_storage_dpc` VALUES ('4', '顺丰', '15200000000');

-- ----------------------------
-- Table structure for am_storage_order
-- ----------------------------
DROP TABLE IF EXISTS `am_storage_order`;
CREATE TABLE `am_storage_order` (
  `id` int(11) NOT NULL AUTO_INCREMENT COMMENT 'id',
  `create_time` int(11) DEFAULT NULL COMMENT '单据日期(日期可选择)时间戳',
  `order_number` varchar(255) DEFAULT NULL COMMENT '单据编号(CG年月日时分秒)',
  `supplier` varchar(255) DEFAULT NULL COMMENT '供应商',
  `total_num` decimal(10,2) DEFAULT NULL COMMENT '总数量',
  `total_money` decimal(10,2) DEFAULT NULL COMMENT '总金额',
  `buy_people` varchar(255) DEFAULT NULL COMMENT '购货人',
  `remark` varchar(255) DEFAULT NULL COMMENT '备注',
  PRIMARY KEY (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=41 DEFAULT CHARSET=utf8 COMMENT='商品入库单';

-- ----------------------------
-- Records of am_storage_order
-- ----------------------------

-- ----------------------------
-- Table structure for am_storage_order_goods
-- ----------------------------
DROP TABLE IF EXISTS `am_storage_order_goods`;
CREATE TABLE `am_storage_order_goods` (
  `id` int(11) NOT NULL AUTO_INCREMENT COMMENT 'id',
  `order_id` int(11) DEFAULT NULL COMMENT '商品入库单id',
  `goods_id` int(11) DEFAULT NULL COMMENT '入库商品id',
  `supplier` varchar(255) DEFAULT NULL COMMENT '单位(供应商)',
  `goods_num` int(11) DEFAULT NULL COMMENT '入库商品数量',
  `buy_price` decimal(10,2) DEFAULT NULL COMMENT '购货单价',
  `buy_total` decimal(10,2) DEFAULT NULL COMMENT '购货金额',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=93 DEFAULT CHARSET=utf8 COMMENT='商品入库单商品';

-- ----------------------------
-- Records of am_storage_order_goods
-- ----------------------------

-- ----------------------------
-- Table structure for am_storage_out_order
-- ----------------------------
DROP TABLE IF EXISTS `am_storage_out_order`;
CREATE TABLE `am_storage_out_order` (
  `id` int(11) NOT NULL AUTO_INCREMENT COMMENT 'id',
  `create_time` int(11) DEFAULT NULL COMMENT '单据日期(日期可选择)时间戳',
  `order_number` varchar(255) DEFAULT NULL COMMENT '单据编号(CQ年月日时分秒)',
  `supplier` varchar(255) DEFAULT NULL COMMENT '供应商',
  `total_num` decimal(10,2) DEFAULT NULL COMMENT '总数量',
  `total_money` decimal(10,2) DEFAULT NULL COMMENT '总金额',
  `buy_people` varchar(255) DEFAULT NULL COMMENT '出库人',
  `remark` varchar(255) DEFAULT NULL COMMENT '备注',
  PRIMARY KEY (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=2 DEFAULT CHARSET=utf8 COMMENT='商品出库单';

-- ----------------------------
-- Records of am_storage_out_order
-- ----------------------------

-- ----------------------------
-- Table structure for am_storage_out_order_goods
-- ----------------------------
DROP TABLE IF EXISTS `am_storage_out_order_goods`;
CREATE TABLE `am_storage_out_order_goods` (
  `id` int(11) NOT NULL AUTO_INCREMENT COMMENT 'id',
  `order_id` int(11) DEFAULT NULL COMMENT '商品入库单id',
  `goods_id` int(11) DEFAULT NULL COMMENT '入库商品id',
  `supplier` varchar(255) DEFAULT NULL COMMENT '单位(供应商)',
  `goods_num` int(11) DEFAULT NULL COMMENT '出库商品数量',
  `buy_price` decimal(10,2) DEFAULT NULL COMMENT '购货单价',
  `buy_total` decimal(10,2) DEFAULT NULL COMMENT '购货金额',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8 COMMENT='商品出库单商品';

-- ----------------------------
-- Records of am_storage_out_order_goods
-- ----------------------------

-- ----------------------------
-- Table structure for am_storage_total
-- ----------------------------
DROP TABLE IF EXISTS `am_storage_total`;
CREATE TABLE `am_storage_total` (
  `id` int(11) NOT NULL AUTO_INCREMENT COMMENT '主键',
  `choice` tinyint(4) NOT NULL COMMENT '1.出库 2.入库',
  `type` tinyint(4) NOT NULL COMMENT '1.销售补货 2.仓库调度 3.宴会材料 4.管理员补货 5.宴席材料回收 6.退货 7.报损',
  `order_id` int(11) DEFAULT '0' COMMENT '订单ID(非订单为0)',
  `dinner_id` tinyint(4) DEFAULT '0' COMMENT '宴席ID (非宴席为0)',
  `good_id` int(11) NOT NULL COMMENT '商品ID',
  `buy_price` decimal(10,2) DEFAULT NULL COMMENT '购货价',
  `change_num` int(11) NOT NULL COMMENT '操作数量',
  `village_id` int(11) DEFAULT '0' COMMENT '村ID',
  `before_num` int(11) DEFAULT NULL COMMENT '出入库前数量',
  `after_num` int(11) DEFAULT NULL COMMENT '出入库后数量',
  `create_time` int(11) NOT NULL COMMENT '记录时间',
  PRIMARY KEY (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=353 DEFAULT CHARSET=utf8 COMMENT='总仓库出入库记录';

-- ----------------------------
-- Records of am_storage_total
-- ----------------------------

-- ----------------------------
-- Table structure for am_storage_transport
-- ----------------------------
DROP TABLE IF EXISTS `am_storage_transport`;
CREATE TABLE `am_storage_transport` (
  `id` int(11) NOT NULL AUTO_INCREMENT COMMENT '主键',
  `good_id` int(11) NOT NULL COMMENT '商品ID',
  `village_id` int(11) NOT NULL COMMENT '目标村ID',
  `num` int(10) unsigned NOT NULL COMMENT '数量',
  `deliveryman` int(11) NOT NULL COMMENT '配送员',
  `create_time` int(11) NOT NULL COMMENT '记录时间',
  PRIMARY KEY (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=21 DEFAULT CHARSET=utf8 COMMENT='调货';

-- ----------------------------
-- Records of am_storage_transport
-- ----------------------------

-- ----------------------------
-- Table structure for am_storage_village
-- ----------------------------
DROP TABLE IF EXISTS `am_storage_village`;
CREATE TABLE `am_storage_village` (
  `id` int(11) NOT NULL AUTO_INCREMENT COMMENT '主键',
  `choice` tinyint(4) NOT NULL COMMENT '1.出库 2.入库',
  `type` tinyint(4) NOT NULL COMMENT '1.销售出货 2.仓库调度 3.销售补货 4.报损',
  `village_id` int(11) NOT NULL COMMENT '村ID',
  `deliveryman` int(11) NOT NULL,
  `order_id` int(11) DEFAULT '0' COMMENT '订单ID，仓库调度记0',
  `good_id` int(11) NOT NULL COMMENT '商品ID',
  `change_num` int(11) NOT NULL COMMENT '操作数量',
  `create_time` int(11) NOT NULL COMMENT '记录时间',
  PRIMARY KEY (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=53 DEFAULT CHARSET=utf8 COMMENT='分仓库出入库记录';

-- ----------------------------
-- Records of am_storage_village
-- ----------------------------

-- ----------------------------
-- Table structure for am_stores
-- ----------------------------
DROP TABLE IF EXISTS `am_stores`;
CREATE TABLE `am_stores` (
  `id` int(11) NOT NULL AUTO_INCREMENT COMMENT '主键',
  `openid` varchar(255) DEFAULT NULL COMMENT '关联用户公众号openid 对应 am_users_oa 表',
  `enter_id` int(11) NOT NULL COMMENT '入驻申请ID',
  `mobile` varchar(255) NOT NULL COMMENT '手机号码(后台账号)',
  `password` varchar(255) NOT NULL COMMENT 'PC后台密码',
  `county_id` int(11) NOT NULL COMMENT '区 ID',
  `village_id` int(11) NOT NULL COMMENT '村、小区id',
  `name` varchar(255) NOT NULL COMMENT '商家名称',
  `contact` varchar(255) NOT NULL COMMENT '联系人',
  `address` text NOT NULL COMMENT '实体店地址',
  `lat` varchar(255) NOT NULL COMMENT '纬度',
  `lng` varchar(255) NOT NULL COMMENT '经度',
  `expect_minute` int(10) unsigned NOT NULL DEFAULT '30' COMMENT '预计到达时间(分钟)  默认 30',
  `send_price` decimal(10,2) unsigned DEFAULT '20.00' COMMENT '起送价  默认 20',
  `send_cost` decimal(10,2) unsigned DEFAULT '3.00' COMMENT '配送费  默认 3',
  `invalid_time` int(11) NOT NULL COMMENT '到期时间 日期时间戳',
  `status` tinyint(4) DEFAULT '2' COMMENT '营业状态  1.营业中 2.休息中',
  `create_time` int(11) NOT NULL COMMENT '加盟时间',
  `logo` text NOT NULL COMMENT 'logo',
  `store_photo` varchar(255) NOT NULL COMMENT '商家店面照片',
  `notice` varchar(30) DEFAULT NULL COMMENT '商家公告',
  `is_aman` tinyint(4) NOT NULL DEFAULT '-1' COMMENT '是否自营，1是，-1不是',
  PRIMARY KEY (`id`),
  UNIQUE KEY `name` (`name`),
  UNIQUE KEY `openid` (`openid`),
  KEY `status` (`status`)
) ENGINE=MyISAM AUTO_INCREMENT=39 DEFAULT CHARSET=utf8 COMMENT='商家';

-- ----------------------------
-- Records of am_stores
-- ----------------------------

-- ----------------------------
-- Table structure for am_stores_enter
-- ----------------------------
DROP TABLE IF EXISTS `am_stores_enter`;
CREATE TABLE `am_stores_enter` (
  `id` int(11) NOT NULL AUTO_INCREMENT COMMENT '主键',
  `openid` varchar(255) NOT NULL COMMENT '公众号openid',
  `sn` varchar(255) NOT NULL COMMENT '申请编号 "SE公众号用户UID年月日时分秒"',
  `county_id` int(11) NOT NULL COMMENT '所属区 ',
  `village_id` int(11) NOT NULL COMMENT '村、小区id',
  `contact` varchar(255) NOT NULL COMMENT '姓名',
  `mobile` varchar(255) NOT NULL COMMENT '电话',
  `address` text NOT NULL COMMENT '实体店地址',
  `business_licence` text NOT NULL COMMENT '营业执照',
  `fcc` text NOT NULL COMMENT '食品流通证',
  `name` varchar(255) NOT NULL COMMENT '店名',
  `logo` text NOT NULL COMMENT 'LOGO',
  `create_time` int(11) NOT NULL COMMENT '申请时间',
  `status` tinyint(4) DEFAULT '1' COMMENT '审核状态 1.待审核 2.已通过 -1.不通过',
  `reason` text COMMENT '不通过原因',
  PRIMARY KEY (`id`),
  KEY `openid` (`openid`)
) ENGINE=MyISAM AUTO_INCREMENT=16 DEFAULT CHARSET=utf8 COMMENT='商家入驻申请';

-- ----------------------------
-- Records of am_stores_enter
-- ----------------------------

-- ----------------------------
-- Table structure for am_stores_goods
-- ----------------------------
DROP TABLE IF EXISTS `am_stores_goods`;
CREATE TABLE `am_stores_goods` (
  `id` int(11) NOT NULL AUTO_INCREMENT COMMENT '主键',
  `store_id` int(11) NOT NULL COMMENT '商家ID',
  `sort` int(11) DEFAULT '500' COMMENT '排序 默认500',
  `goods_name` varchar(255) NOT NULL COMMENT '名称',
  `pcate` int(11) NOT NULL COMMENT '分类id',
  `goods_price` decimal(10,2) NOT NULL COMMENT '商品价格',
  `thumb` text NOT NULL COMMENT '缩略图',
  `thumb_name` varchar(50) DEFAULT NULL COMMENT '商品缩略图名称',
  `thumb_addtime` int(11) NOT NULL COMMENT '商品缩略图添加时间',
  `carousel` text COMMENT '轮播图（废弃）',
  `parameter` text COMMENT '规格（只存一条）',
  `des` text NOT NULL COMMENT '描述（短）',
  `intro` text COMMENT '介绍（长）',
  `is_hot` tinyint(4) DEFAULT '1' COMMENT '热销榜 1.否 2.是',
  `is_sale` tinyint(4) DEFAULT '1' COMMENT '是否上架 1.否 2.是',
  `deleted` tinyint(4) DEFAULT '-1' COMMENT '1.已删除 -1.正常',
  `gid` int(11) NOT NULL,
  `barcode` varchar(255) NOT NULL COMMENT '条形码',
  PRIMARY KEY (`id`),
  KEY `store_id` (`store_id`),
  KEY `pcate` (`pcate`),
  KEY `is_sale` (`is_sale`),
  KEY `deleted` (`deleted`)
) ENGINE=MyISAM AUTO_INCREMENT=151 DEFAULT CHARSET=utf8 COMMENT='商家商品';

-- ----------------------------
-- Records of am_stores_goods
-- ----------------------------

-- ----------------------------
-- Table structure for am_stores_goods_categories
-- ----------------------------
DROP TABLE IF EXISTS `am_stores_goods_categories`;
CREATE TABLE `am_stores_goods_categories` (
  `id` int(11) NOT NULL AUTO_INCREMENT COMMENT '主键',
  `store_id` int(11) NOT NULL COMMENT '商家ID',
  `sort` int(11) DEFAULT '10' COMMENT '排序 默认10',
  `name` varchar(255) NOT NULL COMMENT '分类名称',
  PRIMARY KEY (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=59 DEFAULT CHARSET=utf8 COMMENT='商家商品分类';

-- ----------------------------
-- Records of am_stores_goods_categories
-- ----------------------------

-- ----------------------------
-- Table structure for am_stores_goods_gallery
-- ----------------------------
DROP TABLE IF EXISTS `am_stores_goods_gallery`;
CREATE TABLE `am_stores_goods_gallery` (
  `gid` int(11) NOT NULL AUTO_INCREMENT COMMENT '图库id',
  `store_id` int(11) NOT NULL COMMENT '商家id',
  `id` int(11) NOT NULL,
  `goods_name` int(11) NOT NULL,
  `thumb` varchar(50) NOT NULL COMMENT '图库图片路径',
  `thumb_name` varchar(50) NOT NULL COMMENT '图库图片名称',
  `thumb_addtime` int(11) NOT NULL COMMENT '图库图片添加时间戳',
  `deleted` int(11) NOT NULL DEFAULT '1',
  PRIMARY KEY (`gid`)
) ENGINE=MyISAM AUTO_INCREMENT=38 DEFAULT CHARSET=utf8 COMMENT='商家商品图库';

-- ----------------------------
-- Records of am_stores_goods_gallery
-- ----------------------------

-- ----------------------------
-- Table structure for am_stores_renew
-- ----------------------------
DROP TABLE IF EXISTS `am_stores_renew`;
CREATE TABLE `am_stores_renew` (
  `id` int(11) NOT NULL AUTO_INCREMENT COMMENT '主键',
  `store_id` int(11) NOT NULL COMMENT '商家ID',
  `sn` varchar(255) NOT NULL COMMENT '续费订单编号 "RN商家ID年月日时分秒"',
  `transaction_id` varchar(255) DEFAULT NULL COMMENT '微信订单号',
  `money` decimal(10,2) NOT NULL COMMENT '续费金额',
  `continue_time` int(11) NOT NULL COMMENT '续费时间戳',
  `status` tinyint(4) DEFAULT '1' COMMENT '支付状态 1.未支付 2.已支付',
  `exp_date` int(11) DEFAULT NULL COMMENT '营业有效期 时间戳',
  `create_time` int(11) NOT NULL COMMENT '记录时间',
  PRIMARY KEY (`id`),
  KEY `store_id` (`store_id`),
  KEY `status` (`status`)
) ENGINE=MyISAM AUTO_INCREMENT=50 DEFAULT CHARSET=utf8 COMMENT='商家续费记录';

-- ----------------------------
-- Records of am_stores_renew
-- ----------------------------

-- ----------------------------
-- Table structure for am_store_keyword
-- ----------------------------
DROP TABLE IF EXISTS `am_store_keyword`;
CREATE TABLE `am_store_keyword` (
  `id` int(5) NOT NULL AUTO_INCREMENT,
  `skeywords` varchar(100) NOT NULL COMMENT '关键字',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=10 DEFAULT CHARSET=utf8 COMMENT='商场关键字';

-- ----------------------------
-- Records of am_store_keyword
-- ----------------------------

-- ----------------------------
-- Table structure for am_table
-- ----------------------------
DROP TABLE IF EXISTS `am_table`;
CREATE TABLE `am_table` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `admin_id` int(11) NOT NULL COMMENT '商户id',
  `name` varchar(100) NOT NULL COMMENT '桌号',
  `img` text COMMENT '餐桌小程序码图片',
  `pid` int(11) NOT NULL COMMENT '父级id',
  `create_time` int(11) NOT NULL COMMENT '添加时间',
  `update_time` int(11) DEFAULT NULL COMMENT '更新时间',
  PRIMARY KEY (`id`),
  KEY `admin_id` (`admin_id`) USING BTREE,
  KEY `pid` (`pid`),
  KEY `name` (`name`)
) ENGINE=InnoDB AUTO_INCREMENT=606 DEFAULT CHARSET=utf8mb4;

-- ----------------------------
-- Records of am_table
-- ----------------------------

-- ----------------------------
-- Table structure for am_time
-- ----------------------------
DROP TABLE IF EXISTS `am_time`;
CREATE TABLE `am_time` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `admin_id` int(11) NOT NULL,
  `time` varchar(20) NOT NULL,
  `allow_time` decimal(3,1) NOT NULL DEFAULT '1.0' COMMENT '允许的时间差  默认1小时',
  `status` tinyint(1) NOT NULL DEFAULT '2' COMMENT '状态 1开始 2关闭',
  `create_time` int(11) NOT NULL,
  `update_time` int(11) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8;

-- ----------------------------
-- Records of am_time
-- ----------------------------

-- ----------------------------
-- Table structure for am_users
-- ----------------------------
DROP TABLE IF EXISTS `am_users`;
CREATE TABLE `am_users` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `admin_id` int(11) DEFAULT NULL COMMENT '管理员表id / 所属商户',
  `nickname` varchar(50) DEFAULT NULL COMMENT '微信昵称',
  `openid` varchar(50) DEFAULT NULL COMMENT 'openid',
  `avatarurl` varchar(255) DEFAULT NULL,
  `gender` tinyint(1) DEFAULT NULL COMMENT '微信性别1男-2女',
  `mobile` varchar(12) DEFAULT NULL COMMENT '手机号',
  `province` varchar(50) DEFAULT NULL COMMENT '省',
  `country` varchar(100) DEFAULT NULL COMMENT '微信国家',
  `city` varchar(100) DEFAULT NULL COMMENT '微信城市',
  `county` varchar(100) DEFAULT NULL COMMENT '区县',
  `street` varchar(100) DEFAULT NULL COMMENT '街道/号',
  `status` tinyint(1) DEFAULT '-1' COMMENT '是否是分销员 -1未申请  0正在申请   1申请通过  2申请未通过',
  `share_uid` int(11) NOT NULL DEFAULT '0' COMMENT '分销上线id',
  `count_sale` decimal(10,2) NOT NULL DEFAULT '0.00' COMMENT '总计分销佣金',
  `share_money` decimal(10,2) NOT NULL DEFAULT '0.00' COMMENT '可用佣金',
  `create_time` int(11) DEFAULT NULL COMMENT '创建时间',
  PRIMARY KEY (`id`),
  KEY `admin_id` (`admin_id`),
  KEY `status` (`status`),
  KEY `share_uid` (`share_uid`)
) ENGINE=InnoDB AUTO_INCREMENT=7802 DEFAULT CHARSET=utf8mb4 COMMENT='用户表';

-- ----------------------------
-- Records of am_users
-- ----------------------------
INSERT INTO `am_users` VALUES ('7789', '112', '太阳当空照', 'oPNx35PH9F3F9QRUmRxP8PeCAOTk', 'https://wx.qlogo.cn/mmopen/vi_32/cXk09CEysoftwZm6vlnHDqlicnP3kp90sKyMr8b2vREM5Wu6OzADxibHPEylRrKLjQZMohoxUiaI4SuhjlsnMKJibw/132', '1', null, 'Jiangxi', 'China', '', null, null, '-1', '0', '0.00', '0.00', '1536312983');
INSERT INTO `am_users` VALUES ('7790', '112', '公孙胜', 'oPNx35DmmKb2JEuLP3KWl_HZH0ao', 'https://wx.qlogo.cn/mmopen/vi_32/Q0j4TwGTfTJdnOsrxqeGFFHH2jwcJZ2OOv0zwp6fHicdAuTjEfd3f9cQ6zO5gicg1wR9Vm7mPaZmbPPkMFMmk03A/132', '0', null, '', '', '', null, null, '-1', '0', '0.00', '0.00', '1536316240');
INSERT INTO `am_users` VALUES ('7791', '112', 'jing', 'oPNx35HGHYj_GErQgnrmEo9jAYWg', 'https://wx.qlogo.cn/mmopen/vi_32/FC8HOFmI8LBZfPNISicscwbiaibVicck2Ypno6zjCVHmG3zQFeGTibOmVnhJZwAUicJRFCCkAV8bk8ibuKf998icfwEsog/132', '2', null, 'Sarawak', 'Malaysia', 'Kuching', null, null, '-1', '0', '0.00', '0.00', '1536733387');
INSERT INTO `am_users` VALUES ('7792', '112', '李应', 'oPNx35CHMm4ZsO7CjwFkCborbQKs', 'https://wx.qlogo.cn/mmopen/vi_32/Q0j4TwGTfTK7IdBDXwAHfv77serkk4RadsY6cB5yH9YaI3ibdX5tVGx7xx41Zla2VRIquAtvoRt8P9HKFIou7iaw/132', '0', null, '', '', '', null, null, '-1', '0', '0.00', '0.00', '1536745750');
INSERT INTO `am_users` VALUES ('7793', '112', 'rdgztest_VVXYAL', 'oPNx35CHrT9vJFobaP1QWeIAw_GE', '', '0', null, '', '', '', null, null, '-1', '0', '0.00', '0.00', '1536821053');
INSERT INTO `am_users` VALUES ('7794', '112', 'Daren亚伦', 'oPNx35G1ti8juuYQd19ERP2_IyT8', 'https://wx.qlogo.cn/mmopen/vi_32/53C8nSicia0mOKfFvKSvxUKBsaJWbKlMylAFxJQJuQMZwOCWjzzncO4DttLvVf3Zv7zH9sAwneyPiboCblMzMoLqg/132', '1', null, 'Sarawak', 'Malaysia', 'Sri Aman', null, null, '-1', '0', '0.00', '0.00', '1536821327');
INSERT INTO `am_users` VALUES ('7795', '112', 'Hui Jie', 'oPNx35KnO6Jf2whQdQF9-gc298R4', 'https://wx.qlogo.cn/mmopen/vi_32/z74jA61noXRSkdlTNypbdhaU24d1y5BTpIoQY9BadicmoqBQ0cpLia4JngrkdnCKhgZgq8j5XpYU0iaTuQsre2IAA/132', '2', null, 'Sarawak', 'Malaysia', 'Kuching', null, null, '-1', '0', '0.00', '0.00', '1536830143');
INSERT INTO `am_users` VALUES ('7796', '112', 'Bert Chan 曾添瓏', 'oPNx35MrGWvG_oJXeVbVmKvCeSzs', 'https://wx.qlogo.cn/mmopen/vi_32/WCas9E0CX0XKdicRhpKnCsv9iaW8ibdqhYC0eAujklicaw7YX4cCJWRibM5eKUoXYUKDawicnNCXcPsY9cDCElHgcR8w/132', '1', null, 'Sarawak', 'Malaysia', 'Kuching', null, null, '-1', '0', '0.00', '0.00', '1536974425');
INSERT INTO `am_users` VALUES ('7797', '112', 'Alvin Ho', 'oPNx35PtH7sJN78N_SuVRJSzUpZA', 'https://wx.qlogo.cn/mmopen/vi_32/jrr7qd1lzwwwbYSGXXPiclXIgusYsr1L5xnzibe5iaPZCEBz9kewkfHHSSokIxV78A3t09G50ibKATZ5zeTqAP8q3g/132', '1', null, 'Sarawak', 'Malaysia', 'Kuching', null, null, '-1', '0', '0.00', '0.00', '1536978317');
INSERT INTO `am_users` VALUES ('7798', '112', 'Adrian.T 郑元程', 'oPNx35O2LoBTE-7rMXkow63ipA8I', 'https://wx.qlogo.cn/mmopen/vi_32/DYAIOgq83epOudrrNxELOqdZwbVgY0orNmeZRA22FlEyOg5b1TFicF62lNlCrcpzvibpk2wDj2Hj4jZib84FySW2w/132', '1', null, '', 'Malaysia', '', null, null, '-1', '0', '0.00', '0.00', '1536978693');
INSERT INTO `am_users` VALUES ('7799', '112', '子叶', 'oPNx35Oy5MxhI4MLbuYRECGCDQt4', 'https://wx.qlogo.cn/mmopen/vi_32/VkyFrnwibyhU4IKyjpdbU2bTUwPeTI2WhmyrhGuh1NzgFKouUhHjmuBkYdmlFbvedOGSaIFZHibVZ1C6SvPwcmRw/132', '2', null, 'Guangdong', 'China', 'Shenzhen', null, null, '-1', '0', '0.00', '0.00', '1538114202');
INSERT INTO `am_users` VALUES ('7800', '112', '皮皮虾', 'oPNx35KAzWJmajRUbJ6AKhhiN3Aw', 'https://wx.qlogo.cn/mmopen/vi_32/pFTibn3kR4csNhlBVAVefLZA9bRavCP5vYVVkNZZIo3Yia9Tu6ib2mibynicqtCcLk3W9EjGwQNicRfvq8h38v3oTl7A/132', '1', null, 'Hubei', 'China', 'Huanggang', null, null, '-1', '0', '0.00', '0.00', '1538114582');
INSERT INTO `am_users` VALUES ('7801', '112', 'The Harry', 'oPNx35K8o6dg4p_WpTuB0-t34DWE', 'https://wx.qlogo.cn/mmopen/vi_32/6PqWG2q5KmmD2Ksch5Gym8WEo6Hq7knzLB8qhGBic2TLd4iauU2efTiasVibm3n7e7msXAu148gn5IsnfoThu7KzicQ/132', '1', null, 'Hunan', 'China', 'Yueyang', null, null, '-1', '0', '0.00', '0.00', '1539164028');

-- ----------------------------
-- Table structure for am_users_oa
-- ----------------------------
DROP TABLE IF EXISTS `am_users_oa`;
CREATE TABLE `am_users_oa` (
  `uid` int(11) NOT NULL AUTO_INCREMENT COMMENT '主键',
  `openid` varchar(255) NOT NULL COMMENT '公众号openid',
  `nickname` varchar(255) DEFAULT NULL COMMENT '微信昵称',
  `sex` tinyint(4) DEFAULT NULL COMMENT '微信性别 1.男 2.女',
  `language` varchar(255) DEFAULT NULL COMMENT '微信语言',
  `city` varchar(255) DEFAULT NULL COMMENT '微信城市',
  `province` varchar(255) DEFAULT NULL COMMENT '微信省份',
  `country` varchar(255) DEFAULT NULL COMMENT '微信国家',
  `headimgurl` text COMMENT '微信头像',
  `create_time` int(11) NOT NULL COMMENT '记录时间',
  PRIMARY KEY (`uid`),
  UNIQUE KEY `openid` (`openid`)
) ENGINE=MyISAM AUTO_INCREMENT=29 DEFAULT CHARSET=utf8 COMMENT='公众号用户 商家用';

-- ----------------------------
-- Records of am_users_oa
-- ----------------------------

-- ----------------------------
-- Table structure for am_users_village
-- ----------------------------
DROP TABLE IF EXISTS `am_users_village`;
CREATE TABLE `am_users_village` (
  `id` int(11) NOT NULL AUTO_INCREMENT COMMENT '主键',
  `village_id` int(11) NOT NULL COMMENT '村ID',
  `openid` varchar(255) NOT NULL COMMENT '小程序openid',
  `name` varchar(255) NOT NULL COMMENT '姓名',
  `mobile` varchar(255) NOT NULL COMMENT '手机号码',
  `address` text NOT NULL COMMENT '详细地址',
  `idcard` varchar(255) NOT NULL COMMENT '身份证号码',
  `idcard_face` text NOT NULL COMMENT '身份证正面照',
  `idcard_back` text NOT NULL COMMENT '身份证反面照',
  `status` tinyint(4) DEFAULT '1' COMMENT '审核状态 1.未审核 2.审核通过 -1.审核失败',
  `form_id` varchar(255) DEFAULT NULL COMMENT '小程序表单ID',
  `pass_time` int(11) NOT NULL COMMENT '成为村长时间',
  `create_time` int(11) NOT NULL COMMENT '申请时间',
  PRIMARY KEY (`id`),
  KEY `openid` (`openid`)
) ENGINE=MyISAM AUTO_INCREMENT=64 DEFAULT CHARSET=utf8 COMMENT='村管理员';

-- ----------------------------
-- Records of am_users_village
-- ----------------------------

-- ----------------------------
-- Table structure for am_user_int
-- ----------------------------
DROP TABLE IF EXISTS `am_user_int`;
CREATE TABLE `am_user_int` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `user_id` int(11) DEFAULT NULL,
  `int` int(11) NOT NULL DEFAULT '0',
  `create_time` int(11) DEFAULT NULL,
  `update_time` int(11) DEFAULT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `Unique` (`user_id`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=947 DEFAULT CHARSET=utf8 COMMENT='用户积分表';

-- ----------------------------
-- Records of am_user_int
-- ----------------------------

-- ----------------------------
-- Table structure for am_user_money
-- ----------------------------
DROP TABLE IF EXISTS `am_user_money`;
CREATE TABLE `am_user_money` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `user_id` int(11) DEFAULT NULL COMMENT '用户id',
  `money` decimal(10,2) NOT NULL DEFAULT '0.00' COMMENT '累计消费金额',
  `balance` decimal(10,2) NOT NULL DEFAULT '0.00' COMMENT '储值卡余额',
  `create_time` int(11) DEFAULT NULL,
  `update_time` int(11) DEFAULT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `Unique` (`user_id`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=462 DEFAULT CHARSET=utf8 COMMENT='用户累计消费金额、储值卡余额表';

-- ----------------------------
-- Records of am_user_money
-- ----------------------------

-- ----------------------------
-- Table structure for am_user_pre
-- ----------------------------
DROP TABLE IF EXISTS `am_user_pre`;
CREATE TABLE `am_user_pre` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `user_id` int(11) NOT NULL COMMENT '用户id',
  `pre_id` int(11) NOT NULL COMMENT '优惠券id',
  `pre_money` decimal(10,2) NOT NULL COMMENT '优惠金额',
  `full_money` decimal(10,2) NOT NULL COMMENT '满多少金额优惠',
  `status` tinyint(1) NOT NULL DEFAULT '1' COMMENT '使用状态  1未使用  1已使用',
  `start_time` int(11) NOT NULL COMMENT '开始时间',
  `end_time` int(11) NOT NULL COMMENT '过期时间',
  `create_time` int(11) NOT NULL COMMENT '获取时间',
  `use_time` int(11) DEFAULT NULL COMMENT '使用时间',
  PRIMARY KEY (`id`),
  KEY `user_id` (`user_id`),
  KEY `pre_id` (`pre_id`)
) ENGINE=InnoDB AUTO_INCREMENT=631 DEFAULT CHARSET=utf8 COMMENT='用户优惠券表';

-- ----------------------------
-- Records of am_user_pre
-- ----------------------------

-- ----------------------------
-- Table structure for am_vedio
-- ----------------------------
DROP TABLE IF EXISTS `am_vedio`;
CREATE TABLE `am_vedio` (
  `id` int(11) NOT NULL AUTO_INCREMENT COMMENT 'id',
  `img` varchar(255) DEFAULT NULL COMMENT '封面图',
  `vedio` varchar(255) DEFAULT NULL COMMENT '视频',
  `status` tinyint(1) DEFAULT NULL COMMENT '状态',
  `admin_id` int(11) DEFAULT NULL COMMENT '商户id',
  `create_time` int(11) DEFAULT NULL COMMENT '添加时间',
  PRIMARY KEY (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=8 DEFAULT CHARSET=utf8;

-- ----------------------------
-- Records of am_vedio
-- ----------------------------

-- ----------------------------
-- Table structure for am_villages_price
-- ----------------------------
DROP TABLE IF EXISTS `am_villages_price`;
CREATE TABLE `am_villages_price` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `village_id` int(11) NOT NULL COMMENT '村id',
  `good_id` int(11) NOT NULL COMMENT '商品id',
  `price` decimal(10,2) NOT NULL COMMENT '反馈的价格',
  `priceSn` varchar(300) NOT NULL COMMENT '反馈编号',
  `return_time` int(11) NOT NULL COMMENT '反馈时间',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=21 DEFAULT CHARSET=utf8 COMMENT='村商品价格反馈表';

-- ----------------------------
-- Records of am_villages_price
-- ----------------------------

-- ----------------------------
-- Table structure for am_village_dpc
-- ----------------------------
DROP TABLE IF EXISTS `am_village_dpc`;
CREATE TABLE `am_village_dpc` (
  `id` int(11) NOT NULL AUTO_INCREMENT COMMENT '主键',
  `name` varchar(255) NOT NULL COMMENT '姓名',
  `mobile` varchar(255) NOT NULL COMMENT '电话',
  `address` varchar(255) NOT NULL,
  `modify_time` int(11) NOT NULL,
  `identity_village_id` int(11) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=7 DEFAULT CHARSET=utf8 COMMENT='总仓库配送员';

-- ----------------------------
-- Records of am_village_dpc
-- ----------------------------

-- ----------------------------
-- Table structure for am_wechat_config
-- ----------------------------
DROP TABLE IF EXISTS `am_wechat_config`;
CREATE TABLE `am_wechat_config` (
  `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
  `admin_id` int(11) DEFAULT NULL COMMENT 'admin表id',
  `token` varchar(100) DEFAULT NULL COMMENT '接口token',
  `appid` varchar(100) DEFAULT NULL COMMENT '小程序 app id',
  `encodingaeskey` varchar(100) DEFAULT NULL COMMENT '加密key',
  `appsecret` varchar(100) DEFAULT NULL COMMENT '小程序 密钥',
  `mch_id` varchar(100) DEFAULT NULL COMMENT '商户身份标识',
  `partnerkey` varchar(100) DEFAULT NULL COMMENT '商户权限密钥',
  `ssl_cer` varchar(500) DEFAULT NULL COMMENT '商户证书CER',
  `ssl_key` varchar(500) DEFAULT NULL COMMENT '商户证书KEY',
  `create_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  PRIMARY KEY (`id`),
  UNIQUE KEY `admin_id` (`admin_id`)
) ENGINE=InnoDB AUTO_INCREMENT=10048 DEFAULT CHARSET=utf8;

-- ----------------------------
-- Records of am_wechat_config
-- ----------------------------
INSERT INTO `am_wechat_config` VALUES ('10047', '112', '', 'wx0eaf079d53f96b05', '', 'ad601d1d3d45e6861972d95a697327da', '', '', '', '', '2018-09-07 17:19:22');

-- ----------------------------
-- Table structure for am_zhi_order
-- ----------------------------
DROP TABLE IF EXISTS `am_zhi_order`;
CREATE TABLE `am_zhi_order` (
  `id` int(11) NOT NULL AUTO_INCREMENT COMMENT 'id',
  `order_sn` varchar(255) DEFAULT NULL COMMENT '订单号',
  `admin_id` int(11) DEFAULT NULL COMMENT '商家id',
  `user_id` int(11) DEFAULT NULL COMMENT '用户id',
  `money` decimal(10,2) DEFAULT NULL COMMENT '金额',
  `status` tinyint(1) DEFAULT NULL COMMENT '状态',
  `admin_title` varchar(255) DEFAULT NULL,
  `create_time` int(11) DEFAULT NULL COMMENT '添加时间',
  `pay_time` int(11) DEFAULT NULL COMMENT '付款时间',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=178 DEFAULT CHARSET=utf8;

-- ----------------------------
-- Records of am_zhi_order
-- ----------------------------

-- ----------------------------
-- Table structure for am_zixun
-- ----------------------------
DROP TABLE IF EXISTS `am_zixun`;
CREATE TABLE `am_zixun` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `admin_id` int(11) DEFAULT NULL,
  `img` varchar(100) DEFAULT NULL,
  `title` varchar(100) DEFAULT NULL COMMENT '标题',
  `sort` int(11) NOT NULL DEFAULT '0' COMMENT '排序',
  `content` text,
  `browse_num` int(11) NOT NULL DEFAULT '0',
  `is_hot` tinyint(1) NOT NULL DEFAULT '2' COMMENT '是否上推荐  1是 2否',
  `status` tinyint(1) NOT NULL DEFAULT '1' COMMENT '上下架 1上架 2下架',
  `create_time` int(11) DEFAULT NULL,
  `update_time` int(11) DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `Normal` (`admin_id`,`browse_num`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=46 DEFAULT CHARSET=utf8 COMMENT='资讯列表';

-- ----------------------------
-- Records of am_zixun
-- ----------------------------

-- ----------------------------
-- Table structure for am_zixun_comment
-- ----------------------------
DROP TABLE IF EXISTS `am_zixun_comment`;
CREATE TABLE `am_zixun_comment` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `zixun_id` int(11) DEFAULT NULL,
  `openid` varchar(50) COLLATE utf8_bin DEFAULT NULL,
  `content` varchar(255) COLLATE utf8_bin DEFAULT NULL,
  `create_time` int(11) DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `Normal` (`zixun_id`) USING BTREE,
  KEY `openid` (`openid`)
) ENGINE=InnoDB AUTO_INCREMENT=63 DEFAULT CHARSET=utf8 COLLATE=utf8_bin;

-- ----------------------------
-- Records of am_zixun_comment
-- ----------------------------

-- ----------------------------
-- Table structure for am_zixun_show
-- ----------------------------
DROP TABLE IF EXISTS `am_zixun_show`;
CREATE TABLE `am_zixun_show` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `admin_id` int(11) DEFAULT NULL,
  `img` varchar(100) COLLATE utf8_bin DEFAULT NULL,
  `create_time` int(11) DEFAULT NULL,
  `update_time` int(11) DEFAULT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `Unique` (`admin_id`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=12 DEFAULT CHARSET=utf8 COLLATE=utf8_bin;

-- ----------------------------
-- Records of am_zixun_show
-- ----------------------------
