소스 검색

project: 框架升级

Yi 1 년 전
부모
커밋
c2af6927ee
51개의 변경된 파일1533개의 추가작업 그리고 771개의 파일을 삭제
  1. 3 1
      .gitignore
  2. 0 7
      .vscode/launch.json
  3. 7 6
      comm/comm.go
  4. 2 2
      conf/app.ini
  5. 32 40
      conf/setting/setting.go
  6. 120 0
      conf/setting/snowflake.go
  7. 92 0
      go.mod
  8. 602 0
      go.sum
  9. 4 3
      http/handle/api/chart.go
  10. 10 9
      http/handle/api/db.go
  11. 17 18
      http/handle/api/ftjudge.go
  12. 11 13
      http/handle/api/grfdApi.go
  13. 4 3
      http/handle/api/lpplandtl.go
  14. 4 3
      http/handle/api/material.go
  15. 4 3
      http/handle/api/mqtt.go
  16. 2 1
      http/handle/api/report.go
  17. 10 9
      http/handle/api/scheduled.go
  18. 2 0
      http/handle/api/scheduled_test.go
  19. 5 5
      http/handle/api/spillage.go
  20. 6 5
      http/handle/api/udsync.go
  21. 6 5
      http/handle/api/upload.go
  22. 8 7
      http/handle/api/user.go
  23. 1 1
      http/handle/restful/sql_utils - 副本.gocopy
  24. 2 3
      http/handle/restful/sql_utils.go
  25. 1 0
      http/handle/restful/user.go
  26. 5 4
      http/handle/sap/sap.go
  27. 11 8
      http/handle/v1/menu.go
  28. 11 9
      http/handle/v1/role.go
  29. 4 3
      http/handle/zc/zc.go
  30. 217 0
      http/routers/app_api.go
  31. 24 0
      http/routers/root.go
  32. 19 0
      http/routers/router.go
  33. 29 0
      http/server.go
  34. 35 65
      main.go
  35. 46 0
      middleware/cors.go
  36. 8 5
      middleware/inject/inject.go
  37. 4 3
      middleware/jwt/jwt.go
  38. 2 8
      middleware/permission/permissions.go
  39. 10 39
      models/models.go
  40. 1 1
      pkg/app/request.go
  41. 4 4
      pkg/app/response.go
  42. 4 10
      pkg/logging/file.go
  43. 31 48
      pkg/logging/log.go
  44. 78 93
      pkg/util/grfdApiUtil.go
  45. 9 9
      pkg/util/httppostdata.go
  46. 3 6
      pkg/util/jwt.go
  47. 4 9
      pkg/util/pagination.go
  48. BIN
      routers/api/__debug_bin.exe
  49. 0 287
      routers/router.go
  50. 16 14
      service/apisql_service/apisql_service.go
  51. 3 2
      service/user_service/user.go

+ 3 - 1
.gitignore

@@ -17,4 +17,6 @@ runtime/*
 */vendor
 logs/*
 go-admin*
-go-admin.exe
+go-admin.exe
+
+.vscode

+ 0 - 7
.vscode/launch.json

@@ -1,7 +0,0 @@
-{
-    // 使用 IntelliSense 了解相关属性。 
-    // 悬停以查看现有属性的描述。
-    // 欲了解更多信息,请访问: https://go.microsoft.com/fwlink/?linkid=830387
-    "version": "0.2.0",
-    "configurations": []
-}

+ 7 - 6
comm/comm.go

@@ -1,19 +1,20 @@
 package comm
 
 import (
-	"../pkg/app"
-	"../pkg/e"
-	"../pkg/setting"
-	"../routers/restful"
 	"encoding/hex"
 	"fmt"
-	"github.com/gin-gonic/gin"
-	"github.com/jacobsa/go-serial/serial"
 	"log"
 	"net/http"
 	"reflect"
 	"time"
+	"tmr-watch/conf/setting"
+	"tmr-watch/http/handle/restful"
+	"tmr-watch/pkg/app"
+	"tmr-watch/pkg/e"
 	"unsafe"
+
+	"github.com/gin-gonic/gin"
+	"github.com/jacobsa/go-serial/serial"
 )
 
 //一个已经被关闭的channel不会阻塞,已经被关闭的channel会实时返回

+ 2 - 2
conf/app.ini

@@ -47,7 +47,7 @@ Type = mysql
 User = root
 #Password = root
 #Host = 192.168.1.93:3326
-Host = 127.0.0.1:3316
+Host = 127.0.0.1:3306
 #Name = haiyuan
 #Password = root
 #Password = root
@@ -57,7 +57,7 @@ Host = 127.0.0.1:3316
 #Password = keep
 
 #Password = kptzhu@163.com
-Password = root
+Password = 123456
 #Password = kepaiteng!QAZ
 #Host = 47.92.52.73:3306
 #Host = 127.0.0.1:3306

+ 32 - 40
pkg/setting/setting.go → conf/setting/setting.go

@@ -12,7 +12,18 @@ import (
 
 	"github.com/go-ini/ini"
 	"github.com/jacobsa/go-serial/serial"
-	"github.com/kptyun/KPTCOMM/pkg/util"
+)
+
+var (
+	AppSetting       = &App{}
+	ServerSetting    = &Server{}
+	CommSetting      = &serial.OpenOptions{}
+	SnowIds          *IdWorker
+	DatabaseSetting  = &Database{}
+	SQlserverSetting = &SQlserver{}
+	YynserverSetting = &Yyn{}
+	cfg              *ini.File
+	CurrentPath      string
 )
 
 type App struct {
@@ -44,8 +55,6 @@ type App struct {
 	TimeFormat  string
 }
 
-var AppSetting = &App{}
-
 type Server struct {
 	RunMode          string
 	HttpPort         int
@@ -65,11 +74,6 @@ type Server struct {
 	GRFDURL          string
 }
 
-var ServerSetting = &Server{}
-
-var CommSetting = &serial.OpenOptions{}
-var SnowIds *util.IdWorker
-
 type Database struct {
 	Type          string
 	User          string
@@ -97,37 +101,6 @@ type Yyn struct {
 	HeartBeat    string
 }
 
-var DatabaseSetting = &Database{}
-
-var SQlserverSetting = &SQlserver{}
-
-var YynserverSetting = &Yyn{}
-
-var cfg *ini.File
-
-var CurrentPath string
-
-func GetCurrentPath() (string, error) {
-	file, err := exec.LookPath(os.Args[0])
-	if err != nil {
-		return "", err
-	}
-	path, err := filepath.Abs(file)
-	if err != nil {
-		return "", err
-	}
-	//fmt.Println("path111:", path)
-	if runtime.GOOS == "windows" {
-		path = strings.Replace(path, "\\", "/", -1)
-	}
-	//fmt.Println("path222:", path)
-	i := strings.LastIndex(path, "/")
-	if i < 0 {
-		return "", errors.New(`Can't find "/" or "\".`)
-	}
-	//fmt.Println("path333:", path)
-	return string(path[0 : i+1]), nil
-}
 func Setup(dir string) {
 	var err error
 	if strings.Trim(dir, " ") == "" {
@@ -140,7 +113,7 @@ func Setup(dir string) {
 		log.Fatalf("setting.Setup, fail to parse 'conf/app.ini': %v", err)
 	}
 
-	SnowIds, err = util.NewIdWorker(1)
+	SnowIds, err = NewIdWorker(1)
 	if err != nil {
 		log.Fatalf("setting.Setup, fail to create SnowIds: %v", err)
 	}
@@ -163,6 +136,25 @@ func Setup(dir string) {
 
 }
 
+func GetCurrentPath() (string, error) {
+	file, err := exec.LookPath(os.Args[0])
+	if err != nil {
+		return "", err
+	}
+	path, err := filepath.Abs(file)
+	if err != nil {
+		return "", err
+	}
+	if runtime.GOOS == "windows" {
+		path = strings.Replace(path, "\\", "/", -1)
+	}
+	i := strings.LastIndex(path, "/")
+	if i < 0 {
+		return "", errors.New(`Can't find "/" or "\".`)
+	}
+	return path[0 : i+1], nil
+}
+
 func mapTo(section string, v interface{}) {
 	err := cfg.Section(section).MapTo(v)
 	if err != nil {

+ 120 - 0
conf/setting/snowflake.go

@@ -0,0 +1,120 @@
+package setting
+
+import (
+	"errors"
+	"fmt"
+	"sync"
+	"time"
+)
+
+const (
+	twepoch        = int64(1417937700000) // 默认起始的时间戳 1449473700000 。计算时,减去这个值
+	DistrictIdBits = uint(5)              //区域 所占用位置
+	NodeIdBits     = uint(9)              //节点 所占位置
+	sequenceBits   = uint(10)             //自增ID 所占用位置
+
+	/*
+	 * 1 符号位  |  39 时间戳                                     | 5 区域  |  9 节点       | 10 (毫秒内)自增ID
+	 * 0        |  0000000 00000000 00000000 00000000 00000000  | 00000  | 000000 000   |  000000 0000
+	 *
+	 */
+	maxNodeId     = -1 ^ (-1 << NodeIdBits)     //节点 ID 最大范围
+	maxDistrictId = -1 ^ (-1 << DistrictIdBits) //最大区域范围
+
+	nodeIdShift        = sequenceBits //左移次数
+	DistrictIdShift    = sequenceBits + NodeIdBits
+	timestampLeftShift = sequenceBits + NodeIdBits + DistrictIdBits
+	sequenceMask       = -1 ^ (-1 << sequenceBits)
+	maxNextIdsNum      = 100 //单次获取ID的最大数量
+)
+
+type IdWorker struct {
+	sequence      int64 //序号
+	lastTimestamp int64 //最后时间戳
+	nodeId        int64 //节点ID
+	twepoch       int64
+	districtId    int64
+	mutex         sync.Mutex
+}
+
+// NewIdWorker new a snowflake id generator object.
+func NewIdWorker(NodeId int64) (*IdWorker, error) {
+	var districtId int64
+	districtId = 1 //暂时默认给1 ,方便以后扩展
+	idWorker := &IdWorker{}
+	if NodeId > maxNodeId || NodeId < 0 {
+		fmt.Sprintf("NodeId Id can't be greater than %d or less than 0", maxNodeId)
+		return nil, errors.New(fmt.Sprintf("NodeId Id: %d error", NodeId))
+	}
+	if districtId > maxDistrictId || districtId < 0 {
+		fmt.Sprintf("District Id can't be greater than %d or less than 0", maxDistrictId)
+		return nil, errors.New(fmt.Sprintf("District Id: %d error", districtId))
+	}
+	idWorker.nodeId = NodeId
+	idWorker.districtId = districtId
+	idWorker.lastTimestamp = -1
+	idWorker.sequence = 0
+	idWorker.twepoch = twepoch
+	idWorker.mutex = sync.Mutex{}
+	fmt.Sprintf("worker starting. timestamp left shift %d, District id bits %d, worker id bits %d, sequence bits %d, workerid %d", timestampLeftShift, DistrictIdBits, NodeIdBits, sequenceBits, NodeId)
+	return idWorker, nil
+}
+
+// timeGen generate a unix millisecond.
+func timeGen() int64 {
+	return time.Now().UnixNano() / int64(time.Millisecond)
+}
+
+// tilNextMillis spin wait till next millisecond.
+func tilNextMillis(lastTimestamp int64) int64 {
+	timestamp := timeGen()
+	for timestamp <= lastTimestamp {
+		timestamp = timeGen()
+	}
+	return timestamp
+}
+
+// NextId get a snowflake id.
+func (id *IdWorker) NextId() (int64, error) {
+	id.mutex.Lock()
+	defer id.mutex.Unlock()
+	return id.nextid()
+}
+
+// NextIds get snowflake ids.
+func (id *IdWorker) NextIds(num int) ([]int64, error) {
+	if num > maxNextIdsNum || num < 0 {
+		fmt.Sprintf("NextIds num can't be greater than %d or less than 0", maxNextIdsNum)
+		return nil, errors.New(fmt.Sprintf("NextIds num: %d error", num))
+	}
+	ids := make([]int64, num)
+	id.mutex.Lock()
+	defer id.mutex.Unlock()
+	for i := 0; i < num; i++ {
+		ids[i], _ = id.nextid()
+	}
+	return ids, nil
+}
+
+func (id *IdWorker) nextid() (int64, error) {
+	//取毫秒时间戳
+	timestamp := timeGen()
+	//id.lastTimestamp 最后的时间戳
+	if timestamp < id.lastTimestamp {
+		//    fmt.Sprintf("clock is moving backwards.  Rejecting requests until %d.", id.lastTimestamp)
+		return 0, errors.New(fmt.Sprintf("Clock moved backwards.  Refusing to generate id for %d milliseconds", id.lastTimestamp-timestamp))
+	}
+
+	// 最后时间戳 = 当前时间戳
+	if id.lastTimestamp == timestamp {
+		// sequence 序号
+		id.sequence = (id.sequence + 1) & sequenceMask
+		if id.sequence == 0 {
+			timestamp = tilNextMillis(id.lastTimestamp)
+		}
+	} else {
+		id.sequence = 0
+	}
+	id.lastTimestamp = timestamp
+	return ((timestamp - id.twepoch) << timestampLeftShift) | (id.districtId << DistrictIdShift) | (id.nodeId << nodeIdShift) | id.sequence, nil
+}

+ 92 - 0
go.mod

@@ -0,0 +1,92 @@
+module tmr-watch
+
+go 1.17
+
+require (
+	github.com/360EntSecGroup-Skylar/excelize v1.4.1
+	github.com/Anderson-Lu/gofasion v0.0.0-20190530065914-6a05b679ee48
+	github.com/Knetic/govaluate v3.0.1-0.20171022003610-9aa49832a739+incompatible
+	github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751
+	github.com/astaxie/beego v1.12.3
+	github.com/axetroy/go-fs v1.0.0
+	github.com/casbin/casbin v1.9.1
+	github.com/denisenkom/go-mssqldb v0.12.3
+	github.com/dgrijalva/jwt-go v3.2.0+incompatible
+	github.com/eclipse/paho.mqtt.golang v1.4.2
+	github.com/fastwego/offiaccount v1.0.1
+	github.com/gin-contrib/gzip v0.0.6
+	github.com/gin-gonic/gin v1.9.0
+	github.com/go-ini/ini v1.67.0
+	github.com/go-sql-driver/mysql v1.7.1
+	github.com/hequan2017/go-admin v1.4.0
+	github.com/jacobsa/go-serial v0.0.0-20180131005756-15cf729a72d4
+	github.com/json-iterator/go v1.1.12
+	github.com/kardianos/service v1.2.2
+	github.com/nfnt/resize v0.0.0-20180221191011-83c6a9932646
+	github.com/patrickmn/go-cache v2.1.0+incompatible
+	github.com/pkg/errors v0.9.1
+	github.com/recoilme/slowpoke v2.0.1+incompatible
+	github.com/robfig/cron v1.2.0
+	github.com/swaggo/gin-swagger v1.2.0
+	github.com/swaggo/swag v1.16.1
+	github.com/tealeg/xlsx v1.0.5
+	github.com/xormplus/xorm v0.0.0-20210822100304-4e1d4fcc1e67
+)
+
+require (
+	github.com/Chronokeeper/anyxml v0.0.0-20160530174208-54457d8e98c6 // indirect
+	github.com/CloudyKit/fastprinter v0.0.0-20200109182630-33d98a066a53 // indirect
+	github.com/CloudyKit/jet v2.1.2+incompatible // indirect
+	github.com/KyleBanks/depth v1.2.1 // indirect
+	github.com/PuerkitoBio/purell v1.1.1 // indirect
+	github.com/PuerkitoBio/urlesc v0.0.0-20170810143723-de5bf2ad4578 // indirect
+	github.com/agrison/go-tablib v0.0.0-20160310143025-4930582c22ee // indirect
+	github.com/agrison/mxj v0.0.0-20160310142625-1269f8afb3b4 // indirect
+	github.com/bndr/gotabulate v1.1.2 // indirect
+	github.com/bytedance/sonic v1.9.1 // indirect
+	github.com/chenzhuoyu/base64x v0.0.0-20221115062448-fe3a3abad311 // indirect
+	github.com/clbanning/mxj v1.8.4 // indirect
+	github.com/faabiosr/cachego v0.15.0 // indirect
+	github.com/fatih/structs v1.1.0 // indirect
+	github.com/fsnotify/fsnotify v1.4.9 // indirect
+	github.com/gabriel-vasile/mimetype v1.4.2 // indirect
+	github.com/gin-contrib/sse v0.1.0 // indirect
+	github.com/go-openapi/jsonpointer v0.19.5 // indirect
+	github.com/go-openapi/jsonreference v0.19.6 // indirect
+	github.com/go-openapi/spec v0.20.4 // indirect
+	github.com/go-openapi/swag v0.19.15 // indirect
+	github.com/go-playground/locales v0.14.1 // indirect
+	github.com/go-playground/universal-translator v0.18.1 // indirect
+	github.com/go-playground/validator/v10 v10.14.0 // indirect
+	github.com/goccy/go-json v0.10.2 // indirect
+	github.com/golang-sql/civil v0.0.0-20190719163853-cb61b32ac6fe // indirect
+	github.com/golang-sql/sqlexp v0.1.0 // indirect
+	github.com/golang/snappy v0.0.0-20180518054509-2e65f85255db // indirect
+	github.com/gorilla/websocket v1.4.2 // indirect
+	github.com/josharian/intern v1.0.0 // indirect
+	github.com/klauspost/cpuid/v2 v2.2.4 // indirect
+	github.com/leodido/go-urn v1.2.4 // indirect
+	github.com/mailru/easyjson v0.7.6 // indirect
+	github.com/mattn/go-isatty v0.0.19 // indirect
+	github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect
+	github.com/modern-go/reflect2 v1.0.2 // indirect
+	github.com/mohae/deepcopy v0.0.0-20170929034955-c48cc78d4826 // indirect
+	github.com/pelletier/go-toml/v2 v2.0.8 // indirect
+	github.com/recoilme/pudge v1.0.3 // indirect
+	github.com/shiena/ansicolor v0.0.0-20151119151921-a422bbe96644 // indirect
+	github.com/syndtr/goleveldb v0.0.0-20181127023241-353a9fca669c // indirect
+	github.com/twitchyliquid64/golang-asm v0.15.1 // indirect
+	github.com/ugorji/go/codec v1.2.11 // indirect
+	github.com/xormplus/builder v0.0.0-20200331055651-240ff40009be // indirect
+	golang.org/x/arch v0.3.0 // indirect
+	golang.org/x/crypto v0.9.0 // indirect
+	golang.org/x/net v0.10.0 // indirect
+	golang.org/x/sync v0.1.0 // indirect
+	golang.org/x/sys v0.8.0 // indirect
+	golang.org/x/text v0.9.0 // indirect
+	golang.org/x/tools v0.7.0 // indirect
+	google.golang.org/protobuf v1.30.0 // indirect
+	gopkg.in/flosch/pongo2.v3 v3.0.0-20141028000813-5e81b817a0c4 // indirect
+	gopkg.in/yaml.v2 v2.4.0 // indirect
+	gopkg.in/yaml.v3 v3.0.1 // indirect
+)

+ 602 - 0
go.sum

