示例#1
0
 /// <summary>
 /// 创建活动
 /// </summary>
 /// <param name="input"></param>
 /// <returns></returns>
 protected async Task CreateCampaignAsync(CampaignEditDto input)
 {
     var model = input.MapTo <Campaign>();
     await _campaignAppService.InsertAsync(model);
 }
示例#2
0
        /// <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));
        }