You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
|
|
|
using HighWayIot.Log4net;
|
|
|
|
|
using HighWayIot.Repository.domain;
|
|
|
|
|
using System;
|
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
using System.Linq;
|
|
|
|
|
using System.Linq.Expressions;
|
|
|
|
|
using System.Text;
|
|
|
|
|
using System.Threading.Tasks;
|
|
|
|
|
|
|
|
|
|
namespace HighWayIot.Repository.service.Impl
|
|
|
|
|
{
|
|
|
|
|
public class BaseContentServiceImpl : IContentService
|
|
|
|
|
{
|
|
|
|
|
private LogHelper log = LogHelper.Instance;
|
|
|
|
|
Repository<RFIDContent> _repository => new Repository<RFIDContent>("mysql");
|
|
|
|
|
|
|
|
|
|
public List<RFIDContent> GetContentInfos()
|
|
|
|
|
{
|
|
|
|
|
try
|
|
|
|
|
{
|
|
|
|
|
List<RFIDContent> deviceInfo = _repository.GetList();
|
|
|
|
|
return deviceInfo;
|
|
|
|
|
}catch (Exception ex)
|
|
|
|
|
{
|
|
|
|
|
log.Error("RFID内容信息获取异常", ex);
|
|
|
|
|
return null;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public void AddContentInfo(RFIDContent content)
|
|
|
|
|
{
|
|
|
|
|
try
|
|
|
|
|
{
|
|
|
|
|
_repository.Insert(content);
|
|
|
|
|
}
|
|
|
|
|
catch (Exception ex)
|
|
|
|
|
{
|
|
|
|
|
log.Error("RFID内容信息插入异常", ex);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|