|
|
|
@@ -5,6 +5,7 @@ import com.github.pagehelper.PageHelper; |
|
|
|
import com.github.pagehelper.PageInfo; |
|
|
|
import com.iformall.common.ErrorCode; |
|
|
|
import com.iformall.common.IdWorker; |
|
|
|
import com.iformall.common.Result; |
|
|
|
import com.iformall.common.ResultData; |
|
|
|
import com.iformall.domain.po.WxCampaign; |
|
|
|
import com.iformall.domain.po.WxQuestionOneself; |
|
|
|
@@ -175,12 +176,6 @@ public class WxQuestionOneselfServiceImpl implements WxQuestionOneselfService { |
|
|
|
return new ResultData(ErrorCode.QUESTION_SENDUP_ERROR); |
|
|
|
} |
|
|
|
|
|
|
|
WxQuestionOneself record = new WxQuestionOneself(); |
|
|
|
record.setId(id); |
|
|
|
record.setStatus(EnumQuestionOneselfStatus.INJECT_CAMPAIGN.getCode()); |
|
|
|
record.setUpdateDate(new Date()); |
|
|
|
wxQuestionOneselfMapper.updateById(record); |
|
|
|
|
|
|
|
campaignQuery = new WxCampaign(); |
|
|
|
campaignQuery.updateTenantInfo(byId); |
|
|
|
campaignQuery.setProduceId(id); |
|
|
|
@@ -200,7 +195,16 @@ public class WxQuestionOneselfServiceImpl implements WxQuestionOneselfService { |
|
|
|
|
|
|
|
campaign.setPagePath(byId.getWeappPath()); |
|
|
|
campaign.setPageScene(byId.getWeappSceneForJoin()); |
|
|
|
return wxCampaignService.addForPath(campaign); |
|
|
|
ResultData resultData = wxCampaignService.addForPath(campaign); |
|
|
|
|
|
|
|
if(resultData.code == Result.SUCCESS){ |
|
|
|
WxQuestionOneself record = new WxQuestionOneself(); |
|
|
|
record.setId(id); |
|
|
|
record.setStatus(EnumQuestionOneselfStatus.INJECT_CAMPAIGN.getCode()); |
|
|
|
record.setUpdateDate(new Date()); |
|
|
|
wxQuestionOneselfMapper.updateById(record); |
|
|
|
} |
|
|
|
return resultData; |
|
|
|
} |
|
|
|
|
|
|
|
@Transactional(propagation = Propagation.REQUIRED, rollbackFor = {Exception.class}) |
|
|
|
@@ -222,7 +226,7 @@ public class WxQuestionOneselfServiceImpl implements WxQuestionOneselfService { |
|
|
|
|
|
|
|
WxCampaign campaign = new WxCampaign(); |
|
|
|
campaign.updateTenantInfo(byId); |
|
|
|
campaign.setProduceId(record.getId()); |
|
|
|
campaign.setProduceId(byId.getId()); |
|
|
|
WxCampaign wxCampaign = wxCampaignMapper.selectOne(new QueryWrapper(campaign)); |
|
|
|
wxCampaign.setStatus(EnumCampaignStatus.STATUS_TAKE_OFFF.getCode()); |
|
|
|
wxCampaignMapper.updateById(wxCampaign); |
|
|
|
|