代码调整
This commit is contained in:
@@ -3,6 +3,7 @@ package com.njcn.algorithm.api;
|
||||
import com.njcn.algorithm.api.fallback.DevModelFeignClientFallbackFactory;
|
||||
import com.njcn.algorithm.pojo.param.CsDevModelAddParm;
|
||||
import com.njcn.algorithm.pojo.param.CsDevModelQueryListParm;
|
||||
import com.njcn.algorithm.pojo.po.CsDevModelPO;
|
||||
import com.njcn.algorithm.pojo.vo.CsDevModelPageVO;
|
||||
import com.njcn.common.pojo.constant.ServerInfo;
|
||||
import com.njcn.common.pojo.response.HttpResult;
|
||||
@@ -19,7 +20,7 @@ import org.springframework.web.bind.annotation.RequestBody;
|
||||
public interface DevModelFeignClient {
|
||||
|
||||
@PostMapping("/addDevModel")
|
||||
HttpResult<Boolean> addDevModel(@RequestBody @Validated CsDevModelAddParm csDevModelAddParm);
|
||||
HttpResult<CsDevModelPO> addDevModel(@RequestBody @Validated CsDevModelAddParm csDevModelAddParm);
|
||||
|
||||
@PostMapping("/queryDevModelOne")
|
||||
HttpResult<CsDevModelPageVO> queryDevModelOne(@RequestBody CsDevModelQueryListParm csDevModelQueryListParm);
|
||||
|
||||
@@ -18,4 +18,7 @@ public interface EquipmentFeignClient {
|
||||
@PostMapping("/queryEquipmentByndid")
|
||||
HttpResult<CsEquipmentDeliveryVO> queryEquipmentByndid(@RequestParam("ndid") String ndid);
|
||||
|
||||
@PostMapping("/updateStatusBynDid")
|
||||
HttpResult<Boolean> updateStatusBynDid(@RequestParam("nDId") String nDid,@RequestParam("status") Integer status);
|
||||
|
||||
}
|
||||
|
||||
@@ -3,6 +3,7 @@ package com.njcn.algorithm.api.fallback;
|
||||
import com.njcn.algorithm.api.DevModelFeignClient;
|
||||
import com.njcn.algorithm.pojo.param.CsDevModelAddParm;
|
||||
import com.njcn.algorithm.pojo.param.CsDevModelQueryListParm;
|
||||
import com.njcn.algorithm.pojo.po.CsDevModelPO;
|
||||
import com.njcn.algorithm.pojo.vo.CsDevModelPageVO;
|
||||
import com.njcn.common.pojo.enums.response.CommonResponseEnum;
|
||||
import com.njcn.common.pojo.exception.BusinessException;
|
||||
@@ -35,7 +36,7 @@ public class DevModelFeignClientFallbackFactory implements FallbackFactory<DevMo
|
||||
return new DevModelFeignClient() {
|
||||
|
||||
@Override
|
||||
public HttpResult<Boolean> addDevModel(CsDevModelAddParm csDevModelAddParm) {
|
||||
public HttpResult<CsDevModelPO> addDevModel(CsDevModelAddParm csDevModelAddParm) {
|
||||
log.error("{}异常,降级处理,异常为:{}","新增装置模板版本信息",cause.toString());
|
||||
throw new BusinessException(finalExceptionEnum);
|
||||
}
|
||||
|
||||
@@ -8,6 +8,7 @@ import com.njcn.common.pojo.response.HttpResult;
|
||||
import feign.hystrix.FallbackFactory;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.stereotype.Component;
|
||||
import org.springframework.web.bind.annotation.RequestParam;
|
||||
|
||||
/**
|
||||
* @author xy
|
||||
@@ -31,6 +32,12 @@ public class EquipmentFeignClientFallbackFactory implements FallbackFactory<Equi
|
||||
log.error("{}异常,降级处理,异常为:{}","通过ndid查询出厂设备异常",cause.toString());
|
||||
throw new BusinessException(finalExceptionEnum);
|
||||
}
|
||||
|
||||
@Override
|
||||
public HttpResult<Boolean> updateStatusBynDid(String nDid, Integer status) {
|
||||
log.error("{}异常,降级处理,异常为:{}","通过ndid修改装置的状态",cause.toString());
|
||||
throw new BusinessException(finalExceptionEnum);
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user