2024-04-11 12:56:00 +08:00
|
|
|
package com.sky.mapper;
|
|
|
|
|
|
|
|
import com.sky.annotation.AutoFill;
|
|
|
|
import com.sky.dto.DishPageQueryDTO;
|
|
|
|
import com.sky.entity.Dish;
|
|
|
|
import com.sky.enumeration.OperationType;
|
|
|
|
import com.sky.vo.DishVO;
|
|
|
|
import org.apache.ibatis.annotations.Delete;
|
|
|
|
import org.apache.ibatis.annotations.Mapper;
|
|
|
|
import org.apache.ibatis.annotations.Select;
|
|
|
|
|
|
|
|
import java.util.List;
|
|
|
|
|
|
|
|
@Mapper
|
|
|
|
public interface DishMapper {
|
|
|
|
@AutoFill(OperationType.INSERT)
|
|
|
|
void insert(Dish dish);
|
|
|
|
|
2024-04-17 10:24:35 +08:00
|
|
|
/**
|
|
|
|
* 分类查询
|
|
|
|
* @param dishPageQueryDTO
|
|
|
|
* @return
|
|
|
|
*/
|
2024-04-11 12:56:00 +08:00
|
|
|
List<DishVO> list(DishPageQueryDTO dishPageQueryDTO);
|
2024-04-17 10:24:35 +08:00
|
|
|
|
2024-04-11 12:56:00 +08:00
|
|
|
@Select("select * from dish where id=#{id}")
|
|
|
|
Dish queryById(Long id);
|
|
|
|
@Delete("delete from dish where id=#{id}")
|
|
|
|
void deleteById(Long id);
|
|
|
|
@AutoFill(OperationType.UPDATE)
|
|
|
|
void update(Dish dish);
|
2024-04-18 16:52:40 +08:00
|
|
|
List<Dish> listByType(Dish dish);
|
2024-04-17 10:24:35 +08:00
|
|
|
@Select("select a.* from dish a left join setmeal_dish b on a.id = b.dish_id where b.setmeal_id = #{setmealId}")
|
|
|
|
List<Dish> getBySetmealId(Long setmealId);
|
2024-04-11 12:56:00 +08:00
|
|
|
}
|