package com.ruoyi.system.api.factory;
|
|
import com.ruoyi.common.core.domain.R;
|
import com.ruoyi.system.api.domain.dto.MgtBaseBathDto;
|
import com.ruoyi.system.api.domain.dto.MgtBasePlatformDto;
|
import com.ruoyi.system.api.domain.dto.MgtShopIdByCodeDto;
|
import com.ruoyi.system.api.domain.vo.MgtBulletinBoardVo;
|
import com.ruoyi.system.api.domain.vo.MgtShopIdByCodeVo;
|
import com.ruoyi.system.api.domain.vo.MgtSimpleShopVo;
|
import com.ruoyi.system.api.model.QwH5LoginVo;
|
import com.ruoyi.system.api.model.QwUserDetailDto;
|
import com.ruoyi.system.api.service.RemoteShopService;
|
import com.ruoyi.system.api.domain.poji.shop.Shop;
|
import com.ruoyi.system.api.domain.vo.ShopRelUserVo;
|
import org.slf4j.Logger;
|
import org.slf4j.LoggerFactory;
|
import org.springframework.cloud.openfeign.FallbackFactory;
|
import org.springframework.stereotype.Component;
|
|
import java.util.List;
|
|
/**
|
* 商户服务
|
*
|
* @author jqs
|
*/
|
@Component
|
public class RemoteShopFallbackFactory implements FallbackFactory<RemoteShopService>
|
{
|
private static final Logger log = LoggerFactory.getLogger(RemoteShopFallbackFactory.class);
|
|
@Override
|
public RemoteShopService create(Throwable throwable)
|
{
|
log.error("商户服务调用失败:{}", throwable.getMessage());
|
return new RemoteShopService()
|
{
|
@Override
|
public R<Shop> getShop(Long shopId) {
|
return R.fail("获取商户失败:" + throwable.getMessage());
|
}
|
|
@Override
|
public R<ShopRelUserVo> getShopByUserId(Long userId) {
|
return R.fail("获取商户失败:" + throwable.getMessage());
|
}
|
|
@Override
|
public R<QwH5LoginVo> qwH5Login(QwUserDetailDto qwUserDetail) {
|
return R.fail("获取商户员工失败:" + throwable.getMessage());
|
}
|
|
@Override
|
public R deleteShopTag(String tag) {
|
return null;
|
}
|
|
@Override
|
public R deleteShopSuggestTag(String suggestTag) {
|
return R.fail("删除商户建议标签失败:" + throwable.getMessage());
|
}
|
|
@Override
|
public R<MgtShopIdByCodeVo> getShopIdByCode(MgtShopIdByCodeDto mgtShopIdByCodeDto) {
|
return R.fail("获取商户失败:" + throwable.getMessage());
|
}
|
|
@Override
|
public R<List<MgtSimpleShopVo>> listShopSimpleVoByIds(MgtBaseBathDto mgtBaseBathDto) {
|
return R.fail("获取商户列表失败:" + throwable.getMessage());
|
}
|
|
@Override
|
public R<MgtBulletinBoardVo> boardShopTotal() {
|
return null;
|
}
|
|
@Override
|
public R<List<Long>> listShopIdByPlTotal(MgtBasePlatformDto mgtBasePlatformDto) {
|
return R.fail("获取商户列表失败:" + throwable.getMessage());
|
}
|
|
|
};
|
}
|
}
|