1.实体调整
2.事件解析对外接口功能
This commit is contained in:
@@ -7,6 +7,7 @@ import com.njcn.csdevice.pojo.po.CsDeviceUserPO;
|
||||
import org.springframework.cloud.openfeign.FeignClient;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestParam;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@@ -18,4 +19,7 @@ public interface CsDeviceUserFeignClient {
|
||||
|
||||
@PostMapping("/addList")
|
||||
HttpResult<Boolean> add(@RequestBody List<CsDeviceUserPO> list);
|
||||
|
||||
@PostMapping("/findUserById")
|
||||
HttpResult<List<String>> findUserById(@RequestParam("id") String id);
|
||||
}
|
||||
|
||||
@@ -4,6 +4,7 @@ import com.njcn.common.pojo.constant.ServerInfo;
|
||||
import com.njcn.common.pojo.response.HttpResult;
|
||||
import com.njcn.csdevice.api.fallback.EquipmentFeignClientFallbackFactory;
|
||||
import com.njcn.csdevice.pojo.dto.CsEquipmentDeliveryDTO;
|
||||
import com.njcn.csdevice.pojo.po.CsEquipmentDeliveryPO;
|
||||
import com.njcn.csdevice.pojo.vo.CsEquipmentDeliveryVO;
|
||||
import org.springframework.cloud.openfeign.FeignClient;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
@@ -27,4 +28,12 @@ public interface EquipmentFeignClient {
|
||||
|
||||
@PostMapping("/updateSoftInfoBynDid")
|
||||
HttpResult<Boolean> updateSoftInfoBynDid(@RequestParam("nDId") String nDid, @RequestParam("id") String id, @RequestParam("module") Integer module);
|
||||
|
||||
/**
|
||||
* 根据nDid查询设备信息
|
||||
* @param nDid
|
||||
* @return
|
||||
*/
|
||||
@PostMapping("/findDevByNDid")
|
||||
HttpResult<CsEquipmentDeliveryPO> findDevByNDid(@RequestParam("nDid") String nDid);
|
||||
}
|
||||
|
||||
@@ -32,6 +32,12 @@ public class CsDeviceUserClientFallbackFactory implements FallbackFactory<CsDevi
|
||||
throw new BusinessException(finalExceptionEnum);
|
||||
}
|
||||
|
||||
@Override
|
||||
public HttpResult<List<String>> findUserById(String id) {
|
||||
log.error("{}异常,降级处理,异常为:{}","根据装置查询用户",cause.toString());
|
||||
throw new BusinessException(finalExceptionEnum);
|
||||
}
|
||||
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
@@ -5,6 +5,7 @@ import com.njcn.common.pojo.exception.BusinessException;
|
||||
import com.njcn.common.pojo.response.HttpResult;
|
||||
import com.njcn.csdevice.api.EquipmentFeignClient;
|
||||
import com.njcn.csdevice.pojo.dto.CsEquipmentDeliveryDTO;
|
||||
import com.njcn.csdevice.pojo.po.CsEquipmentDeliveryPO;
|
||||
import com.njcn.csdevice.pojo.vo.CsEquipmentDeliveryVO;
|
||||
import feign.hystrix.FallbackFactory;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
@@ -52,6 +53,12 @@ public class EquipmentFeignClientFallbackFactory implements FallbackFactory<Equi
|
||||
log.error("{}异常,降级处理,异常为:{}","根据网关id调整软件信息",cause.toString());
|
||||
throw new BusinessException(finalExceptionEnum);
|
||||
}
|
||||
|
||||
@Override
|
||||
public HttpResult<CsEquipmentDeliveryPO> findDevByNDid(String nDid) {
|
||||
log.error("{}异常,降级处理,异常为:{}","通过nDid查询设备信息",cause.toString());
|
||||
throw new BusinessException(finalExceptionEnum);
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user