|
|
|
@@ -10,6 +10,7 @@ import com.iformall.domain.po.WxActivity; |
|
|
|
import com.iformall.domain.po.WxCampaign; |
|
|
|
import com.iformall.enums.*; |
|
|
|
import com.iformall.mapper.WxActivityMapper; |
|
|
|
import com.iformall.mapper.WxCampaignMapper; |
|
|
|
import com.iformall.service.WxActivityService; |
|
|
|
import com.iformall.service.WxCampaignService; |
|
|
|
import org.apache.commons.lang3.StringUtils; |
|
|
|
@@ -38,7 +39,8 @@ public class WxActivityServiceImpl implements WxActivityService { |
|
|
|
WxActivityMapper wxActivityMapper; |
|
|
|
@Autowired |
|
|
|
WxCampaignService wxCampaignService; |
|
|
|
|
|
|
|
@Autowired |
|
|
|
WxCampaignMapper wxCampaignMapper; |
|
|
|
@Override |
|
|
|
public PageInfo<WxActivity> listAsPage(WxActivity record, Integer pageIndex, Integer pageSize) { |
|
|
|
return PageHelper.startPage(pageIndex, pageSize).doSelectPageInfo(() -> wxActivityMapper.findList(record)); |
|
|
|
@@ -102,6 +104,15 @@ public class WxActivityServiceImpl implements WxActivityService { |
|
|
|
public ResultData updateStatus(WxActivity wxActivity) { |
|
|
|
wxActivity.setUpdateTime(new Date()); |
|
|
|
wxActivityMapper.updateByPrimaryKeySelective(wxActivity); |
|
|
|
if (wxActivity.getStatus().equals(EnumActivityStatus.STATUS_TAKE_OFFF.getCode()) { |
|
|
|
WxCampaign campaign = new WxCampaign(); |
|
|
|
campaign.setType(EnumCampaignType.PAGEPATH.getCode()); |
|
|
|
campaign.setProduceId(wxActivity.getId()); |
|
|
|
campaign.setStatus(EnumCampaignStatus.STATUS_THROW_IN.getCode()); |
|
|
|
WxCampaign wxCampaign = wxCampaignMapper.selectOne(campaign); |
|
|
|
campaign.setStatus(EnumCampaignStatus.STATUS_TAKE_OFFF.getCode()); |
|
|
|
wxCampaignMapper.updateByPrimaryKeySelective(wxCampaign); |
|
|
|
} |
|
|
|
return new ResultData(Result.SUCCESS, "操作成功"); |
|
|
|
} |
|
|
|
|
|
|
|
|