update:将设备默认设置成自动升级

This commit is contained in:
hrz 2025-04-25 17:08:26 +08:00
parent f3c385c66c
commit 34ddb9a15f
4 changed files with 5 additions and 22 deletions

View file

@ -105,6 +105,7 @@ public class DeviceServiceImpl extends BaseServiceImpl<DeviceDao, DeviceEntity>
deviceEntity.setMacAddress(macAddress); deviceEntity.setMacAddress(macAddress);
deviceEntity.setUserId(user.getId()); deviceEntity.setUserId(user.getId());
deviceEntity.setCreator(user.getId()); deviceEntity.setCreator(user.getId());
deviceEntity.setAutoUpdate(1);
deviceEntity.setCreateDate(currentTime); deviceEntity.setCreateDate(currentTime);
deviceEntity.setUpdater(user.getId()); deviceEntity.setUpdater(user.getId());
deviceEntity.setUpdateDate(currentTime); deviceEntity.setUpdateDate(currentTime);

View file

@ -1,6 +0,0 @@
-- 删除server.ip和server.port,改成在xiaozhi-server中配置,方便运行多个websocket
delete from `sys_params` where id = 100;
delete from `sys_params` where id = 101;
INSERT INTO `sys_params` (id, param_code, param_value, value_type, param_type, remark) VALUES (106, 'server.websocket', 'null', 'string', 1, 'websocket地址,多个用;分隔');

View file

@ -18,3 +18,5 @@ CREATE TABLE IF NOT EXISTS `ai_ota` (
`create_date` datetime DEFAULT NULL COMMENT '创建时间', `create_date` datetime DEFAULT NULL COMMENT '创建时间',
PRIMARY KEY (`id`) PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='固件信息表'; ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='固件信息表';
update ai_device set auto_update = 1;

View file

@ -65,13 +65,6 @@ databaseChangeLog:
- sqlFile: - sqlFile:
encoding: utf8 encoding: utf8
path: classpath:db/changelog/202504221135.sql path: classpath:db/changelog/202504221135.sql
- changeSet:
id: 202504221646
author: John
changes:
- sqlFile:
encoding: utf8
path: classpath:db/changelog/202504221646.sql
- changeSet: - changeSet:
id: 202504221555 id: 202504221555
author: John author: John
@ -80,16 +73,9 @@ databaseChangeLog:
encoding: utf8 encoding: utf8
path: classpath:db/changelog/202504221555.sql path: classpath:db/changelog/202504221555.sql
- changeSet: - changeSet:
id: 202504251420 id: 202504251421
author: John
changes:
- sqlFile:
encoding: utf8
path: classpath:db/changelog/202504251420.sql
- changeSet:
id: 202504251420
author: jiangkunyin author: jiangkunyin
changes: changes:
- sqlFile: - sqlFile:
encoding: utf8 encoding: utf8
path: classpath:db/changelog/202504251420.sql path: classpath:db/changelog/202504251421.sql