File tree Expand file tree Collapse file tree 2 files changed +5
-2
lines changed
Expand file tree Collapse file tree 2 files changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -84,6 +84,7 @@ func (s *SerialService) Start() {
8484 s .logger .Warn ("串口连接异常,将重试" ,
8585 zap .Error (err ),
8686 zap .Duration ("retry_after" , retryAfter ))
87+ s .deviceCache .Delete (CacheKeyDeviceStatus )
8788
8889 time .Sleep (retryAfter )
8990 }
@@ -593,7 +594,7 @@ func (s *SerialService) handleSMSSendResult(msg map[string]interface{}) {
593594 zap .String ("request_id" , requestID ))
594595 } else {
595596 status = models .MessageStatusFailed
596- s .logger .Error ("短信发送失败" ,
597+ s .logger .Warn ("短信发送失败" ,
597598 zap .String ("to" , to ),
598599 zap .String ("request_id" , requestID ))
599600 }
Original file line number Diff line number Diff line change @@ -120,7 +120,9 @@ export default function Layout() {
120120 "w-2 h-2 rounded-full animate-pulse" ,
121121 deviceStatus ?. connected ? 'bg-green-500' : 'bg-red-500' ,
122122 ) } />
123- < div className = { 'text-xs font-medium text-gray-600' } > 设备在线</ div >
123+ < div className = { 'text-xs font-medium text-gray-600' } >
124+ { deviceStatus ?. connected ? '设备在线' : '设备离线' }
125+ </ div >
124126 </ div >
125127 < div className = "text-[10px] text-gray-400 font-mono mt-0.5" >
126128 { deviceStatus ?. port_name }
You can’t perform that action at this time.
0 commit comments