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

import com.baomidou.mybatisplus.extension.service.IService;
import com.foreverwin.mesnac.integration.model.IntegrationLog;
import com.foreverwin.mesnac.integration.mapper.IntegrationLogMapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.foreverwin.mesnac.integration.service.IntegrationLogService;
import org.springframework.stereotype.Service;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.transaction.annotation.Propagation;
import org.springframework.transaction.annotation.Transactional;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author Leon.L
 * @since 2021-06-16
 */
@Service
@Transactional(rollbackFor = Exception.class)
public class IntegrationLogServiceImpl extends ServiceImpl<IntegrationLogMapper, IntegrationLog> implements IntegrationLogService {


    @Autowired
    private IntegrationLogMapper integrationLogMapper;

    @Override
    @Transactional(propagation = Propagation.REQUIRES_NEW)
    public void saveIntegrationLog(IntegrationLog integrationLog) {
        integrationLogMapper.insert(integrationLog);
    }
}