|
@ -3,18 +3,23 @@ package com.mathvision.diet.repository; |
|
|
import com.mathvision.diet.entity.MenuDish; |
|
|
import com.mathvision.diet.entity.MenuDish; |
|
|
import org.springframework.data.jpa.repository.JpaRepository; |
|
|
import org.springframework.data.jpa.repository.JpaRepository; |
|
|
import org.springframework.data.jpa.repository.JpaSpecificationExecutor; |
|
|
import org.springframework.data.jpa.repository.JpaSpecificationExecutor; |
|
|
|
|
|
import org.springframework.transaction.annotation.Transactional; |
|
|
|
|
|
|
|
|
import java.util.Collection; |
|
|
import java.util.Collection; |
|
|
import java.util.List; |
|
|
import java.util.List; |
|
|
|
|
|
|
|
|
public interface MenuDishRepository extends JpaRepository<MenuDish, Long>, JpaSpecificationExecutor<MenuDish> { |
|
|
public interface MenuDishRepository extends JpaRepository<MenuDish, Long>, JpaSpecificationExecutor<MenuDish> { |
|
|
|
|
|
@Transactional |
|
|
long deleteByVender(Long vender); |
|
|
long deleteByVender(Long vender); |
|
|
MenuDish findByMenuAndVenderAndDayAndDishAndMeal(Long menu, Long vender, Long day, Long dish, String meal); |
|
|
MenuDish findByMenuAndVenderAndDayAndDishAndMeal(Long menu, Long vender, Long day, Long dish, String meal); |
|
|
List<MenuDish> findByMenuAndVenderAndDay(Long menu, Long vender, Long day); |
|
|
List<MenuDish> findByMenuAndVenderAndDay(Long menu, Long vender, Long day); |
|
|
List<MenuDish> findByMenuAndVender(Long menu, Long vender); |
|
|
List<MenuDish> findByMenuAndVender(Long menu, Long vender); |
|
|
MenuDish findByIdAndVender(Long id, Long vender); |
|
|
MenuDish findByIdAndVender(Long id, Long vender); |
|
|
List<MenuDish> findByMenu(Long menu); |
|
|
List<MenuDish> findByMenu(Long menu); |
|
|
|
|
|
@Transactional |
|
|
long deleteByMenuAndDayGreaterThanAndMealNotIn(Long menu, Long day, Collection<String> meals); |
|
|
long deleteByMenuAndDayGreaterThanAndMealNotIn(Long menu, Long day, Collection<String> meals); |
|
|
|
|
|
@Transactional |
|
|
long deleteByMenuAndVender(Long menu, Long vender); |
|
|
long deleteByMenuAndVender(Long menu, Long vender); |
|
|
|
|
|
@Transactional |
|
|
long deleteByMenu(Long menu); |
|
|
long deleteByMenu(Long menu); |
|
|
} |
|
|
} |