|
@ -17,6 +17,139 @@ type MsgSend struct { |
|
|
Result string |
|
|
Result string |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
//订单路由
|
|
|
|
|
|
const ORDER_EXCHANGE string = "ex_order" |
|
|
|
|
|
|
|
|
|
|
|
//已创建订单route key
|
|
|
|
|
|
const ORDER_CREATED_KEY string = "created" |
|
|
|
|
|
|
|
|
|
|
|
//订单已创建队列,订单服务用
|
|
|
|
|
|
const ORDER_CREATED_QUEUE = "order_created_queue" |
|
|
|
|
|
|
|
|
|
|
|
//已创建订单队列,串货服务用
|
|
|
|
|
|
const CHANNEL_ORDER_CREATED_QUEUE = "channel_order_created_queue" |
|
|
|
|
|
|
|
|
|
|
|
//已支付订单route key
|
|
|
|
|
|
const ORDER_PAYED_KEY string = "payed" |
|
|
|
|
|
|
|
|
|
|
|
//订单已支付队列,订单服务用
|
|
|
|
|
|
const ORDER_PAYED_QUEUE = "order_payed_queue" |
|
|
|
|
|
|
|
|
|
|
|
//订单已支付队列,串货服务用
|
|
|
|
|
|
const CHANNEL_ORDER_PAYED_QUEUE = "channel_order_payed_queue" |
|
|
|
|
|
|
|
|
|
|
|
//订单已支付队列,配送服务用
|
|
|
|
|
|
const DELIVERY_ORDER_PAYED_QUEUE = "delivery_order_payed_queue" |
|
|
|
|
|
|
|
|
|
|
|
//订单已支付队列,打印服务用
|
|
|
|
|
|
const PRINT_ORDER_PAYED_QUEUE = "print_order_payed_queue" |
|
|
|
|
|
|
|
|
|
|
|
//订单状态更新route key
|
|
|
|
|
|
const ORDER_STATUS_CHANGE_KEY string = "status_change" |
|
|
|
|
|
|
|
|
|
|
|
//订单状态更新队列,订单服务用
|
|
|
|
|
|
const ORDER_STATUS_UPDATE_QUEUE = "order_status_update_queue" |
|
|
|
|
|
|
|
|
|
|
|
//订单状态更新,串货服务用
|
|
|
|
|
|
const CHANNEL_ORDER_STATUS_CHANGE_QUEUE = "channel_order_update_status" |
|
|
|
|
|
|
|
|
|
|
|
//订单取消route key
|
|
|
|
|
|
const ORDER_CANCELED_KEY string = "canceled" |
|
|
|
|
|
|
|
|
|
|
|
//订单取消队列,订单服务用
|
|
|
|
|
|
const ORDER_CANCELED_QUEUE = "order_canceled_queue" |
|
|
|
|
|
|
|
|
|
|
|
//订单取消队列,串货服务用
|
|
|
|
|
|
const CHANNEL_ORDER_CANCELED_QUEUE = "channel_order_canceled_queue" |
|
|
|
|
|
|
|
|
|
|
|
//订单发货route key
|
|
|
|
|
|
const ORDER_DELIVERED_KEY string = "delivered" |
|
|
|
|
|
|
|
|
|
|
|
//订单发货队列,订单服务用
|
|
|
|
|
|
const ORDER_DELIVERED_QUEUE = "order_delivered_queue" |
|
|
|
|
|
|
|
|
|
|
|
//订单发货队列,串货服务用
|
|
|
|
|
|
const CHANNEL_ORDER_DELIVERED_QUEUE = "channel_order_delivered_queue" |
|
|
|
|
|
|
|
|
|
|
|
//订单收货route key
|
|
|
|
|
|
const ORDER_RECEIVED_KEY string = "received" |
|
|
|
|
|
|
|
|
|
|
|
//订单取消队列,订单服务用
|
|
|
|
|
|
const ORDER_RECEIVED_QUEUE = "order_received_queue" |
|
|
|
|
|
|
|
|
|
|
|
//订单取消队列,串货服务用
|
|
|
|
|
|
const CHANNEL_ORDER_RECEIVED_QUEUE = "channel_order_received_queue" |
|
|
|
|
|
|
|
|
|
|
|
//订单退款route key
|
|
|
|
|
|
const ORDER_REFUNDED_KEY string = "refunded" |
|
|
|
|
|
|
|
|
|
|
|
//订单退款队列,订单服务用
|
|
|
|
|
|
const ORDER_REFUNDED_QUEUE = "order_refunded_queue" |
|
|
|
|
|
|
|
|
|
|
|
//订单退款队列,串货服务用
|
|
|
|
|
|
const CHANNEL_ORDER_REFUNDED_QUEUE = "channel_order_refunded_queue" |
|
|
|
|
|
|
|
|
|
|
|
//订单完成route key
|
|
|
|
|
|
const ORDER_FINISHED_KEY string = "finished" |
|
|
|
|
|
|
|
|
|
|
|
//订单退款队列,订单服务用
|
|
|
|
|
|
const ORDER_FINISHED_QUEUE = "order_finished_queue" |
|
|
|
|
|
|
|
|
|
|
|
//订单退款队列,串货服务用
|
|
|
|
|
|
const CHANNEL_ORDER_FINISHED_QUEUE = "channel_order_finished_queue" |
|
|
|
|
|
|
|
|
|
|
|
//订单等待创建key,订单服务用
|
|
|
|
|
|
const ORDER_ADD_KEY = "add" |
|
|
|
|
|
|
|
|
|
|
|
//订单等待创建队列,订单服务用
|
|
|
|
|
|
const ORDER_ADD_QUEUE = "order_add_queue" |
|
|
|
|
|
|
|
|
|
|
|
//订单核销key
|
|
|
|
|
|
const ORDER_VERIFY_KEY = "verify" |
|
|
|
|
|
|
|
|
|
|
|
//订单核销打印队列,打印服务用
|
|
|
|
|
|
const PRINT_ORDER_VERIFY_QUEUE = "print_order_verify_queue" |
|
|
|
|
|
|
|
|
|
|
|
//订单延迟队列路由
|
|
|
|
|
|
const ORDER_DELAY_EXCHANGE string = "ex_order_delay" |
|
|
|
|
|
|
|
|
|
|
|
//未支付订单过期自动取消key
|
|
|
|
|
|
const ORDER_AUTO_CANCEL_KEY string = "order_auto_cancel" |
|
|
|
|
|
|
|
|
|
|
|
//未支付订单过期自动取消队列
|
|
|
|
|
|
const ORDER_AUTO_CANCEL_QUEUE string = "order_auto_cancel_queue" |
|
|
|
|
|
|
|
|
|
|
|
//未支付订单过期自动取消队列,串货服务用
|
|
|
|
|
|
const CHANNEL_ORDER_AUTO_CANCEL_QUEUE string = "channel_order_auto_cancel_queue" |
|
|
|
|
|
|
|
|
|
|
|
//订单发货后到期自动收货key
|
|
|
|
|
|
const ORDER_AUTO_RECEIVE_KEY string = "order_auto_received" |
|
|
|
|
|
|
|
|
|
|
|
//订单发货后到期自动收货队列
|
|
|
|
|
|
const ORDER_AUTO_RECEIVE_QUEUE string = "order_auto_receive_queue" |
|
|
|
|
|
|
|
|
|
|
|
//订单自动收货队列,串货服务用
|
|
|
|
|
|
const CHANNEL_ORDER_AUTO_RECEIVE_QUEUE string = "channel_order_auto_receive_queue" |
|
|
|
|
|
|
|
|
|
|
|
//订单申请退款消息key
|
|
|
|
|
|
const ORDER_ASK_FOR_REFUND_KEY string = "order_ask_for_refund" |
|
|
|
|
|
|
|
|
|
|
|
//订单申请退款消息队列
|
|
|
|
|
|
const ORDER_ASK_FOR_REFUND_QUEUE string = "order_ask_for_refund_queue" |
|
|
|
|
|
|
|
|
|
|
|
//订单申请退款队列,串货服务用
|
|
|
|
|
|
const CHANNEL_ORDER_ASK_FOR_REFUND_QUEUE string = "channel_order_ask_for_refund_queue" |
|
|
|
|
|
|
|
|
|
|
|
// --串货--
|
|
|
|
|
|
//串货订单路由
|
|
|
|
|
|
const CHANNEL_ORDER_EXCHANGE string = "ex_channel_order" |
|
|
|
|
|
|
|
|
|
|
|
//串货订单请求支付route key
|
|
|
|
|
|
const CHANNEL_ORDER_ASKPAY_KEY = "channel_order_askpay" |
|
|
|
|
|
|
|
|
|
|
|
//订单请求支付队列,串货服务用
|
|
|
|
|
|
const CHANNEL_ORDER_ASKPAY_QUEUE = "channel_order_askpay_queue" |
|
|
|
|
|
|
|
|
func rpc_server_conn(url ...string) (*RabbitmqServiceClient, error) { |
|
|
func rpc_server_conn(url ...string) (*RabbitmqServiceClient, error) { |
|
|
|
|
|
|
|
|
var wx_rpc_url string = "127.0.0.1:7955" |
|
|
var wx_rpc_url string = "127.0.0.1:7955" |
|
|