This commit is contained in:
2023-05-31 10:19:05 +08:00
parent 1b65a7a9e5
commit 9c621c75cd
238 changed files with 9905 additions and 4034 deletions

View File

@@ -1,6 +1,7 @@
using JNPF.Common.Const;
using JNPF.Common.Security;
using JNPF.DependencyInjection;
using JNPF.Extras.DatabaseAccessor.SqlSugar.Models;
using SqlSugar;
namespace JNPF.Common.Contracts;
@@ -28,7 +29,7 @@ public abstract class CEntityBase : EntityBase<string>, ICreatorTime
/// </summary>
public virtual void Creator()
{
var userId = App.User.FindFirst(ClaimConst.CLAINMUSERID)?.Value;
var userId = App.User?.FindFirst(ClaimConst.CLAINMUSERID)?.Value;
this.CreatorTime = DateTime.Now;
this.Id = SnowflakeIdHelper.NextId();
if (!string.IsNullOrEmpty(userId))