PictureInfoMapper.java 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. package top.lvzhiqiang.mapper;
  2. import org.apache.ibatis.annotations.Select;
  3. import top.lvzhiqiang.entity.FileImage;
  4. import top.lvzhiqiang.entity.VideoCast;
  5. import top.lvzhiqiang.entity.VideoGenres;
  6. import java.util.List;
  7. import java.util.Map;
  8. /**
  9. * 照片信息Mapper
  10. *
  11. * @author lvzhiqiang
  12. * 2024/8/26 11:02
  13. */
  14. public interface PictureInfoMapper {
  15. @Select("select main_who AS name, count(id) AS count from video_info_infantry where type = #{infantryType} group by main_who order by count(id) desc")
  16. List<VideoCast> findCast(String infantryType);
  17. @Select("select fic.category_name AS name, count(fi.category_id) AS count " +
  18. "from file_image fi " +
  19. " left join file_image_category fic on fi.category_id = fic.id " +
  20. "group by fi.category_id " +
  21. "order by count(fi.category_id) desc ")
  22. List<VideoGenres> findUploadGenres();
  23. @Select({"<script>" +
  24. "select fi.*,fic.category_name from file_image fi left join file_image_category fic on fi.category_id = fic.id WHERE 1 = 1" +
  25. "<if test=\"keyword != null and keyword != ''\">" +
  26. " and fi.remark like concat('%',#{keyword},'%')" +
  27. "</if>" +
  28. "<if test=\"genres != null and genres != ''\">" +
  29. " and fic.category_name = #{genres}" +
  30. "</if>" +
  31. "</script>"})
  32. List<FileImage> getUploadImageInfoList(Map<String, Object> params);
  33. }