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