package com.bcxin.ins.dao.inf;

import com.bcxin.ins.entity.common.ComInform;
import com.bcxin.ins.spring.annotation.MyBatisDao;
import com.bcxin.ins.vo.ComInformUserVo;
import com.bcxin.mybatisplus.mapper.BaseMapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

@MyBatisDao
public interface InformAPIMapper extends BaseMapper<ComInform> {

    List<Map<Object,Object>> query(Map<Object, Object> p);

    int queryCnt(Map<Object, Object> p);

    /*根据用户id和公告id查询关系表是否存在数据*/
    int getReadByUAndI(@Param("userID") Long userID, @Param("informID") Long informID);

    /*插入关系表*/
    int insertCIU(@Param("list") List<ComInformUserVo> list);

    List<ComInform> queryNowTime(String cTime);
}
