| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384 |
- using Castle.ActiveRecord;
- using NHibernate.Criterion;
- using System;
- using System.Collections.Generic;
- using System.Text;
- namespace BizCom
- {
- [ActiveRecord("CE_Withdraw")]
- public class CeWithdraw : ComBase<CeWithdraw>
- {
- [PrimaryKey(PrimaryKeyType.Assigned)]
- public string tid { get; set; }
- private int _userid = 0;
- /// <summary>
- ///用户id
- /// </summary>
- [Property]
- public int userid
- {
- get { return _userid; }
- set { _userid = value; }
- }
- private string _providerid = "";
- /// <summary>
- ///供应商id
- /// </summary>
- [Property]
- public string providerid
- {
- get { return _providerid; }
- set { _providerid = value; }
- }
- /// <summary>
- ///发起时间
- /// </summary>
- [Property]
- public DateTime? creationtime { get; set; }
- /// <summary>
- ///供应商确认时间
- /// </summary>
- [Property]
- public DateTime? acknowledgingtime { get; set; }
- private int _status = 0;
- /// <summary>
- ///状态
- /// </summary>
- [Property]
- public int status
- {
- get { return _status; }
- set { _status = value; }
- }
- public static void Del(object id)
- {
- StringBuilder sql = new StringBuilder();
- sql.AppendFormat("delete from CE_Withdraw where id=" + id);
- ExecuteNonQuery(sql.ToString());
- }
- public static CeWithdraw GetByTid(string tid)
- {
- return FindFirst(Expression.Eq("tid", tid));
- }
- //直接用状态以及tid查询订单
- public static CeWithdraw GetByTidAndStatus(string tid, int status)
- {
- Dictionary<string, string> map = null;
- map.Add("tid", tid);
- map.Add("status", status.ToString());
- return FindFirst(Expression.AllEq(map));
- }
- }
- }
|