package cn.com.ctop.kuaishou.modules.clean.service.impl;

import cn.com.ctop.kuaishou.modules.clean.entity.TrackMonitorConfigure;
import cn.com.ctop.kuaishou.modules.clean.mapper.TrackMonitorConfigureMapper;
import cn.com.ctop.kuaishou.modules.clean.service.ITrackMonitorConfigureService;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;

/**
 * 监测链接预警-配置
 *
 * @author jeecg-boot
 * 2021-09-23
 * @version V1.0
 */
@Service
public class TrackMonitorConfigureServiceImpl extends ServiceImpl<TrackMonitorConfigureMapper, TrackMonitorConfigure> implements ITrackMonitorConfigureService {

    @Override
    public TrackMonitorConfigure getByAccountId(Long accountId) {
        QueryWrapper<TrackMonitorConfigure> queryWrapper = new QueryWrapper<>();
        queryWrapper.eq("account_id", accountId);
        queryWrapper.last("limit 1");
        return this.getOne(queryWrapper);
    }
}