@@ -0,0 +1,602 @@
+cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw=
+cloud.google.com/go v0.34.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw=
+cloud.google.com/go v0.37.4/go.mod h1:NHPJ89PdicEuT9hdPXMROBD91xc5uRDxsMtSB16k7hw=
+gitea.com/xorm/sqlfiddle v0.0.0-20180821085327-62ce714f951a h1:lSA0F4e9A2NcQSqGqTOXqu2aRi/XEQxDCBwM8yJtE6s=
+gitea.com/xorm/sqlfiddle v0.0.0-20180821085327-62ce714f951a/go.mod h1:EXuID2Zs0pAQhH8yz+DNjUbjppKQzKFAn28TMYPB6IU=
+github.com/360EntSecGroup-Skylar/excelize v1.4.1 h1:l55mJb6rkkaUzOpSsgEeKYtS6/0gHwBYyfo5Jcjv/Ks=
+github.com/360EntSecGroup-Skylar/excelize v1.4.1/go.mod h1:vnax29X2usfl7HHkBrX5EvSCJcmH3dT9luvxzu8iGAE=
+github.com/Anderson-Lu/gofasion v0.0.0-20190530065914-6a05b679ee48 h1:Y0um3nHCQDleEpQzahJAkT8mvKTlLqvjoIqZYIAJgAw=
+github.com/Anderson-Lu/gofasion v0.0.0-20190530065914-6a05b679ee48/go.mod h1:nJfnu9e1b/lczgULa3laeoUzeadR3ylEgYj8zpXO+Wc=
+github.com/Azure/azure-sdk-for-go/sdk/azcore v0.19.0/go.mod h1:h6H6c8enJmmocHUbLiiGY6sx7f9i+X3m1CHdd5c6Rdw=
+github.com/Azure/azure-sdk-for-go/sdk/azidentity v0.11.0/go.mod h1:HcM1YX14R7CJcghJGOYCgdezslRSVzqwLf/q+4Y2r/0=
+github.com/Azure/azure-sdk-for-go/sdk/internal v0.7.0/go.mod h1:yqy467j36fJxcRV2TzfVZ1pCb5vxm4BtZPUdYWe/Xo8=
+github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU=
+github.com/Chronokeeper/anyxml v0.0.0-20160530174208-54457d8e98c6 h1:Etfj2lhXyrYemgmWzEtEQQb1kezeEXc8jVjkQUyJnWI=
+github.com/Chronokeeper/anyxml v0.0.0-20160530174208-54457d8e98c6/go.mod h1:YzuYAe2hrrwKXkM9kqjbkTLlkbA+/xw2MA46f1+ENxc=
+github.com/CloudyKit/fastprinter v0.0.0-20200109182630-33d98a066a53 h1:sR+/8Yb4slttB4vD+b9btVEnWgL3Q00OBTzVT8B9C0c=
+github.com/CloudyKit/fastprinter v0.0.0-20200109182630-33d98a066a53/go.mod h1:+3IMCy2vIlbG1XG/0ggNQv0SvxCAIpPM5b1nCz56Xno=
+github.com/CloudyKit/jet v2.1.2+incompatible h1:ybZoYzMBdoijK6I+Ke3vg9GZsmlKo/ZhKdNMWz0P26c=
+github.com/CloudyKit/jet v2.1.2+incompatible/go.mod h1:HPYO+50pSWkPoj9Q/eq0aRGByCL6ScRlUmiEX5Zgm+w=
+github.com/Knetic/govaluate v3.0.0+incompatible/go.mod h1:r7JcOSlj0wfOMncg0iLm8Leh48TZaKVeNIfJntJ2wa0=
+github.com/Knetic/govaluate v3.0.1-0.20171022003610-9aa49832a739+incompatible h1:1G1pk05UrOh0NlF1oeaaix1x8XzrfjIDK47TY0Zehcw=
+github.com/Knetic/govaluate v3.0.1-0.20171022003610-9aa49832a739+incompatible/go.mod h1:r7JcOSlj0wfOMncg0iLm8Leh48TZaKVeNIfJntJ2wa0=
+github.com/KyleBanks/depth v1.2.1 h1:5h8fQADFrWtarTdtDudMmGsC7GPbOAu6RVB3ffsVFHc=
+github.com/KyleBanks/depth v1.2.1/go.mod h1:jzSb9d0L43HxTQfT+oSA1EEp2q+ne2uh6XgeJcm8brE=
+github.com/OwnLocal/goes v1.0.0/go.mod h1:8rIFjBGTue3lCU0wplczcUgt9Gxgrkkrw7etMIcn8TM=
+github.com/PuerkitoBio/purell v1.1.0/go.mod h1:c11w/QuzBsJSee3cPx9rAFu61PvFxuPbtSwDGJws/X0=
+github.com/PuerkitoBio/purell v1.1.1 h1:WEQqlqaGbrPkxLJWfBwQmfEAE1Z7ONdDLqrN38tNFfI=
+github.com/PuerkitoBio/purell v1.1.1/go.mod h1:c11w/QuzBsJSee3cPx9rAFu61PvFxuPbtSwDGJws/X0=
+github.com/PuerkitoBio/urlesc v0.0.0-20170810143723-de5bf2ad4578 h1:d+Bc7a5rLufV/sSk/8dngufqelfh6jnri85riMAaF/M=
+github.com/PuerkitoBio/urlesc v0.0.0-20170810143723-de5bf2ad4578/go.mod h1:uGdkoq3SwY9Y+13GIhn11/XLaGBb4BfwItxLd5jeuXE=
+github.com/Shopify/sarama v1.19.0/go.mod h1:FVkBWblsNy7DGZRfXLU0O9RCGt5g3g3yEuWXgklEdEo=
+github.com/Shopify/toxiproxy v2.1.4+incompatible/go.mod h1:OXgGpZ6Cli1/URJOF1DMxUHB2q5Ap20/P/eIdh4G0pI=
+github.com/agrison/go-tablib v0.0.0-20160310143025-4930582c22ee h1:0RklYSvekYaIFI9JUx7TFPQvo++TdILmZiV17QI4nXk=
+github.com/agrison/go-tablib v0.0.0-20160310143025-4930582c22ee/go.mod h1:M9nmO4lBRWR/bBv7UCOmDJ1MB2DVoqz19B4JchDA+K0=
+github.com/agrison/mxj v0.0.0-20160310142625-1269f8afb3b4 h1:XBNSe5eibe5Fh131ah+xnO6s4A97U1T3tKZKLQQvqu0=
+github.com/agrison/mxj v0.0.0-20160310142625-1269f8afb3b4/go.mod h1:n7qJAqL9BKqGqiJyjPbWtxpdswTL5wX0IVP2Uw4vVhQ=
+github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc=
+github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751 h1:JYp7IbQjafoB+tBA3gMyHYHrpOtNuDiK/uB5uXxq5wM=
+github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc=
+github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0=
+github.com/alecthomas/units v0.0.0-20190717042225-c3de453c63f4/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0=
+github.com/alicebob/gopher-json v0.0.0-20180125190556-5a6b3ba71ee6/go.mod h1:SGnFV6hVsYE877CKEZ6tDNTjaSXYUk6QqoIK6PrAtcc=
+github.com/alicebob/miniredis v2.5.0+incompatible/go.mod h1:8HZjEj4yU0dwhYHky+DxYx+6BMjkBbe5ONFIF1MXffk=
+github.com/apache/thrift v0.12.0/go.mod h1:cp2SuWMxlEZw2r+iP2GNCdIi4C1qmUzdZFSVb+bacwQ=
+github.com/astaxie/beego v1.12.0/go.mod h1:fysx+LZNZKnvh4GED/xND7jWtjCR6HzydR2Hh2Im57o=
+github.com/astaxie/beego v1.12.3 h1:SAQkdD2ePye+v8Gn1r4X6IKZM1wd28EyUOVQ3PDSOOQ=
+github.com/astaxie/beego v1.12.3/go.mod h1:p3qIm0Ryx7zeBHLljmd7omloyca1s4yu1a8kM1FkpIA=
+github.com/axetroy/go-fs v1.0.0 h1:un0mpbpYjOQirgdlKlZlzTjF30DZwYwK+ObWMxubAXA=
+github.com/axetroy/go-fs v1.0.0/go.mod h1:Z4DMBpJRluxG178MMNZvixPIL2+j6nh+tBX0nGQeFDY=
+github.com/beego/goyaml2 v0.0.0-20130207012346-5545475820dd/go.mod h1:1b+Y/CofkYwXMUU0OhQqGvsY2Bvgr4j6jfT699wyZKQ=
+github.com/beego/x2j v0.0.0-20131220205130-a0352aadc542/go.mod h1:kSeGC/p1AbBiEp5kat81+DSQrZenVBZXklMLaELspWU=
+github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q=
+github.com/beorn7/perks v1.0.0/go.mod h1:KWe93zE9D1o94FZ5RNwFwVgaQK1VOXiVxmqh+CedLV8=
+github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw=
+github.com/bndr/gotabulate v1.1.2 h1:yC9izuZEphojb9r+KYL4W9IJKO/ceIO8HDwxMA24U4c=
+github.com/bndr/gotabulate v1.1.2/go.mod h1:0+8yUgaPTtLRTjf49E8oju7ojpU11YmXyvq1LbPAb3U=
+github.com/bradfitz/gomemcache v0.0.0-20170208213004-1952afaa557d/go.mod h1:PmM6Mmwb0LSuEubjR8N7PtNe1KxZLtOUHtbeikc5h60=
+github.com/bradfitz/gomemcache v0.0.0-20180710155616-bc664df96737/go.mod h1:PmM6Mmwb0LSuEubjR8N7PtNe1KxZLtOUHtbeikc5h60=
+github.com/bytedance/sonic v1.5.0/go.mod h1:ED5hyg4y6t3/9Ku1R6dU/4KyJ48DZ4jPhfY1O2AihPM=
+github.com/bytedance/sonic v1.8.0/go.mod h1:i736AoUSYt75HyZLoJW9ERYxcy6eaN6h4BZXU064P/U=
+github.com/bytedance/sonic v1.9.1 h1:6iJ6NqdoxCDr6mbY8h18oSO+cShGSMRGCEo7F2h0x8s=
+github.com/bytedance/sonic v1.9.1/go.mod h1:i736AoUSYt75HyZLoJW9ERYxcy6eaN6h4BZXU064P/U=
+github.com/casbin/casbin v1.7.0/go.mod h1:c67qKN6Oum3UF5Q1+BByfFxkwKvhwW57ITjqwtzR1KE=
+github.com/casbin/casbin v1.9.1 h1:ucjbS5zTrmSLtH4XogqOG920Poe6QatdXtz1FEbApeM=
+github.com/casbin/casbin v1.9.1/go.mod h1:z8uPsfBJGUsnkagrt3G8QvjgTKFMBJ32UP8HpZllfog=
+github.com/cespare/xxhash/v2 v2.1.1/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs=
+github.com/chenzhuoyu/base64x v0.0.0-20211019084208-fb5309c8db06/go.mod h1:DH46F32mSOjUmXrMHnKwZdA8wcEefY7UVqBKYGjpdQY=
+github.com/chenzhuoyu/base64x v0.0.0-20221115062448-fe3a3abad311 h1:qSGYFH7+jGhDF8vLC+iwCD4WpbV1EBDSzWkJODFLams=
+github.com/chenzhuoyu/base64x v0.0.0-20221115062448-fe3a3abad311/go.mod h1:b583jCggY9gE99b6G5LEC39OIiVsWj+R97kbl5odCEk=
+github.com/clbanning/mxj v1.8.4 h1:HuhwZtbyvyOw+3Z1AowPkU87JkJUSv751ELWaiTpj8I=
+github.com/clbanning/mxj v1.8.4/go.mod h1:BVjHeAH+rl9rs6f+QIpeRl0tfu10SXn1pUSa5PVGJng=
+github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw=
+github.com/cloudflare/golz4 v0.0.0-20150217214814-ef862a3cdc58/go.mod h1:EOBUe0h4xcZ5GoxqC5SDxFQ8gwyZPKQoEzownBlhI80=
+github.com/couchbase/go-couchbase v0.0.0-20181122212707-3e9b6e1258bb/go.mod h1:TWI8EKQMs5u5jLKW/tsb9VwauIrMIxQG1r5fMsswK5U=
+github.com/couchbase/go-couchbase v0.0.0-20200519150804-63f3cdb75e0d/go.mod h1:TWI8EKQMs5u5jLKW/tsb9VwauIrMIxQG1r5fMsswK5U=
+github.com/couchbase/gomemcached v0.0.0-20181122193126-5125a94a666c/go.mod h1:srVSlQLB8iXBVXHgnqemxUXqN6FCvClgCMPCsjBDR7c=
+github.com/couchbase/gomemcached v0.0.0-20200526233749-ec430f949808/go.mod h1:srVSlQLB8iXBVXHgnqemxUXqN6FCvClgCMPCsjBDR7c=
+github.com/couchbase/goutils v0.0.0-20180530154633-e865a1461c8a/go.mod h1:BQwMFlJzDjFDG3DJUdU0KORxn88UlsOULuxLExMh3Hs=
+github.com/cpuguy83/go-md2man/v2 v2.0.0-20190314233015-f79a8a8ca69d/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU=
+github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E=
+github.com/cupcake/rdb v0.0.0-20161107195141-43ba34106c76/go.mod h1:vYwsqCOLxGiisLwp9rITslkFNpZD5rz43tf41QFkTWY=
+github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
+github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
+github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
+github.com/denisenkom/go-mssqldb v0.0.0-20190515213511-eb9f6a1743f3/go.mod h1:zAg7JM8CkOJ43xKXIj7eRO9kmWm/TW578qo+oDO6tuM=
+github.com/denisenkom/go-mssqldb v0.12.3 h1:pBSGx9Tq67pBOTLmxNuirNTeB8Vjmf886Kx+8Y+8shw=
+github.com/denisenkom/go-mssqldb v0.12.3/go.mod h1:k0mtMFOnU+AihqFxPMiF05rtiDrorD1Vrm1KEz5hxDo=
+github.com/dgrijalva/jwt-go v3.2.0+incompatible h1:7qlOGliEKZXTDg6OTjfoBKDXWrumCAMpl/TFQ4/5kLM=
+github.com/dgrijalva/jwt-go v3.2.0+incompatible/go.mod h1:E3ru+11k8xSBh+hMPgOLZmtrrCbhqsmaPHjLKYnJCaQ=
+github.com/dnaeon/go-vcr v1.2.0/go.mod h1:R4UdLID7HZT3taECzJs4YgbbH6PIGXB6W/sc5OLb6RQ=
+github.com/eapache/go-resiliency v1.1.0/go.mod h1:kFI+JgMyC7bLPUVY133qvEBtVayf5mFgVsvEsIPBvNs=
+github.com/eapache/go-xerial-snappy v0.0.0-20180814174437-776d5712da21/go.mod h1:+020luEh2TKB4/GOp8oxxtq0Daoen/Cii55CzbTV6DU=
+github.com/eapache/queue v1.1.0/go.mod h1:6eCeP0CKFpHLu8blIFXhExK/dRa7WDZfr6jVFPTqq+I=
+github.com/eclipse/paho.mqtt.golang v1.4.2 h1:66wOzfUHSSI1zamx7jR6yMEI5EuHnT1G6rNA5PM12m4=
+github.com/eclipse/paho.mqtt.golang v1.4.2/go.mod h1:JGt0RsEwEX+Xa/agj90YJ9d9DH2b7upDZMK9HRbFvCA=
+github.com/edsrzf/mmap-go v0.0.0-20170320065105-0bce6a688712/go.mod h1:YO35OhQPt3KJa3ryjFM5Bs14WD66h8eGKpfaBNrHW5M=
+github.com/elastic/go-elasticsearch/v6 v6.8.5/go.mod h1:UwaDJsD3rWLM5rKNFzv9hgox93HoX8utj1kxD9aFUcI=
+github.com/elazarl/go-bindata-assetfs v1.0.0/go.mod h1:v+YaWX3bdea5J/mo8dSETolEo7R71Vk1u8bnjau5yw4=
+github.com/erikstmartin/go-testdb v0.0.0-20160219214506-8d10e4a1bae5/go.mod h1:a2zkGnVExMxdzMo3M0Hi/3sEU+cWnZpSni0O6/Yb/P0=
+github.com/faabiosr/cachego v0.15.0 h1:IqcDhvzMbL4a1c9Dek88DIWJYQ5HG//L0PKCReneOA4=
+github.com/faabiosr/cachego v0.15.0/go.mod h1:L2EomlU3/rUWjzFavY9Fwm8B4zZmX2X6u8kTMkETrwI=
+github.com/facebookgo/inject v0.0.0-20180706035515-f23751cae28b/go.mod h1:oO8UHw+fDHjDsk4CTy/E96WDzFUYozAtBAaGNoVL0+c=
+github.com/facebookgo/structtag v0.0.0-20150214074306-217e25fb9691/go.mod h1:sKLL1iua/0etWfo/nPCmyz+v2XDMXy+Ho53W7RAuZNY=
+github.com/fastwego/offiaccount v1.0.1 h1:tmzc29OjteqZoAqFT9WckT+AHINmUDLJhwLHVRx8wm8=
+github.com/fastwego/offiaccount v1.0.1/go.mod h1:8roSt8OhE2CtdkKOqZnmUdjmmEaoJ2k//Bav/+4BrJQ=
+github.com/fatih/structs v1.1.0 h1:Q7juDM0QtcnhCpeyLGQKyg4TOIghuNXrkL32pHAUMxo=
+github.com/fatih/structs v1.1.0/go.mod h1:9NiDSp5zOcgEDl+j00MP/WkGVPOlPRLejGD8Ga6PJ7M=
+github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo=
+github.com/fsnotify/fsnotify v1.4.9 h1:hsms1Qyu0jgnwNXIxa+/V/PDsU6CfLf6CNO8H7IWoS4=
+github.com/fsnotify/fsnotify v1.4.9/go.mod h1:znqG4EE+3YCdAaPaxE2ZRY/06pZUdp0tY4IgpuI1SZQ=
+github.com/gabriel-vasile/mimetype v1.4.2 h1:w5qFW6JKBz9Y393Y4q372O9A7cUSequkh1Q7OhCmWKU=
+github.com/gabriel-vasile/mimetype v1.4.2/go.mod h1:zApsH/mKG4w07erKIaJPFiX0Tsq9BFQgN3qGY5GnNgA=
+github.com/garyburd/redigo v1.6.0/go.mod h1:NR3MbYisc3/PwhQ00EMzDiPmrwpPxAn5GI05/YaO1SY=
+github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04=
+github.com/gin-contrib/gzip v0.0.1/go.mod h1:fGBJBCdt6qCZuCAOwWuFhBB4OOq9EFqlo5dEaFhhu5w=
+github.com/gin-contrib/gzip v0.0.6 h1:NjcunTcGAj5CO1gn4N8jHOSIeRFHIbn51z6K+xaN4d4=
+github.com/gin-contrib/gzip v0.0.6/go.mod h1:QOJlmV2xmayAjkNS2Y8NQsMneuRShOU/kjovCXNuzzk=
+github.com/gin-contrib/sse v0.0.0-20170109093832-22d885f9ecc7/go.mod h1:VJ0WA2NBN22VlZ2dKZQPAPnyWw5XTlK1KymzLKsr59s=
+github.com/gin-contrib/sse v0.0.0-20190301062529-5545eab6dad3/go.mod h1:VJ0WA2NBN22VlZ2dKZQPAPnyWw5XTlK1KymzLKsr59s=
+github.com/gin-contrib/sse v0.1.0 h1:Y/yl/+YNO8GZSjAhjMsSuLt29uWRFHdHYUb5lYOV9qE=
+github.com/gin-contrib/sse v0.1.0/go.mod h1:RHrZQHXnP2xjPF+u1gW/2HnVO7nvIa9PG3Gm+fLHvGI=
+github.com/gin-gonic/gin v1.3.0/go.mod h1:7cKuhb5qV2ggCFctp2fJQ+ErvciLZrIeoOSOm6mUr7Y=
+github.com/gin-gonic/gin v1.4.0/go.mod h1:OW2EZn3DO8Ln9oIKOvM++LBO+5UPHJJDH72/q/3rZdM=
+github.com/gin-gonic/gin v1.8.1/go.mod h1:ji8BvRH1azfM+SYow9zQ6SZMvR8qOMZHmsCuWR9tTTk=
+github.com/gin-gonic/gin v1.9.0 h1:OjyFBKICoexlu99ctXNR2gg+c5pKrKMuyjgARg9qeY8=
+github.com/gin-gonic/gin v1.9.0/go.mod h1:W1Me9+hsUSyj3CePGrd1/QrKJMSJ1Tu/0hFEH89961k=
+github.com/glendc/gopher-json v0.0.0-20170414221815-dc4743023d0c/go.mod h1:Gja1A+xZ9BoviGJNA2E9vFkPjjsl+CoJxSXiQM1UXtw=
+github.com/go-ini/ini v1.44.0/go.mod h1:ByCAeIL28uOIIG0E3PJtZPDL8WnHpFKFOtgjp+3Ies8=
+github.com/go-ini/ini v1.67.0 h1:z6ZrTEZqSWOTyH2FlglNbNgARyHG8oLW9gMELqKr06A=
+github.com/go-ini/ini v1.67.0/go.mod h1:ByCAeIL28uOIIG0E3PJtZPDL8WnHpFKFOtgjp+3Ies8=
+github.com/go-kit/kit v0.8.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as=
+github.com/go-kit/kit v0.9.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as=
+github.com/go-logfmt/logfmt v0.3.0/go.mod h1:Qt1PoO58o5twSAckw1HlFXLmHsOX5/0LbT9GBnD5lWE=
+github.com/go-logfmt/logfmt v0.4.0/go.mod h1:3RMwSq7FuexP4Kalkev3ejPJsZTpXXBr9+V4qmtdjCk=
+github.com/go-openapi/jsonpointer v0.17.0/go.mod h1:cOnomiV+CVVwFLk0A/MExoFMjwdsUdVpsRhURCKh+3M=
+github.com/go-openapi/jsonpointer v0.19.3/go.mod h1:Pl9vOtqEWErmShwVjC8pYs9cog34VGT37dQOVbmoatg=
+github.com/go-openapi/jsonpointer v0.19.5 h1:gZr+CIYByUqjcgeLXnQu2gHYQC9o73G2XUeOFYEICuY=
+github.com/go-openapi/jsonpointer v0.19.5/go.mod h1:Pl9vOtqEWErmShwVjC8pYs9cog34VGT37dQOVbmoatg=
+github.com/go-openapi/jsonreference v0.17.0/go.mod h1:g4xxGn04lDIRh0GJb5QlpE3HfopLOL6uZrK/VgnsK9I=
+github.com/go-openapi/jsonreference v0.19.0/go.mod h1:g4xxGn04lDIRh0GJb5QlpE3HfopLOL6uZrK/VgnsK9I=
+github.com/go-openapi/jsonreference v0.19.6 h1:UBIxjkht+AWIgYzCDSv2GN+E/togfwXUJFRTWhl2Jjs=
+github.com/go-openapi/jsonreference v0.19.6/go.mod h1:diGHMEHg2IqXZGKxqyvWdfWU/aim5Dprw5bqpKkTvns=
+github.com/go-openapi/spec v0.19.0/go.mod h1:XkF/MOi14NmjsfZ8VtAKf8pIlbZzyoTvZsdfssdxcBI=
+github.com/go-openapi/spec v0.20.4 h1:O8hJrt0UMnhHcluhIdUgCLRWyM2x7QkBXRvOs7m+O1M=
+github.com/go-openapi/spec v0.20.4/go.mod h1:faYFR1CvsJZ0mNsmsphTMSoRrNV3TEDoAM7FOEWeq8I=
+github.com/go-openapi/swag v0.17.0/go.mod h1:AByQ+nYG6gQg71GINrmuDXCPWdL640yX49/kXLo40Tg=
+github.com/go-openapi/swag v0.19.5/go.mod h1:POnQmlKehdgb5mhVOsnJFsivZCEZ/vjK9gh66Z9tfKk=
+github.com/go-openapi/swag v0.19.15 h1:D2NRCBzS9/pEY3gP9Nl8aDqGUcPFrwG2p+CNFrLyrCM=
+github.com/go-openapi/swag v0.19.15/go.mod h1:QYRuS/SOXUCsnplDa677K7+DxSOj6IPNl/eQntq43wQ=
+github.com/go-playground/assert/v2 v2.0.1/go.mod h1:VDjEfimB/XKnb+ZQfWdccd7VUvScMdVu0Titje2rxJ4=
+github.com/go-playground/assert/v2 v2.2.0 h1:JvknZsQTYeFEAhQwI4qEt9cyV5ONwRHC+lYKSsYSR8s=
+github.com/go-playground/assert/v2 v2.2.0/go.mod h1:VDjEfimB/XKnb+ZQfWdccd7VUvScMdVu0Titje2rxJ4=
+github.com/go-playground/locales v0.14.0/go.mod h1:sawfccIbzZTqEDETgFXqTho0QybSa7l++s0DH+LDiLs=
+github.com/go-playground/locales v0.14.1 h1:EWaQ/wswjilfKLTECiXz7Rh+3BjFhfDFKv/oXslEjJA=
+github.com/go-playground/locales v0.14.1/go.mod h1:hxrqLVvrK65+Rwrd5Fc6F2O76J/NuW9t0sjnWqG1slY=
+github.com/go-playground/universal-translator v0.18.0/go.mod h1:UvRDBj+xPUEGrFYl+lu/H90nyDXpg0fqeB/AQUGNTVA=
+github.com/go-playground/universal-translator v0.18.1 h1:Bcnm0ZwsGyWbCzImXv+pAJnYK9S473LQFuzCbDbfSFY=
+github.com/go-playground/universal-translator v0.18.1/go.mod h1:xekY+UJKNuX9WP91TpwSH2VMlDf28Uj24BCp08ZFTUY=
+github.com/go-playground/validator/v10 v10.10.0/go.mod h1:74x4gJWsvQexRdW8Pn3dXSGrTK4nAUsbPlLADvpJkos=
+github.com/go-playground/validator/v10 v10.11.2/go.mod h1:NieE624vt4SCTJtD87arVLvdmjPAeV8BQlHtMnw9D7s=
+github.com/go-playground/validator/v10 v10.14.0 h1:vgvQWe3XCz3gIeFDm/HnTIbj6UGmg/+t63MyGU2n5js=
+github.com/go-playground/validator/v10 v10.14.0/go.mod h1:9iXMNT7sEkjXb0I+enO7QXmzG6QCsPWY4zveKFVRSyU=
+github.com/go-redis/redis v6.14.2+incompatible/go.mod h1:NAIEuMOZ/fxfXJIrKDQDz8wamY7mA7PouImQ2Jvg6kA=
+github.com/go-sql-driver/mysql v1.4.1/go.mod h1:zAC/RDZ24gD3HViQzih4MyKcchzm+sOG5ZlKdlhCg5w=
+github.com/go-sql-driver/mysql v1.5.0/go.mod h1:DCzpHaOWr8IXmIStZouvnhqoel9Qv2LBy8hT2VhHyBg=
+github.com/go-sql-driver/mysql v1.7.1 h1:lUIinVbN1DY0xBg0eMOzmmtGoHwWBbvnWubQUrtU8EI=
+github.com/go-sql-driver/mysql v1.7.1/go.mod h1:OXbVy3sEdcQ2Doequ6Z5BW6fXNQTmx+9S1MCJN5yJMI=
+github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY=
+github.com/goccy/go-json v0.9.7/go.mod h1:6MelG93GURQebXPDq3khkgXZkazVtN9CRI+MGFi0w8I=
+github.com/goccy/go-json v0.10.0/go.mod h1:6MelG93GURQebXPDq3khkgXZkazVtN9CRI+MGFi0w8I=
+github.com/goccy/go-json v0.10.2 h1:CrxCmQqYDkv1z7lO7Wbh2HN93uovUHgrECaO5ZrCXAU=
+github.com/goccy/go-json v0.10.2/go.mod h1:6MelG93GURQebXPDq3khkgXZkazVtN9CRI+MGFi0w8I=
+github.com/gogo/protobuf v1.1.1/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ=
+github.com/gogo/protobuf v1.2.0/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ=
+github.com/golang-sql/civil v0.0.0-20190719163853-cb61b32ac6fe h1:lXe2qZdvpiX5WZkZR4hgp4KJVfY3nMkvmwbVkpv1rVY=
+github.com/golang-sql/civil v0.0.0-20190719163853-cb61b32ac6fe/go.mod h1:8vg3r2VgvsThLBIFL93Qb5yWzgyZWhEmBwUJWevAkK0=
+github.com/golang-sql/sqlexp v0.1.0 h1:ZCD6MBpcuOVfGVqsEmY5/4FtYiKz6tSyUv9LPEDei6A=
+github.com/golang-sql/sqlexp v0.1.0/go.mod h1:J4ad9Vo8ZCWQ2GMrC4UCQy1JpCbwU9m3EOqtpKwwwHI=
+github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q=
+github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A=
+github.com/golang/mock v1.2.0/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A=
+github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U=
+github.com/golang/protobuf v1.3.1/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U=
+github.com/golang/protobuf v1.3.2/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U=
+github.com/golang/protobuf v1.4.0-rc.1/go.mod h1:ceaxUfeHdC40wWswd/P6IGgMaK3YpKi5j83Wpe3EHw8=
+github.com/golang/protobuf v1.4.0-rc.1.0.20200221234624-67d41d38c208/go.mod h1:xKAWHe0F5eneWXFV3EuXVDTCmh+JuBKY0li0aMyXATA=
+github.com/golang/protobuf v1.4.0-rc.2/go.mod h1:LlEzMj4AhA7rCAGe4KMBDvJI+AwstrUpVNzEA03Pprs=
+github.com/golang/protobuf v1.4.0-rc.4.0.20200313231945-b860323f09d0/go.mod h1:WU3c8KckQ9AFe+yFwt9sWVRKCVIyN9cPHBJSNnbL67w=
+github.com/golang/protobuf v1.4.0/go.mod h1:jodUvKwWbYaEsadDk5Fwe5c77LiNKVO9IDvqG2KuDX0=
+github.com/golang/protobuf v1.4.2/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI=
+github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk=
+github.com/golang/snappy v0.0.0-20170215233205-553a64147049/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q=
+github.com/golang/snappy v0.0.0-20180518054509-2e65f85255db h1:woRePGFeVFfLKN/pOkfl+p/TAqKOfFu+7KPlMVpok/w=
+github.com/golang/snappy v0.0.0-20180518054509-2e65f85255db/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q=
+github.com/gomodule/redigo v1.8.2/go.mod h1:P9dn9mFrCBvWhGE1wpxx6fgq7BAeLBk+UUUzlpkBYO0=
+github.com/gomodule/redigo v2.0.0+incompatible h1:K/R+8tc58AaqLkqG2Ol3Qk+DR/TlNuhuh457pBFPtt0=
+github.com/gomodule/redigo v2.0.0+incompatible/go.mod h1:B4C85qUVwatsJoIUNIfCRsp7qO0iAmpGFZ4EELWSbC4=
+github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ=
+github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M=
+github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU=
+github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU=
+github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
+github.com/google/go-cmp v0.5.5 h1:Khx7svrCpmxxtHBq5j2mp/xVjsi8hQMfNLvJFAlrGgU=
+github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
+github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg=
+github.com/google/martian v2.1.0+incompatible/go.mod h1:9I4somxYTbIHy5NJKHRl3wXiIaQGbYVAs8BPL6v8lEs=
+github.com/google/pprof v0.0.0-20181206194817-3ea8567a2e57/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc=
+github.com/googleapis/gax-go/v2 v2.0.4/go.mod h1:0Wqv26UfaUD9n4G6kQubkQ+KchISgw+vpHVxEJEs9eg=
+github.com/gopherjs/gopherjs v0.0.0-20181103185306-d547d1d9531e/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY=
+github.com/gorilla/context v1.1.1/go.mod h1:kBGZzfjB9CEq2AlWe17Uuf7NDRt0dE0s8S51q0aT7Yg=
+github.com/gorilla/mux v1.6.2/go.mod h1:1lud6UwP+6orDFRuTfBEV8e9/aOM/c4fVVCaMa2zaAs=
+github.com/gorilla/websocket v1.4.2 h1:+/TMaTYc4QFitKJxsQ7Yye35DkWvkdLcvGKqM+x0Ufc=
+github.com/gorilla/websocket v1.4.2/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE=
+github.com/hashicorp/golang-lru v0.5.0/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8=
+github.com/hashicorp/golang-lru v0.5.4/go.mod h1:iADmTwqILo4mZ8BN3D2Q6+9jd8WM5uGBxy+E8yxSoD4=
+github.com/hequan2017/go-admin v1.4.0 h1:qBW5tS/fy7W+WVm1sb/BUgJnAWJO921RxN5quGVNmvQ=
+github.com/hequan2017/go-admin v1.4.0/go.mod h1:2pQ5MMtxPSA9MCyRNlRsd3JU0BxYIvG6jX2p/EqZxI8=
+github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU=
+github.com/iancoleman/strcase v0.1.1/go.mod h1:SK73tn/9oHe+/Y0h39VT4UCxmurVJkR5NA7kMEAOgSE=
+github.com/jacobsa/go-serial v0.0.0-20180131005756-15cf729a72d4 h1:G2ztCwXov8mRvP0ZfjE6nAlaCX2XbykaeHdbT6KwDz0=
+github.com/jacobsa/go-serial v0.0.0-20180131005756-15cf729a72d4/go.mod h1:2RvX5ZjVtsznNZPEt4xwJXNJrM3VTZoQf7V6gk0ysvs=
+github.com/jinzhu/gorm v1.9.10/go.mod h1:Kh6hTsSGffh4ui079FHrR5Gg+5D0hgihqDcsDN2BBJY=
+github.com/jinzhu/inflection v1.0.0/go.mod h1:h+uFLlag+Qp1Va5pdKtLDYj+kHp5pxUVkryuEj+Srlc=
+github.com/jinzhu/now v1.0.1/go.mod h1:d3SSVoowX0Lcu0IBviAWJpolVfI5UJVZZ7cO71lE/z8=
+github.com/josharian/intern v1.0.0 h1:vlS4z54oSdjm0bgjRigI+G1HpF+tI+9rE5LLzOg8HmY=
+github.com/josharian/intern v1.0.0/go.mod h1:5DoeVV0s6jJacbCEi61lwdGj/aVlrQvzHFFd8Hwg//Y=
+github.com/json-iterator/go v1.1.5/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU=
+github.com/json-iterator/go v1.1.6/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU=
+github.com/json-iterator/go v1.1.10/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4=
+github.com/json-iterator/go v1.1.12 h1:PV8peI4a0ysnczrg+LtxykD8LfKY9ML6u2jnxaEnrnM=
+github.com/json-iterator/go v1.1.12/go.mod h1:e30LSqwooZae/UwlEbR2852Gd8hjQvJoHmT4TnhNGBo=
+github.com/jstemmer/go-junit-report v0.0.0-20190106144839-af01ea7f8024/go.mod h1:6v2b51hI/fHJwM22ozAgKL4VKDeJcHhJFhtBdhmNjmU=
+github.com/jtolds/gls v4.2.1+incompatible/go.mod h1:QJZ7F/aHp+rZTRtaJ1ow/lLfFfVYBRgL+9YlvaHOwJU=
+github.com/julienschmidt/httprouter v1.2.0/go.mod h1:SYymIcj16QtmaHHD7aYtjjsJG7VTCxuUUipMqKk8s4w=
+github.com/kardianos/service v1.2.2 h1:ZvePhAHfvo0A7Mftk/tEzqEZ7Q4lgnR8sGz4xu1YX60=
+github.com/kardianos/service v1.2.2/go.mod h1:CIMRFEJVL+0DS1a3Nx06NaMn4Dz63Ng6O7dl0qH0zVM=
+github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck=
+github.com/klauspost/cpuid/v2 v2.0.9/go.mod h1:FInQzS24/EEf25PyTYn52gqo7WaD8xa0213Md/qVLRg=
+github.com/klauspost/cpuid/v2 v2.2.4 h1:acbojRNwl3o09bUq+yDCtZFc1aiwaAAxtcn8YkZXnvk=
+github.com/klauspost/cpuid/v2 v2.2.4/go.mod h1:RVVoqg1df56z8g3pUjL/3lE5UfnlrJX8tyFgg4nqhuY=
+github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ=
+github.com/kr/logfmt v0.0.0-20140226030751-b84e30acd515/go.mod h1:+0opPa2QZZtGFBFZlji/RkVcI2GknAs/DXo4wKdlNEc=
+github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo=
+github.com/kr/pretty v0.2.1/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI=
+github.com/kr/pretty v0.3.0 h1:WgNl7dwNpEZ6jJ9k1snq4pZsg7DOEN8hP9Xw0Tsjwk0=
+github.com/kr/pretty v0.3.0/go.mod h1:640gp4NfQd8pI5XOwp5fnNeVWj67G7CFk/SaSQn7NBk=
+github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ=
+github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI=
+github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY=
+github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE=
+github.com/ledisdb/ledisdb v0.0.0-20200510135210-d35789ec47e6/go.mod h1:n931TsDuKuq+uX4v1fulaMbA/7ZLLhjc85h7chZGBCQ=
+github.com/leodido/go-urn v1.2.1/go.mod h1:zt4jvISO2HfUBqxjfIshjdMTYS56ZS/qv49ictyFfxY=
+github.com/leodido/go-urn v1.2.4 h1:XlAE/cm/ms7TE/VMVoduSpNBoyc2dOxHs5MZSwAN63Q=
+github.com/leodido/go-urn v1.2.4/go.mod h1:7ZrI8mTSeBSHl/UaRyKQW1qZeMgak41ANeCNaVckg+4=
+github.com/lib/pq v1.0.0/go.mod h1:5WUZQaWbwv1U+lTReE5YruASi9Al49XbQIvNi/34Woo=
+github.com/lib/pq v1.1.1/go.mod h1:5WUZQaWbwv1U+lTReE5YruASi9Al49XbQIvNi/34Woo=
+github.com/mailru/easyjson v0.0.0-20180823135443-60711f1a8329/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc=
+github.com/mailru/easyjson v0.0.0-20190614124828-94de47d64c63/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc=
+github.com/mailru/easyjson v0.0.0-20190626092158-b2ccc519800e/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc=
+github.com/mailru/easyjson v0.7.6 h1:8yTIVnZgCoiM1TgqoeTl+LfU5Jg6/xL3QhGQnimLYnA=
+github.com/mailru/easyjson v0.7.6/go.mod h1:xzfreul335JAWq5oZzymOObrkdz5UnU4kGfJJLY9Nlc=
+github.com/mattn/go-isatty v0.0.4/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4=
+github.com/mattn/go-isatty v0.0.7/go.mod h1:Iq45c/XA43vh69/j3iqttzPXn0bhXyGjM0Hdxcsrc5s=
+github.com/mattn/go-isatty v0.0.8/go.mod h1:Iq45c/XA43vh69/j3iqttzPXn0bhXyGjM0Hdxcsrc5s=
+github.com/mattn/go-isatty v0.0.14/go.mod h1:7GGIvUiUoEMVVmxf/4nioHXj79iQHKdU27kJ6hsGG94=
+github.com/mattn/go-isatty v0.0.17/go.mod h1:kYGgaQfpe5nmfYZH+SKPsOc2e4SrIfOl2e/yFXSvRLM=
+github.com/mattn/go-isatty v0.0.19 h1:JITubQf0MOLdlGRuRq+jtsDlekdYPia9ZFsB8h/APPA=
+github.com/mattn/go-isatty v0.0.19/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y=
+github.com/mattn/go-sqlite3 v1.6.0/go.mod h1:FPy6KqzDD04eiIsT53CuJW3U88zkxoIYsOqkbpncsNc=
+github.com/mattn/go-sqlite3 v1.10.0/go.mod h1:FPy6KqzDD04eiIsT53CuJW3U88zkxoIYsOqkbpncsNc=
+github.com/mattn/go-sqlite3 v2.0.3+incompatible h1:gXHsfypPkaMZrKbD5209QV9jbUTJKjyR5WD3HYQSd+U=
+github.com/mattn/go-sqlite3 v2.0.3+incompatible/go.mod h1:FPy6KqzDD04eiIsT53CuJW3U88zkxoIYsOqkbpncsNc=
+github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0=
+github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q=
+github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd h1:TRLaZ9cD/w8PVh93nsPXa1VrQ6jlwL5oN8l14QlcNfg=
+github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q=
+github.com/modern-go/reflect2 v0.0.0-20180701023420-4b7aa43c6742/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0=
+github.com/modern-go/reflect2 v1.0.1/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0=
+github.com/modern-go/reflect2 v1.0.2 h1:xBagoLtFs94CBntxluKeaWgTMpvLxC4ur3nMaC9Gz0M=
+github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk=
+github.com/modocache/gover v0.0.0-20171022184752-b58185e213c5/go.mod h1:caMODM3PzxT8aQXRPkAt8xlV/e7d7w8GM5g0fa5F0D8=
+github.com/mohae/deepcopy v0.0.0-20170929034955-c48cc78d4826 h1:RWengNIwukTxcDr9M+97sNutRR1RKhG96O6jWumTTnw=
+github.com/mohae/deepcopy v0.0.0-20170929034955-c48cc78d4826/go.mod h1:TaXosZuwdSHYgviHp1DAtfrULt5eUgsSMsZf+YrPgl8=
+github.com/mwitkow/go-conntrack v0.0.0-20161129095857-cc309e4a2223/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U=
+github.com/nfnt/resize v0.0.0-20180221191011-83c6a9932646 h1:zYyBkD/k9seD2A7fsi6Oo2LfFZAehjjQMERAvZLEDnQ=
+github.com/nfnt/resize v0.0.0-20180221191011-83c6a9932646/go.mod h1:jpp1/29i3P1S/RLdc7JQKbRpFeM1dOBd8T9ki5s+AY8=
+github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e/go.mod h1:zD1mROLANZcx1PVRCS0qkT7pwLkGfwJo4zjcN/Tysno=
+github.com/nxadm/tail v1.4.4 h1:DQuhQpB1tVlglWS2hLQ5OV6B5r8aGxSrPc5Qo6uTN78=
+github.com/nxadm/tail v1.4.4/go.mod h1:kenIhsEOeOJmVchQTgglprH7qJGnHDVpk1VPCcaMI8A=
+github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE=
+github.com/onsi/ginkgo v1.7.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE=
+github.com/onsi/ginkgo v1.12.0/go.mod h1:oUhWkIvk5aDxtKvDDuw8gItl8pKl42LzjC9KZE0HfGg=
+github.com/onsi/ginkgo v1.12.1/go.mod h1:zj2OWP4+oCPe1qIXoGWkgMRwljMUYCdkwsT2108oapk=
+github.com/onsi/ginkgo v1.13.0 h1:M76yO2HkZASFjXL0HSoZJ1AYEmQxNJmY41Jx1zNUq1Y=
+github.com/onsi/ginkgo v1.13.0/go.mod h1:+REjRxOmWfHCjfv9TTWB1jD1Frx4XydAD3zm1lskyM0=
+github.com/onsi/gomega v1.4.3/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY=
+github.com/onsi/gomega v1.7.1/go.mod h1:XdKZgCCFLUoM/7CFJVPcG8C1xQ1AJ0vpAezJrB7JYyY=
+github.com/onsi/gomega v1.10.1 h1:o0+MgICZLuZ7xjH7Vx6zS/zcu93/BEp1VwkIW1mEXCE=
+github.com/onsi/gomega v1.10.1/go.mod h1:iN09h71vgCQne3DLsj+A5owkum+a2tYe+TOCB1ybHNo=
+github.com/openzipkin/zipkin-go v0.1.6/go.mod h1:QgAqvLzwWbR/WpD4A3cGpPtJrZXNIiJc5AZX7/PBEpw=
+github.com/patrickmn/go-cache v2.1.0+incompatible h1:HRMgzkcYKYpi3C8ajMPV8OFXaaRUnok+kx1WdO15EQc=
+github.com/patrickmn/go-cache v2.1.0+incompatible/go.mod h1:3Qf8kWWT7OJRJbdiICTKqZju1ZixQ/KpMGzzAfe6+WQ=
+github.com/pelletier/go-toml v1.0.1/go.mod h1:5z9KED0ma1S8pY6P1sdut58dfprrGBbd/94hg7ilaic=
+github.com/pelletier/go-toml v1.2.0 h1:T5zMGML61Wp+FlcbWjRDT7yAxhJNAiPPLOFECq181zc=
+github.com/pelletier/go-toml v1.2.0/go.mod h1:5z9KED0ma1S8pY6P1sdut58dfprrGBbd/94hg7ilaic=
+github.com/pelletier/go-toml/v2 v2.0.1/go.mod h1:r9LEWfGN8R5k0VXJ+0BkIe7MYkRdwZOjgMj2KwnJFUo=
+github.com/pelletier/go-toml/v2 v2.0.6/go.mod h1:eumQOmlWiOPt5WriQQqoM5y18pDHwha2N+QD+EUNTek=
+github.com/pelletier/go-toml/v2 v2.0.8 h1:0ctb6s9mE31h0/lhu+J6OPmVeDxJn+kYnJc2jZR9tGQ=
+github.com/pelletier/go-toml/v2 v2.0.8/go.mod h1:vuYfssBdrU2XDZ9bYydBu6t+6a6PYNcZljzZR9VXg+4=
+github.com/peterh/liner v1.0.1-0.20171122030339-3681c2a91233/go.mod h1:xIteQHvHuaLYG9IFj6mSxM0fCKrs34IrEQUhOYuGPHc=
+github.com/pierrec/lz4 v2.0.5+incompatible/go.mod h1:pdkljMzZIN41W+lC3N2tnIh5sFi+IEE17M5jbnwPHcY=
+github.com/pkg/browser v0.0.0-20180916011732-0a3d74bf9ce4/go.mod h1:4OwLy04Bl9Ef3GJJCoec+30X3LQs/0/m4HFRt/2LUSA=
+github.com/pkg/diff v0.0.0-20210226163009-20ebb0f2a09e/go.mod h1:pJLUxLENpZxwdsKMEsNbx1VGcRFpLqf3715MtcvvzbA=
+github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
+github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
+github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4=
+github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
+github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
+github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
+github.com/prometheus/client_golang v0.9.1/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw=
+github.com/prometheus/client_golang v0.9.3-0.20190127221311-3c4408c8b829/go.mod h1:p2iRAGwDERtqlqzRXnrOVns+ignqQo//hLXqYxZYVNs=
+github.com/prometheus/client_golang v1.0.0/go.mod h1:db9x61etRT2tGnBNRi70OPL5FsnadC4Ky3P0J6CfImo=
+github.com/prometheus/client_golang v1.7.0/go.mod h1:PY5Wy2awLA44sXw4AOSfFBetzPP4j5+D6mVACh+pe2M=
+github.com/prometheus/client_model v0.0.0-20180712105110-5c3871d89910/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo=
+github.com/prometheus/client_model v0.0.0-20190115171406-56726106282f/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo=
+github.com/prometheus/client_model v0.0.0-20190129233127-fd36f4220a90/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA=
+github.com/prometheus/client_model v0.2.0/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA=
+github.com/prometheus/common v0.2.0/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4=
+github.com/prometheus/common v0.4.1/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4=
+github.com/prometheus/common v0.10.0/go.mod h1:Tlit/dnDKsSWFlCLTWaA1cyBgKHSMdTB80sz/V91rCo=
+github.com/prometheus/procfs v0.0.0-20181005140218-185b4288413d/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk=
+github.com/prometheus/procfs v0.0.0-20190117184657-bf6a532e95b1/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk=
+github.com/prometheus/procfs v0.0.2/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA=
+github.com/prometheus/procfs v0.1.3/go.mod h1:lV6e/gmhEcM9IjHGsFOCxxuZ+z1YqCvr4OA4YeYWdaU=
+github.com/rcrowley/go-metrics v0.0.0-20181016184325-3113b8401b8a/go.mod h1:bCqnVzQkZxMG4s8nGwiZ5l3QUCyqpo9Y+/ZMZ9VjZe4=
+github.com/recoilme/pudge v1.0.3 h1:h/9dEv5fRqtzM4lnO69kUoN+k7ukxxrW9NGb9ug0grM=
+github.com/recoilme/pudge v1.0.3/go.mod h1:VMvxBLVkrSStldckzCsETBXox3pfovfrnEchafXk8qA=
+github.com/recoilme/slowpoke v2.0.1+incompatible h1:55UUAkmU9zOIG2Ra7I/6PJJcg11vlVoXCiGQUVPBfwI=
+github.com/recoilme/slowpoke v2.0.1+incompatible/go.mod h1:bAQc5fISCFURi0Gp488wpYKbsu5iLLYwofS0mg9l6xI=
+github.com/robfig/cron v1.2.0 h1:ZjScXvvxeQ63Dbyxy76Fj3AT3Ut0aKsyd2/tl3DTMuQ=
+github.com/robfig/cron v1.2.0/go.mod h1:JGuDeoQd7Z6yL4zQhZ3OPEVHB7fL6Ka6skscFHfmt2k=
+github.com/rogpeppe/go-internal v1.6.1/go.mod h1:xXDCJY+GAPziupqXw64V24skbSoqbTEfhy4qGm1nDQc=
+github.com/rogpeppe/go-internal v1.8.0 h1:FCbCCtXNOY3UtUuHUYaghJg4y7Fd14rXifAYUAtL9R8=
+github.com/rogpeppe/go-internal v1.8.0/go.mod h1:WmiCO8CzOY8rg0OYDC4/i/2WRWAB6poM+XZ2dLUbcbE=
+github.com/russross/blackfriday/v2 v2.0.1/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM=
+github.com/sclevine/agouti v3.0.0+incompatible/go.mod h1:b4WX9W9L1sfQKXeJf1mUTLZKJ48R1S7H23Ji7oFO5Bw=
+github.com/shiena/ansicolor v0.0.0-20151119151921-a422bbe96644 h1:X+yvsM2yrEktyI+b2qND5gpH8YhURn0k8OCaeRnkINo=
+github.com/shiena/ansicolor v0.0.0-20151119151921-a422bbe96644/go.mod h1:nkxAfR/5quYxwPZhyDxgasBMnRtBZd0FCEpawpjMUFg=
+github.com/shurcooL/sanitized_anchor_name v1.0.0/go.mod h1:1NzhyTcUVG4SuEtjjoZeVRXNmyL/1OwPU0+IJeTBvfc=
+github.com/siddontang/go v0.0.0-20170517070808-cb568a3e5cc0/go.mod h1:3yhqj7WBBfRhbBlzyOC3gUxftwsU0u8gqevxwIHQpMw=
+github.com/siddontang/go v0.0.0-20180604090527-bdc77568d726/go.mod h1:3yhqj7WBBfRhbBlzyOC3gUxftwsU0u8gqevxwIHQpMw=
+github.com/siddontang/goredis v0.0.0-20150324035039-760763f78400/go.mod h1:DDcKzU3qCuvj/tPnimWSsZZzvk9qvkvrIL5naVBPh5s=
+github.com/siddontang/ledisdb v0.0.0-20181029004158-becf5f38d373/go.mod h1:mF1DpOSOUiJRMR+FDqaqu3EBqrybQtrDDszLUZ6oxPg=
+github.com/siddontang/rdb v0.0.0-20150307021120-fc89ed2e418d/go.mod h1:AMEsy7v5z92TR1JKMkLLoaOQk++LVnOKL3ScbJ8GNGA=
+github.com/sirupsen/logrus v1.2.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo=
+github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6MwdIuYE2rE=
+github.com/smartystreets/assertions v0.0.0-20190116191733-b6c0e53d7304/go.mod h1:OnSkiWE9lh6wB0YB77sQom3nweQdgAjqCqsofrRNTgc=
+github.com/smartystreets/goconvey v0.0.0-20181108003508-044398e4856c/go.mod h1:XDJAKZRPZ1CvBcN2aX5YOUTYGHki24fSF0Iv48Ibg0s=
+github.com/ssdb/gossdb v0.0.0-20180723034631-88f6b59b84ec/go.mod h1:QBvMkMya+gXctz3kmljlUCu/yB3GZ6oee+dUozsezQE=
+github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
+github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
+github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw=
+github.com/stretchr/objx v0.5.0/go.mod h1:Yh+to48EsGEfYuaHDzXPcE3xhTkx73EhmCGUpEOglKo=
+github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs=
+github.com/stretchr/testify v1.2.3-0.20181224173747-660f15d67dbb/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs=
+github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI=
+github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4=
+github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA=
+github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
+github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
+github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
+github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU=
+github.com/stretchr/testify v1.8.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4=
+github.com/stretchr/testify v1.8.2/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4=
+github.com/stretchr/testify v1.8.3 h1:RP3t2pwF7cMEbC1dqtB6poj3niw/9gnV4Cjg5oW5gtY=
+github.com/stretchr/testify v1.8.3/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo=
+github.com/swaggo/gin-swagger v1.2.0 h1:YskZXEiv51fjOMTsXrOetAjrMDfFaXD79PEoQBOe2W0=
+github.com/swaggo/gin-swagger v1.2.0/go.mod h1:qlH2+W7zXGZkczuL+r2nEBR2JTT+/lX05Nn6vPhc7OI=
+github.com/swaggo/swag v1.5.1/go.mod h1:1Bl9F/ZBpVWh22nY0zmYyASPO1lI/zIwRDrpZU+tv8Y=
+github.com/swaggo/swag v1.6.2/go.mod h1:YyZstMc22WYm6GEDx/CYWxq+faBbjQ5EqwQcrjREDBo=
+github.com/swaggo/swag v1.16.1 h1:fTNRhKstPKxcnoKsytm4sahr8FaYzUcT7i1/3nd/fBg=
+github.com/swaggo/swag v1.16.1/go.mod h1:9/LMvHycG3NFHfR6LwvikHv5iFvmPADQ359cKikGxto=
+github.com/syndtr/goleveldb v0.0.0-20160425020131-cfa635847112/go.mod h1:Z4AUp2Km+PwemOoO/VB5AOx9XSsIItzFjoJlOSiYmn0=
+github.com/syndtr/goleveldb v0.0.0-20181127023241-353a9fca669c h1:3eGShk3EQf5gJCYW+WzA0TEJQd37HLOmlYF7N0YJwv0=
+github.com/syndtr/goleveldb v0.0.0-20181127023241-353a9fca669c/go.mod h1:Z4AUp2Km+PwemOoO/VB5AOx9XSsIItzFjoJlOSiYmn0=
+github.com/tealeg/xlsx v1.0.5 h1:+f8oFmvY8Gw1iUXzPk+kz+4GpbDZPK1FhPiQRd+ypgE=
+github.com/tealeg/xlsx v1.0.5/go.mod h1:btRS8dz54TDnvKNosuAqxrM1QgN1udgk9O34bDCnORM=
+github.com/twitchyliquid64/golang-asm v0.15.1 h1:SU5vSMR7hnwNxj24w34ZyCi/FmDZTkS4MhqMhdFk5YI=
+github.com/twitchyliquid64/golang-asm v0.15.1/go.mod h1:a1lVb/DtPvCB8fslRZhAngC2+aY1QWCk3Cedj/Gdt08=
+github.com/ugorji/go v0.0.0-20171122102828-84cb69a8af83/go.mod h1:hnLbHMwcvSihnDhEfx2/BzKp2xb0Y+ErdfYcrs9tkJQ=
+github.com/ugorji/go v1.1.4/go.mod h1:uQMGLiO92mf5W77hV/PUCpI3pbzQx3CRekS0kk+RGrc=
+github.com/ugorji/go v1.1.5-pre/go.mod h1:FwP/aQVg39TXzItUBMwnWp9T9gPQnXw4Poh4/oBQZ/0=
+github.com/ugorji/go v1.2.7 h1:qYhyWUUd6WbiM+C6JZAUkIJt/1WrjzNHY9+KCIjVqTo=
+github.com/ugorji/go v1.2.7/go.mod h1:nF9osbDWLy6bDVv/Rtoh6QgnvNDpmCalQV5urGCCS6M=
+github.com/ugorji/go/codec v0.0.0-20181022190402-e5e69e061d4f/go.mod h1:VFNgLljTbGfSG7qAOspJ7OScBnGdDN/yBr0sguwnwf0=
+github.com/ugorji/go/codec v1.1.5-pre/go.mod h1:tULtS6Gy1AE1yCENaw4Vb//HLH5njI2tfCQDUqRd8fI=
+github.com/ugorji/go/codec v1.2.7/go.mod h1:WGN1fab3R1fzQlVQTkfxVtIBhWDRqOviHU95kRgeqEY=
+github.com/ugorji/go/codec v1.2.9/go.mod h1:UNopzCgEMSXjBc6AOMqYvWC1ktqTAfzJZUZgYf6w6lg=
+github.com/ugorji/go/codec v1.2.11 h1:BMaWp1Bb6fHwEtbplGBGJ498wD+LKlNSl25MjdZY4dU=
+github.com/ugorji/go/codec v1.2.11/go.mod h1:UNopzCgEMSXjBc6AOMqYvWC1ktqTAfzJZUZgYf6w6lg=
+github.com/unknwon/com v0.0.0-20190804042917-757f69c95f3e/go.mod h1:tOOxU81rwgoCLoOVVPHb6T/wt8HZygqH5id+GNnlCXM=
+github.com/urfave/cli v1.20.0/go.mod h1:70zkFmudgCuE/ngEzBv17Jvp/497gISqfk5gWijbERA=
+github.com/urfave/cli/v2 v2.3.0/go.mod h1:LJmUH05zAU44vOAcrfzZQKsZbVcdbOG8rtL3/XcUArI=
+github.com/wendal/errors v0.0.0-20130201093226-f66c77a7882b/go.mod h1:Q12BUT7DqIlHRmgv3RskH+UCM/4eqVMgI0EMmlSpAXc=
+github.com/xormplus/builder v0.0.0-20200331055651-240ff40009be h1:HTSana2sMSKVze3XXYrF89w2tw835Fh+7xX5KPvAkuo=
+github.com/xormplus/builder v0.0.0-20200331055651-240ff40009be/go.mod h1:PgBA7NoHtnttVkWModa/qpvIWkX6MpOKgyRCWsSKSB0=
+github.com/xormplus/xorm v0.0.0-20210822100304-4e1d4fcc1e67 h1:POBVR/O5wPVI0u7ZZGqu+HFPVTYpZlSL3Uo/9g+he/w=
+github.com/xormplus/xorm v0.0.0-20210822100304-4e1d4fcc1e67/go.mod h1:+v6b10b4x5IcQmp1/Cbo9IqaknxVeuhQng+fhya6bdI=
+github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY=
+github.com/yuin/gopher-lua v0.0.0-20171031051903-609c9cd26973/go.mod h1:aEV29XrmTYFr3CiRxZeGHpkvbwq+prZduBqMaascyCU=
+go.etcd.io/bbolt v1.3.4/go.mod h1:G5EMThwa9y8QZGBClrRx5EY+Yw9kAhnjy3bSjsnlVTQ=
+go.opencensus.io v0.20.1/go.mod h1:6WKK9ahsWS3RSO+PY9ZHZUfv2irvY6gN279GOPZjmmk=
+golang.org/x/arch v0.0.0-20210923205945-b76863e36670/go.mod h1:5om86z9Hs0C8fWVUuoMHwpExlXzs5Tkyp9hOrfG7pp8=
+golang.org/x/arch v0.3.0 h1:02VY4/ZcO/gBOH6PUaoiptASxtXU10jazRCP865E97k=
+golang.org/x/arch v0.3.0/go.mod h1:5om86z9Hs0C8fWVUuoMHwpExlXzs5Tkyp9hOrfG7pp8=
+golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4=
+golang.org/x/crypto v0.0.0-20181127143415-eb0de9b17e85/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-20190325154230-a5d413f7728c/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
+golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=
+golang.org/x/crypto v0.0.0-20201016220609-9e8e0b390897/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto=
+golang.org/x/crypto v0.0.0-20210711020723-a769d52b0f97/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc=
+golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc=
+golang.org/x/crypto v0.0.0-20220622213112-05595931fe9d/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4=
+golang.org/x/crypto v0.5.0/go.mod h1:NK/OQwhpMQP3MwtdjgLlYHnH9ebylxKWv3e0fK+mkQU=
+golang.org/x/crypto v0.7.0/go.mod h1:pYwdfH91IfpZVANVyUOhSIPZaFoJGxTFbZhFTx+dXZU=
+golang.org/x/crypto v0.9.0 h1:LF6fAI+IutBocDJ2OT0Q1g8plpYljMZ4+lty+dsqw3g=
+golang.org/x/crypto v0.9.0/go.mod h1:yrmDGqONDYtNj3tH8X9dzUun2m2lzPa9ngI6/RUPGR0=
+golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA=
+golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE=
+golang.org/x/lint v0.0.0-20190227174305-5b3e6a55c961/go.mod h1:wehouNa3lNwaWXcvxsM5YxQ5yQlVC4a0KAMCusXpPoU=
+golang.org/x/lint v0.0.0-20190301231843-5614ed5bae6f/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE=
+golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4=
+golang.org/x/mod v0.8.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs=
+golang.org/x/mod v0.9.0 h1:KENHtAZL2y3NLMYZeHY9DW8HW8V+kQyJsY/V9JlKvCs=
+golang.org/x/mod v0.9.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs=
+golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
+golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
+golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
+golang.org/x/net v0.0.0-20181005035420-146acd28ed58/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
+golang.org/x/net v0.0.0-20181114220301-adae6a3d119a/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
+golang.org/x/net v0.0.0-20181220203305-927f97764cc3/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
+golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
+golang.org/x/net v0.0.0-20190125091013-d26f9f9a57f3/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
+golang.org/x/net v0.0.0-20190213061140-3a22650c66bd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
+golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=
+golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=
+golang.org/x/net v0.0.0-20190503192946-f4e77d36d62c/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=
+golang.org/x/net v0.0.0-20190611141213-3f473d35a33a/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
+golang.org/x/net v0.0.0-20190613194153-d28f0bde5980/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
+golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
+golang.org/x/net v0.0.0-20200425230154-ff2c4b7c35a0/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A=
+golang.org/x/net v0.0.0-20200520004742-59133d7f0dd7/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A=
+golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg=
+golang.org/x/net v0.0.0-20210421230115-4e50805a0758/go.mod h1:72T/g9IO56b78aLF+1Kcs5dz7/ng1VjMUvfKvpfy+jM=
+golang.org/x/net v0.0.0-20210610132358-84b48f89b13b/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y=
+golang.org/x/net v0.0.0-20211112202133-69e39bad7dc2/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y=
+golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c=
+golang.org/x/net v0.5.0/go.mod h1:DivGGAXEgPSlEBzxGzZI+ZLohi+xUj054jfeKui00ws=
+golang.org/x/net v0.6.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs=
+golang.org/x/net v0.7.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs=
+golang.org/x/net v0.8.0/go.mod h1:QVkue5JL9kW//ek3r6jTKnTFis1tRmNAW2P1shuFdJc=
+golang.org/x/net v0.10.0 h1:X2//UzNDwYmtCLn7To6G58Wr6f5ahEAQgKNzv9Y951M=
+golang.org/x/net v0.10.0/go.mod h1:0qNGK6F8kojg2nk9dLZ2mShWaEBan6FAoqfSigmmuDg=
+golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U=
+golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw=
+golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
+golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
+golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
+golang.org/x/sync v0.0.0-20190227155943-e225da77a7e6/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
+golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
+golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
+golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
+golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
+golang.org/x/sync v0.1.0 h1:wsuoTGHzEhffawBOhz5CYhcrV4IdKZbEyZjBMuTp12o=
+golang.org/x/sync v0.1.0/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
+golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
+golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
+golang.org/x/sys v0.0.0-20180909124046-d0be0721c37e/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
+golang.org/x/sys v0.0.0-20181116152217-5ac8a444bdc5/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
+golang.org/x/sys v0.0.0-20181122145206-62eef0e2fa9b/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
+golang.org/x/sys v0.0.0-20181228144115-9a3f9b0469bb/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
+golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
+golang.org/x/sys v0.0.0-20190222072716-a9d3bda3a223/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
+golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
+golang.org/x/sys v0.0.0-20190422165155-953cdadca894/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
+golang.org/x/sys v0.0.0-20190610200419-93c9922d18ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
+golang.org/x/sys v0.0.0-20190904154756-749cb33beabd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
+golang.org/x/sys v0.0.0-20191005200804-aed5e4c7ecf9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
+golang.org/x/sys v0.0.0-20191120155948-bd437916bb0e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
+golang.org/x/sys v0.0.0-20200106162015-b016eb3dc98e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
+golang.org/x/sys v0.0.0-20200202164722-d101bd2416d5/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
+golang.org/x/sys v0.0.0-20200323222414-85ca7c5b95cd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
+golang.org/x/sys v0.0.0-20200519105757-fe76b779f299/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
+golang.org/x/sys v0.0.0-20200615200032-f1bc736245b1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
+golang.org/x/sys v0.0.0-20201015000850-e3ed0017c211/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
+golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
+golang.org/x/sys v0.0.0-20210420072515-93ed5bcd2bfe/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
+golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
+golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
+golang.org/x/sys v0.0.0-20210630005230-0f9fa26af87c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
+golang.org/x/sys v0.0.0-20210806184541-e5e7981a1069/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
+golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
+golang.org/x/sys v0.0.0-20220704084225-05e143d24a9e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
+golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
+golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
+golang.org/x/sys v0.4.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
+golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
+golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
+golang.org/x/sys v0.8.0 h1:EBmGv8NaZBZTWvrbjNoL6HVt+IVy3QDQpJs7VRIw3tU=
+golang.org/x/sys v0.8.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
+golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
+golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8=
+golang.org/x/term v0.4.0/go.mod h1:9P2UbLfCdcvo3p/nzKvsmas4TnlujnuoV9hGgYzW1lQ=
+golang.org/x/term v0.5.0/go.mod h1:jMB1sMXY+tzblOD4FWmEbocvup2/aLOaQEp7JmGp78k=
+golang.org/x/term v0.6.0/go.mod h1:m6U89DPEgQRMq3DNkDClhWw02AUbt2daBVO4cn4Hv9U=
+golang.org/x/term v0.8.0/go.mod h1:xPskH00ivmX89bAKVGSKKtLOWNx2+17Eiy94tnKShWo=
+golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
+golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
+golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk=
+golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
+golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
+golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ=
+golang.org/x/text v0.3.8/go.mod h1:E6s5w1FMmriuDzIBO73fBruAKo1PCIq6d2Q6DHfQ8WQ=
+golang.org/x/text v0.6.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8=
+golang.org/x/text v0.7.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8=
+golang.org/x/text v0.8.0/go.mod h1:e1OnstbJyHTd6l/uOt8jFFHp6TRDWZR/bV3emEE/zU8=
+golang.org/x/text v0.9.0 h1:2sjJmO8cDvYveuX97RDLsxlyUxLl+GHoLxBiRdHllBE=
+golang.org/x/text v0.9.0/go.mod h1:e1OnstbJyHTd6l/uOt8jFFHp6TRDWZR/bV3emEE/zU8=
+golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
+golang.org/x/tools v0.0.0-20180828015842-6cd1fcedba52/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
+golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
+golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
+golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY=
+golang.org/x/tools v0.0.0-20190312170243-e65039ee4138/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs=
+golang.org/x/tools v0.0.0-20190606050223-4d9ae51c2468/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc=
+golang.org/x/tools v0.0.0-20190611222205-d73e1c7e250b/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc=
+golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
+golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc=
+golang.org/x/tools v0.6.0/go.mod h1:Xwgl3UAJ/d3gWutnCtw505GrjyAbvKui8lOU390QaIU=
+golang.org/x/tools v0.7.0 h1:W4OVu8VVOaIO0yzWMNdepAulS7YfoS3Zabrm8DOXXU4=
+golang.org/x/tools v0.7.0/go.mod h1:4pg6aUX35JBAogB10C9AtvVL+qowtN4pT3CGSQex14s=
+golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
+golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543 h1:E7g+9GITq07hpfrRu66IVDexMakfv52eLZ2CXBWiKr4=
+golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
+google.golang.org/api v0.3.1/go.mod h1:6wY9I6uQWHQ8EM57III9mq/AjF+i8G65rmVagqKMtkk=
+google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM=
+google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4=
+google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc=
+google.golang.org/genproto v0.0.0-20190307195333-5fe7a883aa19/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE=
+google.golang.org/genproto v0.0.0-20190404172233-64821d5d2107/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE=
+google.golang.org/grpc v1.17.0/go.mod h1:6QZJwpn2B+Zp71q/5VxRsJ6NXXVCE5NRUHRo+f3cWCs=
+google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c=
+google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8=
+google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0=
+google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM=
+google.golang.org/protobuf v1.20.1-0.20200309200217-e05f789c0967/go.mod h1:A+miEFZTKqfCUM6K7xSMQL9OKL/b6hQv+e19PK+JZNE=
+google.golang.org/protobuf v1.21.0/go.mod h1:47Nbq4nVaFHyn7ilMalzfO3qCViNmqZ2kzikPIcrTAo=
+google.golang.org/protobuf v1.23.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU=
+google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw=
+google.golang.org/protobuf v1.28.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I=
+google.golang.org/protobuf v1.28.1/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I=
+google.golang.org/protobuf v1.30.0 h1:kPPoIgf3TsEvrm0PFe15JQ+570QVxYzEvvHqChK+cng=
+google.golang.org/protobuf v1.30.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I=
+gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw=
+gopkg.in/bsm/ratelimit.v1 v1.0.0-20160220154919-db14e161995a/go.mod h1:KF9sEfUPAXdG8Oev9e99iLGnl2uJMjc5B+4y3O7x610=
+gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
+gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
+gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
+gopkg.in/check.v1 v1.0.0-20200227125254-8fa46927fb4f/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
+gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk=
+gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q=
+gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI=
+gopkg.in/flosch/pongo2.v3 v3.0.0-20141028000813-5e81b817a0c4 h1:eyQQg/uGuZ3ndaBhqteakHpVW+dSOPalilfC9RpM2TA=
+gopkg.in/flosch/pongo2.v3 v3.0.0-20141028000813-5e81b817a0c4/go.mod h1:bJkYqV5pg6+Z7MsSu/hSb1zsPT955hBW2QHLE1jm4wA=
+gopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMys=
+gopkg.in/go-playground/assert.v1 v1.2.1/go.mod h1:9RXL0bg/zibRAgZUYszZSwO/z8Y/a8bDuhia5mkpMnE=
+gopkg.in/go-playground/validator.v8 v8.18.2/go.mod h1:RX2a/7Ha8BgOhfk7j780h4/u/RRjR0eouCJSH80/M2Y=
+gopkg.in/mgo.v2 v2.0.0-20160818020120-3f83fa500528/go.mod h1:yeKp02qBN3iKW1OzL3MGk2IdtZzaj7SFntXj72NppTA=
+gopkg.in/mgo.v2 v2.0.0-20190816093944-a6b53ec6cb22/go.mod h1:yeKp02qBN3iKW1OzL3MGk2IdtZzaj7SFntXj72NppTA=
+gopkg.in/redis.v4 v4.2.4/go.mod h1:8KREHdypkCEojGKQcjMqAODMICIVwZAONWq8RowTITA=
+gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 h1:uRGJdciOHaEIrze2W8Q3AKkepLTh2hOroT7a+7czfdQ=
+gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7/go.mod h1:dt/ZhP58zS4L8KSrWDmTeBkI65Dw0HsyUHuEVlX15mw=
+gopkg.in/yaml.v2 v2.2.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
+gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
+gopkg.in/yaml.v2 v2.2.3/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
+gopkg.in/yaml.v2 v2.2.4/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
+gopkg.in/yaml.v2 v2.2.5/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
+gopkg.in/yaml.v2 v2.2.8/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
+gopkg.in/yaml.v2 v2.3.0/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
+gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY=
+gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ=
+gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
+gopkg.in/yaml.v3 v3.0.0-20200615113413-eeeca48fe776/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
+gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
+gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA=
+gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
+honnef.co/go/tools v0.0.0-20180728063816-88497007e858/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4=
+honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4=
+honnef.co/go/tools v0.0.0-20190106161140-3f1c8253044a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4=
+rsc.io/pdf v0.1.1/go.mod h1:n8OzWcQ6Sp37PL01nO98y4iUCRdTGarVfzxY20ICaU4=
+sigs.k8s.io/yaml v1.3.0/go.mod h1:GeOyir5tyXNByN85N/dRIT9es5UQNerPYEKK56eTBm8=

