@@ -111,7 +111,7 @@ func GetAllDatabaseDev() *[]model.DbMapping { | |||||
if cfg.Local { // 本地调试 加快速度 | if cfg.Local { // 本地调试 加快速度 | ||||
fmt.Println("notice:LOCAL TEST, only masterId:** 123456 ** available!") | fmt.Println("notice:LOCAL TEST, only masterId:** 123456 ** available!") | ||||
err = Db.Where("deleted_at != ? AND is_dev = '1' AND db_master_id= ?", 1, 123456). | 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 { | } else { | ||||
err = Db.Where("deleted_at != ? AND is_dev = '1' ", 1).Find(&m) | err = Db.Where("deleted_at != ? AND is_dev = '1' ", 1).Find(&m) | ||||
} | } | ||||
@@ -86,14 +86,13 @@ func initConsumes() { | |||||
//jobs[consumeMd.CanalB2cOrderForNumericalStatementConsumeFunName] = CanalB2cOrderForNumericalStatementConsume | //jobs[consumeMd.CanalB2cOrderForNumericalStatementConsumeFunName] = CanalB2cOrderForNumericalStatementConsume | ||||
//////////////////////////////////////// oneCircles ///////////////////////////////////////////////////// | //////////////////////////////////////// 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 ///////////////////////////////////////////////////// | //////////////////////////////////////// withdraw ///////////////////////////////////////////////////// | ||||
//jobs[consumeMd.WithdrawConsumeFunName] = WithdrawConsume | //jobs[consumeMd.WithdrawConsumeFunName] = WithdrawConsume | ||||
@@ -107,8 +106,8 @@ func initConsumes() { | |||||
//jobs[consumeMd.InstallmentPaymentAutoRepaidConsumeFunName] = InstallmentPaymentAutoRepaidConsume //分期付 - 自动扣款 | //jobs[consumeMd.InstallmentPaymentAutoRepaidConsumeFunName] = InstallmentPaymentAutoRepaidConsume //分期付 - 自动扣款 | ||||
////////////////////////////////////// SuperCloudIssuance ///////////////////////////////////////////////////// | ////////////////////////////////////// SuperCloudIssuance ///////////////////////////////////////////////////// | ||||
jobs[consumeMd.SuperCloudIssuanceMsgCallBackFunName] = SuperCloudIssuanceMsgCallBackConsume | |||||
jobs[consumeMd.SuperCloudIssuanceAsyncMLoginFunName] = SuperCloudIssuanceAsyncMLoginConsume | |||||
//jobs[consumeMd.SuperCloudIssuanceMsgCallBackFunName] = SuperCloudIssuanceMsgCallBackConsume | |||||
//jobs[consumeMd.SuperCloudIssuanceAsyncMLoginFunName] = SuperCloudIssuanceAsyncMLoginConsume | |||||
////////////////////////////////////// DMS ///////////////////////////////////////////////////// | ////////////////////////////////////// DMS ///////////////////////////////////////////////////// | ||||
//jobs[consumeMd.CanalGimMessageConsumeFunName] = CanalGimMessageConsume | //jobs[consumeMd.CanalGimMessageConsumeFunName] = CanalGimMessageConsume | ||||
@@ -128,7 +128,7 @@ func handleOneCirclesActivityCoinAutoExchangeGreenEnergyConsume(msgData []byte) | |||||
} | } | ||||
//5减少“原始数量”中的绿色能量 | //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 { | if err != nil { | ||||
_ = session.Rollback() | _ = session.Rollback() | ||||
fmt.Println("err:::::555555", err.Error()) | fmt.Println("err:::::555555", err.Error()) | ||||
@@ -137,7 +137,7 @@ func handleOneCirclesActivityCoinAutoExchangeGreenEnergyForTeamConsume(msgData [ | |||||
return err | return err | ||||
} | } | ||||
//4.2减少“原始数量”中的绿色能量 | //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 { | if err != nil { | ||||
_ = session.Rollback() | _ = session.Rollback() | ||||
fmt.Println("err:::::44444", err.Error()) | fmt.Println("err:::::44444", err.Error()) | ||||
@@ -38,11 +38,14 @@ func OneCirclesSignInUpdateRecordsGreenEnergyConsume(queue md.MqQueue) { | |||||
if ok == true { | if ok == true { | ||||
err = handleOneCirclesSignInUpdateRecordsGreenEnergyConsume(res.Body) | err = handleOneCirclesSignInUpdateRecordsGreenEnergyConsume(res.Body) | ||||
if err != nil { | if err != nil { | ||||
fmt.Println("err ::: ", err) | |||||
fmt.Println("OneCirclesSignInUpdateRecordsGreenEnergyConsume_ERR:::::", err.Error()) | 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 { | } else { | ||||
panic(errors.New("error getting message")) | panic(errors.New("error getting message")) | ||||
} | } | ||||
@@ -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_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_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_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_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_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 | code.fnuoos.com/go_rely_warehouse/zyos_model.git v0.0.4-0.20240726093338-fed880ca12ce | ||||