
package com.jeelowcode.module.biz.service.impl;

import com.jeelowcode.core.framework.service.IFrameSqlService;
import com.jeelowcode.framework.plus.SqlHelper;
import com.jeelowcode.framework.plus.build.buildmodel.wrapper.SqlInfoQueryWrapper;
import com.jeelowcode.module.biz.mapper.DemoMapper;
import com.jeelowcode.module.biz.service.IDemoService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.scheduling.annotation.Async;
import org.springframework.stereotype.Service;

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


/**
 * demo
 */
@Slf4j
@Service
public class DemoServiceImpl implements IDemoService {

    @Autowired
    private DemoMapper demoMapper;

    @Autowired
    private IFrameSqlService sqlService;


    @Override
    public List<Map<String, Object>> getDemoData(){
        SqlInfoQueryWrapper.Wrapper wrapper = SqlHelper.getQueryWrapper();
        wrapper.setTableName("tbl_lin_class");
        List<Map<String, Object>> dataMapList = sqlService.getDataListByPlus(wrapper);
        return dataMapList;
    }

    @Async("asyncPoolTaskExecutor")
    @Override
    public void testAsync(){
        log.info("哈哈哈");
    }
}
