public ResponseView <IList <UserReceiverResponseView> > GetReceiverInfos(int userId) { var user = _userRepository .GetUserReciverInfos(userId); return(base.OutPutBrokenResponseView(UserReceiverResponseView.ToView(user))); }
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)); }