|
- package com.iformall.service;
-
- import java.util.*;
-
- import javax.servlet.http.HttpServletRequest;
- import javax.servlet.http.HttpServletResponse;
-
- import com.github.pagehelper.PageInfo;
- import com.iformall.common.ResultData;
- import com.iformall.domain.po.TtCouponChannelPoi;
- import com.iformall.domain.po.WxAppinfo;
- import com.iformall.domain.po.WxCoupon;
- import com.iformall.domain.po.WxMall;
- import com.iformall.domain.po.WxMerchant;
- import com.iformall.domain.po.base.TenantEntity;
- import com.iformall.domain.vo.TtCouponVo;
- import com.iformall.domain.vo.WxCouponCVo;
- import com.iformall.domain.vo.WxCouponStatisVo;
- import com.iformall.domain.vo.WxMerchantVo;
-
- public interface WxCouponService {
-
- ResultData list(TenantEntity tenantEntity,WxCoupon wxCoupon, Integer pageNum, Integer pageSize);
-
- List<WxCoupon> list(WxCoupon wxCoupon);
-
- /**
- * 根据实体查询分页列表
- *
- * @param record
- * @param pageIndex
- * @param pageSize
- * @return
- */
- PageInfo<WxCoupon> listAsPage(WxCoupon record, Integer pageIndex, Integer pageSize);
-
- PageInfo<WxCoupon> simplelistAsPage(WxCoupon record, Integer pageIndex, Integer pageSize);
-
- /**
- * 卡类列表,包括统计
- * @param record
- * @param tenantEntitys
- * @return
- */
- PageInfo<WxCouponStatisVo> findCountData(WxCoupon record, List<TenantEntity> tenantEntitys, Integer pageNum, Integer pageSize);
-
- void exportCardData(WxCoupon record, List<TenantEntity> tenantEntitys, HttpServletRequest request, HttpServletResponse response);
-
- /**
- * 券列表,包括统计
- * @param record
- * @param tenantEntitys
- * @return
- */
- PageInfo<WxCouponStatisVo> findCouponData(WxCoupon record, List<TenantEntity> tenantEntitys, Integer pageNum, Integer pageSize);
-
- void exportCouponData(WxCoupon record, List<TenantEntity> tenantEntitys, HttpServletRequest request, HttpServletResponse response);
-
- /**
- * 砍价列表,包括统计
- * @param record
- * @param tenantEntitys
- * @param pageNum
- * @param pageSize
- * @return
- */
- PageInfo<WxCouponStatisVo> findPressData(WxCoupon record, List<TenantEntity> tenantEntitys, Integer pageNum, Integer pageSize);
-
- void exportPressData(WxCoupon record, List<TenantEntity> tenantEntitys, HttpServletRequest request, HttpServletResponse response);
-
- /**
- * 根据Id获得实体
- *
- * @param id
- * @return
- */
- WxCoupon getById(Long id,String tenantId);
-
- WxCoupon getPriceAndStock(Long id,String tenantId);
- List<WxCoupon> getPriceAndStock(List<Long> id,String tenantId);
-
- WxCoupon getHtmlById(Long id,String tenantId);
-
-
- WxCouponCVo getVoById(Long id,String couponTenantId,TenantEntity mallTenantEntity);
-
- WxCouponCVo getVoStatusById(Long id,String tenantId);
-
- WxCoupon getAttrsById(Long couponId, String tenantId);
- /**
- * 保存或更新实体
- *
- * @param record
- */
- ResultData saveOrUpdate(WxCoupon record);
-
- ResultData updateTtProduct(WxCoupon wxCoupon);
- /**
- * 更新实体
- *
- * @param record
- */
- void update(WxCoupon record);
- /**
- * 根据Id删除实体
- *
- * @param id
- */
- void deleteById(Long id,String tenantId);
-
-
- /**
- * 查询时间段内销售金额
- *
- * @param tenantEntitys
- * @param wxCoupon
- * @return
- */
- List<WxCouponStatisVo> findSaleMoneyByDate(List<TenantEntity> tenantEntitys, WxCoupon wxCoupon);
-
- /**
- * 查询时间段内核销金额
- *
- * @param tenantEntitys
- * @param wxCoupon
- * @return
- */
- List<WxCouponStatisVo> findPaymentByDate(List<TenantEntity> tenantEntitys, WxCoupon wxCoupon);
-
- /**
- * 查询售出卡数量
- * @return
- */
- Long findSaleCardCount(List<TenantEntity> tenantEntitys, WxCoupon wxCoupon);
-
- /**
- * 查询转增数量
- * @return
- */
- Long findTranCardCount(List<TenantEntity> tenantEntitys, WxCoupon wxCoupon);
-
- /**
- * 查询补贴金额
- * @return
- */
- String findSubsidyMoney(List<TenantEntity> tenantEntitys, WxCoupon wxCoupon);
-
- //----------------券--------------
- /**
- * 券发放数量
- * @return
- */
- //List<WxCoupon> findCouponSendCount(WxCoupon wxCoupon);
-
- /**
- * 券购买数量
- * @return
- */
- List<WxCouponStatisVo> findCouponOrderCount(List<TenantEntity> tenantEntitys, WxCoupon wxCoupon);
-
- /**
- * 券领取数量
- * @return
- */
- //List<WxCoupon> findCouponGetCount(WxCoupon wxCoupon);
-
- /**
- * 券核销数量
- * @return
- */
- List<WxCouponStatisVo> findCouponPaymentCount(List<TenantEntity> tenantEntitys, WxCoupon wxCoupon);
-
- /**
- * 有价券销售数量
- * @return
- */
- List<WxCouponStatisVo> priceCouponSaleCount(List<TenantEntity> tenantEntitys, WxCoupon wxCoupon);
-
- /**
- * 有价券核销数量
- * @return
- */
- List<WxCouponStatisVo> priceCouponPaymentCount(List<TenantEntity> tenantEntitys, WxCoupon wxCoupon);
-
- /**
- * 有价券退款数量
- * @return
- */
- Long priceCouponCancelCount(List<TenantEntity> tenantEntitys, WxCoupon wxCoupon);
-
- /**
- * 有价券销售总额
- *
- * @param tenantEntitys
- * @param wxCoupon
- * @return
- */
- String findSumPriceSaleMoney(List<TenantEntity> tenantEntitys, WxCoupon wxCoupon);
- String findSumPricePayMent(List<TenantEntity> tenantEntitys, WxCoupon wxCoupon);
- String findSumSubsidyMoney(List<TenantEntity> tenantEntitys, WxCoupon wxCoupon);
-
-
- /**
- * 砍价发起次数走势
- * @return
- */
- List<WxCouponStatisVo> pressSendHistory(List<TenantEntity> tenantEntitys, WxCoupon wxCoupon);
- /**
- * 砍价成功次数走势
- * @return
- */
- List<WxCouponStatisVo> pressSuccHistory(List<TenantEntity> tenantEntitys, WxCoupon wxCoupon);
- /**
- * 砍价核销数量走势
- * @return
- */
- List<WxCouponStatisVo> pressPaymentHistory(List<TenantEntity> tenantEntitys, WxCoupon wxCoupon);
- /**
- * 砍价转化率
- * @return
- */
- String pressSuccRate(List<TenantEntity> tenantEntitys, WxCoupon wxCoupon);
-
- /**
- * 砍价参与人数
- * @return
- */
- Long sumJoin(List<TenantEntity> tenantEntitys, WxCoupon wxCoupon);
-
-
-
- /**
- * 查询售出卡数量历史
- * @return
- */
- List<WxCouponStatisVo> findSaleCardCountHistory(List<TenantEntity> tenantEntitys, WxCoupon wxCoupon);
-
- /**
- * 增加库存及修改有效时间
- */
- ResultData updateCouponStockAndEndTime(WxCoupon wxCoupon);
-
- WxCoupon findById(WxCoupon wxCoupon);
-
- /**
- * 库存减少
- *
- * @param id 券ID
- * @param number 减少数量
- * @param remainInventory 当前库存
- */
- void reduceRemainInventory(TenantEntity tenantEntity,Long id, Integer number);
-
- /**
- * 库存退回
- *
- * @param id 券ID
- * @param number 回退数量
- * @param remainInventory 当前库存
- */
- void backRemainInventory(TenantEntity tenantEntity,Long id, Integer number, Integer remainInventory);
-
- /**
- * 卡延期
- * @param wxCoupon
- * @return
- */
- ResultData cardDefer(Long id,String tenantId,Date validEndDate);
-
-
- boolean validCouponDate(WxCoupon wxCoupon);
- ResultData validGiftCouponDate(WxCoupon wxCoupon);
-
- /**
- * 获取券商户map
- *
- */
- Map<Long,String> getCouponMerchantMap(List<Long> couponIds,TenantEntity tenantEntity,boolean onlyOneMerchantCoupons);
-
- Map<Long, WxCoupon> getCouponMap(List<Long> couponIds, TenantEntity tenantEntity);
-
- Map<String,List<WxMerchantVo>> getCouponMerchantList(TenantEntity tenantInfo, Long couponId);
-
- /**
- * 作废卷
- * @param tenantInfo
- * @param couponId
- * @return
- */
- ResultData disable(TenantEntity tenantInfo, Long couponId);
-
- void setParentCouponMallMerchants(TenantEntity mallTenantEntity,WxCoupon wxCoupon) throws Exception;
-
- Map<Long,Boolean> couponMerchantAutoShare(TenantEntity tenantEntity,WxCoupon wxCoupon) throws Exception;
-
- /**
- * 判断门店商户是否可用
- * @param couponId
- * @param couponType
- * @param couponTenantEntity
- * @return
- */
- boolean isCouponMerchantValid(Long couponId,Integer couponType,TenantEntity couponTenantEntity);
- }
|