提交
This commit is contained in:
@@ -3,6 +3,7 @@ package com.njcn.csdevice.api;
|
||||
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;
|
||||
@@ -23,5 +24,5 @@ public interface EquipmentFeignClient {
|
||||
@PostMapping("/updateStatusBynDid")
|
||||
HttpResult<Boolean> updateStatusBynDid(@RequestParam("nDId") String nDid,@RequestParam("status") Integer status);
|
||||
@PostMapping("/queryEquipmentById")
|
||||
HttpResult<List<CsEquipmentDeliveryPO>> queryDeviceById(@RequestParam("ids") List<String> ids);
|
||||
HttpResult<List<CsEquipmentDeliveryDTO>> queryDeviceById(@RequestParam("ids") List<String> ids);
|
||||
}
|
||||
|
||||
@@ -4,6 +4,7 @@ import com.njcn.common.pojo.enums.response.CommonResponseEnum;
|
||||
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;
|
||||
@@ -42,7 +43,7 @@ public class EquipmentFeignClientFallbackFactory implements FallbackFactory<Equi
|
||||
}
|
||||
|
||||
@Override
|
||||
public HttpResult<List<CsEquipmentDeliveryPO>> queryDeviceById(List<String> ids) {
|
||||
public HttpResult<List<CsEquipmentDeliveryDTO>> queryDeviceById(List<String> ids) {
|
||||
log.error("{}异常,降级处理,异常为:{}","查询出厂设备详情",cause.toString());
|
||||
throw new BusinessException(finalExceptionEnum);
|
||||
}
|
||||
|
||||
@@ -28,8 +28,8 @@ public enum AlgorithmResponseEnum {
|
||||
LOSE_EFFICACY ("A00509","二维码失效,该设备已绑定"),
|
||||
DATA_LOSE ("A00510","未找到设备与主用户信息"),
|
||||
REPEAT_SHARE ("A00511","设备已分享完成,请勿再次分享"),
|
||||
DEVICE_LOSE("A00512","设备id缺失")
|
||||
|
||||
DEVICE_LOSE("A00512","设备id缺失"),
|
||||
CHIRLDREN_EXIST("A00513","工程下存在项目,不能删除");
|
||||
;
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,115 @@
|
||||
package com.njcn.csdevice.pojo.dto;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.njcn.db.bo.BaseEntity;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
*
|
||||
* Description:
|
||||
* 接口文档访问地址:http://serverIP:port/swagger-ui.html
|
||||
* Date: 2023/3/30 16:23【需求编号】
|
||||
*
|
||||
* @author clam
|
||||
* @version V1.0.0
|
||||
*/
|
||||
|
||||
/**
|
||||
* 设备出厂表
|
||||
*/
|
||||
@Data
|
||||
@NoArgsConstructor
|
||||
public class CsEquipmentDeliveryDTO {
|
||||
/**
|
||||
* id
|
||||
*/
|
||||
@TableField(value = "id")
|
||||
private String id;
|
||||
|
||||
/**
|
||||
* 装置名称
|
||||
*/
|
||||
@TableField(value = "name")
|
||||
private String name;
|
||||
|
||||
/**
|
||||
* 网关识别码
|
||||
*/
|
||||
@TableField(value = "ndid")
|
||||
private String ndid;
|
||||
|
||||
/**
|
||||
* 装置mac地址
|
||||
*/
|
||||
@TableField(value = "mac")
|
||||
private String mac;
|
||||
|
||||
/**
|
||||
* 装置用途(治理、监测...)
|
||||
*/
|
||||
// @TableField(value = "dev_use")
|
||||
// private String devUse;
|
||||
|
||||
/**
|
||||
* 装置类型(直连设备、网关设备、装置)
|
||||
*/
|
||||
@TableField(value = "dev_type")
|
||||
private String devType;
|
||||
|
||||
/**
|
||||
* 装置型号(pqs588、pqs680...)
|
||||
*/
|
||||
@TableField(value = "dev_model")
|
||||
private String devModel;
|
||||
|
||||
/**
|
||||
* 装置接入方式(mqtt、cloud)
|
||||
*/
|
||||
@TableField(value = "dev_access_method")
|
||||
private String devAccessMethod;
|
||||
|
||||
/**
|
||||
* 装置程序版本
|
||||
*/
|
||||
@TableField(value = "program_version")
|
||||
private String programVersion;
|
||||
|
||||
/**
|
||||
* 调试人员
|
||||
*/
|
||||
@TableField(value = "debug_person")
|
||||
private String debugPerson;
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 合同号
|
||||
*/
|
||||
@TableField(value = "cntract_no")
|
||||
private String cntractNo;
|
||||
|
||||
/**
|
||||
* 营销经理
|
||||
*/
|
||||
@TableField(value = "sales_manager")
|
||||
private String salesManager;
|
||||
|
||||
/**
|
||||
* 接入状态(1:未注册 2:注册 3:接入)
|
||||
*/
|
||||
@TableField(value = "status")
|
||||
private String status;
|
||||
|
||||
/**
|
||||
* 设备状态(0:删除 1:离线 2:在线)
|
||||
*/
|
||||
@TableField(value = "run_status")
|
||||
private Integer runStatus;
|
||||
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user