package com.hai.dao;
import com.hai.model.HighOrderPreModel;
import com.hai.model.HighUserDiscountUnicomModel;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import java.util.List;
import java.util.Map;
/**
* mapper扩展类
*/
public interface HighDiscountUserRelMapperExt {
@Select({""})
List getUserCouponsList(@Param("map") Map map);
@Select({""})
Integer receiveDiscountCount(@Param("userId") Long userId, @Param("discountId") Long discountId);
@Select(" select count(1) from high_discount_user_rel " +
" where user_id = #{userId} and discount_id in (select id from high_discount where using_range = #{usingRange}) " +
" and create_time BETWEEN CONCAT(CURDATE(),' 00:00:00') AND CONCAT(CURDATE(),' 23:59:59') ")
Integer userReceiveLimitNumber(@Param("userId") Long userId,@Param("usingRange") Integer usingRange);
}