| | |
| | | return mesMsgRecordMapper.queryorder(shopId); |
| | | } |
| | | |
| | | // @Override |
| | | // @Transactional(rollbackFor = Exception.class) |
| | | // public void insertOrderMsg(String orderNo, MsgStatusEnum content, Long shopId) { |
| | | // MesMsgRecord record = new MesMsgRecord(); |
| | | // record.setOrderNo(orderNo); |
| | | // record.setContent(content.getValue()); // 使用枚举的描述作为消息内容 |
| | | // record.setContentKey(String.valueOf(content.getKey()));// 使用枚举的描述作为消息内容key |
| | | // record.setShopId(shopId); |
| | | // record.setMsgType(MesTypeEnum.ORDER.getKey()); // 订单消息类型为2 |
| | | // record.setIsRead(MesReadEnum.UNREAD.getKey()); // 默认未读 0 |
| | | // record.setCreateTime(new Timestamp(System.currentTimeMillis())); |
| | | // record.setUpdateTime(new Timestamp(System.currentTimeMillis())); |
| | | // mesMsgRecordMapper.insert(record); // 让异常直接往外抛 |
| | | // |
| | | // } |
| | | |
| | | |
| | | @Override |
| | | public List<MesMsgRecordQueryPollDto> PollMesAll(Long platform) { |
| | | return mesMsgRecordMapper.PollMesAll(platform); |
| | |
| | | record.setShopId(order.getStoreId()); |
| | | record.setMsgType(typeEnum.getKey()); // 订单消息类型为2 |
| | | record.setIsRead(MesReadEnum.UNREAD.getKey()); // 默认未读 0 |
| | | record.setCreateTime(new Timestamp(System.currentTimeMillis())); |
| | | record.setUpdateTime(new Timestamp(System.currentTimeMillis())); |
| | | mesMsgRecordMapper.insert(record); |
| | | } |
| | | |
| | |
| | | public void setBuyerStatusOrderSubmitted(String buyerId, String buyerName, String orderNo, Long shopId, String riderId, String riderName) { |
| | | MesMsgRecord record = new MesMsgRecord(); |
| | | record.setOrderNo(orderNo); |
| | | record.setContent(MsgStatusEnum.MERCHANT_ORDER_SUBMITTED.getValue()); // 使用枚举的描述作为消息内容 |
| | | record.setContentKey(String.valueOf(MsgStatusEnum.MERCHANT_ORDER_SUBMITTED.getKey()));// 使用枚举的描述作为消息内容key |
| | | record.setContent(MsgStatusEnum.MERCHANT_ACCEPTED.getValue()); // 使用枚举的描述作为消息内容 |
| | | record.setContentKey(String.valueOf(MsgStatusEnum.MERCHANT_ACCEPTED.getKey()));// 使用枚举的描述作为消息内容key |
| | | record.setBuyerId(buyerId != null ? buyerId : ""); // 处理空值情况 |
| | | record.setMsgType(MesTypeEnum.ORDER.getKey()); // 订单消息类型为2 |
| | | record.setIsRead(MesReadEnum.UNREAD.getKey()); // 默认未读 0 |
| | |
| | | public void setBuyerStatusOrderDelivered(String buyerId, String buyerName, String orderNo, Long shopId, String riderId, String riderName) { |
| | | MesMsgRecord record = new MesMsgRecord(); |
| | | record.setOrderNo(orderNo); |
| | | record.setContent(MsgStatusEnum.BUYER_ORDER_STATUS_CHANGED.getValue()); // 使用枚举的描述作为消息内容 |
| | | record.setContentKey(String.valueOf(MsgStatusEnum.BUYER_ORDER_STATUS_CHANGED.getKey()));// 使用枚举的描述作为消息内容key |
| | | record.setContent(MsgStatusEnum.BUYER_ORDER_DELIVERED.getValue()); // 使用枚举的描述作为消息内容 |
| | | record.setContentKey(String.valueOf(MsgStatusEnum.BUYER_ORDER_DELIVERED.getKey()));// 使用枚举的描述作为消息内容key |
| | | record.setBuyerId(buyerId != null ? buyerId : ""); // 处理空值情况 |
| | | record.setMsgType(MesTypeEnum.ORDER.getKey()); // 订单消息类型为2 |
| | | record.setIsRead(MesReadEnum.UNREAD.getKey()); // 默认未读 0 |
| | |
| | | public void setBuyerStatusOrderDelivered(String buyerId, String buyerName, String orderNo, Long shopId, MsgStatusEnum content, String riderId, String riderName) { |
| | | //content只能设置为如下 "商品已送达" "订单已完成" "订单送达" |
| | | if (content == null || |
| | | (!content.equals(MsgStatusEnum.BUYER_ORDER_STATUS_CHANGED) && |
| | | ( |
| | | !content.equals(MsgStatusEnum.BUYER_ORDER_COMPLETED) && |
| | | !content.equals(MsgStatusEnum.BUYER_ORDER_DELIVERED))) { |
| | | !content.equals(MsgStatusEnum.BUYER_ORDER_DELIVERED))) { |
| | | throw new IllegalArgumentException("content只能设置为如下 \"商品已送达\" \"订单已完成\" \"订单送达\""); |
| | | } |
| | | MesMsgRecord record = new MesMsgRecord(); |
| | |
| | | public void setSellerStatusOrderDelivered(String buyerId, String buyerName, String orderNo, Long shopId, MsgStatusEnum content, String riderId, String riderName) { |
| | | //content只能为 "订单已提交" "商家已接单" 商家已备货" |
| | | if (content == null || |
| | | (content != MsgStatusEnum.MERCHANT_ORDER_SUBMITTED && |
| | | ( |
| | | content != MsgStatusEnum.MERCHANT_ACCEPTED && |
| | | content != MsgStatusEnum.MERCHANT_PREPARED)) { |
| | | content != MsgStatusEnum.MERCHANT_PREPARED)) { |
| | | throw new IllegalArgumentException("content只能为 \"订单已提交\" \"商家已接单\" 商家已备货\""); |
| | | } |
| | | MesMsgRecord record = new MesMsgRecord(); |