Пример #1
0
        public ResponseView <IList <UserReceiverResponseView> > GetReceiverInfos(int userId)
        {
            var user = _userRepository
                       .GetUserReciverInfos(userId);

            return(base.OutPutBrokenResponseView(UserReceiverResponseView.ToView(user)));
        }
Пример #2
0
        public ResponseView <UserReceiverResponseView> GetDefault(int userId)
        {
            var user = _userRepository.GetFirstById(userId);

            var defaultReceiver = user.GetDefault();

            if (defaultReceiver == null)
            {
                return(base.OutPutResponseView(default(UserReceiverResponseView), false, "还未设置默认地址"));
            }
            var view = UserReceiverResponseView.ToView(defaultReceiver);

            return(base.OutPutBrokenResponseView(view));
        }