StatisticsDriveFallbackImpl.java
1013 Bytes
package cn.com.glsx.stdinterface.fallback;
import cn.com.glsx.stdinterface.api.StatisticsDriveClient;
import cn.com.glsx.stdinterface.dto.StatisticsDriveDto;
import com.glsx.plat.core.web.R;
import lombok.Setter;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Component;
import java.util.List;
/**
* 项目名:ne-shield-insurancenter-api
* 包名: cn.com.glsx.insurance.fallback
* 作者: Yanglinlong
* 日期: 2021/7/5 16:16
*/
@Slf4j
@Component
public class StatisticsDriveFallbackImpl implements StatisticsDriveClient {
@Setter
private Throwable cause;
@Override
public R statisticsDriveDataEveryDay() {
log.warn("statisticsDriveDataEveryDay 熔断啦 {}", cause.getMessage());
return R.ok("服务异常");
}
@Override
public R insertStatisticsDriveList(List<StatisticsDriveDto> statisticsDriveDtoList) {
log.warn("insertStatisticsDriveList 熔断啦 {}", cause.getMessage());
return R.ok("服务异常");
}
}