Merge remote-tracking branch 'origin/test' into test
This commit is contained in:
commit
4edaecf89c
|
|
@ -2,10 +2,11 @@ package cn.ysk.cashier.dto;
|
|||
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
@Data
|
||||
public class CallNumPrintDTO {
|
||||
private Integer callQueueId;
|
||||
private Integer shopId;
|
||||
|
||||
private Long currentUserId;
|
||||
private String currentUserName;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -54,6 +54,7 @@ public class RabbitMsgUtils implements RabbitTemplate.ConfirmCallback {
|
|||
jsonObject.put("orderId", orderId);
|
||||
jsonObject.put("orderDetailIds", orderIds);
|
||||
jsonObject.put("isReturn", true);
|
||||
buildCurrentUserInfo(jsonObject);
|
||||
sendMsg(RabbitConstants.EXCHANGE_PRINT, RabbitConstants.ROUTING_KEY_PRINT_DISHES, jsonObject, "菜品退单", true);
|
||||
}
|
||||
|
||||
|
|
@ -62,6 +63,7 @@ public class RabbitMsgUtils implements RabbitTemplate.ConfirmCallback {
|
|||
jsonObject.put("orderId", orderId);
|
||||
jsonObject.put("orderDetailIds", detailOrderIds);
|
||||
jsonObject.put("isReturn", isReturn);
|
||||
buildCurrentUserInfo(jsonObject);
|
||||
sendMsg(RabbitConstants.EXCHANGE_PRINT, RabbitConstants.ROUTING_KEY_PRINT_DISHES, jsonObject, "菜品打印", true);
|
||||
}
|
||||
|
||||
|
|
@ -69,6 +71,7 @@ public class RabbitMsgUtils implements RabbitTemplate.ConfirmCallback {
|
|||
JSONObject jsonObject = new JSONObject();
|
||||
jsonObject.put("orderId", id);
|
||||
jsonObject.put("isReturn", isReturn);
|
||||
buildCurrentUserInfo(jsonObject);
|
||||
sendMsg(RabbitConstants.EXCHANGE_PRINT, RabbitConstants.ROUTING_KEY_PRINT_PLACE, jsonObject, "订单打印", true);
|
||||
|
||||
}
|
||||
|
|
@ -77,6 +80,12 @@ public class RabbitMsgUtils implements RabbitTemplate.ConfirmCallback {
|
|||
CallNumPrintDTO printDTO = new CallNumPrintDTO();
|
||||
printDTO.setCallQueueId(callQueueId);
|
||||
printDTO.setShopId(shopId);
|
||||
try {
|
||||
printDTO.setCurrentUserId(SecurityUtils.getCurrentUserId());
|
||||
printDTO.setCurrentUserName(SecurityUtils.getCurrentUsername());
|
||||
}catch (Exception e){
|
||||
log.error("获取当前用户信息失败", e);
|
||||
}
|
||||
sendMsg(RabbitConstants.EXCHANGE_PRINT, RabbitConstants.ROUTING_KEY_CALL_TABLE, printDTO, "排号小票打印", true);
|
||||
}
|
||||
|
||||
|
|
@ -88,4 +97,13 @@ public class RabbitMsgUtils implements RabbitTemplate.ConfirmCallback {
|
|||
sendMsg(RabbitConstants.EXCHANGE_CONS, RabbitConstants.ROUTING_KEY_CONS, jsonObject1, "储值卡记录", true);
|
||||
|
||||
}
|
||||
|
||||
public void buildCurrentUserInfo(JSONObject jsonObject){
|
||||
try {
|
||||
jsonObject.put("currentUserId", SecurityUtils.getCurrentUserId());
|
||||
jsonObject.put("currentUserName", SecurityUtils.getCurrentUsername());
|
||||
}catch (Exception e){
|
||||
log.error("获取当前用户信息失败", e);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue