示例#1
0
        /// <summary>
        /// 出售之后,修改下数据。
        /// </summary>
        /// <param name="buyInfo"></param>
        public void UpdateBuyInfoWhenSell(BuyInfo buyInfo)
        {
            var sql = $"update t_buy_info set SellClientOid=@SellClientOid, SellPrice=@SellPrice, SellQuantity=@SellQuantity, SellOrderId=@SellOrderId, SellResult=@SellResult, SellStatus='{OrderStatus.prepare}' where Id=@Id and BuyClientOid=@BuyClientOid";

            Database.Execute(sql, new { buyInfo.SellClientOid, buyInfo.SellPrice, buyInfo.SellQuantity, buyInfo.SellOrderId, buyInfo.SellResult, buyInfo.Id, buyInfo.BuyClientOid });
        }
示例#2
0
 public void CreateBuyInfo(BuyInfo buyInfo)
 {
     Database.Insert(buyInfo);
 }