protected async virtual Task UpdateMaterialClassAsync(CreateOrUpdateMaterialClassInput input)
        {
            Debug.Assert(input.MaterialClass.Id != null, "input.MaterialClass.Id should be set.");

            var materialClass = input.MaterialClass.MapTo<BaseMaterialClassInfo>();
            materialClass.LastModifierUserId = AbpSession.UserId;
            materialClass.LastModifierUserName = GetCurrentUser().RealName;
            materialClass.LastModificationTime = Clock.Now;
            await _materialClassRepository.UpdateAsync(materialClass);
            cacheHandler.Remove(CacheCategoryMaterialClass, "GetMaterialClassList");
        }
  protected async virtual Task CreateMaterialClassAsync(CreateOrUpdateMaterialClassInput input)
 {
     var materialClass = input.MaterialClass.MapTo<BaseMaterialClassInfo>();
     materialClass.Id = GuidHelper.NewGuid();
     materialClass.CreatorUserId = AbpSession.UserId;
     materialClass.CreatorUserName = GetCurrentUser().RealName;
     materialClass.CreationTime = Clock.Now;
     await _materialClassRepository.InsertAsync(materialClass);
     cacheHandler.Remove(CacheCategoryMaterialClass, "GetMaterialClassList");
 }
 /// <summary>
 /// 添加修改实体
 /// </summary>
 /// <param name="input"></param>
 /// <returns></returns>
 public async Task CreateOrUpdateMaterialClass(CreateOrUpdateMaterialClassInput input)
 {
     if (input.MaterialClass.Id != null && input.MaterialClass.Id != Guid.Empty)
     {
         await UpdateMaterialClassAsync(input);
     }
     else
     {
         await CreateMaterialClassAsync(input);
     }
 }