ddff
parent
6eab664b31
commit
61a878ddf4
@ -1,2 +1,5 @@
|
||||
2025/03/01 09:16:03.273 [I] [asm_amd64.s:1650] http server Running on http://:8082
|
||||
2025/03/01 09:16:19.037 [I] [asm_amd64.s:1650] http server Running on http://:8082
|
||||
2025/03/03 13:37:36.152 [I] [asm_amd64.s:1650] http server Running on http://:8082
|
||||
2025/03/03 13:41:54.166 [I] [asm_amd64.s:1650] http server Running on http://:8082
|
||||
2025/03/03 13:44:25.608 [I] [asm_amd64.s:1650] http server Running on http://:8082
|
||||
|
||||
@ -1,2 +1,5 @@
|
||||
2025/03/01 09:16:03.266 [N] [initialize.go:21] 数据库注册成功: weather@192.168.2.18:3306
|
||||
2025/03/01 09:16:19.032 [N] [initialize.go:21] 数据库注册成功: weather@192.168.2.18:3306
|
||||
2025/03/03 13:37:36.148 [N] [initialize.go:21] 数据库注册成功: gorm@192.168.2.18:3306
|
||||
2025/03/03 13:41:54.161 [N] [initialize.go:21] 数据库注册成功: gorm@192.168.2.18:3306
|
||||
2025/03/03 13:44:25.602 [N] [initialize.go:21] 数据库注册成功: gorm@192.168.2.18:3306
|
||||
|
||||
@ -0,0 +1,26 @@
|
||||
package models
|
||||
|
||||
import (
|
||||
"github.com/astaxie/beego/orm"
|
||||
"time"
|
||||
)
|
||||
|
||||
type NmcProvince struct {
|
||||
Code string `json:"code" orm:"pk;column(code);size(50)"`
|
||||
Name string `json:"name" orm:"column(name);size(50)"`
|
||||
Url string `json:"url" orm:"column(url);size(50)"`
|
||||
CreateDate time.Time `json:"createDate" orm:"column(create_date);auto_now_add;type(datetime)"`
|
||||
LastUpdateDate time.Time `json:"lastUpdateDate" orm:"column(last_update_date);auto_now;type(datetime)"`
|
||||
}
|
||||
|
||||
func init() {
|
||||
orm.RegisterModel(new(NmcProvince))
|
||||
}
|
||||
|
||||
|
||||
func GetNmcProvinceList() []*NmcProvince {
|
||||
items := make([]*NmcProvince, 0)
|
||||
orm.NewOrm().QueryTable(new(NmcCity)).All(&items)
|
||||
return items
|
||||
}
|
||||
|
||||
Binary file not shown.
Loading…
Reference in New Issue