v3.4.6
This commit is contained in:
@@ -52,7 +52,7 @@ public abstract class CDEntityBase : EntityBase<string>, ICreatorTime, IDeleteTi
|
||||
/// </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();
|
||||
this.EnabledMark = this.EnabledMark == null ? 1 : this.EnabledMark;
|
||||
@@ -67,7 +67,7 @@ public abstract class CDEntityBase : EntityBase<string>, ICreatorTime, IDeleteTi
|
||||
/// </summary>
|
||||
public virtual void Create()
|
||||
{
|
||||
var userId = App.User.FindFirst(ClaimConst.CLAINMUSERID)?.Value;
|
||||
var userId = App.User?.FindFirst(ClaimConst.CLAINMUSERID)?.Value;
|
||||
this.CreatorTime = DateTime.Now;
|
||||
this.Id = this.Id == null ? SnowflakeIdHelper.NextId() : this.Id;
|
||||
this.EnabledMark = this.EnabledMark == null ? 1 : this.EnabledMark;
|
||||
|
||||
Reference in New Issue
Block a user