| @@ -1,92 +0,0 @@ | |||||
| package com.iformall.service; | |||||
| import com.github.pagehelper.PageInfo; | |||||
| import com.iformall.common.ResultData; | |||||
| import com.iformall.domain.po.base.TenantEntity; | |||||
| import com.iformall.domain.po.WxCoupon; | |||||
| import com.iformall.domain.po.WxCouponChannel; | |||||
| import com.iformall.domain.vo.TtCouponChannelVo; | |||||
| import com.iformall.domain.vo.WxCouponCVo; | |||||
| import com.iformall.domain.vo.WxCouponChannelAddVo; | |||||
| import com.iformall.domain.vo.WxCouponChannelVo; | |||||
| import com.iformall.enums.EnumPayWay; | |||||
| import java.util.Date; | |||||
| import java.util.List; | |||||
| public interface WxCouponChannelService { | |||||
| /** | |||||
| * 根据实体查询分页列表 | |||||
| * | |||||
| * @param record | |||||
| * @param pageIndex | |||||
| * @param pageSize | |||||
| * @return | |||||
| */ | |||||
| PageInfo<WxCouponChannel> listAsPage(WxCouponChannel record, Integer pageIndex, Integer pageSize); | |||||
| List<WxCouponChannel> findList(WxCouponChannel record); | |||||
| List<Long> findCouponIdList(WxCouponChannel record); | |||||
| WxCouponCVo findDetailVo(Long id,String tenantId,boolean hasMerchant); | |||||
| WxCouponCVo findVoStatusDetail(Long id,String tenantId); | |||||
| /** | |||||
| * 根据Id获得实体 | |||||
| * | |||||
| * @param id | |||||
| * @return | |||||
| */ | |||||
| WxCouponChannel getById(Long id,String tenantId); | |||||
| /** | |||||
| * 保存或更新实体 | |||||
| * | |||||
| * @param record | |||||
| */ | |||||
| ResultData saveOrUpdate(WxCouponChannel record); | |||||
| void spuStatusSyncByCoupon(TenantEntity tenantEntity,Long couponId); | |||||
| /** | |||||
| * 创建二维码 | |||||
| */ | |||||
| void updateQrCode(TenantEntity tenantEntity, Long couponChannelId, Integer couponType); | |||||
| ResultData addBatch(String type,String[] ids, String[] channelId, TenantEntity tenantEntity, Date showBeginTime, Date beginTime, Date endTime,Integer channelPrice,Integer channelStock); | |||||
| WxCouponChannelAddVo addCouponChannel(Long couponid, Integer channelId, TenantEntity tenantEntity, Date showBeginTime, Date beginTime, Date endTime, Integer channelPrice, Integer channelStock); | |||||
| void updateStatusByCouponId(Long couponId,TenantEntity tenantEntity,int status); | |||||
| ResultData change(WxCouponChannel wxCouponChannel); | |||||
| int countCoupon(WxCouponChannel wxCouponChannel); | |||||
| List<WxCouponChannelVo> newfindListVo(WxCouponChannel wxCouponChannel); | |||||
| PageInfo<WxCouponChannelVo> newListPageVo(WxCouponChannel record, Integer pageIndex, Integer pageSize); | |||||
| PageInfo<WxCoupon> liveHomePage(WxCouponChannel record, Integer pageIndex, Integer pageSize); | |||||
| void reduceChannelStock(TenantEntity tenantEntity,Long couponChannelId, Integer number); | |||||
| void backChannelStock(TenantEntity tenantEntity,Long couponChannelId, Integer number); | |||||
| void setChannelStock(WxCouponChannel record,Integer number); | |||||
| void releaseChannelStock(WxCouponChannel record); | |||||
| void setChannelPrice(WxCouponChannel record); | |||||
| WxCouponChannel getPriceAndStock(TenantEntity tenantEntity,Long couponChannelId); | |||||
| List<WxCouponChannel> getPriceAndStock(TenantEntity tenantEntity,List<Long> couponChannelIds); | |||||
| ResultData getCouponChannelPoi(TenantEntity tenantInfo, Long id); | |||||
| PageInfo<TtCouponChannelVo> ttChannelList(TtCouponChannelVo ttChannelVo, Integer pageNum, Integer pageSize); | |||||
| ResultData updateOnline(WxCouponChannel wxCouponChannel); | |||||
| Long getCouponOneMerchantId(Long couponChannelId, String tenantId); | |||||
| // String getCouponOneMerchantUid(EnumPayWay payWay,Long merchantId, String tenantId); | |||||
| } | |||||
| @@ -54,8 +54,6 @@ public class TtCouponGoodsServiceImpl implements TtCouponGoodsService { | |||||
| @Autowired | @Autowired | ||||
| WxCouponChannelMapper wxCouponChannelMapper; | WxCouponChannelMapper wxCouponChannelMapper; | ||||
| @Autowired | |||||
| WxCouponChannelService wxCouponChannelService; | |||||
| @Autowired | @Autowired | ||||
| WxMerchantMapper wxMerchantMapper; | WxMerchantMapper wxMerchantMapper; | ||||
| @@ -16,7 +16,6 @@ import com.iformall.mapper.WxCampaignMapper; | |||||
| import com.iformall.mapper.WxCouponChannelMapper; | import com.iformall.mapper.WxCouponChannelMapper; | ||||
| import com.iformall.mapper.WxQuestionOneselfMapper; | import com.iformall.mapper.WxQuestionOneselfMapper; | ||||
| import com.iformall.service.WxCampaignService; | import com.iformall.service.WxCampaignService; | ||||
| import com.iformall.service.WxCouponChannelService; | |||||
| import com.iformall.utils.Constant; | import com.iformall.utils.Constant; | ||||
| import org.apache.commons.lang3.StringUtils; | import org.apache.commons.lang3.StringUtils; | ||||
| import org.slf4j.Logger; | import org.slf4j.Logger; | ||||
| @@ -15,7 +15,6 @@ import com.iformall.enums.*; | |||||
| import com.iformall.mapper.WxCouponChannelMapper; | import com.iformall.mapper.WxCouponChannelMapper; | ||||
| import com.iformall.mapper.WxCouponMapper; | import com.iformall.mapper.WxCouponMapper; | ||||
| import com.iformall.mapper.WxTopicMapper; | import com.iformall.mapper.WxTopicMapper; | ||||
| import com.iformall.service.WxCouponChannelService; | |||||
| import com.iformall.service.WxTopicService; | import com.iformall.service.WxTopicService; | ||||
| import com.iformall.utils.Constant; | import com.iformall.utils.Constant; | ||||
| import com.iformall.utils.DateUtils; | import com.iformall.utils.DateUtils; | ||||
| @@ -45,8 +44,6 @@ public class WxTopicServiceImpl implements WxTopicService { | |||||
| @Autowired | @Autowired | ||||
| private WxCouponChannelMapper wxCouponChannelMapper; | private WxCouponChannelMapper wxCouponChannelMapper; | ||||
| @Autowired | |||||
| private WxCouponChannelService wxCouponChannelService; | |||||
| @Override | @Override | ||||
| public PageInfo<WxTopic> listAsPage(WxTopic record, Integer pageIndex, Integer pageSize) { | public PageInfo<WxTopic> listAsPage(WxTopic record, Integer pageIndex, Integer pageSize) { | ||||
| @@ -164,7 +161,6 @@ public class WxTopicServiceImpl implements WxTopicService { | |||||
| wxCouponChannel.setSubBusiness(wxCoupon.getSubBusiness()); | wxCouponChannel.setSubBusiness(wxCoupon.getSubBusiness()); | ||||
| wxCouponChannelMapper.insert(wxCouponChannel); | wxCouponChannelMapper.insert(wxCouponChannel); | ||||
| wxCouponChannelService.updateQrCode(wxCouponChannel,wxCouponChannel.getId(),wxCouponChannel.getType()); | |||||
| } | } | ||||
| } | } | ||||
| @@ -201,11 +197,6 @@ public class WxTopicServiceImpl implements WxTopicService { | |||||
| } | } | ||||
| PageInfo<WxCouponChannelVo> wxCouponChannelVoPageInfo = wxCouponChannelService.newListPageVo(wxCouponChannel, 1, pageSize); | |||||
| if(wxCouponChannelVoPageInfo != null && wxCouponChannelVoPageInfo.getList() != null | |||||
| && wxCouponChannelVoPageInfo.getList().size() > 0){ | |||||
| record.setCouponList(wxCouponChannelVoPageInfo.getList()); | |||||
| } | |||||
| } | } | ||||
| @@ -241,8 +232,6 @@ public class WxTopicServiceImpl implements WxTopicService { | |||||
| wxCouponChannel.setSortColumns(BaseEntity.SortField.CCUpdateDate_DESC, BaseEntity.SortField.CCId_DESC); | wxCouponChannel.setSortColumns(BaseEntity.SortField.CCUpdateDate_DESC, BaseEntity.SortField.CCId_DESC); | ||||
| wxCouponChannel.setShowBeginTime(new Date()); | wxCouponChannel.setShowBeginTime(new Date()); | ||||
| wxCouponChannel.setSubTargetId(wxTopic.getId()); | wxCouponChannel.setSubTargetId(wxTopic.getId()); | ||||
| List<WxCouponChannelVo> voList = wxCouponChannelService.newfindListVo(wxCouponChannel); | |||||
| wxTopic.setCouponList(voList); | |||||
| } | } | ||||
| return wxTopic; | return wxTopic; | ||||
| } | } | ||||