diff --git a/data/init/icon.json b/data/init/icon.json new file mode 100644 index 00000000..1a3a5a44 --- /dev/null +++ b/data/init/icon.json @@ -0,0 +1,814 @@ +[{ + "id": 541690159243333, + "createBy" : null, + "createTime" : 1708254320774, + "updateBy" : null, + "updateTime" : 1708254320774, + "tenantId" : "000000", + "iconTypeId": 541592097542213, + "iconName": "行人道闸", + "viewBox": "0 0 1024 1024", + "xmlns": "http://www.w3.org/2000/svg", + "version": "1.1", + "iconContent": "" +}, + { + "id": 541688704299077, + "createBy" : null, + "createTime" : 1708254320774, + "updateBy" : null, + "updateTime" : 1708254320774, + "tenantId" : "000000", + "iconTypeId": 541592097542213, + "iconName": "信息", + "viewBox": "0 0 1024 1024", + "xmlns": "http://www.w3.org/2000/svg", + "version": "1.1", + "iconContent": "" + }, + { + "id": 541688627888197, + "createBy" : null, + "createTime" : 1708254320774, + "updateBy" : null, + "updateTime" : 1708254320774, + "tenantId" : "000000", + "iconTypeId": 541592097542213, + "iconName": "指纹解锁", + "viewBox": "0 0 1024 1024", + "xmlns": "http://www.w3.org/2000/svg", + "version": "1.1", + "iconContent": "" + }, + { + "id": 541684987850821, + "createBy" : null, + "createTime" : 1708254320774, + "updateBy" : null, + "updateTime" : 1708254320774, + "tenantId" : "000000", + "iconTypeId": 541592097542213, + "iconName": "出门", + "viewBox": "0 0 1024 1024", + "xmlns": "http://www.w3.org/2000/svg", + "version": "1.1", + "iconContent": "" + }, + { + "id": 541684915748933, + "createBy" : null, + "createTime" : 1708254320774, + "updateBy" : null, + "updateTime" : 1708254320774, + "tenantId" : "000000", + "iconTypeId": 541592097542213, + "iconName": "车牌识别", + "viewBox": "0 0 1024 1024", + "xmlns": "http://www.w3.org/2000/svg", + "version": "1.1", + "iconContent": "" + }, + { + "id": 541677836591173, + "createBy" : null, + "createTime" : 1708254320774, + "updateBy" : null, + "updateTime" : 1708254320774, + "tenantId" : "000000", + "iconTypeId": 541592097542213, + "iconName": "门禁卡", + "viewBox": "0 0 1024 1024", + "xmlns": "http://www.w3.org/2000/svg", + "version": "1.1", + "iconContent": "" + }, + { + "id": 541677777145925, + "createBy" : null, + "createTime" : 1708254320774, + "updateBy" : null, + "updateTime" : 1708254320774, + "tenantId" : "000000", + "iconTypeId": 541592097542213, + "iconName": "电视", + "viewBox": "0 0 1024 1024", + "xmlns": "http://www.w3.org/2000/svg", + "version": "1.1", + "iconContent": "" + }, + { + "id": 541677728616517, + "createBy" : null, + "createTime" : 1708254320774, + "updateBy" : null, + "updateTime" : 1708254320774, + "tenantId" : "000000", + "iconTypeId": 541592097542213, + "iconName": "人脸识别", + "viewBox": "0 0 1024 1024", + "xmlns": "http://www.w3.org/2000/svg", + "version": "1.1", + "iconContent": "" + }, + { + "id": 541677673070661, + "createBy" : null, + "createTime" : 1708254320774, + "updateBy" : null, + "updateTime" : 1708254320774, + "tenantId" : "000000", + "iconTypeId": 541592097542213, + "iconName": "智能灯光", + "viewBox": "0 0 1024 1024", + "xmlns": "http://www.w3.org/2000/svg", + "version": "1.1", + "iconContent": "" + }, + { + "id": 541677410635845, + "createBy" : null, + "createTime" : 1708254320774, + "updateBy" : null, + "updateTime" : 1708254320774, + "tenantId" : "000000", + "iconTypeId": 541592097542213, + "iconName": "数字密码", + "viewBox": "0 0 1024 1024", + "xmlns": "http://www.w3.org/2000/svg", + "version": "1.1", + "iconContent": "" + }, + { + "id": 541677357146181, + "createBy" : null, + "createTime" : 1708254320774, + "updateBy" : null, + "updateTime" : 1708254320774, + "tenantId" : "000000", + "iconTypeId": 541592097542213, + "iconName": "语音对讲", + "viewBox": "0 0 1024 1024", + "xmlns": "http://www.w3.org/2000/svg", + "version": "1.1", + "iconContent": "" + }, + { + "id": 541677302734917, + "createBy" : null, + "createTime" : 1708254320774, + "updateBy" : null, + "updateTime" : 1708254320774, + "tenantId" : "000000", + "iconTypeId": 541592097542213, + "iconName": "信息", + "viewBox": "0 0 1024 1024", + "xmlns": "http://www.w3.org/2000/svg", + "version": "1.1", + "iconContent": "" + }, + { + "id": 541677246382149, + "createBy" : null, + "createTime" : 1708254320774, + "updateBy" : null, + "updateTime" : 1708254320774, + "tenantId" : "000000", + "iconTypeId": 541592097542213, + "iconName": "摄像枪", + "viewBox": "0 0 1024 1024", + "xmlns": "http://www.w3.org/2000/svg", + "version": "1.1", + "iconContent": "" + }, + { + "id": 541677184880709, + "createBy" : null, + "createTime" : 1708254320774, + "updateBy" : null, + "updateTime" : 1708254320774, + "tenantId" : "000000", + "iconTypeId": 541592097542213, + "iconName": "可视对讲机", + "viewBox": "0 0 1024 1024", + "xmlns": "http://www.w3.org/2000/svg", + "version": "1.1", + "iconContent": "" + }, + { + "id": 541677128994885, + "createBy" : null, + "createTime" : 1708254320774, + "updateBy" : null, + "updateTime" : 1708254320774, + "tenantId" : "000000", + "iconTypeId": 541592097542213, + "iconName": "门磁传感器", + "viewBox": "0 0 1024 1024", + "xmlns": "http://www.w3.org/2000/svg", + "version": "1.1", + "iconContent": "" + }, + { + "id": 541677077753925, + "createBy" : null, + "createTime" : 1708254320774, + "updateBy" : null, + "updateTime" : 1708254320774, + "tenantId" : "000000", + "iconTypeId": 541592097542213, + "iconName": "摄像头", + "viewBox": "0 0 1024 1024", + "xmlns": "http://www.w3.org/2000/svg", + "version": "1.1", + "iconContent": "" + }, + { + "id": 541677029232709, + "createBy" : null, + "createTime" : 1708254320774, + "updateBy" : null, + "updateTime" : 1708254320774, + "tenantId" : "000000", + "iconTypeId": 541592097542213, + "iconName": "天气", + "viewBox": "0 0 1024 1024", + "xmlns": "http://www.w3.org/2000/svg", + "version": "1.1", + "iconContent": "" + }, + { + "id": 541676952887365, + "createBy" : null, + "createTime" : 1708254320774, + "updateBy" : null, + "updateTime" : 1708254320774, + "tenantId" : "000000", + "iconTypeId": 541592097542213, + "iconName": "降噪", + "viewBox": "0 0 1024 1024", + "xmlns": "http://www.w3.org/2000/svg", + "version": "1.1", + "iconContent": "" + }, + { + "id": 541676899274821, + "createBy" : null, + "createTime" : 1708254320774, + "updateBy" : null, + "updateTime" : 1708254320774, + "tenantId" : "000000", + "iconTypeId": 541592097542213, + "iconName": "时钟", + "viewBox": "0 0 1024 1024", + "xmlns": "http://www.w3.org/2000/svg", + "version": "1.1", + "iconContent": "" + }, + { + "id": 541676816535621, + "createBy" : null, + "createTime" : 1708254320774, + "updateBy" : null, + "updateTime" : 1708254320774, + "tenantId" : "000000", + "iconTypeId": 541592097542213, + "iconName": "手机", + "viewBox": "0 0 1024 1024", + "xmlns": "http://www.w3.org/2000/svg", + "version": "1.1", + "iconContent": "" + }, + { + "id": 541676716355653, + "createBy" : null, + "createTime" : 1708254320774, + "updateBy" : null, + "updateTime" : 1708254320774, + "tenantId" : "000000", + "iconTypeId": 541592097542213, + "iconName": "交换机", + "viewBox": "0 0 1024 1024", + "xmlns": "http://www.w3.org/2000/svg", + "version": "1.1", + "iconContent": "" + }, + { + "id": 541676662272069, + "createBy" : null, + "createTime" : 1708254320774, + "updateBy" : null, + "updateTime" : 1708254320774, + "tenantId" : "000000", + "iconTypeId": 541592097542213, + "iconName": "视频留言", + "viewBox": "0 0 1024 1024", + "xmlns": "http://www.w3.org/2000/svg", + "version": "1.1", + "iconContent": "" + }, + { + "id": 541676613619781, + "createBy" : null, + "createTime" : 1708254320774, + "updateBy" : null, + "updateTime" : 1708254320774, + "tenantId" : "000000", + "iconTypeId": 541592097542213, + "iconName": "燃气报警2", + "viewBox": "0 0 1024 1024", + "xmlns": "http://www.w3.org/2000/svg", + "version": "1.1", + "iconContent": "" + }, + { + "id": 541676560719941, + "createBy" : null, + "createTime" : 1708254320774, + "updateBy" : null, + "updateTime" : 1708254320774, + "tenantId" : "000000", + "iconTypeId": 541592097542213, + "iconName": "声光报警", + "viewBox": "0 0 1024 1024", + "xmlns": "http://www.w3.org/2000/svg", + "version": "1.1", + "iconContent": "" + }, + { + "id": 541676497973317, + "createBy" : null, + "createTime" : 1708254320774, + "updateBy" : null, + "updateTime" : 1708254320774, + "tenantId" : "000000", + "iconTypeId": 541592097542213, + "iconName": "火警", + "viewBox": "0 0 1024 1024", + "xmlns": "http://www.w3.org/2000/svg", + "version": "1.1", + "iconContent": "" + }, + { + "id": 541676441411653, + "createBy" : null, + "createTime" : 1708254320774, + "updateBy" : null, + "updateTime" : 1708254320774, + "tenantId" : "000000", + "iconTypeId": 541592097542213, + "iconName": "燃气报警器", + "viewBox": "0 0 1024 1024", + "xmlns": "http://www.w3.org/2000/svg", + "version": "1.1", + "iconContent": "" + }, + { + "id": 541676382064709, + "createBy" : null, + "createTime" : 1708254320774, + "updateBy" : null, + "updateTime" : 1708254320774, + "tenantId" : "000000", + "iconTypeId": 541592097542213, + "iconName": "门锁", + "viewBox": "0 0 1024 1024", + "xmlns": "http://www.w3.org/2000/svg", + "version": "1.1", + "iconContent": "" + }, + { + "id": 541676324876357, + "createBy" : null, + "createTime" : 1708254320774, + "updateBy" : null, + "updateTime" : 1708254320774, + "tenantId" : "000000", + "iconTypeId": 541592097542213, + "iconName": "静音", + "viewBox": "0 0 1024 1024", + "xmlns": "http://www.w3.org/2000/svg", + "version": "1.1", + "iconContent": "" + }, + { + "id": 541676262502469, + "createBy" : null, + "createTime" : 1708254320774, + "updateBy" : null, + "updateTime" : 1708254320774, + "tenantId" : "000000", + "iconTypeId": 541592097542213, + "iconName": "控制中心", + "viewBox": "0 0 1024 1024", + "xmlns": "http://www.w3.org/2000/svg", + "version": "1.1", + "iconContent": "" + }, + { + "id": 541676185849925, + "createBy" : null, + "createTime" : 1708254320774, + "updateBy" : null, + "updateTime" : 1708254320774, + "tenantId" : "000000", + "iconTypeId": 541592097542213, + "iconName": "红外传感器", + "viewBox": "0 0 1024 1024", + "xmlns": "http://www.w3.org/2000/svg", + "version": "1.1", + "iconContent": "" + }, + { + "id": 541676067336261, + "createBy" : null, + "createTime" : 1708254320774, + "updateBy" : null, + "updateTime" : 1708254320774, + "tenantId" : "000000", + "iconName": "开锁", + "viewBox": "0 0 1024 1024", + "xmlns": "http://www.w3.org/2000/svg", + "version": "1.1", + "iconContent": "" + }, + { + "id": 541676000055365, + "createBy" : null, + "createTime" : 1708254320774, + "updateBy" : null, + "updateTime" : 1708254320774, + "tenantId" : "000000", + "iconName": "车道闸", + "viewBox": "0 0 1024 1024", + "xmlns": "http://www.w3.org/2000/svg", + "version": "1.1", + "iconContent": "" + }, + { + "id": 541673610784837, + "createBy" : null, + "createTime" : 1708254320774, + "updateBy" : null, + "updateTime" : 1708254320774, + "tenantId" : "000000","createBy" : null, + "createTime" : 1708254320774, + "updateBy" : null, + "updateTime" : 1708254320774, + "tenantId" : "000000", + "iconTypeId": 541592097542213, + "iconName": "安防", + "viewBox": "0 0 1024 1024", + "xmlns": "http://www.w3.org/2000/svg", + "version": "1.1", + "iconContent": "" + }, + { + "id": 541673324064837, + "createBy" : null, + "createTime" : 1708254320774, + "updateBy" : null, + "updateTime" : 1708254320774, + "tenantId" : "000000", + "iconTypeId": 541592097542213, + "iconName": "电梯", + "viewBox": "0 0 1024 1024", + "xmlns": "http://www.w3.org/2000/svg", + "version": "1.1", + "iconContent": "" + }, + { + "id": 541670730166341, + "createBy" : null, + "createTime" : 1708254320774, + "updateBy" : null, + "updateTime" : 1708254320774, + "tenantId" : "000000", + "iconTypeId": 541592097542213, + "iconName": "火灾报警", + "viewBox": "0 0 1024 1024", + "xmlns": "http://www.w3.org/2000/svg", + "version": "1.1", + "iconContent": "" + }, + { + "id": 541692991926341, + "createBy" : null, + "createTime" : 1708254320774, + "updateBy" : null, + "updateTime" : 1708254320774, + "tenantId" : "000000", + "iconTypeId": 541673667244101, + "iconName": "粉尘监测", + "viewBox": "0 0 1024 1024", + "xmlns": "http://www.w3.org/2000/svg", + "version": "1.1", + "iconContent": "" + }, + { + "id": 541692883537989, + "createBy" : null, + "createTime" : 1708254320774, + "updateBy" : null, + "updateTime" : 1708254320774, + "tenantId" : "000000", + "iconTypeId": 541673667244101, + "iconName": "柴油发电机", + "viewBox": "0 0 1024 1024", + "xmlns": "http://www.w3.org/2000/svg", + "version": "1.1", + "iconContent": "" + }, + { + "id": 541692800434245, + "createBy" : null, + "createTime" : 1708254320774, + "updateBy" : null, + "updateTime" : 1708254320774, + "tenantId" : "000000", + "iconTypeId": 541673667244101, + "iconName": "报警主机", + "viewBox": "0 0 1024 1024", + "xmlns": "http://www.w3.org/2000/svg", + "version": "1.1", + "iconContent": "" + }, + { + "id": 541692587135045, + "createBy" : null, + "createTime" : 1708254320774, + "updateBy" : null, + "updateTime" : 1708254320774, + "tenantId" : "000000", + "iconTypeId": 541673667244101, + "iconName": "智能插座", + "viewBox": "0 0 1024 1024", + "xmlns": "http://www.w3.org/2000/svg", + "version": "1.1", + "iconContent": "" + }, + { + "id": 541692406415429, + "createBy" : null, + "createTime" : 1708254320774, + "updateBy" : null, + "updateTime" : 1708254320774, + "tenantId" : "000000", + "iconTypeId": 541673667244101, + "iconName": "物联网网关", + "viewBox": "0 0 1024 1024", + "xmlns": "http://www.w3.org/2000/svg", + "version": "1.1", + "iconContent": "" + }, + { + "id": 541692350357573, + "createBy" : null, + "createTime" : 1708254320774, + "updateBy" : null, + "updateTime" : 1708254320774, + "tenantId" : "000000", + "iconTypeId": 541673667244101, + "iconName": "变压器温度", + "viewBox": "0 0 1024 1024", + "xmlns": "http://www.w3.org/2000/svg", + "version": "1.1", + "iconContent": "" + }, + { + "id": 541692266471493, + "createBy" : null, + "createTime" : 1708254320774, + "updateBy" : null, + "updateTime" : 1708254320774, + "tenantId" : "000000", + "iconTypeId": 541673667244101, + "iconName": "中央空调", + "viewBox": "0 0 1024 1024", + "xmlns": "http://www.w3.org/2000/svg", + "version": "1.1", + "iconContent": "" + }, + { + "id": 541692181463109, + "createBy" : null, + "createTime" : 1708254320774, + "updateBy" : null, + "updateTime" : 1708254320774, + "tenantId" : "000000", + "iconTypeId": 541673667244101, + "iconName": "故障", + "viewBox": "0 0 1024 1024", + "xmlns": "http://www.w3.org/2000/svg", + "version": "1.1", + "iconContent": "" + }, + { + "id": 541692105846853, + "createBy" : null, + "createTime" : 1708254320774, + "updateBy" : null, + "updateTime" : 1708254320774, + "tenantId" : "000000", + "iconTypeId": 541673667244101, + "iconName": "红外探测器", + "viewBox": "0 0 1024 1024", + "xmlns": "http://www.w3.org/2000/svg", + "version": "1.1", + "iconContent": "" + }, + { + "id": 541692032311365, + "createBy" : null, + "createTime" : 1708254320774, + "updateBy" : null, + "updateTime" : 1708254320774, + "tenantId" : "000000", + "iconTypeId": 541673667244101, + "iconName": "报警", + "viewBox": "0 0 1024 1024", + "xmlns": "http://www.w3.org/2000/svg", + "version": "1.1", + "iconContent": "" + }, + { + "id": 541691913609285, + "createBy" : null, + "createTime" : 1708254320774, + "updateBy" : null, + "updateTime" : 1708254320774, + "tenantId" : "000000", + "iconTypeId": 541673667244101, + "iconName": "火警", + "viewBox": "0 0 1024 1024", + "xmlns": "http://www.w3.org/2000/svg", + "version": "1.1", + "iconContent": "" + }, + { + "id": 541691834851397, + "createBy" : null, + "createTime" : 1708254320774, + "updateBy" : null, + "updateTime" : 1708254320774, + "tenantId" : "000000", + "iconTypeId": 541673667244101, + "iconName": "液位传感器", + "viewBox": "0 0 1024 1024", + "xmlns": "http://www.w3.org/2000/svg", + "version": "1.1", + "iconContent": "" + }, + { + "id": 541691760943173, + "createBy" : null, + "createTime" : 1708254320774, + "updateBy" : null, + "updateTime" : 1708254320774, + "tenantId" : "000000", + "iconTypeId": 541673667244101, + "iconName": "感温探测器", + "viewBox": "0 0 1024 1024", + "xmlns": "http://www.w3.org/2000/svg", + "version": "1.1", + "iconContent": "" + }, + { + "id": 541691676672069, + "createBy" : null, + "createTime" : 1708254320774, + "updateBy" : null, + "updateTime" : 1708254320774, + "tenantId" : "000000", + "iconTypeId": 541673667244101, + "iconName": "表面温度", + "viewBox": "0 0 1024 1024", + "xmlns": "http://www.w3.org/2000/svg", + "version": "1.1", + "iconContent": "" + }, + { + "id": 541691618164805, + "createBy" : null, + "createTime" : 1708254320774, + "updateBy" : null, + "updateTime" : 1708254320774, + "tenantId" : "000000", + "iconTypeId": 541673667244101, + "iconName": "液压传感器", + "viewBox": "0 0 1024 1024", + "xmlns": "http://www.w3.org/2000/svg", + "version": "1.1", + "iconContent": "" + }, + { + "id": 541691548655685, + "createBy" : null, + "createTime" : 1708254320774, + "updateBy" : null, + "updateTime" : 1708254320774, + "tenantId" : "000000", + "iconTypeId": 541673667244101, + "iconName": "消防水泵", + "viewBox": "0 0 1024 1024", + "xmlns": "http://www.w3.org/2000/svg", + "version": "1.1", + "iconContent": "" + }, + { + "id": 541691497037893, + "createBy" : null, + "createTime" : 1708254320774, + "updateBy" : null, + "updateTime" : 1708254320774, + "tenantId" : "000000", + "iconTypeId": 541673667244101, + "iconName": "排风机", + "viewBox": "0 0 1024 1024", + "xmlns": "http://www.w3.org/2000/svg", + "version": "1.1", + "iconContent": "" + }, + { + "id": 541691433111621, + "createBy" : null, + "createTime" : 1708254320774, + "updateBy" : null, + "updateTime" : 1708254320774, + "tenantId" : "000000", + "iconTypeId": 541673667244101, + "iconName": "温湿度", + "viewBox": "0 0 1024 1024", + "xmlns": "http://www.w3.org/2000/svg", + "version": "1.1", + "iconContent": "" + }, + { + "id": 541691381289029, + "createBy" : null, + "createTime" : 1708254320774, + "updateBy" : null, + "updateTime" : 1708254320774, + "tenantId" : "000000", + "iconTypeId": 541673667244101, + "iconName": "视频", + "viewBox": "0 0 1024 1024", + "xmlns": "http://www.w3.org/2000/svg", + "version": "1.1", + "iconContent": "" + }, + { + "id": 541691293118533, + "createBy" : null, + "createTime" : 1708254320774, + "updateBy" : null, + "updateTime" : 1708254320774, + "tenantId" : "000000", + "iconTypeId": 541673667244101, + "iconName": "电器火灾", + "viewBox": "0 0 1024 1024", + "xmlns": "http://www.w3.org/2000/svg", + "version": "1.1", + "iconContent": "" + }, + { + "id": 541691126554693, + "createBy" : null, + "createTime" : 1708254320774, + "updateBy" : null, + "updateTime" : 1708254320774, + "tenantId" : "000000", + "iconTypeId": 541673667244101, + "iconName": "消防用水", + "viewBox": "0 0 1024 1024", + "xmlns": "http://www.w3.org/2000/svg", + "version": "1.1", + "iconContent": "" + }, + { + "id": 541691056250949, + "createBy" : null, + "createTime" : 1708254320774, + "updateBy" : null, + "updateTime" : 1708254320774, + "tenantId" : "000000", + "iconTypeId": 541673667244101, + "iconName": "无线火灾报警", + "viewBox": "0 0 1024 1024", + "xmlns": "http://www.w3.org/2000/svg", + "version": "1.1", + "iconContent": "" + }, + { + "id": 541690984403013, + "createBy" : null, + "createTime" : 1708254320774, + "updateBy" : null, + "updateTime" : 1708254320774, + "tenantId" : "000000", + "iconTypeId": 541673667244101, + "iconName": "火灾报警", + "viewBox": "0 0 1024 1024", + "xmlns": "http://www.w3.org/2000/svg", + "version": "1.1", + "iconContent": "" + }] \ No newline at end of file diff --git a/data/init/iconType.json b/data/init/iconType.json new file mode 100644 index 00000000..b3f0154d --- /dev/null +++ b/data/init/iconType.json @@ -0,0 +1,19 @@ +[ { + "id" : 541592097542213, + "createBy" : null, + "createTime" : 1708254320774, + "updateBy" : null, + "updateTime" : 1708254320774, + "tenantId" : "000000", + "typeDescribe" : null, + "typeName" : "智能家居" +}, { + "id" : 541673667244101, + "createBy" : null, + "createTime" : 1708254320774, + "updateBy" : null, + "updateTime" : 1708254320774, + "tenantId" : "000000", + "typeDescribe" : null, + "typeName" : "工业物联网" +}] \ No newline at end of file diff --git a/data/init/product.json b/data/init/product.json index f0fc5385..5aa5c9e5 100755 --- a/data/init/product.json +++ b/data/init/product.json @@ -13,6 +13,7 @@ "nodeType" : 0, "uid" : "1", "img" : null, + "iconId" : null, "transparent" : false, "isOpenLocate" : true, "locateUpdateType" : "manual", @@ -32,6 +33,7 @@ "nodeType" : 1, "uid" : "1", "img" : null, + "iconId" : null, "transparent" : false, "isOpenLocate" : false, "locateUpdateType" : "manual", @@ -51,6 +53,7 @@ "nodeType" : 2, "uid" : "1", "img" : null, + "iconId" : null, "transparent" : false, "isOpenLocate" : true, "locateUpdateType" : "device", @@ -70,6 +73,7 @@ "nodeType" : 1, "uid" : "1", "img" : null, + "iconId" : null, "transparent" : false, "isOpenLocate" : true, "locateUpdateType" : "manual", @@ -89,6 +93,7 @@ "nodeType" : 1, "uid" : "1", "img" : null, + "iconId" : null, "transparent" : false, "isOpenLocate" : false, "locateUpdateType" : null, @@ -222,6 +227,7 @@ "nodeType" : 2, "uid" : "1", "img" : null, + "iconId" : null, "transparent" : false, "isOpenLocate" : false, "locateUpdateType" : null, @@ -260,6 +266,7 @@ "nodeType" : 1, "uid" : "1", "img" : null, + "iconId" : null, "transparent" : false, "isOpenLocate" : false, "locateUpdateType" : null, @@ -298,6 +305,7 @@ "nodeType" : 1, "uid" : "1", "img" : null, + "iconId" : null, "transparent" : false, "isOpenLocate" : false, "locateUpdateType" : null, @@ -317,6 +325,7 @@ "nodeType" : 1, "uid" : "1", "img" : null, + "iconId" : null, "transparent" : false, "isOpenLocate" : false, "locateUpdateType" : null, @@ -336,6 +345,7 @@ "nodeType" : 0, "uid" : "1", "img" : null, + "iconId" : null, "transparent" : false, "isOpenLocate" : false, "locateUpdateType" : null, @@ -355,6 +365,7 @@ "nodeType" : 1, "uid" : "1", "img" : null, + "iconId" : null, "transparent" : false, "isOpenLocate" : false, "locateUpdateType" : null, diff --git a/iot-dao/iot-data-model/src/main/java/cc/iotkit/model/product/Icon.java b/iot-dao/iot-data-model/src/main/java/cc/iotkit/model/product/Icon.java new file mode 100644 index 00000000..051add68 --- /dev/null +++ b/iot-dao/iot-data-model/src/main/java/cc/iotkit/model/product/Icon.java @@ -0,0 +1,43 @@ +/* + * +---------------------------------------------------------------------- + * | Copyright (c) 奇特物联 2021-2022 All rights reserved. + * +---------------------------------------------------------------------- + * | Licensed 未经许可不能去掉「奇特物联」相关版权 + * +---------------------------------------------------------------------- + * | Author: xw2sy@163.com + * +---------------------------------------------------------------------- + */ +package cc.iotkit.model.product; + +import cc.iotkit.model.Id; +import cc.iotkit.model.TenantModel; +import lombok.*; + +import java.io.Serializable; + +/** + * @Author: tfd + * @Date: 2024/4/25 14:32 + * @Description: + */ +@EqualsAndHashCode(callSuper = true) +@Data +@Builder +@NoArgsConstructor +@AllArgsConstructor +public class Icon extends TenantModel implements Id, Serializable { + + private Long id; + + private Long iconTypeId; + + private String iconName; + + private String viewBox; + + private String xmlns; + + private String version; + + private String iconContent; +} \ No newline at end of file diff --git a/iot-dao/iot-data-model/src/main/java/cc/iotkit/model/product/IconType.java b/iot-dao/iot-data-model/src/main/java/cc/iotkit/model/product/IconType.java new file mode 100644 index 00000000..e91a9441 --- /dev/null +++ b/iot-dao/iot-data-model/src/main/java/cc/iotkit/model/product/IconType.java @@ -0,0 +1,35 @@ +/* + * +---------------------------------------------------------------------- + * | Copyright (c) 奇特物联 2021-2022 All rights reserved. + * +---------------------------------------------------------------------- + * | Licensed 未经许可不能去掉「奇特物联」相关版权 + * +---------------------------------------------------------------------- + * | Author: xw2sy@163.com + * +---------------------------------------------------------------------- + */ +package cc.iotkit.model.product; + +import cc.iotkit.model.Id; +import cc.iotkit.model.TenantModel; +import lombok.*; + +import java.io.Serializable; + +/** + * @Author: tfd + * @Date: 2024/4/25 14:32 + * @Description: + */ +@EqualsAndHashCode(callSuper = true) +@Data +@Builder +@NoArgsConstructor +@AllArgsConstructor +public class IconType extends TenantModel implements Id, Serializable { + + private Long id; + + private String typeName; + + private String typeDescribe; +} \ No newline at end of file diff --git a/iot-dao/iot-data-model/src/main/java/cc/iotkit/model/product/Product.java b/iot-dao/iot-data-model/src/main/java/cc/iotkit/model/product/Product.java index 24938e0a..561268c4 100644 --- a/iot-dao/iot-data-model/src/main/java/cc/iotkit/model/product/Product.java +++ b/iot-dao/iot-data-model/src/main/java/cc/iotkit/model/product/Product.java @@ -45,6 +45,8 @@ public class Product extends TenantModel implements Id, Serializable { private String img; + private Long iconId; + /** * 是否透传 */ diff --git a/iot-dao/iot-data-model/src/main/java/cc/iotkit/model/product/ThingModel.java b/iot-dao/iot-data-model/src/main/java/cc/iotkit/model/product/ThingModel.java index 07536cbd..d98f298e 100644 --- a/iot-dao/iot-data-model/src/main/java/cc/iotkit/model/product/ThingModel.java +++ b/iot-dao/iot-data-model/src/main/java/cc/iotkit/model/product/ThingModel.java @@ -68,6 +68,10 @@ public class ThingModel extends TenantModel implements Id, Serializable { // 单位 private String unit; + // 图标id + private Long iconId; + // 图标信息 + private Icon icon; } @Data diff --git a/iot-dao/iot-data-service/src/main/java/cc/iotkit/data/manager/IIconData.java b/iot-dao/iot-data-service/src/main/java/cc/iotkit/data/manager/IIconData.java new file mode 100644 index 00000000..2766ea3b --- /dev/null +++ b/iot-dao/iot-data-service/src/main/java/cc/iotkit/data/manager/IIconData.java @@ -0,0 +1,21 @@ +/* + * +---------------------------------------------------------------------- + * | Copyright (c) 奇特物联 2021-2022 All rights reserved. + * +---------------------------------------------------------------------- + * | Licensed 未经许可不能去掉「奇特物联」相关版权 + * +---------------------------------------------------------------------- + * | Author: xw2sy@163.com + * +---------------------------------------------------------------------- + */ +package cc.iotkit.data.manager; + +import cc.iotkit.data.ICommonData; +import cc.iotkit.model.product.Icon; + +/** + * @Author: tfd + * @Date: 2024/4/25 14:32 + * @Description: + */ +public interface IIconData extends ICommonData { +} diff --git a/iot-dao/iot-data-service/src/main/java/cc/iotkit/data/manager/IIconTypeData.java b/iot-dao/iot-data-service/src/main/java/cc/iotkit/data/manager/IIconTypeData.java new file mode 100644 index 00000000..cbe8e03d --- /dev/null +++ b/iot-dao/iot-data-service/src/main/java/cc/iotkit/data/manager/IIconTypeData.java @@ -0,0 +1,20 @@ +/* + * +---------------------------------------------------------------------- + * | Copyright (c) 奇特物联 2021-2022 All rights reserved. + * +---------------------------------------------------------------------- + * | Licensed 未经许可不能去掉「奇特物联」相关版权 + * +---------------------------------------------------------------------- + * | Author: xw2sy@163.com + * +---------------------------------------------------------------------- + */ +package cc.iotkit.data.manager; + +import cc.iotkit.data.ICommonData; +import cc.iotkit.model.product.IconType; +/** + * @Author: tfd + * @Date: 2024/4/25 14:32 + * @Description: + */ +public interface IIconTypeData extends ICommonData { +} diff --git a/iot-dao/iot-data-serviceImpl-rdb/src/main/java/cc/iotkit/data/dao/IconRepository.java b/iot-dao/iot-data-serviceImpl-rdb/src/main/java/cc/iotkit/data/dao/IconRepository.java new file mode 100644 index 00000000..0dc76b61 --- /dev/null +++ b/iot-dao/iot-data-serviceImpl-rdb/src/main/java/cc/iotkit/data/dao/IconRepository.java @@ -0,0 +1,11 @@ +package cc.iotkit.data.dao; + +import cc.iotkit.data.model.TbIcon; +import org.springframework.data.jpa.repository.JpaRepository; + +/** + * @Author:tfd + * @Date:2024/4/28 16:41 + */ +public interface IconRepository extends JpaRepository { +} diff --git a/iot-dao/iot-data-serviceImpl-rdb/src/main/java/cc/iotkit/data/dao/IconTypeRepository.java b/iot-dao/iot-data-serviceImpl-rdb/src/main/java/cc/iotkit/data/dao/IconTypeRepository.java new file mode 100644 index 00000000..591ae637 --- /dev/null +++ b/iot-dao/iot-data-serviceImpl-rdb/src/main/java/cc/iotkit/data/dao/IconTypeRepository.java @@ -0,0 +1,11 @@ +package cc.iotkit.data.dao; + +import cc.iotkit.data.model.TbIconType; +import org.springframework.data.jpa.repository.JpaRepository; + +/** + * @Author:tfd + * @Date:2024/4/28 16:41 + */ +public interface IconTypeRepository extends JpaRepository { +} diff --git a/iot-dao/iot-data-serviceImpl-rdb/src/main/java/cc/iotkit/data/model/TbIcon.java b/iot-dao/iot-data-serviceImpl-rdb/src/main/java/cc/iotkit/data/model/TbIcon.java new file mode 100644 index 00000000..cae6ce3b --- /dev/null +++ b/iot-dao/iot-data-serviceImpl-rdb/src/main/java/cc/iotkit/data/model/TbIcon.java @@ -0,0 +1,66 @@ +/* + * +---------------------------------------------------------------------- + * | Copyright (c) 奇特物联 2021-2022 All rights reserved. + * +---------------------------------------------------------------------- + * | Licensed 未经许可不能去掉「奇特物联」相关版权 + * +---------------------------------------------------------------------- + * | Author: xw2sy@163.com + * +---------------------------------------------------------------------- + */ +package cc.iotkit.data.model; + +import cc.iotkit.common.tenant.dao.TenantAware; +import cc.iotkit.common.tenant.listener.TenantListener; +import cc.iotkit.model.product.Icon; +import io.github.linpeilie.annotations.AutoMapper; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import jakarta.validation.constraints.Size; +import lombok.Data; +import org.hibernate.annotations.Filter; +import org.hibernate.annotations.FilterDef; +import org.hibernate.annotations.GenericGenerator; +import org.hibernate.annotations.ParamDef; + +import javax.persistence.*; + +@Data +@Entity +@ApiModel(value = "图标") +@Table(name = "icon") +@AutoMapper(target = Icon.class) +@FilterDef(name = "tenantFilter", parameters = {@ParamDef(name = "tenantId", type = "string")}) +@Filter(name = "tenantFilter", condition = "tenant_id = :tenantId") +@EntityListeners(TenantListener.class) +public class TbIcon extends BaseEntity implements TenantAware { + + @Id + @GeneratedValue(generator = "SnowflakeIdGenerator") + @GenericGenerator(name = "SnowflakeIdGenerator", strategy = "cc.iotkit.data.config.id.SnowflakeIdGenerator") + @ApiModelProperty(value = "iconId") + private Long id; + + @Size(max = 30) + @Column(name = "tenant_id") + private String tenantId; + + @ApiModelProperty(value = "图标分类id") + private Long iconTypeId; + + @ApiModelProperty(value = "图标名称") + private String iconName; + + @ApiModelProperty(value = "视窗缩放") + private String viewBox; + + @ApiModelProperty(value = "命名空间") + private String xmlns; + + @ApiModelProperty(value = "版本") + private String version; + + @Column(columnDefinition = "text") + @ApiModelProperty(value = "图标内容") + private String iconContent; + +} \ No newline at end of file diff --git a/iot-dao/iot-data-serviceImpl-rdb/src/main/java/cc/iotkit/data/model/TbIconType.java b/iot-dao/iot-data-serviceImpl-rdb/src/main/java/cc/iotkit/data/model/TbIconType.java new file mode 100644 index 00000000..84654fd5 --- /dev/null +++ b/iot-dao/iot-data-serviceImpl-rdb/src/main/java/cc/iotkit/data/model/TbIconType.java @@ -0,0 +1,53 @@ +/* + * +---------------------------------------------------------------------- + * | Copyright (c) 奇特物联 2021-2022 All rights reserved. + * +---------------------------------------------------------------------- + * | Licensed 未经许可不能去掉「奇特物联」相关版权 + * +---------------------------------------------------------------------- + * | Author: xw2sy@163.com + * +---------------------------------------------------------------------- + */ +package cc.iotkit.data.model; + +import cc.iotkit.common.tenant.dao.TenantAware; +import cc.iotkit.common.tenant.listener.TenantListener; +import cc.iotkit.model.product.IconType; +import io.github.linpeilie.annotations.AutoMapper; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import jakarta.validation.constraints.Size; +import lombok.Data; +import org.hibernate.annotations.Filter; +import org.hibernate.annotations.FilterDef; +import org.hibernate.annotations.GenericGenerator; +import org.hibernate.annotations.ParamDef; + +import javax.persistence.*; + +@Data +@Entity +@ApiModel(value = "图标分类") +@Table(name = "icon_type") +@AutoMapper(target = IconType.class) +@FilterDef(name = "tenantFilter", parameters = {@ParamDef(name = "tenantId", type = "string")}) +@Filter(name = "tenantFilter", condition = "tenant_id = :tenantId") +@EntityListeners(TenantListener.class) +public class TbIconType extends BaseEntity implements TenantAware { + + @Id + @GeneratedValue(generator = "SnowflakeIdGenerator") + @GenericGenerator(name = "SnowflakeIdGenerator", strategy = "cc.iotkit.data.config.id.SnowflakeIdGenerator") + @ApiModelProperty(value = "主键id") + private Long id; + + @Size(max = 30) + @Column(name = "tenant_id") + private String tenantId; + + @ApiModelProperty(value = "分类名称") + private String typeName; + + @ApiModelProperty(value = "分类描述") + private String typeDescribe; + +} \ No newline at end of file diff --git a/iot-dao/iot-data-serviceImpl-rdb/src/main/java/cc/iotkit/data/model/TbProduct.java b/iot-dao/iot-data-serviceImpl-rdb/src/main/java/cc/iotkit/data/model/TbProduct.java index 0c28061a..17fb43db 100644 --- a/iot-dao/iot-data-serviceImpl-rdb/src/main/java/cc/iotkit/data/model/TbProduct.java +++ b/iot-dao/iot-data-serviceImpl-rdb/src/main/java/cc/iotkit/data/model/TbProduct.java @@ -68,6 +68,9 @@ public class TbProduct implements TenantAware { @ApiModelProperty(value = "图片") private String img; + @ApiModelProperty(value = "产品图标ID") + private Long iconId; + @ApiModelProperty(value = "是否透传,true/false") private Boolean transparent; diff --git a/iot-dao/iot-data-serviceImpl-rdb/src/main/java/cc/iotkit/data/service/IconDataImpl.java b/iot-dao/iot-data-serviceImpl-rdb/src/main/java/cc/iotkit/data/service/IconDataImpl.java new file mode 100644 index 00000000..d0cc6002 --- /dev/null +++ b/iot-dao/iot-data-serviceImpl-rdb/src/main/java/cc/iotkit/data/service/IconDataImpl.java @@ -0,0 +1,38 @@ +package cc.iotkit.data.service; + +import cc.iotkit.data.dao.IJPACommData; +import cc.iotkit.data.dao.IconRepository; +import cc.iotkit.data.manager.IIconData; +import cc.iotkit.data.model.TbIcon; +import cc.iotkit.model.product.Icon; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.context.annotation.Primary; +import org.springframework.data.jpa.repository.JpaRepository; +import org.springframework.stereotype.Service; + +/** + * @Author:tfd + * @Date:2024/4/28 16:42 + */ +@Primary +@Service +public class IconDataImpl implements IIconData, IJPACommData { + + @Autowired + private IconRepository iconRepository; + + @Override + public JpaRepository getBaseRepository() { + return iconRepository; + } + + @Override + public Class getJpaRepositoryClass() { + return TbIcon.class; + } + + @Override + public Class getTClass() { + return Icon.class; + } +} diff --git a/iot-dao/iot-data-serviceImpl-rdb/src/main/java/cc/iotkit/data/service/IconTypeDataImpl.java b/iot-dao/iot-data-serviceImpl-rdb/src/main/java/cc/iotkit/data/service/IconTypeDataImpl.java new file mode 100644 index 00000000..895482e3 --- /dev/null +++ b/iot-dao/iot-data-serviceImpl-rdb/src/main/java/cc/iotkit/data/service/IconTypeDataImpl.java @@ -0,0 +1,38 @@ +package cc.iotkit.data.service; + +import cc.iotkit.data.dao.IJPACommData; +import cc.iotkit.data.dao.IconTypeRepository; +import cc.iotkit.data.manager.IIconTypeData; +import cc.iotkit.data.model.TbIconType; +import cc.iotkit.model.product.IconType; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.context.annotation.Primary; +import org.springframework.data.jpa.repository.JpaRepository; +import org.springframework.stereotype.Service; + +/** + * @Author:tfd + * @Date:2024/4/28 16:42 + */ +@Primary +@Service +public class IconTypeDataImpl implements IIconTypeData, IJPACommData { + + @Autowired + private IconTypeRepository iconTypeRepository; + + @Override + public JpaRepository getBaseRepository() { + return iconTypeRepository; + } + + @Override + public Class getJpaRepositoryClass() { + return TbIconType.class; + } + + @Override + public Class getTClass() { + return IconType.class; + } +} diff --git a/iot-module/iot-manager/src/main/java/cc/iotkit/manager/controller/ProductController.java b/iot-module/iot-manager/src/main/java/cc/iotkit/manager/controller/ProductController.java index faed0c1d..e7dc0e33 100644 --- a/iot-module/iot-manager/src/main/java/cc/iotkit/manager/controller/ProductController.java +++ b/iot-module/iot-manager/src/main/java/cc/iotkit/manager/controller/ProductController.java @@ -17,16 +17,19 @@ import cc.iotkit.common.log.enums.BusinessType; import cc.iotkit.common.validate.AddGroup; import cc.iotkit.common.validate.EditGroup; import cc.iotkit.manager.dto.bo.category.CategoryBo; +import cc.iotkit.manager.dto.bo.product.IconBo; +import cc.iotkit.manager.dto.bo.product.IconTypeBo; import cc.iotkit.manager.dto.bo.product.ProductBo; import cc.iotkit.manager.dto.bo.productmodel.ProductModelBo; import cc.iotkit.manager.dto.bo.thingmodel.ThingModelBo; import cc.iotkit.manager.dto.vo.category.CategoryVo; +import cc.iotkit.manager.dto.vo.product.IconTypeVo; +import cc.iotkit.manager.dto.vo.product.IconVo; import cc.iotkit.manager.dto.vo.product.ProductVo; import cc.iotkit.manager.dto.vo.productmodel.ProductModelVo; import cc.iotkit.manager.dto.vo.thingmodel.ThingModelVo; import cc.iotkit.manager.service.IProductService; import cn.dev33.satoken.annotation.SaCheckPermission; -import cn.dev33.satoken.annotation.SaCheckRole; import io.swagger.annotations.Api; import io.swagger.annotations.ApiModelProperty; import io.swagger.annotations.ApiOperation; @@ -72,6 +75,48 @@ public class ProductController { return productService.updateEntity(request.getData()); } + @ApiOperation("保存图标分类") + @SaCheckPermission("iot:iconType:edit") + @PostMapping("/icon/saveIconType") + public boolean saveIconType(@Validated @RequestBody Request request) { + return productService.saveIconType(request.getData()); + } + + @ApiOperation("删除图标分类") + @SaCheckPermission("iot:iconType:remove") + @PostMapping("/icon/deleteIconType") + public boolean deleteIconType(@Validated @RequestBody Request request) { + return productService.deleteIconType(request.getData()); + } + + @ApiOperation("图标分类列表") + @SaCheckPermission("iot:iconType:query") + @PostMapping("/icon/getAllIconType") + public List getAllIconType() { + return productService.selectIconTypeList(); + } + + @ApiOperation("保存图标") + @SaCheckPermission("iot:icon:edit") + @PostMapping("/icon/saveIcon") + public boolean saveIcon(@Validated @RequestBody Request request) { + return productService.saveIcon(request.getData()); + } + + @ApiOperation("删除图标") + @SaCheckPermission("iot:icon:remove") + @PostMapping("/icon/deleteIcon") + public boolean deleteIcon(@Validated @RequestBody Request request) { + return productService.deleteIcon(request.getData()); + } + + @ApiOperation("图标分页展示") + @SaCheckPermission("iot:icon:query") + @PostMapping("/icon/getAllIcon") + public Paging getAllIcon(@Validated @RequestBody PageRequest request) { + return productService.selectIconPageList(request); + } + @ApiOperation("查看详情") @SaCheckPermission("iot:product:query") @PostMapping(value = "/getDetail") diff --git a/iot-module/iot-manager/src/main/java/cc/iotkit/manager/dto/bo/product/IconBo.java b/iot-module/iot-manager/src/main/java/cc/iotkit/manager/dto/bo/product/IconBo.java new file mode 100644 index 00000000..ba2ae5e7 --- /dev/null +++ b/iot-module/iot-manager/src/main/java/cc/iotkit/manager/dto/bo/product/IconBo.java @@ -0,0 +1,43 @@ +package cc.iotkit.manager.dto.bo.product; + +import cc.iotkit.common.api.BaseDto; +import cc.iotkit.model.product.Icon; +import io.github.linpeilie.annotations.AutoMapper; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import jakarta.validation.constraints.Size; +import lombok.Data; +import lombok.EqualsAndHashCode; + + +@ApiModel(value = "IconBo") +@Data +@EqualsAndHashCode(callSuper = true) +@AutoMapper(target = Icon.class, reverseConvertGenerate = false) +public class IconBo extends BaseDto { + + private static final long serialVersionUID = -1L; + + @ApiModelProperty(value = "id") + private Long id; + + @ApiModelProperty(value = "图标分类id") + private Long iconTypeId; + + @ApiModelProperty(value = "图标名称") + private String iconName; + + @ApiModelProperty(value = "视窗缩放") + private String viewBox; + + @ApiModelProperty(value = "命名空间") + private String xmlns; + + @ApiModelProperty(value = "版本") + private String version; + + @Size(max = 65535, message = "图标内容长度不正确") + @ApiModelProperty(value = "图标内容") + private String iconContent; + +} diff --git a/iot-module/iot-manager/src/main/java/cc/iotkit/manager/dto/bo/product/IconTypeBo.java b/iot-module/iot-manager/src/main/java/cc/iotkit/manager/dto/bo/product/IconTypeBo.java new file mode 100644 index 00000000..d9075579 --- /dev/null +++ b/iot-module/iot-manager/src/main/java/cc/iotkit/manager/dto/bo/product/IconTypeBo.java @@ -0,0 +1,29 @@ +package cc.iotkit.manager.dto.bo.product; + +import cc.iotkit.common.api.BaseDto; +import cc.iotkit.model.product.IconType; +import io.github.linpeilie.annotations.AutoMapper; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; +import lombok.EqualsAndHashCode; + + +@ApiModel(value = "IconTypeBo") +@Data +@EqualsAndHashCode(callSuper = true) +@AutoMapper(target = IconType.class, reverseConvertGenerate = false) +public class IconTypeBo extends BaseDto { + + private static final long serialVersionUID = -1L; + + @ApiModelProperty(value = "id") + private Long id; + + @ApiModelProperty(value = "分类名称") + private String typeName; + + @ApiModelProperty(value = "分类描述") + private String typeDescribe; + +} diff --git a/iot-module/iot-manager/src/main/java/cc/iotkit/manager/dto/bo/product/ProductBo.java b/iot-module/iot-manager/src/main/java/cc/iotkit/manager/dto/bo/product/ProductBo.java index b48d42c8..0c2e7a34 100644 --- a/iot-module/iot-manager/src/main/java/cc/iotkit/manager/dto/bo/product/ProductBo.java +++ b/iot-module/iot-manager/src/main/java/cc/iotkit/manager/dto/bo/product/ProductBo.java @@ -36,6 +36,9 @@ public class ProductBo extends BaseDto { @Size(max = 255, message = "图片长度不正确") private String img; + @ApiModelProperty(value = "产品图标ID") + private Long iconId; + @ApiModelProperty(value = "产品名称") @Size(max = 255, message = "产品名称长度不正确") private String name; diff --git a/iot-module/iot-manager/src/main/java/cc/iotkit/manager/dto/vo/product/IconTypeVo.java b/iot-module/iot-manager/src/main/java/cc/iotkit/manager/dto/vo/product/IconTypeVo.java new file mode 100644 index 00000000..906a5ade --- /dev/null +++ b/iot-module/iot-manager/src/main/java/cc/iotkit/manager/dto/vo/product/IconTypeVo.java @@ -0,0 +1,28 @@ +package cc.iotkit.manager.dto.vo.product; + +import cc.iotkit.model.product.IconType; +import io.github.linpeilie.annotations.AutoMapper; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +import java.io.Serializable; + + +@ApiModel(value = "IconTypeVo") +@Data +@AutoMapper(target = IconType.class) +public class IconTypeVo implements Serializable { + + private static final long serialVersionUID = -1L; + + @ApiModelProperty(value = "id") + private Long id; + + @ApiModelProperty(value = "分类名称") + private String typeName; + + @ApiModelProperty(value = "分类描述") + private String typeDescribe; + +} diff --git a/iot-module/iot-manager/src/main/java/cc/iotkit/manager/dto/vo/product/IconVo.java b/iot-module/iot-manager/src/main/java/cc/iotkit/manager/dto/vo/product/IconVo.java new file mode 100644 index 00000000..24125288 --- /dev/null +++ b/iot-module/iot-manager/src/main/java/cc/iotkit/manager/dto/vo/product/IconVo.java @@ -0,0 +1,44 @@ +package cc.iotkit.manager.dto.vo.product; + +import cc.iotkit.model.product.Icon; +import com.alibaba.excel.annotation.ExcelIgnoreUnannotated; +import com.alibaba.excel.annotation.ExcelProperty; +import io.github.linpeilie.annotations.AutoMapper; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +import java.io.Serializable; + + +@ApiModel(value = "IconVo") +@Data +@ExcelIgnoreUnannotated +@AutoMapper(target = Icon.class) +public class IconVo implements Serializable { + + private static final long serialVersionUID = -1L; + + @ApiModelProperty(value = "id") + @ExcelProperty(value = "id") + private Long id; + + @ApiModelProperty(value = "图标分类id") + private Long iconTypeId; + + @ApiModelProperty(value = "图标名称") + private String iconName; + + @ApiModelProperty(value = "视窗缩放") + private String viewBox; + + @ApiModelProperty(value = "命名空间") + private String xmlns; + + @ApiModelProperty(value = "版本") + private String version; + + @ApiModelProperty(value = "图标内容") + private String iconContent; + +} diff --git a/iot-module/iot-manager/src/main/java/cc/iotkit/manager/dto/vo/product/ProductVo.java b/iot-module/iot-manager/src/main/java/cc/iotkit/manager/dto/vo/product/ProductVo.java index 8fb7f360..b426638a 100644 --- a/iot-module/iot-manager/src/main/java/cc/iotkit/manager/dto/vo/product/ProductVo.java +++ b/iot-module/iot-manager/src/main/java/cc/iotkit/manager/dto/vo/product/ProductVo.java @@ -1,5 +1,6 @@ package cc.iotkit.manager.dto.vo.product; +import cc.iotkit.model.product.Icon; import cc.iotkit.model.product.Product; import com.alibaba.excel.annotation.ExcelIgnoreUnannotated; import com.alibaba.excel.annotation.ExcelProperty; @@ -43,6 +44,13 @@ public class ProductVo implements Serializable { @ExcelProperty(value = "图片") private String img; + @ApiModelProperty(value = "产品图标ID") + @ExcelProperty(value = "图片") + private Long iconId; + + @ApiModelProperty(value = "产品图标信息") + private Icon icon; + @ApiModelProperty(value = "产品名称") @ExcelProperty(value = "产品名称") private String name; diff --git a/iot-module/iot-manager/src/main/java/cc/iotkit/manager/service/ExampleDataInit.java b/iot-module/iot-manager/src/main/java/cc/iotkit/manager/service/ExampleDataInit.java index 764e6b7d..f51077ba 100644 --- a/iot-module/iot-manager/src/main/java/cc/iotkit/manager/service/ExampleDataInit.java +++ b/iot-module/iot-manager/src/main/java/cc/iotkit/manager/service/ExampleDataInit.java @@ -25,10 +25,7 @@ import cc.iotkit.model.notify.ChannelConfig; import cc.iotkit.model.notify.ChannelTemplate; import cc.iotkit.model.notify.NotifyMessage; import cc.iotkit.model.plugin.PluginInfo; -import cc.iotkit.model.product.Category; -import cc.iotkit.model.product.Product; -import cc.iotkit.model.product.ProductModel; -import cc.iotkit.model.product.ThingModel; +import cc.iotkit.model.product.*; import cc.iotkit.model.rule.RuleInfo; import cc.iotkit.model.rule.TaskInfo; import cc.iotkit.model.space.Home; @@ -124,6 +121,10 @@ public class ExampleDataInit implements SmartInitializingSingleton { }); initData("pluginInfo", SpringUtils.getBean(IPluginInfoData.class), new TypeReference>() { }); + initData("iconType", SpringUtils.getBean(IIconTypeData.class), new TypeReference>() { + }); + initData("icon", SpringUtils.getBean(IIconData.class), new TypeReference>() { + }); initSysData(); diff --git a/iot-module/iot-manager/src/main/java/cc/iotkit/manager/service/IProductService.java b/iot-module/iot-manager/src/main/java/cc/iotkit/manager/service/IProductService.java index b629efaf..e6a50fbe 100644 --- a/iot-module/iot-manager/src/main/java/cc/iotkit/manager/service/IProductService.java +++ b/iot-module/iot-manager/src/main/java/cc/iotkit/manager/service/IProductService.java @@ -3,10 +3,14 @@ package cc.iotkit.manager.service; import cc.iotkit.common.api.PageRequest; import cc.iotkit.common.api.Paging; import cc.iotkit.manager.dto.bo.category.CategoryBo; +import cc.iotkit.manager.dto.bo.product.IconBo; +import cc.iotkit.manager.dto.bo.product.IconTypeBo; import cc.iotkit.manager.dto.bo.product.ProductBo; import cc.iotkit.manager.dto.bo.productmodel.ProductModelBo; import cc.iotkit.manager.dto.bo.thingmodel.ThingModelBo; import cc.iotkit.manager.dto.vo.category.CategoryVo; +import cc.iotkit.manager.dto.vo.product.IconTypeVo; +import cc.iotkit.manager.dto.vo.product.IconVo; import cc.iotkit.manager.dto.vo.product.ProductVo; import cc.iotkit.manager.dto.vo.productmodel.ProductModelVo; import cc.iotkit.manager.dto.vo.thingmodel.ThingModelVo; @@ -54,4 +58,16 @@ public interface IProductService { boolean deleteProductModel(String id); ProductVo findByProductKey(String productKey); + + boolean saveIconType(IconTypeBo data); + + boolean deleteIconType(Long data); + + boolean saveIcon(IconBo data); + + boolean deleteIcon(Long data); + + List selectIconTypeList(); + + Paging selectIconPageList(PageRequest request); } diff --git a/iot-module/iot-manager/src/main/java/cc/iotkit/manager/service/impl/ProductServiceImpl.java b/iot-module/iot-manager/src/main/java/cc/iotkit/manager/service/impl/ProductServiceImpl.java index 93932507..5ffe0fad 100644 --- a/iot-module/iot-manager/src/main/java/cc/iotkit/manager/service/impl/ProductServiceImpl.java +++ b/iot-module/iot-manager/src/main/java/cc/iotkit/manager/service/impl/ProductServiceImpl.java @@ -11,21 +11,23 @@ import cc.iotkit.common.utils.MapstructUtils; import cc.iotkit.data.manager.*; import cc.iotkit.manager.config.AliyunConfig; import cc.iotkit.manager.dto.bo.category.CategoryBo; +import cc.iotkit.manager.dto.bo.product.IconBo; +import cc.iotkit.manager.dto.bo.product.IconTypeBo; import cc.iotkit.manager.dto.bo.product.ProductBo; import cc.iotkit.manager.dto.bo.productmodel.ProductModelBo; import cc.iotkit.manager.dto.bo.thingmodel.ThingModelBo; import cc.iotkit.manager.dto.vo.category.CategoryVo; +import cc.iotkit.manager.dto.vo.product.IconTypeVo; +import cc.iotkit.manager.dto.vo.product.IconVo; import cc.iotkit.manager.dto.vo.product.ProductVo; import cc.iotkit.manager.dto.vo.productmodel.ProductModelVo; import cc.iotkit.manager.dto.vo.thingmodel.ThingModelVo; import cc.iotkit.manager.service.DataOwnerService; import cc.iotkit.manager.service.IProductService; -import cc.iotkit.model.product.Category; -import cc.iotkit.model.product.Product; -import cc.iotkit.model.product.ProductModel; -import cc.iotkit.model.product.ThingModel; +import cc.iotkit.model.product.*; import cc.iotkit.temporal.IDbStructureData; import cn.hutool.core.lang.UUID; +import cn.hutool.core.util.ObjectUtil; import com.github.yitter.idgen.YitIdHelper; import lombok.RequiredArgsConstructor; import lombok.SneakyThrows; @@ -36,8 +38,9 @@ import org.springframework.beans.factory.annotation.Qualifier; import org.springframework.stereotype.Service; import org.springframework.web.multipart.MultipartFile; -import java.util.Date; +import java.util.HashMap; import java.util.List; +import java.util.Map; import java.util.Objects; /** @@ -75,6 +78,12 @@ public class ProductServiceImpl implements IProductService { @Autowired private IDeviceInfoData deviceInfoData; + @Autowired + private IIconTypeData iconTypeData; + + @Autowired + private IIconData iconData; + @Override public ProductVo addEntity(ProductBo data) { Product product = data.to(Product.class); @@ -127,6 +136,14 @@ public class ProductServiceImpl implements IProductService { @Override public ThingModelVo getThingModelByProductKey(String productKey) { ThingModel thingModel = thingModelData.findByProductKey(productKey); + if(ObjectUtil.isNotNull(thingModel)&&ObjectUtil.isNotNull(thingModel.getModel())&& + thingModel.getModel().getProperties().size()>0){ + for (ThingModel.Property pro:thingModel.getModel().getProperties()){ + if(ObjectUtil.isNotNull(pro.getIconId())){ + pro.setIcon(iconData.findById(pro.getIconId())); + } + } + } return MapstructUtils.convert(thingModel, ThingModelVo.class); } @@ -206,7 +223,13 @@ public class ProductServiceImpl implements IProductService { @Override public Paging selectPageList(PageRequest request) { - return productData.findAll(request.to(Product.class)).to(ProductVo.class); + Paging result =productData.findAll(request.to(Product.class)).to(ProductVo.class); + for (ProductVo row : result.getRows()) { + if(ObjectUtil.isNotNull(row.getIconId())){ + row.setIcon(iconData.findById(row.getIconId())); + } + } + return result; } @Override @@ -239,6 +262,45 @@ public class ProductServiceImpl implements IProductService { return productData.findByProductKey(productKey).to(ProductVo.class); } + @Override + public boolean saveIconType(IconTypeBo data) { + IconType iconType = data.to(IconType.class); + iconTypeData.save(iconType); + return true; + } + + @Override + public boolean deleteIconType(Long data) { + iconTypeData.deleteById(data); + return true; + } + + @Override + public boolean saveIcon(IconBo data) { + Icon icon = data.to(Icon.class); + iconData.save(icon); + return true; + } + + @Override + public boolean deleteIcon(Long data) { + iconData.deleteById(data); + return true; + } + + @Override + public List selectIconTypeList() { + return MapstructUtils.convert(iconTypeData.findAll(), IconTypeVo.class); + } + + @Override + public Paging selectIconPageList(PageRequest request) { + Map sortMap = new HashMap<>(); + sortMap.put("updateTime","desc"); + request.setSortMap(sortMap); + return iconData.findAll(request.to(Icon.class)).to(IconVo.class); + } + @Override public boolean editProductModel(ProductModelBo productModelBo) { ProductModel productModel = productModelBo.to(ProductModel.class); diff --git a/iot-starter/src/main/java/cc/iotkit/Application.java b/iot-starter/src/main/java/cc/iotkit/Application.java index 39bc08ab..b89fec0a 100644 --- a/iot-starter/src/main/java/cc/iotkit/Application.java +++ b/iot-starter/src/main/java/cc/iotkit/Application.java @@ -34,7 +34,6 @@ import org.springframework.web.servlet.config.annotation.EnableWebMvc; public class Application implements SpringBootstrap { public static void main(String[] args) { - SpringMainBootstrap.launch(Application.class, args); log.info("server start success!"); }