完成种子数据模块,完成服务替换模块
This commit is contained in:
@@ -0,0 +1,27 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using Yi.Framework.Data.DataSeeds;
|
||||
using Yi.Framework.Ddd.Repositories;
|
||||
using Yi.Framework.Domain.School.Entities;
|
||||
|
||||
namespace Yi.Framework.Domain.School.DataSeeds
|
||||
{
|
||||
[AppService(typeof(IDataSeed))]
|
||||
public class StudentDataSeed : AbstractDataSeed<StudentEntity>
|
||||
{
|
||||
public StudentDataSeed(IRepository<StudentEntity> repository) : base(repository)
|
||||
{
|
||||
}
|
||||
|
||||
public override List<StudentEntity> GetSeedData()
|
||||
{
|
||||
return new List<StudentEntity>() { new StudentEntity { Id = SnowflakeHelper.NextId, Name = "你好", Phone = "123", Height = 188, IsDeleted = false } ,
|
||||
new StudentEntity { Id = SnowflakeHelper.NextId, Name = "你好1", Phone = "123", Height = 188, IsDeleted = false },
|
||||
new StudentEntity { Id = SnowflakeHelper.NextId, Name = "你好2", Phone = "123", Height = 188, IsDeleted = false }
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -84,3 +84,8 @@
|
||||
2023:01:21-22:29:30本次运行启动时间为:9099毫秒
|
||||
2023:01:21-22:30:38本次运行启动时间为:2136毫秒
|
||||
2023:01:21-23:15:24本次运行启动时间为:1944毫秒
|
||||
2023:01:24-13:26:35本次运行启动时间为:2712毫秒
|
||||
2023:01:24-13:39:09本次运行启动时间为:2031毫秒
|
||||
2023:01:24-13:42:17本次运行启动时间为:2087毫秒
|
||||
2023:01:24-13:44:55本次运行启动时间为:1877毫秒
|
||||
2023:01:24-13:45:55本次运行启动时间为:19905毫秒
|
||||
|
||||
@@ -27,10 +27,14 @@
|
||||
]
|
||||
},
|
||||
|
||||
//授权
|
||||
"JwtTokenOptions": {
|
||||
"Audience": "yi",
|
||||
"Issuer": "localhost:19002",
|
||||
"Subject": "yiframwork",
|
||||
"ExpSecond": 3600
|
||||
}
|
||||
},
|
||||
|
||||
//开启种子数据
|
||||
"EnabledDataSeed": true
|
||||
}
|
||||
|
||||
Binary file not shown.
Reference in New Issue
Block a user