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;

/**
 * 服务降级配置
 * @author EDY
 */
@Component
public class RiskFeignFallBack implements RiskFeign {

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

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

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

    @Override
    public void addBlockingRecord(String userId) {

    }

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

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

    @Override
    public Result<?> checkVisitorLogin(YtDyzUser old) {
        return new Result<>(StatusCode.OK, RepMessage.TOKEN_EXPIRE);
    }
}
