|
@@ -170,17 +170,17 @@ func AddPlatformRevenue(c *gin.Context) { |
|
|
|
|
|
|
|
|
platformRevenueDataDb := implement.NewPlatformRevenueDataDb(db.Db) |
|
|
platformRevenueDataDb := implement.NewPlatformRevenueDataDb(db.Db) |
|
|
now := time.Now() |
|
|
now := time.Now() |
|
|
hour := now.Hour() |
|
|
|
|
|
if req.Hours > 24 { |
|
|
|
|
|
hour = 24 |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
//hour := now.Hour() |
|
|
|
|
|
//if req.Hours > 24 { |
|
|
|
|
|
// hour = 24 |
|
|
|
|
|
//} |
|
|
|
|
|
|
|
|
times := req.Hours * 60 / req.Frequency |
|
|
times := req.Hours * 60 / req.Frequency |
|
|
m := model.PlatformRevenueData{ |
|
|
m := model.PlatformRevenueData{ |
|
|
Kind: req.Kind, |
|
|
Kind: req.Kind, |
|
|
TotalAmount: req.TotalAmount, |
|
|
TotalAmount: req.TotalAmount, |
|
|
BalanceAmount: req.TotalAmount, |
|
|
BalanceAmount: req.TotalAmount, |
|
|
Hours: hour, |
|
|
|
|
|
|
|
|
Hours: req.Hours, |
|
|
BalanceTimes: times, |
|
|
BalanceTimes: times, |
|
|
Frequency: req.Frequency, |
|
|
Frequency: req.Frequency, |
|
|
Memo: req.Memo, |
|
|
Memo: req.Memo, |
|
|