From 4d11285d99253dc054f259ae780bc3ff782f1bee Mon Sep 17 00:00:00 2001 From: gongbiao Date: Mon, 15 Jul 2019 15:52:55 +0800 Subject: [PATCH] =?UTF-8?q?[Sql][=E4=BF=AE=E6=94=B9][=E4=B8=BAwx=5Fshop?= =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E7=A7=9F=E9=87=91=E5=8D=95=E4=BD=8D=E5=AD=97?= =?UTF-8?q?=E6=AE=B5]?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../db/migration/V201907151540__G_ALTER_SHOP.sql | 1 + .../src/main/java/com/iformall/domain/po/WxShop.java | 3 +++ .../src/main/resources/mapper/WxShopMapper.xml | 9 ++++++--- 3 files changed, 10 insertions(+), 3 deletions(-) create mode 100644 mallinkAdmin/src/main/resources/db/migration/V201907151540__G_ALTER_SHOP.sql diff --git a/mallinkAdmin/src/main/resources/db/migration/V201907151540__G_ALTER_SHOP.sql b/mallinkAdmin/src/main/resources/db/migration/V201907151540__G_ALTER_SHOP.sql new file mode 100644 index 000000000..814c3b945 --- /dev/null +++ b/mallinkAdmin/src/main/resources/db/migration/V201907151540__G_ALTER_SHOP.sql @@ -0,0 +1 @@ +alter table wx_shop add column `rent_unit` TINYINT(4) DEFAULT '1' COMMENT '租金单位1日2月3年'; diff --git a/mallinkService/src/main/java/com/iformall/domain/po/WxShop.java b/mallinkService/src/main/java/com/iformall/domain/po/WxShop.java index 65691922b..3650a78b4 100644 --- a/mallinkService/src/main/java/com/iformall/domain/po/WxShop.java +++ b/mallinkService/src/main/java/com/iformall/domain/po/WxShop.java @@ -136,6 +136,9 @@ public class WxShop extends BaseEntity { @io.swagger.annotations.ApiModelProperty(value = "预置业态", name = "business") private Long business; + @io.swagger.annotations.ApiModelProperty(value = "租金单位", name = "rentUnit") + private Integer rentUnit; + public static enum Field { Id_ASC("s.`id` ASC"), Id_DESC("s.`id` DESC"), TenantId_ASC("s.`tenant_id` ASC"), TenantId_DESC("s.`tenant_id` DESC"), ShopNumber_ASC("s.`shop_number` ASC"), ShopNumber_DESC("s.`shop_number` DESC"), BuildArea_ASC("s.`build_area` ASC"), BuildArea_DESC("s.`build_area` DESC"), OperationArea_ASC("s.`operation_area` ASC"), OperationArea_DESC("s.`operation_area` DESC"), Building_ASC("s.`building` ASC"), Building_DESC("s.`building` DESC"), Floor_ASC("s.`floor` ASC"), Floor_DESC("s.`floor` DESC"), Status_ASC("s.`status` ASC"), Status_DESC("s.`status` DESC"), X_ASC("s.`x` ASC"), X_DESC("s.`x` DESC"), Y_ASC("s.`y` ASC"), Y_DESC("s.`y` DESC"), Addr_ASC("s.`addr` ASC"), Addr_DESC("s.`addr` DESC"), BaiduPoi_ASC("s.`baidu_poi` ASC"), BaiduPoi_DESC("s.`baidu_poi` DESC"), Longitude_ASC("s.`longitude` ASC"), Longitude_DESC("s.`longitude` DESC"), Latitude_ASC("s.`latitude` ASC"), Latitude_DESC("s.`latitude` DESC"), CreateDate_ASC("`s.create_date` ASC"), CreateDate_DESC("s.`create_date` DESC"), UpdateDate_ASC("s.`update_date` ASC"), UpdateDate_DESC("s.`update_date` DESC") diff --git a/mallinkService/src/main/resources/mapper/WxShopMapper.xml b/mallinkService/src/main/resources/mapper/WxShopMapper.xml index ff9df295b..e72b750d9 100644 --- a/mallinkService/src/main/resources/mapper/WxShopMapper.xml +++ b/mallinkService/src/main/resources/mapper/WxShopMapper.xml @@ -25,14 +25,17 @@ - + + + + `id`,`tenant_id`,`shop_number`,`build_area`,`operation_area`,`building`,`floor`,`status`,`x`,`y`,`addr`, `baidu_poi`,`longitude`,`latitude`,`create_date`,`update_date`,`img_url`,`manager`,`manager_phone`, - `type`,`point_type`,`comments`,`is_del`,DATEDIFF(now(),create_date) freeDay,rent,business + `type`,`point_type`,`comments`,`is_del`,DATEDIFF(now(),create_date) freeDay,rent,rent_unit,business @@ -153,7 +156,7 @@ s.img_url imgUrl,CONVERT(s.operation_area,DECIMAL(10,2)) operationArea, s.status,b.building_name building,f.floor_name floor,m.`name` merchantName,m.id merchantId, m.link_person linkPerson,m.link_phone linkPhone,s.manager,s.manager_phone managerPhone, - s.type,s.point_type pointType,s.addr,DATEDIFF(now(),s.create_date) freeDay,rent,business + s.type,s.point_type pointType,s.addr,DATEDIFF(now(),s.create_date) freeDay,rent,rent_unit,business from wx_shop s left join wx_merchant_shop ms on ms.shop_id=s.id and ms.is_del=0 left join wx_merchant m on ms.merchant_id=m.id left join wx_mall_building b on s.building=b.id