From 35e01a58e9464447c3469d1333a02cd2be020691 Mon Sep 17 00:00:00 2001 From: gongbiao Date: Mon, 30 Sep 2019 11:38:14 +0800 Subject: [PATCH] =?UTF-8?q?[=E6=B5=AE=E5=B1=82=E5=B9=BF=E5=91=8A][?= =?UTF-8?q?=E4=BF=AE=E6=94=B9][C=E7=AB=AF=E8=AE=BF=E9=97=AE]?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../controller/WxCuserFloatingLayerController.java | 9 ++++++--- .../iformall/service/WxCuserFloatingLayerService.java | 2 +- .../service/impl/WxCuserFloatingLayerServiceImpl.java | 3 ++- 3 files changed, 9 insertions(+), 5 deletions(-) diff --git a/mallinkCApi/src/main/java/com/iformall/controller/WxCuserFloatingLayerController.java b/mallinkCApi/src/main/java/com/iformall/controller/WxCuserFloatingLayerController.java index 9df67b6c2..88b4c7c03 100755 --- a/mallinkCApi/src/main/java/com/iformall/controller/WxCuserFloatingLayerController.java +++ b/mallinkCApi/src/main/java/com/iformall/controller/WxCuserFloatingLayerController.java @@ -7,6 +7,7 @@ import com.iformall.domain.po.WxFloatingLayer; import com.iformall.service.WxCuserFloatingLayerService; import io.swagger.annotations.Api; import io.swagger.annotations.ApiImplicitParam; +import io.swagger.annotations.ApiImplicitParams; import io.swagger.annotations.ApiOperation; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -30,9 +31,11 @@ public class WxCuserFloatingLayerController extends BaseController { @AuthIgnore @ApiOperation("获取浮层") @GetMapping("/getFloatingLayer") - @ApiImplicitParam(name = "openId", value = "openId", dataType = "String", paramType = "query", required = true) - public ResultData getAppIcon(String openId) { - WxFloatingLayer wxFloatingLayer = wxCuserFloatingLayerService.getFloatingLayer(openId); + @ApiImplicitParams({ + @ApiImplicitParam(name = "openId", value = "openId", dataType = "String", paramType = "query", required = true), + @ApiImplicitParam(name = "appId", value = "appId", dataType = "String", paramType = "query", required = true)}) + public ResultData getAppIcon(String openId, String appId) { + WxFloatingLayer wxFloatingLayer = wxCuserFloatingLayerService.getFloatingLayer(openId, appId); return new ResultData(Result.SUCCESS, "查询成功", wxFloatingLayer); } diff --git a/mallinkService/src/main/java/com/iformall/service/WxCuserFloatingLayerService.java b/mallinkService/src/main/java/com/iformall/service/WxCuserFloatingLayerService.java index 6e175d55f..1b16f1abd 100644 --- a/mallinkService/src/main/java/com/iformall/service/WxCuserFloatingLayerService.java +++ b/mallinkService/src/main/java/com/iformall/service/WxCuserFloatingLayerService.java @@ -7,6 +7,6 @@ import com.iformall.domain.po.WxFloatingLayer; */ public interface WxCuserFloatingLayerService { - WxFloatingLayer getFloatingLayer(String openId); + WxFloatingLayer getFloatingLayer(String openId, String appId); } diff --git a/mallinkService/src/main/java/com/iformall/service/impl/WxCuserFloatingLayerServiceImpl.java b/mallinkService/src/main/java/com/iformall/service/impl/WxCuserFloatingLayerServiceImpl.java index f34658896..2961c80c0 100644 --- a/mallinkService/src/main/java/com/iformall/service/impl/WxCuserFloatingLayerServiceImpl.java +++ b/mallinkService/src/main/java/com/iformall/service/impl/WxCuserFloatingLayerServiceImpl.java @@ -35,10 +35,11 @@ public class WxCuserFloatingLayerServiceImpl implements WxCuserFloatingLayerServ @Override - public WxFloatingLayer getFloatingLayer(String openId) { + public WxFloatingLayer getFloatingLayer(String openId, String appId) { //1 查看是否存在用户,用户不存在 直接返回浮层信息 WxCUser user = new WxCUser(); user.setOpenId(openId); + user.setAppId(appId); WxCUser byOpenId = wxCUserMapper.findByOpenId(user); String tenantId = byOpenId.getTenantId(); if (byOpenId == null) {