Kaynağa Gözat

Merge branch 'master' of D:\code\smart-community with conflicts.

jianhui 5 yıl önce
ebeveyn
işleme
ab37ec1196
35 değiştirilmiş dosya ile 1787 ekleme ve 9 silme
  1. 14 0
      blade-biz-common/src/main/java/org/springblade/common/constant/CommonConstant.java
  2. 74 0
      blade-biz-common/src/main/java/org/springblade/common/constant/HttpConstant.java
  3. 12 0
      blade-service-api/third-api/src/main/java/org/springblade/third/iotdevice/constants/AepUrlConstants.java
  4. 16 0
      blade-service-api/third-api/src/main/java/org/springblade/third/iotdevice/dto/AepProductListQueryDto.java
  5. 29 0
      blade-service-api/third-api/src/main/java/org/springblade/third/iotdevice/dto/AepSubscribeSettingDto.java
  6. 34 0
      blade-service-api/third-api/src/main/java/org/springblade/third/iotdevice/dto/IotAepProductDTO.java
  7. 34 0
      blade-service-api/third-api/src/main/java/org/springblade/third/iotdevice/dto/IotSysConfDTO.java
  8. 150 0
      blade-service-api/third-api/src/main/java/org/springblade/third/iotdevice/entity/IotAepProduct.java
  9. 73 0
      blade-service-api/third-api/src/main/java/org/springblade/third/iotdevice/entity/IotSysConf.java
  10. 64 0
      blade-service-api/third-api/src/main/java/org/springblade/third/iotdevice/feign/IIotAepProductClient.java
  11. 64 0
      blade-service-api/third-api/src/main/java/org/springblade/third/iotdevice/feign/IIotSysConfClient.java
  12. 63 0
      blade-service-api/third-api/src/main/java/org/springblade/third/iotdevice/feign/IotAepProductClientFallback.java
  13. 63 0
      blade-service-api/third-api/src/main/java/org/springblade/third/iotdevice/feign/IotSysConfClientFallback.java
  14. 36 0
      blade-service-api/third-api/src/main/java/org/springblade/third/iotdevice/vo/IotAepProductVO.java
  15. 36 0
      blade-service-api/third-api/src/main/java/org/springblade/third/iotdevice/vo/IotSysConfVO.java
  16. 45 5
      blade-service/device/src/main/java/org/springblade/device/feign/DoorDeviceClient.java
  17. 17 0
      blade-service/third/src/main/java/org/springblade/third/iotdevice/controller/IotAepProductButtController.java
  18. 132 0
      blade-service/third/src/main/java/org/springblade/third/iotdevice/controller/IotAepProductController.java
  19. 130 0
      blade-service/third/src/main/java/org/springblade/third/iotdevice/controller/IotSysConfController.java
  20. 91 0
      blade-service/third/src/main/java/org/springblade/third/iotdevice/feign/IotAepProductClient.java
  21. 91 0
      blade-service/third/src/main/java/org/springblade/third/iotdevice/feign/IotSysConfClient.java
  22. 44 0
      blade-service/third/src/main/java/org/springblade/third/iotdevice/mapper/IotAepProductMapper.java
  23. 44 0
      blade-service/third/src/main/java/org/springblade/third/iotdevice/mapper/IotAepProductMapper.xml
  24. 44 0
      blade-service/third/src/main/java/org/springblade/third/iotdevice/mapper/IotSysConfMapper.java
  25. 28 0
      blade-service/third/src/main/java/org/springblade/third/iotdevice/mapper/IotSysConfMapper.xml
  26. 41 0
      blade-service/third/src/main/java/org/springblade/third/iotdevice/service/IIotAepProductService.java
  27. 41 0
      blade-service/third/src/main/java/org/springblade/third/iotdevice/service/IIotSysConfService.java
  28. 2 1
      blade-service/third/src/main/java/org/springblade/third/iotdevice/service/IPerceptionSubscribeService.java
  29. 2 2
      blade-service/third/src/main/java/org/springblade/third/iotdevice/service/ISubScribeSettingService.java
  30. 42 0
      blade-service/third/src/main/java/org/springblade/third/iotdevice/service/impl/IotAepProductServiceImpl.java
  31. 42 0
      blade-service/third/src/main/java/org/springblade/third/iotdevice/service/impl/IotSysConfServiceImpl.java
  32. 44 1
      blade-service/third/src/main/java/org/springblade/third/iotdevice/service/impl/PerceptionSubscribeServiceImpl.java
  33. 45 0
      blade-service/third/src/main/java/org/springblade/third/iotdevice/util/AepHttpUtil.java
  34. 50 0
      blade-service/third/src/main/java/org/springblade/third/iotdevice/wrapper/IotAepProductWrapper.java
  35. 50 0
      blade-service/third/src/main/java/org/springblade/third/iotdevice/wrapper/IotSysConfWrapper.java

+ 14 - 0
blade-biz-common/src/main/java/org/springblade/common/constant/CommonConstant.java

@@ -155,4 +155,18 @@ public interface CommonConstant {
 		}
 	}
 
+	@Getter
+	enum THIRDPLATFORM {
+
+		AEP("aep平台","aep"),
+		PERCEPTION("感知平台","scepctwing");
+		private String value;
+		private String name;
+
+		THIRDPLATFORM(String name,String value){
+			this.name = name;
+			this.value = value;
+		}
+	}
+
 }

+ 74 - 0
blade-biz-common/src/main/java/org/springblade/common/constant/HttpConstant.java

@@ -0,0 +1,74 @@
+package org.springblade.common.constant;
+
+/**
+ * title: HttpConstant
+ * package: org.springblade.common.constant
+ * description: Http常量
+ *
+ *
+ */
+public interface HttpConstant {
+
+    /**
+     * 未知
+     */
+    String UNKNOWN = "unknown";
+
+    /**
+     * 请求头:可获取到Ip信息
+     */
+    String[] IP_HEADER_ARRAY = {
+            "X-Requested-For",
+            "X-Forwarded-For",
+            "Proxy-Client-IP",
+            "WL-Proxy-Client-IP",
+            "HTTP_CLIENT_IP",
+            "HTTP_X_FORWARDED_FOR"
+    };
+
+    /**
+     * 请求头:可获取到用户代理相关信息
+     */
+    String USER_AGENT_HEADER = "user-agent";
+
+    /**
+     * 请求头:访问令牌
+     */
+    String ACCESS_TOKEN = "access-token";
+
+    /**
+     * Cookie:记住我
+     */
+    String REMEMBER_ME = "rememberMe";
+
+    /**
+     * 请求头:数据签名
+     */
+    String DATA_SIGN = "data-sign";
+
+    /**
+     * 请求头:时间戳
+     */
+    String TIME_STAMP = "time-stamp";
+
+    /**
+     * logo 图标
+     */
+    String LOGO_ICON = "favicon.ico";
+
+    /**
+     * content-type
+     */
+    String APPLICATION_JSON = "application/json";
+
+    /**
+     * content-type
+     */
+    String APPLICATION_JSON_UTF8 = "application/json;charset=utf-8";
+
+    /**
+     * content-type
+     */
+    String TEXT_PLAIN = "text/plain;charset=utf-8";
+
+}

+ 12 - 0
blade-service-api/third-api/src/main/java/org/springblade/third/iotdevice/constants/AepUrlConstants.java

@@ -0,0 +1,12 @@
+package org.springblade.third.iotdevice.constants;
+
+/**
+ * @author lidexi
+ * @date 2021/5/28 16:53
+ * AEP接口url地址
+ */
+
+public class AepUrlConstants {
+
+	public static  final String QUERYPRODUCTLIST = "https://ag-api.ctwing.cn/aep_product_management";
+}

+ 16 - 0
blade-service-api/third-api/src/main/java/org/springblade/third/iotdevice/dto/AepProductListQueryDto.java

@@ -0,0 +1,16 @@
+package org.springblade.third.iotdevice.dto;
+
+import lombok.Data;
+
+/**
+ * @author lidexi
+ * @date 2021/5/28 16:58
+ * aep批量查询参数
+ */
+@Data
+public class AepProductListQueryDto {
+
+	private int pageNow;
+
+	private int pageSize;
+}

+ 29 - 0
blade-service-api/third-api/src/main/java/org/springblade/third/iotdevice/dto/AepSubscribeSettingDto.java

@@ -0,0 +1,29 @@
+package org.springblade.third.iotdevice.dto;
+
+import lombok.Data;
+
+import java.io.Serializable;
+
+/**
+ * @author lidexi
+ * @date 2021/5/28 13:49
+ */
+@Data
+public class AepSubscribeSettingDto implements Serializable {
+	/**
+	 * 心跳上报url
+	 */
+	private String heartbeat_url;
+
+	/**
+	 * 告警上报url
+	 */
+	private String alarm_url;
+
+	/**
+	 * 设备状态上报url
+	 */
+	private String device_status_url;
+
+	private String appId;
+}

+ 34 - 0
blade-service-api/third-api/src/main/java/org/springblade/third/iotdevice/dto/IotAepProductDTO.java

