package com.icomsys.main_vm.db.jpa.repo.system;

import com.icomsys.main_vm.db.jpa.entity.system.TbCustPolicy;
import com.icomsys.main_vm.db.jpa.entity.system.TbServiceGroupPolicy;
import com.icomsys.main_vm.db.jpa.entity.system.id.TbCustPolicyId;
import com.icomsys.main_vm.db.jpa.repo.system.dsl.TbCustPolicyRepoDsl;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Modifying;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.query.Param;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

public interface TbCustPolicyRepo extends JpaRepository<TbCustPolicy, TbCustPolicyId> , TbCustPolicyRepoDsl {


    List<TbCustPolicy> findByCustCode(String cust);
    List<TbCustPolicy> findByServiceGroup(String serviceGroup);
    List<TbCustPolicy> findByServiceGroupIn(List<String> serviceGroup);

    void deleteByServiceGroupInAndPolicyValIn(List<String> service, List<String> delpol);

}
