package com.ytpm.feign.fallback;

import com.ytpm.app.model.YtDyzUser;
import com.ytpm.feign.RiskFeign;
import com.ytpm.general.RepMessage;
import com.ytpm.general.Result;
import com.ytpm.general.StatusCode;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.RequestBody;

/**
 * 服务降级配置
 */
@Component
public abstract class RiskFeignFallBack implements RiskFeign {
    @Override
    public Result<?> checkRisk(@RequestBody YtDyzUser ytDyzUser) {
        return new Result<>(StatusCode.ACCESS_ERR, RepMessage.TOKEN_EXPIRE);
    }

    @Override
    public Result<?> checkAdRisk(@RequestBody YtDyzUser ytDyzUser) {
        return new Result<>(StatusCode.ACCESS_ERR, RepMessage.TOKEN_EXPIRE);
    }
}
