package com.cyksj.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.cyksj.model.entity.CouponUserPopupsOrderRelate;
import org.apache.ibatis.annotations.Select;

/**
 * 项目名: yhlxj2
 * 文件名: CouponUserPopupsOrderRelateMapper
 * 创建者: JavaZou
 * 创建时间:2025/5/6 16:21
 */
public interface CouponUserPopupsOrderRelateMapper extends BaseMapper<CouponUserPopupsOrderRelate> {

	@Select("select count(1) from (select order_id from coupon_user_popups_order_relate where popups_id = #{popupsId}) cr inner join order_don o on o.id = cr.order_id where o.status not in ('close','noPayment','refund')")
	Integer selectCountOrders(Long popupsId);
}
