package com.ruoyi.project.business.service.impl;

import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.ruoyi.framework.aspectj.lang.annotation.DataSource;
import com.ruoyi.framework.aspectj.lang.enums.DataSourceType;
import com.ruoyi.project.business.domain.thirdparty.Gj;
import com.ruoyi.project.business.mapper.GjMapper;
import com.ruoyi.project.business.service.GjService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.jdbc.core.JdbcTemplate;
import org.springframework.stereotype.Service;

import java.util.Collections;
import java.util.List;

/**
* @author fangk
* @description 针对表【gj】的数据库操作Service实现
* @createDate 2024-07-10 20:24:04
*/
@Service
public class GjServiceImpl extends ServiceImpl<GjMapper, Gj>
// public class GjServiceImpl 
    implements GjService {

    @Autowired
    private JdbcTemplate jdbcTemplate;

    @DataSource(DataSourceType.SLAVE)
    @Override
    public List<Gj> selectList(Wrapper<Gj> queryWrapper) {
        return list(queryWrapper);
    }

    @DataSource(DataSourceType.SLAVE)
    @Override
    public List selectList2() {
        return jdbcTemplate.queryForList("select * from  [dbo].[gj] ");
    }
}




