提交 15b10c20 authored 作者: 林业通's avatar 林业通

场景修改

上级 9ca57f04
...@@ -896,18 +896,7 @@ public class ShDeviceController { ...@@ -896,18 +896,7 @@ public class ShDeviceController {
new QueryWrapper<ShDeviceEntity>().eq("user_id", user.getId()) new QueryWrapper<ShDeviceEntity>().eq("user_id", user.getId())
.in("product_id", 2, 8, 9, 10, 6, 14, 15) .in("product_id", 2, 8, 9, 10, 6, 14, 15)
.orderByDesc("id")); .orderByDesc("id"));
List<ShDeviceEntity> list1 = new ArrayList<>(); return R.ok().put("ist", list);
List<ShDeviceEntity> list2 = new ArrayList<>();
for (ShDeviceEntity map : list) {
Integer type = map.getProductId();
if (type == 2 || type == 8 || type == 9 || type == 10) {
list2.add(map);
}else {
list1.add(map);
}
}
return R.ok().put("lockList", list1).put("otherList", list2);
} }
} }
...@@ -49,6 +49,12 @@ public class ShDlinkForm implements Serializable { ...@@ -49,6 +49,12 @@ public class ShDlinkForm implements Serializable {
@NotNull(message="状态不能为空") @NotNull(message="状态不能为空")
private Integer status; private Integer status;
@ApiModelProperty(value = "状态")
private Integer statusO;
@ApiModelProperty(value = "状态")
private Integer statusT;
@ApiModelProperty(value = "关联设备") @ApiModelProperty(value = "关联设备")
private List<ShDlinkDeviceForm> devices; private List<ShDlinkDeviceForm> devices;
} }
...@@ -48,6 +48,14 @@ public class ShDlinkEntity implements Serializable { ...@@ -48,6 +48,14 @@ public class ShDlinkEntity implements Serializable {
* 状态[1开启,2关闭] * 状态[1开启,2关闭]
*/ */
private Integer status; private Integer status;
/**
* 开关发起状态1[1开启,2关闭]
*/
private Integer statusO;
/**
* 开关发起状态2[1开启,2关闭]
*/
private Integer statusT;
/** /**
* 创建时间 * 创建时间
*/ */
......
...@@ -12,6 +12,8 @@ ...@@ -12,6 +12,8 @@
<result property="end" column="end"/> <result property="end" column="end"/>
<result property="deviceId" column="device_id"/> <result property="deviceId" column="device_id"/>
<result property="status" column="status"/> <result property="status" column="status"/>
<result property="statusO" column="status_o"/>
<result property="statusT" column="status_t"/>
<result property="createTime" column="create_time"/> <result property="createTime" column="create_time"/>
</resultMap> </resultMap>
......
...@@ -246,7 +246,7 @@ CREATE TABLE `sh_dlink` ( ...@@ -246,7 +246,7 @@ CREATE TABLE `sh_dlink` (
`start` varchar(10) DEFAULT NULL COMMENT '生效时间段-开始', `start` varchar(10) DEFAULT NULL COMMENT '生效时间段-开始',
`end` varchar(10) DEFAULT NULL COMMENT '生效时间段-结束', `end` varchar(10) DEFAULT NULL COMMENT '生效时间段-结束',
`device_id` int(11) DEFAULT NULL COMMENT '发起设备ID', `device_id` int(11) DEFAULT NULL COMMENT '发起设备ID',
`status` tinyint(2) DEFAULT '1' COMMENT '状态[1开启,2关闭]', `status` tinyint(2) DEFAULT '1' COMMENT '状态[1开启,2关闭]',
`create_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间', `create_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
PRIMARY KEY (`id`) USING BTREE, PRIMARY KEY (`id`) USING BTREE,
KEY `sh_dlink_user_id` (`user_id`) USING BTREE, KEY `sh_dlink_user_id` (`user_id`) USING BTREE,
...@@ -266,6 +266,8 @@ CREATE TABLE `sh_dlink_device` ( ...@@ -266,6 +266,8 @@ CREATE TABLE `sh_dlink_device` (
KEY `sh_dlink_device_device_id` (`device_id`) USING BTREE KEY `sh_dlink_device_device_id` (`device_id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='智能家居场景关联设备'; ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='智能家居场景关联设备';
CREATE TABLE `help_center` ( CREATE TABLE `help_center` (
`id` int(11) NOT NULL AUTO_INCREMENT COMMENT '主键id', `id` int(11) NOT NULL AUTO_INCREMENT COMMENT '主键id',
`title` varchar(64) DEFAULT NULL COMMENT '标题', `title` varchar(64) DEFAULT NULL COMMENT '标题',
...@@ -302,3 +304,5 @@ CREATE TABLE `business_cooperation` ( ...@@ -302,3 +304,5 @@ CREATE TABLE `business_cooperation` (
alter table sh_family_member add `status` tinyint(2) DEFAULT '1' COMMENT '状态[1待确认,2已加入,2已拒绝]' after `is_admin` ; alter table sh_family_member add `status` tinyint(2) DEFAULT '1' COMMENT '状态[1待确认,2已加入,2已拒绝]' after `is_admin` ;
alter table sh_family_member add `invite_id` int(11) DEFAULT NULL COMMENT '邀请人ID' after `status` ; alter table sh_family_member add `invite_id` int(11) DEFAULT NULL COMMENT '邀请人ID' after `status` ;
alter table sh_dlink add `status_o` tinyint(2) DEFAULT NULL COMMENT '开关发起状态1[1开启,2关闭]' after `status` ;
alter table sh_dlink add `status_t` tinyint(2) DEFAULT NULL COMMENT '开关发起状态2[1开启,2关闭]' after `status` ;
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论