@ -4,20 +4,29 @@ import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper ;
import com.baomidou.mybatisplus.core.toolkit.Constants ;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page ;
import com.biutag.lan.domain.Mail ;
import com.biutag.lan.domain.Work ;
import com.biutag.lan.domain.vo.QueryMailVo ;
import com.biutag.lan.domain.vo.WorkVo ;
import org.apache.ibatis.annotations.Param ;
import org.apache.ibatis.annotations.Select ;
import java.util.Collection ;
public interface WorkMapper extends BaseMapper < Work > {
Page < WorkVo > selectPageTodo ( @Param ( "page" ) Page < Work > page , @Param ( Constants . WRAPPER ) QueryWrapper < Work > queryWrapper ) ;
Page < QueryMailVo > selectQueryPage ( @Param ( "page" ) Page < Mail > page , @Param ( Constants . WRAPPER ) QueryWrapper < Mail > queryWrapper ) ;
Integer selectCountByFlowKey ( Collection < String > flowKeys , Integer deptId ) ;
@Select ( "select count(w.id) from work w left join mail m on w.mail_id = m.id where m.flow_key = #{flowKey} and w.sign_dept_id = #{deptId}" )
Integer selectCount ( String flowKey , Integer deptId ) ;
@Select ( "select count(w.id) from work w left join mail m on w.mail_id = m.id where m.extension_flag = #{extensionFlag} and w.sign_dept_id = #{deptId}" )
Integer selectCountByExtensionFlag ( Boolean extensionFlag , Integer deptId ) ;
@Select ( "select count(w.mail_id) from work w where w.mail_id = #{mailId}" )
Integer countByFilter ( String mailId ) ;
}