From 888257e74954e0e0fd9b226bf608594cd6d4a13f Mon Sep 17 00:00:00 2001 From: "nodyang@aliyun.com" Date: Sat, 14 Sep 2024 10:17:39 +0800 Subject: [PATCH] =?UTF-8?q?=E6=95=B0=E6=8D=AE=E8=AE=BF=E9=97=AE=E7=B1=BB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- SlnMesnac.Model/domain/BaseCode.cs | 7 ++++ SlnMesnac.Model/domain/Page.cs | 7 ++++ SlnMesnac.Model/domain/ScanLog.cs | 29 ++++++++++++++++ .../service/ScanLog/IScanLogService.cs | 7 ++++ .../service/ScanLog/ScanLogServiceImpl.cs | 34 +++++++++++++++++++ .../service/baseCode/BaseCodeServiceImpl.cs | 7 ++++ .../service/baseCode/IBaseCodeService.cs | 7 ++++ 7 files changed, 98 insertions(+) create mode 100644 SlnMesnac.Model/domain/BaseCode.cs create mode 100644 SlnMesnac.Model/domain/Page.cs create mode 100644 SlnMesnac.Model/domain/ScanLog.cs create mode 100644 SlnMesnac.Repository/service/ScanLog/IScanLogService.cs create mode 100644 SlnMesnac.Repository/service/ScanLog/ScanLogServiceImpl.cs create mode 100644 SlnMesnac.Repository/service/baseCode/BaseCodeServiceImpl.cs create mode 100644 SlnMesnac.Repository/service/baseCode/IBaseCodeService.cs diff --git a/SlnMesnac.Model/domain/BaseCode.cs b/SlnMesnac.Model/domain/BaseCode.cs new file mode 100644 index 0000000..ffe886a --- /dev/null +++ b/SlnMesnac.Model/domain/BaseCode.cs @@ -0,0 +1,7 @@ +namespace SlnMesnac.Model.domain +{ + public class BaseCode + { + + } +} \ No newline at end of file diff --git a/SlnMesnac.Model/domain/Page.cs b/SlnMesnac.Model/domain/Page.cs new file mode 100644 index 0000000..cdbf8ee --- /dev/null +++ b/SlnMesnac.Model/domain/Page.cs @@ -0,0 +1,7 @@ +namespace SlnMesnac.Model.domain +{ + public class Page + { + + } +} \ No newline at end of file diff --git a/SlnMesnac.Model/domain/ScanLog.cs b/SlnMesnac.Model/domain/ScanLog.cs new file mode 100644 index 0000000..5bb82a8 --- /dev/null +++ b/SlnMesnac.Model/domain/ScanLog.cs @@ -0,0 +1,29 @@ +using System; +using System.Runtime.Serialization; +using SqlSugar; + +namespace SlnMesnac.Model.domain +{ + [SugarTable("ScanLog"), Tenant("mes")] + [DataContract(Name = "ScanLog ɨÃèÈÕÖ¾")] + public class ScanLog + { + /// + /// + /// + [SugarColumn(ColumnName = "id", IsPrimaryKey = true, IsIdentity = true)] + public int Id { get; set; } + [SugarColumn(ColumnName = "create_time")] + public DateTime CreateTime { get; set; } + [SugarColumn(ColumnName = "data_type")] + public int DataType { get; set; } + [SugarColumn(ColumnName = "rfid")] + public string Rfid { get; set; } + [SugarColumn(ColumnName = "code")] + public string Code { get; set; } + [SugarColumn(ColumnName = "ocr")] + public string Ocr { get; set; } + [SugarColumn(ColumnName = "url")] + public string Url { get; set; } + } +} \ No newline at end of file diff --git a/SlnMesnac.Repository/service/ScanLog/IScanLogService.cs b/SlnMesnac.Repository/service/ScanLog/IScanLogService.cs new file mode 100644 index 0000000..692120e --- /dev/null +++ b/SlnMesnac.Repository/service/ScanLog/IScanLogService.cs @@ -0,0 +1,7 @@ +namespace SlnMesnac.Repository.service.ScanLog +{ + public class IScanLogService + { + + } +} \ No newline at end of file diff --git a/SlnMesnac.Repository/service/ScanLog/ScanLogServiceImpl.cs b/SlnMesnac.Repository/service/ScanLog/ScanLogServiceImpl.cs new file mode 100644 index 0000000..b085f3a --- /dev/null +++ b/SlnMesnac.Repository/service/ScanLog/ScanLogServiceImpl.cs @@ -0,0 +1,34 @@ +using System; +using System.Collections.Generic; +using SlnMesnac.Model.domain; +using SlnMesnac.Repository.service.@base; + +namespace SlnMesnac.Repository.service.ScanLog +{ + public class ScanLogServiceImpl:BaseServiceImpl,IScanLogService + { + public ScanLogServiceImpl(Repository rep) : base(rep) + { + } + + public void CreatTable() + { + _rep.Context.CodeFirst.InitTables(); + List ls = new List(); + for (int i = 0; i < 100; i++) + { + ls.Add(new ScanLogModel() + { + CreateTime = DateTime.Now, + DataType = 1, + Rfid = "12", + Code = "21", + Ocr = "2", + Url="badi.com" + }); + } + + this.Insert(ls); + } + } +} \ No newline at end of file diff --git a/SlnMesnac.Repository/service/baseCode/BaseCodeServiceImpl.cs b/SlnMesnac.Repository/service/baseCode/BaseCodeServiceImpl.cs new file mode 100644 index 0000000..e86145e --- /dev/null +++ b/SlnMesnac.Repository/service/baseCode/BaseCodeServiceImpl.cs @@ -0,0 +1,7 @@ +namespace SlnMesnac.Repository.service +{ + public class BaseCodeServiceImpl + { + + } +} \ No newline at end of file diff --git a/SlnMesnac.Repository/service/baseCode/IBaseCodeService.cs b/SlnMesnac.Repository/service/baseCode/IBaseCodeService.cs new file mode 100644 index 0000000..efc756a --- /dev/null +++ b/SlnMesnac.Repository/service/baseCode/IBaseCodeService.cs @@ -0,0 +1,7 @@ +namespace SlnMesnac.Repository.service +{ + public class IBaseCodeService + { + + } +} \ No newline at end of file