yxh 4 жил өмнө
parent
commit
c11ce956af

+ 10 - 0
app/common/global/version.go

@@ -0,0 +1,10 @@
+/*
+* @desc:版本号
+* @company:云南省奇讯科技有限公司
+* @Author: yixiaohu
+* @Date:   2021/9/6 16:25
+ */
+
+package global
+
+const Version = "2.0.3"

+ 2 - 4
boot/boot.go

@@ -2,6 +2,7 @@ package boot
 
 import (
 	"fmt"
+	"gfast/app/common/global"
 	_ "gfast/packed"
 	_ "gfast/task"
 	"github.com/gogf/gf/frame/g"
@@ -9,9 +10,6 @@ import (
 	"github.com/gogf/gf/os/gtime"
 )
 
-//版本号
-const Version = "2.0.3"
-
 func init() {
 	gtime.SetTimeZone("Asia/Shanghai") //设置系统时区
 	showLogo()
@@ -20,5 +18,5 @@ func init() {
 
 func showLogo() {
 	fmt.Println(" .----------------.  .----------------.  .----------------.  .----------------.  .----------------. \n| .--------------. || .--------------. || .--------------. || .--------------. || .--------------. |\n| |    ______    | || |  _________   | || |      __      | || |    _______   | || |  _________   | |\n| |  .' ___  |   | || | |_   ___  |  | || |     /  \\     | || |   /  ___  |  | || | |  _   _  |  | |\n| | / .'   \\_|   | || |   | |_  \\_|  | || |    / /\\ \\    | || |  |  (__ \\_|  | || | |_/ | | \\_|  | |\n| | | |    ____  | || |   |  _|      | || |   / ____ \\   | || |   '.___`-.   | || |     | |      | |\n| | \\ `.___]  _| | || |  _| |_       | || | _/ /    \\ \\_ | || |  |`\\____) |  | || |    _| |_     | |\n| |  `._____.'   | || | |_____|      | || ||____|  |____|| || |  |_______.'  | || |   |_____|    | |\n| |              | || |              | || |              | || |              | || |              | |\n| '--------------' || '--------------' || '--------------' || '--------------' || '--------------' |\n '----------------'  '----------------'  '----------------'  '----------------'  '----------------' ")
-	fmt.Println("当前版本:", Version)
+	fmt.Println("当前版本:", global.Version)
 }

+ 1 - 1
template/vm/go/dao.template

@@ -9,7 +9,7 @@ package dao
 
 {{$hasGTime:=false}}
 {{range $index, $column := .table.Columns}}
-{{if and (eq $column.GoType "Time") (or (eq $column.IsInsert "1") (eq $column.IsEdit "1"))}}
+{{if eq $column.GoType "Time"}}
 {{$hasGTime = true}}
 {{end}}
 {{end}}