* 修复SendAlarmVendorSnapshot中prevSnapshot为nil的bug

This commit is contained in:
gazebo
2019-06-27 10:26:48 +08:00
parent f1bbced113
commit e41bc3b47b
3 changed files with 25 additions and 9 deletions

View File

@@ -623,7 +623,7 @@ func OperationTime2Str2(openTime, closeTime int16) (str string) {
func OperationTimeStr4VendorStore(v *model.VendorStoreSnapshot) (str string) {
str = fmt.Sprintf("%s", OperationTime2Str2(v.OpenTime1, v.CloseTime1))
if v.OpenTime2 > 0 && v.CloseTime2 > 0 {
str += fmt.Sprintf("|%s", OperationTime2Str2(v.OpenTime2, v.CloseTime2))
str += fmt.Sprintf(",%s", OperationTime2Str2(v.OpenTime2, v.CloseTime2))
}
return str
}