fix bug
This commit is contained in:
@@ -32,7 +32,7 @@ func ClosedTable() {
|
||||
tw.SetTitle("已清仓列表")
|
||||
tw.AppendHeader(table.Row{"ID", "Code", "Name", "Open_Date", "Open_Price", "Close_Date", "Close_Price", "PNL/Per", "PNLRate(%)"})
|
||||
var data []models.MockPosition
|
||||
impl.DBService.Where("status=?", 1).Find(&data)
|
||||
impl.DBService.Where("status=?", 1).Order("id asc").Find(&data)
|
||||
var tPNL, tPNLR, cost, sell float64
|
||||
|
||||
for idx, item := range data {
|
||||
@@ -62,7 +62,7 @@ func UnclosedTableByRealtime() {
|
||||
tw.SetTitle("未平仓列表(实时)")
|
||||
tw.AppendHeader(table.Row{"ID", "Code", "Name", "Open_Date", "Open_Price", "Realtime_Price", "PNL/Per", "PNLRate(%)"})
|
||||
var data []models.MockPosition
|
||||
impl.DBService.Where("status=?", 0).Find(&data)
|
||||
impl.DBService.Where("status=?", 0).Order("id asc").Find(&data)
|
||||
var tPNL, tPNLR, cost, sell float64
|
||||
|
||||
for idx, item := range data {
|
||||
@@ -100,7 +100,7 @@ func UnclosedTableByDay() {
|
||||
tw.SetTitle("未平仓列表(日线)")
|
||||
tw.AppendHeader(table.Row{"ID", "Code", "Name", "Open_Date", "Open_Price", "Today_Price", "PNL/Per", "PNLRate(%)"})
|
||||
var data []models.MockPosition
|
||||
impl.DBService.Where("status=?", 0).Find(&data)
|
||||
impl.DBService.Where("status=?", 0).Order("id asc").Find(&data)
|
||||
var tPNL, tPNLR, cost, sell float64
|
||||
|
||||
for idx, item := range data {
|
||||
|
||||
Reference in New Issue
Block a user