package com.yem.em.bd.ProductsGroup.task;

import com.yem.or.utils.OrderApiUtils;
import kd.bos.context.RequestContext;
import kd.bos.exception.KDException;
import kd.bos.orm.ORM;
import kd.bos.schedule.executor.AbstractTask;

import java.io.IOException;
import java.util.Map;

public class ProductGroupSyncToOrderTask extends AbstractTask {

    @Override
    public void execute(RequestContext requestContext, Map<String, Object> map) throws KDException {
        try {
            OrderApiUtils.syncProductModuleToPermissions(null, ORM.create());
        } catch (IOException e) {
            throw new RuntimeException(e);
        }
    }
}
