package com.dgtly.sync.service.impl;

import java.util.List;
import com.dgtly.common.utils.DateUtils;
import com.dgtly.sync.mapper.SyncLogMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.dgtly.sync.mapper.SyncLogMapper;
import com.dgtly.sync.domain.SyncLog;
import com.dgtly.sync.service.ISyncLogService;

/**
 * 同步解析日志Service业务层处理
 * 
 * @author qxp
 * @date 2020-07-14
 */
@Service
public class SyncLogServiceImpl implements ISyncLogService 
{
    @Autowired
    private SyncLogMapper syncLogMapper;

    /**
     * 查询同步解析日志
     * 
     * @param packageId 同步解析日志ID
     * @return 同步解析日志
     */
    @Override
    public SyncLog selectSyncLogById(String packageId)
    {
        return syncLogMapper.selectSyncLogById(packageId);
    }

    /**
     * 查询同步解析日志列表
     * 
     * @param syncLog 同步解析日志
     * @return 同步解析日志
     */
    @Override
    public List<SyncLog> selectSyncLogList(SyncLog syncLog)
    {
        return syncLogMapper.selectSyncLogList(syncLog);
    }

    /**
     * 新增同步解析日志
     * 
     * @param syncLog 同步解析日志
     * @return 结果
     */
    @Override
    public int insertSyncLog(SyncLog syncLog)
    {
        syncLog.setCreateTime(DateUtils.getNowDate());
        return syncLogMapper.insertSyncLog(syncLog);
    }


}
