|
|
|
@@ -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()); |
|
|
|
|