Selaa lähdekoodia

同步v5版本正式环境和测试环境的数据库

SemiWarm 5 vuotta sitten
vanhempi
commit
ac756fb862
2 muutettua tiedostoa jossa 22 lisäystä ja 46 poistoa
  1. 5 3
      src/main/resources/static/ioc.sql
  2. 17 43
      src/main/resources/static/ioc_test.sql

+ 5 - 3
src/main/resources/static/ioc.sql

@@ -82,9 +82,10 @@ create table ocr_trip_det
 drop table if exists sub_img;
 create table sub_img
 (
-    id       varchar(32)  not null comment '主键',
-    goods_id varchar(32)  not null comment '商品id',
-    axis     varchar(128) not null default '' comment '坐标',
+    id         varchar(32)  not null comment '主键',
+    goods_id   varchar(32)  not null comment '商品id',
+    axis       varchar(128) not null default '' comment '坐标',
+    fmcg_score varchar(32)  not null default '' comment '商品为标品的可能性',
     primary key (id)
 )
     engine = InnoDB,
@@ -243,6 +244,7 @@ create table cb_sub_img
     id          varchar(32) not null comment '主键',
     cb_goods_id varchar(32) comment '接收回传商品图片id',
     axis        varchar(128) comment '坐标',
+    fmcg_score  varchar(32) comment '商品为标品的可能性',
     primary key (id)
 )
     engine = InnoDB,

+ 17 - 43
src/main/resources/static/ioc_test.sql

@@ -1,14 +1,14 @@
-create database if not exists ocr_test;
-use ocr_test;
+create database if not exists ocr_prod;
+use ocr_prod;
 
 # 上传数据主表
+drop table if exists up_main;
 create table up_main
 (
-    id          varchar(32) not null comment '主键',
     upload_id   varchar(32) not null comment '上传id',
     trip_type   varchar(32) not null default '' comment '上传类型',
     upload_time varchar(32) not null default '' comment '上传时间',
-    primary key (id)
+    primary key (upload_id)
 )
     engine = InnoDB,
     default charset = utf8;
@@ -25,29 +25,6 @@ create table up_trip
     engine = InnoDB,
     default charset = utf8;
 
-# 小票识别结果
-drop table if exists ocr_trip;
-create table ocr_trip
-(
-    id               varchar(32)  not null comment '主键',
-    upload_id        varchar(32)  not null comment '上传id',
-    shop_name        varchar(32)  not null default '' comment '渠道名',
-    branch_shop_name varchar(32)  not null default '' comment '渠道名分店',
-    purchase_date    varchar(32)  not null default '' comment '购买日期',
-    total_spend      varchar(16)  not null default '' comment '消费金额',
-    basket           varchar(16)  not null default '' comment '购物篮大小',
-    trip_number      varchar(32)  not null default '' comment '小票条码',
-    address          varchar(256) not null default '' comment '店铺地址',
-    phone            varchar(64)  not null default '' comment '店铺电话',
-    pay              varchar(16)  not null default '' comment '支付方式',
-    offer            varchar(128) not null default '' comment '优惠形式',
-    member           varchar(64)  not null default '' comment '会员信息',
-    global_prob      varchar(16)  not null default '' comment '全局置信度',
-    primary key (id)
-)
-    engine = InnoDB,
-    default charset = utf8;
-
 # 商品图片上传表
 drop table if exists up_goods;
 create table up_goods
@@ -64,8 +41,7 @@ create table up_goods
 drop table if exists ocr_trip;
 create table ocr_trip
 (
-    id               varchar(32)  not null comment '主键',
-    upload_id        varchar(32)  not null comment '上传id',
+    upload_id        varchar(32)  not null comment '主键',
     shop_name        varchar(32)  not null default '' comment '渠道名',
     branch_shop_name varchar(32)  not null default '' comment '渠道名分店',
     purchase_date    varchar(32)  not null default '' comment '购买日期',
@@ -78,7 +54,7 @@ create table ocr_trip
     offer            varchar(128) not null default '' comment '优惠形式',
     member           varchar(64)  not null default '' comment '会员信息',
     global_prob      varchar(16)  not null default '' comment '全局置信度',
-    primary key (id)
+    primary key (upload_id)
 )
     engine = InnoDB,
     default charset = utf8;
@@ -90,7 +66,7 @@ create table ocr_trip_det
     id         varchar(32)  not null comment '主键',
     upload_id  varchar(32)  not null comment '上传id',
     goods_code varchar(32)  not null default '' comment '商品条码',
-    goods_name varchar(64)  not null default '' comment '商品名称',
+    goods_name varchar(128) not null default '' comment '商品名称',
     amount     varchar(16)  not null default '' comment '商品数量',
     unit_price varchar(16)  not null default '' comment '商品单价',
     sub_total  varchar(16)  not null default '' comment '小计',
