/// <summary>
        /// 新增活动
        /// </summary>
        /// <param name="model"></param>
        /// <returns></returns>
        public static async Task <OperationResult <bool> > InsertActivityAsync(SalePromotionActivityModel model)
        {
            OperationResult <bool> result;
            //检查名称重复
            var is_repeat = await DalSalePromotionActivity.CheckNameRepeatAsync(model.Name, model.ActivityId);

            if (!is_repeat)
            {
                return(OperationResult.FromError <bool>("1", "活动名称已存在"));
            }
            else
            {
                var insertResult = await DalSalePromotionActivity.InsertActivityAsync(model);

                if (!insertResult)
                {
                    result = OperationResult.FromResult(false);
                }
                else
                {
                    result = OperationResult.FromResult(true);
                }
            }
            return(result);
        }