diff --git a/consume/add_public_platoon_user_relation_commission.go b/consume/add_public_platoon_user_relation_commission.go index 4d946d5..2d96ed3 100644 --- a/consume/add_public_platoon_user_relation_commission.go +++ b/consume/add_public_platoon_user_relation_commission.go @@ -85,25 +85,31 @@ func handleAddPublicPlatoonUserRelationCommissionConsume(msgData []byte) error { return err } if eggEnergyBasicSetting != nil { - var newUserRewardRules *md2.NewUserRewardRules - err = json.Unmarshal([]byte(eggEnergyBasicSetting.NewUserIncentiveRules), &newUserRewardRules) - if err != nil { - fmt.Println("handleAddPublicPlatoonUserRelationCommissionConsume___ERR>>>>", err.Error()) - } - rewardValue := newUserRewardRules.InviteUserRewardValue - session := db.Db.NewSession() - err = rule.DealUserVirtualCoin(session, md3.DealUserVirtualCoinReq{ - Kind: "add", - Title: enum.UserVirtualAmountFlowTransferType.String(enum.EggEnergyRecruitNewUsersReward), - TransferType: int(enum.EggEnergyRecruitNewUsersReward), - CoinId: eggEnergyBasicSetting.PersonEggPointsCoinId, - Uid: utils.StrToInt64(msg.RecommendUid), - Amount: float64(rewardValue), - }) - if err != nil { - return err + userDeleteInfoDb := implement.NewUserDeleteInfoDb(db.Db) + fmt.Println("userDelete>>>>>>>>>>>>>>>", msg.Phone) + userDelete := userDeleteInfoDb.GetUserDeleteInfo(msg.Phone) + fmt.Println("userDelete>>>>>>>>>>>>>>>", userDelete) + if userDelete == nil { + var newUserRewardRules *md2.NewUserRewardRules + err = json.Unmarshal([]byte(eggEnergyBasicSetting.NewUserIncentiveRules), &newUserRewardRules) + if err != nil { + fmt.Println("handleAddPublicPlatoonUserRelationCommissionConsume___ERR>>>>", err.Error()) + } + rewardValue := newUserRewardRules.InviteUserRewardValue + session := db.Db.NewSession() + err = rule.DealUserVirtualCoin(session, md3.DealUserVirtualCoinReq{ + Kind: "add", + Title: enum.UserVirtualAmountFlowTransferType.String(enum.EggEnergyRecruitNewUsersReward), + TransferType: int(enum.EggEnergyRecruitNewUsersReward), + CoinId: eggEnergyBasicSetting.PersonEggPointsCoinId, + Uid: utils.StrToInt64(msg.RecommendUid), + Amount: float64(rewardValue), + }) + if err != nil { + return err + } + session.Commit() } - session.Commit() } return nil } diff --git a/go.mod b/go.mod index 4088164..fe7a0da 100644 --- a/go.mod +++ b/go.mod @@ -7,8 +7,8 @@ go 1.19 // replace code.fnuoos.com/EggPlanet/egg_system_rules.git => E:/company/Egg/egg_system_rules require ( - code.fnuoos.com/EggPlanet/egg_models.git v0.2.1-0.20250103030157-3dd56831ac87 - code.fnuoos.com/EggPlanet/egg_system_rules.git v0.0.4-0.20250102013515-7dc14a5d08f2 + code.fnuoos.com/EggPlanet/egg_models.git v0.2.1-0.20250103070955-c99c05f090ab + code.fnuoos.com/EggPlanet/egg_system_rules.git v0.0.4-0.20250103065342-d24e5cb92e4b code.fnuoos.com/go_rely_warehouse/zyos_go_es.git v1.0.1-0.20241118083738-0f22da9ba0be code.fnuoos.com/go_rely_warehouse/zyos_go_mq.git v0.0.5 github.com/boombuler/barcode v1.0.1