package com.sunyard.chsm.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.sunyard.chsm.model.entity.ParamConf;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author fyc
 * @since 2020-03-17
 */
@Repository
public interface ParamConfMapper extends BaseMapper<ParamConf> {

    @Select("<script>"+
            " select * from SC_PARAM_CONF where KEY = #{key}"+
            "</script>")
    ParamConf selectByKey(@Param("key")String key);

    @Select("<script>"+
            " select * from SC_PARAM_CONF where item = #{item}"+
            "</script>")
    List<ParamConf> selectByItem(@Param("item") Integer item);

}
