feat(iot): 添加 OTA 固件管理功能

- 新增 OTA 固件相关错误码
- 实现 OTA 固件创建、更新和查询接口
- 添加 OTA 升级记录相关功能
- 实现 OTA 固件升级任务定时处理
This commit is contained in:
Shelly Chan
2025-02-20 01:05:41 +08:00
parent ec71cd94e8
commit 54381e29a7
35 changed files with 2128 additions and 9 deletions

View File

@@ -0,0 +1,22 @@
<?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="cn.iocoder.yudao.module.iot.dal.mysql.ota.IotOtaUpgradeRecordMapper">
<select id="getOtaUpgradeRecordCount" resultType="java.lang.Long">
select count(*)
from iot_ota_upgrade_record
where task_id = #{taskId}
and device_name like concat('%', #{deviceName}, '%')
and status = #{status}
</select>
<select id="getOtaUpgradeRecordStatistics" resultType="java.lang.Long">
select count(*)
from iot_ota_upgrade_record
where firmware_id = #{firmwareId}
and status = #{status}
</select>
</mapper>