|
@@ -44,9 +44,17 @@ func ZhiosFastReturnOrderPay(queue md.MqQueue) { |
|
|
if err == nil { |
|
|
if err == nil { |
|
|
_ = res.Ack(true) |
|
|
_ = res.Ack(true) |
|
|
} else { |
|
|
} else { |
|
|
var msg *md.ZhiosFatReturnOrderPay |
|
|
|
|
|
json.Unmarshal(res.Body, &msg) |
|
|
|
|
|
ch.Publish(queue.ExchangeName, msg, queue.RoutKey) |
|
|
|
|
|
|
|
|
var canalMsg *md.ZhiosFatReturnOrderPay |
|
|
|
|
|
var tmpString string |
|
|
|
|
|
err := json.Unmarshal(res.Body, &tmpString) |
|
|
|
|
|
if err == nil { |
|
|
|
|
|
fmt.Println(tmpString) |
|
|
|
|
|
err = json.Unmarshal([]byte(tmpString), &canalMsg) |
|
|
|
|
|
if err == nil { |
|
|
|
|
|
ch.Publish(queue.ExchangeName, utils.SerializeStr(canalMsg), queue.RoutKey) |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
} |
|
|
} |
|
|
} else { |
|
|
} else { |
|
|
panic(errors.New("error getting message")) |
|
|
panic(errors.New("error getting message")) |
|
|