/// <summary> /// 修改 /// </summary> /// <param name="tchatFeehis"></param> /// <returns></returns> public bool UpdateTpxinUserinfo(TpxinUserinfo tpxinUserinfo, OracleTransaction transaction) { var sql = "UPDATE TPXIN_USERINFO SET P = P + {0},V = V + {1},REMARKS = '{2}' WHERE NODEID = {3}"; sql = string.Format(sql, tpxinUserinfo.P, tpxinUserinfo.V, tpxinUserinfo.Remarks, tpxinUserinfo.Nodeid); return(OracleHelper.ExecuteNonQuery(transaction, CommandType.Text, sql) > 0); }
/// <summary> /// 获取信友圈用户信息 /// </summary> /// <param name="nodeId"></param> /// <returns></returns> public TpxinUserinfo GetUserInfoByNodeId(int nodeId) { string sql = "SELECT * FROM TPXIN_USERINFO WHERE NODEID = {0}"; sql = string.Format(sql, nodeId); TpxinUserinfo tpxinUserinfo = new TpxinUserinfo(); using (var reader = OracleHelper.ExecuteReader(sql)) { if (reader.Read()) { tpxinUserinfo.Infoid = Convert.ToInt32(reader["Infoid"]); tpxinUserinfo.Nodeid = Convert.ToInt32(reader["Nodeid"]); tpxinUserinfo.P = Convert.ToDecimal(reader["P"]); tpxinUserinfo.V = Convert.ToDecimal(reader["V"]); tpxinUserinfo.Createtime = Convert.ToDateTime(reader["Createtime"]); } } return(tpxinUserinfo); }