package com.fzm.mall.server.admin.marketing.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.fzm.mall.server.admin.marketing.entity.dto.CouponDTO;
import com.fzm.mall.server.admin.marketing.model.Coupon;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * <p>
 * 商品优惠券 Mapper 接口
 * </p>
 *
 * @author fzm
 * @since 2021-04-13
 */
@Mapper
public interface CouponMapper extends BaseMapper<Coupon> {

    List<Coupon> listByOid(@Param("oid") String oid,
                           @Param("uid") String uid,
                           @Param("list") List<String> goodsIdList);

    IPage<CouponDTO> page(Page<CouponDTO> page,
                          @Param("couponId") String couponId,
                          @Param("name") String name,
                          @Param("status") Integer status,
                          @Param("merchantId") String merchantId);
}
