public MsgUserType GetUserType(UserManagerDto user) { MsgUserType result = MsgUserType.User; //酒店管理员 var wxHotelAdmin = new BLL.wx_hotel_admin(); int intUser = 0; if (int.TryParse(user.UserId, out intUser)) { var hotelAdmin = wxHotelAdmin.GetModel(intUser); if (hotelAdmin != null) { result = MsgUserType.Hotel; return(result); } //餐饮管理员 var wxDiancaiAdmin = new BLL.wx_diancai_admin(); var diancaiAdmin = wxDiancaiAdmin.GetModel(intUser); if (diancaiAdmin != null) { result = MsgUserType.Shop; return(result); } //todo:是否需要判断固定的微信号? //景区管理员 var count = new wx_userweixin().GetUserWxNumCount(intUser); if (count > 0) { result = MsgUserType.Scenic; return(result); } } else { //todo:判断微信是否是用户 //如果userid不是Int型 ,默认就认为它是微信用户 result = MsgUserType.WeChatCustomer; return(result); } return(result); }
private UserManagerDto GetUser(string userId, MsgUserType msgUserType) { UserManagerDto result = null; if (msgUserType != MsgUserType.WeChatCustomer) { result = _userService.Get(userId.ToInt()); } else { //todo:加上判断获取微信用户 } return(result); }