@@ -106,9 +82,10 @@ create table ocr_trip_det
 drop table if exists sub_img;
 create table sub_img
 (
-    id       varchar(32)  not null comment '主键',
-    goods_id varchar(32)  not null comment '商品id',
-    axis     varchar(128) not null default '' comment '坐标',
+    id         varchar(32)  not null comment '主键',
+    goods_id   varchar(32)  not null comment '商品id',
+    axis       varchar(128) not null default '' comment '坐标',
+    fmcg_score varchar(32)  not null default '' comment '商品为标品的可能性',
     primary key (id)
 )
     engine = InnoDB,
@@ -146,7 +123,6 @@ create table sub_img_ret
 drop table if exists trip_log;
 create table trip_log
 (
-    id             varchar(32)  not null comment '主键',
     upload_id      varchar(32)  not null comment '上传id',
     t_start_time   varchar(32)  not null default '' comment '小票图片开始识别时间',
     t_finish_time  varchar(32)  not null default '' comment '小票图片完成识别时间',
@@ -154,7 +130,7 @@ create table trip_log
     t_done         boolean      not null default false comment '小票图片是否识别完成',
     t_error        varchar(256) not null default '' comment '小票图片识别错误信息',
     create_time    varchar(32)  not null default '' comment '创建日期',
-    primary key (id)
+    primary key (upload_id)
 )
     engine = InnoDB,
     default charset = utf8;
@@ -163,7 +139,6 @@ create table trip_log
 drop table if exists goods_log;
 create table goods_log
 (
-    id             varchar(32) not null comment '主键',
     upload_id      varchar(32) not null comment '上传id',
     g_start_time   varchar(32) not null default '' comment '商品图片开始识别时间',
     g_finish_time  varchar(32) not null default '' comment '商品图片完成识别时间',
@@ -172,7 +147,7 @@ create table goods_log
     g_error        boolean     not null default false comment '商品图片识别是否有错误',
     times          int         not null default '0' comment '重试次数',
     create_time    varchar(32) not null default '' comment '创建日期',
-    primary key (id)
+    primary key (upload_id)
 )
     engine = InnoDB,
     default charset = utf8;
@@ -195,7 +170,6 @@ create table err_goods
 drop table if exists cb_log;
 create table cb_log
 (
-    id             varchar(32)  not null comment '主键',
     upload_id      varchar(32)  not null comment '上传id',
     code           varchar(8)   not null default '' comment '操作码',
     message        varchar(512) not null default '' comment '提示信息',
@@ -205,7 +179,7 @@ create table cb_log
     c_done         boolean      not null default false comment '识别结果是否已经回传',
     c_error        varchar(256) not null default '' comment '识别结果回传失败原因',
     create_time    varchar(32)  not null default '' comment '创建日期',
-    primary key (id)
+    primary key (upload_id)
 )
     engine = InnoDB,
     default charset = utf8;
@@ -215,7 +189,6 @@ create table cb_log
 drop table if exists cb_trip;
 create table cb_trip
 (
-    id               varchar(32)  not null comment '主键',
     upload_id        varchar(32)  not null comment '主键',
     shop_name        varchar(32)  not null default '' comment '渠道名',
     branch_shop_name varchar(32)  not null default '' comment '渠道名分店',
@@ -229,7 +202,7 @@ create table cb_trip
     offer            varchar(128) not null default '' comment '优惠形式',
     member           varchar(64)  not null default '' comment '会员信息',
     create_time      varchar(32)  not null default '' comment '创建时间',
-    primary key (id)
+    primary key (upload_id)
 )
     engine = InnoDB,
     default charset = utf8;
@@ -241,7 +214,7 @@ create table cb_trip_det
     id         varchar(32)  not null comment '主键',
     upload_id  varchar(32)  not null comment '上传id',
     goods_code varchar(32)  not null default '' comment '商品条码',
-    goods_name varchar(64)  not null default '' comment '商品名称',
+    goods_name varchar(128) not null default '' comment '商品名称',
     amount     varchar(16)  not null default '' comment '商品数量',
     unit_price varchar(16)  not null default '' comment '商品单价',
     sub_total  varchar(16)  not null default '' comment '小计',
@@ -271,6 +244,7 @@ create table cb_sub_img
     id          varchar(32) not null comment '主键',
     cb_goods_id varchar(32) comment '接收回传商品图片id',
     axis        varchar(128) comment '坐标',
+    fmcg_score  varchar(32) comment '商品为标品的可能性',
     primary key (id)
 )
     engine = InnoDB,