package thyyxxk.webserver.dao.his.dictionary;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import thyyxxk.webserver.entity.dictionary.CodeName;
import thyyxxk.webserver.entity.dictionary.ZdSelectionOptions;

import java.util.List;

@Mapper
public interface SelectionOptionsDao extends BaseMapper<ZdSelectionOptions> {

    @Select(" select * from zd_selection_options where flag = 'Y' and code = #{code} ")
    ZdSelectionOptions selectionOptionsByCode(@Param("code") String code);

    @Select("<script> ${sql} </script>")
    List<CodeName> selectDictByCode(@Param("sql") String sql);

}
