From c03995f2171907c339cf3f8c5a131523f29fc755 Mon Sep 17 00:00:00 2001 From: hupeng Date: Wed, 8 May 2019 20:59:30 +0800 Subject: [PATCH] =?UTF-8?q?[=E5=81=9C=E8=BD=A6][=E4=BF=AE=E5=A4=8D]:?= =?UTF-8?q?=E5=81=9C=E8=BD=A6=E5=8F=91=E5=88=B8=E8=A7=A6=E5=8F=91=E6=95=B0?= =?UTF-8?q?=E9=87=8F=E7=AE=97=E6=B3=95=E6=9B=B4=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../migration/V201905082030__ADD_COLUMN_PLATENUMBER.sql | 4 ++++ .../src/main/resources/mapper/WxCarCmdLogMapper.xml | 8 ++++++-- 2 files changed, 10 insertions(+), 2 deletions(-) create mode 100644 mallinkAdmin/src/main/resources/db/migration/V201905082030__ADD_COLUMN_PLATENUMBER.sql diff --git a/mallinkAdmin/src/main/resources/db/migration/V201905082030__ADD_COLUMN_PLATENUMBER.sql b/mallinkAdmin/src/main/resources/db/migration/V201905082030__ADD_COLUMN_PLATENUMBER.sql new file mode 100644 index 000000000..3895904d4 --- /dev/null +++ b/mallinkAdmin/src/main/resources/db/migration/V201905082030__ADD_COLUMN_PLATENUMBER.sql @@ -0,0 +1,4 @@ +ALTER TABLE `wx_car_cmd_log` +ADD COLUMN `plateNumber` VARCHAR(32) GENERATED ALWAYS AS (json_unquote(json_extract(`cmd_json`,'$.plateNumber'))) VIRTUAL AFTER `cmd_json`; +ALTER TABLE `wx_car_cmd_log` +ADD INDEX `idx_plateNumber` (`plateNumber` ASC, `tenant_id` ASC); \ No newline at end of file diff --git a/mallinkService/src/main/resources/mapper/WxCarCmdLogMapper.xml b/mallinkService/src/main/resources/mapper/WxCarCmdLogMapper.xml index d56b1362d..4106c20e5 100644 --- a/mallinkService/src/main/resources/mapper/WxCarCmdLogMapper.xml +++ b/mallinkService/src/main/resources/mapper/WxCarCmdLogMapper.xml @@ -100,8 +100,12 @@