package com.ecep.contract.task;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import com.ecep.contract.MessageHolder;
import com.ecep.contract.WebSocketClientTasker;
import com.ecep.contract.vo.CompanyVo;

import lombok.Setter;

/**
 * 合并更新
 */
public class CompanyCompositeUpdateTasker extends Tasker<Object> implements WebSocketClientTasker {
    private static final Logger logger = LoggerFactory.getLogger(CompanyCompositeUpdateTasker.class);
    @Setter
    private CompanyVo company;

    @Override
    protected Object execute(MessageHolder holder) throws Exception {
        updateTitle("合并更新 " + company.getName());
        return callRemoteTask(holder, getLocale(), company.getId());
    }

    @Override
    public String getTaskName() {
        return "CompanyCompositeUpdateTasker";
    }

    @Override
    public void updateProgress(long workDone, long max) {
        super.updateProgress(workDone, max);
    }

}
