package com.zsElectric.boot.business.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.zsElectric.boot.business.model.entity.Coupon;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.zsElectric.boot.business.model.query.CouponQuery;
import com.zsElectric.boot.business.model.query.applet.AppCouponQuery;
import com.zsElectric.boot.business.model.vo.CouponVO;
import com.zsElectric.boot.business.model.vo.applet.AppCouponStatusNumVO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

/**
 * 优惠劵Mapper接口
 *
 * @author zsElectric
 * @since 2025-12-19 09:58
 */
@Mapper
public interface CouponMapper extends BaseMapper<Coupon> {

    /**
     * 获取优惠劵分页数据
     *
     * @param page 分页对象
     * @param queryParams 查询参数
     * @return {@link Page<CouponVO>} 优惠劵分页列表
     */
    Page<CouponVO> getCouponPage(Page<CouponVO> page,@Param("queryParams") CouponQuery queryParams);

    Page<CouponVO> getUserCouponPage(Page<Object> objectPage,@Param("queryParams") AppCouponQuery queryParams);

    AppCouponStatusNumVO getCouponStatusNum(@Param("userId") Long userId);
}
