package com.bonus.canteen.core.menuai.mapper;

import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.bonus.canteen.core.menuai.entity.MenuaiPicture;
import com.bonus.canteen.core.menuai.model.MenuaiRemoveModel;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface MenuaiPictureMapper extends BaseMapper<MenuaiPicture> {
//   @Select({"select dishes_id, count(picture_type = 1 or null) as big_pic_num, count(picture_type = 2 or null) as small_pic_num, count(1) as picture_num from menuai_picture where stall_id = #{stallId} group by dishes_id"})
//   List<MenuaiDishesPictureNumModel> selectDishesPictureNum(@Param("stallId") Long stallId);
//
//   @Select({"select id as picture_id, picture_url, picture_type as pic_type from menuai_picture ${ew.customSqlSegment}"})
//   List<MenuaiPictureDetailVO> selectDishesPictureDetail(@Param("ew") Wrapper<MenuaiPicture> wrapper);
//
   @Select({"select id from menuai_picture ${ew.customSqlSegment}"})
   List<Long> selectPictureIdList(@Param("ew") Wrapper<MenuaiPicture> wrapper);
//
//   List<MenuaiRegistPicVO> selectRegistPic(@Param("stallId") Long stallId, @Param("dishesIdList") List<Long> dishesIdList, @Param("pictureType") Integer pictureType);
//
//   @Select({"select id, picture_url from menuai_picture ${ew.customSqlSegment}"})
//   Page<MenuaiTrayPageVO> selectTrayPicturePage(Page<?> page, @Param("ew") Wrapper<MenuaiPicture> wrapper);
//
//   @Select({"select ass.canteen_id, ass.stall_id, mp.picture_url from menuai_picture mp left join alloc_stall ass on mp.stall_id = ass.stall_id where mp.id = #{id}"})
//   MenuaiRemoveModel selectRemovePictureDetail(Long id);
//
//   List<MenuaiRecipePictureNumVO> selectRecipePictureNum(@Param("content") MenuaiRecipePictureNumDTO content);
//
//   Page<MenuaiDishesPicturePageVO> selectDishesPicture(Page<?> page, @Param("content") MenuaiDishesPicturePageDTO content);
//
//   MenuaiBigPictureCutModel selectBigPictureById(@Param("id") Long id);
//
   List<MenuaiRemoveModel> selectRemovePictureDetailList(@Param("removeIdList") List<Long> removeIdList);
//
//   Page<MenuaiRecipePictureNumVO> selectAllDishesPictureNum(Page<?> page, @Param("content") MenuaiAllDishesNumPageDTO content);
//
//   List<MenuaiAllDishesModel> selectAllDishesPicture(@Param("stallId") Long stallId);
//
//   List<MenuaiRemoveModel> selectRemovePictureDetailLimit(@Param("stallId") Long stallId, @Param("dishesId") Long dishesId, @Param("pictureLimit") Integer pictureLimit);
//
   List<MenuaiRemoveModel> selectRemovePictureDetailByStallId(@Param("stallId") Long stallId);
//
//   @Select({"select mp.id, mp.dishes_id, mp.picture_url from menuai_picture  mp   ${ew.customSqlSegment}"})
//   List<MenuaiPicture> selectDishesAllSmallPicture(@Param("ew") Wrapper<MenuaiPicture> wrapper);
//
//   @Select({"select dishes_id from menuai_picture ${ew.customSqlSegment}"})
//   List<Long> selectDishesIdList(@Param("ew") Wrapper<MenuaiPicture> wrapper);
//
//   @Select({"select picture_url from menuai_picture ${ew.customSqlSegment}"})
//   List<String> selectTrayFileList(@Param("ew") Wrapper<MenuaiPicture> wrapper);
//
//   @Select({"select stall_id from menuai_picture ${ew.customSqlSegment}"})
//   List<Long> selectStallIdList(@Param("ew") Wrapper<MenuaiPicture> wrapper);
//
//   int countDishesPictureByConsumerPicId(@Param("consumerDetectPicId") Long consumerDetectPicId);
//
//   List<MenuaiDishesPictureNumModel> selectDishesPictureNumByDishesIds(@Param("dishesIdList") List<Long> dishesIds);
//
//   List<MenuaiPictureExtend> selectDishesAllSmallPictureBySql(@Param("dishesIdList") List<Long> dishesIdList, @Param("stallId") Long stallId, @Param("pictureType") Integer pictureType);
//
//   @Delete({"DELETE FROM menuai_picture WHERE dishes_id = #{dishesId}"})
//   void deletePicsByDishesId(@Param("dishesId") Long dishesId);
//
//   List<MenuaiRegistPicVO> selectRegistPicByTrainTag(@Param("stallId") Long stallId, @Param("dishesIdList") List<Long> dishesIdList, @Param("pictureType") Integer pictureType, @Param("trainTag") Integer trainTag);
//
//   List<MenuaiRegistPicVO> selectRegistPicByTrainTag(@Param("stallId") Long stallId, @Param("dishesIdList") List<Long> dishesIdList, @Param("pictureType") Integer pictureType);
//
//   List<MenuaiRegistPicVO> selectRegistPicByTrainTagLimit(@Param("stallId") Long stallId, @Param("dishesIdList") List<Long> dishesIdList, @Param("pictureType") Integer pictureType, @Param("trainTag") Integer trainTag, @Param("limitSize") Integer limitSize);
//
//   void insertBatch(@Param("list") List<MenuaiPicture> list);
}
