|
@@ -32,7 +32,7 @@ func ZhiosOrderHjy(queue md.MqQueue) { |
|
|
//1、将自己绑定到交换机上 |
|
|
//1、将自己绑定到交换机上 |
|
|
ch.Bind(queue.Name, queue.ExchangeName, queue.RoutKey) |
|
|
ch.Bind(queue.Name, queue.ExchangeName, queue.RoutKey) |
|
|
//2、取出数据进行消费 |
|
|
//2、取出数据进行消费 |
|
|
ch.Qos(100) |
|
|
|
|
|
|
|
|
ch.Qos(1000) |
|
|
delivery := ch.Consume(queue.Name, false) |
|
|
delivery := ch.Consume(queue.Name, false) |
|
|
|
|
|
|
|
|
var res amqp.Delivery |
|
|
var res amqp.Delivery |
|
@@ -159,14 +159,16 @@ func handleZhiosOrderHjy(msg []byte) error { |
|
|
return nil |
|
|
return nil |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
if ordData.State != 1 && ordData.State != 3 { |
|
|
|
|
|
|
|
|
if ordData.State == 5 { |
|
|
sess.Commit() |
|
|
sess.Commit() |
|
|
return nil |
|
|
return nil |
|
|
} |
|
|
} |
|
|
isSettle, settleTime := GetHjyOrderCommission(eg, canalMsg.Mid, utils.IntToStr(ordData.HjyOid)) |
|
|
|
|
|
if isSettle == "1" { |
|
|
|
|
|
ordData.State = 5 |
|
|
|
|
|
ordData.SettleAt = int(utils.TimeStdParseUnix(settleTime)) |
|
|
|
|
|
|
|
|
if ordData.State == 1 || ordData.State == 3 { |
|
|
|
|
|
isSettle, settleTime := GetHjyOrderCommission(eg, canalMsg.Mid, utils.IntToStr(ordData.HjyOid)) |
|
|
|
|
|
if isSettle == "1" { |
|
|
|
|
|
ordData.State = 5 |
|
|
|
|
|
ordData.SettleAt = int(utils.TimeStdParseUnix(settleTime)) |
|
|
|
|
|
} |
|
|
} |
|
|
} |
|
|
fmt.Println(ordData) |
|
|
fmt.Println(ordData) |
|
|
//加入分佣关系链 |
|
|
//加入分佣关系链 |
|
|