| | |
| | | package com.mzl.flower.mapper.film; |
| | | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.mzl.flower.dto.response.film.FilmLocationVO; |
| | | import com.mzl.flower.entity.film.FilmLocationWork; |
| | | import org.apache.ibatis.annotations.Param; |
| | | import org.apache.ibatis.annotations.Select; |
| | | |
| | | import java.util.List; |
| | | import java.util.Set; |
| | | |
| | | |
| | | public interface FilmLocationWorkMapper extends BaseMapper<FilmLocationWork> { |
| | |
| | | List<FilmLocationWork> getByLocaltionId(@Param("locationId") String locationId); |
| | | |
| | | List<FilmLocationWork> selectByLocationId(Long id); |
| | | |
| | | @Select("<script>" + |
| | | "SELECT DISTINCT location_id FROM film_location_work " + |
| | | "WHERE location_id IN " + |
| | | "<foreach item='id' collection='list' open='(' separator=',' close=')'>" + |
| | | "#{id}" + |
| | | "</foreach>" + |
| | | "</script>") |
| | | Set<Long> findLocationIdsWithWorks(@Param("list") List<Long> locationIds); |
| | | |
| | | |
| | | @Select("<script>" + |
| | | "SELECT DISTINCT film_id FROM film_location_work " + |
| | | "WHERE location_id IN " + |
| | | "<foreach item='id' collection='list' open='(' separator=',' close=')'>" + |
| | | "#{id}" + |
| | | "</foreach>" + |
| | | "</script>") |
| | | Set<Long> findFilmIdsWithWorks(@Param("list") List<Long> locationIds); |
| | | |
| | | |
| | | } |