Browse Source

更新

one_orenge
huangjiajun 4 months ago
parent
commit
efba0c4c59
3 changed files with 7 additions and 4 deletions
  1. +2
    -1
      app/svc/public_platoon_settle.go
  2. +1
    -1
      app/svc/svc_comm_deal_commission.go
  3. +4
    -2
      app/svc/svc_deal_commission.go

+ 2
- 1
app/svc/public_platoon_settle.go View File

@@ -76,7 +76,7 @@ func PublicPlatoonAddRecord(eg *xorm.Engine, ItemTitle, ordId string, uid, coinI
}
return true
}
func PublicPlatoonAddRecordWithSession(session *xorm.Session, ItemTitle, ordId string, uid, coinId, kind, types int, amount float64, beforeAmount string) bool {
func PublicPlatoonAddRecordWithSession(session *xorm.Session, ItemTitle, ordId string, uid, coinId, kind, types int, amount float64, beforeAmount, source string) bool {
now := time.Now()

finUserFlow := model.UserPublicPlatoonIncomeRecords{
@@ -91,6 +91,7 @@ func PublicPlatoonAddRecordWithSession(session *xorm.Session, ItemTitle, ordId s
Title: ItemTitle,
BeforeAmount: beforeAmount,
Oid: ordId,
Source: source,
}
_, err := session.Insert(&finUserFlow)
if err != nil {


+ 1
- 1
app/svc/svc_comm_deal_commission.go View File

@@ -293,7 +293,7 @@ func CommCommSettleMoney(session *xorm.Session, item *model.CommOrdListRelate, a
kind = 5
title = "直推奖"
}
bools := PublicPlatoonAddRecordWithSession(session, title, utils.Int64ToStr(item.Oid), item.Uid, 0, kind, 0, item.Amount, beforeAmount)
bools := PublicPlatoonAddRecordWithSession(session, title, utils.Int64ToStr(item.Oid), item.Uid, 0, kind, 0, item.Amount, beforeAmount, mapData["title"]+"奖励")
if bools == false {
return false
}


+ 4
- 2
app/svc/svc_deal_commission.go View File

@@ -312,6 +312,7 @@ func CommSettleMoney(session *xorm.Session, item *model.TaskOrdListRelate, appNa
if item.Pvd == "adset_video" {
ItemTitle = "看视频奖励"
}
titles := ItemTitle
if item.Level > 0 {
ItemTitle = "团队任务奖励"
if item.Pvd == "adset_video" {
@@ -354,7 +355,7 @@ func CommSettleMoney(session *xorm.Session, item *model.TaskOrdListRelate, appNa
kind = 5
title = "直推奖"
}
bools := PublicPlatoonAddRecordWithSession(session, title, utils.Int64ToStr(item.Oid), item.Uid, 0, kind, 0, item.Amount, beforeAmount)
bools := PublicPlatoonAddRecordWithSession(session, title, utils.Int64ToStr(item.Oid), item.Uid, 0, kind, 0, item.Amount, beforeAmount, titles)
if bools == false {
return false
}
@@ -410,6 +411,7 @@ func CommSettleVirtualCoin(session *xorm.Session, virtualCoinRelateItem *model.V
if mapData["title"] != "" {
title = mapData["title"] + "奖励"
}
titles := title
if virtualCoinRelateItem.Level > 0 {
title = "团队任务奖励"
if virtualCoinRelateItem.Pvd == "adset_video" {
@@ -445,7 +447,7 @@ func CommSettleVirtualCoin(session *xorm.Session, virtualCoinRelateItem *model.V
kind = 5
title = "直推奖"
}
bools := PublicPlatoonAddRecordWithSession(session, title, utils.Int64ToStr(virtualCoinRelateItem.Oid), virtualCoinRelateItem.Uid, virtualCoinRelateItem.CoinId, kind, 0, utils.StrToFloat64(virtualCoinRelateItem.Amount), beforeAmount)
bools := PublicPlatoonAddRecordWithSession(session, title, utils.Int64ToStr(virtualCoinRelateItem.Oid), virtualCoinRelateItem.Uid, virtualCoinRelateItem.CoinId, kind, 0, utils.StrToFloat64(virtualCoinRelateItem.Amount), beforeAmount, titles)
if bools == false {
return false
}


Loading…
Cancel
Save