package com.iformall.service;

import com.iformall.domain.po.PushLimit;
import com.iformall.domain.po.base.TenantEntity;

public interface PushLimitService {

    /**
     * 获取租户的PushLimit
     *
     * @param tenantEntity
     * @return
     */
    PushLimit getPushLimit(TenantEntity tenantEntity);

    /**
     * 保存或更新实体
     *
     * @param record
     */
    void saveOrUpdate(PushLimit record);

    /**
     * 检查发送时间
     * @param tenantEntity
     * @return
     */
    boolean checkSendTime(TenantEntity tenantEntity);

    /**
     * 发短信检查
     * @param tenantEntity
     * @return
     */
    boolean checkMsg(TenantEntity tenantEntity);

    /**
     * 主动发券检查
     * @param tenantEntity
     * @param cUserId
     * @param couponId
     * @return
     */
    boolean checkCoupon(TenantEntity tenantEntity, Long cUserId, Long couponId);

}