@@ -0,0 +1,34 @@
+/*
+ *      Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
+ *
+ *  Redistribution and use in source and binary forms, with or without
+ *  modification, are permitted provided that the following conditions are met:
+ *
+ *  Redistributions of source code must retain the above copyright notice,
+ *  this list of conditions and the following disclaimer.
+ *  Redistributions in binary form must reproduce the above copyright
+ *  notice, this list of conditions and the following disclaimer in the
+ *  documentation and/or other materials provided with the distribution.
+ *  Neither the name of the dreamlu.net developer nor the names of its
+ *  contributors may be used to endorse or promote products derived from
+ *  this software without specific prior written permission.
+ *  Author: Chill 庄骞 (smallchill@163.com)
+ */
+package org.springblade.third.iotdevice.dto;
+
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import org.springblade.third.iotdevice.entity.IotAepProduct;
+
+/**
+ * 数据传输对象实体类
+ *
+ * @author BladeX
+ * @since 2021-05-28
+ */
+@Data
+@EqualsAndHashCode(callSuper = true)
+public class IotAepProductDTO extends IotAepProduct {
+	private static final long serialVersionUID = 1L;
+
+}

+ 34 - 0
blade-service-api/third-api/src/main/java/org/springblade/third/iotdevice/dto/IotSysConfDTO.java

@@ -0,0 +1,34 @@
+/*
+ *      Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
+ *
+ *  Redistribution and use in source and binary forms, with or without
+ *  modification, are permitted provided that the following conditions are met:
+ *
+ *  Redistributions of source code must retain the above copyright notice,
+ *  this list of conditions and the following disclaimer.
+ *  Redistributions in binary form must reproduce the above copyright
+ *  notice, this list of conditions and the following disclaimer in the
+ *  documentation and/or other materials provided with the distribution.
+ *  Neither the name of the dreamlu.net developer nor the names of its
+ *  contributors may be used to endorse or promote products derived from
+ *  this software without specific prior written permission.
+ *  Author: Chill 庄骞 (smallchill@163.com)
+ */
+package org.springblade.third.iotdevice.dto;
+
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import org.springblade.third.iotdevice.entity.IotSysConf;
+
+/**
+ * 数据传输对象实体类
+ *
+ * @author BladeX
+ * @since 2021-05-28
+ */
+@Data
+@EqualsAndHashCode(callSuper = true)
+public class IotSysConfDTO extends IotSysConf {
+	private static final long serialVersionUID = 1L;
+
+}

+ 150 - 0
blade-service-api/third-api/src/main/java/org/springblade/third/iotdevice/entity/IotAepProduct.java

@@ -0,0 +1,150 @@
+/*
+ *      Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
+ *
+ *  Redistribution and use in source and binary forms, with or without
+ *  modification, are permitted provided that the following conditions are met:
+ *
+ *  Redistributions of source code must retain the above copyright notice,
+ *  this list of conditions and the following disclaimer.
+ *  Redistributions in binary form must reproduce the above copyright
+ *  notice, this list of conditions and the following disclaimer in the
+ *  documentation and/or other materials provided with the distribution.
+ *  Neither the name of the dreamlu.net developer nor the names of its
+ *  contributors may be used to endorse or promote products derived from
+ *  this software without specific prior written permission.
+ *  Author: Chill 庄骞 (smallchill@163.com)
+ */
+package org.springblade.third.iotdevice.entity;
+
+import com.baomidou.mybatisplus.annotation.TableName;
+import org.springblade.core.mp.base.BaseEntity;
+import com.baomidou.mybatisplus.annotation.TableField;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+
+/**
+ * 实体类
+ *
+ * @author BladeX
+ * @since 2021-05-28
+ */
+@Data
+@TableName("third_iot_aep_product")
+@EqualsAndHashCode(callSuper = true)
+@ApiModel(value = "IotAepProduct对象", description = "IotAepProduct对象")
+public class IotAepProduct extends BaseEntity {
+
+	private static final long serialVersionUID = 1L;
+
+	private String thirdId;
+	/**
+	* 接入类型(必填): 1.设备直连,2.网关接入,3.南向云接入(只支持1)
+	*/
+		@ApiModelProperty(value = "接入类型(必填): 1.设备直连,2.网关接入,3.南向云接入(只支持1)")
+		private String accessType;
+	/**
+	* 认证方式 1:特征串认证,2:SM9认证,3:证书认证,4:IMEI认证,5:SIMID认证,6:SM2认证,7:IPV6标识认证
+	*/
+		@ApiModelProperty(value = "认证方式 1:特征串认证,2:SM9认证,3:证书认证,4:IMEI认证,5:SIMID认证,6:SM2认证,7:IPV6标识认证 ")
+		private String authType;
+	/**
+	* dataEncryption:数据加密方式 1:sm1,2:sm2,3:sm4,4:dtls,5:明文(只支持MQTT/LWM2M)
+	*/
+		@ApiModelProperty(value = "dataEncryption:数据加密方式 1:sm1,2:sm2,3:sm4,4:dtls,5:明文(只支持MQTT/LWM2M)")
+		private String dataEncryption;
+	/**
+	* T/T808协议 设备型号
+	*/
+		@ApiModelProperty(value = "T/T808协议 设备型号")
+		private String deviceModel;
+	/**
+	* encryptionType:安全类型(只支持MQTT,TCP协议) 0:一机一密,1:一型一密"
+	*/
+		@ApiModelProperty(value = "encryptionType:安全类型(只支持MQTT,TCP协议) 0:一机一密,1:一型一密")
+		private String encryptionType;
+	/**
+	* Endpoint格式(LWM2M协议必填):1.IMEI2.URN:IMEI:3.URN:IMEI-IMSI: 4.URN:IMEI+SM9
+	*/
+		@ApiModelProperty(value = "Endpoint格式(LWM2M协议必填):1.IMEI2.URN:IMEI:3.URN:IMEI-IMSI: 4.URN:IMEI+SM9")
+		private String endpointFormat;
+	/**
+	* eDRX模式时间窗(LWM2M协议,当省电模式为3时,必填):20 ~ 10485.76 间的值,精确到小数点后两位
+	*/
+		@ApiModelProperty(value = "eDRX模式时间窗(LWM2M协议,当省电模式为3时,必填):20 ~ 10485.76 间的值,精确到小数点后两位")
+		private String lwm2mEdrxTime;
+	/**
+	* JT/T808协议 制造商ID
+	*/
+		@ApiModelProperty(value = "JT/T808协议 制造商ID")
+		private String manufacturerId;
+	/**
+	* 网络类型(必填):1.WIFI,2.移动蜂窝数据3.NB-IoT,4.以太网,5.蓝牙,6.ZigBee(只支持1/2/3/4)
+	*/
+		@ApiModelProperty(value = "网络类型(必填):1.WIFI,2.移动蜂窝数据3.NB-IoT,4.以太网,5.蓝牙,6.ZigBee(只支持1/2/3/4)")
+		private String networkType;
+	/**
+	* 节点类型(必填):1.设备 ,2.网关
+	*/
+		@ApiModelProperty(value = "节点类型(必填):1.设备 ,2.网关")
+		private String nodeType;
+	/**
+	* 消息格式 1:json,2:紧凑二进制
+	*/
+		@ApiModelProperty(value = "消息格式 1:json,2:紧凑二进制")
+		private String payloadFormat;
+	/**
+	* 省电模式(LWM2M协议必填):1.PSM 2.DRX 3.eDRX
+	*/
+		@ApiModelProperty(value = "省电模式(LWM2M协议必填):1.PSM 2.DRX 3.eDRX")
+		private String powerModel;
+	/**
+	* 产品描述(选填):产品描述最多100个字符
+	*/
+		@ApiModelProperty(value = "产品描述(选填):产品描述最多100个字符")
+		private String productDesc;
+	/**
+	* 产品名称(必填):产品名称最多 64 个字符,产品名称必须包含数字或字母或汉字,产品名称租户内不能重复
+	*/
+		@ApiModelProperty(value = "产品名称(必填):产品名称最多 64 个字符,产品名称必须包含数字或字母或汉字,产品名称租户内不能重复")
+		private String productName;
+	/**
+	* 产品协议(必填):只支持 1.T-LINK协议 2.MQTT协议 3.LWM2M协议 5.HTTP协议 6.JT/T808 7.TCP协议 10.网关MQTT协议
+	*/
+		@ApiModelProperty(value = "产品协议(必填):只支持 1.T-LINK协议 2.MQTT协议 3.LWM2M协议 5.HTTP协议 6.JT/T808 7.TCP协议 10.网关MQTT协议")
+		private String productProtocol;
+	/**
+	* 产品分类(必填)
+	*/
+		@ApiModelProperty(value = "产品分类(必填)")
+		private String productType;
+	/**
+	* 二级分类(必填)
+	*/
+		@ApiModelProperty(value = "二级分类(必填)")
+		private String secondaryType;
+	/**
+	* 三级分类(必填)
+	*/
+		@ApiModelProperty(value = "三级分类(必填)")
+		private String thirdType;
+	/**
+	* 是否透传:0.透传,1不透传(JT/T808,tcp协议,只有透传,消息格式必须只能传null)
+	*/
+		@ApiModelProperty(value = "是否透传:0.透传,1不透传(JT/T808,tcp协议,只有透传,消息格式必须只能传null)")
+		@TableField("tupIs_through")
+	private String tupisThrough;
+	/**
+	* 设备型号,选填,设备直连并且非JT/T808协议产品必填"
+	*/
+		@ApiModelProperty(value = "设备型号,选填,设备直连并且非JT/T808协议产品必填")
+		private String tupDeviceModel;
+	/**
+	* 平台:scepctwing(感知平台)  ;aep
+	*/
+		@ApiModelProperty(value = "平台:scepctwing(感知平台)  ;aep")
+		private String platform;
+
+
+}

+ 73 - 0
blade-service-api/third-api/src/main/java/org/springblade/third/iotdevice/entity/IotSysConf.java

