34 lines
847 B
Java
34 lines
847 B
Java
package com.sky.mapper;
|
|
|
|
import com.github.pagehelper.Page;
|
|
import com.sky.annotation.AutoFill;
|
|
import com.sky.dto.SetmealPageQueryDTO;
|
|
import com.sky.entity.Setmeal;
|
|
import com.sky.enumeration.OperationType;
|
|
import org.apache.ibatis.annotations.Mapper;
|
|
import org.apache.ibatis.annotations.Select;
|
|
|
|
import java.util.List;
|
|
|
|
@Mapper
|
|
public interface SetmealMapper {
|
|
|
|
/**
|
|
* 根据分类id查询套餐的数量
|
|
* @param id
|
|
* @return
|
|
*/
|
|
@Select("select count(id) from setmeal where category_id = #{categoryId}")
|
|
Integer countByCategoryId(Long id);
|
|
|
|
Page<Setmeal> pageQuery(SetmealPageQueryDTO setmealPageQueryDTO);
|
|
|
|
@AutoFill(OperationType.INSERT)
|
|
void insert(Setmeal setmeal);
|
|
|
|
@Select("select * from setmeal where id = #{id}")
|
|
Setmeal selectById(Long id);
|
|
|
|
void deleteBatch(List<Long> ids);
|
|
}
|