public BaseResponseModel <LoginOutPut> UserLogin(LoginModel loginModel) { string errMsg = string.Empty; LoginOutPut loginOutPut = new LoginOutPut(); try { //验证提交数据合法性 UserDataLegalityVerification(loginModel); loginOutPut = userService.UserLogin(loginModel); } catch (VerificationException ex) { loginOutPut.remindMsg = ex.Message; } catch (OperationException ex) { errMsg = ex.Message; } catch (Exception ex) { errMsg = ex.Message; } return(ResponsePack.Responsing(loginOutPut, errMeassage: errMsg)); }
public BaseResponseModel <OrderSubmitDto> SubmitOrderByCart(OrderSubmitInputDto orderSubmitInputDto) { OrderSubmitDto submitDto = new OrderSubmitDto(); string errMsg = string.Empty; try { submitDto = orderService.SubmitOrderByCart(userDataContent.userID, orderSubmitInputDto.IDs, orderSubmitInputDto.ifSumbitAll); } catch (Exception ex) { errMsg = ex.Message; } return(ResponsePack.Responsing(submitDto, errMsg)); }
/// <summary> /// 获取商品数据 通过分类CD /// </summary> /// <param name="categoryCD"></param> /// <returns></returns> public BaseResponseModel <GoodsDataOutput> GetGoodsByCategoryCD(string categoryCD) { string errMsg = string.Empty; GoodsDataOutput result = null; try { result = goodsService.GetGoodsByCategoryCD(categoryCD); } catch (VerificationException ex) { errMsg = ex.Message; } catch (Exception ex) { errMsg = ex.Message; } return(ResponsePack.Responsing(result, errMsg)); }
public BaseResponseModel <GoodsDetailOutput> GetGoodsDetail(int ID) { string errMsg = string.Empty; GoodsDetailOutput goodsDetailOutput = null; try { goodsDetailOutput = goodsService.GetGoodsDetail(ID); } catch (VerificationException ex) { errMsg = ex.Message; } catch (Exception ex) { errMsg = ex.Message; } return(ResponsePack.Responsing(goodsDetailOutput, errMsg)); }
public BaseResponseModel <bool> SendVerificationCode(string mobile) { bool result = false; string errMsg = string.Empty; try { if (!IsMobilePhone(mobile)) { throw new VerificationException("手机号码不合法."); } result = SystemService.SendVerificationCode(mobile); } catch (VerificationException ex) { errMsg = ex.Message; } catch (Exception ex) { errMsg = ex.Message; } return(ResponsePack.Responsing(result, errMeassage: errMsg)); }
public BaseResponseModel <bool> RemoveCart(RemoveCartInput removeCartInput) { return(ResponsePack.Responsing(orderService.RemoveCart(userDataContent.userID, removeCartInput.goodsID, removeCartInput.ifRemoveAll))); }
public BaseResponseModel <bool> AddToCart(AddCartInput addCart) { return(ResponsePack.Responsing(orderService.ADDToCart(userDataContent.userID, addCart.goodsID, addCart.goodsCount))); }
public BaseResponseModel <OrderCartDto> GetUserCart() { return(ResponsePack.Responsing(orderService.GetUserCart(userDataContent.userID))); }
public BaseResponseModel <OrderDataDto> GetOrderDetail(int baseID) { return(ResponsePack.Responsing(orderService.GetOrderDetail(baseID))); }
public BaseResponseModel <List <OrderDataDto> > GetGetOrderList(string type) { return(ResponsePack.Responsing(orderService.GetOrderList(userDataContent.userID, type))); }
public BaseResponseModel <AddressOutput> GetUserAddress() { var result = userService.GetAddress(userDataContent.userID); return(ResponsePack.Responsing(result)); }
public BaseResponseModel <UserDataOutput> GetUserData() { var user = userService.GetUser(userDataContent.userID); return(ResponsePack.Responsing(user)); }
public BaseResponseModel <bool> DeleteUserAddress(int addressID) { var result = userService.UserDeleteAddress(addressID, userDataContent.userID); return(ResponsePack.Responsing(result)); }
public BaseResponseModel <bool> ChangeUserAddress(UserAddress userAddress) { var result = userService.UserUpdateAddress(userAddress, userDataContent.userID); return(ResponsePack.Responsing(result)); }