public static bool Update(SE_GiftManageConfigModel model)
        {
            try
            {
                var giftFlag = true;
                var reGiftP  = SE_GiftManageConfigDAL.DeleteGiftProductConfig(model.Id);
                giftFlag = giftFlag && reGiftP >= 0;
                var giftProductModels = JsonConvert.DeserializeObject <List <GiftStockModel2> >(model.GiftProducts);
                foreach (var g in giftProductModels)
                {
                    g.RuleId = model.Id;
                    giftFlag = giftFlag && SE_GiftManageConfigDAL.MergeIntoGiftProductStock(g.Pid, g.Stock, model.Id) > 0;
                    giftFlag = giftFlag && SE_GiftManageConfigDAL.InsertGiftProductConfig(g) > 0;
                }

                var result = SE_GiftManageConfigDAL.Update(ProcessConnection.OpenConfiguration, model) && giftFlag;
                // 按PID配置赠品后刷新牛皮癣缓存
                RefreshGiftPicture(model);
                return(result);
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }