package com.tofly.base.api.feign.fallback;

import com.tofly.base.api.entity.MemberUser;
import com.tofly.base.api.entity.User;
import com.tofly.base.api.feign.FlowableService;
import com.tofly.common.core.entity.ResultRespone;
import lombok.Setter;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Component;

import java.util.Map;

/**
 * @author tuonbed
 * @date 2019/12/3  16:57
 */
@Slf4j
@Component
public class FlowableServiceFallbackImpl implements FlowableService {

    @Setter
    private Throwable throwable;
    @Override
    public ResultRespone addUser(User user, String from) {
        log.error("用户写入失败，{}，{}",user,throwable);
        return null;
    }

    @Override
    public ResultRespone updateUser(User user, String from) {
        log.error("用户修改失败，{}，{}",user,throwable);
        return null;
    }

    @Override
    public ResultRespone deleteUser(User user, String from) {
        log.error("用户删除失败，{}，{}",user,throwable);
        return null;
    }

    @Override
    public ResultRespone addUserGroup(Map map, String from) {
        log.error("新增用户组失败，{}，{}",map,throwable);
        return null;
    }

    @Override
    public ResultRespone addUserToGroup(MemberUser user, String from) {
        log.error("用户组添加人员失败，{}，{}",user,throwable);
        return null;
    }

    @Override
    public ResultRespone deleteUserToGroup(MemberUser user, String from) {
        log.error("用户组删除用户失败，{}，{}",user,throwable);
        return null;
    }

    @Override
    public ResultRespone updateGroup(Map map, String from) {
        log.error("修改职位失败，{}，{}",map,throwable);
        return null;
    }

    @Override
    public ResultRespone deleteGroup(String id, String from) {
        log.error("删除职位失败，{}，{}",id,throwable);
        return null;
    }

    @Override
    public ResultRespone uploadForm(String appform, String from) {
        log.error("查询流程上传至业务数据失败，{}，{}",appform,throwable);
        return null;
    }


}
