public int AddPayRecordEnt(EntGoodsOrder order, EntNews attachContent, PayContent payContent, PayContentPayment payInfo) { PaidSnapShot snapshot = new PaidSnapShot { UserName = order.AccepterName, Contact = order.AccepterTelePhone, ContentType = payContent.ContentType, ArticleId = attachContent.id, VideoCover = payContent.VideoCover, VideoURL = payContent.VideoURL, PaidAmout = order.BuyPrice, OriginalAmout = payInfo.OrgAmount, DiscountInfo = payInfo.Info, }; return(AddPayRecord(attachContent.aid, attachContent.title, attachContent.paycontent, order.UserId, order.Id, snapshot: snapshot)); }
private int AddPayRecord(int aid, string title, int contentId, int userId, int payId, string attr = null, PaidSnapShot snapshot = null) { PaidContentRecord newRecord = new PaidContentRecord { Aid = aid, Addtime = DateTime.Now, Title = title, ContentId = contentId, UserId = userId, PayId = payId, Attr = attr, Snapshot = JsonConvert.SerializeObject(snapshot), }; int newId = 0; if (int.TryParse(Add(newRecord).ToString(), out newId)) { return(newId); } return(0); }