From 9da0efc87be3c7988818843a672db4037c0c9530 Mon Sep 17 00:00:00 2001 From: DengBiao <2319963317@qq.com> Date: Mon, 22 Aug 2022 21:58:25 +0800 Subject: [PATCH] =?UTF-8?q?update=20=E5=85=B1=E5=AF=8C=E5=88=B6=E5=BA=A6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- rule/public_platoon_relate_commission.go | 2 +- rule/small_public_platoon_relate_commission.go | 7 +++++++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/rule/public_platoon_relate_commission.go b/rule/public_platoon_relate_commission.go index fe59682..b776559 100644 --- a/rule/public_platoon_relate_commission.go +++ b/rule/public_platoon_relate_commission.go @@ -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 diff --git a/rule/small_public_platoon_relate_commission.go b/rule/small_public_platoon_relate_commission.go index 446efab..8193181 100644 --- a/rule/small_public_platoon_relate_commission.go +++ b/rule/small_public_platoon_relate_commission.go @@ -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