| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188 |
- CREATE TABLE xhItem(
- id INT NOT NULL AUTO_INCREMENT PRIMARY KEY,
- `name` VARCHAR(50) NOT NULL DEFAULT '' COMMENT '花材名称',
- unitNum tinyint not null default 0 comment '每扎多少支',
- unitWeight decimal(9,2) NOT NULL DEFAULT '0.00' COMMENT '每扎多少公斤',
- unitCost decimal(9,2) NOT NULL DEFAULT '0.00' COMMENT '每扎成本价,采购价',
- unitAddPrice decimal(9,2) NOT NULL DEFAULT '0.00' COMMENT '每扎加价',
- unit int not null default 0 comment '单位名称ID',
- addTime int not null default 0 comment '添加时间',
- updateTime int not null default 0 comment '修改时间'
- )comment='花材,资材';
- create table if not exists xhItemClass(
- id INT NOT NULL AUTO_INCREMENT PRIMARY KEY,
- `name` varchar(50) not null default '' comment '名称',
- inTurn int not null default 0 comment '排序,越大越靠前',
- addTime int not null default 0 comment '添加时间',
- updateTime int not null default 0 comment '修改时间'
- )comment='花材分类';
- CREATE TABLE xhUnit(
- id INT NOT NULL AUTO_INCREMENT PRIMARY KEY,
- `name` VARCHAR(10) NOT NULL DEFAULT '' COMMENT '单位名称',
- addTime int not null default 0 comment '添加时间',
- updateTime int not null default 0 comment '修改时间'
- )COMMENT='花材单位';
- create table xhMerchantItemClass(
- id INT NOT NULL AUTO_INCREMENT PRIMARY KEY,
- merchantId int not null default 0 comment '商家id',
- `name` varchar(50) not null default '' comment '名称',
- inTurn int not null default 0 comment '排序,越大越靠前',
- addTime int not null default 0 comment '添加时间',
- updateTime int not null default 0 comment '修改时间'
- )comment='商家花材分类';
- create table xhMerchantItem(
- id INT NOT NULL AUTO_INCREMENT PRIMARY KEY,
- merchantId int not null default 0 comment '商家id',
- classId int not null default 0 comment '商家花材分类id',
- itemId int not null default 0 comment '花材id',
- unitCost decimal(9,2) NOT NULL DEFAULT '0.00' COMMENT '每扎成本价,采购价',
- unitAddPrice decimal(9,2) NOT NULL DEFAULT '0.00' COMMENT '每扎加价',
- addTime int not null default 0 comment '添加时间',
- updateTime int not null default 0 comment '修改时间'
- )comment='商家花材';
- CREATE TABLE `xhGhsOrder` (
- `id` int(11) NOT NULL AUTO_INCREMENT primary key COMMENT '自增id',
- `orderSn` char(40) NOT NULL DEFAULT '' COMMENT '订单编号',
- `goodsNum` tinyint(4) NOT NULL DEFAULT '0' COMMENT '商品数量',
- `payWay` tinyint(4) NOT NULL DEFAULT '0' COMMENT '支付方式 0微信 1支付宝 2余额',
- `wxPayType` tinyint(4) NOT NULL DEFAULT '0' COMMENT '0 H5支付 1 小程序支付',
- `payCode` varchar(1000) NOT NULL DEFAULT '' COMMENT '支付返回号',
- `fromType` tinyint(4) NOT NULL DEFAULT '0' COMMENT '来源:0门店 1商城 2朋友圈',
- `store` tinyint(4) NOT NULL DEFAULT '0' COMMENT '门店订单 0不是 1是',
- `capitalId` int(11) NOT NULL DEFAULT '0' COMMENT '流水id',
- `prePrice` decimal(9,2) NOT NULL DEFAULT '0.00' COMMENT '应付款,原价,未修改价格,打折前',
- `actPrice` decimal(9,2) NOT NULL DEFAULT '0.00' COMMENT '实际付款,实价,修改后价格,打折后',
- `userId` int(11) NOT NULL DEFAULT '0' COMMENT '用户id',
- `merchantId` int(11) NOT NULL DEFAULT '0' COMMENT '商户id',
- `shopId` int(11) NOT NULL DEFAULT '0' COMMENT '门店id',
- `sendType` tinyint(4) NOT NULL DEFAULT '0' COMMENT '0未确认配送方式 1免配送 2自己送 3别人送;快递送',
- `sendSide` tinyint(4) NOT NULL DEFAULT '0' COMMENT '配送方 0没有 1达达',
- `sendStatus` tinyint(4) NOT NULL DEFAULT '0' COMMENT '配送状态:0未发货,待接单 1已发货,已接单 2已送达',
- `refund` tinyint(4) NOT NULL DEFAULT '0' COMMENT '1已退款 0正常订单',
- `payStatus` tinyint(4) NOT NULL DEFAULT '0' COMMENT '0待付款 1已付款',
- `printStatus` tinyint(4) NOT NULL DEFAULT '0' COMMENT '0未打印 1已打印',
- `remark` varchar(1000) NOT NULL DEFAULT '' COMMENT '备注',
- `status` tinyint(4) NOT NULL DEFAULT '0' COMMENT '订单状态 0待付款 1待配送 2配送中 3待通知 4已取消 5已完成',
- `deadline` int(11) NOT NULL DEFAULT '0' COMMENT '订单有效期',
- `payTime` int(11) NOT NULL DEFAULT '0' COMMENT '付款时间',
- addTime int not null default 0 comment '添加时间',
- `updateTime` int not null default 0 comment '修改时间'
- ) COMMENT='供货商订单';
- create table xhGhsOrderItem(
- `id` int(11) unsigned NOT NULL AUTO_INCREMENT primary key COMMENT 'id',
- `orderId` int(11) NOT NULL DEFAULT '0' COMMENT '订单id',
- `userId` int(11) NOT NULL DEFAULT '0' COMMENT '用户id',
- `merchantId` int(11) NOT NULL DEFAULT '0' COMMENT '商户id',
- itemId int not null default 0 comment '商家花材id',
- `unitPrice` decimal(9,2) NOT NULL DEFAULT '0.00' COMMENT '每扎价格',
- unitNum int not null default 0 comment '每扎多少支',
- `num` decimal(9,2) NOT NULL DEFAULT '0.00' COMMENT '多少扎'
- )comment='供货商订单商品';
- ALTER TABLE xhItem ADD cover VARCHAR(500) NOT NULL DEFAULT '' COMMENT '封面图片' AFTER `name`;
- ALTER TABLE xhMerchantAccount RENAME TO xhMerchantApply
- == shish 2021.1.3
- DROP TABLE IF EXISTS `xhItemRank`;
- CREATE TABLE IF NOT EXISTS `xhItemRank` (
- `id` INT(11) NOT NULL AUTO_INCREMENT,
- `itemId` INT NOT NULL DEFAULT 0 COMMENT '花材id',
- `rank` CHAR(5) NOT NULL DEFAULT 'A' COMMENT '等级 A B C D E',
- `unitCost` DECIMAL(9,2) NOT NULL DEFAULT '0.00' COMMENT '每扎成本价,采购价',
- `unitAddPrice` DECIMAL(9,2) NOT NULL DEFAULT '0.00' COMMENT '每扎加价',
- `addTime` INT(11) NOT NULL DEFAULT '0' COMMENT '添加时间',
- `updateTime` INT(11) NOT NULL DEFAULT '0' COMMENT '修改时间',
- PRIMARY KEY (`id`)
- ) COMMENT='花材等级价格';
- ALTER TABLE xhMerchantItem ADD rank CHAR(5) NOT NULL DEFAULT 'A' COMMENT '花材级别' AFTER `itemId`;
- ALTER TABLE xhGhsOrderItem ADD rank CHAR(5) NOT NULL DEFAULT 'A' COMMENT '花材级别' AFTER `itemId`;
- ALTER TABLE xhItemRank RENAME TO xhMerchantItemRank;
- alter table xhMerchantItemRank add merchantId int not null default 0 comment '' after `id`;
- ALTER TABLE xhAdmin ADD identity TINYINT NOT NULL DEFAULT 0 COMMENT '身份 0未知 1花粉 2花店员工' AFTER `mobile`;
- ALTER TABLE xhMerchant ADD `style` TINYINT NOT NULL DEFAULT 0 COMMENT '商家类型 0普通 1零售商使用 2供货商使用' AFTER `id`;
- ==在开发环境,找到【花美玲】将style设置为1,找到【花掌柜】将style设置为2,如果找不到,则去走流程创建
- ==在线上环境,找到【花卉宝】将style设置为1,找到【销花宝】将style设置为2,如果找不到,则去走流程创建
- ==shish 20201.1.6
- ALTER TABLE xhWxOpen MODIFY wx_mini_base_id INT(11) NOT NULL DEFAULT '0' COMMENT '平台零售商小程序';
- ALTER TABLE xhWxOpen MODIFY wx_base_id INT(11) NOT NULL DEFAULT '0' COMMENT '平台零售商公众号';
- ALTER TABLE xhWxOpen ADD wxGhsMiniBaseId INT(11) NOT NULL DEFAULT '0' COMMENT '平台供货商小程序' AFTER wx_base_id;
- ALTER TABLE xhWxOpen ADD wxGhsBaseId INT(11) NOT NULL DEFAULT '0' COMMENT '平台供货商公众号' AFTER wxGhsMiniBaseId;
- DROP TABLE IF EXISTS `xhGhsAdmin`;
- CREATE TABLE IF NOT EXISTS `xhGhsAdmin` (
- `id` int(11) NOT NULL AUTO_INCREMENT,
- `mobile` varchar(15) DEFAULT NULL COMMENT '手机号',
- `identity` tinyint(4) NOT NULL DEFAULT '0' COMMENT '身份 0未知 1花粉 2花店员工',
- `adminName` varchar(50) NOT NULL DEFAULT '' COMMENT '管理员姓名',
- `nickName` varchar(50) NOT NULL DEFAULT '' COMMENT '昵称',
- `avatar` varchar(500) NOT NULL DEFAULT '' COMMENT '头像',
- `password` varchar(500) NOT NULL DEFAULT '' COMMENT '密码',
- `confirmPassword` varchar(500) NOT NULL DEFAULT '' COMMENT '确认密码',
- `sourceType` tinyint(4) NOT NULL DEFAULT '0' COMMENT '来源 0微信 1支付宝 2小程序 3朋友圈 4美团',
- `subscribeTime` int(11) NOT NULL DEFAULT '0' COMMENT '关注时间',
- `hasSubscribe` tinyint(4) NOT NULL DEFAULT '0' COMMENT '是否关注过 0没有 1是的',
- `subscribe` tinyint(4) NOT NULL DEFAULT '0' COMMENT '关注平台 0未关注 1关注',
- `unionId` varchar(100) NOT NULL DEFAULT '' COMMENT '微信平台唯一id',
- `miniOpenId` varchar(100) NOT NULL DEFAULT '' COMMENT '小程序openid',
- `openId` varchar(100) NOT NULL DEFAULT '' COMMENT '微信openid',
- `remark` varchar(500) NOT NULL DEFAULT '' COMMENT '员工备注',
- `sex` tinyint(4) NOT NULL DEFAULT '0' COMMENT '性别 0未知 1男性 2女性',
- `super` tinyint(4) NOT NULL DEFAULT '0' COMMENT '是否超级管理员 0不是 1是,超级员工不可删除',
- `delStatus` tinyint(4) NOT NULL DEFAULT '0' COMMENT '软删除标识 0未删除 1已删除',
- `accountStatus` tinyint(4) NOT NULL DEFAULT '1' COMMENT '帐号状态 0禁用 1正常',
- `loginTime` int(11) NOT NULL DEFAULT '0' COMMENT '最后登陆时间',
- `addTime` int(11) NOT NULL DEFAULT '0' COMMENT '添加时间',
- PRIMARY KEY (`id`)
- )COMMENT='供货商管理员表';
- drop table if exists `xhGhsShop`;
- CREATE TABLE `xhGhsShop` (
- `id` bigint(11) NOT NULL AUTO_INCREMENT,
- `avatar` varchar(500) NOT NULL DEFAULT '' COMMENT '门店照片;门店头像',
- `shopName` varchar(100) NOT NULL DEFAULT '' COMMENT '门店名称',
- `merchantName` varchar(100) NOT NULL DEFAULT '' COMMENT '商家名称',
- `merchantId` int(11) NOT NULL DEFAULT '0' COMMENT '商户id',
- `lat` varchar(20) NOT NULL DEFAULT '' COMMENT '纬度',
- `long` varchar(20) NOT NULL DEFAULT '' COMMENT '经度',
- `province` varchar(100) NOT NULL DEFAULT '' COMMENT '省',
- `city` varchar(100) NOT NULL DEFAULT '' COMMENT '市',
- `dist` varchar(100) NOT NULL DEFAULT '' COMMENT '区县',
- `address` varchar(500) NOT NULL DEFAULT '' COMMENT '街道地址',
- `floor` varchar(50) NOT NULL DEFAULT '' COMMENT '楼号门牌号',
- `fullAddress` varchar(500) NOT NULL DEFAULT '' COMMENT '完整地址',
- `telephone` varchar(20) NOT NULL DEFAULT '' COMMENT '电话',
- `openTime` varchar(30) NOT NULL DEFAULT '' COMMENT '营业时间',
- `introduction` varchar(800) DEFAULT '' COMMENT '简介',
- `gatheringCode` varchar(500) NOT NULL DEFAULT '' COMMENT '收款的二维码',
- `applyMemberCode` varchar(500) NOT NULL DEFAULT '' COMMENT '注册会员码',
- `totalIncome` decimal(9,2) NOT NULL DEFAULT '0.00' COMMENT '累计收入',
- `default` tinyint(4) NOT NULL DEFAULT '0' COMMENT '默认门店 0不是 1是,默认门店不能删除',
- `delStatus` tinyint(4) NOT NULL DEFAULT '0' COMMENT '删除状态 0没有删除 1已删除',
- `status` tinyint(4) NOT NULL DEFAULT '1' COMMENT '门店状态 0停用 1正常',
- `addTime` int(11) NOT NULL DEFAULT '0' COMMENT '添加时间,时间戳格式',
- `createTime` datetime NOT NULL COMMENT '创建时间',
- `updateTime` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
- PRIMARY KEY (`id`)
- ) comment='供货商门店';
- drop table if exists `xhGhsShopAdmin`;
- CREATE TABLE if not exists `xhGhsShopAdmin` (
- `id` int(11) NOT NULL AUTO_INCREMENT,
- `adminId` int(11) NOT NULL DEFAULT '0' COMMENT '管理员id',
- `merchantId` int(11) NOT NULL DEFAULT '0' COMMENT '商家id',
- `shopId` int(11) NOT NULL DEFAULT '0' COMMENT '门店id',
- `remind` tinyint(4) NOT NULL DEFAULT '0' COMMENT '动态提醒 0不需要 1需要',
- `roleId` int(11) NOT NULL DEFAULT '0' COMMENT '角色id',
- `default` tinyint(4) NOT NULL DEFAULT '0' COMMENT '默认管理的门店 1是 0否',
- `delStatus` tinyint(4) NOT NULL DEFAULT '0' COMMENT '删除状态 0正常 1已删除',
- `status` tinyint(4) NOT NULL DEFAULT '1' COMMENT '状态 0停用 1正常',
- `addTime` int(11) NOT NULL DEFAULT '0' COMMENT '添加时间',
- PRIMARY KEY (`id`)
- ) COMMENT='供货商员工';
|