public BasicResponse <bool> UpdateDateAlarmRecord(AlarmRecordUpdateDateRequest AlarmRecordRequest) { List <Jc_BInfo> alarmInfos = new List <Jc_BInfo>(); string alarmDate = AlarmRecordRequest.AlarmInfo.Stime.ToString("yyyyMM"); alarmInfos.Add(AlarmRecordRequest.AlarmInfo); var alarmModels = ObjectConverter.CopyList <Jc_BInfo, Jc_BModel>(alarmInfos); BasicResponse <bool> resultResponse = new BasicResponse <bool>(); if (_Repository.BulkUpdate("KJ_DataAlarm" + alarmDate, alarmModels, BuildDataColumn(columns), "ID")) { resultResponse.Data = true; //更新缓存 var updateRequest = new AlarmCacheUpdateRequest { AlarmInfo = AlarmRecordRequest.AlarmInfo }; _alarmCacheService.UpdateAlarmCahce(updateRequest); } else { resultResponse.Data = false; } return(resultResponse); }
public BasicResponse UpdateAlarmCahce(AlarmCacheUpdateRequest alarmCacheRequest) { AlarmCache.AlarmCacheInstance.UpdateItem(alarmCacheRequest.AlarmInfo); return(new BasicResponse()); }