AjhMeetingSendMapper.java
1.4 KB
package com.skua.modules.ajh.mapper;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.skua.core.api.vo.LoginUser;
import com.skua.modules.ajh.entity.AjhMeetingSend;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import java.util.List;
/**
* 会议记录
*/
public interface AjhMeetingSendMapper extends BaseMapper<AjhMeetingSend> {
AjhMeetingSend getByMeetId(@Param("meetId") String meetId);
String getUserByDepartId(@Param("departId") String departId);
List<LoginUser> getUsersByUserIds(@Param("userIds") String userIds);
/**
* 查询AjhMeetignSend 并关联机构名称
* @param meetId
* @return
*/
public AjhMeetingSend queryByMeetId(@Param("meetId") String meetId);
@Select("SELECT *,IFNULL( r.count, 0 ) AS invite_num,IFNULL( a.count, 0 ) AS partic_num " +
" FROM ajh_meeting_send " +
" LEFT JOIN ( SELECT count( id ) count, meets_id FROM ajh_meeting_receipt GROUP BY meets_id ) r ON r.meets_id = id " +
" LEFT JOIN ( SELECT count( id ) count, meets_id FROM ajh_meeting_attend GROUP BY meets_id ) a ON a.meets_id = id ${ew.customSqlSegment}")
List<AjhMeetingSend> getListByWrapper(Page page,@Param("ew") QueryWrapper<AjhMeetingSend> queryWrapper);
}