Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
57 changes: 57 additions & 0 deletions README2.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
Commands to start the servers:

Backend (Spring Boot):
cd main/manager-api
mvn spring-boot:run

Frontend (Vue.js):
cd main/manager-web
npm run serve

The backend runs on port 8002 at http://localhost:8002/xiaozhi
The frontend runs on port 8001 at http://localhost:8001/


The backend requires Java 21.
Update(main/manager-api/pom.xml)
⎿ Updated main/manager-api/pom.xml with 1 addition and 1 removal
17 <properties>
18 <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
19 <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
20 - <java.version>21</java.version>
20 + <java.version>17</java.version>


The getFirst() method is a Java 21 feature.
fix both files to use Java 17 compatible code:

⏺ Update(main/manager-api/src/main/java/xiaozhi/modules/device/service/impl/OtaServiceImpl.java)
⎿ Updated main/manager-api/src/main/java/xiaozhi/modules/device/service/impl/OtaServiceImpl.java with 1 addition and 1 removal
66 // 同类固件只保留最新的一条
67 List<OtaEntity> otaList = baseDao.selectList(queryWrapper);
68 if (otaList != null && otaList.size() > 0) {
69 - OtaEntity otaBefore = otaList.getFirst();
69 + OtaEntity otaBefore = otaList.get(0);



There's a syntax error in the Liquibase configuration file. Let me check and fix it:

⏺ Read(main/manager-api/src/main/resources/db/changelog/db.changelog-master.yaml)
⎿ Read 249 lines (ctrl+r to expand)

⏺ I see the issue - there's a duplicate id field at line 243. Let me fix this:

⏺ Update(main/manager-api/src/main/resources/db/changelog/db.changelog-master.yaml)
⎿ Updated main/manager-api/src/main/resources/db/changelog/db.changelog-master.yaml with 2 additions and 1 removal
240 - sqlFile:
241 encoding: utf8
242 path: classpath:db/changelog/202506261637.sql
243 - id: 202506152342
243 + - changeSet:
244 + id: 202507051233
245 author: marlonz
246 changes:
247 - sqlFile:

restart the backend
2 changes: 1 addition & 1 deletion main/manager-api/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
<java.version>21</java.version>
<java.version>17</java.version>
<junit.version>5.10.1</junit.version>
<druid.version>1.2.20</druid.version>
<mybatisplus.version>3.5.5</mybatisplus.version>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ public boolean save(OtaEntity entity) {
// 同类固件只保留最新的一条
List<OtaEntity> otaList = baseDao.selectList(queryWrapper);
if (otaList != null && otaList.size() > 0) {
OtaEntity otaBefore = otaList.getFirst();
OtaEntity otaBefore = otaList.get(0);
entity.setId(otaBefore.getId());
baseDao.updateById(entity);
return true;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ public SysUserDTO getByUsername(String username) {
if (users == null || users.isEmpty()) {
return null;
}
SysUserEntity entity = users.getFirst();
SysUserEntity entity = users.get(0);
return ConvertUtils.sourceToTarget(entity, SysUserDTO.class);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -240,7 +240,8 @@ databaseChangeLog:
- sqlFile:
encoding: utf8
path: classpath:db/changelog/202506261637.sql
id: 202506152342
- changeSet:
id: 202507051233
author: marlonz
changes:
- sqlFile:
Expand Down
19 changes: 0 additions & 19 deletions main/manager-web/jsconfig.json

This file was deleted.

Loading