@@ -0,0 +1,73 @@
+/*
+ *      Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
+ *
+ *  Redistribution and use in source and binary forms, with or without
+ *  modification, are permitted provided that the following conditions are met:
+ *
+ *  Redistributions of source code must retain the above copyright notice,
+ *  this list of conditions and the following disclaimer.
+ *  Redistributions in binary form must reproduce the above copyright
+ *  notice, this list of conditions and the following disclaimer in the
+ *  documentation and/or other materials provided with the distribution.
+ *  Neither the name of the dreamlu.net developer nor the names of its
+ *  contributors may be used to endorse or promote products derived from
+ *  this software without specific prior written permission.
+ *  Author: Chill 庄骞 (smallchill@163.com)
+ */
+package org.springblade.third.iotdevice.entity;
+
+import com.baomidou.mybatisplus.annotation.TableName;
+import org.springblade.core.mp.base.BaseEntity;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+
+/**
+ * 实体类
+ *
+ * @author BladeX
+ * @since 2021-05-28
+ */
+@Data
+@TableName("third_iot_sys_conf")
+@EqualsAndHashCode(callSuper = true)
+@ApiModel(value = "IotSysConf对象", description = "IotSysConf对象")
+public class IotSysConf extends BaseEntity {
+
+	private static final long serialVersionUID = 1L;
+
+	/**
+	* 物联网服务器ip
+	*/
+		@ApiModelProperty(value = "物联网服务器ip")
+		private String host;
+	/**
+	* 物联网服务端口号
+	*/
+		@ApiModelProperty(value = "物联网服务端口号")
+		private String port;
+	/**
+	* 应用id
+	*/
+		@ApiModelProperty(value = "应用id")
+		private String appId;
+	/**
+	* 应用secret
+	*/
+		@ApiModelProperty(value = "应用secret")
+		private String appSecret;
+	/**
+	* 地址前缀,多个前缀已逗号隔开
+	*/
+		@ApiModelProperty(value = "地址前缀,多个前缀已逗号隔开")
+		private String prefix;
+
+	/**
+	 * 平台或者厂家
+	 */
+	@ApiModelProperty(value = "平台或者厂家")
+	private String paltform;
+
+
+}

+ 64 - 0
blade-service-api/third-api/src/main/java/org/springblade/third/iotdevice/feign/IIotAepProductClient.java

@@ -0,0 +1,64 @@
+package org.springblade.third.iotdevice.feign;
+
+import io.swagger.annotations.ApiParam;
+
+import org.springblade.third.iotdevice.entity.IotAepProduct;
+import org.springblade.third.iotdevice.vo.IotAepProductVO;
+import org.springframework.cloud.openfeign.FeignClient;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.RequestBody;
+import org.springframework.web.bind.annotation.RequestParam;
+import javax.validation.Valid;
+import java.util.List;
+
+/**
+ *  Feign
+ *
+ * @author lianghanqiang
+ * @since 2021-05-28
+ */
+@FeignClient(value = "cyzh-third",path = "/feign/iotaepproduct")
+public interface IIotAepProductClient  {
+
+	/**
+	 * 详情
+	 */
+	@GetMapping("/detail")
+	IotAepProductVO detail(IotAepProduct iotAepProduct);
+
+	/**
+	 * 查询
+	 */
+	@GetMapping("/list")
+    List<IotAepProductVO> list(IotAepProduct iotAepProduct);
+
+
+
+	/**
+	 * 新增
+	 */
+	@PostMapping("/save")
+	boolean save(@Valid @RequestBody IotAepProduct iotAepProduct);
+
+	/**
+	 * 修改
+	 */
+	@PostMapping("/update")
+    boolean update(@Valid @RequestBody IotAepProduct iotAepProduct);
+
+	/**
+	 * 新增或修改
+	 */
+	@PostMapping("/submit")
+    boolean submit(@Valid @RequestBody IotAepProduct iotAepProduct);
+
+
+	/**
+	 * 删除
+	 */
+	@PostMapping("/remove")
+    boolean remove(@ApiParam(value = "主键集合", required = true) @RequestParam String ids);
+
+
+}

+ 64 - 0
blade-service-api/third-api/src/main/java/org/springblade/third/iotdevice/feign/IIotSysConfClient.java

@@ -0,0 +1,64 @@
+package org.springblade.third.iotdevice.feign;
+
+import io.swagger.annotations.ApiParam;
+
+import org.springblade.third.iotdevice.entity.IotSysConf;
+import org.springblade.third.iotdevice.vo.IotSysConfVO;
+import org.springframework.cloud.openfeign.FeignClient;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.RequestBody;
+import org.springframework.web.bind.annotation.RequestParam;
+import javax.validation.Valid;
+import java.util.List;
+
+/**
+ *  Feign
+ *
+ * @author lianghanqiang
+ * @since 2021-05-28
+ */
+@FeignClient(value = "cyzh-third",path = "/feign/iotsysconf")
+public interface IIotSysConfClient  {
+
+	/**
+	 * 详情
+	 */
+	@GetMapping("/detail")
+	IotSysConfVO detail(IotSysConf iotSysConf);
+
+	/**
+	 * 查询
+	 */
+	@GetMapping("/list")
+    List<IotSysConfVO> list(IotSysConf iotSysConf);
+
+
+
+	/**
+	 * 新增
+	 */
+	@PostMapping("/save")
+	boolean save(@Valid @RequestBody IotSysConf iotSysConf);
+
+	/**
+	 * 修改
+	 */
+	@PostMapping("/update")
+    boolean update(@Valid @RequestBody IotSysConf iotSysConf);
+
+	/**
+	 * 新增或修改
+	 */
+	@PostMapping("/submit")
+    boolean submit(@Valid @RequestBody IotSysConf iotSysConf);
+
+
+	/**
+	 * 删除
+	 */
+	@PostMapping("/remove")
+    boolean remove(@ApiParam(value = "主键集合", required = true) @RequestParam String ids);
+
+
+}

+ 63 - 0
blade-service-api/third-api/src/main/java/org/springblade/third/iotdevice/feign/IotAepProductClientFallback.java

@@ -0,0 +1,63 @@
+package org.springblade.third.iotdevice.feign;
+
+
+import org.springblade.third.iotdevice.entity.IotAepProduct;
+import org.springblade.third.iotdevice.vo.IotAepProductVO;
+import org.springframework.stereotype.Component;
+import javax.validation.Valid;
+import java.util.List;
+
+@Component
+public class IotAepProductClientFallback implements IIotAepProductClient {
+            /**
+         * 详情
+         */
+        @Override
+        public IotAepProductVO detail(IotAepProduct iotAepProduct) {
+            return null;
+        }
+
+        /**
+         * 查询
+         */
+        @Override
+        public List<IotAepProductVO> list(IotAepProduct iotAepProduct) {
+            return null;
+        }
+
+
+
+        /**
+         * 新增
+         */
+        @Override
+        public boolean save( IotAepProduct iotAepProduct) {
+            return false;
+        }
+
+        /**
+         * 修改
+         */
+        @Override
+        public boolean update( IotAepProduct iotAepProduct) {
+            return false;
+        }
+
+        /**
+         * 新增或修改
+         */
+        @Override
+        public boolean submit( IotAepProduct iotAepProduct) {
+            return false;
+        }
+
+
+        /**
+         * 删除
+         */
+        @Override
+        public boolean remove( String ids) {
+            return false;
+        }
+
+    }

+ 63 - 0
blade-service-api/third-api/src/main/java/org/springblade/third/iotdevice/feign/IotSysConfClientFallback.java

@@ -0,0 +1,63 @@
+package org.springblade.third.iotdevice.feign;
+
+
+import org.springblade.third.iotdevice.entity.IotSysConf;
+import org.springblade.third.iotdevice.vo.IotSysConfVO;
+import org.springframework.stereotype.Component;
+import javax.validation.Valid;
+import java.util.List;
+
+@Component
+public class IotSysConfClientFallback implements IIotSysConfClient {
+            /**
+         * 详情
+         */
+        @Override
+        public IotSysConfVO detail(IotSysConf iotSysConf) {
+            return null;
+        }
+
+        /**
+         * 查询
+         */
+        @Override
+        public List<IotSysConfVO> list(IotSysConf iotSysConf) {
+            return null;
+        }
+
+
+
+        /**
+         * 新增
+         */
+        @Override
+        public boolean save( IotSysConf iotSysConf) {
+            return false;
+        }
+
+        /**
+         * 修改
+         */
+        @Override
+        public boolean update( IotSysConf iotSysConf) {
+            return false;
+        }
+
+        /**
+         * 新增或修改
+         */
+        @Override
+        public boolean submit( IotSysConf iotSysConf) {
+            return false;
+        }
+
+
+        /**
+         * 删除
+         */
+        @Override
+        public boolean remove( String ids) {
+            return false;
+        }
+
+    }

+ 36 - 0
blade-service-api/third-api/src/main/java/org/springblade/third/iotdevice/vo/IotAepProductVO.java

@@ -0,0 +1,36 @@
+/*
+ *      Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
+ *
+ *  Redistribution and use in source and binary forms, with or without
+ *  modification, are permitted provided that the following conditions are met:
+ *
+ *  Redistributions of source code must retain the above copyright notice,
+ *  this list of conditions and the following disclaimer.
+ *  Redistributions in binary form must reproduce the above copyright
+ *  notice, this list of conditions and the following disclaimer in the
+ *  documentation and/or other materials provided with the distribution.
+ *  Neither the name of the dreamlu.net developer nor the names of its
+ *  contributors may be used to endorse or promote products derived from
+ *  this software without specific prior written permission.
+ *  Author: Chill 庄骞 (smallchill@163.com)
+ */
+package org.springblade.third.iotdevice.vo;
+
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import io.swagger.annotations.ApiModel;
+import org.springblade.third.iotdevice.entity.IotAepProduct;
+
+/**
+ * 视图实体类
+ *
+ * @author BladeX
+ * @since 2021-05-28
+ */
+@Data
+@EqualsAndHashCode(callSuper = true)
+@ApiModel(value = "IotAepProductVO对象", description = "IotAepProductVO对象")
+public class IotAepProductVO extends IotAepProduct {
+	private static final long serialVersionUID = 1L;
+
+}

