allenxuxu / mogutouerp Goto Github PK
View Code? Open in Web Editor NEW轻进存销管理系统
License: MIT License
轻进存销管理系统
License: MIT License
运行命令$ go run main.go router.go -c conf/
router.go:13:12: pattern index.html: no matching files found
报错缺少index.html文件,请问index.html文件在哪?
如何建立数据库呀 前后端都能运行但是找不到数据库的位置
go build -o mogutou main.go router.go
router.go:4:2: cannot find package "github.com/Allenxuxu/mogutouERP/api" in any of:
/usr/local/Cellar/go/1.13.4/libexec/src/github.com/Allenxuxu/mogutouERP/api (from $GOROOT)
/Users/jacky/go/src/github.com/Allenxuxu/mogutouERP/api (from $GOPATH)
router.go:5:2: cannot find package "github.com/Allenxuxu/mogutouERP/middleware" in any of:
/usr/local/Cellar/go/1.13.4/libexec/src/github.com/Allenxuxu/mogutouERP/middleware (from $GOROOT)
/Users/jacky/go/src/github.com/Allenxuxu/mogutouERP/middleware (from $GOPATH)
main.go:7:2: cannot find package "github.com/Allenxuxu/mogutouERP/tree/master/models" in any of:
/usr/local/Cellar/go/1.13.4/libexec/src/github.com/Allenxuxu/mogutouERP/tree/master/models (from $GOROOT)
/Users/jacky/go/src/github.com/Allenxuxu/mogutouERP/tree/master/models (from $GOPATH)
main.go:8:2: cannot find package "github.com/Allenxuxu/mogutouERP/tree/master/pkg/token" in any of:
/usr/local/Cellar/go/1.13.4/libexec/src/github.com/Allenxuxu/mogutouERP/tree/master/pkg/token (from $GOROOT)
/Users/jacky/go/src/github.com/Allenxuxu/mogutouERP/tree/master/pkg/token (from $GOPATH)
router.go:6:2: cannot find package "github.com/gin-contrib/cors" in any of:
/usr/local/Cellar/go/1.13.4/libexec/src/github.com/gin-contrib/cors (from $GOROOT)
/Users/jacky/go/src/github.com/gin-contrib/cors (from $GOPATH)
main.go:9:2: cannot find package "github.com/gin-gonic/gin" in any of:
/usr/local/Cellar/go/1.13.4/libexec/src/github.com/gin-gonic/gin (from $GOROOT)
/Users/jacky/go/src/github.com/gin-gonic/gin (from $GOPATH)
main.go:10:2: cannot find package "github.com/jinzhu/gorm/dialects/mysql" in any of:
/usr/local/Cellar/go/1.13.4/libexec/src/github.com/jinzhu/gorm/dialects/mysql (from $GOROOT)
/Users/jacky/go/src/github.com/jinzhu/gorm/dialects/mysql (from $GOPATH)
main.go:11:2: cannot find package "github.com/micro/go-micro/config" in any of:
/usr/local/Cellar/go/1.13.4/libexec/src/github.com/micro/go-micro/config (from $GOROOT)
/Users/jacky/go/src/github.com/micro/go-micro/config (from $GOPATH)
main.go:12:2: cannot find package "github.com/micro/go-micro/config/source/file" in any of:
/usr/local/Cellar/go/1.13.4/libexec/src/github.com/micro/go-micro/config/source/file (from $GOROOT)
/Users/jacky/go/src/github.com/micro/go-micro/config/source/file (from $GOPATH)
make: *** [build] Error 1
google了一下没找到解决办法,请问怎么弄?macos下的go环境
谢谢
2022/10/26 20:26:18 D:/golang/data/src/mogutouERP/mogutouERP/models/purchaseOrder.go:162
[error] invalid field found for struct github.com/Allenxuxu/mogutouERP/models.PurchaseOrderInfo's field Goods, need to define a valid foreign key for relations or it need to implement the Valuer/Scanner interface
func getPurchaseOrder(tx *gorm.DB, orderID string) (*PurchaseOrderInfo, error) {
var order PurchaseOrderInfo
err := tx.Table("purchase_orders").Select(
"id, created_at, operator, amount, remarks, state, freight").Where("id = ?", orderID).First(&order).Error
if err != nil {
return nil, err
}
err = tx.Raw(`select t2.id, t2.name, t2.colour, t2.size, t2.brand, t1.number from purchase_goods as t1 left outer join
commodities as t2 on t1.goods_id = t2.id where t1.purchase_order_id = ?`, orderID).Scan(&order.Goods).Error
if err != nil {
return nil, err
}
return &order, nil
}
order 的数据结构是:
type PurchaseOrderInfo struct {
PurchaseOrder
Goods []Commodity
}
type PurchaseOrder struct {
gorm.Model
Operator string `gorm:"size:255"`
Remarks string
Amount float32
Freight float32
State string `gorm:"default:'未完成'"`
}
// Commodity 商品表
type Commodity struct {
ID string `gorm:"primary_key"`
Name string
Colour string
Size string
Brand string
Number uint
PresaleNumber uint
SalesVolume uint
Price float32
PurchasePrice float32
}
http://demo.mogutou.xyz
这个用户名密码登陆不上去了?
这个仓库【github.com/micro/go-micro/config】在github上都访问不到了,怎么解决呢?
账号密码不正确
看不到demo啊,兄弟。
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.