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

import com.baomidou.dynamic.datasource.annotation.DS;
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.IEpbpService;
import org.jeecg.modules.dataVue.service.IZjyService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.jdbc.core.JdbcTemplate;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;
import java.util.Map;

@Service
@DS("epbpDataSource2021")
public class EpbpServiceImpl extends ServiceImpl<MockMapper, Mock> implements IEpbpService {

    @Resource
    private MockMapper mockMapper;
    @Autowired
    public JdbcTemplate jdbcTemplate;

    @Override
    public JdbcTemplate getJdbc() {
        return jdbcTemplate;
    }

    @Override
    public List<Map<String, Object>> querySql(String sqlStr, String reserve) {
        return mockMapper.querySqlA(sqlStr);
    }

    @Override
    public int querySqlCount(String sqlStr, String reserve) {
        return mockMapper.queryCountA(sqlStr);
    }
}
