| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233 |
- using Castle.ActiveRecord;
- using NHibernate.Criterion;
- using System;
- using System.Text;
- namespace BizCom
- {
- [ActiveRecord("CE_ErpShop")]
- public class CeErpShop : ComBase<CeErpShop>
- {
- /// <summary>
- ///
- /// </summary>
- [PrimaryKey(PrimaryKeyType.Native)]
- public int ID { get; set; }
- private int _userID = 0;
- /// <summary>
- ///
- /// </summary>
- [Property]
- public int UserID
- {
- get { return _userID; }
- set { _userID = value; }
- }
- private string _comName = "";
- /// <summary>
- ///
- /// </summary>
- [Property]
- public string ComName
- {
- get { return _comName; }
- set { _comName = value; }
- }
- private string _leader = "";
- /// <summary>
- ///
- /// </summary>
- [Property]
- public string Leader
- {
- get { return _leader; }
- set { _leader = value; }
- }
- private string _appSecret = "";
- /// <summary>
- ///
- /// </summary>
- [Property]
- public string AppSecret
- {
- get { return _appSecret; }
- set { _appSecret = value; }
- }
- private string _shopName = "";
- /// <summary>
- ///
- /// </summary>
- [Property]
- public string ShopName
- {
- get { return _shopName; }
- set { _shopName = value; }
- }
- private string _sName = "";
- /// <summary>
- ///
- /// </summary>
- [Property]
- public string SName
- {
- get { return _sName; }
- set { _sName = value; }
- }
- private string _shopType = "";
- /// <summary>
- ///
- /// </summary>
- [Property]
- public string ShopType
- {
- get { return _shopType; }
- set { _shopType = value; }
- }
- private int _state = 0;
- /// <summary>
- ///
- /// </summary>
- [Property]
- public int State
- {
- get { return _state; }
- set { _state = value; }
- }
- /// <summary>
- ///
- /// </summary>
- [Property]
- public DateTime? AddTime { get; set; }
- private string _summary = "";
- /// <summary>
- ///
- /// </summary>
- [Property]
- public string Summary
- {
- get { return _summary; }
- set { _summary = value; }
- }
- private string _refresh_token = "";
- /// <summary>
- ///
- /// </summary>
- [Property]
- public string refresh_token
- {
- get { return _refresh_token; }
- set { _refresh_token = value; }
- }
- private string _taobao_user_nick = "";
- /// <summary>
- ///店铺旺旺昵称
- /// </summary>
- [Property]
- public string taobao_user_nick
- {
- get { return _taobao_user_nick; }
- set { _taobao_user_nick = value; }
- }
- private string _taobao_user_id = "";
- /// <summary>
- ///用户淘宝ID
- /// </summary>
- [Property]
- public string taobao_user_id
- {
- get { return _taobao_user_id; }
- set { _taobao_user_id = value; }
- }
- private bool _isTmc = false;
- /// <summary>
- ///是否授权同步
- /// </summary>
- [Property]
- public bool isTmc
- {
- get { return _isTmc; }
- set { _isTmc = value; }
- }
- //appid
- private String _design_app_id = "";
- [Property]
- public String design_app_id
- {
- get { return _design_app_id; }
- set { _design_app_id = value; }
- }
- private String _design_secret = "";
- [Property]
- public String design_secret
- {
- get { return _design_secret; }
- set { _design_secret = value; }
- }
- private Boolean _orderAudit = false;
- [Property]
- public Boolean orderAudit
- {
- get { return _orderAudit; }
- set { _orderAudit = value; }
- }
- private string _platform = "";
- /// <summary>
- /// 平台
- /// </summary>
- [Property]
- public string platform
- {
- get { return _platform; }
- set { _platform = value; }
- }
- private string _company = "";
- /// <summary>
- /// 公司类型
- /// </summary>
- [Property]
- public string company
- {
- get { return _company; }
- set { _company = value; }
- }
- public static void Del(object id)
- {
- StringBuilder sql = new StringBuilder();
- sql.AppendFormat("delete from CE_ErpShop where id=" + id);
- ExecuteNonQuery(sql.ToString());
- }
- public static CeErpShop GetShopIdByName(string ComName)
- {
- return FindFirst(Expression.Eq("ShopName", ComName));
- }
- public static CeErpShop GetShopIdByCode(string ComCode)
- {
- return FindFirst(Expression.Eq("AppSecret", ComCode));
- }
- public static CeErpShop GetShopById(int ShopId)
- {
- return FindFirst(Expression.Eq("id", ShopId));
- }
- }
- }
|