From bf27f74bdf6bef7e1fff225e45ed149ec8c77f95 Mon Sep 17 00:00:00 2001 From: gongbiao Date: Mon, 15 Jul 2019 16:14:51 +0800 Subject: [PATCH] =?UTF-8?q?[=E7=A7=9F=E8=B5=81=E6=A6=82=E8=A7=88][?= =?UTF-8?q?=E4=BF=AE=E6=94=B9][=E6=8C=89=E4=B8=9A=E6=80=81=E6=9F=A5?= =?UTF-8?q?=E8=AF=A2=E5=9B=BE=E8=A1=A8=E5=8F=8A=E5=BA=97=E9=93=BA=E5=87=BA?= =?UTF-8?q?=E7=A7=9F=E6=95=B0=E6=8D=AE]?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../migration/V201907151610__G_ALTER_SHOP.sql | 1 + .../java/com/iformall/domain/po/WxShop.java | 4 ++-- .../service/impl/WxChartServiceImpl.java | 10 +++++----- .../main/resources/mapper/WxShopMapper.xml | 19 ++++++++++--------- 4 files changed, 18 insertions(+), 16 deletions(-) create mode 100644 mallinkAdmin/src/main/resources/db/migration/V201907151610__G_ALTER_SHOP.sql diff --git a/mallinkAdmin/src/main/resources/db/migration/V201907151610__G_ALTER_SHOP.sql b/mallinkAdmin/src/main/resources/db/migration/V201907151610__G_ALTER_SHOP.sql new file mode 100644 index 000000000..8112cfe8c --- /dev/null +++ b/mallinkAdmin/src/main/resources/db/migration/V201907151610__G_ALTER_SHOP.sql @@ -0,0 +1 @@ +alter table wx_shop change column `business` business_id int(11) default 0 COMMENT '预置业态'; 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 3650a78b4..83df35b6b 100644 --- a/mallinkService/src/main/java/com/iformall/domain/po/WxShop.java +++ b/mallinkService/src/main/java/com/iformall/domain/po/WxShop.java @@ -133,8 +133,8 @@ public class WxShop extends BaseEntity { @io.swagger.annotations.ApiModelProperty(value = "参考租金", name = "rent") private Integer rent; - @io.swagger.annotations.ApiModelProperty(value = "预置业态", name = "business") - private Long business; + @io.swagger.annotations.ApiModelProperty(value = "预置业态", name = "businessId") + private Long businessId; @io.swagger.annotations.ApiModelProperty(value = "租金单位", name = "rentUnit") private Integer rentUnit; diff --git a/mallinkService/src/main/java/com/iformall/service/impl/WxChartServiceImpl.java b/mallinkService/src/main/java/com/iformall/service/impl/WxChartServiceImpl.java index 6a1454dbb..7e9ac4f36 100644 --- a/mallinkService/src/main/java/com/iformall/service/impl/WxChartServiceImpl.java +++ b/mallinkService/src/main/java/com/iformall/service/impl/WxChartServiceImpl.java @@ -453,16 +453,16 @@ public class WxChartServiceImpl implements WxChartDataService { String building = paramsMap.get("building"); String floor = paramsMap.get("floor"); - String business = paramsMap.get("business"); + String business = paramsMap.get("businessId"); if (StringUtils.isNotEmpty(building)) { queryMap.put("building", building); } if (StringUtils.isNotEmpty(floor)) { - queryMap.put("floor", building); + queryMap.put("floor", floor); } if (StringUtils.isNotEmpty(business)) { - queryMap.put("business", building); + queryMap.put("businessId", business); } // get all @@ -2453,7 +2453,7 @@ public class WxChartServiceImpl implements WxChartDataService { String tenantId = paramMap.get("tenantId"); String building = paramMap.get("building"); String floor = paramMap.get("floor"); - String business = paramMap.get("business"); + String business = paramMap.get("businessId"); if (StringUtils.isNotEmpty(tenantId)) { query.setTenantId(tenantId); @@ -2465,7 +2465,7 @@ public class WxChartServiceImpl implements WxChartDataService { query.setFloor(Long.valueOf(floor)); } if (StringUtils.isNotEmpty(business)) { - query.setBusiness(Long.valueOf(business)); + query.setBusinessId(Long.valueOf(business)); } query.setType(null); Long total = wxShopMapper.getCountByWxShop(query); diff --git a/mallinkService/src/main/resources/mapper/WxShopMapper.xml b/mallinkService/src/main/resources/mapper/WxShopMapper.xml index 56444c8a1..b87adafd9 100644 --- a/mallinkService/src/main/resources/mapper/WxShopMapper.xml +++ b/mallinkService/src/main/resources/mapper/WxShopMapper.xml @@ -28,14 +28,14 @@ - + `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,rent_unit,business + `type`,`point_type`,`comments`,`is_del`,DATEDIFF(now(),create_date) freeDay,rent,rent_unit,business_id @@ -156,7 +156,8 @@ 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,rent_unit,business + s.type,s.point_type pointType,s.addr,DATEDIFF(now(),s.create_date) freeDay,rent,rent_unit,business_id as + businessId 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 @@ -443,8 +444,8 @@ and s.`point_type` = #{pointType} - - and s.business = #{business} + + and s.business_id = #{businessId} @@ -565,8 +566,8 @@ and `create_date` <= #{enddate} - - and business = #{business} + + and business_id = #{businessId} @@ -588,8 +589,8 @@ and s.floor=#{floor} - - and s.business=#{business} + + and s.business_id=#{businessId} group by xTime order by xTime