其他待导出数据
This commit is contained in:
parent
d024627ab2
commit
021fcf6cb6
|
|
@ -0,0 +1,24 @@
|
||||||
|
package data
|
||||||
|
|
||||||
|
import "time"
|
||||||
|
|
||||||
|
type Card struct {
|
||||||
|
OrderNumber string
|
||||||
|
ResellerId int
|
||||||
|
ResellerOrderNumber string
|
||||||
|
OursProductId int
|
||||||
|
Price float32
|
||||||
|
Quantity int
|
||||||
|
Amount float32
|
||||||
|
PayStatus int
|
||||||
|
Status int
|
||||||
|
Profit float32
|
||||||
|
NotifyUrl string
|
||||||
|
NotifyTime time.Time
|
||||||
|
CreateIp int
|
||||||
|
CreateTime time.Time
|
||||||
|
CardCode string
|
||||||
|
FinishTime time.Time
|
||||||
|
Message string
|
||||||
|
Mobile string
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,35 @@
|
||||||
|
package data
|
||||||
|
|
||||||
|
import "time"
|
||||||
|
|
||||||
|
type PlatformProduct struct {
|
||||||
|
Id int64
|
||||||
|
Name string
|
||||||
|
}
|
||||||
|
|
||||||
|
func (p PlatformProduct) TableName() string {
|
||||||
|
return "platform_product"
|
||||||
|
}
|
||||||
|
|
||||||
|
type Direct struct {
|
||||||
|
SerialNumber string `gorm:"primaryKey;column:serial_number"`
|
||||||
|
OrderOrderNumber string `gorm:"column:order_order_number"`
|
||||||
|
TerminalAccount string `gorm:"column:terminal_account"`
|
||||||
|
OursProductId int `gorm:"column:ours_product_id"`
|
||||||
|
Status int `gorm:"column:status"`
|
||||||
|
TradePrice float32 `gorm:"column:trade_price"`
|
||||||
|
PlatformProductId int `gorm:"column:platform_product_id"`
|
||||||
|
PlatformPrice float32 `gorm:"column:platform_price"`
|
||||||
|
CreateTime time.Time `gorm:"column:create_time"`
|
||||||
|
ExecuteTime time.Time `gorm:"column:execute_time"`
|
||||||
|
Identifier int `gorm:"column:identifier"`
|
||||||
|
Version int `gorm:"column:version"`
|
||||||
|
Type int `gorm:"column:type"`
|
||||||
|
Position int `gorm:"column:position"`
|
||||||
|
OrderItem OrderItem `gorm:"foreignkey:order_order_number;references:order_order_number"`
|
||||||
|
PlatformProduct PlatformProduct `gorm:"foreignkey:id;references:platform_product_id"`
|
||||||
|
}
|
||||||
|
|
||||||
|
func (d Direct) TableName() string {
|
||||||
|
return "order_direct"
|
||||||
|
}
|
||||||
|
|
@ -1,8 +1,8 @@
|
||||||
package export
|
package export
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
"excel_export/data"
|
||||||
"fmt"
|
"fmt"
|
||||||
"lsxd_excel/data"
|
|
||||||
"os"
|
"os"
|
||||||
"testing"
|
"testing"
|
||||||
)
|
)
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
package export
|
package export
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"lsxd_excel/data"
|
"excel_export/data"
|
||||||
"time"
|
"time"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
|
||||||
11
go.mod
11
go.mod
|
|
@ -1,6 +1,12 @@
|
||||||
module excel_export
|
module excel_export
|
||||||
|
|
||||||
go 1.18
|
go 1.17
|
||||||
|
|
||||||
|
require (
|
||||||
|
github.com/tealeg/xlsx/v3 v3.2.4 // direct
|
||||||
|
gorm.io/driver/mysql v1.4.5 // direct
|
||||||
|
gorm.io/gorm v1.24.3 // direct
|
||||||
|
)
|
||||||
|
|
||||||
require (
|
require (
|
||||||
github.com/frankban/quicktest v1.11.2 // indirect
|
github.com/frankban/quicktest v1.11.2 // indirect
|
||||||
|
|
@ -14,9 +20,6 @@ require (
|
||||||
github.com/peterbourgon/diskv v2.0.1+incompatible // indirect
|
github.com/peterbourgon/diskv v2.0.1+incompatible // indirect
|
||||||
github.com/rogpeppe/fastuuid v1.2.0 // indirect
|
github.com/rogpeppe/fastuuid v1.2.0 // indirect
|
||||||
github.com/shabbyrobe/xmlwriter v0.0.0-20200208144257-9fca06d00ffa // indirect
|
github.com/shabbyrobe/xmlwriter v0.0.0-20200208144257-9fca06d00ffa // indirect
|
||||||
github.com/tealeg/xlsx/v3 v3.2.4 // direct
|
|
||||||
golang.org/x/text v0.3.3 // indirect
|
golang.org/x/text v0.3.3 // indirect
|
||||||
golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543 // indirect
|
golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543 // indirect
|
||||||
gorm.io/driver/mysql v1.4.5 // direct
|
|
||||||
gorm.io/gorm v1.24.3 // direct
|
|
||||||
)
|
)
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue