Exemple #1
0
        public BaseOutput SetPlatform([FromBody] SetMenuInput input)
        {
            var model = _mapper.Map <MenuModel>(input);

            if (model.Id > 0)
            {
                _adminDbContext.Updateable(model).ExecuteCommand();
            }
            else
            {
                _adminDbContext.Insertable(model).ExecuteCommand();
            }
            return(new BaseOutput {
            });
        }
Exemple #2
0
        /// <summary>
        /// 设置平台菜单信息
        /// </summary>
        /// <param name="input"></param>
        /// <returns></returns>
        public async Task <SetMenuOutput> SetPlatform(SetMenuInput input)
        {
            var model = _mapper.Map <MenuInfo>(input);

            if (model.Id > 0)
            {
                await _dbContext.Updateable(model).ExecuteCommandAsync();
            }
            else
            {
                await _dbContext.Insertable(model).ExecuteCommandAsync();
            }

            return(new SetMenuOutput {
            });
        }
Exemple #3
0
 public async Task <SetMenuOutput> SetPlatform([FromBody] SetMenuInput input)
 {
     return(await _menuBusiness.SetPlatform(input));
 }