package com.czg.service.market.mapper;

import com.czg.account.dto.QueryReceiveDto;
import com.czg.account.vo.CouponReceiveVo;
import com.czg.account.vo.ShopInfoCouponVO;
import com.czg.account.vo.UserCouponVo;
import com.czg.market.vo.CouponRecordCountVO;
import com.czg.market.vo.UserCouponVO;
import com.mybatisflex.core.BaseMapper;
import com.czg.market.entity.MkShopCouponRecord;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * 优惠券发放记录表 映射层。
 *
 * @author ww
 * @since 2025-09-13
 */
public interface MkShopCouponRecordMapper extends BaseMapper<MkShopCouponRecord> {

    List<CouponReceiveVo> queryReceive(@Param("param") QueryReceiveDto param);

    List<UserCouponVO> findCouponVOByUser(String name, List<Long> shopUserIds, Integer status, Long shopId);

    List<UserCouponVo> queryByVipIdAndShopId(Long shopId, Long shopUserId, Integer type, Integer isFood);

    List<ShopInfoCouponVO> getShopByCouponRecord(Long userId);


    List<CouponRecordCountVO> countRecordBySource(Long couponId, Long userId, Integer status, String source, String startTime, String endTime);
}
