Browse Source

update:修改内部库为线上引用

zoie 4 weeks ago
parent
commit
260e85f317

+ 3 - 3
Nats/Nats.go

@@ -4,13 +4,13 @@ import (
 	"ERP_ams/conf"
 	"ERP_ams/models/Account"
 	"fmt"
-	menulibs "git.baozhida.cn/ERP_libs/Menu"
-	powerlibs "git.baozhida.cn/ERP_libs/Power"
-	"git.baozhida.cn/ERP_libs/lib"
 	"github.com/astaxie/beego/logs"
 	"github.com/beego/beego/v2/adapter/orm"
 	"github.com/nats-io/nats.go"
 	"github.com/vmihailenco/msgpack/v5"
+	menulibs "gogs.baozhida.cn/zoie/ERP_libs/Menu"
+	powerlibs "gogs.baozhida.cn/zoie/ERP_libs/Power"
+	"gogs.baozhida.cn/zoie/ERP_libs/lib"
 )
 
 var Nats *nats.Conn

+ 3 - 3
Nats/NatsServer/NatsERP_user.go

@@ -4,9 +4,9 @@ import (
 	"ERP_ams/Nats"
 	"ERP_ams/conf"
 	"ERP_ams/logs"
-	natslibs "git.baozhida.cn/ERP_libs/Nats"
-	userlibs "git.baozhida.cn/ERP_libs/User"
-	"git.baozhida.cn/ERP_libs/lib"
+	natslibs "gogs.baozhida.cn/zoie/ERP_libs/Nats"
+	userlibs "gogs.baozhida.cn/zoie/ERP_libs/User"
+	"gogs.baozhida.cn/zoie/ERP_libs/lib"
 )
 
 // 验证TOKEY

+ 2 - 2
README.md

@@ -2,11 +2,11 @@
 
 ### 导入线上库
 
-git config --global url."git@git.baozhida.cn/ERP_libs".insteadOf "http://120.55.48.97:3000/bzd_zeng/ERP_libs"
+git config --global url."git@gogs.baozhida.cn/zoie/ERP_libs".insteadOf "http://120.55.48.97:3000/bzd_zeng/ERP_libs"
 
 ### 导入本地库
 
-go mod edit -replace git.baozhida.cn/ERP_libs=${Yours_Path}/ERP_libs
+go mod edit -replace gogs.baozhida.cn/zoie/ERP_libs=${Yours_Path}/ERP_libs
 
 
 

+ 35 - 0
conf/app_prod.conf

@@ -0,0 +1,35 @@
+appname = ERP_ams
+HTTPPort = 6701
+runmode = dev
+Graceful = true
+EnableDocs = true
+copyrequestbody = true
+
+Sys_Name = "ERP_AMS"
+# Nats
+NatsServer_Url = "127.0.0.1:4223"
+NatsSubj_Prefix = ""
+
+
+# Mysql 线上
+MysqlServer_UrlPort = "127.0.0.1:3316"
+MysqlServer_Database = "erp_ams"
+MysqlServer_Username = "erp_ams"
+MysqlServer_Password = "k24fRJB7pMrmeas3"
+MysqlServer_MaxIdleConnections = 100
+MysqlServer_MaxOpenConnections = 200
+
+# Redis
+Redis_address = "127.0.0.1:6378"
+Redis_password = ""
+Redis_dbNum = "1"
+
+FilterExcludeURL =
+FilterOnlyLoginCheckURL =
+
+LeaveApprovalNewsUrl = "/leave"
+MyLeaveNewsUrl = "/myLeave"
+OvertimeApprovalNewsUrl = "/overtime"
+MyOvertimeNewsUrl = "/myOvertime"
+
+

+ 2 - 2
controllers/Leave.go

