コード例 #1
0
 /// <summary>创建模块
 /// </summary>
 public void Handle(ICommandContext context, CreateModule command)
 {
     _lockService.ExecuteInLock(typeof(Module).Name, () =>
     {
         _moduleService.Exist(command.ParentModule);
         _appSystemService.CheckExist(command.AppSystemId);
         var info = new ModuleInfo(
             command.AppSystemId,
             command.Code,
             command.Name,
             command.ModuleType,
             command.ParentModule,
             command.LinkUrl,
             command.Sort,
             command.Describe,
             command.ReMark);
         context.Add(new Module(command.AggregateRootId, info, command.VerifyType, command.IsVisible));
     });
 }