package com.zh.project0512.mapper; import com.zh.project0512.model.QywxDepartmentGroupLink; import com.baomidou.mybatisplus.core.mapper.BaseMapper; import org.apache.ibatis.annotations.Insert; import org.apache.ibatis.annotations.Select; import java.time.LocalDateTime; import java.util.List; import java.util.Map; /** *

* Mapper 接口 *

* * @author zh * @since 2022-06-24 */ public interface QywxDepartmentGroupLinkMapper extends BaseMapper { @Insert("") void groupAddDepartment(Integer groupId, List departmentIdList, LocalDateTime creatAt); List departmentList(Integer groupId); @Select("SELECT t1.departmentId\n" + "from qywxDepartmentGroupLink as t1\n" + "LEFT JOIN qywxDepartmentGroup as t2 on t1.groupId = t2.id\n" + "INNER JOIN qywxDepartment as t3 on t3.departmentId = t1.departmentId \n" + "where t2.id in \n" + "" + "#{item}" + "" + "GROUP BY departmentId") List departmentIdList(List groupIdList); }