From e38c8eda1b51ad9f50839cb2bd1656383da06d74 Mon Sep 17 00:00:00 2001 From: gongbiao Date: Mon, 29 Jul 2019 13:46:58 +0800 Subject: [PATCH] =?UTF-8?q?[C=E7=AB=AF=E9=A6=96=E9=A1=B5][=E4=BF=AE?= =?UTF-8?q?=E6=94=B9][=E6=8D=A2=E4=B8=80=E6=8D=A2=E6=8B=BC=E5=9B=A2?= =?UTF-8?q?=E5=92=8C=E7=A0=8D=E4=BB=B7]?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../iformall/service/impl/WxCouponChannelServiceImpl.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/mallinkService/src/main/java/com/iformall/service/impl/WxCouponChannelServiceImpl.java b/mallinkService/src/main/java/com/iformall/service/impl/WxCouponChannelServiceImpl.java index 50be841b3..94b1b5dc8 100644 --- a/mallinkService/src/main/java/com/iformall/service/impl/WxCouponChannelServiceImpl.java +++ b/mallinkService/src/main/java/com/iformall/service/impl/WxCouponChannelServiceImpl.java @@ -19,10 +19,14 @@ import com.iformall.service.*; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.beans.factory.config.ConfigurableBeanFactory; +import org.springframework.context.annotation.Scope; +import org.springframework.context.annotation.ScopedProxyMode; import org.springframework.stereotype.Service; import java.util.*; +@Scope(value = ConfigurableBeanFactory.SCOPE_PROTOTYPE, proxyMode = ScopedProxyMode.INTERFACES) @Service public class WxCouponChannelServiceImpl implements WxCouponChannelService { private final Logger logger = LoggerFactory.getLogger(this.getClass()); @@ -140,7 +144,7 @@ public class WxCouponChannelServiceImpl implements WxCouponChannelService { public WxCouponChannelVo change(WxCouponChannel record) { return wxCouponChannelMapper.findVoList(record).parallelStream() .filter(wxCouponChannelVo -> !wxCouponChannelVo.getCouponId().equals(record.getCouponId())) - .findAny().orElseGet(null); + .findAny().orElse(null); } private boolean isCouponMerchantValid(Long couponId) {