CCN.Modules.Customer.DataAccess.CustomerDA.CustLoginByOpenid C# (CSharp) Метод

CustLoginByOpenid() публичный Метод

用户登录(openid登录)
public CustLoginByOpenid ( string openid ) : CustModel
openid string openid
Результат CCN.Modules.Customer.BusinessEntity.CustModel
        public CustModel CustLoginByOpenid(string openid)
        {
            const string sql = "select b.* from cust_wechat as a left join cust_info as b on a.custid=b.innerid where a.openid=@openid;";
            var custModel = Helper.Query<CustModel>(sql, new { openid }).FirstOrDefault();

            //获取微信信息
            if (custModel != null)
            {
                custModel.Wechat = Helper.Query<CustWechat>("select * from wechat_friend where openid=@openid;", new
                {
                    openid
                }).FirstOrDefault();
            }

            return custModel;
        }