+ 36 - 0
blade-service-api/third-api/src/main/java/org/springblade/third/iotdevice/vo/IotSysConfVO.java

@@ -0,0 +1,36 @@
+/*
+ *      Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
+ *
+ *  Redistribution and use in source and binary forms, with or without
+ *  modification, are permitted provided that the following conditions are met:
+ *
+ *  Redistributions of source code must retain the above copyright notice,
+ *  this list of conditions and the following disclaimer.
+ *  Redistributions in binary form must reproduce the above copyright
+ *  notice, this list of conditions and the following disclaimer in the
+ *  documentation and/or other materials provided with the distribution.
+ *  Neither the name of the dreamlu.net developer nor the names of its
+ *  contributors may be used to endorse or promote products derived from
+ *  this software without specific prior written permission.
+ *  Author: Chill 庄骞 (smallchill@163.com)
+ */
+package org.springblade.third.iotdevice.vo;
+
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import io.swagger.annotations.ApiModel;
+import org.springblade.third.iotdevice.entity.IotSysConf;
+
+/**
+ * 视图实体类
+ *
+ * @author BladeX
+ * @since 2021-05-28
+ */
+@Data
+@EqualsAndHashCode(callSuper = true)
+@ApiModel(value = "IotSysConfVO对象", description = "IotSysConfVO对象")
+public class IotSysConfVO extends IotSysConf {
+	private static final long serialVersionUID = 1L;
+
+}

+ 45 - 5
blade-service/device/src/main/java/org/springblade/device/feign/DoorDeviceClient.java

@@ -12,7 +12,6 @@ import org.springblade.common.constant.OperationConstant;
 import org.springblade.common.utils.JsonUtils;
 import org.springblade.core.mp.support.Condition;
 import org.springblade.core.secure.utils.AuthUtil;
-import org.springblade.core.tool.api.R;
 import org.springblade.core.tool.utils.BeanUtil;
 import org.springblade.core.tool.utils.Func;
 import org.springblade.device.dto.DispatchTask;
