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