Browse Source

add reverse:for v3.6.2 公排推荐人读取调整

tags/v3.6.2
huangjiajun 2 years ago
parent
commit
407bf9027a
2 changed files with 12 additions and 5 deletions
  1. +6
    -2
      svc/public_platoon_relate_commission.go
  2. +6
    -3
      svc/small_public_platoon_relate_commission.go

+ 6
- 2
svc/public_platoon_relate_commission.go View File

@@ -8,7 +8,6 @@ import (
"encoding/json" "encoding/json"
"errors" "errors"
"fmt" "fmt"
"strconv"
"strings" "strings"
"xorm.io/xorm" "xorm.io/xorm"
) )
@@ -120,11 +119,16 @@ func BatchGetPublicPlatoonRelateCommissionByOrder(engine *xorm.Engine, masterId
return nil, errors.New("更新公排关系记录失败") return nil, errors.New("更新公排关系记录失败")
} }
} }
recommendUid := ""
userProfile, _ := db.UserProfileFindByID(engine, param.Uid)
if userProfile != nil && userProfile.ParentUid > 0 {
recommendUid = zhios_order_relate_utils.IntToStr(userProfile.ParentUid)
}
/// ///
resp[param.Oid] = &md.PublicPlatoonRelateCommissionResp{ resp[param.Oid] = &md.PublicPlatoonRelateCommissionResp{
Uid: param.Uid, Uid: param.Uid,
CommonWealthBenefitUid: nowBenefitUid, CommonWealthBenefitUid: nowBenefitUid,
DirectPushBenefitUid: strconv.Itoa(userPublicPlatoonRelation.RecommendUid),
DirectPushBenefitUid: recommendUid,
PendingAmount: param.PendingAmount, PendingAmount: param.PendingAmount,
PendingIntegral: param.PendingIntegral, PendingIntegral: param.PendingIntegral,
Oid: param.Oid, Oid: param.Oid,


+ 6
- 3
svc/small_public_platoon_relate_commission.go View File

@@ -8,7 +8,6 @@ import (
"encoding/json" "encoding/json"
"errors" "errors"
"fmt" "fmt"
"strconv"
"strings" "strings"
"xorm.io/xorm" "xorm.io/xorm"
) )
@@ -122,11 +121,15 @@ func BatchSmallGetPublicPlatoonRelateCommission(engine *xorm.Engine, masterId st
return nil, errors.New("更新公排关系记录失败") return nil, errors.New("更新公排关系记录失败")
} }
} }

recommendUid := ""
userProfile, _ := db.UserProfileFindByID(engine, param.Uid)
if userProfile != nil && userProfile.ParentUid > 0 {
recommendUid = zhios_order_relate_utils.IntToStr(userProfile.ParentUid)
}
resp[param.Oid] = &md.SmallPublicPlatoonRelateCommissionResp{ resp[param.Oid] = &md.SmallPublicPlatoonRelateCommissionResp{
Uid: param.Uid, Uid: param.Uid,
CommonWealthBenefitUid: nowBenefitUid, CommonWealthBenefitUid: nowBenefitUid,
DirectPushBenefitUid: strconv.Itoa(userPublicPlatoonRelation.RecommendUid),
DirectPushBenefitUid: recommendUid,
PendingAmount: param.PendingAmount, PendingAmount: param.PendingAmount,
Oid: param.Oid, Oid: param.Oid,
SelfRateList: selfRateList, SelfRateList: selfRateList,


Loading…
Cancel
Save