+ 4 - 3
routers/api/chart.go → http/handle/api/chart.go

@@ -7,9 +7,10 @@ import (
 	"strconv"
 	"time"
 
-	"../../pkg/app"
-	"../../pkg/e"
-	"../../routers/restful"
+	"tmr-watch/http/handle/restful"
+	"tmr-watch/pkg/app"
+	"tmr-watch/pkg/e"
+
 	"github.com/Anderson-Lu/gofasion/gofasion"
 	"github.com/astaxie/beego/logs"
 	"github.com/gin-gonic/gin"

+ 10 - 9
routers/api/db.go → http/handle/api/db.go

@@ -17,11 +17,12 @@ import (
 	"sync"
 	"time"
 
-	"../../pkg/app"
-	"../../pkg/e"
-	"../../pkg/logging"
-	"../../pkg/setting"
-	"../../routers/restful"
+	"tmr-watch/conf/setting"
+	"tmr-watch/http/handle/restful"
+	"tmr-watch/pkg/app"
+	"tmr-watch/pkg/e"
+	"tmr-watch/pkg/logging"
+
 	"github.com/360EntSecGroup-Skylar/excelize"
 	"github.com/Anderson-Lu/gofasion/gofasion"
 	"github.com/astaxie/beego/logs"
@@ -680,7 +681,7 @@ func PostDataByNameForm(c *gin.Context) {
 	}
 }
 
-// @Summary   将数据集转换格式
+// GetReportform   将数据集转换格式
 // @Tags PostDataByNameForm
 // @Accept json
 // @Produce  json
@@ -731,7 +732,7 @@ func GetReportform(c *gin.Context) {
 
 }
 
-//保养计划
+// GetUpkeepPlan 保养计划
 func GetUpkeepPlan(c *gin.Context) {
 
 	appG := app.Gin{C: c}
@@ -2228,7 +2229,7 @@ func ImportExcel(c *gin.Context) {
 	error := 0
 	isdone := true
 
-	rows, _ := xlsx1.GetRows(sheetname)
+	rows := xlsx1.GetRows(sheetname)
 	// 限制10000条,多余的截取掉
 	if len(rows) > 10000 {
 		rows = rows[:10000]
@@ -4191,7 +4192,7 @@ func FpdImportExcel(c *gin.Context) {
 		appG.Response(http.StatusInternalServerError, e.ERROR, false)
 		return
 	}
-	rows, _ := xlsx1.GetRows(sheetname)
+	rows := xlsx1.GetRows(sheetname)
 	// 限制10000条,多余的截取掉
 	if len(rows) > 10000 {
 		rows = rows[:10000]

+ 17 - 18
routers/api/ftjudge.go → http/handle/api/ftjudge.go

@@ -1,28 +1,25 @@
 package api
 
 import (
-	"../../pkg/app"
-	"../../pkg/e"
-	"../../pkg/logging"
-	"github.com/Knetic/govaluate"
-	"math"
-
-	"../../routers/restful"
-
 	"encoding/json"
 	"errors"
 	"fmt"
-
-	"github.com/Anderson-Lu/gofasion/gofasion"
-	"github.com/gin-gonic/gin"
-
-	"github.com/xormplus/xorm"
 	"io/ioutil"
+	"math"
 	"net/http"
-
 	"strconv"
 	"strings"
 	"time"
+
+	"tmr-watch/http/handle/restful"
+	"tmr-watch/pkg/app"
+	"tmr-watch/pkg/e"
+	"tmr-watch/pkg/logging"
+
+	"github.com/Anderson-Lu/gofasion/gofasion"
+	"github.com/Knetic/govaluate"
+	"github.com/gin-gonic/gin"
+	"github.com/xormplus/xorm"
 )
 
 //配方评估相关
@@ -41,7 +38,7 @@ type Nur struct {
 	Tem         float64 //温度
 	Cowsum      float64 //牛头数
 	Cowclass    string  //牲畜类别
-	Cowclassid  string //牲畜类别id
+	Cowclassid  string  //牲畜类别id
 	Bigcowclass string  //牲畜大类
 }
 
@@ -121,7 +118,6 @@ func GETNurJudgeRport(c *gin.Context) {
 	parammaps := make(map[string]interface{})
 	_ = json.Unmarshal([]byte(nurstr), &parammaps)
 
-
 	tx := restful.Engine.NewSession()
 	err := tx.Begin()
 	defer func() {
@@ -193,7 +189,7 @@ func CulNurReportFT(parammaps map[string]interface{}, tx *xorm.Session) (res []m
 	barids, err := tx.SQL(`		SELECT TRIM(fp.barid) barid,IFNULL((SELECT bm.cowsum FROM barmilk bm WHERE pastureid = fp.pastureid AND barid = fp.barid AND productdate <= ? ORDER BY productdate LIMIT 1),fp.ccount) ccount,DATE_FORMAT(fp.date, '%Y-%m-%d')date,
 		fp.barname FROM feedpdate fp 
 		WHERE fp.pastureid = ? AND  fp.date BETWEEN ? AND ? AND  fp.ftid = ? GROUP BY fp.barid ORDER BY fp.barid`,
-		parammaps["stopTime"],parammaps["pastureid"], parammaps["startTime"], parammaps["stopTime"], parammaps["ftid"]).Query().List()
+		parammaps["stopTime"], parammaps["pastureid"], parammaps["startTime"], parammaps["stopTime"], parammaps["ftid"]).Query().List()
 	if err != nil {
 		return nil, err
 	}
@@ -223,7 +219,7 @@ func CulNurReportFT(parammaps map[string]interface{}, tx *xorm.Session) (res []m
 			bartem = value["barid"].(string)
 			parammaps["barid"] = value["barid"]
 		}
-		if bartem != value["barid"].(string) || key == len(barids)-1 || key == 0{
+		if bartem != value["barid"].(string) || key == len(barids)-1 || key == 0 {
 
 			parammaps["barid"] = value["barid"]
 			barres, err := FeedproviderV3(parammaps, dates, tx)
@@ -260,6 +256,7 @@ func CulNurReportFT(parammaps map[string]interface{}, tx *xorm.Session) (res []m
 	}
 	return res, err
 }
+
 //排序
 func switchname(str string) (string, int) {
 	tstr := ""
@@ -573,6 +570,7 @@ func SHprovider(parammaps map[string]interface{}, tx *xorm.Session) ([]map[strin
 	return res, err
 
 }
+
 //根据公式和栏舍生产性能的指标计算出奶牛需要
 func CalNUR(formulas []map[string]interface{}, nur *Nur) (map[string]interface{}, error) {
 
@@ -675,6 +673,7 @@ func CalNUR(formulas []map[string]interface{}, nur *Nur) (map[string]interface{}
 	return resAll, nil
 
 }
+
 //解析计算公式
 func PraseFormula(formula string, nur *Nur) (interface{}, error) {
 	str := formula

+ 11 - 13
routers/api/grfdApi.go → http/handle/api/grfdApi.go

@@ -10,18 +10,17 @@ import (
 	"strings"
 	"time"
 
-	"../../pkg/app"
-	"../../pkg/logging"
-	"../../pkg/util"
-	"../../routers/restful"
+	"tmr-watch/conf/setting"
+	"tmr-watch/http/handle/restful"
+	"tmr-watch/pkg/app"
+	"tmr-watch/pkg/logging"
+	"tmr-watch/pkg/util"
+
 	"github.com/Anderson-Lu/gofasion/gofasion"
 	"github.com/gin-gonic/gin"
 	"github.com/hequan2017/go-admin/pkg/e"
 	"github.com/robfig/cron"
 	"github.com/xormplus/xorm"
-
-	//"time"
-	"../../pkg/setting"
 )
 
 // 本部分是格润富德牧场系统 的下发和上传功能(可咨询刘欢)
@@ -653,10 +652,11 @@ func AddOtherDeviceFeeding() {
 		}
 	}()
 
+	// TODO isuse2 =0 待定
 	queryIdList, err1 := tx.SQL(`SELECT d.pid +UNIX_TIMESTAMP(d.mydate) id,d.pid did,d.projname projName,DATE_FORMAT(d.mydate,'%Y-%m-%d') mydate 
 		FROM downloadedplan d 
  		WHERE  (d.mydate=DATE_FORMAT(NOW(),'%Y-%m-%d')OR d.mydate=DATE_FORMAT(DATE_ADD(NOW(),INTERVAL -1 DAY),'%Y-%m-%d') )   
- 		AND iscompleted=1 AND d.isuse2=0
+ 		AND iscompleted=1 AND d.isUse=0
  		AND (SELECT COUNT(*) FROM downloadplandtl2 d2 WHERE  d.id=d2.PID AND d.pastureid=d2.pastureid  AND  d2.type = 0)>0
  		AND (SELECT COUNT(*) FROM downloadedplan WHERE pastureid = d.pastureid AND mydate = d.mydate AND pid = d.pid AND iscompleted = 0) = 0`).Query().List()
 
@@ -730,7 +730,7 @@ func AddOtherDeviceFeeding() {
 
 }
 
-// 定时任务
+// PostTmrData 定时任务
 func PostTmrData() {
 	defer func() { // 必须要先声明defer
 		if err := recover(); err != nil {
@@ -747,16 +747,14 @@ func CronGRFD() {
 	defer func() { // 必须要先声明defer
 		if err := recover(); err != nil {
 			fmt.Printf("CronTest pnic err%+v \n", err)
-			logging.Error("panic recover err ", err)
+			logging.Error("CronGRFD panic recover err ", err)
 		}
 	}()
 	log.Println("Starting CronWXwork...")
 	c := cron.New()
-	_, err := c.AddFunc("0/55 * * * *", PostTmrData) //* * * * *, 从分钟开始 每55分钟执行一次
+	err := c.AddFunc("0/55 * * * *", PostTmrData) //* * * * *, 从分钟开始 每55分钟执行一次
 	if err != nil {
 		println("cron4 err", err.Error())
 	}
-
 	c.Start()
-
 }

+ 4 - 3
routers/api/lpplandtl.go → http/handle/api/lpplandtl.go

@@ -7,9 +7,10 @@ import (
 	"log"
 	"net/http"
 
-	"../../pkg/app"
-	"../../pkg/e"
-	"../../routers/restful"
+	"tmr-watch/http/handle/restful"
+	"tmr-watch/pkg/app"
+	"tmr-watch/pkg/e"
+
 	"github.com/Anderson-Lu/gofasion/gofasion"
 	"github.com/gin-gonic/gin"
 )

+ 4 - 3
routers/api/material.go → http/handle/api/material.go

@@ -6,9 +6,10 @@ import (
 	"net/http"
 	"strconv"
 
-	"../../pkg/app"
-	"../../pkg/e"
-	"../../routers/restful"
+	"tmr-watch/http/handle/restful"
+	"tmr-watch/pkg/app"
+	"tmr-watch/pkg/e"
+
 	"github.com/Anderson-Lu/gofasion/gofasion"
 	"github.com/astaxie/beego/logs"
 	"github.com/gin-gonic/gin"

+ 4 - 3
routers/api/mqtt.go → http/handle/api/mqtt.go

@@ -13,9 +13,10 @@ import (
 	"strconv"
 	"time"
 
-	"../../pkg/logging"
-	"../../pkg/setting"
-	"../../routers/restful"
+	"tmr-watch/conf/setting"
+	"tmr-watch/http/handle/restful"
+	"tmr-watch/pkg/logging"
+
 	"github.com/astaxie/beego/logs"
 	MQTT "github.com/eclipse/paho.mqtt.golang"
 	"github.com/robfig/cron"

+ 2 - 1
routers/api/report.go → http/handle/api/report.go

@@ -8,7 +8,8 @@ import (
 	"strings"
 	"time"
 
-	"../../routers/restful"
+	"tmr-watch/http/handle/restful"
+
 	"github.com/Anderson-Lu/gofasion/gofasion"
 	"github.com/xormplus/xorm"
 )

+ 10 - 9
routers/api/scheduled.go → http/handle/api/scheduled.go

@@ -14,11 +14,12 @@ import (
 	"strings"
 	"time"
 
-	"../../pkg/app"
-	"../../pkg/e"
-	"../../pkg/logging"
-	"../../pkg/setting"
-	"../../routers/restful"
+	"tmr-watch/conf/setting"
+	"tmr-watch/http/handle/restful"
+	"tmr-watch/pkg/app"
+	"tmr-watch/pkg/e"
+	"tmr-watch/pkg/logging"
+
 	"github.com/Anderson-Lu/gofasion/gofasion"
 	"github.com/astaxie/beego/logs"
 	"github.com/gin-gonic/gin"
@@ -1018,7 +1019,7 @@ func manualUdData(pastureinfo *udPastureInfo) {
 		// now := "2023-02-22"
 		dataList, err := tx.SQL(" select id  from downloadedplan where mydate = ? ", now).QueryString()
 		if err != nil {
-			logs.Error("manualUdData-error-1:", err)
+			logging.Error("manualUdData-error-1:", err)
 			return
 		}
 		var idList []string
@@ -1034,7 +1035,7 @@ func manualUdData(pastureinfo *udPastureInfo) {
 		up.Where("automatic = 1")
 		err = up.Find(&upList)
 		if err != nil {
-			log.Println("manualUdData-error-2: ", err)
+			logging.Error("manualUdData-error-2: ", err)
 			return
 		}
 
@@ -1054,13 +1055,13 @@ func manualUdData(pastureinfo *udPastureInfo) {
 				}
 				data, err := tx.SQL(item.Datasql, args...).Query().List()
 				if err != nil {
-					log.Println("manualUdData-error-3: ", err)
+					logging.Error("manualUdData-error-3: ", err)
 					continue
 				}
 				if len(data) > 0 {
 					databyte, err := json.Marshal(data)
 					if err != nil {
-						log.Println("manualUdData-error-4: ", err)
+						logging.Error("manualUdData-error-4: ", err)
 						continue
 					}
 

+ 2 - 0
routers/api/scheduled_test.go → http/handle/api/scheduled_test.go

@@ -1,5 +1,7 @@
 package api_test
 
+import "testing"
+
 func TestAdd(t *testing.T) {
 
 }

+ 5 - 5
routers/api/spillage.go → http/handle/api/spillage.go

@@ -13,11 +13,11 @@ import (
 	"sync"
 	"time"
 
-	"../../pkg/app"
-	"../../pkg/e"
-	"../../pkg/logging"
-	"../../pkg/setting"
-	"../../routers/restful"
+	"tmr-watch/conf/setting"
+	"tmr-watch/http/handle/restful"
+	"tmr-watch/pkg/app"
+	"tmr-watch/pkg/e"
+	"tmr-watch/pkg/logging"
 
 	"github.com/Anderson-Lu/gofasion/gofasion"
 	"github.com/gin-gonic/gin"

+ 6 - 5
routers/api/udsync.go → http/handle/api/udsync.go

@@ -10,9 +10,10 @@ import (
 	"strconv"
 	"time"
 
-	"../../pkg/logging"
-	"../../pkg/setting"
-	"../../routers/restful"
+	"tmr-watch/conf/setting"
+	"tmr-watch/http/handle/restful"
+	"tmr-watch/pkg/logging"
+
 	"github.com/astaxie/beego/logs"
 	"github.com/robfig/cron"
 )
@@ -43,7 +44,7 @@ func UDSync() {
 	log.Println("Starting Cron...")
 	c := cron.New()
 	// UDuploadnewdiliverdata(pastureinfo.Token, pastureinfo.Pastureid)
-	_, err = c.AddFunc("30 21 * * *", func() {
+	err = c.AddFunc("30 21 * * *", func() {
 		log.Println("UDSync", time.Now())
 		UDFeedtempletinfo(pastureinfo.Token, pastureinfo.Pastureid)
 		UDUploadadddata(pastureinfo.Token, pastureinfo.Pastureid)
@@ -425,7 +426,7 @@ FROM
 }
 
 func UDUploadadddata(token, pastureid string) {
-
+	logging.Info("UDUploadadddata-pastureid", pastureid)
 	tx := restful.Engine.NewSession()
 	defer tx.Close()
 

+ 6 - 5
routers/api/upload.go → http/handle/api/upload.go

@@ -18,11 +18,12 @@ import (
 	"strconv"
 	"strings"
 
-	"../../pkg/app"
-	"../../pkg/e"
-	"../../pkg/logging"
-	"../../pkg/setting"
-	"../../routers/restful"
+	"tmr-watch/conf/setting"
+	"tmr-watch/http/handle/restful"
+	"tmr-watch/pkg/app"
+	"tmr-watch/pkg/e"
+	"tmr-watch/pkg/logging"
+
 	"github.com/astaxie/beego/logs"
 	"github.com/axetroy/go-fs"
 	"github.com/gin-gonic/gin"

+ 8 - 7
routers/api/user.go → http/handle/api/user.go

@@ -8,11 +8,12 @@ import (
 	"strings"
 	"time"
 
-	"../../pkg/app"
-	"../../pkg/e"
-	"../../pkg/util"
-	"../../routers/restful"
-	"../../service/user_service"
+	"tmr-watch/http/handle/restful"
+	"tmr-watch/pkg/app"
+	"tmr-watch/pkg/e"
+	"tmr-watch/pkg/util"
+	"tmr-watch/service/user_service"
+
 	"github.com/Anderson-Lu/gofasion/gofasion"
 	"github.com/astaxie/beego/logs"
 	"github.com/astaxie/beego/validation"
@@ -141,7 +142,7 @@ func UserLogout(c *gin.Context) {
 	appG.Response(http.StatusOK, e.SUCCESS, data)
 }
 
-// @Summary   获取单个用户信息
+// GetUserinfo   获取单个用户信息
 // @Tags  users
 // @Accept json
 // @Produce  json
@@ -150,7 +151,7 @@ func UserLogout(c *gin.Context) {
 // @Router /authdata/userinfo  [GET]
 func GetUserinfo(c *gin.Context) {
 	appG := app.Gin{C: c}
-	data := restful.GetUserInfo(c.MustGet("jwt_username").(string))
+	data := restful.GetUserInfo(c.Param("jwt_username"))
 	appG.Response(http.StatusOK, e.SUCCESS, data)
 }
 

+ 1 - 1
routers/restful/sql_utils - 副本.gocopy → http/handle/restful/sql_utils - 副本.gocopy

@@ -6,7 +6,7 @@ import (
 	"errors"
 	"fmt"
 	_ "github.com/go-sql-driver/mysql"
-	"../../pkg/setting"
+	"tmr-watch/conf/setting"
 	"github.com/patrickmn/go-cache"
 	"github.com/tealeg/xlsx"
 	"github.com/xormplus/xorm"

+ 2 - 3
routers/restful/sql_utils.go → http/handle/restful/sql_utils.go

@@ -10,7 +10,8 @@ import (
 	"time"
 	"unsafe"
 
-	"../../pkg/setting"
+	"tmr-watch/conf/setting"
+
 	_ "github.com/denisenkom/go-mssqldb"
 	_ "github.com/go-sql-driver/mysql"
 	"github.com/patrickmn/go-cache"
@@ -177,10 +178,8 @@ func GetSqlByNameDBT(name string, tx *xorm.Session) (string, string) {
 		}
 	}
 	if setting.DatabaseSetting.ShowGetSqllog {
-
 		fmt.Println("apisql:" + sqls)
 		fmt.Println("param:" + param)
-
 	}
 	return sqls, param
 }

+ 1 - 0
routers/restful/user.go → http/handle/restful/user.go

@@ -35,6 +35,7 @@ type Role struct {
 	DeletedOn  int    `xorm:"default 0 comment('删除时间戳') INT(11)"`
 }
 */
+
 func CheckUser(username, password string) (bool, error) {
 	has, err := Engine.Exist(&User{Username: username, Password: password})
 	return has, err

+ 5 - 4
routers/api/sap/sap.go → http/handle/sap/sap.go

@@ -9,10 +9,11 @@ import (
 	"net/http"
 	"time"
 
-	"../../../pkg/app"
-	"../../../pkg/e"
-	"../../../pkg/setting"
-	"../../../routers/restful"
+	"tmr-watch/conf/setting"
+	"tmr-watch/http/handle/restful"
+	"tmr-watch/pkg/app"
+	"tmr-watch/pkg/e"
+
 	"github.com/astaxie/beego/logs"
 	"github.com/gin-gonic/gin"
 )

+ 11 - 8
routers/api/v1/menu.go → http/handle/v1/menu.go

@@ -1,17 +1,20 @@
 package v1
 
+/*
 import (
+	"io/ioutil"
+	"net/http"
+
+	"tmr-watch/pkg/app"
+	"tmr-watch/pkg/e"
+	"tmr-watch/conf/setting"
+	"tmr-watch/pkg/util"
+	"tmr-watch/service/menu_service"
+
 	"github.com/Anderson-Lu/gofasion/gofasion"
 	"github.com/Unknwon/com"
 	"github.com/astaxie/beego/validation"
 	"github.com/gin-gonic/gin"
-	"../../../pkg/app"
-	"../../../pkg/e"
-	"../../../pkg/setting"
-	"../../../pkg/util"
-	"../../../service/menu_service"
-	"io/ioutil"
-	"net/http"
 )
 
 // @Summary   获取单个菜单
@@ -95,7 +98,6 @@ func GetMenus(c *gin.Context) {
 	appG.Response(http.StatusOK, e.SUCCESS, data)
 }
 
-
 // @Summary   增加菜单
 // @Tags menu
 // @Accept json
@@ -234,3 +236,4 @@ func DeleteMenu(c *gin.Context) {
 
 	appG.Response(http.StatusOK, e.SUCCESS, nil)
 }
+*/

+ 11 - 9
routers/api/v1/role.go → http/handle/v1/role.go

@@ -1,20 +1,21 @@
 package v1
 
+/*
 import (
-	"github.com/Anderson-Lu/gofasion/gofasion"
-	"github.com/Unknwon/com"
-	"github.com/kptyun/KPTCOMM/middleware/inject"
-	"github.com/kptyun/KPTCOMM/pkg/setting"
-	"github.com/kptyun/KPTCOMM/pkg/util"
-	"github.com/kptyun/KPTCOMM/service/role_service"
 	"io/ioutil"
 	"net/http"
 
+	"tmr-watch/middleware/inject"
+	"tmr-watch/pkg/app"
+	"tmr-watch/pkg/e"
+	"tmr-watch/conf/setting"
+	"tmr-watch/pkg/util"
+
+	"github.com/Anderson-Lu/gofasion/gofasion"
+	"github.com/Unknwon/com"
 	"github.com/astaxie/beego/validation"
 	"github.com/gin-gonic/gin"
-
-	"../../../pkg/app"
-	"../../../pkg/e"
+	Role_service "github.com/hequan2017/go-admin/service/role_service"
 )
 
 // @Summary   获取单个角色
@@ -243,3 +244,4 @@ func DeleteRole(c *gin.Context) {
 
 	appG.Response(http.StatusOK, e.SUCCESS, nil)
 }
+*/

+ 4 - 3
routers/api/zc/zc.go → http/handle/zc/zc.go

@@ -7,9 +7,10 @@ import (
 	"strings"
 	"time"
 
-	"../../../pkg/app"
-	"../../../pkg/e"
-	"../../../routers/restful"
+	"tmr-watch/http/handle/restful"
+	"tmr-watch/pkg/app"
+	"tmr-watch/pkg/e"
+
 	"github.com/astaxie/beego/logs"
 	"github.com/gin-gonic/gin"
 	"github.com/robfig/cron"

+ 217 - 0
http/routers/app_api.go

@@ -0,0 +1,217 @@
+package routers
+
+import (
+	"tmr-watch/comm"
+	"tmr-watch/conf/setting"
+	"tmr-watch/http/handle/api"
+	"tmr-watch/http/handle/sap"
+	"tmr-watch/http/handle/zc"
+	"tmr-watch/middleware/jwt"
+
+	"github.com/gin-gonic/gin"
+	ginSwagger "github.com/swaggo/gin-swagger"
+	"github.com/swaggo/gin-swagger/swaggerFiles"
+)
+
+func AppAPI(opts ...func(engine *gin.Engine)) func(s *gin.Engine) {
+	return func(s *gin.Engine) {
+		for _, opt := range opts {
+			opt(s)
+		}
+
+		s.Static("/static", setting.CurrentPath+"/dist/static")               // 添加资源路径
+		s.StaticFile("/", setting.CurrentPath+"/dist/index.html")             //前端接口
+		s.StaticFile("/favicon.ico", setting.CurrentPath+"/dist/favicon.ico") //前端接口
+
+		s.Static("/file", setting.CurrentPath+"/uploads/file")
+		s.Static("/uploads", setting.CurrentPath+"/uploads")
+		s.POST("/auth", api.Auth)           // 获取登录token
+		s.POST("/authlogin", api.AuthLogin) // 获取登录token
+
+		s.GET("/swagger/*any", ginSwagger.WrapHandler(swaggerFiles.Handler)) // API 注释
+
+		if setting.CommSetting.PortName != "" {
+			s.GET("/comm/:id/:x/:y/", comm.ProcessHttp)
+			s.GET("/cps/:id/:limit", comm.ProcessHttpCPS)
+			s.POST("/comm/:id/:x/:y/", comm.ProcessHttp)
+			s.POST("/cps/:id/:limit", comm.ProcessHttpCPS)
+		}
+		eqm := s.Group("/manage/api")
+		eqm.POST("/login", api.Auth)
+		eqm.POST("/login/imei", api.AuthImei)
+
+		s.GET("/getData", api.GetWxCode)
+
+		s.POST("/userwxopenid/binding", api.UserWXOpenIDBinding)
+
+		apiV1 := s.Group("/authdata")
+		apiV1.Use(jwt.JWT()) // token 验证
+		{
+			apiV1.POST("/rolemenus", api.GetRecuDataByName)
+			apiV1.GET("/userinfo", api.GetUserinfo)
+			apiV1.POST("/logout", api.UserLogout)
+
+			apiV1.POST("/GetRecuDataByName", api.GetRecuDataByName) ////
+
+			apiV1.POST("/GetDataByName", api.GetDataByName)
+			apiV1.POST("/GetDataBySqlIN", api.GetDataBySqlIN)
+			apiV1.POST("/GetDataByNames", api.GetDataByNames)
+			apiV1.POST("/PostDataByName", api.PostDataByName)
+			apiV1.POST("/PostDataByNames", api.PostDataByNames)
+			apiV1.POST("/UpdateDataRelation", api.UpdateDataRelation) //log.error
+			apiV1.POST("/GetDataByNameForm", api.GetDataByNameForm)
+			apiV1.POST("/PostDataByNameForm", api.PostDataByNameForm)
+			apiV1.POST("/GetUpkeepPlan", api.GetUpkeepPlan)
+			apiV1.POST("/GetReportform", api.GetReportform)
+			apiV1.POST("/GetArrList", api.GetArrList)
+			apiV1.POST("/GETNurJudge", api.GETNurJudge)
+			apiV1.POST("/GETNurJudgeRport", api.GETNurJudgeRport)
+
+			apiV1.POST("/ExecDataByConfig", api.ExecDataByConfig)
+
+			apiV1.POST("/ImportExcel", api.ImportExcel)
+
+			apiV1.POST("/upload/:id/:name", api.UploadFile)
+			apiV1.POST("/uploads", api.UploadFiles)
+			apiV1.POST("/uploaderimage", api.UploaderImage)
+			apiV1.POST("/uploaderTmrImage", api.UploaderTmrImage)
+			apiV1.POST("/removeimage", api.RemovePicByName)
+			apiV1.GET("/getthumbnailimage/:filename", api.GetThumbnailImage)
+			apiV1.POST("/getoriginimage/:filename", api.GetOriginImage)
+			apiV1.GET("/getfileraw/:filename", api.GetFileRaw)
+			apiV1.GET("/downloadfile/:filename", api.DownloadFile)
+			apiV1.POST("/removefile/:id", api.RemoveFileByName)
+
+			apiV1.POST("/testdata", api.TestData)
+			apiV1.POST("/Testpartitions", api.Testpartitions)
+
+			//自定义报表
+			apiV1.POST("/Createchart", api.Createchart)
+			apiV1.POST("/Updatechart", api.Createchart)
+			apiV1.POST("/exesql", api.ExecSQL)
+			apiV1.POST("/Createdashboard", api.Updatedashboard)
+			apiV1.POST("/Updatedashboard", api.Updatedashboard)
+			apiV1.POST("/Dashboards", api.Dashboards)
+
+			// 格润富德 API 数据获取
+			apiV1.POST("/getDorm", api.GetDorm) // 牛舍信息
+			apiV1.POST("/GetRJSBData", api.GetRJSBData)
+			apiV1.POST("/PostRJSBData", api.PostRJSBData)
+			apiV1.POST("/PostRJSBDatas", api.PostRJSBDatas)
+
+			apiV1.POST("/autogeneration", api.Autogeneration)
+			apiV1.POST("/spillage", api.GetSpillage)
+			apiV1.POST("/trains", api.UpdateTrains)
+			apiV1.POST("/lpplan/edit", api.UpdateLpplan)
+			apiV1.POST("/lpplan/add", api.AddLpplan)
+			apiV1.POST("/lpplandtl", api.GetLpplandtl)
+			apiV1.POST("/lpplandtl/restore", api.RestoreLpplandtl)
+			apiV1.POST("/lpplandtl/del", api.DelLpplandtl)
+
+			apiV1.POST("/spillage/day", api.GetSpillageDay)
+			apiV1.POST("/trains/day", api.UpdateTrainsDay)
+			apiV1.POST("/lpplandtl/restore/day", api.RestoreLpplandtlDay)
+			apiV1.POST("/lpplandtl/del/day", api.DelLpplandtlDay)
+			apiV1.POST("/lpplandtl/add/day", api.AddLpplanDay)
+			apiV1.POST("/lpplandtl/day", api.GetLpplandtlDay)
+
+			apiV1.POST("/chart/feedEffMR", api.GetFeedEffMR)
+			apiV1.POST("/chart/feedEffSL", api.GetFeedEffSL)
+			apiV1.POST("/chart/feedEffHL", api.GetFeedEffHL)
+			apiV1.POST("/chart/feedEffZH", api.GetFeedEffZH)
+			apiV1.POST("/chart/feedEffCBFT", api.GetFeedEffCBFT)
+
+			apiV1.POST("/chart/accuracyAllFT", api.GetAccuracyAllFT)
+			apiV1.POST("/chart/accuracyAllJH", api.GetAccuracyAllJH)
+			apiV1.POST("/chart/accuracyAllNQ", api.GetAccuracyAllNQ)
+			apiV1.POST("/chart/accuracyAllCC", api.GetAccuracyAllCC)
+			apiV1.POST("/chart/accuracyAllHL", api.GetAccuracyAllHL)
+			apiV1.POST("/chart/accuracyAllLS", api.GetAccuracyAllLS)
+			apiV1.POST("/chart/accuracyAllQX", api.GetAccuracyAllQX)
+
+			apiV1.POST("/summary", api.GetSummary)
+
+			apiV1.POST("/ftdetail/edit", api.UpdateFTdetail)
+			apiV1.POST("/fpdetail/edit", api.UpdateFpdetailBar)
+			apiV1.POST("/ftdetai/del", api.DeleteFTdetail)
+			apiV1.POST("/lpplandtl/add", api.AddLpplandtl)
+			apiV1.POST("/lpplandtl/edit/sort", api.UpdateLpplandtlSort)
+			apiV1.POST("/lpplandtl/date/add", api.AddLpplandtlDate)
+			apiV1.POST("/lpplandtl/edit/date/sort", api.UpdateLpplandtlDateSort)
+			apiV1.POST("/processAnalysist", api.GetProcessAnalysis)
+
+			apiV1.POST("/feedp/undistribute", api.GetFeedpUndistributed)
+
+			apiV1.POST("/feedtemplet/enable", api.UpdateFeedtempletStatus)
+
+			apiV1.POST("/ftdry/add", api.AddFtdry)
+			apiV1.POST("/checkDates", api.CheckDates)
+			//编辑数据同步勾选状态
+			apiV1.POST("/scheduled/status/edit", api.UpdateScheduledStatus)
+			//	立即同步
+			apiV1.POST("/synchronizeNow", api.SynchronizeNow)
+
+			apiV1.POST("/fpdimportexcel", api.FpdImportExcel)
+
+			apiV1.POST("/barfeedremain/excel", api.GetBarfeedremainExcel)
+
+			//删除当前班次撒料时记录
+			apiV1.POST("/spillageall/del", api.DeleteSpillageAll)
+
+			apiV1.POST("/feedp/history", api.GetFeedpHistory)
+			//查看撒料修改记录
+			apiV1.POST("/spillageall/history", api.GetSpillageallHistory)
+			//查看撒料设备
+			apiV1.POST("/tmrListEnableTypeAll", api.GetTMRListEnableTypeAll)
+			//查看提醒设置
+			apiV1.POST("/remind/list", api.GetRemind)
+			apiV1.POST("/remind/edit", api.UpdateRemind)
+			//配方模板修改记录
+			apiV1.POST("/recipetemplate/history", api.GetRecipeTemplateRecordHistory)
+			//配方模板修改记录
+			apiV1.POST("/feedtemplet/history", api.GetFeedtempletHistory)
+
+			//app取料接口
+			apiV1.POST("/downloadedplan", api.GetDownloadedplanMaterial1)
+			apiV1.POST("/downloadedplan/list", api.GetDownloadedplanMaterialList)
+			apiV1.POST("/subplan", api.GetSubPlan)
+			apiV1.POST("/completeplan", api.CompletePlan)
+			apiV1.POST("/realtimeweight", api.AddRealTimeWeight)
+
+			//修改撒料计划tmr编号
+			apiV1.POST("/materialtmr/edit", api.UpdateMaterialTMR)
+			apiV1.POST("/materialtmr/date/edit", api.UpdateMaterialTMRDate)
+
+			//集团端配方下发
+			apiV1.POST("/formulaissued", api.AddFormulaIssued)
+			//盘点单添加
+			apiV1.POST("/biginventory", api.AddBigInventory)
+			//sap原料上传
+			apiV1.POST("/material/sap/upload", sap.MaterialOutbound)
+
+			apiV1.POST("/downloadplandtl1/image/upload", api.UploadFile1)
+
+			apiV1.POST("/syncSCJH", zc.SyncSCJH)
+
+			//修改日执行计划
+			apiV1.POST("/dailydata/edit", api.UpdateDailyData)
+			apiV1.POST("/formulastatistics", api.GetFormulaStatistics)
+
+		}
+
+		//不需要登录验证的接口
+		s.POST("/getopenid/:code", api.GetOpenID)
+		apiV3 := s.Group("/thi") // restful  接口 tablename 是 表名字
+		{
+			apiV3.POST("/GetDataByName", api.GetDataByName)
+			apiV3.POST("/PostDataByName", api.PostDataByName)
+		}
+
+		apiV4 := s.Group("/customreport") // restful  接口 tablename 是 表名字
+		{
+			apiV4.POST("/createchart", api.Createchart)
+			apiV4.POST("/PostDataByName", api.PostDataByName)
+		}
+	}
+
+}

+ 24 - 0
http/routers/root.go

@@ -0,0 +1,24 @@
+package routers
+
+import (
+	"tmr-watch/middleware"
+
+	"github.com/gin-contrib/gzip"
+	"github.com/gin-gonic/gin"
+)
+
+func Root(opts ...func(engine *gin.Engine)) func(s *gin.Engine) {
+	return func(s *gin.Engine) {
+		for _, opt := range opts {
+			opt(s)
+		}
+
+		// common middleware
+		s.Use(
+			middleware.CORS(),
+			gzip.Gzip(gzip.DefaultCompression),
+			gin.Logger(),
+			gin.Recovery(),
+		)
+	}
+}

+ 19 - 0
http/routers/router.go

@@ -0,0 +1,19 @@
+package routers
+
+import (
+	"github.com/gin-gonic/gin"
+)
+
+// HTTPServerRoute 核心 App 服务 HTTP 路由
+func HTTPServerRoute(opts ...func(engine *gin.Engine)) func(s *gin.Engine) {
+	routes := []func(s *gin.Engine){
+		Root(opts...),
+		AppAPI(opts...),
+	}
+
+	return func(s *gin.Engine) {
+		for _, route := range routes {
+			route(s)
+		}
+	}
+}

+ 29 - 0
http/server.go

@@ -0,0 +1,29 @@
+package http
+
+import (
+	"tmr-watch/http/routers"
+
+	"github.com/gin-gonic/gin"
+)
+
+type Server struct {
+	*gin.Engine
+}
+
+type Option func(*Server)
+
+func NewServer(options ...Option) *Server {
+	s := &Server{
+		Engine: gin.New(),
+	}
+	for _, option := range options {
+		option(s)
+	}
+	return s
+}
+
+func SetRouteOption() Option {
+	return func(s *Server) {
+		routers.HTTPServerRoute()(s.Engine)
+	}
+}

+ 35 - 65
main.go

@@ -1,36 +1,25 @@
 package main
 
 import (
+	"context"
 	"fmt"
-	"log"
 	"net/http"
 	_ "net/http/pprof"
 	"os"
 	"strings"
 
-	"./models"
-	"./pkg/logging"
-	"./pkg/setting"
-	"./routers"
-	"./routers/api"
+	"tmr-watch/conf/setting"
+	ginHttp "tmr-watch/http"
+	"tmr-watch/http/handle/api"
+	"tmr-watch/mdns"
+	"tmr-watch/models"
+	"tmr-watch/pkg/logging"
+
 	"github.com/kardianos/service"
-	"github.com/kptyun/KPTCOMM/mdns"
-	//"unsafe"
 )
 
-// sss
-// @title 科湃腾Go语言后台API
-// @version 1.1.2
-// @description  kptyun_service
-
-// @contact.name 朱红宾
-// @contact.url https://www.dairyinfo.com.cn
-// @contact.email kptzhu@163.com
-
-// @host
-// @BasePath /
 func main() {
-	setting.Setup("")
+	setting.Setup("./")
 	models.Setup()
 	logging.Setup()
 
@@ -38,7 +27,6 @@ func main() {
 		Name:        setting.ServerSetting.ServerName,  //服务显示名称
 		DisplayName: setting.ServerSetting.DisplayName, //服务名称
 		Description: setting.ServerSetting.Description, //服务描述
-		// Dependencies: []string{"TMRWatchDB"},
 	}
 	prg := &program{}
 	s, err := service.New(prg, svcConfig)
@@ -47,32 +35,20 @@ func main() {
 	}
 
 	if len(os.Args) > 1 {
-		// 服务注册
-		if os.Args[1] == "install" {
-			err = s.Install()
-			if err != nil {
-				// ceshi
-				fmt.Println("install err", err)
-			} else {
-				fmt.Println("install success")
-			}
-			return
-		}
-		// 服务移除
-		if os.Args[1] == "remove" {
+		switch os.Args[1] {
+		case "install":
+			err = s.Install() // 服务注册
+		case "remove":
 			err = s.Uninstall()
-			if err != nil {
-				fmt.Println("Uninstall err", err)
-			} else {
-				fmt.Println("Uninstall success")
-			}
-			return
 		}
+		if err != nil {
+			fmt.Println("err", err)
+		} else {
+			fmt.Println("success")
+		}
+		return
 	}
-
-	//启动服务
-	_ = s.Run()
-
+	_ = s.Run() //启动服务
 }
 
 type program struct{}
@@ -83,44 +59,38 @@ func (p *program) Start(s service.Service) error {
 }
 
 func (p *program) run() {
-	// 代码写在这儿
-
 	//路由初始化
-	routersInit := routers.InitRouter()
+	httpServer := ginHttp.NewServer(ginHttp.SetRouteOption())
+	go api.CronScheduled(context.TODO())
+
 	if setting.ServerSetting.GRFD == "1" { //格润富德定时任务
 		api.CronGRFD()
 	}
-	readTimeout := setting.ServerSetting.ReadTimeout
-	writeTimeout := setting.ServerSetting.WriteTimeout
-	endPoint := fmt.Sprintf(":%d", setting.ServerSetting.HttpPort)
-	maxHeaderBytes := 1 << 20
+
 	server := &http.Server{
-		Addr:           endPoint,
-		Handler:        routersInit,
-		ReadTimeout:    readTimeout,
-		WriteTimeout:   writeTimeout,
-		MaxHeaderBytes: maxHeaderBytes,
+		Addr:           fmt.Sprintf(":%d", setting.ServerSetting.HttpPort),
+		Handler:        httpServer,
+		ReadTimeout:    setting.ServerSetting.ReadTimeout,
+		WriteTimeout:   setting.ServerSetting.WriteTimeout,
+		MaxHeaderBytes: 1 << 20,
 	}
-	//if setting.CommSetting.PortName != "" {
-	//	go comm.OpenComm()
-	//}
+
 	if strings.Trim(setting.ServerSetting.Mdns_servicename, " ") != "" {
 		go mdns.Mdns(strings.Trim(setting.ServerSetting.Mdns_servicename, " "), setting.ServerSetting.Mdns_serviceport)
 	}
 	httpsPort := fmt.Sprintf(":%d", setting.ServerSetting.HttpsPort)
 	// 开启http/https服务
 	if setting.ServerSetting.Https == 1 {
-		log.Printf("[info] start https server listening port %s", httpsPort)
-		_ = routersInit.RunTLS(httpsPort, setting.ServerSetting.CrtPath, setting.ServerSetting.KeyPath)
+		logging.Info("[info] start https server listening port %s", httpsPort)
+		_ = httpServer.RunTLS(httpsPort, setting.ServerSetting.CrtPath, setting.ServerSetting.KeyPath)
 	} else if setting.ServerSetting.Https == 2 {
-		log.Printf("[info] start https & http  server listening port https %s, http %s", httpsPort, endPoint)
-		go routersInit.RunTLS(httpsPort, setting.ServerSetting.CrtPath, setting.ServerSetting.KeyPath)
+		logging.Printf("[info] start https & http  server listening port https %s, http %s", httpsPort, server.Addr)
+		go httpServer.RunTLS(httpsPort, setting.ServerSetting.CrtPath, setting.ServerSetting.KeyPath)
 		_ = server.ListenAndServe()
 	} else {
-		log.Printf("[info] start https server listening port %s", endPoint)
+		logging.Printf("[info] start https server listening port %s", server.Addr)
 		_ = server.ListenAndServe()
 	}
-
 }
 
 func (p *program) Stop(s service.Service) error {

+ 46 - 0
middleware/cors.go

@@ -0,0 +1,46 @@
+package middleware
+
+import (
+	"fmt"
+	"net/http"
+	"strings"
+
+	"github.com/gin-gonic/gin"
+)
+
+// CORS 跨域
+func CORS() gin.HandlerFunc {
+	return func(c *gin.Context) {
+		method := c.Request.Method               //请求方法
+		origin := c.Request.Header.Get("Origin") //请求头部
+		var headerKeys []string                  // 声明请求头keys
+		for k, _ := range c.Request.Header {
+			headerKeys = append(headerKeys, k)
+		}
+		headerStr := strings.Join(headerKeys, ", ")
+		if headerStr != "" {
+			headerStr = fmt.Sprintf("access-control-allow-origin, access-control-allow-headers, %s", headerStr)
+		} else {
+			headerStr = "access-control-allow-origin, access-control-allow-headers"
+		}
+		if origin != "" {
+			c.Writer.Header().Set("Access-Control-Allow-Origin", "*")
+			c.Header("Access-Control-Allow-Origin", "*")                                        // 这是允许访问所有域
+			c.Header("Access-Control-Allow-Methods", "POST, GET, OPTIONS, PUT, DELETE, UPDATE") //服务器支持的所有跨域请求的方法,为了避免浏览次请求的多次'预检'请求
+			//  header的类型
+			c.Header("Access-Control-Allow-Headers", "Authorization, Content-Length, X-CSRF-Token, id,  Token, name, optname, thumbnail, session, X_Requested_With, Accept, Origin, Host, Connection, Accept-Encoding, Accept-Language,DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Pragma")
+			//              允许跨域设置                                                                                                      可以返回其他子段
+			c.Header("Access-Control-Expose-Headers", "Content-Length, Access-Control-Allow-Origin, Access-Control-Allow-Headers, Cache-Control, Content-Language, Content-Type, Expires, Last-Modified, Pragma, FooBar") // 跨域关键设置 让浏览器可以解析
+			c.Header("Access-Control-Max-Age", "172800")                                                                                                                                                                  // 缓存请求信息 单位为秒
+			c.Header("Access-Control-Allow-Credentials", "false")                                                                                                                                                         //  跨域请求是否需要带cookie信息 默认设置为true
+			c.Set("content-type", "application/json")                                                                                                                                                                     // 设置返回格式是json
+		}
+
+		//放行所有OPTIONS方法
+		if method == "OPTIONS" {
+			c.JSON(http.StatusOK, "Options Request!")
+		}
+		// 处理请求
+		c.Next() //  处理请求
+	}
+}

+ 8 - 5
middleware/inject/inject.go

@@ -1,11 +1,13 @@
 package inject
 
+/*
 import (
+	"runtime"
+	"tmr-watch/conf/setting"
+	"tmr-watch/service/bll"
+
 	"github.com/casbin/casbin"
 	"github.com/facebookgo/inject"
-	"../../pkg/setting"
-	"../../service/bll"
-	"runtime"
 )
 
 // Object 注入对象
@@ -24,9 +26,9 @@ func Init() {
 	osType := runtime.GOOS
 	var path string
 	if osType == "windows" {
-		path = setting.CurrentPath+"conf\\rbac_model.conf"
+		path = setting.CurrentPath + "conf\\rbac_model.conf"
 	} else if osType == "linux" {
-		path = setting.CurrentPath+"conf/rbac_model.conf"
+		path = setting.CurrentPath + "conf/rbac_model.conf"
 	}
 	enforcer := casbin.NewEnforcer(path, false)
 	_ = g.Provide(&inject.Object{Value: enforcer})
@@ -69,3 +71,4 @@ func LoadCasbinPolicyData() error {
 	}
 	return nil
 }
+*/

+ 4 - 3
middleware/jwt/jwt.go

@@ -3,9 +3,10 @@ package jwt
 import (
 	//"strings"
 
-	"../../pkg/e"
-	"../../pkg/util"
-	jwtGet "../../pkg/util"
+	"tmr-watch/pkg/e"
+	"tmr-watch/pkg/util"
+	jwtGet "tmr-watch/pkg/util"
+
 	"github.com/dgrijalva/jwt-go"
 	"github.com/gin-gonic/gin"
 )

+ 2 - 8
middleware/permission/permissions.go

@@ -1,19 +1,13 @@
 package permission
 
 import (
-	"fmt"
-	"github.com/dgrijalva/jwt-go"
 	"github.com/gin-gonic/gin"
-	"../inject"
-	jwtGet "../../pkg/util"
-	"net/http"
-	"strings"
 )
 
 func CasbinMiddleware() gin.HandlerFunc {
 	return func(c *gin.Context) {
 
-		Authorization := c.GetHeader("Authorization")
+		/*Authorization := c.GetHeader("Authorization")
 		token := strings.Split(Authorization, " ")
 		t, _ := jwt.Parse(token[1], func(*jwt.Token) (interface{}, error) {
 			return jwtGet.JwtSecret, nil
@@ -38,6 +32,6 @@ func CasbinMiddleware() gin.HandlerFunc {
 			c.Abort()
 			return
 		}
-		c.Next()
+		c.Next()*/
 	}
 }

+ 10 - 39
models/models.go

@@ -2,60 +2,31 @@ package models
 
 import (
 	"fmt"
-	"log"
 	"time"
 
-	"../pkg/setting"
-	"../routers/restful"
-	"github.com/astaxie/beego/logs"
+	"tmr-watch/conf/setting"
+	"tmr-watch/http/handle/restful"
+
 	"github.com/xormplus/xorm"
 )
 
 var Engine *xorm.Engine
-var SqlServerEngine *xorm.Engine
 
 func Setup() {
-	var err error
-
 	// restful  接口的 数据库初始化
-	if err := restful.SQLInit("mysql", fmt.Sprintf("%s:%s@tcp(%s)/%s?charset=utf8&parseTime=True&loc=Local",
+	sqlDNS := fmt.Sprintf("%s:%s@tcp(%s)/%s?charset=utf8&parseTime=True&loc=Local",
 		setting.DatabaseSetting.User,
 		setting.DatabaseSetting.Password,
 		setting.DatabaseSetting.Host,
-		setting.DatabaseSetting.Name), 1000, 10, setting.DatabaseSetting.ShowXormlog); err != nil {
-		log.Fatal(err.Error())
-		fmt.Println("dbs 数据库初始化失败 ")
+		setting.DatabaseSetting.Name,
+	)
+	if err := restful.SQLInit(setting.DatabaseSetting.Type, sqlDNS, 1000, 10, setting.DatabaseSetting.ShowXormlog); err != nil {
+		panic(err)
 	}
 	Engine = restful.Engine
-	if err != nil {
-		log.Fatalf("models.Setup err: %v", err)
-	}
 	Engine.SetConnMaxLifetime(time.Second * 30)
-	Engine.ShowSQL(true)
-	if err = Engine.Ping(); err != nil {
-		logs.Error(err)
+	Engine.ShowSQL(setting.DatabaseSetting.ShowXormlog)
+	if err := Engine.Ping(); err != nil {
 		panic(err)
 	}
 }
-
-func SetupSqlserver() {
-	// if setting.SQlserverSetting.Host != "" {
-	// 	var err error
-	// 	// restful  接口的 数据库初始化
-	// 	if err := restful.SQLInit("odbc", setting.SQlserverSetting.Host, 1000, 10, setting.DatabaseSetting.ShowXormlog); err != nil {
-	// 		log.Fatal(err.Error())
-	// 		fmt.Println("dbs 数据库初始化失败 ")
-	// 	}
-	// 	SqlServerEngine = restful.Engine
-	// 	if err != nil {
-	// 		log.Fatalf("models.Setup err: %v", err)
-	// 	}
-	// 	SqlServerEngine.SetConnMaxLifetime(time.Second * 30)
-	// 	SqlServerEngine.ShowSQL(true)
-	// 	if err = SqlServerEngine.Ping(); err != nil {
-	// 		logs.Error(err)
-	// 		panic(err)
-	// 	}
-	// }
-}
-

+ 1 - 1
pkg/app/request.go

@@ -3,7 +3,7 @@ package app
 import (
 	"github.com/astaxie/beego/validation"
 
-	"../../pkg/logging"
+	"tmr-watch/pkg/logging"
 )
 
 func MarkErrors(errors []*validation.Error) {

+ 4 - 4
pkg/app/response.go

@@ -1,8 +1,9 @@
 package app
 
 import (
+	"tmr-watch/pkg/e"
+
 	"github.com/gin-gonic/gin"
-	"../../pkg/e"
 )
 
 type Gin struct {
@@ -20,12 +21,11 @@ func (g *Gin) Response(httpCode, errCode int, data interface{}) {
 
 func (g *Gin) ResponseEq(httpCode, errCode int, errorNo int, data interface{}) {
 	g.C.JSON(httpCode, gin.H{
-		"code": httpCode,
-		"message":  e.GetMsg(errCode),
+		"code":    httpCode,
+		"message": e.GetMsg(errCode),
 		"results": data,
 		"errorNo": errorNo,
 		"success": 1,
 	})
 	return
 }
-

+ 4 - 10
pkg/logging/file.go

@@ -3,20 +3,14 @@ package logging
 import (
 	"fmt"
 	"time"
-
-	"../../pkg/setting"
 )
 
-func getLogFilePath() string {
-	return fmt.Sprintf("%s%s", setting.AppSetting.RuntimeRootPath, setting.AppSetting.LogSavePath)
+func getLogFilePath(rootPath, savePath string) string {
+	return fmt.Sprintf("%s%s", rootPath, savePath)
 }
 
-func getLogFileName() string {
-	return fmt.Sprintf("%s%s.%s",
-		setting.AppSetting.LogSaveName,
-		time.Now().Format(setting.AppSetting.TimeFormat),
-		setting.AppSetting.LogFileExt,
-	)
+func getLogFileName(saveName, timeFormat, logFileExt string) string {
+	return fmt.Sprintf("%s%s.%s", saveName, time.Now().Format(timeFormat), logFileExt)
 }
 
 //func openLogFile(fileName, filePath string) (*os.File, error) {

+ 31 - 48
pkg/logging/log.go

@@ -1,16 +1,18 @@
 package logging
 
 import (
-	"../../pkg/file"
-	"../setting"
 	"fmt"
-	"github.com/gin-gonic/gin"
 	"io"
 	"log"
 	"os"
 	"path/filepath"
 	"runtime"
 	"time"
+
+	"tmr-watch/conf/setting"
+	"tmr-watch/pkg/file"
+
+	"github.com/gin-gonic/gin"
 )
 
 type Level int
@@ -20,7 +22,7 @@ var (
 
 	DefaultPrefix      = ""
 	DefaultCallerDepth = 2
-	DefaultPath string
+	DefaultPath        string
 
 	logger     *log.Logger
 	logPrefix  = ""
@@ -37,63 +39,45 @@ const (
 
 func Setup() {
 	var err error
-	//tchan :=time.Tick(24*time.Hour)
-	DefaultPath,_ = setting.GetCurrentPath()
-	filePath := DefaultPath+getLogFilePath()
-	fileName := getLogFileName()
+	filePath := fmt.Sprintf("./%s", getLogFilePath(setting.AppSetting.RuntimeRootPath, setting.AppSetting.LogSavePath))
+	fileName := getLogFileName(setting.AppSetting.LogSaveName, setting.AppSetting.TimeFormat, setting.AppSetting.LogFileExt)
 	F, err = file.MustOpen(fileName, filePath)
 	if err != nil {
 		log.Fatalf("logging.Setup err: %v", err)
 	}
-	println(filePath)
 	logger = log.New(F, DefaultPrefix, log.LstdFlags)
-	//gin.DefaultWriter = io.MultiWriter(F, os.Stdout)
-	go func(){
+	gin.DefaultWriter = io.MultiWriter(F, logger.Writer())
+	go func() {
 		defer func() {
-			if err := recover();err != nil {
+			if err := recover(); err != nil {
 				log.Fatalf("logging.recover err: %v", err)
 			}
 		}()
-		tchan :=time.Tick(24*time.Hour)
-	for {
-		select {
-		case <-tchan:
-			F.Close()
-			//fmt.Println("t1定时器")
-			filePath := DefaultPath+getLogFilePath()
-			fileName := getLogFileName()
-			F, err = file.MustOpen(fileName, filePath)
-			if err != nil {
-				log.Fatalf("logging.Setup err: %v", err)
+		tchan := time.Tick(24 * time.Hour)
+		for {
+			select {
+			case <-tchan:
+				F.Close()
+				F, err = file.MustOpen(fileName, filePath)
+				if err != nil {
+					log.Fatalf("logging.Setup err: %v", err)
+				}
+
+				logger = log.New(F, DefaultPrefix, log.LstdFlags)
+				gin.DefaultWriter = io.MultiWriter(F, logger.Writer())
 			}
-
-			logger = log.New(F, DefaultPrefix, log.LstdFlags)
-			gin.DefaultWriter = io.MultiWriter(F, os.Stdout)
 		}
-	}
 	}()
+}
 
+func Printf(format string, v ...interface{}) {
+	setPrefix(INFO)
+	logger.Printf(format, v)
+}
 
-	//// gin log设置
-	//gin.LoggerWithFormatter(func(param gin.LogFormatterParams) string {
-	//
-	//	// 你的自定义格式
-	//	return fmt.Sprintf("%s - [%s] \"%s %s %s %d %s \"%s\" %s\"%s\n",
-	//		param.ClientIP,
-	//		param.TimeStamp.Format(time.RFC1123),
-	//		param.Method,
-	//		param.Path,
-	//		param.Request.Proto,
-	//		param.StatusCode,
-	//		param.Latency,
-	//		param.Request.UserAgent(),
-	//		param.ErrorMessage,
-	//		param.Request.Form,
-	//	)
-	//})
-
-
-
+func Println(v ...interface{}) {
+	setPrefix(INFO)
+	logger.Println(v)
 }
 
 func Debug(v ...interface{}) {
@@ -131,4 +115,3 @@ func setPrefix(level Level) {
 
 	logger.SetPrefix(logPrefix)
 }
-

+ 78 - 93
pkg/util/grfdApiUtil.go

@@ -1,18 +1,17 @@
 package util
 
 import (
-	"../../pkg/logging"
 	"bytes"
 	"fmt"
+	"tmr-watch/pkg/logging"
 
-
-	"github.com/pkg/errors"
-	"github.com/xormplus/xorm"
 	"io/ioutil"
 	"mime/multipart"
 	"net/http"
-)
 
+	"github.com/pkg/errors"
+	"github.com/xormplus/xorm"
+)
 
 type JSON1 struct {
 	Access_token string `json:"access_token"`
@@ -20,8 +19,7 @@ type JSON1 struct {
 
 //格润富德api调用(可咨询刘欢)
 
-
-func Get_AccessToken1(corpid,corpsecret string) string {
+func Get_AccessToken1(corpid, corpsecret string) string {
 	gettoken_url := "https://qyapi.weixin.qq.com/cgi-bin/gettoken?corpid=" + corpid + "&corpsecret=" + corpsecret
 	//print(gettoken_url)
 	client := &http.Client{}
@@ -35,14 +33,14 @@ func Get_AccessToken1(corpid,corpsecret string) string {
 	return json_str.Access_token
 }
 
-func Send_Message1(msg string,url string)[]byte {
+func Send_Message1(msg string, url string) []byte {
 	//print(send_url)
 	client := &http.Client{}
 
 	body := bytes.NewBuffer([]byte(msg))
-	req, err := http.NewRequest("POST",url,body)
+	req, err := http.NewRequest("POST", url, body)
 	req.Header.Set("Content-Type", "application/json")
-	req.Header.Set("charset","UTF-8")
+	req.Header.Set("charset", "UTF-8")
 
 	if err != nil {
 		// handle error
@@ -73,130 +71,117 @@ func Send_Message1(msg string,url string)[]byte {
 	PostWithFormData("POST",url ,&postData)
 }*/
 
-
-func PostWithFormData(method, url string, postData *map[string]string)error{
+func PostWithFormData(method, url string, postData *map[string]string) error {
 	body := new(bytes.Buffer)
 	w := multipart.NewWriter(body)
-	for k,v :=  range *postData{
+	for k, v := range *postData {
 		w.WriteField(k, v)
 	}
 	w.Close()
 	req, _ := http.NewRequest(method, url, body)
-	logging.Info("setdata:    ",body.String())
+	logging.Info("setdata:    ", body.String())
 	req.Header.Set("Content-Type", w.FormDataContentType())
 	resp, _ := http.DefaultClient.Do(req)
 	data, _ := ioutil.ReadAll(resp.Body)
 	resp.Body.Close()
-	m := make(map[string]interface{},0)
-	json.Unmarshal(data,&m)
+	m := make(map[string]interface{}, 0)
+	json.Unmarshal(data, &m)
 	rescode := 0
-	switch  m["status"].(type) {
+	switch m["status"].(type) {
 	case float64:
-		rescode = int(m["status"].(float64) )
+		rescode = int(m["status"].(float64))
 	case int:
 		rescode = m["status"].(int)
 	}
-	if rescode == 1{
-		return errors.New( xorm.String(m["message"]))
+	if rescode == 1 {
+		return errors.New(xorm.String(m["message"]))
 	}
-	return  nil
-
+	return nil
 
 }
 
-
-
 // 栏舍
-type Feedp struct{
-	Status int `json:"status"`
-	ReturnCode string `json:"returnCode"`
-	MessageType     int `json:"messageType"`
-	Message     string    `json:"message"`
-	Data []FeedpData `json:"data"`
+type Feedp struct {
+	Status      int         `json:"status"`
+	ReturnCode  string      `json:"returnCode"`
+	MessageType int         `json:"messageType"`
+	Message     string      `json:"message"`
+	Data        []FeedpData `json:"data"`
 }
-type FeedpData struct{
-	PenId string `json:"penId"`
-	PenName string `json:"penName"`
-	CowCount    int `json:"cowCount"`
-	CreatedAt   string    `json:"createdAt"`
-	ModifiedAt string  `json:"modifiedAt"`
+type FeedpData struct {
+	PenId       string `json:"penId"`
+	PenName     string `json:"penName"`
+	CowCount    int    `json:"cowCount"`
+	CreatedAt   string `json:"createdAt"`
+	ModifiedAt  string `json:"modifiedAt"`
 	CcountRatio string `json:"ccountRatio"`
 }
 
-
-
 // 牛群类别分类
-type Feed struct{
-	Status int `json:"status"`
-	Message     string    `json:"message"`
-	Data []FeedData `json:"data"`
+type Feed struct {
+	Status  int        `json:"status"`
+	Message string     `json:"message"`
+	Data    []FeedData `json:"data"`
 }
-type FeedData struct{
-	FId string `json:"fId"`
-	FName string `json:"fName"`
-	FeedclassName   string    `json:"feedclassName"`
-	DryMatter string  `json:"dryMatter"`
-	Price string `json:"price"`
-	AutoChange string `json:"autoChange"`
-	AllowDev   string    `json:"allowDev"`
-	CreatedAt   string    `json:"createdAt"`
-	ModifiedAt string  `json:"modifiedAt"`
+type FeedData struct {
+	FId           string `json:"fId"`
+	FName         string `json:"fName"`
+	FeedclassName string `json:"feedclassName"`
+	DryMatter     string `json:"dryMatter"`
+	Price         string `json:"price"`
+	AutoChange    string `json:"autoChange"`
+	AllowDev      string `json:"allowDev"`
+	CreatedAt     string `json:"createdAt"`
+	ModifiedAt    string `json:"modifiedAt"`
 }
 
-
-
 // 饲料分类
-type FeedClass struct{
-	Status int `json:"status"`
-	Message     string    `json:"message"`
-	Data []FeedClassData `json:"data"`
+type FeedClass struct {
+	Status  int             `json:"status"`
+	Message string          `json:"message"`
+	Data    []FeedClassData `json:"data"`
 }
-type FeedClassData struct{
+type FeedClassData struct {
 	FeedclassName string `json:"feedclassName"`
-	FeedclassId string `json:"feedclassId"`
-	CreatedAt   string    `json:"createdAt"`
-	ModifiedAt string  `json:"modifiedAt"`
+	FeedclassId   string `json:"feedclassId"`
+	CreatedAt     string `json:"createdAt"`
+	ModifiedAt    string `json:"modifiedAt"`
 }
 
-
-
-
 // 牛群类别分类
-type CowClass struct{
-	Status int `json:"status"`
-	Message     string    `json:"message"`
-	Data []CowClassData `json:"data"`
+type CowClass struct {
+	Status  int            `json:"status"`
+	Message string         `json:"message"`
+	Data    []CowClassData `json:"data"`
 }
-type CowClassData struct{
+type CowClassData struct {
 	CowClassCode string `json:"cowClassCode"`
 	CowClassName string `json:"cowClassName"`
-	CreatedAt   string    `json:"createdAt"`
-	ModifiedAt string  `json:"modifiedAt"`
+	CreatedAt    string `json:"createdAt"`
+	ModifiedAt   string `json:"modifiedAt"`
 }
 
-
 // 配方
-type FeedTemplet struct{
-	Status int `json:"status"`
-	Message     string    `json:"message"`
-	Data []FeedTempletData `json:"data"`
+type FeedTemplet struct {
+	Status  int               `json:"status"`
+	Message string            `json:"message"`
+	Data    []FeedTempletData `json:"data"`
 }
-type FeedTempletData struct{
-	FtId string `json:"ftId"`
-	FtName string `json:"ftName"`
-	CreatedAt   string    `json:"createdAt"`
-	ModifiedAt string  `json:"modifiedAt"`
-	FeedList []FeedListData `json:"feedList"`
+type FeedTempletData struct {
+	FtId       string         `json:"ftId"`
+	FtName     string         `json:"ftName"`
+	CreatedAt  string         `json:"createdAt"`
+	ModifiedAt string         `json:"modifiedAt"`
+	FeedList   []FeedListData `json:"feedList"`
 }
-type FeedListData struct{
-	FId string `json:"fId"`
-	FName string `json:"fName"`
-	DryMatter string `json:"dryMatter"`
-	FodderWeight string `json:"fodderWeight"`
-	MixNo string `json:"mixNo"`
-	RecipeCost string `json:"recipeCost"`
-	FeedclassName string `json:"feedclassName"`
+type FeedListData struct {
+	FId            string `json:"fId"`
+	FName          string `json:"fName"`
+	DryMatter      string `json:"dryMatter"`
+	FodderWeight   string `json:"fodderWeight"`
+	MixNo          string `json:"mixNo"`
+	RecipeCost     string `json:"recipeCost"`
+	FeedclassName  string `json:"feedclassName"`
 	AllowableError string `json:"allowableError"`
-	Autosecond string `json:"autosecond"`
-
+	Autosecond     string `json:"autosecond"`
 }

+ 9 - 9
pkg/util/httppostdata.go

@@ -3,16 +3,16 @@ package util
 import (
 	"bytes"
 	"fmt"
-	"github.com/Anderson-Lu/gofasion/gofasion"
-	"github.com/kptyun/KPTCOMM/routers/restful"
-	"github.com/xormplus/xorm"
 	"io/ioutil"
 	"net/http"
 	"strings"
-)
+	"tmr-watch/http/handle/restful"
 
+	"github.com/Anderson-Lu/gofasion/gofasion"
+	"github.com/xormplus/xorm"
+)
 
-func Httppostdata(url,RequestMethod,parammaps string,tx *xorm.Session)string{
+func Httppostdata(url, RequestMethod, parammaps string, tx *xorm.Session) string {
 	fsion := gofasion.NewFasion(parammaps)
 	sqlnamestr := fsion.Get("name").ValueStr()
 	sqlnamestr1 := fsion.Get("name1").ValueStr()
@@ -50,9 +50,9 @@ func Httppostdata(url,RequestMethod,parammaps string,tx *xorm.Session)string{
 						s_params1 = append(s_params1, value[strings.ToLower(strings.Trim(v, " "))])
 					}
 				}
-				arr, _ := tx.SQL(sql1, s_params1...).QueryString()//获取
+				arr, _ := tx.SQL(sql1, s_params1...).QueryString() //获取
 				queryData.(map[string]interface{})["list"].([]map[string]interface{})[index]["arrList"] = arr
-				body,_ = json.Marshal(queryData)
+				body, _ = json.Marshal(queryData)
 			}
 		}
 
@@ -69,7 +69,7 @@ func Httppostdata(url,RequestMethod,parammaps string,tx *xorm.Session)string{
 
 	}
 	req.Header.Set("Content-Type", "application/json;charset=utf-8")
-	req.Header.Set("token","eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VybmFtZSI6IjAwMDI4IiwicGFzc3dvcmQiOiJlMTBhZGMzOTQ5YmE1OWFiYmU1NmUwNTdmMjBmODgzZSIsImV4cCI6MTYxOTM4NjU0MiwiaXNzIjoiaHR0cHM6Ly9naXRodWIuY29tL2twdHl1bi9nby1hZG1pbi8ifQ.sJwnE9HTOVnDNOaeHqOQzi7cSydYkWS4uQHxtjY7UMY")
+	req.Header.Set("token", "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VybmFtZSI6IjAwMDI4IiwicGFzc3dvcmQiOiJlMTBhZGMzOTQ5YmE1OWFiYmU1NmUwNTdmMjBmODgzZSIsImV4cCI6MTYxOTM4NjU0MiwiaXNzIjoiaHR0cHM6Ly9naXRodWIuY29tL2twdHl1bi9nby1hZG1pbi8ifQ.sJwnE9HTOVnDNOaeHqOQzi7cSydYkWS4uQHxtjY7UMY")
 	if err != nil {
 		// handle error
 	}
@@ -110,4 +110,4 @@ func getDataBySqlT(sqlstr string, offset, pagecount int, returntype string, para
 		queryData, err := restful.QueryByMapT(sqlstr, offset, pagecount, params, tx)
 		return queryData, err
 	}
-}
+}

+ 3 - 6
pkg/util/jwt.go

@@ -2,11 +2,12 @@ package util
 
 import (
 	"fmt"
-	"github.com/dgrijalva/jwt-go"
 	"reflect"
 	"time"
 
-	"../../pkg/setting"
+	"github.com/dgrijalva/jwt-go"
+
+	"tmr-watch/conf/setting"
 )
 
 var JwtSecret = []byte(setting.AppSetting.JwtSecret)
@@ -49,9 +50,6 @@ func ParseToken(token string) (*Claims, error) {
 	return nil, err
 }
 
-
-
-
 func GetIdFromClaims(key string, claims jwt.Claims) string {
 	v := reflect.ValueOf(claims)
 	if v.Kind() == reflect.Map {
@@ -65,4 +63,3 @@ func GetIdFromClaims(key string, claims jwt.Claims) string {
 	}
 	return ""
 }
-

+ 4 - 9
pkg/util/pagination.go

@@ -1,18 +1,13 @@
 package util
 
-import (
-	"github.com/Unknwon/com"
-	"github.com/gin-gonic/gin"
-
-	"../../pkg/setting"
-)
-
-func GetPage(c *gin.Context) int {
+/*func GetPage(c *gin.Context) int {
 	result := 0
-	page := com.StrTo(c.Query("page")).MustInt()
+	pageStr := c.Query("page")
+	page, _ := strconv.Atoi(pageStr)
 	if page > 0 {
 		result = (page - 1) * setting.AppSetting.PageSize
 	}
 
 	return result
 }
+*/

BIN
routers/api/__debug_bin.exe


+ 0 - 287
routers/router.go

@@ -1,287 +0,0 @@
-package routers
-
-import (
-	"context"
-	"fmt"
-
-	"../comm"
-	_ "../docs"
-	"../middleware/jwt"
-
-	"net/http"
-	"strings"
-
-	"../pkg/setting"
-	"../routers/api"
-
-	"../routers/api/sap"
-	"../routers/api/zc"
-	"github.com/gin-contrib/gzip"
-	"github.com/gin-gonic/gin"
-	ginSwagger "github.com/swaggo/gin-swagger"
-	"github.com/swaggo/gin-swagger/swaggerFiles"
-)
-
-func InitRouter() *gin.Engine {
-	r := gin.New()
-	// api.InitMqttClient()
-	go api.CronScheduled(context.TODO())
-	// go sap.SyncSapFeed(context.TODO())
-	//正诚配方生产计划同步
-	// go zc.SyncZC()
-
-	r.Use(func(c *gin.Context) {
-		fmt.Println(c.Request.URL)
-	})
-	r.Use(gzip.Gzip(gzip.DefaultCompression))
-	//	ginpprof.Wrap(r)
-	r.Use(gin.LoggerWithFormatter(func(param gin.LogFormatterParams) string {
-		// 你的自定义格式
-		return fmt.Sprintf("   %+v \n",
-			param.Keys,
-		)
-	}))
-	r.Use(gin.Logger()) // 日志
-
-	r.Use(Cors()) // 跨域请求rolemenus
-	r.Use(gin.Recovery())
-	gin.SetMode(setting.ServerSetting.RunMode)
-
-	r.Static("/static", setting.CurrentPath+"/dist/static")               // 添加资源路径
-	r.StaticFile("/", setting.CurrentPath+"/dist/index.html")             //前端接口
-	r.StaticFile("/favicon.ico", setting.CurrentPath+"/dist/favicon.ico") //前端接口
-
-	r.Static("/file", setting.CurrentPath+"/uploads/file")
-	r.Static("/uploads", setting.CurrentPath+"/uploads")
-	r.POST("/auth", api.Auth)           // 获取登录token
-	r.POST("/authlogin", api.AuthLogin) // 获取登录token
-
-	r.GET("/swagger/*any", ginSwagger.WrapHandler(swaggerFiles.Handler)) // API 注释
-
-	// r.GET("/sync", api.Sync)
-	// r.GET("/UDFeedtempletinfo", api.UDFeedtempletinfo)
-	// r.GET("/UDUploadadddata", api.UDUploadadddata)
-	// r.GET("/UDUploaddiliverdata", api.UDUploaddiliverdata)
-	// r.GET("/UDUploadoverplusdata", api.UDUploadoverplusdata)
-
-	if setting.CommSetting.PortName != "" {
-		r.GET("/comm/:id/:x/:y/", comm.ProcessHttp)
-		r.GET("/cps/:id/:limit", comm.ProcessHttpCPS)
-		r.POST("/comm/:id/:x/:y/", comm.ProcessHttp)
-		r.POST("/cps/:id/:limit", comm.ProcessHttpCPS)
-	}
-	eqm := r.Group("/manage/api")
-	eqm.POST("/login", api.Auth)
-	eqm.POST("/login/imei", api.AuthImei)
-
-	r.GET("/getData", api.GetWxCode)
-
-	r.POST("/userwxopenid/binding", api.UserWXOpenIDBinding)
-
-	apiV1 := r.Group("/authdata")
-	apiV1.Use(jwt.JWT()) // token 验证
-	{
-		apiV1.POST("/rolemenus", api.GetRecuDataByName)
-		apiV1.GET("/userinfo", api.GetUserinfo)
-		apiV1.POST("/logout", api.UserLogout)
-
-		apiV1.POST("/GetRecuDataByName", api.GetRecuDataByName) ////
-
-		apiV1.POST("/GetDataByName", api.GetDataByName)
-		apiV1.POST("/GetDataBySqlIN", api.GetDataBySqlIN)
-		apiV1.POST("/GetDataByNames", api.GetDataByNames)
-		apiV1.POST("/PostDataByName", api.PostDataByName)
-		apiV1.POST("/PostDataByNames", api.PostDataByNames)
-		apiV1.POST("/UpdateDataRelation", api.UpdateDataRelation) //log.error
-		apiV1.POST("/GetDataByNameForm", api.GetDataByNameForm)
-		apiV1.POST("/PostDataByNameForm", api.PostDataByNameForm)
-		apiV1.POST("/GetUpkeepPlan", api.GetUpkeepPlan)
-		apiV1.POST("/GetReportform", api.GetReportform)
-		apiV1.POST("/GetArrList", api.GetArrList)
-		apiV1.POST("/GETNurJudge", api.GETNurJudge)
-		apiV1.POST("/GETNurJudgeRport", api.GETNurJudgeRport)
-
-		apiV1.POST("/ExecDataByConfig", api.ExecDataByConfig)
-
-		apiV1.POST("/ImportExcel", api.ImportExcel)
-
-		apiV1.POST("/upload/:id/:name", api.UploadFile)
-		apiV1.POST("/uploads", api.UploadFiles)
-		apiV1.POST("/uploaderimage", api.UploaderImage)
-		apiV1.POST("/uploaderTmrImage", api.UploaderTmrImage)
-		apiV1.POST("/removeimage", api.RemovePicByName)
-		apiV1.GET("/getthumbnailimage/:filename", api.GetThumbnailImage)
-		apiV1.POST("/getoriginimage/:filename", api.GetOriginImage)
-		apiV1.GET("/getfileraw/:filename", api.GetFileRaw)
-		apiV1.GET("/downloadfile/:filename", api.DownloadFile)
-		apiV1.POST("/removefile/:id", api.RemoveFileByName)
-
-		apiV1.POST("/testdata", api.TestData)
-		apiV1.POST("/Testpartitions", api.Testpartitions)
-
-		//自定义报表
-		apiV1.POST("/Createchart", api.Createchart)
-		apiV1.POST("/Updatechart", api.Createchart)
-		apiV1.POST("/exesql", api.ExecSQL)
-		apiV1.POST("/Createdashboard", api.Updatedashboard)
-		apiV1.POST("/Updatedashboard", api.Updatedashboard)
-		apiV1.POST("/Dashboards", api.Dashboards)
-
-		// 格润富德 API 数据获取
-		apiV1.POST("/getDorm", api.GetDorm) // 牛舍信息
-		apiV1.POST("/GetRJSBData", api.GetRJSBData)
-		apiV1.POST("/PostRJSBData", api.PostRJSBData)
-		apiV1.POST("/PostRJSBDatas", api.PostRJSBDatas)
-
-		apiV1.POST("/autogeneration", api.Autogeneration)
-		apiV1.POST("/spillage", api.GetSpillage)
-		apiV1.POST("/trains", api.UpdateTrains)
-		apiV1.POST("/lpplan/edit", api.UpdateLpplan)
-		apiV1.POST("/lpplan/add", api.AddLpplan)
-		apiV1.POST("/lpplandtl", api.GetLpplandtl)
-		apiV1.POST("/lpplandtl/restore", api.RestoreLpplandtl)
-		apiV1.POST("/lpplandtl/del", api.DelLpplandtl)
-
-		apiV1.POST("/spillage/day", api.GetSpillageDay)
-		apiV1.POST("/trains/day", api.UpdateTrainsDay)
-		apiV1.POST("/lpplandtl/restore/day", api.RestoreLpplandtlDay)
-		apiV1.POST("/lpplandtl/del/day", api.DelLpplandtlDay)
-		apiV1.POST("/lpplandtl/add/day", api.AddLpplanDay)
-		apiV1.POST("/lpplandtl/day", api.GetLpplandtlDay)
-
-		apiV1.POST("/chart/feedEffMR", api.GetFeedEffMR)
-		apiV1.POST("/chart/feedEffSL", api.GetFeedEffSL)
-		apiV1.POST("/chart/feedEffHL", api.GetFeedEffHL)
-		apiV1.POST("/chart/feedEffZH", api.GetFeedEffZH)
-		apiV1.POST("/chart/feedEffCBFT", api.GetFeedEffCBFT)
-
-		apiV1.POST("/chart/accuracyAllFT", api.GetAccuracyAllFT)
-		apiV1.POST("/chart/accuracyAllJH", api.GetAccuracyAllJH)
-		apiV1.POST("/chart/accuracyAllNQ", api.GetAccuracyAllNQ)
-		apiV1.POST("/chart/accuracyAllCC", api.GetAccuracyAllCC)
-		apiV1.POST("/chart/accuracyAllHL", api.GetAccuracyAllHL)
-		apiV1.POST("/chart/accuracyAllLS", api.GetAccuracyAllLS)
-		apiV1.POST("/chart/accuracyAllQX", api.GetAccuracyAllQX)
-
-		apiV1.POST("/summary", api.GetSummary)
-
-		apiV1.POST("/ftdetail/edit", api.UpdateFTdetail)
-		apiV1.POST("/fpdetail/edit", api.UpdateFpdetailBar)
-		apiV1.POST("/ftdetai/del", api.DeleteFTdetail)
-		apiV1.POST("/lpplandtl/add", api.AddLpplandtl)
-		apiV1.POST("/lpplandtl/edit/sort", api.UpdateLpplandtlSort)
-		apiV1.POST("/lpplandtl/date/add", api.AddLpplandtlDate)
-		apiV1.POST("/lpplandtl/edit/date/sort", api.UpdateLpplandtlDateSort)
-		apiV1.POST("/processAnalysist", api.GetProcessAnalysis)
-
-		apiV1.POST("/feedp/undistribute", api.GetFeedpUndistributed)
-
-		apiV1.POST("/feedtemplet/enable", api.UpdateFeedtempletStatus)
-
-		apiV1.POST("/ftdry/add", api.AddFtdry)
-		apiV1.POST("/checkDates", api.CheckDates)
-		//编辑数据同步勾选状态
-		apiV1.POST("/scheduled/status/edit", api.UpdateScheduledStatus)
-		//	立即同步
-		apiV1.POST("/synchronizeNow", api.SynchronizeNow)
-
-		apiV1.POST("/fpdimportexcel", api.FpdImportExcel)
-
-		apiV1.POST("/barfeedremain/excel", api.GetBarfeedremainExcel)
-
-		//删除当前班次撒料时记录
-		apiV1.POST("/spillageall/del", api.DeleteSpillageAll)
-
-		apiV1.POST("/feedp/history", api.GetFeedpHistory)
-		//查看撒料修改记录
-		apiV1.POST("/spillageall/history", api.GetSpillageallHistory)
-		//查看撒料设备
-		apiV1.POST("/tmrListEnableTypeAll", api.GetTMRListEnableTypeAll)
-		//查看提醒设置
-		apiV1.POST("/remind/list", api.GetRemind)
-		apiV1.POST("/remind/edit", api.UpdateRemind)
-		//配方模板修改记录
-		apiV1.POST("/recipetemplate/history", api.GetRecipeTemplateRecordHistory)
-		//配方模板修改记录
-		apiV1.POST("/feedtemplet/history", api.GetFeedtempletHistory)
-
-		//app取料接口
-		apiV1.POST("/downloadedplan", api.GetDownloadedplanMaterial1)
-		apiV1.POST("/downloadedplan/list", api.GetDownloadedplanMaterialList)
-		apiV1.POST("/subplan", api.GetSubPlan)
-		apiV1.POST("/completeplan", api.CompletePlan)
-		apiV1.POST("/realtimeweight", api.AddRealTimeWeight)
-
-		//修改撒料计划tmr编号
-		apiV1.POST("/materialtmr/edit", api.UpdateMaterialTMR)
-		apiV1.POST("/materialtmr/date/edit", api.UpdateMaterialTMRDate)
-
-		//集团端配方下发
-		apiV1.POST("/formulaissued", api.AddFormulaIssued)
-		//盘点单添加
-		apiV1.POST("/biginventory", api.AddBigInventory)
-		//sap原料上传
-		apiV1.POST("/material/sap/upload", sap.MaterialOutbound)
-
-		apiV1.POST("/downloadplandtl1/image/upload", api.UploadFile1)
-
-		apiV1.POST("/syncSCJH", zc.SyncSCJH)
-
-		//修改日执行计划
-		apiV1.POST("/dailydata/edit", api.UpdateDailyData)
-		apiV1.POST("/formulastatistics", api.GetFormulaStatistics)
-
-	}
-
-	//不需要登录验证的接口
-	r.POST("/getopenid/:code", api.GetOpenID)
-	apiV3 := r.Group("/thi") // restful  接口 tablename 是 表名字
-	{
-		apiV3.POST("/GetDataByName", api.GetDataByName)
-		apiV3.POST("/PostDataByName", api.PostDataByName)
-	}
-
-	apiV4 := r.Group("/customreport") // restful  接口 tablename 是 表名字
-	{
-		apiV4.POST("/createchart", api.Createchart)
-		apiV4.POST("/PostDataByName", api.PostDataByName)
-	}
-	return r
-}
-
-// 跨域
-func Cors() gin.HandlerFunc {
-	return func(c *gin.Context) {
-		method := c.Request.Method               //请求方法
-		origin := c.Request.Header.Get("Origin") //请求头部
-		var headerKeys []string                  // 声明请求头keys
-		for k, _ := range c.Request.Header {
-			headerKeys = append(headerKeys, k)
-		}
-		headerStr := strings.Join(headerKeys, ", ")
-		if headerStr != "" {
-			headerStr = fmt.Sprintf("access-control-allow-origin, access-control-allow-headers, %s", headerStr)
-		} else {
-			headerStr = "access-control-allow-origin, access-control-allow-headers"
-		}
-		if origin != "" {
-			c.Writer.Header().Set("Access-Control-Allow-Origin", "*")
-			c.Header("Access-Control-Allow-Origin", "*")                                        // 这是允许访问所有域
-			c.Header("Access-Control-Allow-Methods", "POST, GET, OPTIONS, PUT, DELETE, UPDATE") //服务器支持的所有跨域请求的方法,为了避免浏览次请求的多次'预检'请求
-			//  header的类型
-			c.Header("Access-Control-Allow-Headers", "Authorization, Content-Length, X-CSRF-Token, id,  Token, name, optname, thumbnail, session, X_Requested_With, Accept, Origin, Host, Connection, Accept-Encoding, Accept-Language,DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Pragma")
-			//              允许跨域设置                                                                                                      可以返回其他子段
-			c.Header("Access-Control-Expose-Headers", "Content-Length, Access-Control-Allow-Origin, Access-Control-Allow-Headers, Cache-Control, Content-Language, Content-Type, Expires, Last-Modified, Pragma, FooBar") // 跨域关键设置 让浏览器可以解析
-			c.Header("Access-Control-Max-Age", "172800")                                                                                                                                                                  // 缓存请求信息 单位为秒
-			c.Header("Access-Control-Allow-Credentials", "false")                                                                                                                                                         //  跨域请求是否需要带cookie信息 默认设置为true
-			c.Set("content-type", "application/json")                                                                                                                                                                     // 设置返回格式是json
-		}
-
-		//放行所有OPTIONS方法
-		if method == "OPTIONS" {
-			c.JSON(http.StatusOK, "Options Request!")
-		}
-		// 处理请求
-		c.Next() //  处理请求
-	}
-}

+ 16 - 14
service/apisql_service/apisql_service.go

@@ -1,16 +1,17 @@
 package apisql_service
 
+/*
 import (
 	"errors"
-	"../../models"
+	"tmr-watch/models"
 )
 
 type Apisql struct {
-	ID       int
-	Sqlstr string
-	Sqlname string
-	Returetype  string
-	Method  string
+	ID         int
+	Sqlstr     string
+	Sqlname    string
+	Returetype string
+	Method     string
 	CreatedBy  string
 	ModifiedBy string
 
@@ -20,10 +21,10 @@ type Apisql struct {
 
 func (a *Apisql) Add() (id int, err error) {
 	data := map[string]interface{}{
-		"Sqlstr": a.Sqlstr,
-		"Sqlname": a.Sqlname,
-		"Returetype":  a.Returetype,
-		"Method":  a.Method,
+		"Sqlstr":     a.Sqlstr,
+		"Sqlname":    a.Sqlname,
+		"Returetype": a.Returetype,
+		"Method":     a.Method,
 	}
 	Sqlname, _ := models.CheckSqlname(a.Sqlname)
 
@@ -40,10 +41,10 @@ func (a *Apisql) Add() (id int, err error) {
 
 func (a *Apisql) Edit() error {
 	data := map[string]interface{}{
-		"Sqlstr": a.Sqlstr,
-		"Sqlname": a.Sqlname,
-		"Returetype":  a.Returetype,
-		"Method":  a.Method,
+		"Sqlstr":     a.Sqlstr,
+		"Sqlname":    a.Sqlname,
+		"Returetype": a.Returetype,
+		"Method":     a.Method,
 	}
 
 	Sqlname, _ := models.CheckSqlname(a.Sqlname)
@@ -107,3 +108,4 @@ func (a *Apisql) getMaps() map[string]interface{} {
 	maps["deleted_on"] = 0
 	return maps
 }
+*/

+ 3 - 2
service/user_service/user.go

@@ -1,8 +1,9 @@
 package user_service
 
 import (
-	"../../pkg/util"
-	"../../routers/restful"
+	"tmr-watch/http/handle/restful"
+	"tmr-watch/pkg/util"
+
 	"github.com/casbin/casbin"
 )