package org.jeecg.modules.dataVue.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.jeecg.modules.dataVue.entity.Mock;
import org.jeecg.modules.dataVue.mapper.MockMapper;
import org.jeecg.modules.dataVue.service.ILjrbService;
import org.jeecg.modules.dataVue.service.IServiceExtend;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.jdbc.core.JdbcTemplate;

import java.util.List;
import java.util.Map;

// For simple sql
public class ServiceImpExtend extends ServiceImpl<MockMapper, Mock> implements IServiceExtend {

    public JdbcTemplate getJdbc() {
        return null;
    }

    @Override
    public List<Map<String, Object>> querySql(String sql, JdbcTemplate jdbcTemplate) {
        return getJdbc().queryForList(sql);
    }

    @Override
    public int querySqlCount(String sql, JdbcTemplate jdbcTemplate) {
        return getJdbc().queryForObject(sql, int.class);
    }
}
