| | |
| | | import com.sandu.ximon.admin.manager.iot.rrpc.mainboard.MainBoardInvokeSyncService; |
| | | import com.sandu.ximon.admin.manager.iot.rrpc.util.FileProcessingUtils; |
| | | import com.sandu.ximon.admin.utils.StoreOperationRecordsUtils; |
| | | import com.sandu.ximon.admin.utils.StringUtil; |
| | | import com.sandu.ximon.dao.domain.RemoteUpdateFile; |
| | | import com.sandu.ximon.dao.mapper.RemoteUpdateFileMapper; |
| | | import org.springframework.stereotype.Service; |
| | |
| | | } |
| | | |
| | | /** |
| | | * 修改固件升级文件名称 |
| | | * |
| | | * @param remoteFileId |
| | | * @param remoteFileName |
| | | * @return |
| | | */ |
| | | public String updateRemoteFileName(String remoteFileId, String remoteFileName) { |
| | | if (remoteFileId == null || StringUtil.strIsNullOrEmpty(remoteFileName)) { |
| | | throw new BusinessException("参数错误!"); |
| | | } |
| | | RemoteUpdateFile remoteUpdateFile = getById(remoteFileId); |
| | | if (remoteUpdateFile == null) { |
| | | throw new BusinessException("固件升级文件不存在!"); |
| | | } |
| | | remoteUpdateFile.setFilename(remoteFileName); |
| | | boolean update = updateById(remoteUpdateFile); |
| | | if(!update){ |
| | | throw new BusinessException("修改固件升级文件名失败!"); |
| | | } |
| | | return "修改固件升级文件名成功!"; |
| | | } |
| | | |
| | | /** |
| | | * 固件升级文件 |
| | | * |
| | | * @return |