package com.foreverwin.mesnac.common.service.impl;

import com.foreverwin.mesnac.common.mapper.HttpLogMapper;
import com.foreverwin.mesnac.common.model.HttpLog;
import com.foreverwin.modular.core.util.FrontPage;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.foreverwin.mesnac.common.service.HttpLogService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.transaction.annotation.Propagation;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;
/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author Ervin Chen
 * @since 2021-04-21
 */
@Service
@Transactional(propagation = Propagation.NOT_SUPPORTED)
public class HttpLogServiceImpl extends ServiceImpl<HttpLogMapper, HttpLog> implements HttpLogService {


    @Autowired
    private HttpLogMapper httpLogMapper;

    @Override
    public IPage<HttpLog> selectPage(FrontPage<HttpLog> frontPage, HttpLog httpLog) {
        QueryWrapper<HttpLog> queryWrapper = new QueryWrapper<>();
        queryWrapper.setEntity(httpLog);
        return super.page(frontPage.getPagePlus(), queryWrapper);
    }

    @Override
    public List<HttpLog> selectList(HttpLog httpLog) {
        QueryWrapper<HttpLog> queryWrapper = new QueryWrapper<>();
        queryWrapper.setEntity(httpLog);
        return super.list(queryWrapper);
    }


}