@@ -6,9 +6,9 @@ import (
 	"ERP_ams/models/Account"
 	"ERP_ams/models/Attendance"
 	"fmt"
-	userlibs "git.baozhida.cn/ERP_libs/User"
-	"git.baozhida.cn/ERP_libs/lib"
 	beego "github.com/beego/beego/v2/server/web"
+	userlibs "gogs.baozhida.cn/zoie/ERP_libs/User"
+	"gogs.baozhida.cn/zoie/ERP_libs/lib"
 	"math"
 	"strconv"
 	"time"

+ 2 - 2
controllers/Overtime.go

@@ -6,9 +6,9 @@ import (
 	"ERP_ams/models/Account"
 	"ERP_ams/models/Attendance"
 	"fmt"
-	userlibs "git.baozhida.cn/ERP_libs/User"
-	"git.baozhida.cn/ERP_libs/lib"
 	beego "github.com/beego/beego/v2/server/web"
+	userlibs "gogs.baozhida.cn/zoie/ERP_libs/User"
+	"gogs.baozhida.cn/zoie/ERP_libs/lib"
 	"math"
 	"strconv"
 )

+ 2 - 4
go.mod

@@ -2,16 +2,13 @@ module ERP_ams
 
 go 1.19
 
-replace git.baozhida.cn/ERP_libs => /Users/zoie/work/bzd_project/ERP/ERP_libs
-
 require (
-	git.baozhida.cn/ERP_libs v0.0.0-00010101000000-000000000000
 	github.com/astaxie/beego v1.12.3
 	github.com/beego/beego/v2 v2.0.7
 	github.com/go-sql-driver/mysql v1.7.0
 	github.com/nats-io/nats.go v1.23.0
-	github.com/qiniu/go-sdk/v7 v7.14.0
 	github.com/vmihailenco/msgpack/v5 v5.3.5
+	gogs.baozhida.cn/zoie/ERP_libs v0.0.0-20241029034120-31ca607abb2e
 )
 
 require (
@@ -34,6 +31,7 @@ require (
 	github.com/prometheus/client_model v0.3.0 // indirect
 	github.com/prometheus/common v0.37.0 // indirect
 	github.com/prometheus/procfs v0.8.0 // indirect
+	github.com/qiniu/go-sdk/v7 v7.14.0 // indirect
 	github.com/shiena/ansicolor v0.0.0-20200904210342-c7312218db18 // indirect
 	github.com/shopspring/decimal v1.3.1 // indirect
 	github.com/signintech/gopdf v0.16.1 // indirect

+ 2 - 0
go.sum

@@ -309,6 +309,8 @@ go.opencensus.io v0.22.0/go.mod h1:+kGneAE2xo2IficOXnaByMWTGM9T73dGwxeWcUqIpI8=
 go.opencensus.io v0.22.2/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw=
 go.opencensus.io v0.22.3/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw=
 go.opencensus.io v0.22.4/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw=
+gogs.baozhida.cn/zoie/ERP_libs v0.0.0-20241029034120-31ca607abb2e h1:sUbmO6gD9GcYjW1abZ2Brfw5xay2a3R6KlSVy7+QE4I=
+gogs.baozhida.cn/zoie/ERP_libs v0.0.0-20241029034120-31ca607abb2e/go.mod h1:wS/rgL1FkdfMsCwKpwG04dZtG4SOFcBADi4lxHN7UeM=
 golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4=
 golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
 golang.org/x/crypto v0.0.0-20190510104115-cbcb75029529/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=

+ 2 - 2
models/Account/Menu.go

@@ -4,11 +4,11 @@ import (
 	"ERP_ams/conf"
 	"ERP_ams/logs"
 	"fmt"
-	menulibs "git.baozhida.cn/ERP_libs/Menu"
-	"git.baozhida.cn/ERP_libs/lib"
 	"github.com/astaxie/beego/cache"
 	_ "github.com/astaxie/beego/cache/redis"
 	"github.com/beego/beego/v2/adapter/orm"
+	menulibs "gogs.baozhida.cn/zoie/ERP_libs/Menu"
+	"gogs.baozhida.cn/zoie/ERP_libs/lib"
 )
 
 var RedisCache_API cache.Cache

+ 1 - 1
models/Account/Power.go

@@ -1,8 +1,8 @@
 package Account
 
 import (
-	powerlibs "git.baozhida.cn/ERP_libs/Power"
 	"github.com/beego/beego/v2/adapter/orm"
+	powerlibs "gogs.baozhida.cn/zoie/ERP_libs/Power"
 )
 
 func init() {

+ 1 - 1
models/Account/User.go

@@ -1,7 +1,7 @@
 package Account
 
 import (
-	userlibs "git.baozhida.cn/ERP_libs/User"
+	userlibs "gogs.baozhida.cn/zoie/ERP_libs/User"
 	"sync"
 )
 

+ 1 - 1
models/Attendance/Attendance.go

@@ -4,9 +4,9 @@ import (
 	"ERP_ams/logs"
 	"ERP_ams/models/Account"
 	"fmt"
-	"git.baozhida.cn/ERP_libs/lib"
 	"github.com/beego/beego/v2/adapter/orm"
 	orm2 "github.com/beego/beego/v2/client/orm"
+	"gogs.baozhida.cn/zoie/ERP_libs/lib"
 	"strings"
 	"time"
 )

+ 2 - 2
routers/filter.go

@@ -5,10 +5,10 @@ import (
 	"ERP_ams/conf"
 	"ERP_ams/logs"
 	"ERP_ams/models/Account"
-	powerlibs "git.baozhida.cn/ERP_libs/Power"
-	"git.baozhida.cn/ERP_libs/lib"
 	"github.com/beego/beego/v2/adapter/orm"
 	"github.com/beego/beego/v2/server/web/context"
+	powerlibs "gogs.baozhida.cn/zoie/ERP_libs/Power"
+	"gogs.baozhida.cn/zoie/ERP_libs/lib"
 	"strings"
 )
 

+ 1 - 1
routers/router.go

@@ -1,8 +1,8 @@
 package routers
 
 import (
-	errorlibs "git.baozhida.cn/ERP_libs/Error"
 	beego "github.com/beego/beego/v2/server/web"
+	errorlibs "gogs.baozhida.cn/zoie/ERP_libs/Error"
 )
 
 func init() {