From e4537c33c511b66b77a882367c67d0ddab228a05 Mon Sep 17 00:00:00 2001 From: gongbiao Date: Thu, 4 Jul 2019 17:50:51 +0800 Subject: [PATCH] =?UTF-8?q?[=E6=B4=BB=E5=8A=A8][=E4=BF=AE=E6=94=B9][?= =?UTF-8?q?=E9=94=99=E8=AF=AF=E6=8C=87=E7=A4=BA]?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/iformall/service/impl/WxActivityServiceImpl.java | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/mallinkService/src/main/java/com/iformall/service/impl/WxActivityServiceImpl.java b/mallinkService/src/main/java/com/iformall/service/impl/WxActivityServiceImpl.java index 109cfefe6..964431b51 100644 --- a/mallinkService/src/main/java/com/iformall/service/impl/WxActivityServiceImpl.java +++ b/mallinkService/src/main/java/com/iformall/service/impl/WxActivityServiceImpl.java @@ -159,13 +159,14 @@ public class WxActivityServiceImpl implements WxActivityService { WxCampaign campaignQuery = new WxCampaign(); campaignQuery.setStatus(EnumCampaignStatus.STATUS_THROW_IN.getCode()); int count = wxCampaignMapper.selectCount(campaignQuery); - if (count == 7) { - throw new MallinkException(ErrorCode.ACTIVITY_SEND_ERROR); + int campaignTotal = 7; + if (count == campaignTotal) { + return new ResultData(ErrorCode.ACTIVITY_SEND_ERROR); } //修改投放状态 WxActivity wxActivity = wxActivityMapper.selectByPrimaryKey(id); if (wxActivity.getEndTime().before(new Date())) { - throw new MallinkException(ErrorCode.ACTIVITY_JOIN_TIME_END); + return new ResultData(ErrorCode.ACTIVITY_JOIN_TIME_END); } wxActivity.setStatus(EnumActivityStatus.INJECT_CAMPAIGN.getCode()); wxActivity.setUpdateTime(new Date());