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 e4292b0..8a51219 100644 --- a/consume/init.go +++ b/consume/init.go @@ -86,14 +86,13 @@ func initConsumes() { //jobs[consumeMd.CanalB2cOrderForNumericalStatementConsumeFunName] = CanalB2cOrderForNumericalStatementConsume //////////////////////////////////////// oneCircles ///////////////////////////////////////////////////// - - //jobs[consumeMd.OneCirclesSignInGreenEnergyFunName] = OneCirclesSignInGreenEnergyConsume - //jobs[consumeMd.OneCirclesStartLevelDividendFunName] = OneCirclesStartLevelDividendConsume - //jobs[consumeMd.OneCirclesActivityCoinAutoExchangeGreenEnergyFunName] = OneCirclesActivityCoinAutoExchangeGreenEnergyConsume - //jobs[consumeMd.OneCirclesActivityCoinAutoExchangeGreenEnergyForTeamFunName] = OneCirclesActivityCoinAutoExchangeGreenEnergyForTeamConsume - //jobs[consumeMd.OneCirclesSettlementPublicGiveActivityCoinFunName] = OneCirclesSettlementPublicGiveActivityCoinConsume - //jobs[consumeMd.OneCirclesAddPublicPlatoonUserRelationCommissionFunName] = OneCirclesAddPublicPlatoonUserRelationCommissionConsume - ////jobs[consumeMd.OneCirclesSignInUpdateRecordsGreenEnergyFunName] = OneCirclesSignInUpdateRecordsGreenEnergyConsume + jobs[consumeMd.OneCirclesSignInGreenEnergyFunName] = OneCirclesSignInGreenEnergyConsume + jobs[consumeMd.OneCirclesStartLevelDividendFunName] = OneCirclesStartLevelDividendConsume + jobs[consumeMd.OneCirclesActivityCoinAutoExchangeGreenEnergyFunName] = OneCirclesActivityCoinAutoExchangeGreenEnergyConsume + jobs[consumeMd.OneCirclesActivityCoinAutoExchangeGreenEnergyForTeamFunName] = OneCirclesActivityCoinAutoExchangeGreenEnergyForTeamConsume + jobs[consumeMd.OneCirclesSettlementPublicGiveActivityCoinFunName] = OneCirclesSettlementPublicGiveActivityCoinConsume + jobs[consumeMd.OneCirclesAddPublicPlatoonUserRelationCommissionFunName] = OneCirclesAddPublicPlatoonUserRelationCommissionConsume + jobs[consumeMd.OneCirclesSignInUpdateRecordsGreenEnergyFunName] = OneCirclesSignInUpdateRecordsGreenEnergyConsume //////////////////////////////////////// withdraw ///////////////////////////////////////////////////// //jobs[consumeMd.WithdrawConsumeFunName] = WithdrawConsume @@ -107,8 +106,8 @@ func initConsumes() { //jobs[consumeMd.InstallmentPaymentAutoRepaidConsumeFunName] = InstallmentPaymentAutoRepaidConsume //分期付 - 自动扣款 ////////////////////////////////////// SuperCloudIssuance ///////////////////////////////////////////////////// - jobs[consumeMd.SuperCloudIssuanceMsgCallBackFunName] = SuperCloudIssuanceMsgCallBackConsume - jobs[consumeMd.SuperCloudIssuanceAsyncMLoginFunName] = SuperCloudIssuanceAsyncMLoginConsume + //jobs[consumeMd.SuperCloudIssuanceMsgCallBackFunName] = SuperCloudIssuanceMsgCallBackConsume + //jobs[consumeMd.SuperCloudIssuanceAsyncMLoginFunName] = SuperCloudIssuanceAsyncMLoginConsume ////////////////////////////////////// DMS ///////////////////////////////////////////////////// //jobs[consumeMd.CanalGimMessageConsumeFunName] = CanalGimMessageConsume 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()) 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 eb2e54b..5553dda 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.20240726151134-db88648c83ef code.fnuoos.com/go_rely_warehouse/zyos_model.git v0.0.4-0.20240726093338-fed880ca12ce