package com.corewing.app.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.corewing.app.entity.SysOption;
import com.corewing.app.mapper.SysOptionMapper;
import com.corewing.app.service.SysOptionService;
import org.springframework.stereotype.Service;

@Service
public class SysOptionServiceImpl extends ServiceImpl<SysOptionMapper, SysOption> implements SysOptionService {

    @Override
    public String getValueByKey(String key) {
        LambdaQueryWrapper<SysOption> queryWrapper = new LambdaQueryWrapper<>();
        queryWrapper.eq(SysOption::getKey, key);
        return getOne(queryWrapper).getValue();
    }
}
