package com.crm.pay.dao.repository;

import com.crm.rely.backend.dao.repository.BaseRepository;
import com.crm.rely.backend.model.pojo.table.GoldenGoodsTable;
import org.springframework.data.jpa.repository.Lock;
import org.springframework.stereotype.Repository;

import javax.persistence.LockModeType;
import java.util.List;

@Repository
public interface GoldenGoodsRepository extends BaseRepository<GoldenGoodsTable> {

    @Lock(LockModeType.PESSIMISTIC_WRITE)
    GoldenGoodsTable findFirstById(Long id);

    List<GoldenGoodsTable> findAllByIdIn(List<Long> ids);

    GoldenGoodsTable getFirstById(Long id);


}
