package cn.ysk.cashier.repository;


import cn.ysk.cashier.pojo.TbPlatformDictType;
import org.apache.ibatis.annotations.Param;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.jpa.repository.Query;

/**
 * @author ww
 * @date 2024-05-11
 **/
public interface TbPlatformDictTypeRepository extends JpaRepository<TbPlatformDictType, Integer>, JpaSpecificationExecutor<TbPlatformDictType> {

    @Query("SELECT dictType.name FROM TbPlatformDictType dictType  WHERE dictType.key = :key")
    String queryNameByKey(@Param("key")String key);

}