Commit 9ff28982 by 孙龙
parents 7aeb7271 0cfaa07d
...@@ -7,10 +7,18 @@ import ( ...@@ -7,10 +7,18 @@ import (
type Company struct { type Company struct {
Id int `db:"id"` Id int `db:"id"`
CompanyType int `db:"company_type"`
ComSn string `db:"com_sn"` ComSn string `db:"com_sn"`
ErpComSn string `db:"erp_com_sn"` ErpComSn string `db:"erp_com_sn"`
ComName string `db:"com_name"` ComName string `db:"com_name"`
UserId int `db:"user_id"`
TaxId int `db:"tax_id"`
ComAddr string `db:"com_addr"` ComAddr string `db:"com_addr"`
ComTel string `db:"com_tel"`
ComTaxRegistration string `db:"com_tax_registration"`
ComBank string `db:"com_bank"`
ComBankNum string `db:"com_bank_num"`
ComNature int `db:"com_nature"`
EstablishmentTime int `db:"establishment_time"` EstablishmentTime int `db:"establishment_time"`
RegisteredCapital float64 `db:"registered_capital"` RegisteredCapital float64 `db:"registered_capital"`
ComOrganization string `db:"com_organization"` ComOrganization string `db:"com_organization"`
...@@ -27,6 +35,11 @@ type Company struct { ...@@ -27,6 +35,11 @@ type Company struct {
ProductUseClassoneSn int `db:"product_use_classone_sn"` ProductUseClassoneSn int `db:"product_use_classone_sn"`
ProductUseClasstwoSn int `db:"product_use_classtwo_sn"` ProductUseClasstwoSn int `db:"product_use_classtwo_sn"`
CustomerWebsite string `db:"customer_website"` CustomerWebsite string `db:"customer_website"`
CustomerDesc string `db:"customer_desc"`
BusinessLicenseSrc string `db:"business_license_src"`
SaleDepartment int `db:"sale_department"`
CreateType int `db:"create_type"`
Status int `db:"status"`
CreateTime int `db:"create_time"` CreateTime int `db:"create_time"`
UpdateTime int `db:"update_time"` UpdateTime int `db:"update_time"`
} }
...@@ -41,6 +41,14 @@ func initArgs() { ...@@ -41,6 +41,14 @@ func initArgs() {
func initDB() { func initDB() {
dsn := util.Configs.Liexin_databases.Dns dsn := util.Configs.Liexin_databases.Dns
engine, err = gorose.Open(&gorose.Config{Driver: "mysql", Dsn: dsn}) engine, err = gorose.Open(&gorose.Config{Driver: "mysql", Dsn: dsn})
engine.Use(func(eg *gorose.Engin) {
eg.SetLogger(gorose.NewLogger(&gorose.LogOption{
FilePath: "./log",
EnableSqlLog: false,
EnableSlowLog: 5,
EnableErrorLog: false,
}))
})
if err != nil { if err != nil {
panic(err) panic(err)
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment