From 4ad1432b1ee4b0a182b6cca76af150707f8816ec Mon Sep 17 00:00:00 2001 From: huangjiajun <582604932@qq.com> Date: Wed, 20 Dec 2023 18:50:45 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- consume/zhios_order_hjy.go | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/consume/zhios_order_hjy.go b/consume/zhios_order_hjy.go index 8f9813e..ae8c13f 100644 --- a/consume/zhios_order_hjy.go +++ b/consume/zhios_order_hjy.go @@ -164,12 +164,20 @@ func handleZhiosOrderHjy(msg []byte) error { return nil } 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)) + if int64(ordData.ConfirmAt) >= utils.TimeStdParseUnix("2023-11-01 00:00:00") { + isSettle, settleTime := GetHjyOrderCommission(eg, canalMsg.Mid, utils.IntToStr(ordData.HjyOid)) + if isSettle == "1" { + ordData.State = 5 + ordData.SettleAt = int(utils.TimeStdParseUnix(settleTime)) + } } + } + if int64(ordData.ConfirmAt) < utils.TimeStdParseUnix("2023-11-01 00:00:00") { + ordData.State = 5 + ordData.SettleAt = ordData.ConfirmAt + } + fmt.Println(ordData) //加入分佣关系链 opts, commissionOpts, _ := svc.GetAllPlan(eg, canalMsg.Mid)