|
|
|
@@ -104,7 +104,25 @@ public class WxCampaignServiceImpl implements WxCampaignService { |
|
|
|
if (length >= 0xFFFFFF) { //Mysql MiddleText length limited |
|
|
|
return new ResultData(ErrorCode.SYS_PARAMETER_ERROR.getCode(), "图文内容过大无法保存"); |
|
|
|
} |
|
|
|
} else { |
|
|
|
} else if(wxCampaign.getType().equals(EnumCampaignType.PAGEPATH.getCode())) { |
|
|
|
if (StringUtils.isBlank(wxCampaign.getCoverImg())) { |
|
|
|
return new ResultData(ErrorCode.SYS_PARAMETER_NOT_NULL.getCode(), "封面图不能为空"); |
|
|
|
} |
|
|
|
if (wxCampaign.getProduceType() == null) { |
|
|
|
return new ResultData(ErrorCode.SYS_PARAMETER_NOT_NULL.getCode(), "produceType不能为空"); |
|
|
|
} |
|
|
|
if (wxCampaign.getProduceType().equals(EnumCampaignProductType.ACTIVITY_JOIN.getCode()) |
|
|
|
&& wxCampaign.getProduceId() == null) { |
|
|
|
return new ResultData(ErrorCode.SYS_PARAMETER_NOT_NULL.getCode(), "produceId不能为空"); |
|
|
|
} |
|
|
|
if (StringUtils.isBlank(wxCampaign.getPagePath())) { |
|
|
|
return new ResultData(ErrorCode.SYS_PARAMETER_NOT_NULL.getCode(), "pagePath不能为空"); |
|
|
|
} |
|
|
|
}else if(wxCampaign.getType().equals(EnumCampaignType.TAPPPATH.getCode())) { |
|
|
|
if (StringUtils.isBlank(wxCampaign.getCoverImg())) { |
|
|
|
return new ResultData(ErrorCode.SYS_PARAMETER_NOT_NULL.getCode(), "封面图不能为空"); |
|
|
|
} |
|
|
|
}else { |
|
|
|
return new ResultData(ErrorCode.SYS_PARAMETER_ERROR); |
|
|
|
} |
|
|
|
wxCampaign.setStatus(EnumCampaignStatus.STATUS_THROW_IN.getCode()); |
|
|
|
|