/// <summary>
 /// 创建实体
 /// </summary>
 /// <param name="input"></param>
 /// <returns></returns>
  protected async virtual Task CreateCodeRuleSeriousAsync(CreateOrUpdateCodeRuleSeriousInput input)
 {
     var codeRuleSerious = input.CodeRuleSerious.MapTo<BaseCodeRuleSeriousInfo>();
     codeRuleSerious.CreatorUserId = AbpSession.UserId;
     codeRuleSerious.CreatorUserName = GetCurrentUser().RealName;
     codeRuleSerious.CreationTime = Clock.Now;
     await _codeRuleSeriousRepository.InsertAsync(codeRuleSerious);
     cacheHandler.Remove(CacheCategoryCodeRuleSerious, "GetCodeRuleSeriousList");
 }
        /// <summary>
        /// 修改实体
        /// </summary>
        /// <param name="input"></param>
        /// <returns></returns>
         protected async virtual Task UpdateCodeRuleSeriousAsync(CreateOrUpdateCodeRuleSeriousInput input)
        {
            Debug.Assert(input.CodeRuleSerious.Id != null, "input.CodeRuleSerious.Id should be set.");

            var codeRuleSerious = await _codeRuleSeriousRepository.GetAsync(input.CodeRuleSerious.Id);
            codeRuleSerious = input.CodeRuleSerious.MapTo<BaseCodeRuleSeriousInfo>();
            codeRuleSerious.LastModifierUserId = AbpSession.UserId;
            codeRuleSerious.LastModifierUserName = GetCurrentUser().RealName;
            codeRuleSerious.LastModificationTime = Clock.Now;
            await _codeRuleSeriousRepository.UpdateAsync(codeRuleSerious);
            cacheHandler.Remove(CacheCategoryCodeRuleSerious, "GetCodeRuleSeriousList");
        }
 /// <summary>
 /// 添加修改实体
 /// </summary>
 /// <param name="input"></param>
 /// <returns></returns>
 public async Task CreateOrUpdateCodeRuleSerious(CreateOrUpdateCodeRuleSeriousInput input)
 {
     if (input.CodeRuleSerious.Id != null && input.CodeRuleSerious.Id != Guid.Empty)
     {
         await UpdateCodeRuleSeriousAsync(input);
     }
     else
     {
         await CreateCodeRuleSeriousAsync(input);
     }
 }