package com.cpop.oam.framework.tasks;

import com.cpop.core.utils.SpringUtils;
import com.cpop.oam.business.entity.DataImport;
import com.cpop.oam.business.service.DataImportService;
import org.springframework.scheduling.annotation.Async;
import org.springframework.stereotype.Component;

/**
 * @author DB
 * @version 1.0.0
 * @since 2023-12-10 17:19
 */
@Component
public class DataImportAsyncTask {

    @Async("customAsyncThreadPool")
    public void asyncUpdateShoppingCartAmount(DataImport dataImport) {
        SpringUtils.getBean(DataImportService.class).importNow(dataImport);
    }
}
