| | |
| | | package com.oying.modules.message.rest; |
| | | |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.oying.modules.message.common.OrderStatusEnum; |
| | | import com.oying.modules.message.common.PlatFormEnum; |
| | | import com.oying.modules.message.domain.dto.MesMsgRecordQueryCriteria; |
| | | import com.oying.modules.message.domain.myDto.MesMsgRecordQueryOrderDto; |
| | |
| | | } |
| | | |
| | | /* 4. 用店铺id 查询订单消息 */ |
| | | @GetMapping("/order") |
| | | @ApiOperation("用店铺id 查询订单消息") |
| | | public R<List<MesMsgRecordQueryOrderDto>> order(@RequestParam Long shopId) { |
| | | // @GetMapping("/order") |
| | | // @ApiOperation("用店铺id 查询订单消息") |
| | | // public R<List<MesMsgRecordQueryOrderDto>> order(@RequestParam Long shopId) { |
| | | // try { |
| | | // List<MesMsgRecordQueryOrderDto> res = mesMsgRecordService.queryorder(shopId); |
| | | // return R.success(res); |
| | | // } catch (Exception e) { |
| | | // log.error("用店铺id 获取订单消息失败,shopId: {}", shopId, e); |
| | | // return R.fail("用店铺id 获取订单消息失败"); |
| | | // |
| | | // } |
| | | // |
| | | // } |
| | | |
| | | //商户端:买家下单提醒 根据商户id 获取买家下单提醒 |
| | | @GetMapping("/order/pending") |
| | | @ApiOperation("商户端:用店铺id 获取下单订单消息") |
| | | public R<List<MesMsgRecordQueryOrderDto>> getPendingOrders(@RequestParam Long shopId) { |
| | | try { |
| | | List<MesMsgRecordQueryOrderDto> res = mesMsgRecordService.queryorder(shopId); |
| | | String content = OrderStatusEnum.MERCHANT_ORDER_SUBMITTED.getValue(); |
| | | List<MesMsgRecordQueryOrderDto> res = mesMsgRecordService.queryorderPending(shopId, content); |
| | | return R.success(res); |
| | | } catch (Exception e) { |
| | | log.error("用店铺id 获取订单消息失败,shopId: {}", shopId, e); |
| | | return R.fail("用店铺id 获取订单消息失败"); |
| | | |
| | | log.error("用店铺id 获取待处理订单消息失败,shopId: {}", shopId, e); |
| | | return R.fail("用店铺id 获取待处理订单消息失败"); |
| | | } |
| | | } |
| | | |
| | | //商户端:订单送达通知 。 根据商户id 获取买家下订单送达 |
| | | @GetMapping("/order/delivered") |
| | | @ApiOperation("商户端:用店铺id 获取订单送达消息") |
| | | public R<List<MesMsgRecordQueryOrderDto>> getDeliveredOrders(@RequestParam Long shopId) { |
| | | try { |
| | | String content = OrderStatusEnum.BUYER_ORDER_STATUS_CHANGED.getValue(); |
| | | List<MesMsgRecordQueryOrderDto> res = mesMsgRecordService.queryorderPending(shopId, content); |
| | | return R.success(res); |
| | | } catch (Exception e) { |
| | | log.error("用店铺id 获取已送达订单消息失败,shopId: {}", shopId, e); |
| | | return R.fail("用店铺id 获取已送达订单消息失败"); |
| | | } |
| | | } |
| | | |
| | | //买家端:订单状态变化通知 |
| | | @GetMapping("/buyer/order/status") |
| | | @ApiOperation("买家端:获取订单状态变化消息") |
| | | public R<List<MesMsgRecordQueryOrderDto>> getBuyerOrderStatus(@RequestParam Long buyerId) { |
| | | try { |
| | | List<MesMsgRecordQueryOrderDto> res = mesMsgRecordService.queryBuyerOrderMessages(buyerId); |
| | | return R.success(res); |
| | | } catch (Exception e) { |
| | | log.error("买家端获取订单状态变化消息失败,buyerId: {}", buyerId, e); |
| | | return R.fail("获取订单状态变化消息失败"); |
| | | } |
| | | } |
| | | |
| | | //买家端:订单送达通知 |
| | | @GetMapping("/buyer/order/delivered") |
| | | @ApiOperation("买家端:获取订单送达消息") |
| | | public R<List<MesMsgRecordQueryOrderDto>> getBuyerDeliveredOrders(@RequestParam Long buyerId) { |
| | | try { |
| | | List<MesMsgRecordQueryOrderDto> res = mesMsgRecordService.queryBuyerOrderMessagesComplete(buyerId); |
| | | return R.success(res); |
| | | } catch (Exception e) { |
| | | log.error("买家端获取订单送达消息失败,buyerId: {}", buyerId, e); |
| | | return R.fail("获取订单送达消息失败"); |
| | | } |
| | | } |
| | | |
| | | } |