Browse Source

update

master
dengbiao 5 days ago
parent
commit
0d49358106
2 changed files with 26 additions and 20 deletions
  1. +24
    -18
      consume/add_public_platoon_user_relation_commission.go
  2. +2
    -2
      go.mod

+ 24
- 18
consume/add_public_platoon_user_relation_commission.go View File

@@ -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
}

+ 2
- 2
go.mod View File

@@ -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


Loading…
Cancel
Save