CeErpShop.cs 5.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233
  1. using Castle.ActiveRecord;
  2. using NHibernate.Criterion;
  3. using System;
  4. using System.Text;
  5. namespace BizCom
  6. {
  7. [ActiveRecord("CE_ErpShop")]
  8. public class CeErpShop : ComBase<CeErpShop>
  9. {
  10. /// <summary>
  11. ///
  12. /// </summary>
  13. [PrimaryKey(PrimaryKeyType.Native)]
  14. public int ID { get; set; }
  15. private int _userID = 0;
  16. /// <summary>
  17. ///
  18. /// </summary>
  19. [Property]
  20. public int UserID
  21. {
  22. get { return _userID; }
  23. set { _userID = value; }
  24. }
  25. private string _comName = "";
  26. /// <summary>
  27. ///
  28. /// </summary>
  29. [Property]
  30. public string ComName
  31. {
  32. get { return _comName; }
  33. set { _comName = value; }
  34. }
  35. private string _leader = "";
  36. /// <summary>
  37. ///
  38. /// </summary>
  39. [Property]
  40. public string Leader
  41. {
  42. get { return _leader; }
  43. set { _leader = value; }
  44. }
  45. private string _appSecret = "";
  46. /// <summary>
  47. ///
  48. /// </summary>
  49. [Property]
  50. public string AppSecret
  51. {
  52. get { return _appSecret; }
  53. set { _appSecret = value; }
  54. }
  55. private string _shopName = "";
  56. /// <summary>
  57. ///
  58. /// </summary>
  59. [Property]
  60. public string ShopName
  61. {
  62. get { return _shopName; }
  63. set { _shopName = value; }
  64. }
  65. private string _sName = "";
  66. /// <summary>
  67. ///
  68. /// </summary>
  69. [Property]
  70. public string SName
  71. {
  72. get { return _sName; }
  73. set { _sName = value; }
  74. }
  75. private string _shopType = "";
  76. /// <summary>
  77. ///
  78. /// </summary>
  79. [Property]
  80. public string ShopType
  81. {
  82. get { return _shopType; }
  83. set { _shopType = value; }
  84. }
  85. private int _state = 0;
  86. /// <summary>
  87. ///
  88. /// </summary>
  89. [Property]
  90. public int State
  91. {
  92. get { return _state; }
  93. set { _state = value; }
  94. }
  95. /// <summary>
  96. ///
  97. /// </summary>
  98. [Property]
  99. public DateTime? AddTime { get; set; }
  100. private string _summary = "";
  101. /// <summary>
  102. ///
  103. /// </summary>
  104. [Property]
  105. public string Summary
  106. {
  107. get { return _summary; }
  108. set { _summary = value; }
  109. }
  110. private string _refresh_token = "";
  111. /// <summary>
  112. ///
  113. /// </summary>
  114. [Property]
  115. public string refresh_token
  116. {
  117. get { return _refresh_token; }
  118. set { _refresh_token = value; }
  119. }
  120. private string _taobao_user_nick = "";
  121. /// <summary>
  122. ///店铺旺旺昵称
  123. /// </summary>
  124. [Property]
  125. public string taobao_user_nick
  126. {
  127. get { return _taobao_user_nick; }
  128. set { _taobao_user_nick = value; }
  129. }
  130. private string _taobao_user_id = "";
  131. /// <summary>
  132. ///用户淘宝ID
  133. /// </summary>
  134. [Property]
  135. public string taobao_user_id
  136. {
  137. get { return _taobao_user_id; }
  138. set { _taobao_user_id = value; }
  139. }
  140. private bool _isTmc = false;
  141. /// <summary>
  142. ///是否授权同步
  143. /// </summary>
  144. [Property]
  145. public bool isTmc
  146. {
  147. get { return _isTmc; }
  148. set { _isTmc = value; }
  149. }
  150. //appid
  151. private String _design_app_id = "";
  152. [Property]
  153. public String design_app_id
  154. {
  155. get { return _design_app_id; }
  156. set { _design_app_id = value; }
  157. }
  158. private String _design_secret = "";
  159. [Property]
  160. public String design_secret
  161. {
  162. get { return _design_secret; }
  163. set { _design_secret = value; }
  164. }
  165. private Boolean _orderAudit = false;
  166. [Property]
  167. public Boolean orderAudit
  168. {
  169. get { return _orderAudit; }
  170. set { _orderAudit = value; }
  171. }
  172. private string _platform = "";
  173. /// <summary>
  174. /// 平台
  175. /// </summary>
  176. [Property]
  177. public string platform
  178. {
  179. get { return _platform; }
  180. set { _platform = value; }
  181. }
  182. private string _company = "";
  183. /// <summary>
  184. /// 公司类型
  185. /// </summary>
  186. [Property]
  187. public string company
  188. {
  189. get { return _company; }
  190. set { _company = value; }
  191. }
  192. public static void Del(object id)
  193. {
  194. StringBuilder sql = new StringBuilder();
  195. sql.AppendFormat("delete from CE_ErpShop where id=" + id);
  196. ExecuteNonQuery(sql.ToString());
  197. }
  198. public static CeErpShop GetShopIdByName(string ComName)
  199. {
  200. return FindFirst(Expression.Eq("ShopName", ComName));
  201. }
  202. public static CeErpShop GetShopIdByCode(string ComCode)
  203. {
  204. return FindFirst(Expression.Eq("AppSecret", ComCode));
  205. }
  206. public static CeErpShop GetShopById(int ShopId)
  207. {
  208. return FindFirst(Expression.Eq("id", ShopId));
  209. }
  210. }
  211. }