package com.prolog.rdc.tms.dao.mapper;

import com.prolog.framework.dao.mapper.BaseMapper;
import com.prolog.rdc.tms.model.entity.message.TmsMessageModel;
import com.prolog.rdc.tms.model.vo.message.MessageReadAllVO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;


/**
*  Mapper
* <p>
* Copyright: Copyright (C) 2022 prolog-int, Inc. All rights reserved.
* <p>
* Company: 湖北普罗格科技股份有限公司
*
*
* @author hongbo.pan
* @since 2022-11-15 14:03:39
*/
@Mapper
public interface TmsMessageMapper extends BaseMapper<TmsMessageModel> {

    /**
     * findOneByCondition
     * @param enterpriseId
     * @param shipbillId
     * @param messageType
     * @return
     */
    TmsMessageModel findOneByCondition(@Param("enterpriseId") Long enterpriseId, @Param("shipbillId") String shipbillId,
                                          @Param("messageType") String messageType);

    /**
     * readAll
     * @param vo
     */
    void readAll(@Param("vo") MessageReadAllVO vo);

    /**
     * countByMessageType
     * @param messageNoticeType
     * @param messageType
     * @param enterpriseId
     * @param receiveUserId
     * @return
     */
    Long countByMessageType(@Param("messageNoticeType") String messageNoticeType, @Param("messageType") String messageType, @Param("enterpriseId") Long enterpriseId, @Param("receiveUserId") String receiveUserId);
}

