浏览代码

update 共富制度

tags/v1.9.2
DengBiao 2 年前
父节点
当前提交
3425872af1
共有 1 个文件被更改,包括 10 次插入2 次删除
  1. +10
    -2
      rule/public_platoon_relate_commission.go

+ 10
- 2
rule/public_platoon_relate_commission.go 查看文件

@@ -44,11 +44,19 @@ func AddPublicPlatoonRelateCommission(engine *xorm.Engine, AddPublicPlatoonRelat
return nil, err
}
if userPublicPlatoonRelation != nil {
userPublicPlatoonRelation.Uid = zhios_order_relate_utils.StrToInt(param.Uid)
now := time.Now()
uniqueIdentifier := strings.Split(userPublicPlatoonRelation.UniqueIdentifier, "-")
uniqueIdentifier[1] = param.Uid

userPublicPlatoonRelation.Uid = zhios_order_relate_utils.StrToInt(param.Uid)
userPublicPlatoonRelation.UniqueIdentifier = strings.Join(uniqueIdentifier, "-")
updateAffected, err := db.UserPublicPlatoonRelationUpdate(engine.NewSession(), userPublicPlatoonRelation.Id, userPublicPlatoonRelation, "uid", "unique_identifier")
userPublicPlatoonRelation.RecommendUid = zhios_order_relate_utils.StrToInt(param.RecommendUid)
userPublicPlatoonRelation.ReturnCommissionNum = 0
userPublicPlatoonRelation.JoinAt = time.Now()
userPublicPlatoonRelation.WaitForSettlementDate = now.AddDate(0, 0, userPublicPlatoonSetting.SettleDay).Format("2006-01-02")
userPublicPlatoonRelation.CreateAt = now
userPublicPlatoonRelation.UpdateAt = now
updateAffected, err := db.UserPublicPlatoonRelationUpdate(engine.NewSession(), userPublicPlatoonRelation.Id, userPublicPlatoonRelation)
if err != nil {
return nil, err
}


正在加载...
取消
保存