From e5569d069e9f5fffcfd953405cc9ef554bf8b3bf Mon Sep 17 00:00:00 2001 From: xiaohanzi Date: Tue, 5 Jan 2021 14:41:50 +0800 Subject: [PATCH] fix bug --- .../iformall/controller/WxCuserFloatingLayerController.java | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/mallinkCApi/src/main/java/com/iformall/controller/WxCuserFloatingLayerController.java b/mallinkCApi/src/main/java/com/iformall/controller/WxCuserFloatingLayerController.java index 88b4c7c03..e5fdf77bb 100755 --- a/mallinkCApi/src/main/java/com/iformall/controller/WxCuserFloatingLayerController.java +++ b/mallinkCApi/src/main/java/com/iformall/controller/WxCuserFloatingLayerController.java @@ -9,6 +9,8 @@ import io.swagger.annotations.Api; import io.swagger.annotations.ApiImplicitParam; import io.swagger.annotations.ApiImplicitParams; import io.swagger.annotations.ApiOperation; + +import org.apache.commons.lang3.StringUtils; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.beans.factory.annotation.Autowired; @@ -35,6 +37,9 @@ public class WxCuserFloatingLayerController extends BaseController { @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) { + if (StringUtils.isBlank(openId)) { + return new ResultData(Result.UNLOGIN, "用户openId不能为空", null); + } WxFloatingLayer wxFloatingLayer = wxCuserFloatingLayerService.getFloatingLayer(openId, appId); return new ResultData(Result.SUCCESS, "查询成功", wxFloatingLayer); }