예제 #1
0
        public EditionTdm FindById(IDbSession sess, long id)
        {
            SqlSelect ss = new SqlSelect(sess);

            ss.Sql   = SelectEdition;
            ss.Where = "u.ng_id=@userId";
            ss.AddParam("@userId", id);
            return(ss.ExecuteSingle <EditionTdm>());
        }
예제 #2
0
        public OAuthTdm FindByOpenId(IDbSession sess, OAuthKind kind, string openId)
        {
            SqlSelect ss = new SqlSelect(sess);

            ss.Sql   = SelectSQL;
            ss.Where = " m.nt_kind=@nt_kind and m.sz_open_id=@sz_open_id";
            ss.AddParam("@nt_kind", (int)kind).AddParam("@sz_open_id", openId);
            return(ss.ExecuteSingle <OAuthTdm>());
        }
예제 #3
0
        public UserTdm FindByMobile(IDbSession sess, string mobile)
        {
            SqlSelect ss = new SqlSelect(sess);

            ss.Sql   = SelectUser;
            ss.Where = "u.sz_email=@sz_email";
            ss.AddParam("@sz_email", mobile);
            return(ss.ExecuteSingle <UserTdm>());
        }
예제 #4
0
        public UserTdm FindByEmail(IDbSession sess, string email)
        {
            SqlSelect ss = new SqlSelect(sess);

            ss.Sql   = SelectUser;
            ss.Where = "u.sz_mobile=@sz_mobile";
            ss.AddParam("@sz_mobile", email);
            return(ss.ExecuteSingle <UserTdm>());
        }
예제 #5
0
        public UserTdm FindByUserName(IDbSession sess, string username)
        {
            SqlSelect ss = new SqlSelect(sess);

            ss.Sql   = SelectUser;
            ss.Where = "u.sz_uname=@uname";
            ss.AddParam("@uname", username);
            return(ss.ExecuteSingle <UserTdm>());
        }