From 1ae8dead852ccb9cf451ef12c53e786b191594b4 Mon Sep 17 00:00:00 2001 From: xiaohanzi Date: Mon, 4 Jan 2021 17:49:12 +0800 Subject: [PATCH 1/3] fix --- .../service/impl/WxCouponPasswordServiceImpl.java | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/mallinkService/src/main/java/com/iformall/service/impl/WxCouponPasswordServiceImpl.java b/mallinkService/src/main/java/com/iformall/service/impl/WxCouponPasswordServiceImpl.java index cf2e9fe0c..0a5d6213d 100644 --- a/mallinkService/src/main/java/com/iformall/service/impl/WxCouponPasswordServiceImpl.java +++ b/mallinkService/src/main/java/com/iformall/service/impl/WxCouponPasswordServiceImpl.java @@ -119,7 +119,16 @@ public class WxCouponPasswordServiceImpl implements WxCouponPasswordService { } String pwd = sb.toString(); if (!pwList.stream().anyMatch(oPwd->oPwd.equals(pwd))) { - pwList.add(pwd); + //判断是否已经在数据库里面是否存在了 + WxCouponPassword pwQ1 = new WxCouponPassword(); + pwQ1.updateTenantInfo(tenantEntity); + pwQ1.setPassword(pwd); + List palist = wxCouponPasswordMapper.findList(pwQ1); + if (null != palist && palist.size() > 0 ) { + continue; + }else { + pwList.add(pwd); + } } else { continue; } From 666294219472c8b3c08de85f75b0d22d22ee639c Mon Sep 17 00:00:00 2001 From: xiaohanzi Date: Tue, 5 Jan 2021 14:21:14 +0800 Subject: [PATCH 2/3] fix bug --- .../com/iformall/controller/WxCuserFloatingLayerController.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mallinkCApi/src/main/java/com/iformall/controller/WxCuserFloatingLayerController.java b/mallinkCApi/src/main/java/com/iformall/controller/WxCuserFloatingLayerController.java index 3f46ef31f..88b4c7c03 100755 --- a/mallinkCApi/src/main/java/com/iformall/controller/WxCuserFloatingLayerController.java +++ b/mallinkCApi/src/main/java/com/iformall/controller/WxCuserFloatingLayerController.java @@ -28,7 +28,7 @@ public class WxCuserFloatingLayerController extends BaseController { @Autowired WxCuserFloatingLayerService wxCuserFloatingLayerService; -// @AuthIgnore + @AuthIgnore @ApiOperation("获取浮层") @GetMapping("/getFloatingLayer") @ApiImplicitParams({ From e5569d069e9f5fffcfd953405cc9ef554bf8b3bf Mon Sep 17 00:00:00 2001 From: xiaohanzi Date: Tue, 5 Jan 2021 14:41:50 +0800 Subject: [PATCH 3/3] 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); }