From 751e3545d156b10c0b485e9f34ba09cbf6d7ca1d Mon Sep 17 00:00:00 2001 From: dengbiao Date: Sat, 27 Jul 2024 12:21:13 +0800 Subject: [PATCH 1/2] update --- app/db/dbs_map.go | 2 +- consume/init.go | 2 +- ...y_coin_auto_exchange_green_energy_for_team_consume.go | 2 +- consume/one_circles_sign_in_copy_consume.go | 9 ++++++--- go.mod | 2 +- 5 files changed, 10 insertions(+), 7 deletions(-) diff --git a/app/db/dbs_map.go b/app/db/dbs_map.go index c393fcf..07d12c9 100644 --- a/app/db/dbs_map.go +++ b/app/db/dbs_map.go @@ -111,7 +111,7 @@ func GetAllDatabaseDev() *[]model.DbMapping { if cfg.Local { // 本地调试 加快速度 fmt.Println("notice:LOCAL TEST, only masterId:** 123456 ** available!") err = Db.Where("deleted_at != ? AND is_dev = '1' AND db_master_id= ?", 1, 123456). - Or("db_master_id = ?", 12293740).Find(&m) + Or("db_master_id = ?", 31585332).Find(&m) } else { err = Db.Where("deleted_at != ? AND is_dev = '1' ", 1).Find(&m) } diff --git a/consume/init.go b/consume/init.go index 6d94a62..9081b5b 100644 --- a/consume/init.go +++ b/consume/init.go @@ -93,7 +93,7 @@ func initConsumes() { jobs[consumeMd.OneCirclesActivityCoinAutoExchangeGreenEnergyForTeamFunName] = OneCirclesActivityCoinAutoExchangeGreenEnergyForTeamConsume jobs[consumeMd.OneCirclesSettlementPublicGiveActivityCoinFunName] = OneCirclesSettlementPublicGiveActivityCoinConsume jobs[consumeMd.OneCirclesAddPublicPlatoonUserRelationCommissionFunName] = OneCirclesAddPublicPlatoonUserRelationCommissionConsume - //jobs[consumeMd.OneCirclesSignInUpdateRecordsGreenEnergyFunName] = OneCirclesSignInUpdateRecordsGreenEnergyConsume + jobs[consumeMd.OneCirclesSignInUpdateRecordsGreenEnergyFunName] = OneCirclesSignInUpdateRecordsGreenEnergyConsume //////////////////////////////////////// withdraw ///////////////////////////////////////////////////// //jobs[consumeMd.WithdrawConsumeFunName] = WithdrawConsume diff --git a/consume/one_circles_activity_coin_auto_exchange_green_energy_for_team_consume.go b/consume/one_circles_activity_coin_auto_exchange_green_energy_for_team_consume.go index 7301a81..4330ed8 100644 --- a/consume/one_circles_activity_coin_auto_exchange_green_energy_for_team_consume.go +++ b/consume/one_circles_activity_coin_auto_exchange_green_energy_for_team_consume.go @@ -137,7 +137,7 @@ func handleOneCirclesActivityCoinAutoExchangeGreenEnergyForTeamConsume(msgData [ return err } //4.2减少“原始数量”中的绿色能量 - err = one_circles.DealAvailableGreenEnergyCoin(session, int(enum.TeamActivePointRedemption), utils.StrToFloat64(values), utils.StrToFloat64(msg.AutoExchangeNumsAmount), enum.TeamActivePointRedemption.String(), oneCirclesGreenEnergyBasicSetting, afterPriceValue) + err = one_circles.DealAvailableGreenEnergyCoin(session, int(enum.TeamActivePointRedemption), utils.StrToFloat64(values), utils.StrToFloat64(msg.AutoExchangeNumsAmount), enum.TeamActivePointRedemption.String(), oneCirclesGreenEnergyBasicSetting, afterPriceValue, msg.MasterId) if err != nil { _ = session.Rollback() fmt.Println("err:::::44444", err.Error()) diff --git a/consume/one_circles_sign_in_copy_consume.go b/consume/one_circles_sign_in_copy_consume.go index 3166c03..3d1e770 100644 --- a/consume/one_circles_sign_in_copy_consume.go +++ b/consume/one_circles_sign_in_copy_consume.go @@ -38,11 +38,14 @@ func OneCirclesSignInUpdateRecordsGreenEnergyConsume(queue md.MqQueue) { if ok == true { err = handleOneCirclesSignInUpdateRecordsGreenEnergyConsume(res.Body) if err != nil { + fmt.Println("err ::: ", err) fmt.Println("OneCirclesSignInUpdateRecordsGreenEnergyConsume_ERR:::::", err.Error()) + ////TODO::重新推回队列末尾,避免造成队列堵塞 + //_ = res.Reject(false) + _ = res.Reject(true) + } else { + err = res.Ack(true) } - //_ = res.Reject(false) - err = res.Ack(true) - fmt.Println("err ::: ", err) } else { panic(errors.New("error getting message")) } diff --git a/go.mod b/go.mod index 7ee461f..9688d2f 100644 --- a/go.mod +++ b/go.mod @@ -9,7 +9,7 @@ require ( code.fnuoos.com/go_rely_warehouse/zyos_go_condition_statistics.git v1.1.2-0.20240607091816-3df1433a2f0d code.fnuoos.com/go_rely_warehouse/zyos_go_es.git v1.0.0 code.fnuoos.com/go_rely_warehouse/zyos_go_mq.git v0.0.5 - code.fnuoos.com/go_rely_warehouse/zyos_go_order_relate_rule.git v1.9.10-0.20240726111757-07ae15a5b8fc + code.fnuoos.com/go_rely_warehouse/zyos_go_order_relate_rule.git v1.9.10-0.20240727041818-0d3528790588 code.fnuoos.com/go_rely_warehouse/zyos_go_pay.git v1.6.2-0.20231116085701-9ba6e19f877b code.fnuoos.com/go_rely_warehouse/zyos_go_third_party_api.git v1.1.21-0.20240725031213-6f248783bdec code.fnuoos.com/go_rely_warehouse/zyos_model.git v0.0.4-0.20240726093338-fed880ca12ce From 74e080de1bd479cf7cd95ae5fad8070cea36ab4f Mon Sep 17 00:00:00 2001 From: dengbiao Date: Sat, 27 Jul 2024 12:27:17 +0800 Subject: [PATCH 2/2] update --- ..._circles_activity_coin_auto_exchange_green_energy_consume.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/consume/one_circles_activity_coin_auto_exchange_green_energy_consume.go b/consume/one_circles_activity_coin_auto_exchange_green_energy_consume.go index c933849..1781219 100644 --- a/consume/one_circles_activity_coin_auto_exchange_green_energy_consume.go +++ b/consume/one_circles_activity_coin_auto_exchange_green_energy_consume.go @@ -128,7 +128,7 @@ func handleOneCirclesActivityCoinAutoExchangeGreenEnergyConsume(msgData []byte) } //5减少“原始数量”中的绿色能量 - err = one_circles.DealAvailableGreenEnergyCoin(session, int(enum.PersonalActivePointRedemption), utils.StrToFloat64(values), utils.StrToFloat64(msg.AutoExchangeNumsAmount), enum.PersonalActivePointRedemption.String(), oneCirclesGreenEnergyBasicSetting, afterPriceValue) + err = one_circles.DealAvailableGreenEnergyCoin(session, int(enum.PersonalActivePointRedemption), utils.StrToFloat64(values), utils.StrToFloat64(msg.AutoExchangeNumsAmount), enum.PersonalActivePointRedemption.String(), oneCirclesGreenEnergyBasicSetting, afterPriceValue, msg.MasterId) if err != nil { _ = session.Rollback() fmt.Println("err:::::555555", err.Error())