package com.weaver.seconddev.chapanda.feishu.esb;

import com.weaver.common.base.entity.result.WeaResult;
import com.weaver.esb.api.rpc.EsbServerlessRpcRemoteInterface;
import com.weaver.seconddev.chapanda.feishu.util.Esb2FeishuProfilePictureUtil;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.HashMap;
import java.util.Map;

@Service("Esb2FeishuProfilePictureCardAction")
public class Esb2FeishuProfilePictureCardAction implements EsbServerlessRpcRemoteInterface {
    private final static Logger log = LoggerFactory.getLogger(Esb2FeishuProfilePictureCardAction.class);

    @Autowired
    Esb2FeishuProfilePictureUtil esb2FeishuProfilePictureUtil;


    @Override
    public WeaResult<Map<String, Object>> execute(Map<String, Object> params) {

        Map<String, Object> dataMap = esb2FeishuProfilePictureUtil.syncHrmAvatarByFull();

        Map<String, Object> actionMap = new HashMap<String, Object>();
        actionMap.put("code",200);
        actionMap.put("msg","成功");
        actionMap.put("data",dataMap);
        return WeaResult.success(actionMap);
    }

}
