package com.huiju.estateagents.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.huiju.estateagents.entity.TaPersonMessageRule;
import org.apache.ibatis.annotations.Param;

/**
 * <p>
 * 人员消息规则 服务类
 * </p>
 *
 * @author jobob
 * @since 2019-05-10
 */
public interface ITaPersonMessageRuleService extends IService<TaPersonMessageRule> {
    /**
     * 依据 人员ID, 消息类型等查询人员消息规则
     * @param personId
     * @param messageType
     * @param contentType
     * @param orgId
     * @return
     */
    TaPersonMessageRule getByPersonAndType(String personId, String messageType, String contentType, Integer orgId);

    /**
     * 依据 人员ID, 消息类型等更新或者插入人员消息规则
     * @param personId
     * @param messageType
     * @param contentType
     * @param orgId
     * @return
     */
    TaPersonMessageRule saveOrUpdateByPersonAndMessage(String personId, String messageType, String contentType, Integer orgId);
}
