/// <summary> /// 创建活动 /// </summary> /// <param name="input"></param> /// <returns></returns> protected async Task CreateCampaignAsync(CampaignEditDto input) { var model = input.MapTo <Campaign>(); await _campaignAppService.InsertAsync(model); }
/// <summary> /// 修改活动信息 /// </summary> /// <param name="input"></param> /// <returns></returns> protected async Task UpdateCampaignAsync(CampaignEditDto input) { var entity = await _campaignAppService.GetAsync(input.Id.Value); await _campaignAppService.UpdateAsync(input.MapTo(entity)); }