|
|
@@ -34,7 +34,7 @@ func PublicPlatoonSettle(session *xorm.Session, ItemTitle, ordId string, uid, co |
|
|
|
return false |
|
|
|
} |
|
|
|
} |
|
|
|
finUserFlow := model.UserPublicPlatoonSettlementRecords{ |
|
|
|
finUserFlow := model.UserPublicPlatoonIncomeRecords{ |
|
|
|
Type: 0, |
|
|
|
Uid: uid, |
|
|
|
Amount: zhios_order_relate_utils.AnyToString(amount), |
|
|
@@ -53,3 +53,47 @@ func PublicPlatoonSettle(session *xorm.Session, ItemTitle, ordId string, uid, co |
|
|
|
} |
|
|
|
return true |
|
|
|
} |
|
|
|
func PublicPlatoonAddRecord(eg *xorm.Engine, ItemTitle, ordId string, uid, coinId, kind, types int, amount float64, beforeAmount string) bool { |
|
|
|
now := time.Now() |
|
|
|
|
|
|
|
finUserFlow := model.UserPublicPlatoonIncomeRecords{ |
|
|
|
Type: types, |
|
|
|
Uid: uid, |
|
|
|
Amount: zhios_order_relate_utils.AnyToString(amount), |
|
|
|
CreateAt: now, |
|
|
|
UpdateAt: now, |
|
|
|
Date: now.Format("2006-01"), |
|
|
|
Kind: kind, |
|
|
|
CoinId: coinId, |
|
|
|
Title: ItemTitle, |
|
|
|
BeforeAmount: beforeAmount, |
|
|
|
Oid: ordId, |
|
|
|
} |
|
|
|
_, err := eg.Insert(&finUserFlow) |
|
|
|
if err != nil { |
|
|
|
return false |
|
|
|
} |
|
|
|
return true |
|
|
|
} |
|
|
|
func PublicPlatoonAddRecordWithSession(session *xorm.Session, ItemTitle, ordId string, uid, coinId, kind, types int, amount float64, beforeAmount string) bool { |
|
|
|
now := time.Now() |
|
|
|
|
|
|
|
finUserFlow := model.UserPublicPlatoonIncomeRecords{ |
|
|
|
Type: types, |
|
|
|
Uid: uid, |
|
|
|
Amount: zhios_order_relate_utils.AnyToString(amount), |
|
|
|
CreateAt: now, |
|
|
|
UpdateAt: now, |
|
|
|
Date: now.Format("2006-01"), |
|
|
|
Kind: kind, |
|
|
|
CoinId: coinId, |
|
|
|
Title: ItemTitle, |
|
|
|
BeforeAmount: beforeAmount, |
|
|
|
Oid: ordId, |
|
|
|
} |
|
|
|
_, err := session.Insert(&finUserFlow) |
|
|
|
if err != nil { |
|
|
|
return false |
|
|
|
} |
|
|
|
return true |
|
|
|
} |