/**
 * Copyright &copy; 2015-2020 <a href="http://www.jeeplus.org/">JeePlus</a> All rights reserved.
 */
package com.jeeplus.modules.workprojectnotify.dao;

import com.jeeplus.common.persistence.CrudDao;
import com.jeeplus.common.persistence.annotation.MyBatisDao;
import com.jeeplus.modules.sys.entity.User;
import com.jeeplus.modules.workprojectnotify.entity.WorkProjectNotify;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * 通知DAO接口
 * @author yangfan
 * @version 2017-11-10
 */
@MyBatisDao
public interface WorkProjectNotifyDao extends CrudDao<WorkProjectNotify> {

    //确认定投标之后给送标员发送通知
    WorkProjectNotify getByWorkBidingDocument(@Param("workBidingDocumentId") String workBidingDocumentId);
    WorkProjectNotify getByNotifyId(@Param("notifyId") String notifyId);
    List<WorkProjectNotify> findListByAPP(WorkProjectNotify workProjectNotify);

    //更新阅读状态
    boolean updateReadStateByNotifyId(WorkProjectNotify workProjectNotify);
    List<User> findReadStateByNotifyId(WorkProjectNotify workProjectNotify);

    //逻辑删除
    int updateDelflagByNotifyId(WorkProjectNotify workProjectNotify);

    int updateReadStateByNotifyIdAndNotifyRole(WorkProjectNotify notify);

    int updateReadStateByNotifyIdAndNotifyUser(WorkProjectNotify notify);

    int updateReadStateByNotifyRoleAndUser(WorkProjectNotify notify);

    WorkProjectNotify getByNotifyIdAndNotifyUser(@Param("notifyId") String notifyId, @Param("notifyUserId") String notifyUserId);
}