public async Task <IActionResult> Save(AdvertisementDto model)
        {
            model.CategoryId = model.CategoryId?.Replace("null", "");
            var entity = await AdsService.GetByIdAsync(model.Id);

            if (entity != null)
            {
                Mapper.Map(model, entity);
                bool b1 = await AdsService.SaveChangesAsync() > 0;

                return(ResultData(null, b1, b1 ? "修改成功" : "修改失败"));
            }

            bool b = await AdsService.AddEntitySavedAsync(model.Mapper <Advertisement>()) > 0;

            return(ResultData(null, b, b ? "添加成功" : "添加失败"));
        }