package cn.estsh.i3plus.ext.mes.pcn.apiservice.serviceimpl.busi.collect;

import cn.estsh.i3plus.ext.mes.pcn.api.busi.ISxThirdPartyDbCollectDataStrategyService;
import cn.estsh.i3plus.ext.mes.pcn.pojo.model.SxThirdPartyDbCollectDataModel;
import cn.estsh.impp.framework.boot.exception.ImppBusiException;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Propagation;
import org.springframework.transaction.annotation.Transactional;

@Slf4j
@Service
public class SxThirdPartyDbCollectDataStrategyProdDataService implements ISxThirdPartyDbCollectDataStrategyService {

    @Override
    @Transactional(propagation = Propagation.REQUIRES_NEW, noRollbackFor = {ImppBusiException.class, Exception.class})
    public void exec(SxThirdPartyDbCollectDataModel collect) {

        new SxThirdPartyDbCollectDataProxyWatchService(new SxThirdPartyDbCollectDataProxyProdDataService(new SxThirdPartyDbCollectDataCommonService())).exec(collect);

    }
}
