package com.iformall.service;

import com.github.pagehelper.PageInfo;
import com.iformall.domain.po.WxCouponPassword;
import com.iformall.domain.vo.WxCouponPasswordCountInfoVO;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.util.List;

public interface WxCouponPasswordService {

	/**
     * 根据实体查询分页列表
     *
     * @param record
     * @param pageIndex
     * @param pageSize
     * @return
     */
	PageInfo<WxCouponPassword> listAsPage(WxCouponPassword record, Integer pageIndex, Integer pageSize);
	
	/**
     * 根据Id获得实体
     *
     * @param id
     * @return
     */
    WxCouponPassword getById(Long id);

    /**
     * 根据密码获取卡密信息
     *
     * @param obj
     * @return
     */
    WxCouponPassword getByObj(WxCouponPassword obj);
    
        /**
     * 保存或更新实体
     *
     * @param record
     */
    void saveOrUpdate(WxCouponPassword record);

    /**
     * 根据Id删除实体
     *
     * @param id
     */
    void deleteById(Long id);

    /**
     * 生产卡密
     * @param tenantId
     * @param couponId
     * @param inventory
     */
    void mkPasswords(String tenantId, Long couponId, Integer inventory);

    /**
     * 导出兑换码
     * @param request
     * @param response
     * @param couponPassword
     */
    void exportData(HttpServletRequest request, HttpServletResponse response, WxCouponPassword couponPassword);

    PageInfo<WxCouponPasswordCountInfoVO> findCouponList(WxCouponPassword wxCouponPassword, Integer pageNum, Integer pageSize);

    List<WxCouponPassword> findList(WxCouponPassword wxCouponPassword);
}
