protected async virtual Task CreateProjectCodeAsync(CreateOrUpdateProjectCodeInput input)
 {
     var projectCode = input.ProjectCode.MapTo<BaseProjectCodeInfo>();
     projectCode.Id = GuidHelper.NewGuid();
     projectCode.CreatorUserId = AbpSession.UserId;
     projectCode.CreatorUserName = GetCurrentUser().RealName;
     projectCode.CreationTime = Clock.Now;
     await _projectCodeRepository.InsertAsync(projectCode);
 }
 /// <summary>
 /// 添加修改实体
 /// </summary>
 /// <param name="input"></param>
 /// <returns></returns>
 public async Task CreateOrUpdateProjectCode(CreateOrUpdateProjectCodeInput input)
 {
     if (input.ProjectCode.Id != null && input.ProjectCode.Id != Guid.Empty)
     {
         await UpdateProjectCodeAsync(input);
     }
     else
     {
         await CreateProjectCodeAsync(input);
     }
 }
        protected async virtual Task UpdateProjectCodeAsync(CreateOrUpdateProjectCodeInput input)
        {
            Debug.Assert(input.ProjectCode.Id != null, "input.ProjectCode.Id should be set.");

            var projectCode = input.ProjectCode.MapTo<BaseProjectCodeInfo>();
            projectCode.LastModifierUserId = AbpSession.UserId;
            projectCode.LastModifierUserName = GetCurrentUser().RealName;
            projectCode.LastModificationTime = Clock.Now;
            await _projectCodeRepository.UpdateAsync(projectCode);
        }