| | |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(value = "订单id", name = "id", dataType = "String", required = true) |
| | | }) |
| | | public R<Boolean> confirm(@RequestParam Integer id) { |
| | | public R<Boolean> confirm(@RequestParam String id) { |
| | | if (tokenService.getLoginUser1() == null) { |
| | | return R.tokenError("登录失效"); |
| | | } |
| | | TOrder byId = orderService.getById(id); |
| | | byId.setUserId(null); |
| | | byId.setState(3); |
| | | byId.setCompleteTime(new Date()); |
| | | return R.ok(orderService.updateById(byId)); |
| | |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(value = "订单id", name = "id", dataType = "String", required = true) |
| | | }) |
| | | public R<Boolean> confirmStudy(@RequestParam Integer id) { |
| | | public R<Boolean> confirmStudy(@RequestParam String id) { |
| | | if (tokenService.getLoginUserStudy() == null) { |
| | | return R.tokenError("登录失效"); |
| | | } |
| | | TOrder byId = orderService.getById(id); |
| | | byId.setUserId(null); |
| | | byId.setState(3); |
| | | byId.setCompleteTime(new Date()); |
| | | return R.ok(orderService.updateById(byId)); |
| | |
| | | @ApiImplicitParam(value = "订单id", name = "orderId", dataType = "String", required = true), |
| | | @ApiImplicitParam(value = "地址信息id", name = "recipientId", dataType = "String", required = true) |
| | | }) |
| | | public R updateOrderAddressParent(@RequestParam Integer orderId, @RequestParam Integer recipientId) { |
| | | public R updateOrderAddressParent(@RequestParam String orderId, @RequestParam Integer recipientId) { |
| | | if (tokenService.getLoginUser1() == null) { |
| | | return R.tokenError("登录失效"); |
| | | } |
| | |
| | | if (!Constants.ONE.equals(order.getState())) { |
| | | throw new GlobalException("订单已发货,无法修改收货地址!"); |
| | | } |
| | | order.setUserId(null); |
| | | order.setConsigneeName(recipient.getRecipient()); |
| | | order.setConsigneePhone(recipient.getRecipientPhone()); |
| | | order.setConsigneeAddress(recipient.getProvince()+recipient.getCity()+recipient.getAddress()); |
| | |
| | | @ApiImplicitParam(value = "订单id", name = "orderId", dataType = "String", required = true), |
| | | @ApiImplicitParam(value = "地址信息id", name = "recipientId", dataType = "String", required = true) |
| | | }) |
| | | public R updateOrderAddress(@RequestParam Integer orderId, @RequestParam Integer recipientId) { |
| | | public R updateOrderAddress(@RequestParam String orderId, @RequestParam Integer recipientId) { |
| | | if (tokenService.getLoginUserStudy() == null) { |
| | | return R.tokenError("登录失效"); |
| | | } |
| | |
| | | if (!Constants.ONE.equals(order.getState())) { |
| | | throw new GlobalException("订单已发货,无法修改收货地址!"); |
| | | } |
| | | order.setUserId(null); |
| | | order.setConsigneeName(recipient.getRecipient()); |
| | | order.setConsigneePhone(recipient.getRecipientPhone()); |
| | | order.setConsigneeAddress(recipient.getProvince()+recipient.getCity()+recipient.getAddress()); |
| | |
| | | if (null != goods.getBasicCount()) { |
| | | number += goods.getBasicCount(); |
| | | } |
| | | number += orderService.getGoodBuyNumber(goods.getId()); |
| | | List<TOrder> list = orderService.list(new QueryWrapper<TOrder>().eq("goodsId", goods.getId())); |
| | | for (TOrder tOrder : list) { |
| | | number+=tOrder.getCount(); |
| | | } |
| | | // 剩余兑换数量 |
| | | Integer residueNumber = null; |
| | | if (null != goods.getTotal()) { |
| | |
| | | if (null != goods.getBasicCount()) { |
| | | number += goods.getBasicCount(); |
| | | } |
| | | number += orderService.getGoodBuyNumber(goods.getId()); |
| | | List<TOrder> list = orderService.list(new QueryWrapper<TOrder>().eq("goodsId", goods.getId())); |
| | | for (TOrder tOrder : list) { |
| | | number+=tOrder.getCount(); |
| | | } |
| | | // 剩余兑换数量 |
| | | Integer residueNumber = null; |
| | | if (null != goods.getTotal()) { |
| | |
| | | @ApiOperationSupport(order = 12) |
| | | public R getGoodsInfo1(@RequestBody OrderDTO dto) { |
| | | TOrder byId = orderService.getById(dto.getId()); |
| | | byId.setUserId(null); |
| | | byId.setState(2); |
| | | byId.setExpress(dto.getExpress()); |
| | | byId.setExpressNumber(dto.getExpressNumber()); |