From 478b7fc459b704ccc2f021d7ce201ff6fb8e4e14 Mon Sep 17 00:00:00 2001 From: "Stormeye.Wu" Date: Fri, 21 Sep 2018 11:57:01 +0800 Subject: [PATCH] =?UTF-8?q?[=E5=B0=8F=E7=A8=8B=E5=BA=8Fnote][=E6=96=B0?= =?UTF-8?q?=E5=A2=9E]:=E6=96=B0=E5=A2=9E=E5=B0=8F=E7=A8=8B=E5=BA=8F?= =?UTF-8?q?=E5=88=86=E4=BA=AB=E6=8F=90=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../iformall/controller/WxMallController.java | 18 ++++++++++ .../java/com/iformall/domain/po/WxMall.java | 34 +++++++++++++------ .../main/resources/mapper/WxMallMapper.xml | 3 +- 3 files changed, 44 insertions(+), 11 deletions(-) diff --git a/mallinkCApi/src/main/java/com/iformall/controller/WxMallController.java b/mallinkCApi/src/main/java/com/iformall/controller/WxMallController.java index efb2c394e..74516379a 100644 --- a/mallinkCApi/src/main/java/com/iformall/controller/WxMallController.java +++ b/mallinkCApi/src/main/java/com/iformall/controller/WxMallController.java @@ -57,6 +57,24 @@ public class WxMallController extends BaseController { return new ResultData(Result.SUCCESS, "查询成功", resultMap); } + @AuthIgnore + @ApiOperation("根据appId获取") + @GetMapping("/getWeapNote") + @ApiImplicitParam(name = "appId", value = "appId", dataType = "String", paramType = "query", required = true) + public ResultData getWeapNote(String appId) { + WxAppinfo appInfo = wxAppinfoService.getByAppId(appId); + if (appInfo == null) { + return new ResultData(ErrorCode.APP_ID_NOT_FOUND); + } + WxMall mall = wxMallService.getByTenantId(appInfo.getTenantId()); + if (mall == null) { + return new ResultData(ErrorCode.MALL_INFO_NOT_FOUND); + } + Map resultMap = new HashMap(); + resultMap.put("weapNote", mall.getWeapNote()); + return new ResultData(Result.SUCCESS, "查询成功", resultMap); + } + @ApiOperation("根据appId获取") @GetMapping("/mallInfo") @ApiImplicitParam(name = "appId", value = "appId", dataType = "String", paramType = "query", required = true) diff --git a/mallinkService/src/main/java/com/iformall/domain/po/WxMall.java b/mallinkService/src/main/java/com/iformall/domain/po/WxMall.java index 24ca5fab6..879fdff96 100644 --- a/mallinkService/src/main/java/com/iformall/domain/po/WxMall.java +++ b/mallinkService/src/main/java/com/iformall/domain/po/WxMall.java @@ -93,6 +93,9 @@ public class WxMall implements Serializable { @io.swagger.annotations.ApiModelProperty(value="迈外迪url",name="wiwideUrl") private String wiwideUrl; + @io.swagger.annotations.ApiModelProperty(value="小程序提示",name="weapNote") + private String weapNote; + public String getTenantId() { return tenantId; @@ -213,24 +216,34 @@ public class WxMall implements Serializable { this.wiwideUrl = wiwideUrl; } - public static enum Field + public String getWeapNote() { + return weapNote; + } + + public void setWeapNote(String weapNote) { + this.weapNote = weapNote; + } + + public static enum Field { Id_ASC("`id` ASC"),Id_DESC("`id` DESC") - ,TenantId_ASC("`tenantId` ASC"),TenantId_DESC("`tenantId` DESC") + ,TenantId_ASC("`tenant_id` ASC"),TenantId_DESC("`tenant_id` DESC") ,Name_ASC("`name` ASC"),Name_DESC("`name` DESC") ,Group_ASC("`group` ASC"),Group_DESC("`group` DESC") ,Country_ASC("`country` ASC"),Country_DESC("`country` DESC") ,Province_ASC("`province` ASC"),Province_DESC("`province` DESC") ,City_ASC("`city` ASC"),City_DESC("`city` DESC") ,Addr_ASC("`addr` ASC"),Addr_DESC("`addr` DESC") - ,WiwideId_ASC("`wiwideId` ASC"),WiwideId_DESC("`wiwideId` DESC") - ,TotalArea_ASC("`totalArea` ASC"),TotalArea_DESC("`totalArea` DESC") - ,OperatingArea_ASC("`operatingArea` ASC"),OperatingArea_DESC("`operatingArea` DESC") + ,WiwideId_ASC("`wiwide_id` ASC"),WiwideId_DESC("`wiwide_id` DESC") + ,TotalArea_ASC("`total_area` ASC"),TotalArea_DESC("`total_area` DESC") + ,OperatingArea_ASC("`operating_area` ASC"),OperatingArea_DESC("`operating_area` DESC") ,ParkArea_ASC("`parkArea` ASC"),ParkArea_DESC("`parkArea` DESC") - ,ParkPlaceNumber_ASC("`parkPlaceNumber` ASC"),ParkPlaceNumber_DESC("`parkPlaceNumber` DESC") - ,PayId_ASC("`payId` ASC"),PayId_DESC("`payId` DESC") - ,ServicePhone_ASC("`servicePhone` ASC"),ServicePhone_DESC("`servicePhone` DESC") - ,ImgUrl_ASC("`imgUrl` ASC"),ImgUrl_DESC("`imgUrl` DESC") + ,ParkPlaceNumber_ASC("`park_place_number` ASC"),ParkPlaceNumber_DESC("`park_place_number` DESC") + ,PayId_ASC("`pay_id` ASC"),PayId_DESC("`pay_id` DESC") + ,ServicePhone_ASC("`service_phone` ASC"),ServicePhone_DESC("`service_phone` DESC") + ,ImgUrl_ASC("`img_url` ASC"),ImgUrl_DESC("`img_url` DESC") + ,ImgUrlH_ASC("`img_url_h` ASC"),ImgUrlH_DESC("`img_url_h` DESC") + ,WeapNote_ASC("`weap_note` ASC"),WeapNote_DESC("`weap_note` DESC") ; private String value; Field(String value){ @@ -263,7 +276,8 @@ public class WxMall implements Serializable { sb.append(","); sb.append(fields[k].toString()); } - + + this.sortColumns = sb.toString(); } public void setSortColumns(String sortColumns) diff --git a/mallinkService/src/main/resources/mapper/WxMallMapper.xml b/mallinkService/src/main/resources/mapper/WxMallMapper.xml index 6420525f0..cb0f40c89 100644 --- a/mallinkService/src/main/resources/mapper/WxMallMapper.xml +++ b/mallinkService/src/main/resources/mapper/WxMallMapper.xml @@ -21,11 +21,12 @@ + - `id`,`tenant_id`,`name`,`group`,`country`,`province`,`city`,`addr`,`wiwide_id`,`total_area`,`operating_area`,`park_area`,`park_place_number`,`pay_id`,`service_phone`,`img_url`,`img_url_h`,`wiwide_key`,`wiwide_url` + `id`,`tenant_id`,`name`,`group`,`country`,`province`,`city`,`addr`,`wiwide_id`,`total_area`,`operating_area`,`park_area`,`park_place_number`,`pay_id`,`service_phone`,`img_url`,`img_url_h`,`wiwide_key`,`wiwide_url`, `weap_note`