package com.haha.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.haha.entity.CouponDistribute;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface CouponDistributeMapper extends BaseMapper<CouponDistribute> {

    @Select("SELECT * FROM t_coupon_distribute WHERE template_id = #{templateId} ORDER BY create_time DESC")
    List<CouponDistribute> selectByTemplateId(@Param("templateId") Long templateId);
}
