public WxUserModel Register(WeChatModels.WeChatUserInfo userModel) { var model = new WxUserModel(userModel); this.Register(model); return(model); }
public WxUserModel(WeChatModels.WeChatUserInfo user) { if (user != null) { this.UnionId = user.UnionId; this.City = user.City; this.Country = user.Country; this.CreatedTime = DateTime.UtcNow.ToUnixStampDateTime(); this.LastActiveTime = DateTime.UtcNow.ToUnixStampDateTime(); this.NickName = user.NickName; //this.OpenId = user.OpenId; this.Province = user.Province; this.UnionId = user.UnionId; this.RegistryType = RegistryTypes.Miniprogram; } }