Browse Source

update 共富制度

tags/v1.9.3
DengBiao 2 years ago
parent
commit
9da0efc87b
2 changed files with 8 additions and 1 deletions
  1. +1
    -1
      rule/public_platoon_relate_commission.go
  2. +7
    -0
      rule/small_public_platoon_relate_commission.go

+ 1
- 1
rule/public_platoon_relate_commission.go View File

@@ -52,7 +52,7 @@ func AddPublicPlatoonRelateCommission(engine *xorm.Engine, AddPublicPlatoonRelat
userPublicPlatoonRelation.UniqueIdentifier = strings.Join(uniqueIdentifier, "-")
userPublicPlatoonRelation.RecommendUid = zhios_order_relate_utils.StrToInt(param.RecommendUid)
userPublicPlatoonRelation.ReturnCommissionNum = 0
userPublicPlatoonRelation.JoinAt = time.Now()
userPublicPlatoonRelation.JoinAt = now
userPublicPlatoonRelation.WaitForSettlementDate = now.AddDate(0, 0, userPublicPlatoonSetting.SettleDay).Format("2006-01-02")
userPublicPlatoonRelation.CreateAt = now
userPublicPlatoonRelation.UpdateAt = now


+ 7
- 0
rule/small_public_platoon_relate_commission.go View File

@@ -49,8 +49,15 @@ func AddSmallPublicPlatoonRelateCommission(engine *xorm.Engine, AddSmallPublicPl
return nil, err
}
if userSmallPublicPlatoonRelation != nil {
now := time.Now()
oldUid := userSmallPublicPlatoonRelation.Uid
userSmallPublicPlatoonRelation.Uid = zhios_order_relate_utils.StrToInt(param.Uid)
userSmallPublicPlatoonRelation.RecommendUid = zhios_order_relate_utils.StrToInt(param.RecommendUid)
userSmallPublicPlatoonRelation.ReturnCommissionNum = 0
userSmallPublicPlatoonRelation.CreateAt = now
userSmallPublicPlatoonRelation.UpdateAt = now
userSmallPublicPlatoonRelation.WaitForSettlementDate = now.AddDate(0, 0, userPublicPlatoonSetting.SettleDay).Format("2006-01-02")
userSmallPublicPlatoonRelation.JoinAt = now
updateAffected, err := db.UserSmallPublicPlatoonRelationUpdate(engine.NewSession(), userSmallPublicPlatoonRelation.Id, userSmallPublicPlatoonRelation)
if err != nil {
return nil, err


Loading…
Cancel
Save