@@ -53,6 +52,8 @@ import java.util.Map;
 public class DoorDeviceClient implements IDoorDeviceClient {
 
     private final IDoorDeviceService doorDeviceService;
+    private final MsgPublishService msgPublishService;
+    private final IAccessFacePushRecordsClient accessFacePushRecordsClient;
     private final IOrgPositionClient orgPositionClient;
     private final IDoorDeviceButtClient doorDeviceButtClient;
 
@@ -123,7 +124,7 @@ public class DoorDeviceClient implements IDoorDeviceClient {
 
 	@Override
 	@PostMapping(value = "/device/pushUserFaceToUniversalDevices/{operType}")
-	public R pushUserFaceToUniversalDevices(@RequestBody DispatchTask task, @PathVariable(value = "operType") Integer operType, @RequestParam Map<String,String> map) {
+	public boolean pushUserFaceToUniversalDevices(@RequestBody DispatchTask task, @PathVariable(value = "operType") Integer operType, @RequestParam Map<String,String> map) {
 		Assert.notNull(task.getXqId(),"小区Id不能为空");
 		Assert.notNull(task.getData(),"人脸信息不能为空");
 		ObjectMapper objectMapper = new ObjectMapper();
@@ -138,10 +139,49 @@ public class DoorDeviceClient implements IDoorDeviceClient {
 		searchEntity.setHaveFace(1);//1标识支持人脸识别的设备
 		List<DoorDevice> deviceList = this.doorDeviceService.list(Condition.getQueryWrapper(searchEntity));
 		if(deviceList == null || deviceList.size() < 0){
-			return R.success("小区下无人脸机,无需下发人脸");
+//            Assert.notEmpty(deviceList, "小区下无人脸机,无需下发人脸");
+			return true;
 		}
-		R result = doorDeviceButtClient.addUser(deviceList, userInfoDto);
-		return result;
+		//有效期开始时间
+		SimpleDateFormat format = new SimpleDateFormat();
+		if (null != userInfoDto.getBeginDate()){
+			map.put("beginTime",format.format(userInfoDto.getBeginDate()));
+		}else {
+			map.put("beginTime",null);
+		}
+		//有效期结束时间
+		if (null != userInfoDto.getEndDate()){
+			map.put("endTime",format.format(userInfoDto.getEndDate()));
+		}else {
+			map.put("endTime",null);
+		}
+		//人脸
+		if (userInfoDto.getFaceCodeList().size() > 0){
+			List<String> list = new ArrayList<>();
+			for (Map m : userInfoDto.getFaceCodeList()) {
+				if (m.containsKey("imgSrc")){
+					list.add(m.get("imgSrc").toString());
+				}
+			}
+			map.put("imgSrc", JsonUtils.listToString(list));
+		}else {
+			map.put("imgSrc",null);
+		}
+		if(operType.equals(1)){//新下发人脸
+			Map<String, Object> addUserMap = BeanUtil.toMap(userInfoDto);
+			doorDeviceButtClient.addUser(deviceList, addUserMap);
+		}else if(operType.equals(2)){ //更新人脸
+			Map<String, Object> addUserMap = BeanUtil.toMap(userInfoDto);
+			doorDeviceButtClient.addUser(deviceList, addUserMap);
+		}
+
+
+		/*--------------------------------------------------记录用户人脸授权下发设备记录------------------------------------------*/
+		//获取用户
+//        User user = this.userFeign.findUserById(Long.parseLong(userInfoDto.getId().substring(OperationConstant.TWO)));
+//        this.editAccessFacePushRecords(userInfoDto, operType, deviceList,user.getFaceBeginDate(),user.getFaceEndDate());
+		/*---------------------------------------------------------------------------------------------------------------------*/
+		return true;
 	}
 
 	@Override

+ 17 - 0
blade-service/third/src/main/java/org/springblade/third/iotdevice/controller/IotAepProductButtController.java

@@ -0,0 +1,17 @@
+package org.springblade.third.iotdevice.controller;
+
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+
+/**
+ * @author lidexi
+ * @date 2021/5/28 16:46
+ * aep产品设备对接控制层
+ */
+
+@RestController
+@RequestMapping("/third/aepproduct/butt")
+public class IotAepProductButtController {
+
+
+}

+ 132 - 0
blade-service/third/src/main/java/org/springblade/third/iotdevice/controller/IotAepProductController.java

@@ -0,0 +1,132 @@
+/*
+ *      Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
+ *
+ *  Redistribution and use in source and binary forms, with or without
+ *  modification, are permitted provided that the following conditions are met:
+ *
+ *  Redistributions of source code must retain the above copyright notice,
+ *  this list of conditions and the following disclaimer.
+ *  Redistributions in binary form must reproduce the above copyright
+ *  notice, this list of conditions and the following disclaimer in the
+ *  documentation and/or other materials provided with the distribution.
+ *  Neither the name of the dreamlu.net developer nor the names of its
+ *  contributors may be used to endorse or promote products derived from
+ *  this software without specific prior written permission.
+ *  Author: Chill 庄骞 (smallchill@163.com)
+ */
+package org.springblade.third.controller;
+
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import io.swagger.annotations.ApiParam;
+import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
+import lombok.AllArgsConstructor;
+import javax.validation.Valid;
+
+import org.springblade.core.mp.support.Condition;
+import org.springblade.core.mp.support.Query;
+import org.springblade.core.tool.api.R;
+import org.springblade.core.tool.utils.Func;
+import org.springblade.third.iotdevice.entity.IotAepProduct;
+import org.springblade.third.iotdevice.service.IIotAepProductService;
+import org.springblade.third.iotdevice.vo.IotAepProductVO;
+import org.springblade.third.iotdevice.wrapper.IotAepProductWrapper;
+import org.springframework.web.bind.annotation.*;
+import org.springframework.web.bind.annotation.RequestParam;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+
+import org.springblade.core.boot.ctrl.BladeController;
+
+/**
+ *  控制器
+ *
+ * @author BladeX
+ * @since 2021-05-28
+ */
+@RestController
+@AllArgsConstructor
+@RequestMapping("/iotaepproduct")
+@Api(value = "", tags = "接口")
+public class IotAepProductController extends BladeController {
+
+	private final IIotAepProductService iotAepProductService;
+
+	/**
+	 * 详情
+	 */
+	@GetMapping("/detail")
+	@ApiOperationSupport(order = 1)
+	@ApiOperation(value = "详情", notes = "传入iotAepProduct")
+	public R<IotAepProductVO> detail(IotAepProduct iotAepProduct) {
+		IotAepProduct detail = iotAepProductService.getOne(Condition.getQueryWrapper(iotAepProduct));
+		return R.data(IotAepProductWrapper.build().entityVO(detail));
+	}
+
+	/**
+	 * 分页
+	 */
+	@GetMapping("/list")
+	@ApiOperationSupport(order = 2)
+	@ApiOperation(value = "分页", notes = "传入iotAepProduct")
+	public R<IPage<IotAepProductVO>> list(IotAepProduct iotAepProduct, Query query) {
+		IPage<IotAepProduct> pages = iotAepProductService.page(Condition.getPage(query), Condition.getQueryWrapper(iotAepProduct));
+		return R.data(IotAepProductWrapper.build().pageVO(pages));
+	}
+
+
+	/**
+	 * 自定义分页
+	 */
+	@GetMapping("/page")
+	@ApiOperationSupport(order = 3)
+	@ApiOperation(value = "分页", notes = "传入iotAepProduct")
+	public R<IPage<IotAepProductVO>> page(IotAepProductVO iotAepProduct, Query query) {
+		IPage<IotAepProductVO> pages = iotAepProductService.selectIotAepProductPage(Condition.getPage(query), iotAepProduct);
+		return R.data(pages);
+	}
+
+	/**
+	 * 新增
+	 */
+	@PostMapping("/save")
+	@ApiOperationSupport(order = 4)
+	@ApiOperation(value = "新增", notes = "传入iotAepProduct")
+	public R save(@Valid @RequestBody IotAepProduct iotAepProduct) {
+		return R.status(iotAepProductService.save(iotAepProduct));
+	}
+
+	/**
+	 * 修改
+	 */
+	@PostMapping("/update")
+	@ApiOperationSupport(order = 5)
+	@ApiOperation(value = "修改", notes = "传入iotAepProduct")
+	public R update(@Valid @RequestBody IotAepProduct iotAepProduct) {
+		return R.status(iotAepProductService.updateById(iotAepProduct));
+	}
+
+	/**
+	 * 新增或修改
+	 */
+	@PostMapping("/submit")
+	@ApiOperationSupport(order = 6)
+	@ApiOperation(value = "新增或修改", notes = "传入iotAepProduct")
+	public R submit(@Valid @RequestBody IotAepProduct iotAepProduct) {
+		return R.status(iotAepProductService.saveOrUpdate(iotAepProduct));
+	}
+
+
+	/**
+	 * 删除
+	 */
+	@PostMapping("/remove")
+	@ApiOperationSupport(order = 7)
+	@ApiOperation(value = "逻辑删除", notes = "传入ids")
+	public R remove(@ApiParam(value = "主键集合", required = true) @RequestParam String ids) {
+		return R.status(iotAepProductService.deleteLogic(Func.toLongList(ids)));
+	}
+
+
+
+
+}

+ 130 - 0
blade-service/third/src/main/java/org/springblade/third/iotdevice/controller/IotSysConfController.java

@@ -0,0 +1,130 @@
+/*
+ *      Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
+ *
+ *  Redistribution and use in source and binary forms, with or without
+ *  modification, are permitted provided that the following conditions are met:
+ *
+ *  Redistributions of source code must retain the above copyright notice,
+ *  this list of conditions and the following disclaimer.
+ *  Redistributions in binary form must reproduce the above copyright
+ *  notice, this list of conditions and the following disclaimer in the
+ *  documentation and/or other materials provided with the distribution.
+ *  Neither the name of the dreamlu.net developer nor the names of its
+ *  contributors may be used to endorse or promote products derived from
+ *  this software without specific prior written permission.
+ *  Author: Chill 庄骞 (smallchill@163.com)
+ */
+package org.springblade.third.iotdevice.controller;
+
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import io.swagger.annotations.ApiParam;
+import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
+import lombok.AllArgsConstructor;
+import javax.validation.Valid;
+
+import org.springblade.core.mp.support.Condition;
+import org.springblade.core.mp.support.Query;
+import org.springblade.core.tool.api.R;
+import org.springblade.core.tool.utils.Func;
+import org.springblade.third.iotdevice.entity.IotSysConf;
+import org.springblade.third.iotdevice.service.IIotSysConfService;
+import org.springblade.third.iotdevice.vo.IotSysConfVO;
+import org.springblade.third.iotdevice.wrapper.IotSysConfWrapper;
+import org.springframework.web.bind.annotation.*;
+import org.springframework.web.bind.annotation.RequestParam;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+
+import org.springblade.core.boot.ctrl.BladeController;
+
+/**
+ *  控制器
+ *
+ * @author BladeX
+ * @since 2021-05-28
+ */
+@RestController
+@AllArgsConstructor
+@RequestMapping("/iotsysconf")
+@Api(value = "", tags = "接口")
+public class IotSysConfController extends BladeController {
+
+	private final IIotSysConfService iotSysConfService;
+
+	/**
+	 * 详情
+	 */
+	@GetMapping("/detail")
+	@ApiOperationSupport(order = 1)
+	@ApiOperation(value = "详情", notes = "传入iotSysConf")
+	public R<IotSysConfVO> detail(IotSysConf iotSysConf) {
+		IotSysConf detail = iotSysConfService.getOne(Condition.getQueryWrapper(iotSysConf));
+		return R.data(IotSysConfWrapper.build().entityVO(detail));
+	}
+
+	/**
+	 * 分页
+	 */
+	@GetMapping("/list")
+	@ApiOperationSupport(order = 2)
+	@ApiOperation(value = "分页", notes = "传入iotSysConf")
+	public R<IPage<IotSysConfVO>> list(IotSysConf iotSysConf, Query query) {
+		IPage<IotSysConf> pages = iotSysConfService.page(Condition.getPage(query), Condition.getQueryWrapper(iotSysConf));
+		return R.data(IotSysConfWrapper.build().pageVO(pages));
+	}
+
+
+	/**
+	 * 自定义分页
+	 */
+	@GetMapping("/page")
+	@ApiOperationSupport(order = 3)
+	@ApiOperation(value = "分页", notes = "传入iotSysConf")
+	public R<IPage<IotSysConfVO>> page(IotSysConfVO iotSysConf, Query query) {
+		IPage<IotSysConfVO> pages = iotSysConfService.selectIotSysConfPage(Condition.getPage(query), iotSysConf);
+		return R.data(pages);
+	}
+
+	/**
+	 * 新增
+	 */
+	@PostMapping("/save")
+	@ApiOperationSupport(order = 4)
+	@ApiOperation(value = "新增", notes = "传入iotSysConf")
+	public R save(@Valid @RequestBody IotSysConf iotSysConf) {
+		return R.status(iotSysConfService.save(iotSysConf));
+	}
+
+	/**
+	 * 修改
+	 */
+	@PostMapping("/update")
+	@ApiOperationSupport(order = 5)
+	@ApiOperation(value = "修改", notes = "传入iotSysConf")
+	public R update(@Valid @RequestBody IotSysConf iotSysConf) {
+		return R.status(iotSysConfService.updateById(iotSysConf));
+	}
+
+	/**
+	 * 新增或修改
+	 */
+	@PostMapping("/submit")
+	@ApiOperationSupport(order = 6)
+	@ApiOperation(value = "新增或修改", notes = "传入iotSysConf")
+	public R submit(@Valid @RequestBody IotSysConf iotSysConf) {
+		return R.status(iotSysConfService.saveOrUpdate(iotSysConf));
+	}
+
+
+	/**
+	 * 删除
+	 */
+	@PostMapping("/remove")
+	@ApiOperationSupport(order = 7)
+	@ApiOperation(value = "逻辑删除", notes = "传入ids")
+	public R remove(@ApiParam(value = "主键集合", required = true) @RequestParam String ids) {
+		return R.status(iotSysConfService.deleteLogic(Func.toLongList(ids)));
+	}
+
+
+}

+ 91 - 0
blade-service/third/src/main/java/org/springblade/third/iotdevice/feign/IotAepProductClient.java

@@ -0,0 +1,91 @@
+package org.springblade.third.iotdevice.feign;
+
+import io.swagger.annotations.ApiParam;
+import lombok.AllArgsConstructor;
+import javax.validation.Valid;
+import org.springblade.core.mp.support.Condition;
+import org.springblade.core.tool.utils.Func;
+import org.springblade.third.iotdevice.entity.IotAepProduct;
+import org.springblade.third.iotdevice.service.IIotAepProductService;
+import org.springblade.third.iotdevice.vo.IotAepProductVO;
+import org.springblade.third.iotdevice.wrapper.IotAepProductWrapper;
+import org.springframework.web.bind.annotation.*;
+import org.springframework.web.bind.annotation.RequestParam;
+
+import org.springblade.core.boot.ctrl.BladeController;
+import java.util.List;
+/**
+ *  client
+ *
+ * @author lianghanqiang
+ * @since 2021-05-28
+ */
+
+@AllArgsConstructor
+@RestController
+@RequestMapping("/feign/iotaepproduct")
+
+public class IotAepProductClient implements IIotAepProductClient {
+
+    private final IIotAepProductService iotAepProductService;
+
+        /**
+     * 详情
+     */
+    @Override
+    @GetMapping("/detail")
+    public IotAepProductVO detail(IotAepProduct iotAepProduct) {
+        IotAepProduct detail = iotAepProductService.getOne(Condition.getQueryWrapper(iotAepProduct));
+        return IotAepProductWrapper.build().entityVO(detail);
+        }
+
+    /**
+     * 查询
+     */
+    @Override
+    @GetMapping("/list")
+    public List<IotAepProductVO> list(IotAepProduct iotAepProduct) {
+        return IotAepProductWrapper.build().listVO(iotAepProductService.list(Condition.getQueryWrapper(iotAepProduct)));
+        }
+
+
+
+    /**
+     * 新增
+     */
+    @Override
+    @PostMapping("/save")
+    public boolean save(@Valid @RequestBody IotAepProduct iotAepProduct) {
+        return iotAepProductService.save(iotAepProduct);
+        }
+
+    /**
+     * 修改
+     */
+    @Override
+    @PostMapping("/update")
+    public boolean update(@Valid @RequestBody IotAepProduct iotAepProduct) {
+        return iotAepProductService.updateById(iotAepProduct);
+        }
+
+    /**
+     * 新增或修改
+     */
+    @Override
+    @PostMapping("/submit")
+    public boolean submit(@Valid @RequestBody IotAepProduct iotAepProduct) {
+        return iotAepProductService.saveOrUpdate(iotAepProduct);
+        }
+
+
+    /**
+     * 删除
+     */
+    @Override
+    @PostMapping("/remove")
+    public boolean remove(@ApiParam(value = "主键集合", required = true) @RequestParam String ids) {
+        return iotAepProductService.deleteLogic(Func.toLongList(ids));
+        }
+
+
+}

+ 91 - 0
blade-service/third/src/main/java/org/springblade/third/iotdevice/feign/IotSysConfClient.java

@@ -0,0 +1,91 @@
+package org.springblade.third.iotdevice.feign;
+
+import io.swagger.annotations.ApiParam;
+import lombok.AllArgsConstructor;
+import javax.validation.Valid;
+import org.springblade.core.mp.support.Condition;
+import org.springblade.core.tool.utils.Func;
+import org.springblade.third.iotdevice.entity.IotSysConf;
+import org.springblade.third.iotdevice.service.IIotSysConfService;
+import org.springblade.third.iotdevice.vo.IotSysConfVO;
+import org.springblade.third.iotdevice.wrapper.IotSysConfWrapper;
+import org.springframework.web.bind.annotation.*;
+import org.springframework.web.bind.annotation.RequestParam;
+
+import org.springblade.core.boot.ctrl.BladeController;
+import java.util.List;
+/**
+ *  client
+ *
+ * @author lianghanqiang
+ * @since 2021-05-28
+ */
+
+@AllArgsConstructor
+@RestController
+@RequestMapping("/feign/iotsysconf")
+
+public class IotSysConfClient implements IIotSysConfClient {
+
+    private final IIotSysConfService iotSysConfService;
+
+        /**
+     * 详情
+     */
+    @Override
+    @GetMapping("/detail")
+    public IotSysConfVO detail(IotSysConf iotSysConf) {
+        IotSysConf detail = iotSysConfService.getOne(Condition.getQueryWrapper(iotSysConf));
+        return IotSysConfWrapper.build().entityVO(detail);
+        }
+
+    /**
+     * 查询
+     */
+    @Override
+    @GetMapping("/list")
+    public List<IotSysConfVO> list(IotSysConf iotSysConf) {
+        return IotSysConfWrapper.build().listVO(iotSysConfService.list(Condition.getQueryWrapper(iotSysConf)));
+        }
+
+
+
+    /**
+     * 新增
+     */
+    @Override
+    @PostMapping("/save")
+    public boolean save(@Valid @RequestBody IotSysConf iotSysConf) {
+        return iotSysConfService.save(iotSysConf);
+        }
+
+    /**
+     * 修改
+     */
+    @Override
+    @PostMapping("/update")
+    public boolean update(@Valid @RequestBody IotSysConf iotSysConf) {
+        return iotSysConfService.updateById(iotSysConf);
+        }
+
+    /**
+     * 新增或修改
+     */
+    @Override
+    @PostMapping("/submit")
+    public boolean submit(@Valid @RequestBody IotSysConf iotSysConf) {
+        return iotSysConfService.saveOrUpdate(iotSysConf);
+        }
+
+
+    /**
+     * 删除
+     */
+    @Override
+    @PostMapping("/remove")
+    public boolean remove(@ApiParam(value = "主键集合", required = true) @RequestParam String ids) {
+        return iotSysConfService.deleteLogic(Func.toLongList(ids));
+        }
+
+
+}

+ 44 - 0
blade-service/third/src/main/java/org/springblade/third/iotdevice/mapper/IotAepProductMapper.java

@@ -0,0 +1,44 @@
+/*
+ *      Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
+ *
+ *  Redistribution and use in source and binary forms, with or without
+ *  modification, are permitted provided that the following conditions are met:
+ *
+ *  Redistributions of source code must retain the above copyright notice,
+ *  this list of conditions and the following disclaimer.
+ *  Redistributions in binary form must reproduce the above copyright
+ *  notice, this list of conditions and the following disclaimer in the
+ *  documentation and/or other materials provided with the distribution.
+ *  Neither the name of the dreamlu.net developer nor the names of its
+ *  contributors may be used to endorse or promote products derived from
+ *  this software without specific prior written permission.
+ *  Author: Chill 庄骞 (smallchill@163.com)
+ */
+package org.springblade.third.iotdevice.mapper;
+
+
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import org.springblade.third.iotdevice.entity.IotAepProduct;
+import org.springblade.third.iotdevice.vo.IotAepProductVO;
+
+import java.util.List;
+
+/**
+ *  Mapper 接口
+ *
+ * @author BladeX
+ * @since 2021-05-28
+ */
+public interface IotAepProductMapper extends BaseMapper<IotAepProduct> {
+
+	/**
+	 * 自定义分页
+	 *
+	 * @param page
+	 * @param iotAepProduct
+	 * @return
+	 */
+	List<IotAepProductVO> selectIotAepProductPage(IPage page, IotAepProductVO iotAepProduct);
+
+}

+ 44 - 0
blade-service/third/src/main/java/org/springblade/third/iotdevice/mapper/IotAepProductMapper.xml

@@ -0,0 +1,44 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="org.springblade.third.iotdevice.mapper.IotAepProductMapper">
+
+    <!-- 通用查询映射结果 -->
+    <resultMap id="iotAepProductResultMap" type="org.springblade.third.iotdevice.entity.IotAepProduct">
+        <result column="id" property="id"/>
+        <result column="create_user" property="createUser"/>
+        <result column="create_dept" property="createDept"/>
+        <result column="update_user" property="updateUser"/>
+        <result column="create_time" property="createTime"/>
+        <result column="update_time" property="updateTime"/>
+        <result column="status" property="status"/>
+        <result column="is_deleted" property="isDeleted"/>
+        <result column="third_id" property="thirdId"/>
+        <result column="access_type" property="accessType"/>
+        <result column="auth_type" property="authType"/>
+        <result column="data_encryption" property="dataEncryption"/>
+        <result column="device_model" property="deviceModel"/>
+        <result column="encryption_type" property="encryptionType"/>
+        <result column="endpoint_format" property="endpointFormat"/>
+        <result column="lwm2m_edrx_time" property="lwm2mEdrxTime"/>
+        <result column="manufacturer_id" property="manufacturerId"/>
+        <result column="network_type" property="networkType"/>
+        <result column="node_type" property="nodeType"/>
+        <result column="payload_format" property="payloadFormat"/>
+        <result column="power_model" property="powerModel"/>
+        <result column="product_desc" property="productDesc"/>
+        <result column="product_name" property="productName"/>
+        <result column="product_protocol" property="productProtocol"/>
+        <result column="product_type" property="productType"/>
+        <result column="secondary_type" property="secondaryType"/>
+        <result column="third_type" property="thirdType"/>
+        <result column="tupIs_through" property="tupisThrough"/>
+        <result column="tup_device_model" property="tupDeviceModel"/>
+        <result column="platform" property="platform"/>
+    </resultMap>
+
+
+    <select id="selectIotAepProductPage" resultMap="iotAepProductResultMap">
+        select * from third_iot_aep_product where is_deleted = 0
+    </select>
+
+</mapper>

+ 44 - 0
blade-service/third/src/main/java/org/springblade/third/iotdevice/mapper/IotSysConfMapper.java

@@ -0,0 +1,44 @@
+/*
+ *      Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
+ *
+ *  Redistribution and use in source and binary forms, with or without
+ *  modification, are permitted provided that the following conditions are met:
+ *
+ *  Redistributions of source code must retain the above copyright notice,
+ *  this list of conditions and the following disclaimer.
+ *  Redistributions in binary form must reproduce the above copyright
+ *  notice, this list of conditions and the following disclaimer in the
+ *  documentation and/or other materials provided with the distribution.
+ *  Neither the name of the dreamlu.net developer nor the names of its
+ *  contributors may be used to endorse or promote products derived from
+ *  this software without specific prior written permission.
+ *  Author: Chill 庄骞 (smallchill@163.com)
+ */
+package org.springblade.third.iotdevice.mapper;
+
+
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import org.springblade.third.iotdevice.entity.IotSysConf;
+import org.springblade.third.iotdevice.vo.IotSysConfVO;
+
+import java.util.List;
+
+/**
+ *  Mapper 接口
+ *
+ * @author BladeX
+ * @since 2021-05-28
+ */
+public interface IotSysConfMapper extends BaseMapper<IotSysConf> {
+
+	/**
+	 * 自定义分页
+	 *
+	 * @param page
+	 * @param iotSysConf
+	 * @return
+	 */
+	List<IotSysConfVO> selectIotSysConfPage(IPage page, IotSysConfVO iotSysConf);
+
+}

+ 28 - 0
blade-service/third/src/main/java/org/springblade/third/iotdevice/mapper/IotSysConfMapper.xml

@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="org.springblade.third.iotdevice.mapper.IotSysConfMapper">
+
+    <!-- 通用查询映射结果 -->
+    <resultMap id="iotSysConfResultMap" type="org.springblade.third.iotdevice.entity.IotSysConf">
+        <result column="id" property="id"/>
+        <result column="create_user" property="createUser"/>
+        <result column="create_dept" property="createDept"/>
+        <result column="create_time" property="createTime"/>
+        <result column="update_user" property="updateUser"/>
+        <result column="update_time" property="updateTime"/>
+        <result column="status" property="status"/>
+        <result column="is_deleted" property="isDeleted"/>
+        <result column="host" property="host"/>
+        <result column="port" property="port"/>
+        <result column="app_id" property="appId"/>
+        <result column="app_secret" property="appSecret"/>
+        <result column="prefix" property="prefix"/>
+        <result column="platform" property="platform"/>
+    </resultMap>
+
+
+    <select id="selectIotSysConfPage" resultMap="iotSysConfResultMap">
+        select * from third_iot_sys_conf where is_deleted = 0
+    </select>
+
+</mapper>

+ 41 - 0
blade-service/third/src/main/java/org/springblade/third/iotdevice/service/IIotAepProductService.java

@@ -0,0 +1,41 @@
+/*
+ *      Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
+ *
+ *  Redistribution and use in source and binary forms, with or without
+ *  modification, are permitted provided that the following conditions are met:
+ *
+ *  Redistributions of source code must retain the above copyright notice,
+ *  this list of conditions and the following disclaimer.
+ *  Redistributions in binary form must reproduce the above copyright
+ *  notice, this list of conditions and the following disclaimer in the
+ *  documentation and/or other materials provided with the distribution.
+ *  Neither the name of the dreamlu.net developer nor the names of its
+ *  contributors may be used to endorse or promote products derived from
+ *  this software without specific prior written permission.
+ *  Author: Chill 庄骞 (smallchill@163.com)
+ */
+package org.springblade.third.iotdevice.service;
+
+import org.springblade.core.mp.base.BaseService;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import org.springblade.third.iotdevice.entity.IotAepProduct;
+import org.springblade.third.iotdevice.vo.IotAepProductVO;
+
+/**
+ *  服务类
+ *
+ * @author BladeX
+ * @since 2021-05-28
+ */
+public interface IIotAepProductService extends BaseService<IotAepProduct> {
+
+	/**
+	 * 自定义分页
+	 *
+	 * @param page
+	 * @param iotAepProduct
+	 * @return
+	 */
+	IPage<IotAepProductVO> selectIotAepProductPage(IPage<IotAepProductVO> page, IotAepProductVO iotAepProduct);
+
+}

+ 41 - 0
blade-service/third/src/main/java/org/springblade/third/iotdevice/service/IIotSysConfService.java

@@ -0,0 +1,41 @@
+/*
+ *      Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
+ *
+ *  Redistribution and use in source and binary forms, with or without
+ *  modification, are permitted provided that the following conditions are met:
+ *
+ *  Redistributions of source code must retain the above copyright notice,
+ *  this list of conditions and the following disclaimer.
+ *  Redistributions in binary form must reproduce the above copyright
+ *  notice, this list of conditions and the following disclaimer in the
+ *  documentation and/or other materials provided with the distribution.
+ *  Neither the name of the dreamlu.net developer nor the names of its
+ *  contributors may be used to endorse or promote products derived from
+ *  this software without specific prior written permission.
+ *  Author: Chill 庄骞 (smallchill@163.com)
+ */
+package org.springblade.third.iotdevice.service;
+
+import org.springblade.core.mp.base.BaseService;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import org.springblade.third.iotdevice.entity.IotSysConf;
+import org.springblade.third.iotdevice.vo.IotSysConfVO;
+
+/**
+ *  服务类
+ *
+ * @author BladeX
+ * @since 2021-05-28
+ */
+public interface IIotSysConfService extends BaseService<IotSysConf> {
+
+	/**
+	 * 自定义分页
+	 *
+	 * @param page
+	 * @param iotSysConf
+	 * @return
+	 */
+	IPage<IotSysConfVO> selectIotSysConfPage(IPage<IotSysConfVO> page, IotSysConfVO iotSysConf);
+
+}

+ 2 - 1
blade-service/third/src/main/java/org/springblade/third/iotdevice/service/IPerceptionSubscribeService.java

@@ -1,5 +1,6 @@
 package org.springblade.third.iotdevice.service;
 
+import org.springblade.third.iotdevice.dto.AepSubscribeSettingDto;
 import org.springblade.third.iotdevice.dto.PepAlarmNoticeDto;
 import org.springblade.third.iotdevice.dto.PepHeartbeatNoticeDto;
 
@@ -10,5 +11,5 @@ import java.util.List;
  * @date 2021/5/27 16:01
  */
 
-public interface IPerceptionSubscribeService extends IAlarmReportService<List<PepAlarmNoticeDto>>,ISubScribeSettingService,IHeartBeatReportService<List<PepHeartbeatNoticeDto>>,IDeviceStatusChangeService {
+public interface IPerceptionSubscribeService extends IAlarmReportService<List<PepAlarmNoticeDto>>,ISubScribeSettingService<AepSubscribeSettingDto>,IHeartBeatReportService<List<PepHeartbeatNoticeDto>>,IDeviceStatusChangeService {
 }

+ 2 - 2
blade-service/third/src/main/java/org/springblade/third/iotdevice/service/ISubScribeSettingService.java

@@ -6,8 +6,8 @@ package org.springblade.third.iotdevice.service;
  * @date 2021/5/20 15:53
  * 设置订阅接口
  */
-public interface ISubScribeSettingService {
+public interface ISubScribeSettingService<T> {
 
-	 boolean setSubscribe();
+	 boolean setSubscribe(T t);
 
 }

+ 42 - 0
blade-service/third/src/main/java/org/springblade/third/iotdevice/service/impl/IotAepProductServiceImpl.java

@@ -0,0 +1,42 @@
+/*
+ *      Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
+ *
+ *  Redistribution and use in source and binary forms, with or without
+ *  modification, are permitted provided that the following conditions are met:
+ *
+ *  Redistributions of source code must retain the above copyright notice,
+ *  this list of conditions and the following disclaimer.
+ *  Redistributions in binary form must reproduce the above copyright
+ *  notice, this list of conditions and the following disclaimer in the
+ *  documentation and/or other materials provided with the distribution.
+ *  Neither the name of the dreamlu.net developer nor the names of its
+ *  contributors may be used to endorse or promote products derived from
+ *  this software without specific prior written permission.
+ *  Author: Chill 庄骞 (smallchill@163.com)
+ */
+package org.springblade.third.iotdevice.service.impl;
+
+
+import org.springblade.core.mp.base.BaseServiceImpl;
+import org.springblade.third.iotdevice.entity.IotAepProduct;
+import org.springblade.third.iotdevice.mapper.IotAepProductMapper;
+import org.springblade.third.iotdevice.service.IIotAepProductService;
+import org.springblade.third.iotdevice.vo.IotAepProductVO;
+import org.springframework.stereotype.Service;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+
+/**
+ *  服务实现类
+ *
+ * @author BladeX
+ * @since 2021-05-28
+ */
+@Service
+public class IotAepProductServiceImpl extends BaseServiceImpl<IotAepProductMapper, IotAepProduct> implements IIotAepProductService {
+
+	@Override
+	public IPage<IotAepProductVO> selectIotAepProductPage(IPage<IotAepProductVO> page, IotAepProductVO iotAepProduct) {
+		return page.setRecords(baseMapper.selectIotAepProductPage(page, iotAepProduct));
+	}
+
+}

+ 42 - 0
blade-service/third/src/main/java/org/springblade/third/iotdevice/service/impl/IotSysConfServiceImpl.java

@@ -0,0 +1,42 @@
+/*
+ *      Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
+ *
+ *  Redistribution and use in source and binary forms, with or without
+ *  modification, are permitted provided that the following conditions are met:
+ *
+ *  Redistributions of source code must retain the above copyright notice,
+ *  this list of conditions and the following disclaimer.
+ *  Redistributions in binary form must reproduce the above copyright
+ *  notice, this list of conditions and the following disclaimer in the
+ *  documentation and/or other materials provided with the distribution.
+ *  Neither the name of the dreamlu.net developer nor the names of its
+ *  contributors may be used to endorse or promote products derived from
+ *  this software without specific prior written permission.
+ *  Author: Chill 庄骞 (smallchill@163.com)
+ */
+package org.springblade.third.iotdevice.service.impl;
+
+
+import org.springblade.core.mp.base.BaseServiceImpl;
+import org.springblade.third.iotdevice.entity.IotSysConf;
+import org.springblade.third.iotdevice.mapper.IotSysConfMapper;
+import org.springblade.third.iotdevice.service.IIotSysConfService;
+import org.springblade.third.iotdevice.vo.IotSysConfVO;
+import org.springframework.stereotype.Service;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+
+/**
+ *  服务实现类
+ *
+ * @author BladeX
+ * @since 2021-05-28
+ */
+@Service
+public class IotSysConfServiceImpl extends BaseServiceImpl<IotSysConfMapper, IotSysConf> implements IIotSysConfService {
+
+	@Override
+	public IPage<IotSysConfVO> selectIotSysConfPage(IPage<IotSysConfVO> page, IotSysConfVO iotSysConf) {
+		return page.setRecords(baseMapper.selectIotSysConfPage(page, iotSysConf));
+	}
+
+}

+ 44 - 1
blade-service/third/src/main/java/org/springblade/third/iotdevice/service/impl/PerceptionSubscribeServiceImpl.java

@@ -1,8 +1,13 @@
 package org.springblade.third.iotdevice.service.impl;
 
 import cn.hutool.json.JSONUtil;
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
 import lombok.AllArgsConstructor;
 
+import org.springblade.common.beans.ApiResultBean;
+import org.springblade.common.constant.CommonConstant;
+import org.springblade.common.constant.OperationConstant;
+import org.springblade.common.utils.JsonUtils;
 import org.springblade.community.feign.IResidentialClient;
 import org.springblade.device.entity.*;
 import org.springblade.device.feign.*;
@@ -11,8 +16,10 @@ import org.springblade.device.vo.IotDeviceVO;
 import org.springblade.sms.service.IPepNoticeService;
 import org.springblade.system.expand.feign.IOrgPositionClient;
 import org.springblade.system.user.feign.IUserClient;
+import org.springblade.third.iotdevice.dto.AepSubscribeSettingDto;
 import org.springblade.third.iotdevice.dto.PepAlarmNoticeDto;
 import org.springblade.third.iotdevice.dto.PepHeartbeatNoticeDto;
+import org.springblade.third.iotdevice.entity.IotSysConf;
 import org.springblade.third.iotdevice.service.*;
 import org.springblade.third.iotdevice.util.RedisUtil;
 import org.springblade.third.iotdevice.util.SendMessageBuildUtil;
@@ -51,6 +58,7 @@ public class PerceptionSubscribeServiceImpl implements IPerceptionSubscribeServi
 	private final RedisTemplate<String,String> redisTemplate;
 	private final IOrgPositionClient orgPositionClient;
 	private final IIotDeviceHeartbeatClient iotDeviceHeartbeatClient;
+	private final IIotSysConfService iotSysConfService;
 
 
 	@Override
@@ -110,7 +118,42 @@ public class PerceptionSubscribeServiceImpl implements IPerceptionSubscribeServi
 	}
 
 	@Override
-	public boolean setSubscribe() {
+	public boolean setSubscribe(AepSubscribeSettingDto aepSubscribeSettingDto) {
+
+//		List<IotSysConf> iotSysConfList = iotSysConfService.getBaseMapper().selectList(
+//			new QueryWrapper<>(new IotSysConf()).lambda().eq(IotSysConf::getPaltform,CommonConstant.THIRDPLATFORM.PERCEPTION.getValue());
+//		int flag = 0;
+//		for(int i = 0; i < iotSysConfList.size(); i++){
+//			IotSysConf iotSysConf = iotSysConfList.get(i);
+//			IotHttpUtil httpUtil = new IotHttpUtil(iotSysConf);
+//			String heartbeat_url = aepSubscribeSettingDto.getHeartbeat_url();
+//			String alarm_url = aepSubscribeSettingDto.getAlarm_url();
+//			String device_status_url = aepSubscribeSettingDto.getDevice_status_url();
+//			Map<String, Object> bizParamsMap = new HashMap<>();
+//			bizParamsMap.put("heartbeat_url", heartbeat_url);
+//			bizParamsMap.put("alarm_url", alarm_url);
+//			bizParamsMap.put("device_status_url", device_status_url);
+//			String[] prefixList = iotSysConf.getPrefix().split(",");
+//			String appId = iotSysConf.getAppId();
+//			IotAuthentication iotAuthentication = this.iotAuthServiceInterface.findByAppId(appId);
+//			for(int j = 0; j < prefixList.length; j++){
+//				String prefix = prefixList[j];
+//				ApiResultBean<Object> apiResultBean = httpUtil.subscribe(bizParamsMap, prefix, iotAuthentication.getAccessToken());
+//				if(apiResultBean.getCode().equals(IotReturnCode.UNAUTHORIZED.getCode())){ //未认证,提示先去认证
+//					return new ResultBean<>(ResultEnum.FAILURE, IotReturnCode.UNAUTHORIZED.toString());
+//				}
+//				String reqData = JsonUtils.objectToJson(bizParamsMap);
+//				this.iotApiLogServiceInterface.recordIotApiLog("/setting/subscribe", prefix, appId, reqData, apiResultBean);
+//				if(apiResultBean.getCode().equals(OperationConstant.ZERO)){
+//					flag++;
+//				}
+//			}
+//		}
+//		if(flag == iotSysConfList.size()){
+//			return new ResultBean<>(ResultEnum.SUCCESS, "订阅成功");
+//		}else{
+//			return new ResultBean<>(ResultEnum.SUCCESS, "部分订阅成功,请查看日志");
+//		}
 		return false;
 	}
 

+ 45 - 0
blade-service/third/src/main/java/org/springblade/third/iotdevice/util/AepHttpUtil.java

@@ -0,0 +1,45 @@
+package org.springblade.third.iotdevice.util;
+
+import org.springblade.common.beans.ApiResultBean;
+import org.springblade.third.constants.UrlContants;
+import org.springblade.third.iotdevice.dto.AepProductListQueryDto;
+import org.springframework.core.ParameterizedTypeReference;
+import org.springframework.http.HttpEntity;
+import org.springframework.http.HttpMethod;
+import org.springframework.http.ResponseEntity;
+import org.springframework.web.client.RestTemplate;
+
+import java.net.URI;
+
+/**
+ * @author lidexi
+ * @date 2021/5/28 16:49
+ * 感知平台调用工具类
+ */
+
+public class AepHttpUtil {
+
+
+	public static boolean queryProductList(AepProductListQueryDto queryDto){
+		RestTemplate restTemplate = new RestTemplate();
+
+
+
+
+
+
+
+
+
+
+
+
+
+		ResponseEntity<ApiResultBean> response = null;
+		HttpEntity<String> requestEntity = new HttpEntity<>(body, headers);
+		URI uri = URI.create(url);
+		ParameterizedTypeReference<ApiResultBean> reference = new ParameterizedTypeReference<ApiResultBean>() {};
+		response = restTemplate.exchange(uri, HttpMethod.POST, requestEntity, reference);
+		return false;
+	}
+}

+ 50 - 0
blade-service/third/src/main/java/org/springblade/third/iotdevice/wrapper/IotAepProductWrapper.java

@@ -0,0 +1,50 @@
+/*
+ *      Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
+ *
+ *  Redistribution and use in source and binary forms, with or without
+ *  modification, are permitted provided that the following conditions are met:
+ *
+ *  Redistributions of source code must retain the above copyright notice,
+ *  this list of conditions and the following disclaimer.
+ *  Redistributions in binary form must reproduce the above copyright
+ *  notice, this list of conditions and the following disclaimer in the
+ *  documentation and/or other materials provided with the distribution.
+ *  Neither the name of the dreamlu.net developer nor the names of its
+ *  contributors may be used to endorse or promote products derived from
+ *  this software without specific prior written permission.
+ *  Author: Chill 庄骞 (smallchill@163.com)
+ */
+package org.springblade.third.iotdevice.wrapper;
+
+import org.springblade.core.mp.support.BaseEntityWrapper;
+import org.springblade.core.tool.utils.BeanUtil;
+import org.springblade.third.iotdevice.entity.IotAepProduct;
+import org.springblade.third.iotdevice.vo.IotAepProductVO;
+
+import java.util.Objects;
+
+/**
+ * 包装类,返回视图层所需的字段
+ *
+ * @author BladeX
+ * @since 2021-05-28
+ */
+public class IotAepProductWrapper extends BaseEntityWrapper<IotAepProduct, IotAepProductVO>  {
+
+	public static IotAepProductWrapper build() {
+		return new IotAepProductWrapper();
+ 	}
+
+	@Override
+	public IotAepProductVO entityVO(IotAepProduct iotAepProduct) {
+		IotAepProductVO iotAepProductVO = Objects.requireNonNull(BeanUtil.copy(iotAepProduct, IotAepProductVO.class));
+
+		//User createUser = UserCache.getUser(iotAepProduct.getCreateUser());
+		//User updateUser = UserCache.getUser(iotAepProduct.getUpdateUser());
+		//iotAepProductVO.setCreateUserName(createUser.getName());
+		//iotAepProductVO.setUpdateUserName(updateUser.getName());
+
+		return iotAepProductVO;
+	}
+
+}

+ 50 - 0
blade-service/third/src/main/java/org/springblade/third/iotdevice/wrapper/IotSysConfWrapper.java

@@ -0,0 +1,50 @@
+/*
+ *      Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
+ *
+ *  Redistribution and use in source and binary forms, with or without
+ *  modification, are permitted provided that the following conditions are met:
+ *
+ *  Redistributions of source code must retain the above copyright notice,
+ *  this list of conditions and the following disclaimer.
+ *  Redistributions in binary form must reproduce the above copyright
+ *  notice, this list of conditions and the following disclaimer in the
+ *  documentation and/or other materials provided with the distribution.
+ *  Neither the name of the dreamlu.net developer nor the names of its
+ *  contributors may be used to endorse or promote products derived from
+ *  this software without specific prior written permission.
+ *  Author: Chill 庄骞 (smallchill@163.com)
+ */
+package org.springblade.third.iotdevice.wrapper;
+
+import org.springblade.core.mp.support.BaseEntityWrapper;
+import org.springblade.core.tool.utils.BeanUtil;
+import org.springblade.third.iotdevice.entity.IotSysConf;
+import org.springblade.third.iotdevice.vo.IotSysConfVO;
+
+import java.util.Objects;
+
+/**
+ * 包装类,返回视图层所需的字段
+ *
+ * @author BladeX
+ * @since 2021-05-28
+ */
+public class IotSysConfWrapper extends BaseEntityWrapper<IotSysConf, IotSysConfVO>  {
+
+	public static IotSysConfWrapper build() {
+		return new IotSysConfWrapper();
+ 	}
+
+	@Override
+	public IotSysConfVO entityVO(IotSysConf iotSysConf) {
+		IotSysConfVO iotSysConfVO = Objects.requireNonNull(BeanUtil.copy(iotSysConf, IotSysConfVO.class));
+
+		//User createUser = UserCache.getUser(iotSysConf.getCreateUser());
+		//User updateUser = UserCache.getUser(iotSysConf.getUpdateUser());
+		//iotSysConfVO.setCreateUserName(createUser.getName());
+		//iotSysConfVO.setUpdateUserName(updateUser.getName());
+
+		return iotSysConfVO;
+	}
+
+}