CeErpTradeRefund.cs 6.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287
  1. using Castle.ActiveRecord;
  2. using NHibernate.Criterion;
  3. using System;
  4. using System.Text;
  5. namespace BizCom
  6. {
  7. [ActiveRecord("CE_ErpTradeRefund")]
  8. public class CeErpTradeRefund : ComBase<CeErpTradeRefund>
  9. {
  10. /// <summary>
  11. /// 退款单号
  12. /// </summary>
  13. [PrimaryKey(PrimaryKeyType.Assigned)]
  14. public string refund_id { get; set; }
  15. private string _oid = "";
  16. /// <summary>
  17. ///
  18. /// </summary>
  19. [Property]
  20. public string oid
  21. {
  22. get { return _oid; }
  23. set { _oid = value; }
  24. }
  25. private string _tid = "";
  26. /// <summary>
  27. ///
  28. /// </summary>
  29. [Property]
  30. public string tid
  31. {
  32. get { return _tid; }
  33. set { _tid = value; }
  34. }
  35. private string _total_fee = "";
  36. /// <summary>
  37. ///交易金额
  38. /// </summary>
  39. [Property]
  40. public string total_fee
  41. {
  42. get { return _total_fee; }
  43. set { _total_fee = value; }
  44. }
  45. private string _buyer_nick = "";
  46. /// <summary>
  47. ///
  48. /// </summary>
  49. [Property]
  50. public string buyer_nick
  51. {
  52. get { return _buyer_nick; }
  53. set { _buyer_nick = value; }
  54. }
  55. private string _seller_nick = "";
  56. /// <summary>
  57. ///
  58. /// </summary>
  59. [Property]
  60. public string seller_nick
  61. {
  62. get { return _seller_nick; }
  63. set { _seller_nick = value; }
  64. }
  65. /// <summary>
  66. ///创建时间
  67. /// </summary>
  68. [Property]
  69. public DateTime? created { get; set; }
  70. /// <summary>
  71. ///修改时间
  72. /// </summary>
  73. [Property]
  74. public DateTime? modified { get; set; }
  75. private string _order_status = "";
  76. /// <summary>
  77. ///交易状态
  78. /// </summary>
  79. [Property]
  80. public string order_status
  81. {
  82. get { return _order_status; }
  83. set { _order_status = value; }
  84. }
  85. private string _status = "";
  86. /// <summary>
  87. ///退款状态
  88. /// </summary>
  89. [Property]
  90. public string status
  91. {
  92. get { return _status; }
  93. set { _status = value; }
  94. }
  95. private string _good_status = "";
  96. /// <summary>
  97. ///货物状态
  98. /// </summary>
  99. [Property]
  100. public string good_status
  101. {
  102. get { return _good_status; }
  103. set { _good_status = value; }
  104. }
  105. private bool _has_good_return = false;
  106. /// <summary>
  107. ///买家是否需要退货
  108. /// </summary>
  109. [Property]
  110. public bool has_good_return
  111. {
  112. get { return _has_good_return; }
  113. set { _has_good_return = value; }
  114. }
  115. private string _refund_fee = "";
  116. /// <summary>
  117. ///退款金额
  118. /// </summary>
  119. [Property]
  120. public string refund_fee
  121. {
  122. get { return _refund_fee; }
  123. set { _refund_fee = value; }
  124. }
  125. private string _payment = "";
  126. /// <summary>
  127. ///
  128. /// </summary>
  129. [Property]
  130. public string payment
  131. {
  132. get { return _payment; }
  133. set { _payment = value; }
  134. }
  135. private string _reason = "";
  136. /// <summary>
  137. ///退款原因
  138. /// </summary>
  139. [Property]
  140. public string reason
  141. {
  142. get { return _reason; }
  143. set { _reason = value; }
  144. }
  145. private string _describe = "";
  146. /// <summary>
  147. ///退款说明
  148. /// </summary>
  149. [Property]
  150. public string describe
  151. {
  152. get { return _describe; }
  153. set { _describe = value; }
  154. }
  155. private string _refund_phase = "";
  156. /// <summary>
  157. ///
  158. /// </summary>
  159. [Property]
  160. public string refund_phase
  161. {
  162. get { return _refund_phase; }
  163. set { _refund_phase = value; }
  164. }
  165. private string _responsibleUserId = "";
  166. /// <summary>
  167. ///责任人 123_k,23_s
  168. /// </summary>
  169. [Property]
  170. public string ResponsibleUserId
  171. {
  172. get { return _responsibleUserId; }
  173. set { _responsibleUserId = value; }
  174. }
  175. private int _refundState = 0;
  176. /// <summary>
  177. ///审核状态 1待审核2待确认
  178. /// </summary>
  179. [Property]
  180. public int RefundState
  181. {
  182. get { return _refundState; }
  183. set { _refundState = value; }
  184. }
  185. private string _responsibleUserName = "";
  186. /// <summary>
  187. ///责任人名字
  188. /// </summary>
  189. [Property]
  190. public string ResponsibleUserName
  191. {
  192. get { return _responsibleUserName; }
  193. set { _responsibleUserName = value; }
  194. }
  195. private string _memo = "";
  196. /// <summary>
  197. ///标记的备注
  198. /// </summary>
  199. [Property]
  200. public string Memo
  201. {
  202. get { return _memo; }
  203. set { _memo = value; }
  204. }
  205. private int _isPartRefund = 0;
  206. /// <summary>
  207. ///是否部分退款
  208. /// </summary>
  209. [Property]
  210. public int IsPartRefund
  211. {
  212. get { return _isPartRefund; }
  213. set { _isPartRefund = value; }
  214. }
  215. private string _refundDesc = "";
  216. /// <summary>
  217. ///客户额外描述原因
  218. /// </summary>
  219. [Property]
  220. public string refundDesc
  221. {
  222. get { return _refundDesc; }
  223. set { _refundDesc = value; }
  224. }
  225. private string _buyer_id = "";
  226. /// <summary>
  227. ///客户id
  228. /// </summary>
  229. [Property]
  230. public string buyer_id
  231. {
  232. get { return _buyer_id; }
  233. set { _buyer_id = value; }
  234. }
  235. public static void Del(object id)
  236. {
  237. StringBuilder sql = new StringBuilder();
  238. sql.AppendFormat("delete from CE_ErpTradeRefund where tid='" + id + "'");
  239. ExecuteNonQuery(sql.ToString());
  240. }
  241. public static CeErpTradeRefund Get(string rid)
  242. {
  243. return FindFirst(Expression.Sql("refund_id='" + rid + "'"));
  244. }
  245. public static CeErpTradeRefund GetByTid(string rid)
  246. {
  247. return FindFirst(Expression.Sql("tid='" + rid + "'"));
  248. }
  249. public static CeErpTradeRefund GetByTidAndReId(string rid, string refundid)
  250. {
  251. return FindFirst(Expression.Sql(string.Format("tid='{0}' and refund_id = '{1}'", rid, refundid)));
  252. }
  253. public static CeErpTradeRefund GetByOidAndReId(string rid, string refundid)
  254. {
  255. return FindFirst(Expression.Sql(string.Format("oid='{0}' and refund_id = '{1}'", rid, refundid)));
  256. }
  257. }
  258. }