Prechádzať zdrojové kódy

update:优化工具库

zoie 3 týždňov pred
rodič
commit
31ca607abb
6 zmenil súbory, kde vykonal 14 pridanie a 11 odobranie
  1. 1 1
      Error/Error.go
  2. 1 1
      Menu/API.go
  3. 1 1
      Menu/Menu.go
  4. 6 6
      Nats/NatsERP_user.go
  5. 3 2
      go.mod
  6. 2 0
      go.sum

+ 1 - 1
Error/Error.go

@@ -1,8 +1,8 @@
 package controllers
 
 import (
-	"git.baozhida.cn/ERP_libs/lib"
 	beego "github.com/beego/beego/v2/server/web"
+	"gogs.baozhida.cn/zoie/ERP_libs/lib"
 )
 
 // 定义错误控制器

+ 1 - 1
Menu/API.go

@@ -3,11 +3,11 @@ package Account
 import (
 	"encoding/json"
 	"errors"
-	"git.baozhida.cn/ERP_libs/lib"
 	"github.com/astaxie/beego/cache"
 	_ "github.com/astaxie/beego/cache/redis"
 	"github.com/beego/beego/v2/adapter/orm"
 	orm2 "github.com/beego/beego/v2/client/orm"
+	"gogs.baozhida.cn/zoie/ERP_libs/lib"
 	"time"
 )
 

+ 1 - 1
Menu/Menu.go

@@ -1,9 +1,9 @@
 package Account
 
 import (
-	"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"
 )
 
 const (

+ 6 - 6
Nats/NatsERP_user.go

@@ -3,9 +3,9 @@ package NatsServer
 import (
 	"encoding/json"
 	"errors"
-	powerlibs "git.baozhida.cn/ERP_libs/Power"
-	userlibs "git.baozhida.cn/ERP_libs/User"
 	"github.com/vmihailenco/msgpack/v5"
+	powerlibs "gogs.baozhida.cn/zoie/ERP_libs/Power"
+	userlibs "gogs.baozhida.cn/zoie/ERP_libs/User"
 	"time"
 )
 
@@ -83,10 +83,10 @@ func (m *NatsImpl) Read_User_List_T_uuid(T_name string, T_uuid_list []string, pa
 		return list, cnt, err
 	}
 	type T_R struct {
-		Code      int16           `xml:"Code"`
-		Msg       string          `xml:"Msg"`
-		Data      []userlibs.User `xml:"Data"`
-		Num       int64           `xml:"Num"`
+		Code int16           `xml:"Code"`
+		Msg  string          `xml:"Msg"`
+		Data []userlibs.User `xml:"Data"`
+		Num  int64           `xml:"Num"`
 	}
 	var t_R T_R
 

+ 3 - 2
go.mod

@@ -1,4 +1,4 @@
-module git.baozhida.cn/ERP_libs
+module gogs.baozhida.cn/zoie/ERP_libs
 
 go 1.19
 
@@ -8,6 +8,7 @@ require (
 	github.com/mssola/user_agent v0.6.0
 	github.com/nats-io/nats.go v1.23.0
 	github.com/qiniu/go-sdk/v7 v7.14.0
+	github.com/shopspring/decimal v1.3.1
 	github.com/signintech/gopdf v0.16.1
 	github.com/vmihailenco/msgpack/v5 v5.3.5
 )
@@ -30,7 +31,7 @@ require (
 	github.com/prometheus/common v0.37.0 // indirect
 	github.com/prometheus/procfs v0.8.0 // indirect
 	github.com/shiena/ansicolor v0.0.0-20200904210342-c7312218db18 // indirect
-	github.com/shopspring/decimal v1.3.1 // indirect
+	github.com/vmihailenco/tagparser/v2 v2.0.0 // indirect
 	golang.org/x/crypto v0.5.0 // indirect
 	golang.org/x/net v0.5.0 // indirect
 	golang.org/x/sync v0.0.0-20220601150217-0de741cfad7f // indirect

+ 2 - 0
go.sum

@@ -292,7 +292,9 @@ github.com/stretchr/testify v1.8.0 h1:pSgiaMZlXftHpm5L7V1+rVB+AZJydKsMxsQBIJw4PK
 github.com/syndtr/goleveldb v0.0.0-20160425020131-cfa635847112/go.mod h1:Z4AUp2Km+PwemOoO/VB5AOx9XSsIItzFjoJlOSiYmn0=
 github.com/syndtr/goleveldb v0.0.0-20181127023241-353a9fca669c/go.mod h1:Z4AUp2Km+PwemOoO/VB5AOx9XSsIItzFjoJlOSiYmn0=
 github.com/ugorji/go v0.0.0-20171122102828-84cb69a8af83/go.mod h1:hnLbHMwcvSihnDhEfx2/BzKp2xb0Y+ErdfYcrs9tkJQ=
+github.com/vmihailenco/msgpack/v5 v5.3.5 h1:5gO0H1iULLWGhs2H5tbAHIZTV8/cYafcFOr9znI5mJU=
 github.com/vmihailenco/msgpack/v5 v5.3.5/go.mod h1:7xyJ9e+0+9SaZT0Wt1RGleJXzli6Q/V5KbhBonMG9jc=
+github.com/vmihailenco/tagparser/v2 v2.0.0 h1:y09buUbR+b5aycVFQs/g70pqKVZNBmxwAhO7/IwNM9g=
 github.com/vmihailenco/tagparser/v2 v2.0.0/go.mod h1:Wri+At7QHww0WTrCBeu4J6bNtoV6mEfg5OIWRZA9qds=
 github.com/wendal/errors v0.0.0-20130201093226-f66c77a7882b/go.mod h1:Q12BUT7DqIlHRmgv3RskH+UCM/4eqVMgI0EMmlSpAXc=
 github.com/yuin/goldmark v1.1.25/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=