package shop.alien.mapper;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.toolkit.Constants;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import shop.alien.entity.store.StoreDynamicDiscountInviteLog;
import shop.alien.entity.store.vo.StoreDynamicDiscountInviteLogVo;

import java.util.List;

/**
 * <p>
 * 商户动态折扣邀请记录 Mapper 接口
 * </p>
 *
 * @author ssk
 * @since 2025-03-18
 */
public interface StoreDynamicDiscountInviteLogMapper extends BaseMapper<StoreDynamicDiscountInviteLog> {

    @Select("select a.*, b.user_name, b.user_image from store_dynamic_discount_invite_log a " +
            "left join life_user b on a.invited_user_id = b.id ${ew.customSqlSegment}")
    List<StoreDynamicDiscountInviteLogVo> getInviteLog(@Param(Constants.WRAPPER) QueryWrapper<StoreDynamicDiscountInviteLogVo> queryWrapper);
}
