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 { }); }
/// <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 { }); }
public async Task <SetMenuOutput> SetPlatform([FromBody] SetMenuInput input) { return(await _menuBusiness.SetPlatform(input)); }