|
|
@@ -43,11 +43,11 @@ func TikTokTaskMoney(types string) { |
|
|
|
var order = make([]md.TikTokTaskOrder, 0) |
|
|
|
json.Unmarshal([]byte(orderStr), &order) |
|
|
|
for _, v := range order { |
|
|
|
discount := v.BillingGMV1D - v.BillingRefundGMV1D |
|
|
|
discount := float64(v.BillingGMV1D)/100 - float64(v.BillingRefundGMV1D)/100 |
|
|
|
if discount < 0 { |
|
|
|
discount = 0 |
|
|
|
} |
|
|
|
commission := discount - v.TalentProfit1D - discount*15 |
|
|
|
commission := discount - float64(v.TalentProfit1D)/100 - discount*15/100 |
|
|
|
fee := discount - commission |
|
|
|
oid := "douyin" + zhios_third_party_utils.Int64ToStr(v.VideoId) + date |
|
|
|
oid = strings.ReplaceAll(oid, "_", "") |
|
|
@@ -65,8 +65,8 @@ func TikTokTaskMoney(types string) { |
|
|
|
SubUid: utils.StrToInt(split[1]), |
|
|
|
Data: utils.SerializeStr(v), |
|
|
|
Oid: oid, |
|
|
|
Amount: utils.Float64ToStr(float64(discount) / 100), |
|
|
|
Commission: utils.Float64ToStr(float64(commission) / 100), |
|
|
|
Amount: utils.Float64ToStr(discount), |
|
|
|
Commission: utils.Float64ToStr(commission), |
|
|
|
CreateTime: utils.TimeParseStd(date + " 00:00:00"), |
|
|
|
UpdateTime: time.Now(), |
|
|
|
Title: v.VideoTitle, |
|
|
@@ -75,7 +75,8 @@ func TikTokTaskMoney(types string) { |
|
|
|
GoodsType: "playlet", |
|
|
|
OrdType: "video", |
|
|
|
ExtendUid: v.DouyinID + "_" + v.AgentID, |
|
|
|
PlatformFee: utils.Float64ToStr(float64(fee) / 100), |
|
|
|
PlatformFee: utils.Float64ToStr(fee), |
|
|
|
TikFee: utils.Float64ToStr(float64(v.TalentProfit1D) / 100), |
|
|
|
} |
|
|
|
playletSaleOrderDb := db.PlayletSaleOrderDb{} |
|
|
|
playletSaleOrderDb.Set() |
|
|
|