beego / bee

Bee is a tool for helping develop with beego app framework.
Apache License 2.0
1.44k stars 920 forks source link

bee api gogps -driver=mysql -conn="..." generate error import file #804

Open Gnails opened 2 years ago

Gnails commented 2 years ago

image

flycash commented 2 years ago

please provide the database schema (you can delete some columns), mysql version.

Gnails commented 2 years ago

please provide the database schema (you can delete some columns), mysql version.

+----------+-----------+------+-----+---------+----------------+ | Field | Type | Null | Key | Default | Extra | +----------+-----------+------+-----+---------+----------------+ | id | int | NO | PRI | NULL | auto_increment | | username | char(8) | YES | | NULL | | | passwd | char(225) | YES | | NULL | | +----------+-----------+------+-----+---------+----------------+

+------------+--------------+------+-----+---------+----------------+ | Field | Type | Null | Key | Default | Extra | +------------+--------------+------+-----+---------+----------------+ | seq | int unsigned | NO | PRI | NULL | auto_increment | | userid | char(11) | YES | | NULL | | | longtitude | double | YES | | NULL | | | latitude | double | YES | | NULL | | +------------+--------------+------+-----+---------+----------------+

mysql Ver 8.0.26 for Linux on x86_64 (MySQL Community Server - GPL)

flycash commented 2 years ago

It's a historical BUG, bee has some problems with MySQL 8.x. I plan to fix them in next release.

lghuahua commented 2 years ago

It's a historical BUG, bee has some problems with MySQL 8.x. I plan to fix them in next release.

The package path is calculated incorrectly on windows, and there is no such problem on Linux

// g_appcode.go

func getPackagePath(curpath string) (packpath string) {
    ...
    packpath = strings.Join(strings.Split(curpath[len(appsrcpath)+1:], string(filepath.Separator)), "/")
    return
}

E.g The project code is in F:\share The packpath obtained by this method is ‘:\share’