diff --git a/server/go.mod b/server/go.mod index 2329a48..8538891 100644 --- a/server/go.mod +++ b/server/go.mod @@ -1,60 +1,59 @@ module hotgo -go 1.23.0 +go 1.24.4 require ( - github.com/IBM/sarama v1.43.3 - github.com/alibabacloud-go/darabonba-openapi/v2 v2.0.9 + github.com/IBM/sarama v1.45.2 + github.com/alibabacloud-go/darabonba-openapi/v2 v2.1.7 github.com/alibabacloud-go/dysmsapi-20170525/v3 v3.0.6 - github.com/alibabacloud-go/tea v1.2.2 - github.com/alibabacloud-go/tea-utils/v2 v2.0.6 + github.com/alibabacloud-go/tea v1.3.9 + github.com/alibabacloud-go/tea-utils/v2 v2.0.7 github.com/aliyun/aliyun-oss-go-sdk v3.0.2+incompatible github.com/apache/rocketmq-client-go/v2 v2.1.2 - github.com/casbin/casbin/v2 v2.99.0 - github.com/forgoer/openssl v1.6.0 + github.com/casbin/casbin/v2 v2.108.0 + github.com/forgoer/openssl v1.6.1 github.com/go-pay/crypto v0.0.1 - github.com/go-pay/gopay v1.5.104 + github.com/go-pay/gopay v1.5.114 github.com/gogf/gf/contrib/drivers/mysql/v2 v2.9.0 github.com/gogf/gf/contrib/nosql/redis/v2 v2.9.0 github.com/gogf/gf/contrib/trace/jaeger/v2 v2.7.4 - github.com/gogf/gf/v2 v2.9.0 + github.com/gogf/gf/v2 v2.9.1-0.20250624075347-5fa656d1cc92 github.com/gogf/selfupdate v0.0.0-20231215043001-5c48c528462f - github.com/golang-jwt/jwt/v5 v5.2.1 + github.com/golang-jwt/jwt/v5 v5.2.2 github.com/gorilla/websocket v1.5.3 github.com/kayon/iploc v0.0.0-20200312105652-bda3e968a794 - github.com/minio/minio-go/v7 v7.0.76 - github.com/mojocn/base64Captcha v1.3.6 + github.com/minio/minio-go/v7 v7.0.94 + github.com/mojocn/base64Captcha v1.3.8 github.com/olekukonko/tablewriter v0.0.5 - github.com/qiniu/go-sdk/v7 v7.21.1 + github.com/qiniu/go-sdk/v7 v7.25.4 github.com/schollz/progressbar/v3 v3.18.0 github.com/shirou/gopsutil/v3 v3.24.5 - github.com/silenceper/wechat/v2 v2.1.6 - github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common v1.0.993 - github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/sms v1.0.993 - github.com/tencentyun/cos-go-sdk-v5 v0.7.54 - github.com/ufilesdk-dev/ufile-gosdk v1.0.4 - github.com/xuri/excelize/v2 v2.6.0 - go.opentelemetry.io/otel v1.32.0 - golang.org/x/mod v0.20.0 - golang.org/x/net v0.32.0 - golang.org/x/tools v0.24.0 + github.com/silenceper/wechat/v2 v2.1.9 + github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common v1.0.1202 + github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/sms v1.0.1200 + github.com/tencentyun/cos-go-sdk-v5 v0.7.66 + github.com/ufilesdk-dev/ufile-gosdk v1.0.6 + github.com/xuri/excelize/v2 v2.9.1 + go.opentelemetry.io/otel v1.37.0 + golang.org/x/mod v0.25.0 + golang.org/x/net v0.41.0 + golang.org/x/tools v0.34.0 gopkg.in/yaml.v3 v3.0.1 ) require ( - aead.dev/minisign v0.3.0 // indirect - filippo.io/edwards25519 v1.1.0 // indirect + aead.dev/minisign v0.2.0 // indirect github.com/BurntSushi/toml v1.4.0 // indirect github.com/alex-ant/gomath v0.0.0-20160516115720-89013a210a82 // indirect github.com/alibabacloud-go/alibabacloud-gateway-spi v0.0.5 // indirect github.com/alibabacloud-go/debug v1.0.1 // indirect - github.com/alibabacloud-go/endpoint-util v1.1.1 // indirect - github.com/alibabacloud-go/openapi-util v0.1.1 // indirect - github.com/alibabacloud-go/tea-xml v1.1.3 // indirect - github.com/aliyun/credentials-go v1.3.9 // indirect + github.com/alibabacloud-go/endpoint-util v1.1.0 // indirect + github.com/alibabacloud-go/openapi-util v0.1.0 // indirect + github.com/alibabacloud-go/tea-utils v1.3.1 // indirect + github.com/aliyun/credentials-go v1.4.5 // indirect github.com/bmatcuk/doublestar/v4 v4.6.1 // indirect - github.com/bradfitz/gomemcache v0.0.0-20230905024940-24af94b03874 // indirect - github.com/casbin/govaluate v1.2.0 // indirect + github.com/bradfitz/gomemcache v0.0.0-20220106215444-fb4bf637b56d // indirect + github.com/casbin/govaluate v1.3.0 // indirect github.com/cespare/xxhash/v2 v2.3.0 // indirect github.com/clbanning/mxj v1.8.4 // indirect github.com/clbanning/mxj/v2 v2.7.0 // indirect @@ -67,27 +66,29 @@ require ( github.com/emirpasic/gods v1.18.1 // indirect github.com/fatih/color v1.18.0 // indirect github.com/fatih/structs v1.1.0 // indirect - github.com/fsnotify/fsnotify v1.8.0 // indirect + github.com/fsnotify/fsnotify v1.7.0 // indirect + github.com/gammazero/toposort v0.1.1 // indirect github.com/go-ini/ini v1.67.0 // indirect - github.com/go-logr/logr v1.4.2 // indirect + github.com/go-logr/logr v1.4.3 // indirect github.com/go-logr/stdr v1.2.2 // indirect - github.com/go-ole/go-ole v1.3.0 // indirect - github.com/go-pay/errgroup v0.0.2 // indirect + github.com/go-ole/go-ole v1.2.6 // indirect + github.com/go-pay/errgroup v0.0.3 // indirect + github.com/go-pay/smap v0.0.2 // indirect github.com/go-pay/util v0.0.4 // indirect github.com/go-pay/xlog v0.0.3 // indirect github.com/go-pay/xtime v0.0.2 // indirect github.com/go-redis/redis/v8 v8.11.5 // indirect - github.com/go-sql-driver/mysql v1.8.1 // indirect - github.com/goccy/go-json v0.10.3 // indirect - github.com/gofrs/flock v0.12.1 // indirect + github.com/go-sql-driver/mysql v1.7.1 // indirect + github.com/goccy/go-json v0.10.5 // indirect + github.com/gofrs/flock v0.8.1 // indirect github.com/golang/freetype v0.0.0-20170609003504-e2365dfdc4a0 // indirect - github.com/golang/mock v1.6.0 // indirect + github.com/golang/mock v1.4.4 // indirect github.com/golang/snappy v0.0.4 // indirect github.com/google/btree v1.1.3 // indirect - github.com/google/go-querystring v1.1.0 // indirect + github.com/google/go-querystring v1.0.0 // indirect github.com/google/uuid v1.6.0 // indirect github.com/grokify/html-strip-tags-go v0.1.0 // indirect - github.com/hashicorp/errwrap v1.1.0 // indirect + github.com/hashicorp/errwrap v1.0.0 // indirect github.com/hashicorp/go-multierror v1.1.1 // indirect github.com/hashicorp/go-uuid v1.0.3 // indirect github.com/jcmturner/aescts/v2 v2.0.0 // indirect @@ -96,56 +97,63 @@ require ( github.com/jcmturner/gokrb5/v8 v8.4.4 // indirect github.com/jcmturner/rpc/v2 v2.0.3 // indirect github.com/json-iterator/go v1.1.12 // indirect - github.com/klauspost/compress v1.17.9 // indirect - github.com/klauspost/cpuid/v2 v2.2.8 // indirect - github.com/lufia/plan9stats v0.0.0-20240819163618-b1d8f4d146e7 // indirect + github.com/klauspost/compress v1.18.0 // indirect + github.com/klauspost/cpuid/v2 v2.2.10 // indirect + github.com/lufia/plan9stats v0.0.0-20211012122336-39d0f177ccd0 // indirect github.com/magiconair/properties v1.8.9 // indirect - github.com/matishsiao/goInfo v0.0.0-20210923090445-da2e3fa8d45f // indirect github.com/mattn/go-colorable v0.1.13 // indirect github.com/mattn/go-isatty v0.0.20 // indirect github.com/mattn/go-runewidth v0.0.16 // indirect + github.com/minio/crc64nvme v1.0.1 // indirect github.com/minio/md5-simd v1.1.2 // indirect github.com/mitchellh/colorstring v0.0.0-20190213212951-d06e56a500db // indirect - github.com/mitchellh/mapstructure v1.5.0 // indirect + github.com/mitchellh/mapstructure v1.4.3 // 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/mozillazg/go-httpheader v0.4.0 // indirect + github.com/mozillazg/go-httpheader v0.2.1 // indirect + github.com/olekukonko/errors v0.0.0-20250405072817-4e6d85265da6 // indirect + github.com/olekukonko/ll v0.0.8 // indirect github.com/patrickmn/go-cache v2.1.0+incompatible // indirect - github.com/pierrec/lz4/v4 v4.1.21 // indirect - github.com/pkg/errors v0.9.1 // indirect - github.com/power-devops/perfstat v0.0.0-20240221224432-82ca36839d55 // indirect + github.com/philhofer/fwd v1.1.3-0.20240916144458-20a13a1f6b7c // indirect + github.com/pierrec/lz4/v4 v4.1.22 // indirect + github.com/pkg/errors v0.8.1 // indirect + github.com/power-devops/perfstat v0.0.0-20210106213030-5aafc221ea8c // indirect github.com/rcrowley/go-metrics v0.0.0-20201227073835-cf1acfcdf475 // indirect github.com/redis/go-redis/v9 v9.7.0 // indirect github.com/richardlehane/mscfb v1.0.4 // indirect - github.com/richardlehane/msoleps v1.0.3 // indirect + github.com/richardlehane/msoleps v1.0.4 // indirect github.com/rivo/uniseg v0.4.7 // indirect github.com/rs/xid v1.6.0 // indirect github.com/shoenig/go-m1cpu v0.1.6 // indirect - github.com/sirupsen/logrus v1.9.3 // indirect - github.com/spf13/cast v1.7.0 // indirect - github.com/tidwall/gjson v1.17.3 // indirect + github.com/sirupsen/logrus v1.9.0 // indirect + github.com/spf13/cast v1.4.1 // indirect + github.com/tidwall/gjson v1.14.1 // indirect github.com/tidwall/match v1.1.1 // indirect - github.com/tidwall/pretty v1.2.1 // indirect + github.com/tidwall/pretty v1.2.0 // indirect + github.com/tiendc/go-deepcopy v1.6.0 // indirect + github.com/tinylib/msgp v1.3.0 // indirect github.com/tjfoc/gmsm v1.4.1 // indirect - github.com/tklauser/go-sysconf v0.3.14 // indirect - github.com/tklauser/numcpus v0.8.0 // indirect - github.com/xuri/efp v0.0.0-20240408161823-9ad904a10d6d // indirect - github.com/xuri/nfp v0.0.0-20240318013403-ab9948c2c4a7 // indirect + github.com/tklauser/go-sysconf v0.3.12 // indirect + github.com/tklauser/numcpus v0.6.1 // indirect + github.com/xuri/efp v0.0.1 // indirect + github.com/xuri/nfp v0.0.1 // indirect github.com/yusufpapurcu/wmi v1.2.4 // indirect - go.opentelemetry.io/otel/exporters/jaeger v1.17.0 // indirect - go.opentelemetry.io/otel/metric v1.32.0 // indirect + go.opentelemetry.io/auto/sdk v1.1.0 // indirect + go.opentelemetry.io/otel/exporters/jaeger v1.14.0 // indirect + go.opentelemetry.io/otel/metric v1.37.0 // indirect go.opentelemetry.io/otel/sdk v1.32.0 // indirect - go.opentelemetry.io/otel/trace v1.32.0 // indirect - go.uber.org/atomic v1.11.0 // indirect - golang.org/x/crypto v0.30.0 // indirect - golang.org/x/image v0.19.0 // indirect - golang.org/x/sync v0.10.0 // indirect - golang.org/x/sys v0.29.0 // indirect - golang.org/x/term v0.28.0 // indirect - golang.org/x/text v0.21.0 // indirect - golang.org/x/time v0.6.0 // indirect + go.opentelemetry.io/otel/trace v1.37.0 // indirect + go.uber.org/atomic v1.5.1 // indirect + golang.org/x/crypto v0.39.0 // indirect + golang.org/x/image v0.25.0 // indirect + golang.org/x/lint v0.0.0-20190930215403-16217165b5de // indirect + golang.org/x/sync v0.15.0 // indirect + golang.org/x/sys v0.33.0 // indirect + golang.org/x/term v0.32.0 // indirect + golang.org/x/text v0.26.0 // indirect + golang.org/x/time v0.12.0 // indirect gopkg.in/ini.v1 v1.67.0 // indirect - gopkg.in/natefinch/lumberjack.v2 v2.2.1 // indirect + gopkg.in/natefinch/lumberjack.v2 v2.0.0 // indirect + modernc.org/fileutil v1.0.0 // indirect stathat.com/c/consistent v1.0.0 // indirect ) diff --git a/server/go.sum b/server/go.sum index e875759..4cd2a41 100644 --- a/server/go.sum +++ b/server/go.sum @@ -1,53 +1,64 @@ -aead.dev/minisign v0.3.0 h1:8Xafzy5PEVZqYDNP60yJHARlW1eOQtsKNp/Ph2c0vRA= -aead.dev/minisign v0.3.0/go.mod h1:NLvG3Uoq3skkRMDuc3YHpWUTMTrSExqm+Ij73W13F6Y= +aead.dev/minisign v0.2.0 h1:kAWrq/hBRu4AARY6AlciO83xhNnW9UaC8YipS2uhLPk= +aead.dev/minisign v0.2.0/go.mod h1:zdq6LdSd9TbuSxchxwhpA9zEb9YXcVGoE8JakuiGaIQ= cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= -filippo.io/edwards25519 v1.1.0 h1:FNf4tywRC1HmFuKW5xopWpigGjJKiJSV0Cqo0cJWDaA= -filippo.io/edwards25519 v1.1.0/go.mod h1:BxyFTGdWcka3PhytdK4V28tE5sGfRvvvRV7EaN4VDT4= github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= github.com/BurntSushi/toml v1.1.0/go.mod h1:CxXYINrC8qIiEnFrOxCa7Jy5BFHlXnUU2pbicEuybxQ= github.com/BurntSushi/toml v1.3.2/go.mod h1:CxXYINrC8qIiEnFrOxCa7Jy5BFHlXnUU2pbicEuybxQ= github.com/BurntSushi/toml v1.4.0 h1:kuoIxZQy2WRRk1pttg9asf+WVv6tWQuBNVmK8+nqPr0= github.com/BurntSushi/toml v1.4.0/go.mod h1:ukJfTF/6rtPPRCnwkur4qwRxa8vTRFBF0uk2lLoLwho= -github.com/IBM/sarama v1.43.3 h1:Yj6L2IaNvb2mRBop39N7mmJAHBVY3dTPncr3qGVkxPA= -github.com/IBM/sarama v1.43.3/go.mod h1:FVIRaLrhK3Cla/9FfRF5X9Zua2KpS3SYIXxhac1H+FQ= +github.com/IBM/sarama v1.45.2 h1:8m8LcMCu3REcwpa7fCP6v2fuPuzVwXDAM2DOv3CBrKw= +github.com/IBM/sarama v1.45.2/go.mod h1:ppaoTcVdGv186/z6MEKsMm70A5fwJfRTpstI37kVn3Y= github.com/QcloudApi/qcloud_sign_golang v0.0.0-20141224014652-e4130a326409/go.mod h1:1pk82RBxDY/JZnPQrtqHlUFfCctgdorsd9M06fMynOM= github.com/alex-ant/gomath v0.0.0-20160516115720-89013a210a82 h1:7dONQ3WNZ1zy960TmkxJPuwoolZwL7xKtpcM04MBnt4= github.com/alex-ant/gomath v0.0.0-20160516115720-89013a210a82/go.mod h1:nLnM0KdK1CmygvjpDUO6m1TjSsiQtL61juhNsvV/JVI= +github.com/alibabacloud-go/alibabacloud-gateway-pop v0.0.6 h1:eIf+iGJxdU4U9ypaUfbtOWCsZSbTb8AUHvyPrxu6mAA= +github.com/alibabacloud-go/alibabacloud-gateway-pop v0.0.6/go.mod h1:4EUIoxs/do24zMOGGqYVWgw0s9NtiylnJglOeEB5UJo= github.com/alibabacloud-go/alibabacloud-gateway-spi v0.0.4/go.mod h1:sCavSAvdzOjul4cEqeVtvlSaSScfNsTQ+46HwlTL1hc= github.com/alibabacloud-go/alibabacloud-gateway-spi v0.0.5 h1:zE8vH9C7JiZLNJJQ5OwjU9mSi4T9ef9u3BURT6LCLC8= github.com/alibabacloud-go/alibabacloud-gateway-spi v0.0.5/go.mod h1:tWnyE9AjF8J8qqLk645oUmVUnFybApTQWklQmi5tY6g= +github.com/alibabacloud-go/darabonba-array v0.1.0 h1:vR8s7b1fWAQIjEjWnuF0JiKsCvclSRTfDzZHTYqfufY= +github.com/alibabacloud-go/darabonba-array v0.1.0/go.mod h1:BLKxr0brnggqOJPqT09DFJ8g3fsDshapUD3C3aOEFaI= +github.com/alibabacloud-go/darabonba-encode-util v0.0.2 h1:1uJGrbsGEVqWcWxrS9MyC2NG0Ax+GpOM5gtupki31XE= +github.com/alibabacloud-go/darabonba-encode-util v0.0.2/go.mod h1:JiW9higWHYXm7F4PKuMgEUETNZasrDM6vqVr/Can7H8= +github.com/alibabacloud-go/darabonba-map v0.0.2 h1:qvPnGB4+dJbJIxOOfawxzF3hzMnIpjmafa0qOTp6udc= +github.com/alibabacloud-go/darabonba-map v0.0.2/go.mod h1:28AJaX8FOE/ym8OUFWga+MtEzBunJwQGceGQlvaPGPc= github.com/alibabacloud-go/darabonba-openapi/v2 v2.0.2/go.mod h1:5JHVmnHvGzR2wNdgaW1zDLQG8kOC4Uec8ubkMogW7OQ= -github.com/alibabacloud-go/darabonba-openapi/v2 v2.0.9 h1:fxMCrZatZfXq5nLcgkmWBXmU3FLC1OR+m/SqVtMqflk= -github.com/alibabacloud-go/darabonba-openapi/v2 v2.0.9/go.mod h1:bb+Io8Sn2RuM3/Rpme6ll86jMyFSrD1bxeV/+v61KeU= +github.com/alibabacloud-go/darabonba-openapi/v2 v2.1.7 h1:ASXSBga98QrGMxbIThCD6jAti09gedLfvry6yJtsoBE= +github.com/alibabacloud-go/darabonba-openapi/v2 v2.1.7/go.mod h1:TBpgqm3XofZz2LCYjZhektGPU7ArEgascyzbm4SjFo4= +github.com/alibabacloud-go/darabonba-signature-util v0.0.7 h1:UzCnKvsjPFzApvODDNEYqBHMFt1w98wC7FOo0InLyxg= +github.com/alibabacloud-go/darabonba-signature-util v0.0.7/go.mod h1:oUzCYV2fcCH797xKdL6BDH8ADIHlzrtKVjeRtunBNTQ= +github.com/alibabacloud-go/darabonba-string v1.0.2 h1:E714wms5ibdzCqGeYJ9JCFywE5nDyvIXIIQbZVFkkqo= +github.com/alibabacloud-go/darabonba-string v1.0.2/go.mod h1:93cTfV3vuPhhEwGGpKKqhVW4jLe7tDpo3LUM0i0g6mA= github.com/alibabacloud-go/debug v0.0.0-20190504072949-9472017b5c68/go.mod h1:6pb/Qy8c+lqua8cFpEy7g39NRRqOWc3rOwAy8m5Y2BY= github.com/alibabacloud-go/debug v1.0.0/go.mod h1:8gfgZCCAC3+SCzjWtY053FrOcd4/qlH6IHTI4QyICOc= github.com/alibabacloud-go/debug v1.0.1 h1:MsW9SmUtbb1Fnt3ieC6NNZi6aEwrXfDksD4QA6GSbPg= github.com/alibabacloud-go/debug v1.0.1/go.mod h1:8gfgZCCAC3+SCzjWtY053FrOcd4/qlH6IHTI4QyICOc= github.com/alibabacloud-go/dysmsapi-20170525/v3 v3.0.6 h1:UTl97mt2qfavxveqCkaVg4tKaZUPzA9RKbFIRaIdtdg= github.com/alibabacloud-go/dysmsapi-20170525/v3 v3.0.6/go.mod h1:UWpcGrWwTbES9QW7OQ7xDffukMJ/l7lzioixIz8+lgY= +github.com/alibabacloud-go/endpoint-util v1.1.0 h1:r/4D3VSw888XGaeNpP994zDUaxdgTSHBbVfZlzf6b5Q= github.com/alibabacloud-go/endpoint-util v1.1.0/go.mod h1:O5FuCALmCKs2Ff7JFJMudHs0I5EBgecXXxZRyswlEjE= -github.com/alibabacloud-go/endpoint-util v1.1.1 h1:ZkBv2/jnghxtU0p+upSU0GGzW1VL9GQdZO3mcSUTUy8= -github.com/alibabacloud-go/endpoint-util v1.1.1/go.mod h1:O5FuCALmCKs2Ff7JFJMudHs0I5EBgecXXxZRyswlEjE= github.com/alibabacloud-go/openapi-util v0.0.11/go.mod h1:sQuElr4ywwFRlCCberQwKRFhRzIyG4QTP/P4y1CJ6Ws= +github.com/alibabacloud-go/openapi-util v0.1.0 h1:0z75cIULkDrdEhkLWgi9tnLe+KhAFE/r5Pb3312/eAY= github.com/alibabacloud-go/openapi-util v0.1.0/go.mod h1:sQuElr4ywwFRlCCberQwKRFhRzIyG4QTP/P4y1CJ6Ws= -github.com/alibabacloud-go/openapi-util v0.1.1 h1:ujGErJjG8ncRW6XtBBMphzHTvCxn4DjrVw4m04HsS28= -github.com/alibabacloud-go/openapi-util v0.1.1/go.mod h1:/UehBSE2cf1gYT43GV4E+RxTdLRzURImCYY0aRmlXpw= github.com/alibabacloud-go/tea v1.1.0/go.mod h1:IkGyUSX4Ba1V+k4pCtJUc6jDpZLFph9QMy2VUPTwukg= github.com/alibabacloud-go/tea v1.1.7/go.mod h1:/tmnEaQMyb4Ky1/5D+SE1BAsa5zj/KeGOFfwYm3N/p4= github.com/alibabacloud-go/tea v1.1.8/go.mod h1:/tmnEaQMyb4Ky1/5D+SE1BAsa5zj/KeGOFfwYm3N/p4= +github.com/alibabacloud-go/tea v1.1.11/go.mod h1:/tmnEaQMyb4Ky1/5D+SE1BAsa5zj/KeGOFfwYm3N/p4= github.com/alibabacloud-go/tea v1.1.17/go.mod h1:nXxjm6CIFkBhwW4FQkNrolwbfon8Svy6cujmKFUq98A= github.com/alibabacloud-go/tea v1.1.19/go.mod h1:nXxjm6CIFkBhwW4FQkNrolwbfon8Svy6cujmKFUq98A= -github.com/alibabacloud-go/tea v1.2.1/go.mod h1:qbzof29bM/IFhLMtJPrgTGK3eauV5J2wSyEUo4OEmnA= -github.com/alibabacloud-go/tea v1.2.2 h1:aTsR6Rl3ANWPfqeQugPglfurloyBJY85eFy7Gc1+8oU= +github.com/alibabacloud-go/tea v1.1.20/go.mod h1:nXxjm6CIFkBhwW4FQkNrolwbfon8Svy6cujmKFUq98A= github.com/alibabacloud-go/tea v1.2.2/go.mod h1:CF3vOzEMAG+bR4WOql8gc2G9H3EkH3ZLAQdpmpXMgwk= +github.com/alibabacloud-go/tea v1.3.8/go.mod h1:A560v/JTQ1n5zklt2BEpurJzZTI8TUT+Psg2drWlxRg= +github.com/alibabacloud-go/tea v1.3.9 h1:bjgt1bvdY780vz/17iWNNtbXl4A77HWntWMeaUF3So0= +github.com/alibabacloud-go/tea v1.3.9/go.mod h1:A560v/JTQ1n5zklt2BEpurJzZTI8TUT+Psg2drWlxRg= +github.com/alibabacloud-go/tea-utils v1.3.1 h1:iWQeRzRheqCMuiF3+XkfybB3kTgUXkXX+JMrqfLeB2I= github.com/alibabacloud-go/tea-utils v1.3.1/go.mod h1:EI/o33aBfj3hETm4RLiAxF/ThQdSngxrpF8rKUDJjPE= github.com/alibabacloud-go/tea-utils/v2 v2.0.0/go.mod h1:U5MTY10WwlquGPS34DOeomUGBB0gXbLueiq5Trwu0C4= github.com/alibabacloud-go/tea-utils/v2 v2.0.3/go.mod h1:sj1PbjPodAVTqGTA3olprfeeqqmwD0A5OQz94o9EuXQ= -github.com/alibabacloud-go/tea-utils/v2 v2.0.6 h1:ZkmUlhlQbaDC+Eba/GARMPy6hKdCLiSke5RsN5LcyQ0= -github.com/alibabacloud-go/tea-utils/v2 v2.0.6/go.mod h1:qxn986l+q33J5VkialKMqT/TTs3E+U9MJpd001iWQ9I= +github.com/alibabacloud-go/tea-utils/v2 v2.0.5/go.mod h1:dL6vbUT35E4F4bFTHL845eUloqaerYBYPsdWR2/jhe4= +github.com/alibabacloud-go/tea-utils/v2 v2.0.7 h1:WDx5qW3Xa5ZgJ1c8NfqJkF6w+AU5wB8835UdhPr6Ax0= +github.com/alibabacloud-go/tea-utils/v2 v2.0.7/go.mod h1:qxn986l+q33J5VkialKMqT/TTs3E+U9MJpd001iWQ9I= github.com/alibabacloud-go/tea-xml v1.1.2/go.mod h1:Rq08vgCcCAjHyRi/M7xlHKUykZCEtyBy9+DPF6GgEu8= -github.com/alibabacloud-go/tea-xml v1.1.3 h1:7LYnm+JbOq2B+T/B0fHC4Ies4/FofC4zHzYtqw7dgt0= -github.com/alibabacloud-go/tea-xml v1.1.3/go.mod h1:Rq08vgCcCAjHyRi/M7xlHKUykZCEtyBy9+DPF6GgEu8= github.com/alicebob/gopher-json v0.0.0-20200520072559-a9ecdc9d1d3a h1:HbKu58rmZpUGpz5+4FfNmIU+FmZg2P3Xaj2v2bfNWmk= github.com/alicebob/gopher-json v0.0.0-20200520072559-a9ecdc9d1d3a/go.mod h1:SGnFV6hVsYE877CKEZ6tDNTjaSXYUk6QqoIK6PrAtcc= github.com/alicebob/miniredis/v2 v2.30.0 h1:uA3uhDbCxfO9+DI/DuGeAMr9qI+noVWwGPNTFuKID5M= @@ -57,23 +68,22 @@ github.com/aliyun/aliyun-oss-go-sdk v3.0.2+incompatible/go.mod h1:T/Aws4fEfogEE9 github.com/aliyun/credentials-go v1.1.2/go.mod h1:ozcZaMR5kLM7pwtCMEpVmQ242suV6qTJya2bDq4X1Tw= github.com/aliyun/credentials-go v1.3.1/go.mod h1:8jKYhQuDawt8x2+fusqa1Y6mPxemTsBEN04dgcAcYz0= github.com/aliyun/credentials-go v1.3.6/go.mod h1:1LxUuX7L5YrZUWzBrRyk0SwSdH4OmPrib8NVePL3fxM= -github.com/aliyun/credentials-go v1.3.9 h1:xz4W+ebo2xlq5LXshm4YLz7P7ZfmQaNYGTx+Lm0HbQ4= -github.com/aliyun/credentials-go v1.3.9/go.mod h1:Jm6d+xIgwJVLVWT561vy67ZRP4lPTQxMbEYRuT2Ti1U= +github.com/aliyun/credentials-go v1.4.5 h1:O76WYKgdy1oQYYiJkERjlA2dxGuvLRrzuO2ScrtGWSk= +github.com/aliyun/credentials-go v1.4.5/go.mod h1:Jm6d+xIgwJVLVWT561vy67ZRP4lPTQxMbEYRuT2Ti1U= github.com/apache/rocketmq-client-go/v2 v2.1.2 h1:yt73olKe5N6894Dbm+ojRf/JPiP0cxfDNNffKwhpJVg= github.com/apache/rocketmq-client-go/v2 v2.1.2/go.mod h1:6I6vgxHR3hzrvn+6n/4mrhS+UTulzK/X9LB2Vk1U5gE= github.com/bmatcuk/doublestar/v4 v4.6.1 h1:FH9SifrbvJhnlQpztAx++wlkk70QBf0iBWDwNy7PA4I= github.com/bmatcuk/doublestar/v4 v4.6.1/go.mod h1:xBQ8jztBU6kakFMg+8WGxn0c6z1fTSPVIjEY1Wr7jzc= +github.com/bradfitz/gomemcache v0.0.0-20220106215444-fb4bf637b56d h1:pVrfxiGfwelyab6n21ZBkbkmbevaf+WvMIiR7sr97hw= github.com/bradfitz/gomemcache v0.0.0-20220106215444-fb4bf637b56d/go.mod h1:H0wQNHz2YrLsuXOZozoeDmnHXkNCRmMW0gwFWDfEZDA= -github.com/bradfitz/gomemcache v0.0.0-20230905024940-24af94b03874 h1:N7oVaKyGp8bttX0bfZGmcGkjz7DLQXhAn3DNd3T0ous= -github.com/bradfitz/gomemcache v0.0.0-20230905024940-24af94b03874/go.mod h1:r5xuitiExdLAJ09PR7vBVENGvp4ZuTBeWTGtxuX3K+c= github.com/bsm/ginkgo/v2 v2.12.0 h1:Ny8MWAHyOepLGlLKYmXG4IEkioBysk6GpaRTLC8zwWs= github.com/bsm/ginkgo/v2 v2.12.0/go.mod h1:SwYbGRRDovPVboqFv0tPTcG1sN61LM1Z4ARdbAV9g4c= github.com/bsm/gomega v1.27.10 h1:yeMWxP2pV2fG3FgAODIY8EiRE3dy0aeFYt4l7wh6yKA= github.com/bsm/gomega v1.27.10/go.mod h1:JyEr/xRbxbtgWNi8tIEVPUYZ5Dzef52k01W3YH0H+O0= -github.com/casbin/casbin/v2 v2.99.0 h1:Y993vfRenh8Xtb4XVaK8KeYJTjD4Zn1XVewGszhzk1E= -github.com/casbin/casbin/v2 v2.99.0/go.mod h1:LO7YPez4dX3LgoTCqSQAleQDo0S0BeZBDxYnPUl95Ng= -github.com/casbin/govaluate v1.2.0 h1:wXCXFmqyY+1RwiKfYo3jMKyrtZmOL3kHwaqDyCPOYak= -github.com/casbin/govaluate v1.2.0/go.mod h1:G/UnbIjZk/0uMNaLwZZmFQrR72tYRZWQkO70si/iR7A= +github.com/casbin/casbin/v2 v2.108.0 h1:aMc3I81wfLpQe/uzMdElB1OBhEmPZoWMPb2nfEaKygY= +github.com/casbin/casbin/v2 v2.108.0/go.mod h1:Ee33aqGrmES+GNL17L0h9X28wXuo829wnNUnS0edAco= +github.com/casbin/govaluate v1.3.0 h1:VA0eSY0M2lA86dYd5kPPuNZMUD9QkWnOCnavGrw9myc= +github.com/casbin/govaluate v1.3.0/go.mod h1:G/UnbIjZk/0uMNaLwZZmFQrR72tYRZWQkO70si/iR7A= github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= github.com/cespare/xxhash/v2 v2.1.2/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= github.com/cespare/xxhash/v2 v2.3.0 h1:UL815xU9SqsFlibzuggzjXhog7bL6oX9BbNZnL2UFvs= @@ -95,7 +105,6 @@ github.com/dave/jennifer v1.6.1/go.mod h1:nXbxhEmQfOZhWml3D1cDK5M1FLnMSozpbFN/m3 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/dgrijalva/jwt-go v3.2.0+incompatible/go.mod h1:E3ru+11k8xSBh+hMPgOLZmtrrCbhqsmaPHjLKYnJCaQ= github.com/dgryski/go-rendezvous v0.0.0-20200823014737-9f7001d12a5f h1:lO4WD4F/rVNCu3HqELle0jiPLLBs70cWOduZpkS1E78= github.com/dgryski/go-rendezvous v0.0.0-20200823014737-9f7001d12a5f/go.mod h1:cuUVRXasLTGF7a8hSLbxyZXjz+1KgoB3wDUb6vlszIc= github.com/dustin/go-humanize v1.0.1 h1:GzkhY7T5VNhEkwH0PVJgjz+fX1rhBrR7pRT3mDkpeCY= @@ -116,32 +125,33 @@ github.com/fatih/color v1.18.0 h1:S8gINlzdQ840/4pfAwic/ZE0djQEH3wM94VfqLTZcOM= github.com/fatih/color v1.18.0/go.mod h1:4FelSpRwEGDpQ12mAdzqdOukCy4u8WUtOY6lkT/6HfU= github.com/fatih/structs v1.1.0 h1:Q7juDM0QtcnhCpeyLGQKyg4TOIghuNXrkL32pHAUMxo= github.com/fatih/structs v1.1.0/go.mod h1:9NiDSp5zOcgEDl+j00MP/WkGVPOlPRLejGD8Ga6PJ7M= -github.com/forgoer/openssl v1.6.0 h1:IueL+UfH0hKo99xFPojHLlO3QzRBQqFY+Cht0WwtOC0= -github.com/forgoer/openssl v1.6.0/go.mod h1:9DZ4yOsQmveP0aXC/BpQ++Y5TKaz5yR9+emcxmIZNZs= +github.com/forgoer/openssl v1.6.1 h1:pBfyCd0p5Htd0CzKhtZ5kPLzRk9XeMdRVnC27AIRKmM= +github.com/forgoer/openssl v1.6.1/go.mod h1:9DZ4yOsQmveP0aXC/BpQ++Y5TKaz5yR9+emcxmIZNZs= github.com/fortytw2/leaktest v1.3.0 h1:u8491cBMTQ8ft8aeV+adlcytMZylmA5nnwwkRZjI8vw= github.com/fortytw2/leaktest v1.3.0/go.mod h1:jDsjWgpAGjm2CA7WthBh/CdZYEPF31XHquHwclZch5g= -github.com/frankban/quicktest v1.14.6 h1:7Xjx+VpznH+oBnejlPUj8oUpdxnVs4f8XU8WnHkI4W8= -github.com/frankban/quicktest v1.14.6/go.mod h1:4ptaffx2x8+WTWXmUCuVU6aPUX1/Mz7zb5vbUoiM6w0= github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo= github.com/fsnotify/fsnotify v1.4.9/go.mod h1:znqG4EE+3YCdAaPaxE2ZRY/06pZUdp0tY4IgpuI1SZQ= -github.com/fsnotify/fsnotify v1.8.0 h1:dAwr6QBTBZIkG8roQaJjGof0pp0EeF+tNV7YBP3F/8M= -github.com/fsnotify/fsnotify v1.8.0/go.mod h1:8jBTzvmWwFyi3Pb8djgCCO5IBqzKJ/Jwo8TRcHyHii0= +github.com/fsnotify/fsnotify v1.7.0 h1:8JEhPFa5W2WU7YfeZzPNqzMP6Lwt7L2715Ggo0nosvA= +github.com/fsnotify/fsnotify v1.7.0/go.mod h1:40Bi/Hjc2AVfZrqy+aj+yEI+/bRxZnMJyTJwOpGvigM= +github.com/gammazero/toposort v0.1.1 h1:OivGxsWxF3U3+U80VoLJ+f50HcPU1MIqE1JlKzoJ2Eg= +github.com/gammazero/toposort v0.1.1/go.mod h1:H2cozTnNpMw0hg2VHAYsAxmkHXBYroNangj2NTBQDvw= 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-logr/logr v1.2.2/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= -github.com/go-logr/logr v1.4.2 h1:6pFjapn8bFcIbiKo3XT4j/BhANplGihG6tvd+8rYgrY= -github.com/go-logr/logr v1.4.2/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY= +github.com/go-logr/logr v1.4.3 h1:CjnDlHq8ikf6E492q6eKboGOC0T8CDaOvkHCIg8idEI= +github.com/go-logr/logr v1.4.3/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY= github.com/go-logr/stdr v1.2.2 h1:hSWxHoqTgW2S2qGc0LTAI563KZ5YKYRhT3MFKZMbjag= github.com/go-logr/stdr v1.2.2/go.mod h1:mMo/vtBO5dYbehREoey6XUKy/eSumjCCveDpRre4VKE= +github.com/go-ole/go-ole v1.2.6 h1:/Fpf6oFPoeFik9ty7siob0G6Ke8QvQEuVcuChpwXzpY= github.com/go-ole/go-ole v1.2.6/go.mod h1:pprOEPIfldk/42T2oK7lQ4v4JSDwmV0As9GaiUsvbm0= -github.com/go-ole/go-ole v1.3.0 h1:Dt6ye7+vXGIKZ7Xtk4s6/xVdGDQynvom7xCFEdWr6uE= -github.com/go-ole/go-ole v1.3.0/go.mod h1:5LS6F96DhAwUc7C+1HLexzMXY1xGRSryjyPPKW6zv78= github.com/go-pay/crypto v0.0.1 h1:B6InT8CLfSLc6nGRVx9VMJRBBazFMjr293+jl0lLXUY= github.com/go-pay/crypto v0.0.1/go.mod h1:41oEIvHMKbNcYlWUlRWtsnC6+ASgh7u29z0gJXe5bes= -github.com/go-pay/errgroup v0.0.2 h1:5mZMdm0TDClDm2S3G0/sm0f8AuQRtz0dOrTHDR9R8Cc= -github.com/go-pay/errgroup v0.0.2/go.mod h1:0+4b8mvFMS71MIzsaC+gVvB4x37I93lRb2dqrwuU8x8= -github.com/go-pay/gopay v1.5.104 h1:XMftoDnMf/2P3o11jYzqvAzAihum5fVPQVmQ6LgSeEY= -github.com/go-pay/gopay v1.5.104/go.mod h1:1Ywz2i8x96NrFa+F0TKDF7tQl7AZs4DxAc0kh069gJg= +github.com/go-pay/errgroup v0.0.3 h1:DB4s8e8oWYDyETKQ1y1riMJ7y29zE1uIsMCSjEOFSbU= +github.com/go-pay/errgroup v0.0.3/go.mod h1:0+4b8mvFMS71MIzsaC+gVvB4x37I93lRb2dqrwuU8x8= +github.com/go-pay/gopay v1.5.114 h1:jNYpcylr7WJev6i/MBeer0Z58E0x5NyqG4FfZrar3pQ= +github.com/go-pay/gopay v1.5.114/go.mod h1:p48xvWeepPolZuakAjCeucWynWwW7msoXsqahcoJpKE= +github.com/go-pay/smap v0.0.2 h1:kKflYor5T5FgZltPFBMTFfjJvqYMHr5VnIFSEyhVTcA= +github.com/go-pay/smap v0.0.2/go.mod h1:HW9oAo0okuyDYsbpbj5fJFxnNj/BZorRGFw26SxrNWw= github.com/go-pay/util v0.0.4 h1:TuwSU9o3Qd7m9v1PbzFuIA/8uO9FJnA6P7neG/NwPyk= github.com/go-pay/util v0.0.4/go.mod h1:Tsdhs8Ib9J9b4+NKNO1PHh5hWHhlg98PthsX0ckq6PM= github.com/go-pay/xlog v0.0.3 h1:avyMhCL/JgBHreoGx/am/kHxfs1udDOAeVqbmzP/Yes= @@ -153,17 +163,16 @@ github.com/go-playground/locales v0.13.0/go.mod h1:taPMhCMXrRLJO55olJkUXHZBHCxTM github.com/go-playground/locales v0.14.0/go.mod h1:sawfccIbzZTqEDETgFXqTho0QybSa7l++s0DH+LDiLs= github.com/go-playground/universal-translator v0.17.0/go.mod h1:UkSxE5sNxxRwHyU+Scu5vgOQjsIJAF8j9muTVoKLVtA= github.com/go-playground/universal-translator v0.18.0/go.mod h1:UvRDBj+xPUEGrFYl+lu/H90nyDXpg0fqeB/AQUGNTVA= -github.com/go-playground/validator/v10 v10.8.0/go.mod h1:9JhgTzTaE31GZDpH/HSvHiRJrJ3iKAgqqH0Bl/Ocjdk= +github.com/go-playground/validator/v10 v10.7.0/go.mod h1:xm76BBt941f7yWdGnI2DVPFFg1UK3YY04qifoXU3lOk= github.com/go-redis/redis/v8 v8.11.5 h1:AcZZR7igkdvfVmQTPnu9WE37LRrO/YrBH5zWyjDC0oI= github.com/go-redis/redis/v8 v8.11.5/go.mod h1:gREzHqY1hg6oD9ngVRbLStwAWKhA0FEgq8Jd4h5lpwo= -github.com/go-sql-driver/mysql v1.8.1 h1:LedoTUt/eveggdHS9qUFC1EFSa8bU2+1pZjSRpvNJ1Y= -github.com/go-sql-driver/mysql v1.8.1/go.mod h1:wEBSXgmK//2ZFJyE+qWnIsVGmvmEKlqwuVSjsCm7DZg= +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-task/slim-sprig v0.0.0-20210107165309-348f09dbbbc0/go.mod h1:fyg7847qk6SyHyPtNmDHnmrv/HOrqktSC+C9fM+CJOE= -github.com/goccy/go-json v0.10.3 h1:KZ5WoDbxAIgm2HNbYckL0se1fHD6rz5j4ywS6ebzDqA= -github.com/goccy/go-json v0.10.3/go.mod h1:oq7eo15ShAhp70Anwd5lgX2pLfOS3QCiwU/PULtXL6M= +github.com/goccy/go-json v0.10.5 h1:Fq85nIqj+gXn/S5ahsiTlK3TmC85qgirsdTP/+DeaC4= +github.com/goccy/go-json v0.10.5/go.mod h1:oq7eo15ShAhp70Anwd5lgX2pLfOS3QCiwU/PULtXL6M= +github.com/gofrs/flock v0.8.1 h1:+gYjHKf32LDeiEEFhQaotPbLuUXjY5ZqxKgXy7n59aw= github.com/gofrs/flock v0.8.1/go.mod h1:F1TvTiK9OcQqauNUHlbJvyl9Qa1QvF/gOUDKA14jxHU= -github.com/gofrs/flock v0.12.1 h1:MTLVXXHf8ekldpJk3AKicLij9MdwOWkZ+a/jHHZby9E= -github.com/gofrs/flock v0.12.1/go.mod h1:9zxTsyu5xtJ9DK+1tFZyibEV7y3uwDxPPfbxeeHCoD0= github.com/gogf/gf/contrib/drivers/mysql/v2 v2.9.0 h1:1f7EeD0lfPHoXfaJDSL7cxRcSRelbsAKgF3MGXY+Uyo= github.com/gogf/gf/contrib/drivers/mysql/v2 v2.9.0/go.mod h1:tToO1PjGkLIR+9DbJ0wrKicYma0H/EUHXOpwel6Dw+0= github.com/gogf/gf/contrib/nosql/redis/v2 v2.9.0 h1:EEZqu1PNRSmm+7Cqm9A/8+ObgfbMzhE1ps9Z3LD7HgM= @@ -172,18 +181,20 @@ github.com/gogf/gf/contrib/trace/jaeger/v2 v2.7.4 h1:JnUjXb7C9vmwcZFwXqnxi9H4/I0 github.com/gogf/gf/contrib/trace/jaeger/v2 v2.7.4/go.mod h1:A3NhV8u45twLq5VdqObhYNhT4szLFLCROw4LzHM+lYg= github.com/gogf/gf/v2 v2.9.0 h1:semN5Q5qGjDQEv4620VzxcJzJlSD07gmyJ9Sy9zfbHk= github.com/gogf/gf/v2 v2.9.0/go.mod h1:sWGQw+pLILtuHmbOxoe0D+0DdaXxbleT57axOLH2vKI= +github.com/gogf/gf/v2 v2.9.1-0.20250624075347-5fa656d1cc92 h1:ydiVI+0OGCH8eeuAq+P6XzyIX7CCbYose+AFvJdMD7k= +github.com/gogf/gf/v2 v2.9.1-0.20250624075347-5fa656d1cc92/go.mod h1:sWGQw+pLILtuHmbOxoe0D+0DdaXxbleT57axOLH2vKI= github.com/gogf/selfupdate v0.0.0-20231215043001-5c48c528462f h1:7xfXR/BhG3JDqO1s45n65Oyx9t4E/UqDOXep6jXdLCM= github.com/gogf/selfupdate v0.0.0-20231215043001-5c48c528462f/go.mod h1:HnYoio6S7VaFJdryKcD/r9HgX+4QzYfr00XiXUo/xz0= -github.com/golang-jwt/jwt/v5 v5.2.1 h1:OuVbFODueb089Lh128TAcimifWaLhJwVflnrgM17wHk= github.com/golang-jwt/jwt/v5 v5.2.1/go.mod h1:pqrtFR0X4osieyHYxtmOUWsAWrfe1Q5UVIyoH402zdk= +github.com/golang-jwt/jwt/v5 v5.2.2 h1:Rl4B7itRWVtYIHFrSNd7vhTiz9UpLdi6gZhZ3wEeDy8= +github.com/golang-jwt/jwt/v5 v5.2.2/go.mod h1:pqrtFR0X4osieyHYxtmOUWsAWrfe1Q5UVIyoH402zdk= github.com/golang/freetype v0.0.0-20170609003504-e2365dfdc4a0 h1:DACJavvAHhabrF08vX0COfcOBJRhZ8lUbR+ZWIs0Y5g= github.com/golang/freetype v0.0.0-20170609003504-e2365dfdc4a0/go.mod h1:E/TSTwGwJL78qG/PmXZO1EjYhfJinVAhrmmHX6Z8B9k= 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.3.1/go.mod h1:sBzyDLLjw3U8JLTeZvSv8jJB+tU5PVekmnlKIyFUx0Y= +github.com/golang/mock v1.4.4 h1:l75CXGRSwbaYNpl/Z2X1XIIAMSCquvXgpVZDhwEIJsc= github.com/golang/mock v1.4.4/go.mod h1:l3mdAwkq5BuhzHwde/uurv3sEJeZMXNpwsxVWU71h+4= -github.com/golang/mock v1.6.0 h1:ErTB+efbowRARo13NNdxyJji2egdxLGQhRaY+DUumQc= -github.com/golang/mock v1.6.0/go.mod h1:p6yTPP+5HYm5mzsMV8JkE6ZKdX+/wYM6Hr+LicevLPs= github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/protobuf v1.3.2/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/protobuf v1.3.3/go.mod h1:vzj43D7+SQXF/4pzW/hwtAqwc6iTitCiVSaWz5lYuqw= @@ -203,13 +214,13 @@ github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5a 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.2/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI= +github.com/google/go-cmp v0.5.6/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= +github.com/google/go-cmp v0.7.0 h1:wk8382ETsv4JYUZwIsn6YpYiWiBsYLSJiTsyBybVuN8= +github.com/google/go-cmp v0.7.0/go.mod h1:pXiqmnSA92OHEEa9HXL2W4E7lf9JzCmGVUdgjX3N/iU= +github.com/google/go-querystring v1.0.0 h1:Xkwi/a1rcvNg1PPYe5vI8GbeBY/jrVuDX5ASuANWTrk= github.com/google/go-querystring v1.0.0/go.mod h1:odCYkC5MyYFN7vkCjXpyrEuKhc/BUO6wN/zVPAxq5ck= -github.com/google/go-querystring v1.1.0 h1:AnCroh3fv4ZBgVIf1Iwtovgjaw/GiKJo8M8yD/fhyJ8= -github.com/google/go-querystring v1.1.0/go.mod h1:Kcdr2DB4koayq7X8pmAG4sNG59So17icRSOU623lUBU= github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= github.com/google/pprof v0.0.0-20210407192527-94a9f03dee38/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= github.com/google/uuid v1.1.1/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= @@ -219,18 +230,18 @@ github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+ github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY= github.com/gopherjs/gopherjs v0.0.0-20200217142428-fce0ec30dd00 h1:l5lAOZEym3oK3SQ2HBHWsJUfbNBiTXJDeW2QDxw9AQ0= github.com/gopherjs/gopherjs v0.0.0-20200217142428-fce0ec30dd00/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY= +github.com/gorilla/mux v1.8.1 h1:TuBL49tXwgrFYWhqrNgrUNEY92u81SPhu7sTdzQEiWY= +github.com/gorilla/mux v1.8.1/go.mod h1:AKf9I4AEqPTmMytcMc0KkNouC66V3BtZ4qD5fmWSiMQ= github.com/gorilla/securecookie v1.1.1/go.mod h1:ra0sb63/xPlUeL+yeDciTfxMRAA+MP+HVt/4epWDjd4= github.com/gorilla/sessions v1.2.1/go.mod h1:dk2InVEVJ0sfLlnXv9EAgkf6ecYs/i80K/zI+bUmuGM= github.com/gorilla/websocket v1.5.3 h1:saDtZ6Pbx/0u+bgYQ3q96pZgCzfhKXGPqt7kZ72aNNg= github.com/gorilla/websocket v1.5.3/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= -github.com/grafov/m3u8 v0.12.0/go.mod h1:nqzOkfBiZJENr52zTVd/Dcl03yzphIMbJqkXGu+u080= github.com/grokify/html-strip-tags-go v0.1.0 h1:03UrQLjAny8xci+R+qjCce/MYnpNXCtgzltlQbOBae4= github.com/grokify/html-strip-tags-go v0.1.0/go.mod h1:ZdzgfHEzAfz9X6Xe5eBLVblWIxXfYSQ40S/VKrAOGpc= github.com/h2non/parth v0.0.0-20190131123155-b4df798d6542 h1:2VTzZjLZBgl62/EtslCrtky5vbi9dd7HrQPQIx6wqiw= github.com/h2non/parth v0.0.0-20190131123155-b4df798d6542/go.mod h1:Ow0tF8D4Kplbc8s8sSb3V2oUCygFHVp8gC3Dn6U4MNI= +github.com/hashicorp/errwrap v1.0.0 h1:hLrqtEDnRye3+sgx6z4qVLNuviH3MR5aQ0ykNJa/UYA= github.com/hashicorp/errwrap v1.0.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4= -github.com/hashicorp/errwrap v1.1.0 h1:OxrOeh75EUXMY8TBjag2fzXGZ40LB6IKw45YeGUDY2I= -github.com/hashicorp/errwrap v1.1.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4= github.com/hashicorp/go-multierror v1.1.1 h1:H5DkEtf6CXdFp0N0Em5UCwQpXMWke8IA0+lD48awMYo= github.com/hashicorp/go-multierror v1.1.1/go.mod h1:iw975J/qwKPdAO1clOe2L8331t/9/fmwbPZ6JB6eMoM= github.com/hashicorp/go-uuid v1.0.2/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro= @@ -251,6 +262,7 @@ github.com/jcmturner/gokrb5/v8 v8.4.4 h1:x1Sv4HaTpepFkXbt2IkL29DXRf8sOfZXo8eRKh6 github.com/jcmturner/gokrb5/v8 v8.4.4/go.mod h1:1btQEpgT6k+unzCwX1KdWMEwPPkkgBtP+F6aCACiMrs= github.com/jcmturner/rpc/v2 v2.0.3 h1:7FXXj8Ti1IaVFpSAziCZWNzbNuZmnvw/i6CqLNdWfZY= github.com/jcmturner/rpc/v2 v2.0.3/go.mod h1:VUJYCIDm3PVOEHw8sgt091/20OJjskO/YJki3ELg/Hc= +github.com/jessevdk/go-flags v1.4.0/go.mod h1:4FA24M0QyGHXBuZZK/XkWh8h0e1EYbRYJSGM75WSRxI= 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= @@ -258,11 +270,11 @@ github.com/jtolds/gls v4.20.0+incompatible h1:xdiiI2gbIgH/gLH7ADydsJ1uDOEzR8yvV7 github.com/jtolds/gls v4.20.0+incompatible/go.mod h1:QJZ7F/aHp+rZTRtaJ1ow/lLfFfVYBRgL+9YlvaHOwJU= github.com/kayon/iploc v0.0.0-20200312105652-bda3e968a794 h1:dWJxw+KQOMeVcoyxqG9I5fppPld1hh1FG8ngv0fKNsQ= github.com/kayon/iploc v0.0.0-20200312105652-bda3e968a794/go.mod h1:IwrOeG3O3K9vVXmcVvc9T0XLabw67QePi5pKQt5U+Kw= -github.com/klauspost/compress v1.17.9 h1:6KIumPrER1LHsvBVuDa0r5xaG0Es51mhhB9BQB2qeMA= -github.com/klauspost/compress v1.17.9/go.mod h1:Di0epgTjJY877eYKx5yC51cX2A2Vl2ibi7bDH9ttBbw= +github.com/klauspost/compress v1.18.0 h1:c/Cqfb0r+Yi+JtIEq73FWXVkRonBlf0CRNYc8Zttxdo= +github.com/klauspost/compress v1.18.0/go.mod h1:2Pp+KzxcywXVXMr50+X0Q/Lsb43OQHYWRCY2AiWywWQ= github.com/klauspost/cpuid/v2 v2.0.1/go.mod h1:FInQzS24/EEf25PyTYn52gqo7WaD8xa0213Md/qVLRg= -github.com/klauspost/cpuid/v2 v2.2.8 h1:+StwCXwm9PdpiEkPyzBXIy+M9KUb4ODm0Zarf1kS5BM= -github.com/klauspost/cpuid/v2 v2.2.8/go.mod h1:Lcz8mBdAVJIBVzewtcLocK12l3Y+JytZYpaMropDUws= +github.com/klauspost/cpuid/v2 v2.2.10 h1:tBs3QSyvjDyFTq3uoc/9xFpCuOsJQFNPiAhYdw2skhE= +github.com/klauspost/cpuid/v2 v2.2.10/go.mod h1:hqwkgyIinND0mEev00jJYCxPNVRVXFQeu1XKlok6oO0= github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= github.com/kr/pretty v0.2.1/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= @@ -273,13 +285,12 @@ 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/leodido/go-urn v1.2.0/go.mod h1:+8+nEpDfqqsY+g338gtMEUOtuK+4dEMhiQEgxpxOKII= github.com/leodido/go-urn v1.2.1/go.mod h1:zt4jvISO2HfUBqxjfIshjdMTYS56ZS/qv49ictyFfxY= -github.com/lufia/plan9stats v0.0.0-20240819163618-b1d8f4d146e7 h1:5RK988zAqB3/AN3opGfRpoQgAVqr6/A5+qRTi67VUZY= -github.com/lufia/plan9stats v0.0.0-20240819163618-b1d8f4d146e7/go.mod h1:ilwx/Dta8jXAgpFYFvSWEMwxmbWXyiUHkd5FwyKhb5k= +github.com/lufia/plan9stats v0.0.0-20211012122336-39d0f177ccd0 h1:6E+4a0GO5zZEnZ81pIr0yLvtUWk2if982qA3F3QD6H4= +github.com/lufia/plan9stats v0.0.0-20211012122336-39d0f177ccd0/go.mod h1:zJYVVT2jmtg6P3p1VtQj7WsuWi/y4VnjVBn7F8KPB3I= github.com/magiconair/properties v1.8.9 h1:nWcCbLq1N2v/cpNsy5WvQ37Fb+YElfq20WJ/a8RkpQM= github.com/magiconair/properties v1.8.9/go.mod h1:Dhd985XPs7jluiymwWYZ0G4Z61jb3vdS329zhj2hYo0= -github.com/matishsiao/goInfo v0.0.0-20210923090445-da2e3fa8d45f h1:B0OD7nYl2FPQEVrw8g2uyc1lGEzNbvrKh7fspGZcbvY= -github.com/matishsiao/goInfo v0.0.0-20210923090445-da2e3fa8d45f/go.mod h1:aEt7p9Rvh67BYApmZwNDPpgircTO2kgdmDUoF/1QmwA= github.com/mattn/go-colorable v0.1.13 h1:fFA4WZxdEF4tXPZVKMLwD8oUnCTTo08duU7wxecdEvA= github.com/mattn/go-colorable v0.1.13/go.mod h1:7S9/ev0klgBDR4GtXTXX8a3vIGJpMovkB8vQcUbaXHg= github.com/mattn/go-isatty v0.0.16/go.mod h1:kYGgaQfpe5nmfYZH+SKPsOc2e4SrIfOl2e/yFXSvRLM= @@ -288,15 +299,16 @@ github.com/mattn/go-isatty v0.0.20/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D github.com/mattn/go-runewidth v0.0.9/go.mod h1:H031xJmbD/WCDINGzjvQ9THkh0rPKHF+m2gUSrubnMI= github.com/mattn/go-runewidth v0.0.16 h1:E5ScNMtiwvlvB5paMFdw9p4kSQzbXFikJ5SQO6TULQc= github.com/mattn/go-runewidth v0.0.16/go.mod h1:Jdepj2loyihRzMpdS35Xk/zdY8IAYHsh153qUoGf23w= +github.com/minio/crc64nvme v1.0.1 h1:DHQPrYPdqK7jQG/Ls5CTBZWeex/2FMS3G5XGkycuFrY= +github.com/minio/crc64nvme v1.0.1/go.mod h1:eVfm2fAzLlxMdUGc0EEBGSMmPwmXD5XiNRpnu9J3bvg= github.com/minio/md5-simd v1.1.2 h1:Gdi1DZK69+ZVMoNHRXJyNcxrMA4dSxoYHZSQbirFg34= github.com/minio/md5-simd v1.1.2/go.mod h1:MzdKDxYpY2BT9XQFocsiZf/NKVtR7nkE4RoEpN+20RM= -github.com/minio/minio-go/v7 v7.0.76 h1:9nxHH2XDai61cT/EFhyIw/wW4vJfpPNvl7lSFpRt+Ng= -github.com/minio/minio-go/v7 v7.0.76/go.mod h1:AVM3IUN6WwKzmwBxVdjzhH8xq+f57JSbbvzqvUzR6eg= +github.com/minio/minio-go/v7 v7.0.94 h1:1ZoksIKPyaSt64AVOyaQvhDOgVC3MfZsWM6mZXRUGtM= +github.com/minio/minio-go/v7 v7.0.94/go.mod h1:71t2CqDt3ThzESgZUlU1rBN54mksGGlkLcFgguDnnAc= github.com/mitchellh/colorstring v0.0.0-20190213212951-d06e56a500db h1:62I3jR2EmQ4l5rM/4FEfDWcRD+abF5XlKShorW5LRoQ= github.com/mitchellh/colorstring v0.0.0-20190213212951-d06e56a500db/go.mod h1:l0dey0ia/Uv7NcFFVbCLtqEBQbrT4OCwCSKTEv6enCw= +github.com/mitchellh/mapstructure v1.4.3 h1:OVowDSCllw/YjdLkam3/sm7wEtOy59d8ndGgCcyj8cs= github.com/mitchellh/mapstructure v1.4.3/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= -github.com/mitchellh/mapstructure v1.5.0 h1:jeMsZIYE/09sWLaz43PL7Gy6RuMjD2eJVyuac5Z2hdY= -github.com/mitchellh/mapstructure v1.5.0/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= 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= @@ -304,20 +316,23 @@ github.com/modern-go/reflect2 v0.0.0-20180701023420-4b7aa43c6742/go.mod h1:bx2lN 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/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/mojocn/base64Captcha v1.3.6 h1:gZEKu1nsKpttuIAQgWHO+4Mhhls8cAKyiV2Ew03H+Tw= -github.com/mojocn/base64Captcha v1.3.6/go.mod h1:i5CtHvm+oMbj1UzEPXaA8IH/xHFZ3DGY3Wh3dBpZ28E= +github.com/mojocn/base64Captcha v1.3.8 h1:rrN9BhCwXKS8ht1e21kvR3iTaMgf4qPC9sRoV52bqEg= +github.com/mojocn/base64Captcha v1.3.8/go.mod h1:QFZy927L8HVP3+VV5z2b1EAEiv1KxVJKZbAucVgLUy4= +github.com/mozillazg/go-httpheader v0.2.1 h1:geV7TrjbL8KXSyvghnFm+NyTux/hxwueTSrwhe88TQQ= github.com/mozillazg/go-httpheader v0.2.1/go.mod h1:jJ8xECTlalr6ValeXYdOF8fFUISeBAdw6E61aqQma60= -github.com/mozillazg/go-httpheader v0.4.0 h1:aBn6aRXtFzyDLZ4VIRLsZbbJloagQfMnCiYgOq6hK4w= -github.com/mozillazg/go-httpheader v0.4.0/go.mod h1:PuT8h0pw6efvp8ZeUec1Rs7dwjK08bt6gKSReGMqtdA= github.com/nbio/st v0.0.0-20140626010706-e9e8d9816f32/go.mod h1:9wM+0iRr9ahx58uYLpLIr5fm8diHn0JbqRycJi6w0Ms= github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e/go.mod h1:zD1mROLANZcx1PVRCS0qkT7pwLkGfwJo4zjcN/Tysno= github.com/nxadm/tail v1.4.4/go.mod h1:kenIhsEOeOJmVchQTgglprH7qJGnHDVpk1VPCcaMI8A= github.com/nxadm/tail v1.4.8 h1:nPr65rt6Y5JFSKQO7qToXr7pePgD6Gwiw05lkbyAQTE= github.com/nxadm/tail v1.4.8/go.mod h1:+ncqLTQzXmGhMZNUePPaPqPvBxHAIsmXswZKocGu+AU= +github.com/olekukonko/errors v0.0.0-20250405072817-4e6d85265da6 h1:r3FaAI0NZK3hSmtTDrBVREhKULp8oUeqLT5Eyl2mSPo= +github.com/olekukonko/errors v0.0.0-20250405072817-4e6d85265da6/go.mod h1:ppzxA5jBKcO1vIpCXQ9ZqgDh8iwODz6OXIGKU8r5m4Y= +github.com/olekukonko/ll v0.0.8 h1:sbGZ1Fx4QxJXEqL/6IG8GEFnYojUSQ45dJVwN2FH2fc= +github.com/olekukonko/ll v0.0.8/go.mod h1:En+sEW0JNETl26+K8eZ6/W4UQ7CYSrrgg/EdIYT2H8g= github.com/olekukonko/tablewriter v0.0.5 h1:P2Ga83D34wi1o9J6Wh1mRuqd4mF/x/lgBS7N7AbDhec= github.com/olekukonko/tablewriter v0.0.5/go.mod h1:hPp6KlRPjbx+hW8ykQs1w3UBbZlj6HuIJcUGPhkA7kY= +github.com/olekukonko/tablewriter v1.0.8 h1:f6wJzHg4QUtJdvrVPKco4QTrAylgaU0+b9br/lJxEiQ= +github.com/olekukonko/tablewriter v1.0.8/go.mod h1:H428M+HzoUXC6JU2Abj9IT9ooRmdq9CxuDmKMtrOCMs= github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= github.com/onsi/ginkgo v1.12.1/go.mod h1:zj2OWP4+oCPe1qIXoGWkgMRwljMUYCdkwsT2108oapk= github.com/onsi/ginkgo v1.16.4/go.mod h1:dX+/inL/fNMqNlz0e9LfyB9TswhZpCVdJM/Z6Vvnwo0= @@ -331,20 +346,21 @@ github.com/onsi/gomega v1.18.1 h1:M1GfJqGRrBrrGGsbxzV5dqM2U2ApXefZCQpkukxYRLE= github.com/onsi/gomega v1.18.1/go.mod h1:0q+aL8jAiMXy9hbwj2mr5GziHiwhAIQpFmmtT5hitRs= 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/pierrec/lz4/v4 v4.1.21 h1:yOVMLb6qSIDP67pl/5F7RepeKYu/VmTyEXvuMI5d9mQ= -github.com/pierrec/lz4/v4 v4.1.21/go.mod h1:gZWDp/Ze/IJXGXf23ltt2EXimqmTUXEy0GFuRQyBid4= +github.com/philhofer/fwd v1.1.3-0.20240916144458-20a13a1f6b7c h1:dAMKvw0MlJT1GshSTtih8C2gDs04w8dReiOGXrGLNoY= +github.com/philhofer/fwd v1.1.3-0.20240916144458-20a13a1f6b7c/go.mod h1:RqIHx9QI14HlwKwm98g9Re5prTQ6LdeRQn+gXJFxsJM= +github.com/pierrec/lz4/v4 v4.1.22 h1:cKFw6uJDK+/gfw5BcDL0JL5aBsAFdsIT18eRtLj7VIU= +github.com/pierrec/lz4/v4 v4.1.22/go.mod h1:gZWDp/Ze/IJXGXf23ltt2EXimqmTUXEy0GFuRQyBid4= github.com/pkg/diff v0.0.0-20210226163009-20ebb0f2a09e/go.mod h1:pJLUxLENpZxwdsKMEsNbx1VGcRFpLqf3715MtcvvzbA= +github.com/pkg/errors v0.8.1 h1:iURUrRGxPUNPdy5/HRSm+Yj6okJ6UtLINN0Q9M4+h3I= 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/power-devops/perfstat v0.0.0-20240221224432-82ca36839d55 h1:o4JXh1EVt9k/+g42oCprj/FisM4qX9L3sZB3upGN2ZU= -github.com/power-devops/perfstat v0.0.0-20240221224432-82ca36839d55/go.mod h1:OmDBASR4679mdNQnz2pUhc2G8CO2JrUAVFDRBDP/hJE= +github.com/power-devops/perfstat v0.0.0-20210106213030-5aafc221ea8c h1:ncq/mPwQF4JjgDlrVEn3C11VoGHZN7m8qihwgMEtzYw= +github.com/power-devops/perfstat v0.0.0-20210106213030-5aafc221ea8c/go.mod h1:OmDBASR4679mdNQnz2pUhc2G8CO2JrUAVFDRBDP/hJE= github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= github.com/qiniu/dyn v1.3.0/go.mod h1:E8oERcm8TtwJiZvkQPbcAh0RL8jO1G0VXJMW3FAWdkk= -github.com/qiniu/go-sdk/v7 v7.21.1 h1:D/IjVOlg5pTw0jeDjqTo6H5QM73Obb1AYfPOHmIFN+Q= -github.com/qiniu/go-sdk/v7 v7.21.1/go.mod h1:8EM2awITynlem2VML2dXGHkMYP2UyECsGLOdp6yMpco= +github.com/qiniu/go-sdk/v7 v7.25.4 h1:ulCKlTEyrZzmNytXweOrnva49+Q4+ASjYBCSXhkRWTo= +github.com/qiniu/go-sdk/v7 v7.25.4/go.mod h1:dmKtJ2ahhPWFVi9o1D5GemmWoh/ctuB9peqTowyTO8o= github.com/qiniu/x v1.10.5/go.mod h1:03Ni9tj+N2h2aKnAz+6N0Xfl8FwMEDRC2PAlxekASDs= github.com/rcrowley/go-metrics v0.0.0-20201227073835-cf1acfcdf475 h1:N/ElC8H3+5XpJzTSTfLsJV/mx9Q9g7kxmchpfZyxgzM= github.com/rcrowley/go-metrics v0.0.0-20201227073835-cf1acfcdf475/go.mod h1:bCqnVzQkZxMG4s8nGwiZ5l3QUCyqpo9Y+/ZMZ9VjZe4= @@ -353,8 +369,8 @@ github.com/redis/go-redis/v9 v9.7.0/go.mod h1:f6zhXITC7JUJIlPEiBOTXxJgPLdZcA93Ge github.com/richardlehane/mscfb v1.0.4 h1:WULscsljNPConisD5hR0+OyZjwK46Pfyr6mPu5ZawpM= github.com/richardlehane/mscfb v1.0.4/go.mod h1:YzVpcZg9czvAuhk9T+a3avCpcFPMUWm7gK3DypaEsUk= github.com/richardlehane/msoleps v1.0.1/go.mod h1:BWev5JBpU9Ko2WAgmZEuiz4/u3ZYTKbjLycmwiWUfWg= -github.com/richardlehane/msoleps v1.0.3 h1:aznSZzrwYRl3rLKRT3gUk9am7T/mLNSnJINvN0AQoVM= -github.com/richardlehane/msoleps v1.0.3/go.mod h1:BWev5JBpU9Ko2WAgmZEuiz4/u3ZYTKbjLycmwiWUfWg= +github.com/richardlehane/msoleps v1.0.4 h1:WuESlvhX3gH2IHcd8UqyCuFY5yiq/GR/yqaSM/9/g00= +github.com/richardlehane/msoleps v1.0.4/go.mod h1:BWev5JBpU9Ko2WAgmZEuiz4/u3ZYTKbjLycmwiWUfWg= github.com/rivo/uniseg v0.2.0/go.mod h1:J6wj4VEh+S6ZtnVlnTBMWIodfgj8LQOQFoIToxlJtxc= github.com/rivo/uniseg v0.4.7 h1:WUdvkW8uEhrYfLC4ZzdpI2ztxP1I582+49Oc5Mq64VQ= github.com/rivo/uniseg v0.4.7/go.mod h1:FN3SvrM+Zdj16jyLfmOkMNblXMcoc8DfTHruCPUcx88= @@ -372,20 +388,18 @@ github.com/shoenig/go-m1cpu v0.1.6 h1:nxdKQNcEB6vzgA2E2bvzKIYRuNj7XNJ4S/aRSwKzFt github.com/shoenig/go-m1cpu v0.1.6/go.mod h1:1JJMcUBvfNwpq05QDQVAnx3gUHr9IYF7GNg9SUEw2VQ= github.com/shoenig/test v0.6.4 h1:kVTaSd7WLz5WZ2IaoM0RSzRsUD+m8wRR+5qvntpn4LU= github.com/shoenig/test v0.6.4/go.mod h1:byHiCGXqrVaflBLAMq/srcZIHynQPQgeyvkvXnjqq0k= -github.com/silenceper/wechat/v2 v2.1.6 h1:2br2DxNzhksmvIBJ+PfMqjqsvoZmd/5BnMIfjKYUBgc= -github.com/silenceper/wechat/v2 v2.1.6/go.mod h1:7Iu3EhQYVtDUJAj+ZVRy8yom75ga7aDWv8RurLkVm0s= +github.com/silenceper/wechat/v2 v2.1.9 h1:wc092gUkGbbBRTdzPxROhQhOH5iE98stnfzKA73mnTo= +github.com/silenceper/wechat/v2 v2.1.9/go.mod h1:7Iu3EhQYVtDUJAj+ZVRy8yom75ga7aDWv8RurLkVm0s= github.com/sirupsen/logrus v1.4.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo= +github.com/sirupsen/logrus v1.9.0 h1:trlNQbNUG3OdDrDil03MCb1H2o9nJ1x4/5LYw7byDE0= github.com/sirupsen/logrus v1.9.0/go.mod h1:naHLuLoDiP4jHNo9R0sCBMtWGeIprob74mVsIT4qYEQ= -github.com/sirupsen/logrus v1.9.3 h1:dueUQJ1C2q9oE3F7wvmSGAaVtTmUizReu6fjN8uqzbQ= -github.com/sirupsen/logrus v1.9.3/go.mod h1:naHLuLoDiP4jHNo9R0sCBMtWGeIprob74mVsIT4qYEQ= github.com/smartystreets/assertions v0.0.0-20180927180507-b2de0cb4f26d/go.mod h1:OnSkiWE9lh6wB0YB77sQom3nweQdgAjqCqsofrRNTgc= github.com/smartystreets/assertions v1.1.0 h1:MkTeG1DMwsrdH7QtLXy5W+fUxWq+vmb6cLmyJ7aRtF0= github.com/smartystreets/assertions v1.1.0/go.mod h1:tcbTF8ujkAEcZ8TElKY+i30BzYlVhC/LOxJk7iOWnoo= github.com/smartystreets/goconvey v1.6.4 h1:fv0U8FUIMPNf1L9lnHLvLhgicrIVChEkdzIKYqbNC9s= github.com/smartystreets/goconvey v1.6.4/go.mod h1:syvi0/a8iFYH4r/RixwvyeAJjdLS9QV7WQ/tjFTllLA= +github.com/spf13/cast v1.4.1 h1:s0hze+J0196ZfEMTs80N7UlFt0BDuQ7Q+JDnHiMWKdA= github.com/spf13/cast v1.4.1/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE= -github.com/spf13/cast v1.7.0 h1:ntdiHjuueXFgm5nzDRdOS4yfT43P5Fnud6DH50rz/7w= -github.com/spf13/cast v1.7.0/go.mod h1:ancEpBxwJDODSW/UG4rDrAqiKolqNNh2DX3mk86cAdo= 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.2.0/go.mod h1:qt09Ya8vawLte6SNmTgCsAVtYtaKzEcn8ATUoHMkEqE= @@ -404,61 +418,62 @@ github.com/stretchr/testify v1.8.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o github.com/stretchr/testify v1.10.0 h1:Xv5erBjTwe/5IxqUQTdXv5kgmIvbHo3QQyRwhJsOfJA= github.com/stretchr/testify v1.10.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common v1.0.563/go.mod h1:7sCQWVkxcsR38nffDW057DRGk8mUjK1Ing/EFOK8s8Y= -github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common v1.0.993 h1:+iJMmF0q1MPyhLs0+J7CcJ47w/vq6ICsCxnV4gc0dKw= -github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common v1.0.993/go.mod h1:r5r4xbfxSaeR04b166HGsBa/R4U3SueirEUpXGuw+Q0= +github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common v1.0.1200/go.mod h1:r5r4xbfxSaeR04b166HGsBa/R4U3SueirEUpXGuw+Q0= +github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common v1.0.1202 h1:3QTQZXLLGLALyHNHs6WAsFCWvElMEXfOdaFM01/3Zjo= +github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common v1.0.1202/go.mod h1:r5r4xbfxSaeR04b166HGsBa/R4U3SueirEUpXGuw+Q0= github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/kms v1.0.563/go.mod h1:uom4Nvi9W+Qkom0exYiJ9VWJjXwyxtPYTkKkaLMlfE0= -github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/sms v1.0.993 h1:3zYeUpzNdskHZUr+NEBghvX3mPU5fNclBEhAvWG1eUU= -github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/sms v1.0.993/go.mod h1:dVBlwaxkRoDVWQbx+ocWn3FZh1OzP3trPvgn5o8zUlE= -github.com/tencentyun/cos-go-sdk-v5 v0.7.54 h1:FRamEhNBbSeggyYfWfzFejTLftgbICocSYFk4PKTSV4= -github.com/tencentyun/cos-go-sdk-v5 v0.7.54/go.mod h1:UN+VdbCl1hg+kKi5RXqZgaP+Boqfmk+D04GRc4XFk70= +github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/sms v1.0.1200 h1:bu2Jqn/rc5CQslIgTCyG4CTqMpkz2luIOq7dzuLp4G8= +github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/sms v1.0.1200/go.mod h1:JzzUsHoueCXnMEYcgorKxyfR0OZAI416XKgHEpgyO7o= +github.com/tencentyun/cos-go-sdk-v5 v0.7.66 h1:O4O6EsozBoDjxWbltr3iULgkI7WPj/BFNlYTXDuE64E= +github.com/tencentyun/cos-go-sdk-v5 v0.7.66/go.mod h1:8+hG+mQMuRP/OIS9d83syAvXvrMj9HhkND6Q1fLghw0= github.com/tidwall/gjson v1.13.0/go.mod h1:/wbyibRr2FHMks5tjHJ5F8dMZh3AcwJEMf5vlfC0lxk= +github.com/tidwall/gjson v1.14.1 h1:iymTbGkQBhveq21bEvAQ81I0LEBork8BFe1CUZXdyuo= github.com/tidwall/gjson v1.14.1/go.mod h1:/wbyibRr2FHMks5tjHJ5F8dMZh3AcwJEMf5vlfC0lxk= -github.com/tidwall/gjson v1.17.3 h1:bwWLZU7icoKRG+C+0PNwIKC6FCJO/Q3p2pZvuP0jN94= -github.com/tidwall/gjson v1.17.3/go.mod h1:/wbyibRr2FHMks5tjHJ5F8dMZh3AcwJEMf5vlfC0lxk= github.com/tidwall/match v1.1.1 h1:+Ho715JplO36QYgwN9PGYNhgZvoUSc9X2c80KVTi+GA= github.com/tidwall/match v1.1.1/go.mod h1:eRSPERbgtNPcGhD8UCthc6PmLEQXEWd3PRB5JTxsfmM= +github.com/tidwall/pretty v1.2.0 h1:RWIZEg2iJ8/g6fDDYzMpobmaoGh5OLl4AXtGUGPcqCs= github.com/tidwall/pretty v1.2.0/go.mod h1:ITEVvHYasfjBbM0u2Pg8T2nJnzm8xPwvNhhsoaGGjNU= -github.com/tidwall/pretty v1.2.1 h1:qjsOFOWWQl+N3RsoF5/ssm1pHmJJwhjlSbZ51I6wMl4= -github.com/tidwall/pretty v1.2.1/go.mod h1:ITEVvHYasfjBbM0u2Pg8T2nJnzm8xPwvNhhsoaGGjNU= +github.com/tiendc/go-deepcopy v1.6.0 h1:0UtfV/imoCwlLxVsyfUd4hNHnB3drXsfle+wzSCA5Wo= +github.com/tiendc/go-deepcopy v1.6.0/go.mod h1:toXoeQoUqXOOS/X4sKuiAoSk6elIdqc0pN7MTgOOo2I= +github.com/tinylib/msgp v1.3.0 h1:ULuf7GPooDaIlbyvgAxBV/FI7ynli6LZ1/nVUNu+0ww= +github.com/tinylib/msgp v1.3.0/go.mod h1:ykjzy2wzgrlvpDCRc4LA8UXy6D8bzMSuAF3WD57Gok0= github.com/tjfoc/gmsm v1.3.2/go.mod h1:HaUcFuY0auTiaHB9MHFGCPx5IaLhTUd2atbCFBQXn9w= github.com/tjfoc/gmsm v1.4.1 h1:aMe1GlZb+0bLjn+cKTPEvvn9oUEBlJitaZiiBwsbgho= github.com/tjfoc/gmsm v1.4.1/go.mod h1:j4INPkHWMrhJb38G+J6W4Tw0AbuN8Thu3PbdVYhVcTE= -github.com/tklauser/go-sysconf v0.3.14 h1:g5vzr9iPFFz24v2KZXs/pvpvh8/V9Fw6vQK5ZZb78yU= -github.com/tklauser/go-sysconf v0.3.14/go.mod h1:1ym4lWMLUOhuBOPGtRcJm7tEGX4SCYNEEEtghGG/8uY= -github.com/tklauser/numcpus v0.8.0 h1:Mx4Wwe/FjZLeQsK/6kt2EOepwwSl7SmJrK5bV/dXYgY= -github.com/tklauser/numcpus v0.8.0/go.mod h1:ZJZlAY+dmR4eut8epnzf0u/VwodKmryxR8txiloSqBE= -github.com/ufilesdk-dev/ufile-gosdk v1.0.4 h1:55/M4SvRKi9LHJVItaTn9TS806oQmKIugDtnmN5eA5E= -github.com/ufilesdk-dev/ufile-gosdk v1.0.4/go.mod h1:R5FMQxkQ+QK/9Vz+jfnJP4rZIktYrRcWmuAnbOSkROI= -github.com/xuri/efp v0.0.0-20220407160117-ad0f7a785be8/go.mod h1:ybY/Jr0T0GTCnYjKqmdwxyxn2BQf2RcQIIvex5QldPI= -github.com/xuri/efp v0.0.0-20240408161823-9ad904a10d6d h1:llb0neMWDQe87IzJLS4Ci7psK/lVsjIS2otl+1WyRyY= -github.com/xuri/efp v0.0.0-20240408161823-9ad904a10d6d/go.mod h1:ybY/Jr0T0GTCnYjKqmdwxyxn2BQf2RcQIIvex5QldPI= -github.com/xuri/excelize/v2 v2.6.0 h1:m/aXAzSAqxgt74Nfd+sNzpzVKhTGl7+S9nbG4A57mF4= -github.com/xuri/excelize/v2 v2.6.0/go.mod h1:Q1YetlHesXEKwGFfeJn7PfEZz2IvHb6wdOeYjBxVcVs= -github.com/xuri/nfp v0.0.0-20220409054826-5e722a1d9e22/go.mod h1:WwHg+CVyzlv/TX9xqBFXEZAuxOPxn2k1GNHwG41IIUQ= -github.com/xuri/nfp v0.0.0-20240318013403-ab9948c2c4a7 h1:hPVCafDV85blFTabnqKgNhDCkJX25eik94Si9cTER4A= -github.com/xuri/nfp v0.0.0-20240318013403-ab9948c2c4a7/go.mod h1:WwHg+CVyzlv/TX9xqBFXEZAuxOPxn2k1GNHwG41IIUQ= +github.com/tklauser/go-sysconf v0.3.12 h1:0QaGUFOdQaIVdPgfITYzaTegZvdCjmYO52cSFAEVmqU= +github.com/tklauser/go-sysconf v0.3.12/go.mod h1:Ho14jnntGE1fpdOqQEEaiKRpvIavV0hSfmBq8nJbHYI= +github.com/tklauser/numcpus v0.6.1 h1:ng9scYS7az0Bk4OZLvrNXNSAO2Pxr1XXRAPyjhIx+Fk= +github.com/tklauser/numcpus v0.6.1/go.mod h1:1XfjsgE2zo8GVw7POkMbHENHzVg3GzmoZ9fESEdAacY= +github.com/ufilesdk-dev/ufile-gosdk v1.0.6 h1:YhTZfA0U5zjKUe6qYrIs72jjxSZryTMbS9wE76fIxMs= +github.com/ufilesdk-dev/ufile-gosdk v1.0.6/go.mod h1:s1LIpscsgVNx0JRNbDElNNQhyNXJiumVpzvPzVNS/XI= +github.com/xuri/efp v0.0.1 h1:fws5Rv3myXyYni8uwj2qKjVaRP30PdjeYe2Y6FDsCL8= +github.com/xuri/efp v0.0.1/go.mod h1:ybY/Jr0T0GTCnYjKqmdwxyxn2BQf2RcQIIvex5QldPI= +github.com/xuri/excelize/v2 v2.9.1 h1:VdSGk+rraGmgLHGFaGG9/9IWu1nj4ufjJ7uwMDtj8Qw= +github.com/xuri/excelize/v2 v2.9.1/go.mod h1:x7L6pKz2dvo9ejrRuD8Lnl98z4JLt0TGAwjhW+EiP8s= +github.com/xuri/nfp v0.0.1 h1:MDamSGatIvp8uOmDP8FnmjuQpu90NzdJxo7242ANR9Q= +github.com/xuri/nfp v0.0.1/go.mod h1:WwHg+CVyzlv/TX9xqBFXEZAuxOPxn2k1GNHwG41IIUQ= github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.1.30/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= -github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY= github.com/yuin/gopher-lua v0.0.0-20220504180219-658193537a64 h1:5mLPGnFdSsevFRFc9q3yYbBkB6tsm4aCwwQV/j1JQAQ= github.com/yuin/gopher-lua v0.0.0-20220504180219-658193537a64/go.mod h1:GBR0iDaNXjAgGg9zfCvksxSRnQx76gclCIb7kdAd1Pw= github.com/yusufpapurcu/wmi v1.2.4 h1:zFUKzehAFReQwLys1b/iSMl+JQGSCSjtVqQn9bBrPo0= github.com/yusufpapurcu/wmi v1.2.4/go.mod h1:SBZ9tNy3G9/m5Oi98Zks0QjeHVDvuK0qfxQmPyzfmi0= -go.opentelemetry.io/otel v1.32.0 h1:WnBN+Xjcteh0zdk01SVqV55d/m62NJLJdIyb4y/WO5U= -go.opentelemetry.io/otel v1.32.0/go.mod h1:00DCVSB0RQcnzlwyTfqtxSm+DRr9hpYrHjNGiBHVQIg= -go.opentelemetry.io/otel/exporters/jaeger v1.17.0 h1:D7UpUy2Xc2wsi1Ras6V40q806WM07rqoCWzXu7Sqy+4= -go.opentelemetry.io/otel/exporters/jaeger v1.17.0/go.mod h1:nPCqOnEH9rNLKqH/+rrUjiMzHJdV1BlpKcTwRTyKkKI= -go.opentelemetry.io/otel/metric v1.32.0 h1:xV2umtmNcThh2/a/aCP+h64Xx5wsj8qqnkYZktzNa0M= -go.opentelemetry.io/otel/metric v1.32.0/go.mod h1:jH7CIbbK6SH2V2wE16W05BHCtIDzauciCRLoc/SyMv8= +go.opentelemetry.io/auto/sdk v1.1.0 h1:cH53jehLUN6UFLY71z+NDOiNJqDdPRaXzTel0sJySYA= +go.opentelemetry.io/auto/sdk v1.1.0/go.mod h1:3wSPjt5PWp2RhlCcmmOial7AvC4DQqZb7a7wCow3W8A= +go.opentelemetry.io/otel v1.37.0 h1:9zhNfelUvx0KBfu/gb+ZgeAfAgtWrfHJZcAqFC228wQ= +go.opentelemetry.io/otel v1.37.0/go.mod h1:ehE/umFRLnuLa/vSccNq9oS1ErUlkkK71gMcN34UG8I= +go.opentelemetry.io/otel/exporters/jaeger v1.14.0 h1:CjbUNd4iN2hHmWekmOqZ+zSCU+dzZppG8XsV+A3oc8Q= +go.opentelemetry.io/otel/exporters/jaeger v1.14.0/go.mod h1:4Ay9kk5vELRrbg5z4cpP9EtmQRFap2Wb0woPG4lujZA= +go.opentelemetry.io/otel/metric v1.37.0 h1:mvwbQS5m0tbmqML4NqK+e3aDiO02vsf/WgbsdpcPoZE= +go.opentelemetry.io/otel/metric v1.37.0/go.mod h1:04wGrZurHYKOc+RKeye86GwKiTb9FKm1WHtO+4EVr2E= go.opentelemetry.io/otel/sdk v1.32.0 h1:RNxepc9vK59A8XsgZQouW8ue8Gkb4jpWtJm9ge5lEG4= go.opentelemetry.io/otel/sdk v1.32.0/go.mod h1:LqgegDBjKMmb2GC6/PrTnteJG39I8/vJCAP9LlJXEjU= -go.opentelemetry.io/otel/trace v1.32.0 h1:WIC9mYrXf8TmY/EXuULKc8hR17vE+Hjv2cssQDe03fM= -go.opentelemetry.io/otel/trace v1.32.0/go.mod h1:+i4rkvCraA+tG6AzwloGaCtkx53Fa+L+V8e9a7YvhT8= +go.opentelemetry.io/otel/trace v1.37.0 h1:HLdcFNbRQBE2imdSEgm/kwqmQj1Or1l/7bW6mxVK7z4= +go.opentelemetry.io/otel/trace v1.37.0/go.mod h1:TlgrlQ+PtQO5XFerSPUYG0JSgGyryXewPGyayAWSBS0= +go.uber.org/atomic v1.5.1 h1:rsqfU5vBkVknbhUGbAUwQKR2H4ItV8tjJ+6kJX4cxHM= go.uber.org/atomic v1.5.1/go.mod h1:sABNBOSYdrvTF6hTgEIbc7YasKWGhgEQZyfxyTvoXHQ= -go.uber.org/atomic v1.11.0 h1:ZvwS0R+56ePWxUNi+Atn9dWONBPp/AUETXlHW0DxSjE= -go.uber.org/atomic v1.11.0/go.mod h1:LUxbIzbOniOlMKjJjyPfpl4v+PKK2cNJn91OQbhoJI0= golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= @@ -466,32 +481,37 @@ golang.org/x/crypto v0.0.0-20191219195013-becbf705a915/go.mod h1:LzIPMQfyMNhhGPh golang.org/x/crypto v0.0.0-20200510223506-06a226fb4e37/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20201012173705-84dcc777aaee/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-20210220033148-5ea612d1eb83/go.mod h1:jdWPYTVW3xRLrWPugEBEK3UY2ZEsg3UU495nc5E+M+I= golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= -golang.org/x/crypto v0.0.0-20220408190544-5352b0902921/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= golang.org/x/crypto v0.0.0-20220622213112-05595931fe9d/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= -golang.org/x/crypto v0.1.0/go.mod h1:RecgLatLF4+eUMCP1PoPZQb+cVrJcOPbHkTkbkB9sbw= golang.org/x/crypto v0.6.0/go.mod h1:OFC/31mSvZgRz0V1QTNCzfAI1aIRzbiufJtkMIlEp58= -golang.org/x/crypto v0.10.0/go.mod h1:o4eNf7Ede1fv+hwOwZsTHl9EsPFO6q6ZvYR8vYfY45I= +golang.org/x/crypto v0.13.0/go.mod h1:y6Z2r+Rw4iayiXXAIxJIDAJ1zMW4yaTpebo8fPOliYc= +golang.org/x/crypto v0.14.0/go.mod h1:MVFd36DqK4CsrnJYDkBA3VC4m2GkXAM0PvzMCn4JQf4= golang.org/x/crypto v0.18.0/go.mod h1:R0j02AL6hcrfOiy9T4ZYp/rcWeMxM3L6QYxlOuEG1mg= -golang.org/x/crypto v0.30.0 h1:RwoQn3GkWiMkzlX562cLB7OxWvjH1L8xutO2WoJcRoY= -golang.org/x/crypto v0.30.0/go.mod h1:kDsLvtWBEx7MV9tJOj9bnXsPbxwJQ6csT/x4KIN4Ssk= +golang.org/x/crypto v0.19.0/go.mod h1:Iy9bg/ha4yyC70EfRS8jz+B6ybOBKMaSxLj6P6oBDfU= +golang.org/x/crypto v0.21.0/go.mod h1:0BP7YvVV9gBbVKyeTG0Gyn+gZm94bibOW5BjDEYAOMs= +golang.org/x/crypto v0.23.0/go.mod h1:CKFgDieR+mRhux2Lsu27y0fO304Db0wZe70UKqHu0v8= +golang.org/x/crypto v0.24.0/go.mod h1:Z1PMYSOR5nyMcyAVAIQSKCDwalqy85Aqn1x3Ws4L5DM= +golang.org/x/crypto v0.39.0 h1:SHs+kF4LP+f+p14esP5jAoDpHU8Gu/v9lFRK6IT5imM= +golang.org/x/crypto v0.39.0/go.mod h1:L+Xg3Wf6HoL4Bn4238Z6ft6KfEpN0tJGo53AAPC632U= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= -golang.org/x/image v0.0.0-20211028202545-6944b10bf410/go.mod h1:023OzeP/+EPmXeapQh35lcL3II3LrY8Ic+EFFKVhULM= -golang.org/x/image v0.13.0/go.mod h1:6mmbMOeV28HuMTgA6OSRkdXKYw/t5W9Uwn2Yv1r3Yxk= -golang.org/x/image v0.19.0 h1:D9FX4QWkLfkeqaC62SonffIIuYdOk/UE2XKUBgRIBIQ= -golang.org/x/image v0.19.0/go.mod h1:y0zrRqlQRWQ5PXaYCOMLTW2fpsxZ8Qh9I/ohnInJEys= +golang.org/x/image v0.23.0/go.mod h1:wJJBTdLfCCf3tiHa1fNxpZmUI4mmoZvwMCPP0ddoNKY= +golang.org/x/image v0.25.0 h1:Y6uW6rH1y5y/LK1J8BPWZtr6yZ7hrsy6hFrXjgsc2fQ= +golang.org/x/image v0.25.0/go.mod h1:tCAmOEGthTtkalusGp1g3xa2gke8J6c2N565dTyl9Rs= 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-20190313153728-d0100b6bd8b3/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= +golang.org/x/lint v0.0.0-20190930215403-16217165b5de h1:5hukYrvBGR8/eNkX5mdUezrA6JiaEZDtJb9Ei+1LlBs= golang.org/x/lint v0.0.0-20190930215403-16217165b5de/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= -golang.org/x/mod v0.4.2/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= 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.20.0 h1:utOm6MM3R3dnawAiJgn0y+xvuYRsm1RKM/4giyfDgV0= -golang.org/x/mod v0.20.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c= +golang.org/x/mod v0.12.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= +golang.org/x/mod v0.15.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c= +golang.org/x/mod v0.17.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c= +golang.org/x/mod v0.25.0 h1:n7a+ZbQKQA/Ysbyb0/6IbB1H/X41mKgbhfv7AfG/44w= +golang.org/x/mod v0.25.0/go.mod h1:IXM97Txy2VM4PJ3gI61r1YEk/gAj6zAHN3AdZt6S9Ww= 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= @@ -506,19 +526,21 @@ golang.org/x/net v0.0.0-20200520004742-59133d7f0dd7/go.mod h1:qpuaurCH72eLCgpAm/ golang.org/x/net v0.0.0-20201010224723-4f7140c49acb/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= -golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4/go.mod h1:p54w0d4576C0XHj96bSt6lcn1PtDYWL6XObtHCRCNQM= golang.org/x/net v0.0.0-20210428140749-89ef3d95e781/go.mod h1:OJAsFXCWl8Ukc7SiCT/9KSuxbyM7479/AVlXFRxuMCk= golang.org/x/net v0.0.0-20211112202133-69e39bad7dc2/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= -golang.org/x/net v0.0.0-20220407224826-aac1ed45d8e3/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= -golang.org/x/net v0.1.0/go.mod h1:Cx3nUiGt4eDBEyega/BKRp+/AlGL8hYe7U9odMt2Cco= 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.10.0/go.mod h1:0qNGK6F8kojg2nk9dLZ2mShWaEBan6FAoqfSigmmuDg= -golang.org/x/net v0.11.0/go.mod h1:2L/ixqYpgIVXmeoSA/4Lu7BzTG4KIyPIryS4IsOd1oQ= +golang.org/x/net v0.15.0/go.mod h1:idbUs1IY1+zTqbi8yxTbhexhEEk5ur9LInksu6HrEpk= +golang.org/x/net v0.17.0/go.mod h1:NxSsAGuq816PNPmqtQdLE42eU2Fs7NoRIZrHJAlaCOE= golang.org/x/net v0.20.0/go.mod h1:z8BVo6PvndSri0LbOE3hAn0apkU+1YvI6E70E9jsnvY= -golang.org/x/net v0.32.0 h1:ZqPmj8Kzc+Y6e0+skZsuACbx+wzMgo5MQsJh9Qd6aYI= -golang.org/x/net v0.32.0/go.mod h1:CwU0IoeOlnQQWJ6ioyFrfRuomB8GKF6KbYXZVyeXNfs= +golang.org/x/net v0.21.0/go.mod h1:bIjVDfnllIU7BJ2DNgfnXvpSvtn8VRwhlsaeUTyUS44= +golang.org/x/net v0.23.0/go.mod h1:JKghWKKOSdJwpW2GEx0Ja7fmaKnMsbu+MWVZTokSYmg= +golang.org/x/net v0.25.0/go.mod h1:JkAGAh7GEvH74S6FOH42FLoXpXbE/aqXSrIQjXgsiwM= +golang.org/x/net v0.26.0/go.mod h1:5YKkiSynbBIh3p6iOc/vibscux0x38BZDkn8sCUPxHE= +golang.org/x/net v0.41.0 h1:vBTly1HeNPEn3wtREYfy4GZ/NECgw2Cnl+nK6Nz3uvw= +golang.org/x/net v0.41.0/go.mod h1:B/K4NNqkfmg07DQYrbwvSluqCJOOXwUjeb/5lOisjbA= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= 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= @@ -526,11 +548,14 @@ golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJ golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20200317015054-43a5402ce75a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/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/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.10.0 h1:3NQrjDixjgGwUOCaF8w2+VYHv0Ve/vGYSbdkTa98gmQ= +golang.org/x/sync v0.3.0/go.mod h1:FU7BRWz2tNW+3quACPkgCx/L+uEAv1htQ0V83Z9Rj+Y= +golang.org/x/sync v0.6.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= +golang.org/x/sync v0.7.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= golang.org/x/sync v0.10.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= +golang.org/x/sync v0.15.0 h1:KWH3jNZsfyT6xfAfKiz6MRNmd46ByHDYaZ7KSkCtdW8= +golang.org/x/sync v0.15.0/go.mod h1:1dzgHSNfp02xaA81J2MS99Qcpr2w7fw1gpm99rleRqA= 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= @@ -540,6 +565,7 @@ golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20190904154756-749cb33beabd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190916202348-b4ddaad3f8a3/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191005200804-aed5e4c7ecf9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20191026070338-33540a1f6037/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191120155948-bd437916bb0e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191204072324-ce4227a45e2e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200323222414-85ca7c5b95cd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= @@ -548,49 +574,58 @@ golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20201204225414-ed752295db88/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210112080510-489259a85091/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210330210617-4fbd30eecc44/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210228012217-479acdf4ea46/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210510120138-977fb7262007/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= 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-20211216021012-1d35b9e2eb4e/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-20220715151400-c0bba94af5f8/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.1.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/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.9.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.11.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.12.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.13.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.16.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= -golang.org/x/sys v0.29.0 h1:TPYlXGxvx1MGTn2GiZDhnjPA9wZzZeGKHHmKhHYvgaU= -golang.org/x/sys v0.29.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/sys v0.17.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/sys v0.18.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/sys v0.20.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/sys v0.21.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/sys v0.33.0 h1:q3i8TbbEz+JRD9ywIRlyRAQbM0qF7hu24q3teo2hbuw= +golang.org/x/sys v0.33.0/go.mod h1:BJP2sWEmIv4KK5OTEluFJCKSidICx8ciO85XgH3Ak8k= +golang.org/x/telemetry v0.0.0-20240228155512-f48c80bd79b2/go.mod h1:TeRTkGYfJXctD9OcfyVLyj2J3IxLnKwHJR8f4D8a3YE= +golang.org/x/term v0.0.0-20201117132131-f5c789dd3221/go.mod h1:Nr5EML6q2oocZ2LXRh80K7BxOlk5/8JxuGnuhpl+muw= 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.1.0/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= golang.org/x/term v0.5.0/go.mod h1:jMB1sMXY+tzblOD4FWmEbocvup2/aLOaQEp7JmGp78k= golang.org/x/term v0.8.0/go.mod h1:xPskH00ivmX89bAKVGSKKtLOWNx2+17Eiy94tnKShWo= -golang.org/x/term v0.9.0/go.mod h1:M6DEAAIenWoTxdKrOltXcmDY3rSplQUkrvaDU5FcQyo= +golang.org/x/term v0.12.0/go.mod h1:owVbMEjm3cBLCHdkQu9b1opXd4ETQWc3BhuQGKgXgvU= +golang.org/x/term v0.13.0/go.mod h1:LTmsnFJwVN6bCy1rVCoS+qHT1HhALEFxKncY3WNNh4U= golang.org/x/term v0.16.0/go.mod h1:yn7UURbUtPyrVJPGPq404EukNFxcm/foM+bV/bfcDsY= -golang.org/x/term v0.28.0 h1:/Ts8HFuMR2E6IP/jlo7QVLZHggjKQbhu/7H0LJFr3Gg= -golang.org/x/term v0.28.0/go.mod h1:Sw/lC2IAUZ92udQNf3WodGtn4k/XoLyZoh8v/8uiwek= +golang.org/x/term v0.17.0/go.mod h1:lLRBjIVuehSbZlaOtGMbcMncT+aqLLLmKrsjNrUguwk= +golang.org/x/term v0.18.0/go.mod h1:ILwASektA3OnRv7amZ1xhE/KTR+u50pbXfZ03+6Nx58= +golang.org/x/term v0.20.0/go.mod h1:8UkIAJTvZgivsXaD6/pH6U9ecQzZ45awqEOzuCvwpFY= +golang.org/x/term v0.21.0/go.mod h1:ooXLefLobQVslOqselCNF4SxFAaoS6KujMbsGzSDmX0= +golang.org/x/term v0.32.0 h1:DR4lr0TjUs3epypdhTOkMmuF5CDFJ/8pOnbzMZPQ7bg= +golang.org/x/term v0.32.0/go.mod h1:uZG1FhGx848Sqfsq4/DlJr3xGGsYMu/L5GW4abiaEPQ= golang.org/x/text v0.3.0/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.4.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.9.0/go.mod h1:e1OnstbJyHTd6l/uOt8jFFHp6TRDWZR/bV3emEE/zU8= -golang.org/x/text v0.10.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE= golang.org/x/text v0.13.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE= golang.org/x/text v0.14.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU= -golang.org/x/text v0.21.0 h1:zyQAAkrwaneQ066sspRyJaG9VNi/YJ1NfzcGB3hZ/qo= +golang.org/x/text v0.15.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU= +golang.org/x/text v0.16.0/go.mod h1:GhwF1Be+LQoKShO3cGOHzqOgRrGaYc9AvblQOmPVHnI= golang.org/x/text v0.21.0/go.mod h1:4IBbMaMmOPCJ8SecivzSH54+73PCFmPWxNTLm+vZkEQ= -golang.org/x/time v0.6.0 h1:eTDhh4ZXt5Qf0augr54TN6suAUudPcawVZeIAPU7D4U= -golang.org/x/time v0.6.0/go.mod h1:3BpzKBy/shNhVucY/MWOyx10tF3SFh9QdLuxbVysPQM= +golang.org/x/text v0.26.0 h1:P42AVeLghgTYr4+xUnTRKDMqpar+PtX7KWuNQL21L8M= +golang.org/x/text v0.26.0/go.mod h1:QK15LZJUUQVJxhz7wXgxSy/CJaTFjd0G+YLonydOVQA= +golang.org/x/time v0.12.0 h1:ScB/8o8olJvc+CQPWrK3fPZNfh7qgwCrY0zJmoEQLSE= +golang.org/x/time v0.12.0/go.mod h1:CDIdPxbZBQxdj6cxyCIdrNogrJKMJ7pr37NYpMcMDSg= 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= @@ -602,11 +637,12 @@ golang.org/x/tools v0.0.0-20191029041327-9cc4af7d6b2c/go.mod h1:b+2E5dAYhXwXZwtn golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20200509030707-2212a7e161a5/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= golang.org/x/tools v0.0.0-20201224043029-2b0845dc783e/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= -golang.org/x/tools v0.1.1/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= 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.24.0 h1:J1shsA93PJUEVaUSaay7UXAyE8aimq3GW0pjlolpa24= -golang.org/x/tools v0.24.0/go.mod h1:YhNqVBIfWHdzvTLs0d8LCuMhkKUgSUKldakyV7W/WDQ= +golang.org/x/tools v0.13.0/go.mod h1:HvlwmtVNQAhOuCjW7xxvovg8wbNq7LwfXh/k7wXUl58= +golang.org/x/tools v0.21.1-0.20240508182429-e35e4ccd0d2d/go.mod h1:aiJjzUbINMkxbQROHiO6hDPo2LHcIPhhQsa9DLh0yGk= +golang.org/x/tools v0.34.0 h1:qIpSLOxeCYGg9TrcJokLBG4KFA6d795g0xkBkiESGlo= +golang.org/x/tools v0.34.0/go.mod h1:pAP9OwEaY1CAW3HOmg3hLZC5Z0CCmzjAF2UQMSqNARg= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= @@ -639,9 +675,8 @@ gopkg.in/h2non/gock.v1 v1.1.2/go.mod h1:n7UGz/ckNChHiK05rDoiC4MYSunEC/lyaUm2WWaD gopkg.in/ini.v1 v1.56.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= gopkg.in/ini.v1 v1.67.0 h1:Dgnx+6+nfE+IfzjUEISNeydPJh9AXNNsWbGP9KzCsOA= gopkg.in/ini.v1 v1.67.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= +gopkg.in/natefinch/lumberjack.v2 v2.0.0 h1:1Lc07Kr7qY4U2YPouBjpCLxpiyxIVoxqXgkXLknAOE8= gopkg.in/natefinch/lumberjack.v2 v2.0.0/go.mod h1:l0ndWWf7gzL7RNwBG7wST/UCcT4T24xpD6X8LsfU/+k= -gopkg.in/natefinch/lumberjack.v2 v2.2.1 h1:bBRl1b0OH9s/DuPhuXpNl+VtCaJXFZ5/uEFST95x9zc= -gopkg.in/natefinch/lumberjack.v2 v2.2.1/go.mod h1:YD8tP3GAjkrDg1eZH7EGmyESg/lsYskCTPBJVb9jqSc= 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.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= @@ -656,5 +691,7 @@ 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-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= +modernc.org/fileutil v1.0.0 h1:Z1AFLZwl6BO8A5NldQg/xTSjGLetp+1Ubvl4alfGx8w= +modernc.org/fileutil v1.0.0/go.mod h1:JHsWpkrk/CnVV1H/eGlFf85BEpfkrp56ro8nojIq9Q8= stathat.com/c/consistent v1.0.0 h1:ezyc51EGcRPJUxfHGSgJjWzJdj3NiMU9pNfLNGiXV0c= stathat.com/c/consistent v1.0.0/go.mod h1:QkzMWzcbB+yQBL2AttO6sgsQS/JSTapcDISJalmCDS0= diff --git a/server/internal/controller/admin/common/ems.go b/server/internal/controller/admin/common/ems.go index 9443f80..5c70c4e 100644 --- a/server/internal/controller/admin/common/ems.go +++ b/server/internal/controller/admin/common/ems.go @@ -7,6 +7,7 @@ package common import ( "context" + "github.com/gogf/gf/v2/errors/gerror" "hotgo/api/admin/common" "hotgo/internal/consts" "hotgo/internal/dao" @@ -14,8 +15,6 @@ import ( "hotgo/internal/model/entity" "hotgo/internal/model/input/sysin" "hotgo/internal/service" - - "github.com/gogf/gf/v2/errors/gerror" ) var Ems = new(cEms) diff --git a/server/internal/controller/admin/common/sms.go b/server/internal/controller/admin/common/sms.go index fe9968b..c1f5c6a 100644 --- a/server/internal/controller/admin/common/sms.go +++ b/server/internal/controller/admin/common/sms.go @@ -7,6 +7,7 @@ package common import ( "context" + "github.com/gogf/gf/v2/errors/gerror" "hotgo/api/admin/common" "hotgo/internal/consts" "hotgo/internal/dao" @@ -14,8 +15,6 @@ import ( "hotgo/internal/model/entity" "hotgo/internal/model/input/sysin" "hotgo/internal/service" - - "github.com/gogf/gf/v2/errors/gerror" ) var Sms = new(cSms) diff --git a/server/internal/dao/internal/addon_hgexample_table.go b/server/internal/dao/internal/addon_hgexample_table.go index dd92a93..97a8551 100755 --- a/server/internal/dao/internal/addon_hgexample_table.go +++ b/server/internal/dao/internal/addon_hgexample_table.go @@ -11,14 +11,15 @@ import ( "github.com/gogf/gf/v2/frame/g" ) -// AddonHgexampleTableDao is the data access object for table hg_addon_hgexample_table. +// AddonHgexampleTableDao is the data access object for the table hg_addon_hgexample_table. type AddonHgexampleTableDao struct { - table string // table is the underlying table name of the DAO. - group string // group is the database configuration group name of current DAO. - columns AddonHgexampleTableColumns // columns contains all the column names of Table for convenient usage. + table string // table is the underlying table name of the DAO. + group string // group is the database configuration group name of the current DAO. + columns AddonHgexampleTableColumns // columns contains all the column names of Table for convenient usage. + handlers []gdb.ModelHandler // handlers for customized model modification. } -// AddonHgexampleTableColumns defines and stores column names for table hg_addon_hgexample_table. +// AddonHgexampleTableColumns defines and stores column names for the table hg_addon_hgexample_table. type AddonHgexampleTableColumns struct { Id string // ID Pid string // 上级ID @@ -59,7 +60,7 @@ type AddonHgexampleTableColumns struct { DeletedAt string // 删除时间 } -// addonHgexampleTableColumns holds the columns for table hg_addon_hgexample_table. +// addonHgexampleTableColumns holds the columns for the table hg_addon_hgexample_table. var addonHgexampleTableColumns = AddonHgexampleTableColumns{ Id: "id", Pid: "pid", @@ -101,44 +102,49 @@ var addonHgexampleTableColumns = AddonHgexampleTableColumns{ } // NewAddonHgexampleTableDao creates and returns a new DAO object for table data access. -func NewAddonHgexampleTableDao() *AddonHgexampleTableDao { +func NewAddonHgexampleTableDao(handlers ...gdb.ModelHandler) *AddonHgexampleTableDao { return &AddonHgexampleTableDao{ - group: "default", - table: "hg_addon_hgexample_table", - columns: addonHgexampleTableColumns, + group: "default", + table: "hg_addon_hgexample_table", + columns: addonHgexampleTableColumns, + handlers: handlers, } } -// DB retrieves and returns the underlying raw database management object of current DAO. +// DB retrieves and returns the underlying raw database management object of the current DAO. func (dao *AddonHgexampleTableDao) DB() gdb.DB { return g.DB(dao.group) } -// Table returns the table name of current dao. +// Table returns the table name of the current DAO. func (dao *AddonHgexampleTableDao) Table() string { return dao.table } -// Columns returns all column names of current dao. +// Columns returns all column names of the current DAO. func (dao *AddonHgexampleTableDao) Columns() AddonHgexampleTableColumns { return dao.columns } -// Group returns the configuration group name of database of current dao. +// Group returns the database configuration group name of the current DAO. func (dao *AddonHgexampleTableDao) Group() string { return dao.group } -// Ctx creates and returns the Model for current DAO, It automatically sets the context for current operation. +// Ctx creates and returns a Model for the current DAO. It automatically sets the context for the current operation. func (dao *AddonHgexampleTableDao) Ctx(ctx context.Context) *gdb.Model { - return dao.DB().Model(dao.table).Safe().Ctx(ctx) + model := dao.DB().Model(dao.table) + for _, handler := range dao.handlers { + model = handler(model) + } + return model.Safe().Ctx(ctx) } // Transaction wraps the transaction logic using function f. -// It rollbacks the transaction and returns the error from function f if it returns non-nil error. +// It rolls back the transaction and returns the error if function f returns a non-nil error. // It commits the transaction and returns nil if function f returns nil. // -// Note that, you should not Commit or Rollback the transaction in function f +// Note: Do not commit or roll back the transaction in function f, // as it is automatically handled by this function. func (dao *AddonHgexampleTableDao) Transaction(ctx context.Context, f func(ctx context.Context, tx gdb.TX) error) (err error) { return dao.Ctx(ctx).Transaction(ctx, f) diff --git a/server/internal/dao/internal/addon_hgexample_tenant_order.go b/server/internal/dao/internal/addon_hgexample_tenant_order.go index 84111b9..bf41fd8 100755 --- a/server/internal/dao/internal/addon_hgexample_tenant_order.go +++ b/server/internal/dao/internal/addon_hgexample_tenant_order.go @@ -11,14 +11,15 @@ import ( "github.com/gogf/gf/v2/frame/g" ) -// AddonHgexampleTenantOrderDao is the data access object for table hg_addon_hgexample_tenant_order. +// AddonHgexampleTenantOrderDao is the data access object for the table hg_addon_hgexample_tenant_order. type AddonHgexampleTenantOrderDao struct { - table string // table is the underlying table name of the DAO. - group string // group is the database configuration group name of current DAO. - columns AddonHgexampleTenantOrderColumns // columns contains all the column names of Table for convenient usage. + table string // table is the underlying table name of the DAO. + group string // group is the database configuration group name of the current DAO. + columns AddonHgexampleTenantOrderColumns // columns contains all the column names of Table for convenient usage. + handlers []gdb.ModelHandler // handlers for customized model modification. } -// AddonHgexampleTenantOrderColumns defines and stores column names for table hg_addon_hgexample_tenant_order. +// AddonHgexampleTenantOrderColumns defines and stores column names for the table hg_addon_hgexample_tenant_order. type AddonHgexampleTenantOrderColumns struct { Id string // 主键 TenantId string // 租户ID @@ -33,7 +34,7 @@ type AddonHgexampleTenantOrderColumns struct { UpdatedAt string // 修改时间 } -// addonHgexampleTenantOrderColumns holds the columns for table hg_addon_hgexample_tenant_order. +// addonHgexampleTenantOrderColumns holds the columns for the table hg_addon_hgexample_tenant_order. var addonHgexampleTenantOrderColumns = AddonHgexampleTenantOrderColumns{ Id: "id", TenantId: "tenant_id", @@ -49,44 +50,49 @@ var addonHgexampleTenantOrderColumns = AddonHgexampleTenantOrderColumns{ } // NewAddonHgexampleTenantOrderDao creates and returns a new DAO object for table data access. -func NewAddonHgexampleTenantOrderDao() *AddonHgexampleTenantOrderDao { +func NewAddonHgexampleTenantOrderDao(handlers ...gdb.ModelHandler) *AddonHgexampleTenantOrderDao { return &AddonHgexampleTenantOrderDao{ - group: "default", - table: "hg_addon_hgexample_tenant_order", - columns: addonHgexampleTenantOrderColumns, + group: "default", + table: "hg_addon_hgexample_tenant_order", + columns: addonHgexampleTenantOrderColumns, + handlers: handlers, } } -// DB retrieves and returns the underlying raw database management object of current DAO. +// DB retrieves and returns the underlying raw database management object of the current DAO. func (dao *AddonHgexampleTenantOrderDao) DB() gdb.DB { return g.DB(dao.group) } -// Table returns the table name of current dao. +// Table returns the table name of the current DAO. func (dao *AddonHgexampleTenantOrderDao) Table() string { return dao.table } -// Columns returns all column names of current dao. +// Columns returns all column names of the current DAO. func (dao *AddonHgexampleTenantOrderDao) Columns() AddonHgexampleTenantOrderColumns { return dao.columns } -// Group returns the configuration group name of database of current dao. +// Group returns the database configuration group name of the current DAO. func (dao *AddonHgexampleTenantOrderDao) Group() string { return dao.group } -// Ctx creates and returns the Model for current DAO, It automatically sets the context for current operation. +// Ctx creates and returns a Model for the current DAO. It automatically sets the context for the current operation. func (dao *AddonHgexampleTenantOrderDao) Ctx(ctx context.Context) *gdb.Model { - return dao.DB().Model(dao.table).Safe().Ctx(ctx) + model := dao.DB().Model(dao.table) + for _, handler := range dao.handlers { + model = handler(model) + } + return model.Safe().Ctx(ctx) } // Transaction wraps the transaction logic using function f. -// It rollbacks the transaction and returns the error from function f if it returns non-nil error. +// It rolls back the transaction and returns the error if function f returns a non-nil error. // It commits the transaction and returns nil if function f returns nil. // -// Note that, you should not Commit or Rollback the transaction in function f +// Note: Do not commit or roll back the transaction in function f, // as it is automatically handled by this function. func (dao *AddonHgexampleTenantOrderDao) Transaction(ctx context.Context, f func(ctx context.Context, tx gdb.TX) error) (err error) { return dao.Ctx(ctx).Transaction(ctx, f) diff --git a/server/internal/dao/internal/admin_cash.go b/server/internal/dao/internal/admin_cash.go index b92d0fa..a9bdb1b 100755 --- a/server/internal/dao/internal/admin_cash.go +++ b/server/internal/dao/internal/admin_cash.go @@ -11,14 +11,15 @@ import ( "github.com/gogf/gf/v2/frame/g" ) -// AdminCashDao is the data access object for table hg_admin_cash. +// AdminCashDao is the data access object for the table hg_admin_cash. type AdminCashDao struct { - table string // table is the underlying table name of the DAO. - group string // group is the database configuration group name of current DAO. - columns AdminCashColumns // columns contains all the column names of Table for convenient usage. + table string // table is the underlying table name of the DAO. + group string // group is the database configuration group name of the current DAO. + columns AdminCashColumns // columns contains all the column names of Table for convenient usage. + handlers []gdb.ModelHandler // handlers for customized model modification. } -// AdminCashColumns defines and stores column names for table hg_admin_cash. +// AdminCashColumns defines and stores column names for the table hg_admin_cash. type AdminCashColumns struct { Id string // ID MemberId string // 管理员ID @@ -32,7 +33,7 @@ type AdminCashColumns struct { CreatedAt string // 申请时间 } -// adminCashColumns holds the columns for table hg_admin_cash. +// adminCashColumns holds the columns for the table hg_admin_cash. var adminCashColumns = AdminCashColumns{ Id: "id", MemberId: "member_id", @@ -47,44 +48,49 @@ var adminCashColumns = AdminCashColumns{ } // NewAdminCashDao creates and returns a new DAO object for table data access. -func NewAdminCashDao() *AdminCashDao { +func NewAdminCashDao(handlers ...gdb.ModelHandler) *AdminCashDao { return &AdminCashDao{ - group: "default", - table: "hg_admin_cash", - columns: adminCashColumns, + group: "default", + table: "hg_admin_cash", + columns: adminCashColumns, + handlers: handlers, } } -// DB retrieves and returns the underlying raw database management object of current DAO. +// DB retrieves and returns the underlying raw database management object of the current DAO. func (dao *AdminCashDao) DB() gdb.DB { return g.DB(dao.group) } -// Table returns the table name of current dao. +// Table returns the table name of the current DAO. func (dao *AdminCashDao) Table() string { return dao.table } -// Columns returns all column names of current dao. +// Columns returns all column names of the current DAO. func (dao *AdminCashDao) Columns() AdminCashColumns { return dao.columns } -// Group returns the configuration group name of database of current dao. +// Group returns the database configuration group name of the current DAO. func (dao *AdminCashDao) Group() string { return dao.group } -// Ctx creates and returns the Model for current DAO, It automatically sets the context for current operation. +// Ctx creates and returns a Model for the current DAO. It automatically sets the context for the current operation. func (dao *AdminCashDao) Ctx(ctx context.Context) *gdb.Model { - return dao.DB().Model(dao.table).Safe().Ctx(ctx) + model := dao.DB().Model(dao.table) + for _, handler := range dao.handlers { + model = handler(model) + } + return model.Safe().Ctx(ctx) } // Transaction wraps the transaction logic using function f. -// It rollbacks the transaction and returns the error from function f if it returns non-nil error. +// It rolls back the transaction and returns the error if function f returns a non-nil error. // It commits the transaction and returns nil if function f returns nil. // -// Note that, you should not Commit or Rollback the transaction in function f +// Note: Do not commit or roll back the transaction in function f, // as it is automatically handled by this function. func (dao *AdminCashDao) Transaction(ctx context.Context, f func(ctx context.Context, tx gdb.TX) error) (err error) { return dao.Ctx(ctx).Transaction(ctx, f) diff --git a/server/internal/dao/internal/admin_credits_log.go b/server/internal/dao/internal/admin_credits_log.go index 86514e4..0b3602e 100755 --- a/server/internal/dao/internal/admin_credits_log.go +++ b/server/internal/dao/internal/admin_credits_log.go @@ -11,14 +11,15 @@ import ( "github.com/gogf/gf/v2/frame/g" ) -// AdminCreditsLogDao is the data access object for table hg_admin_credits_log. +// AdminCreditsLogDao is the data access object for the table hg_admin_credits_log. type AdminCreditsLogDao struct { - table string // table is the underlying table name of the DAO. - group string // group is the database configuration group name of current DAO. - columns AdminCreditsLogColumns // columns contains all the column names of Table for convenient usage. + table string // table is the underlying table name of the DAO. + group string // group is the database configuration group name of the current DAO. + columns AdminCreditsLogColumns // columns contains all the column names of Table for convenient usage. + handlers []gdb.ModelHandler // handlers for customized model modification. } -// AdminCreditsLogColumns defines and stores column names for table hg_admin_credits_log. +// AdminCreditsLogColumns defines and stores column names for the table hg_admin_credits_log. type AdminCreditsLogColumns struct { Id string // 变动ID MemberId string // 管理员ID @@ -37,7 +38,7 @@ type AdminCreditsLogColumns struct { UpdatedAt string // 修改时间 } -// adminCreditsLogColumns holds the columns for table hg_admin_credits_log. +// adminCreditsLogColumns holds the columns for the table hg_admin_credits_log. var adminCreditsLogColumns = AdminCreditsLogColumns{ Id: "id", MemberId: "member_id", @@ -57,44 +58,49 @@ var adminCreditsLogColumns = AdminCreditsLogColumns{ } // NewAdminCreditsLogDao creates and returns a new DAO object for table data access. -func NewAdminCreditsLogDao() *AdminCreditsLogDao { +func NewAdminCreditsLogDao(handlers ...gdb.ModelHandler) *AdminCreditsLogDao { return &AdminCreditsLogDao{ - group: "default", - table: "hg_admin_credits_log", - columns: adminCreditsLogColumns, + group: "default", + table: "hg_admin_credits_log", + columns: adminCreditsLogColumns, + handlers: handlers, } } -// DB retrieves and returns the underlying raw database management object of current DAO. +// DB retrieves and returns the underlying raw database management object of the current DAO. func (dao *AdminCreditsLogDao) DB() gdb.DB { return g.DB(dao.group) } -// Table returns the table name of current dao. +// Table returns the table name of the current DAO. func (dao *AdminCreditsLogDao) Table() string { return dao.table } -// Columns returns all column names of current dao. +// Columns returns all column names of the current DAO. func (dao *AdminCreditsLogDao) Columns() AdminCreditsLogColumns { return dao.columns } -// Group returns the configuration group name of database of current dao. +// Group returns the database configuration group name of the current DAO. func (dao *AdminCreditsLogDao) Group() string { return dao.group } -// Ctx creates and returns the Model for current DAO, It automatically sets the context for current operation. +// Ctx creates and returns a Model for the current DAO. It automatically sets the context for the current operation. func (dao *AdminCreditsLogDao) Ctx(ctx context.Context) *gdb.Model { - return dao.DB().Model(dao.table).Safe().Ctx(ctx) + model := dao.DB().Model(dao.table) + for _, handler := range dao.handlers { + model = handler(model) + } + return model.Safe().Ctx(ctx) } // Transaction wraps the transaction logic using function f. -// It rollbacks the transaction and returns the error from function f if it returns non-nil error. +// It rolls back the transaction and returns the error if function f returns a non-nil error. // It commits the transaction and returns nil if function f returns nil. // -// Note that, you should not Commit or Rollback the transaction in function f +// Note: Do not commit or roll back the transaction in function f, // as it is automatically handled by this function. func (dao *AdminCreditsLogDao) Transaction(ctx context.Context, f func(ctx context.Context, tx gdb.TX) error) (err error) { return dao.Ctx(ctx).Transaction(ctx, f) diff --git a/server/internal/dao/internal/admin_dept.go b/server/internal/dao/internal/admin_dept.go index addcf69..becb639 100755 --- a/server/internal/dao/internal/admin_dept.go +++ b/server/internal/dao/internal/admin_dept.go @@ -11,14 +11,15 @@ import ( "github.com/gogf/gf/v2/frame/g" ) -// AdminDeptDao is the data access object for table hg_admin_dept. +// AdminDeptDao is the data access object for the table hg_admin_dept. type AdminDeptDao struct { - table string // table is the underlying table name of the DAO. - group string // group is the database configuration group name of current DAO. - columns AdminDeptColumns // columns contains all the column names of Table for convenient usage. + table string // table is the underlying table name of the DAO. + group string // group is the database configuration group name of the current DAO. + columns AdminDeptColumns // columns contains all the column names of Table for convenient usage. + handlers []gdb.ModelHandler // handlers for customized model modification. } -// AdminDeptColumns defines and stores column names for table hg_admin_dept. +// AdminDeptColumns defines and stores column names for the table hg_admin_dept. type AdminDeptColumns struct { Id string // 部门ID Pid string // 父部门ID @@ -36,7 +37,7 @@ type AdminDeptColumns struct { UpdatedAt string // 更新时间 } -// adminDeptColumns holds the columns for table hg_admin_dept. +// adminDeptColumns holds the columns for the table hg_admin_dept. var adminDeptColumns = AdminDeptColumns{ Id: "id", Pid: "pid", @@ -55,44 +56,49 @@ var adminDeptColumns = AdminDeptColumns{ } // NewAdminDeptDao creates and returns a new DAO object for table data access. -func NewAdminDeptDao() *AdminDeptDao { +func NewAdminDeptDao(handlers ...gdb.ModelHandler) *AdminDeptDao { return &AdminDeptDao{ - group: "default", - table: "hg_admin_dept", - columns: adminDeptColumns, + group: "default", + table: "hg_admin_dept", + columns: adminDeptColumns, + handlers: handlers, } } -// DB retrieves and returns the underlying raw database management object of current DAO. +// DB retrieves and returns the underlying raw database management object of the current DAO. func (dao *AdminDeptDao) DB() gdb.DB { return g.DB(dao.group) } -// Table returns the table name of current dao. +// Table returns the table name of the current DAO. func (dao *AdminDeptDao) Table() string { return dao.table } -// Columns returns all column names of current dao. +// Columns returns all column names of the current DAO. func (dao *AdminDeptDao) Columns() AdminDeptColumns { return dao.columns } -// Group returns the configuration group name of database of current dao. +// Group returns the database configuration group name of the current DAO. func (dao *AdminDeptDao) Group() string { return dao.group } -// Ctx creates and returns the Model for current DAO, It automatically sets the context for current operation. +// Ctx creates and returns a Model for the current DAO. It automatically sets the context for the current operation. func (dao *AdminDeptDao) Ctx(ctx context.Context) *gdb.Model { - return dao.DB().Model(dao.table).Safe().Ctx(ctx) + model := dao.DB().Model(dao.table) + for _, handler := range dao.handlers { + model = handler(model) + } + return model.Safe().Ctx(ctx) } // Transaction wraps the transaction logic using function f. -// It rollbacks the transaction and returns the error from function f if it returns non-nil error. +// It rolls back the transaction and returns the error if function f returns a non-nil error. // It commits the transaction and returns nil if function f returns nil. // -// Note that, you should not Commit or Rollback the transaction in function f +// Note: Do not commit or roll back the transaction in function f, // as it is automatically handled by this function. func (dao *AdminDeptDao) Transaction(ctx context.Context, f func(ctx context.Context, tx gdb.TX) error) (err error) { return dao.Ctx(ctx).Transaction(ctx, f) diff --git a/server/internal/dao/internal/admin_member.go b/server/internal/dao/internal/admin_member.go index 98d5796..93ebaa7 100755 --- a/server/internal/dao/internal/admin_member.go +++ b/server/internal/dao/internal/admin_member.go @@ -11,14 +11,15 @@ import ( "github.com/gogf/gf/v2/frame/g" ) -// AdminMemberDao is the data access object for table hg_admin_member. +// AdminMemberDao is the data access object for the table hg_admin_member. type AdminMemberDao struct { - table string // table is the underlying table name of the DAO. - group string // group is the database configuration group name of current DAO. - columns AdminMemberColumns // columns contains all the column names of Table for convenient usage. + table string // table is the underlying table name of the DAO. + group string // group is the database configuration group name of the current DAO. + columns AdminMemberColumns // columns contains all the column names of Table for convenient usage. + handlers []gdb.ModelHandler // handlers for customized model modification. } -// AdminMemberColumns defines and stores column names for table hg_admin_member. +// AdminMemberColumns defines and stores column names for the table hg_admin_member. type AdminMemberColumns struct { Id string // 管理员ID DeptId string // 部门ID @@ -50,7 +51,7 @@ type AdminMemberColumns struct { UpdatedAt string // 修改时间 } -// adminMemberColumns holds the columns for table hg_admin_member. +// adminMemberColumns holds the columns for the table hg_admin_member. var adminMemberColumns = AdminMemberColumns{ Id: "id", DeptId: "dept_id", @@ -83,44 +84,49 @@ var adminMemberColumns = AdminMemberColumns{ } // NewAdminMemberDao creates and returns a new DAO object for table data access. -func NewAdminMemberDao() *AdminMemberDao { +func NewAdminMemberDao(handlers ...gdb.ModelHandler) *AdminMemberDao { return &AdminMemberDao{ - group: "default", - table: "hg_admin_member", - columns: adminMemberColumns, + group: "default", + table: "hg_admin_member", + columns: adminMemberColumns, + handlers: handlers, } } -// DB retrieves and returns the underlying raw database management object of current DAO. +// DB retrieves and returns the underlying raw database management object of the current DAO. func (dao *AdminMemberDao) DB() gdb.DB { return g.DB(dao.group) } -// Table returns the table name of current dao. +// Table returns the table name of the current DAO. func (dao *AdminMemberDao) Table() string { return dao.table } -// Columns returns all column names of current dao. +// Columns returns all column names of the current DAO. func (dao *AdminMemberDao) Columns() AdminMemberColumns { return dao.columns } -// Group returns the configuration group name of database of current dao. +// Group returns the database configuration group name of the current DAO. func (dao *AdminMemberDao) Group() string { return dao.group } -// Ctx creates and returns the Model for current DAO, It automatically sets the context for current operation. +// Ctx creates and returns a Model for the current DAO. It automatically sets the context for the current operation. func (dao *AdminMemberDao) Ctx(ctx context.Context) *gdb.Model { - return dao.DB().Model(dao.table).Safe().Ctx(ctx) + model := dao.DB().Model(dao.table) + for _, handler := range dao.handlers { + model = handler(model) + } + return model.Safe().Ctx(ctx) } // Transaction wraps the transaction logic using function f. -// It rollbacks the transaction and returns the error from function f if it returns non-nil error. +// It rolls back the transaction and returns the error if function f returns a non-nil error. // It commits the transaction and returns nil if function f returns nil. // -// Note that, you should not Commit or Rollback the transaction in function f +// Note: Do not commit or roll back the transaction in function f, // as it is automatically handled by this function. func (dao *AdminMemberDao) Transaction(ctx context.Context, f func(ctx context.Context, tx gdb.TX) error) (err error) { return dao.Ctx(ctx).Transaction(ctx, f) diff --git a/server/internal/dao/internal/admin_member_post.go b/server/internal/dao/internal/admin_member_post.go index be5a754..8a30c9e 100755 --- a/server/internal/dao/internal/admin_member_post.go +++ b/server/internal/dao/internal/admin_member_post.go @@ -11,64 +11,70 @@ import ( "github.com/gogf/gf/v2/frame/g" ) -// AdminMemberPostDao is the data access object for table hg_admin_member_post. +// AdminMemberPostDao is the data access object for the table hg_admin_member_post. type AdminMemberPostDao struct { - table string // table is the underlying table name of the DAO. - group string // group is the database configuration group name of current DAO. - columns AdminMemberPostColumns // columns contains all the column names of Table for convenient usage. + table string // table is the underlying table name of the DAO. + group string // group is the database configuration group name of the current DAO. + columns AdminMemberPostColumns // columns contains all the column names of Table for convenient usage. + handlers []gdb.ModelHandler // handlers for customized model modification. } -// AdminMemberPostColumns defines and stores column names for table hg_admin_member_post. +// AdminMemberPostColumns defines and stores column names for the table hg_admin_member_post. type AdminMemberPostColumns struct { MemberId string // 管理员ID PostId string // 岗位ID } -// adminMemberPostColumns holds the columns for table hg_admin_member_post. +// adminMemberPostColumns holds the columns for the table hg_admin_member_post. var adminMemberPostColumns = AdminMemberPostColumns{ MemberId: "member_id", PostId: "post_id", } // NewAdminMemberPostDao creates and returns a new DAO object for table data access. -func NewAdminMemberPostDao() *AdminMemberPostDao { +func NewAdminMemberPostDao(handlers ...gdb.ModelHandler) *AdminMemberPostDao { return &AdminMemberPostDao{ - group: "default", - table: "hg_admin_member_post", - columns: adminMemberPostColumns, + group: "default", + table: "hg_admin_member_post", + columns: adminMemberPostColumns, + handlers: handlers, } } -// DB retrieves and returns the underlying raw database management object of current DAO. +// DB retrieves and returns the underlying raw database management object of the current DAO. func (dao *AdminMemberPostDao) DB() gdb.DB { return g.DB(dao.group) } -// Table returns the table name of current dao. +// Table returns the table name of the current DAO. func (dao *AdminMemberPostDao) Table() string { return dao.table } -// Columns returns all column names of current dao. +// Columns returns all column names of the current DAO. func (dao *AdminMemberPostDao) Columns() AdminMemberPostColumns { return dao.columns } -// Group returns the configuration group name of database of current dao. +// Group returns the database configuration group name of the current DAO. func (dao *AdminMemberPostDao) Group() string { return dao.group } -// Ctx creates and returns the Model for current DAO, It automatically sets the context for current operation. +// Ctx creates and returns a Model for the current DAO. It automatically sets the context for the current operation. func (dao *AdminMemberPostDao) Ctx(ctx context.Context) *gdb.Model { - return dao.DB().Model(dao.table).Safe().Ctx(ctx) + model := dao.DB().Model(dao.table) + for _, handler := range dao.handlers { + model = handler(model) + } + return model.Safe().Ctx(ctx) } // Transaction wraps the transaction logic using function f. -// It rollbacks the transaction and returns the error from function f if it returns non-nil error. +// It rolls back the transaction and returns the error if function f returns a non-nil error. // It commits the transaction and returns nil if function f returns nil. // -// Note that, you should not Commit or Rollback the transaction in function f +// Note: Do not commit or roll back the transaction in function f, // as it is automatically handled by this function. func (dao *AdminMemberPostDao) Transaction(ctx context.Context, f func(ctx context.Context, tx gdb.TX) error) (err error) { return dao.Ctx(ctx).Transaction(ctx, f) diff --git a/server/internal/dao/internal/admin_member_role.go b/server/internal/dao/internal/admin_member_role.go index e62f5c8..094d663 100755 --- a/server/internal/dao/internal/admin_member_role.go +++ b/server/internal/dao/internal/admin_member_role.go @@ -11,64 +11,70 @@ import ( "github.com/gogf/gf/v2/frame/g" ) -// AdminMemberRoleDao is the data access object for table hg_admin_member_role. +// AdminMemberRoleDao is the data access object for the table hg_admin_member_role. type AdminMemberRoleDao struct { - table string // table is the underlying table name of the DAO. - group string // group is the database configuration group name of current DAO. - columns AdminMemberRoleColumns // columns contains all the column names of Table for convenient usage. + table string // table is the underlying table name of the DAO. + group string // group is the database configuration group name of the current DAO. + columns AdminMemberRoleColumns // columns contains all the column names of Table for convenient usage. + handlers []gdb.ModelHandler // handlers for customized model modification. } -// AdminMemberRoleColumns defines and stores column names for table hg_admin_member_role. +// AdminMemberRoleColumns defines and stores column names for the table hg_admin_member_role. type AdminMemberRoleColumns struct { MemberId string // 管理员ID RoleId string // 角色ID } -// adminMemberRoleColumns holds the columns for table hg_admin_member_role. +// adminMemberRoleColumns holds the columns for the table hg_admin_member_role. var adminMemberRoleColumns = AdminMemberRoleColumns{ MemberId: "member_id", RoleId: "role_id", } // NewAdminMemberRoleDao creates and returns a new DAO object for table data access. -func NewAdminMemberRoleDao() *AdminMemberRoleDao { +func NewAdminMemberRoleDao(handlers ...gdb.ModelHandler) *AdminMemberRoleDao { return &AdminMemberRoleDao{ - group: "default", - table: "hg_admin_member_role", - columns: adminMemberRoleColumns, + group: "default", + table: "hg_admin_member_role", + columns: adminMemberRoleColumns, + handlers: handlers, } } -// DB retrieves and returns the underlying raw database management object of current DAO. +// DB retrieves and returns the underlying raw database management object of the current DAO. func (dao *AdminMemberRoleDao) DB() gdb.DB { return g.DB(dao.group) } -// Table returns the table name of current dao. +// Table returns the table name of the current DAO. func (dao *AdminMemberRoleDao) Table() string { return dao.table } -// Columns returns all column names of current dao. +// Columns returns all column names of the current DAO. func (dao *AdminMemberRoleDao) Columns() AdminMemberRoleColumns { return dao.columns } -// Group returns the configuration group name of database of current dao. +// Group returns the database configuration group name of the current DAO. func (dao *AdminMemberRoleDao) Group() string { return dao.group } -// Ctx creates and returns the Model for current DAO, It automatically sets the context for current operation. +// Ctx creates and returns a Model for the current DAO. It automatically sets the context for the current operation. func (dao *AdminMemberRoleDao) Ctx(ctx context.Context) *gdb.Model { - return dao.DB().Model(dao.table).Safe().Ctx(ctx) + model := dao.DB().Model(dao.table) + for _, handler := range dao.handlers { + model = handler(model) + } + return model.Safe().Ctx(ctx) } // Transaction wraps the transaction logic using function f. -// It rollbacks the transaction and returns the error from function f if it returns non-nil error. +// It rolls back the transaction and returns the error if function f returns a non-nil error. // It commits the transaction and returns nil if function f returns nil. // -// Note that, you should not Commit or Rollback the transaction in function f +// Note: Do not commit or roll back the transaction in function f, // as it is automatically handled by this function. func (dao *AdminMemberRoleDao) Transaction(ctx context.Context, f func(ctx context.Context, tx gdb.TX) error) (err error) { return dao.Ctx(ctx).Transaction(ctx, f) diff --git a/server/internal/dao/internal/admin_menu.go b/server/internal/dao/internal/admin_menu.go index 9a5202a..3312718 100755 --- a/server/internal/dao/internal/admin_menu.go +++ b/server/internal/dao/internal/admin_menu.go @@ -11,14 +11,15 @@ import ( "github.com/gogf/gf/v2/frame/g" ) -// AdminMenuDao is the data access object for table hg_admin_menu. +// AdminMenuDao is the data access object for the table hg_admin_menu. type AdminMenuDao struct { - table string // table is the underlying table name of the DAO. - group string // group is the database configuration group name of current DAO. - columns AdminMenuColumns // columns contains all the column names of Table for convenient usage. + table string // table is the underlying table name of the DAO. + group string // group is the database configuration group name of the current DAO. + columns AdminMenuColumns // columns contains all the column names of Table for convenient usage. + handlers []gdb.ModelHandler // handlers for customized model modification. } -// AdminMenuColumns defines and stores column names for table hg_admin_menu. +// AdminMenuColumns defines and stores column names for the table hg_admin_menu. type AdminMenuColumns struct { Id string // 菜单ID Pid string // 父菜单ID @@ -48,7 +49,7 @@ type AdminMenuColumns struct { CreatedAt string // 创建时间 } -// adminMenuColumns holds the columns for table hg_admin_menu. +// adminMenuColumns holds the columns for the table hg_admin_menu. var adminMenuColumns = AdminMenuColumns{ Id: "id", Pid: "pid", @@ -79,44 +80,49 @@ var adminMenuColumns = AdminMenuColumns{ } // NewAdminMenuDao creates and returns a new DAO object for table data access. -func NewAdminMenuDao() *AdminMenuDao { +func NewAdminMenuDao(handlers ...gdb.ModelHandler) *AdminMenuDao { return &AdminMenuDao{ - group: "default", - table: "hg_admin_menu", - columns: adminMenuColumns, + group: "default", + table: "hg_admin_menu", + columns: adminMenuColumns, + handlers: handlers, } } -// DB retrieves and returns the underlying raw database management object of current DAO. +// DB retrieves and returns the underlying raw database management object of the current DAO. func (dao *AdminMenuDao) DB() gdb.DB { return g.DB(dao.group) } -// Table returns the table name of current dao. +// Table returns the table name of the current DAO. func (dao *AdminMenuDao) Table() string { return dao.table } -// Columns returns all column names of current dao. +// Columns returns all column names of the current DAO. func (dao *AdminMenuDao) Columns() AdminMenuColumns { return dao.columns } -// Group returns the configuration group name of database of current dao. +// Group returns the database configuration group name of the current DAO. func (dao *AdminMenuDao) Group() string { return dao.group } -// Ctx creates and returns the Model for current DAO, It automatically sets the context for current operation. +// Ctx creates and returns a Model for the current DAO. It automatically sets the context for the current operation. func (dao *AdminMenuDao) Ctx(ctx context.Context) *gdb.Model { - return dao.DB().Model(dao.table).Safe().Ctx(ctx) + model := dao.DB().Model(dao.table) + for _, handler := range dao.handlers { + model = handler(model) + } + return model.Safe().Ctx(ctx) } // Transaction wraps the transaction logic using function f. -// It rollbacks the transaction and returns the error from function f if it returns non-nil error. +// It rolls back the transaction and returns the error if function f returns a non-nil error. // It commits the transaction and returns nil if function f returns nil. // -// Note that, you should not Commit or Rollback the transaction in function f +// Note: Do not commit or roll back the transaction in function f, // as it is automatically handled by this function. func (dao *AdminMenuDao) Transaction(ctx context.Context, f func(ctx context.Context, tx gdb.TX) error) (err error) { return dao.Ctx(ctx).Transaction(ctx, f) diff --git a/server/internal/dao/internal/admin_notice.go b/server/internal/dao/internal/admin_notice.go index cc0bd06..ecb0cb9 100755 --- a/server/internal/dao/internal/admin_notice.go +++ b/server/internal/dao/internal/admin_notice.go @@ -11,14 +11,15 @@ import ( "github.com/gogf/gf/v2/frame/g" ) -// AdminNoticeDao is the data access object for table hg_admin_notice. +// AdminNoticeDao is the data access object for the table hg_admin_notice. type AdminNoticeDao struct { - table string // table is the underlying table name of the DAO. - group string // group is the database configuration group name of current DAO. - columns AdminNoticeColumns // columns contains all the column names of Table for convenient usage. + table string // table is the underlying table name of the DAO. + group string // group is the database configuration group name of the current DAO. + columns AdminNoticeColumns // columns contains all the column names of Table for convenient usage. + handlers []gdb.ModelHandler // handlers for customized model modification. } -// AdminNoticeColumns defines and stores column names for table hg_admin_notice. +// AdminNoticeColumns defines and stores column names for the table hg_admin_notice. type AdminNoticeColumns struct { Id string // 公告ID Title string // 公告标题 @@ -36,7 +37,7 @@ type AdminNoticeColumns struct { DeletedAt string // 删除时间 } -// adminNoticeColumns holds the columns for table hg_admin_notice. +// adminNoticeColumns holds the columns for the table hg_admin_notice. var adminNoticeColumns = AdminNoticeColumns{ Id: "id", Title: "title", @@ -55,44 +56,49 @@ var adminNoticeColumns = AdminNoticeColumns{ } // NewAdminNoticeDao creates and returns a new DAO object for table data access. -func NewAdminNoticeDao() *AdminNoticeDao { +func NewAdminNoticeDao(handlers ...gdb.ModelHandler) *AdminNoticeDao { return &AdminNoticeDao{ - group: "default", - table: "hg_admin_notice", - columns: adminNoticeColumns, + group: "default", + table: "hg_admin_notice", + columns: adminNoticeColumns, + handlers: handlers, } } -// DB retrieves and returns the underlying raw database management object of current DAO. +// DB retrieves and returns the underlying raw database management object of the current DAO. func (dao *AdminNoticeDao) DB() gdb.DB { return g.DB(dao.group) } -// Table returns the table name of current dao. +// Table returns the table name of the current DAO. func (dao *AdminNoticeDao) Table() string { return dao.table } -// Columns returns all column names of current dao. +// Columns returns all column names of the current DAO. func (dao *AdminNoticeDao) Columns() AdminNoticeColumns { return dao.columns } -// Group returns the configuration group name of database of current dao. +// Group returns the database configuration group name of the current DAO. func (dao *AdminNoticeDao) Group() string { return dao.group } -// Ctx creates and returns the Model for current DAO, It automatically sets the context for current operation. +// Ctx creates and returns a Model for the current DAO. It automatically sets the context for the current operation. func (dao *AdminNoticeDao) Ctx(ctx context.Context) *gdb.Model { - return dao.DB().Model(dao.table).Safe().Ctx(ctx) + model := dao.DB().Model(dao.table) + for _, handler := range dao.handlers { + model = handler(model) + } + return model.Safe().Ctx(ctx) } // Transaction wraps the transaction logic using function f. -// It rollbacks the transaction and returns the error from function f if it returns non-nil error. +// It rolls back the transaction and returns the error if function f returns a non-nil error. // It commits the transaction and returns nil if function f returns nil. // -// Note that, you should not Commit or Rollback the transaction in function f +// Note: Do not commit or roll back the transaction in function f, // as it is automatically handled by this function. func (dao *AdminNoticeDao) Transaction(ctx context.Context, f func(ctx context.Context, tx gdb.TX) error) (err error) { return dao.Ctx(ctx).Transaction(ctx, f) diff --git a/server/internal/dao/internal/admin_notice_read.go b/server/internal/dao/internal/admin_notice_read.go index 6a25522..2ee0f7b 100755 --- a/server/internal/dao/internal/admin_notice_read.go +++ b/server/internal/dao/internal/admin_notice_read.go @@ -11,14 +11,15 @@ import ( "github.com/gogf/gf/v2/frame/g" ) -// AdminNoticeReadDao is the data access object for table hg_admin_notice_read. +// AdminNoticeReadDao is the data access object for the table hg_admin_notice_read. type AdminNoticeReadDao struct { - table string // table is the underlying table name of the DAO. - group string // group is the database configuration group name of current DAO. - columns AdminNoticeReadColumns // columns contains all the column names of Table for convenient usage. + table string // table is the underlying table name of the DAO. + group string // group is the database configuration group name of the current DAO. + columns AdminNoticeReadColumns // columns contains all the column names of Table for convenient usage. + handlers []gdb.ModelHandler // handlers for customized model modification. } -// AdminNoticeReadColumns defines and stores column names for table hg_admin_notice_read. +// AdminNoticeReadColumns defines and stores column names for the table hg_admin_notice_read. type AdminNoticeReadColumns struct { Id string // 记录ID NoticeId string // 公告ID @@ -28,7 +29,7 @@ type AdminNoticeReadColumns struct { CreatedAt string // 阅读时间 } -// adminNoticeReadColumns holds the columns for table hg_admin_notice_read. +// adminNoticeReadColumns holds the columns for the table hg_admin_notice_read. var adminNoticeReadColumns = AdminNoticeReadColumns{ Id: "id", NoticeId: "notice_id", @@ -39,44 +40,49 @@ var adminNoticeReadColumns = AdminNoticeReadColumns{ } // NewAdminNoticeReadDao creates and returns a new DAO object for table data access. -func NewAdminNoticeReadDao() *AdminNoticeReadDao { +func NewAdminNoticeReadDao(handlers ...gdb.ModelHandler) *AdminNoticeReadDao { return &AdminNoticeReadDao{ - group: "default", - table: "hg_admin_notice_read", - columns: adminNoticeReadColumns, + group: "default", + table: "hg_admin_notice_read", + columns: adminNoticeReadColumns, + handlers: handlers, } } -// DB retrieves and returns the underlying raw database management object of current DAO. +// DB retrieves and returns the underlying raw database management object of the current DAO. func (dao *AdminNoticeReadDao) DB() gdb.DB { return g.DB(dao.group) } -// Table returns the table name of current dao. +// Table returns the table name of the current DAO. func (dao *AdminNoticeReadDao) Table() string { return dao.table } -// Columns returns all column names of current dao. +// Columns returns all column names of the current DAO. func (dao *AdminNoticeReadDao) Columns() AdminNoticeReadColumns { return dao.columns } -// Group returns the configuration group name of database of current dao. +// Group returns the database configuration group name of the current DAO. func (dao *AdminNoticeReadDao) Group() string { return dao.group } -// Ctx creates and returns the Model for current DAO, It automatically sets the context for current operation. +// Ctx creates and returns a Model for the current DAO. It automatically sets the context for the current operation. func (dao *AdminNoticeReadDao) Ctx(ctx context.Context) *gdb.Model { - return dao.DB().Model(dao.table).Safe().Ctx(ctx) + model := dao.DB().Model(dao.table) + for _, handler := range dao.handlers { + model = handler(model) + } + return model.Safe().Ctx(ctx) } // Transaction wraps the transaction logic using function f. -// It rollbacks the transaction and returns the error from function f if it returns non-nil error. +// It rolls back the transaction and returns the error if function f returns a non-nil error. // It commits the transaction and returns nil if function f returns nil. // -// Note that, you should not Commit or Rollback the transaction in function f +// Note: Do not commit or roll back the transaction in function f, // as it is automatically handled by this function. func (dao *AdminNoticeReadDao) Transaction(ctx context.Context, f func(ctx context.Context, tx gdb.TX) error) (err error) { return dao.Ctx(ctx).Transaction(ctx, f) diff --git a/server/internal/dao/internal/admin_oauth.go b/server/internal/dao/internal/admin_oauth.go index b3a9330..f812ac6 100755 --- a/server/internal/dao/internal/admin_oauth.go +++ b/server/internal/dao/internal/admin_oauth.go @@ -11,14 +11,15 @@ import ( "github.com/gogf/gf/v2/frame/g" ) -// AdminOauthDao is the data access object for table hg_admin_oauth. +// AdminOauthDao is the data access object for the table hg_admin_oauth. type AdminOauthDao struct { - table string // table is the underlying table name of the DAO. - group string // group is the database configuration group name of current DAO. - columns AdminOauthColumns // columns contains all the column names of Table for convenient usage. + table string // table is the underlying table name of the DAO. + group string // group is the database configuration group name of the current DAO. + columns AdminOauthColumns // columns contains all the column names of Table for convenient usage. + handlers []gdb.ModelHandler // handlers for customized model modification. } -// AdminOauthColumns defines and stores column names for table hg_admin_oauth. +// AdminOauthColumns defines and stores column names for the table hg_admin_oauth. type AdminOauthColumns struct { Id string // 主键 MemberId string // 用户ID @@ -37,7 +38,7 @@ type AdminOauthColumns struct { UpdatedAt string // 修改时间 } -// adminOauthColumns holds the columns for table hg_admin_oauth. +// adminOauthColumns holds the columns for the table hg_admin_oauth. var adminOauthColumns = AdminOauthColumns{ Id: "id", MemberId: "member_id", @@ -57,44 +58,49 @@ var adminOauthColumns = AdminOauthColumns{ } // NewAdminOauthDao creates and returns a new DAO object for table data access. -func NewAdminOauthDao() *AdminOauthDao { +func NewAdminOauthDao(handlers ...gdb.ModelHandler) *AdminOauthDao { return &AdminOauthDao{ - group: "default", - table: "hg_admin_oauth", - columns: adminOauthColumns, + group: "default", + table: "hg_admin_oauth", + columns: adminOauthColumns, + handlers: handlers, } } -// DB retrieves and returns the underlying raw database management object of current DAO. +// DB retrieves and returns the underlying raw database management object of the current DAO. func (dao *AdminOauthDao) DB() gdb.DB { return g.DB(dao.group) } -// Table returns the table name of current dao. +// Table returns the table name of the current DAO. func (dao *AdminOauthDao) Table() string { return dao.table } -// Columns returns all column names of current dao. +// Columns returns all column names of the current DAO. func (dao *AdminOauthDao) Columns() AdminOauthColumns { return dao.columns } -// Group returns the configuration group name of database of current dao. +// Group returns the database configuration group name of the current DAO. func (dao *AdminOauthDao) Group() string { return dao.group } -// Ctx creates and returns the Model for current DAO, It automatically sets the context for current operation. +// Ctx creates and returns a Model for the current DAO. It automatically sets the context for the current operation. func (dao *AdminOauthDao) Ctx(ctx context.Context) *gdb.Model { - return dao.DB().Model(dao.table).Safe().Ctx(ctx) + model := dao.DB().Model(dao.table) + for _, handler := range dao.handlers { + model = handler(model) + } + return model.Safe().Ctx(ctx) } // Transaction wraps the transaction logic using function f. -// It rollbacks the transaction and returns the error from function f if it returns non-nil error. +// It rolls back the transaction and returns the error if function f returns a non-nil error. // It commits the transaction and returns nil if function f returns nil. // -// Note that, you should not Commit or Rollback the transaction in function f +// Note: Do not commit or roll back the transaction in function f, // as it is automatically handled by this function. func (dao *AdminOauthDao) Transaction(ctx context.Context, f func(ctx context.Context, tx gdb.TX) error) (err error) { return dao.Ctx(ctx).Transaction(ctx, f) diff --git a/server/internal/dao/internal/admin_order.go b/server/internal/dao/internal/admin_order.go index 101af57..8b3df6f 100755 --- a/server/internal/dao/internal/admin_order.go +++ b/server/internal/dao/internal/admin_order.go @@ -11,14 +11,15 @@ import ( "github.com/gogf/gf/v2/frame/g" ) -// AdminOrderDao is the data access object for table hg_admin_order. +// AdminOrderDao is the data access object for the table hg_admin_order. type AdminOrderDao struct { - table string // table is the underlying table name of the DAO. - group string // group is the database configuration group name of current DAO. - columns AdminOrderColumns // columns contains all the column names of Table for convenient usage. + table string // table is the underlying table name of the DAO. + group string // group is the database configuration group name of the current DAO. + columns AdminOrderColumns // columns contains all the column names of Table for convenient usage. + handlers []gdb.ModelHandler // handlers for customized model modification. } -// AdminOrderColumns defines and stores column names for table hg_admin_order. +// AdminOrderColumns defines and stores column names for the table hg_admin_order. type AdminOrderColumns struct { Id string // 主键 MemberId string // 管理员id @@ -34,7 +35,7 @@ type AdminOrderColumns struct { UpdatedAt string // 修改时间 } -// adminOrderColumns holds the columns for table hg_admin_order. +// adminOrderColumns holds the columns for the table hg_admin_order. var adminOrderColumns = AdminOrderColumns{ Id: "id", MemberId: "member_id", @@ -51,44 +52,49 @@ var adminOrderColumns = AdminOrderColumns{ } // NewAdminOrderDao creates and returns a new DAO object for table data access. -func NewAdminOrderDao() *AdminOrderDao { +func NewAdminOrderDao(handlers ...gdb.ModelHandler) *AdminOrderDao { return &AdminOrderDao{ - group: "default", - table: "hg_admin_order", - columns: adminOrderColumns, + group: "default", + table: "hg_admin_order", + columns: adminOrderColumns, + handlers: handlers, } } -// DB retrieves and returns the underlying raw database management object of current DAO. +// DB retrieves and returns the underlying raw database management object of the current DAO. func (dao *AdminOrderDao) DB() gdb.DB { return g.DB(dao.group) } -// Table returns the table name of current dao. +// Table returns the table name of the current DAO. func (dao *AdminOrderDao) Table() string { return dao.table } -// Columns returns all column names of current dao. +// Columns returns all column names of the current DAO. func (dao *AdminOrderDao) Columns() AdminOrderColumns { return dao.columns } -// Group returns the configuration group name of database of current dao. +// Group returns the database configuration group name of the current DAO. func (dao *AdminOrderDao) Group() string { return dao.group } -// Ctx creates and returns the Model for current DAO, It automatically sets the context for current operation. +// Ctx creates and returns a Model for the current DAO. It automatically sets the context for the current operation. func (dao *AdminOrderDao) Ctx(ctx context.Context) *gdb.Model { - return dao.DB().Model(dao.table).Safe().Ctx(ctx) + model := dao.DB().Model(dao.table) + for _, handler := range dao.handlers { + model = handler(model) + } + return model.Safe().Ctx(ctx) } // Transaction wraps the transaction logic using function f. -// It rollbacks the transaction and returns the error from function f if it returns non-nil error. +// It rolls back the transaction and returns the error if function f returns a non-nil error. // It commits the transaction and returns nil if function f returns nil. // -// Note that, you should not Commit or Rollback the transaction in function f +// Note: Do not commit or roll back the transaction in function f, // as it is automatically handled by this function. func (dao *AdminOrderDao) Transaction(ctx context.Context, f func(ctx context.Context, tx gdb.TX) error) (err error) { return dao.Ctx(ctx).Transaction(ctx, f) diff --git a/server/internal/dao/internal/admin_post.go b/server/internal/dao/internal/admin_post.go index 0c590e3..986103d 100755 --- a/server/internal/dao/internal/admin_post.go +++ b/server/internal/dao/internal/admin_post.go @@ -11,14 +11,15 @@ import ( "github.com/gogf/gf/v2/frame/g" ) -// AdminPostDao is the data access object for table hg_admin_post. +// AdminPostDao is the data access object for the table hg_admin_post. type AdminPostDao struct { - table string // table is the underlying table name of the DAO. - group string // group is the database configuration group name of current DAO. - columns AdminPostColumns // columns contains all the column names of Table for convenient usage. + table string // table is the underlying table name of the DAO. + group string // group is the database configuration group name of the current DAO. + columns AdminPostColumns // columns contains all the column names of Table for convenient usage. + handlers []gdb.ModelHandler // handlers for customized model modification. } -// AdminPostColumns defines and stores column names for table hg_admin_post. +// AdminPostColumns defines and stores column names for the table hg_admin_post. type AdminPostColumns struct { Id string // 岗位ID Code string // 岗位编码 @@ -30,7 +31,7 @@ type AdminPostColumns struct { UpdatedAt string // 更新时间 } -// adminPostColumns holds the columns for table hg_admin_post. +// adminPostColumns holds the columns for the table hg_admin_post. var adminPostColumns = AdminPostColumns{ Id: "id", Code: "code", @@ -43,44 +44,49 @@ var adminPostColumns = AdminPostColumns{ } // NewAdminPostDao creates and returns a new DAO object for table data access. -func NewAdminPostDao() *AdminPostDao { +func NewAdminPostDao(handlers ...gdb.ModelHandler) *AdminPostDao { return &AdminPostDao{ - group: "default", - table: "hg_admin_post", - columns: adminPostColumns, + group: "default", + table: "hg_admin_post", + columns: adminPostColumns, + handlers: handlers, } } -// DB retrieves and returns the underlying raw database management object of current DAO. +// DB retrieves and returns the underlying raw database management object of the current DAO. func (dao *AdminPostDao) DB() gdb.DB { return g.DB(dao.group) } -// Table returns the table name of current dao. +// Table returns the table name of the current DAO. func (dao *AdminPostDao) Table() string { return dao.table } -// Columns returns all column names of current dao. +// Columns returns all column names of the current DAO. func (dao *AdminPostDao) Columns() AdminPostColumns { return dao.columns } -// Group returns the configuration group name of database of current dao. +// Group returns the database configuration group name of the current DAO. func (dao *AdminPostDao) Group() string { return dao.group } -// Ctx creates and returns the Model for current DAO, It automatically sets the context for current operation. +// Ctx creates and returns a Model for the current DAO. It automatically sets the context for the current operation. func (dao *AdminPostDao) Ctx(ctx context.Context) *gdb.Model { - return dao.DB().Model(dao.table).Safe().Ctx(ctx) + model := dao.DB().Model(dao.table) + for _, handler := range dao.handlers { + model = handler(model) + } + return model.Safe().Ctx(ctx) } // Transaction wraps the transaction logic using function f. -// It rollbacks the transaction and returns the error from function f if it returns non-nil error. +// It rolls back the transaction and returns the error if function f returns a non-nil error. // It commits the transaction and returns nil if function f returns nil. // -// Note that, you should not Commit or Rollback the transaction in function f +// Note: Do not commit or roll back the transaction in function f, // as it is automatically handled by this function. func (dao *AdminPostDao) Transaction(ctx context.Context, f func(ctx context.Context, tx gdb.TX) error) (err error) { return dao.Ctx(ctx).Transaction(ctx, f) diff --git a/server/internal/dao/internal/admin_role.go b/server/internal/dao/internal/admin_role.go index 5e5e16f..6d8a324 100755 --- a/server/internal/dao/internal/admin_role.go +++ b/server/internal/dao/internal/admin_role.go @@ -11,14 +11,15 @@ import ( "github.com/gogf/gf/v2/frame/g" ) -// AdminRoleDao is the data access object for table hg_admin_role. +// AdminRoleDao is the data access object for the table hg_admin_role. type AdminRoleDao struct { - table string // table is the underlying table name of the DAO. - group string // group is the database configuration group name of current DAO. - columns AdminRoleColumns // columns contains all the column names of Table for convenient usage. + table string // table is the underlying table name of the DAO. + group string // group is the database configuration group name of the current DAO. + columns AdminRoleColumns // columns contains all the column names of Table for convenient usage. + handlers []gdb.ModelHandler // handlers for customized model modification. } -// AdminRoleColumns defines and stores column names for table hg_admin_role. +// AdminRoleColumns defines and stores column names for the table hg_admin_role. type AdminRoleColumns struct { Id string // 角色ID Name string // 角色名称 @@ -35,7 +36,7 @@ type AdminRoleColumns struct { UpdatedAt string // 更新时间 } -// adminRoleColumns holds the columns for table hg_admin_role. +// adminRoleColumns holds the columns for the table hg_admin_role. var adminRoleColumns = AdminRoleColumns{ Id: "id", Name: "name", @@ -53,44 +54,49 @@ var adminRoleColumns = AdminRoleColumns{ } // NewAdminRoleDao creates and returns a new DAO object for table data access. -func NewAdminRoleDao() *AdminRoleDao { +func NewAdminRoleDao(handlers ...gdb.ModelHandler) *AdminRoleDao { return &AdminRoleDao{ - group: "default", - table: "hg_admin_role", - columns: adminRoleColumns, + group: "default", + table: "hg_admin_role", + columns: adminRoleColumns, + handlers: handlers, } } -// DB retrieves and returns the underlying raw database management object of current DAO. +// DB retrieves and returns the underlying raw database management object of the current DAO. func (dao *AdminRoleDao) DB() gdb.DB { return g.DB(dao.group) } -// Table returns the table name of current dao. +// Table returns the table name of the current DAO. func (dao *AdminRoleDao) Table() string { return dao.table } -// Columns returns all column names of current dao. +// Columns returns all column names of the current DAO. func (dao *AdminRoleDao) Columns() AdminRoleColumns { return dao.columns } -// Group returns the configuration group name of database of current dao. +// Group returns the database configuration group name of the current DAO. func (dao *AdminRoleDao) Group() string { return dao.group } -// Ctx creates and returns the Model for current DAO, It automatically sets the context for current operation. +// Ctx creates and returns a Model for the current DAO. It automatically sets the context for the current operation. func (dao *AdminRoleDao) Ctx(ctx context.Context) *gdb.Model { - return dao.DB().Model(dao.table).Safe().Ctx(ctx) + model := dao.DB().Model(dao.table) + for _, handler := range dao.handlers { + model = handler(model) + } + return model.Safe().Ctx(ctx) } // Transaction wraps the transaction logic using function f. -// It rollbacks the transaction and returns the error from function f if it returns non-nil error. +// It rolls back the transaction and returns the error if function f returns a non-nil error. // It commits the transaction and returns nil if function f returns nil. // -// Note that, you should not Commit or Rollback the transaction in function f +// Note: Do not commit or roll back the transaction in function f, // as it is automatically handled by this function. func (dao *AdminRoleDao) Transaction(ctx context.Context, f func(ctx context.Context, tx gdb.TX) error) (err error) { return dao.Ctx(ctx).Transaction(ctx, f) diff --git a/server/internal/dao/internal/admin_role_casbin.go b/server/internal/dao/internal/admin_role_casbin.go index 257ccf7..e00b886 100755 --- a/server/internal/dao/internal/admin_role_casbin.go +++ b/server/internal/dao/internal/admin_role_casbin.go @@ -11,14 +11,15 @@ import ( "github.com/gogf/gf/v2/frame/g" ) -// AdminRoleCasbinDao is the data access object for table hg_admin_role_casbin. +// AdminRoleCasbinDao is the data access object for the table hg_admin_role_casbin. type AdminRoleCasbinDao struct { - table string // table is the underlying table name of the DAO. - group string // group is the database configuration group name of current DAO. - columns AdminRoleCasbinColumns // columns contains all the column names of Table for convenient usage. + table string // table is the underlying table name of the DAO. + group string // group is the database configuration group name of the current DAO. + columns AdminRoleCasbinColumns // columns contains all the column names of Table for convenient usage. + handlers []gdb.ModelHandler // handlers for customized model modification. } -// AdminRoleCasbinColumns defines and stores column names for table hg_admin_role_casbin. +// AdminRoleCasbinColumns defines and stores column names for the table hg_admin_role_casbin. type AdminRoleCasbinColumns struct { Id string // PType string // @@ -30,7 +31,7 @@ type AdminRoleCasbinColumns struct { V5 string // } -// adminRoleCasbinColumns holds the columns for table hg_admin_role_casbin. +// adminRoleCasbinColumns holds the columns for the table hg_admin_role_casbin. var adminRoleCasbinColumns = AdminRoleCasbinColumns{ Id: "id", PType: "p_type", @@ -43,44 +44,49 @@ var adminRoleCasbinColumns = AdminRoleCasbinColumns{ } // NewAdminRoleCasbinDao creates and returns a new DAO object for table data access. -func NewAdminRoleCasbinDao() *AdminRoleCasbinDao { +func NewAdminRoleCasbinDao(handlers ...gdb.ModelHandler) *AdminRoleCasbinDao { return &AdminRoleCasbinDao{ - group: "default", - table: "hg_admin_role_casbin", - columns: adminRoleCasbinColumns, + group: "default", + table: "hg_admin_role_casbin", + columns: adminRoleCasbinColumns, + handlers: handlers, } } -// DB retrieves and returns the underlying raw database management object of current DAO. +// DB retrieves and returns the underlying raw database management object of the current DAO. func (dao *AdminRoleCasbinDao) DB() gdb.DB { return g.DB(dao.group) } -// Table returns the table name of current dao. +// Table returns the table name of the current DAO. func (dao *AdminRoleCasbinDao) Table() string { return dao.table } -// Columns returns all column names of current dao. +// Columns returns all column names of the current DAO. func (dao *AdminRoleCasbinDao) Columns() AdminRoleCasbinColumns { return dao.columns } -// Group returns the configuration group name of database of current dao. +// Group returns the database configuration group name of the current DAO. func (dao *AdminRoleCasbinDao) Group() string { return dao.group } -// Ctx creates and returns the Model for current DAO, It automatically sets the context for current operation. +// Ctx creates and returns a Model for the current DAO. It automatically sets the context for the current operation. func (dao *AdminRoleCasbinDao) Ctx(ctx context.Context) *gdb.Model { - return dao.DB().Model(dao.table).Safe().Ctx(ctx) + model := dao.DB().Model(dao.table) + for _, handler := range dao.handlers { + model = handler(model) + } + return model.Safe().Ctx(ctx) } // Transaction wraps the transaction logic using function f. -// It rollbacks the transaction and returns the error from function f if it returns non-nil error. +// It rolls back the transaction and returns the error if function f returns a non-nil error. // It commits the transaction and returns nil if function f returns nil. // -// Note that, you should not Commit or Rollback the transaction in function f +// Note: Do not commit or roll back the transaction in function f, // as it is automatically handled by this function. func (dao *AdminRoleCasbinDao) Transaction(ctx context.Context, f func(ctx context.Context, tx gdb.TX) error) (err error) { return dao.Ctx(ctx).Transaction(ctx, f) diff --git a/server/internal/dao/internal/admin_role_menu.go b/server/internal/dao/internal/admin_role_menu.go index 40b9978..9f9e4ff 100755 --- a/server/internal/dao/internal/admin_role_menu.go +++ b/server/internal/dao/internal/admin_role_menu.go @@ -11,64 +11,70 @@ import ( "github.com/gogf/gf/v2/frame/g" ) -// AdminRoleMenuDao is the data access object for table hg_admin_role_menu. +// AdminRoleMenuDao is the data access object for the table hg_admin_role_menu. type AdminRoleMenuDao struct { - table string // table is the underlying table name of the DAO. - group string // group is the database configuration group name of current DAO. - columns AdminRoleMenuColumns // columns contains all the column names of Table for convenient usage. + table string // table is the underlying table name of the DAO. + group string // group is the database configuration group name of the current DAO. + columns AdminRoleMenuColumns // columns contains all the column names of Table for convenient usage. + handlers []gdb.ModelHandler // handlers for customized model modification. } -// AdminRoleMenuColumns defines and stores column names for table hg_admin_role_menu. +// AdminRoleMenuColumns defines and stores column names for the table hg_admin_role_menu. type AdminRoleMenuColumns struct { RoleId string // 角色ID MenuId string // 菜单ID } -// adminRoleMenuColumns holds the columns for table hg_admin_role_menu. +// adminRoleMenuColumns holds the columns for the table hg_admin_role_menu. var adminRoleMenuColumns = AdminRoleMenuColumns{ RoleId: "role_id", MenuId: "menu_id", } // NewAdminRoleMenuDao creates and returns a new DAO object for table data access. -func NewAdminRoleMenuDao() *AdminRoleMenuDao { +func NewAdminRoleMenuDao(handlers ...gdb.ModelHandler) *AdminRoleMenuDao { return &AdminRoleMenuDao{ - group: "default", - table: "hg_admin_role_menu", - columns: adminRoleMenuColumns, + group: "default", + table: "hg_admin_role_menu", + columns: adminRoleMenuColumns, + handlers: handlers, } } -// DB retrieves and returns the underlying raw database management object of current DAO. +// DB retrieves and returns the underlying raw database management object of the current DAO. func (dao *AdminRoleMenuDao) DB() gdb.DB { return g.DB(dao.group) } -// Table returns the table name of current dao. +// Table returns the table name of the current DAO. func (dao *AdminRoleMenuDao) Table() string { return dao.table } -// Columns returns all column names of current dao. +// Columns returns all column names of the current DAO. func (dao *AdminRoleMenuDao) Columns() AdminRoleMenuColumns { return dao.columns } -// Group returns the configuration group name of database of current dao. +// Group returns the database configuration group name of the current DAO. func (dao *AdminRoleMenuDao) Group() string { return dao.group } -// Ctx creates and returns the Model for current DAO, It automatically sets the context for current operation. +// Ctx creates and returns a Model for the current DAO. It automatically sets the context for the current operation. func (dao *AdminRoleMenuDao) Ctx(ctx context.Context) *gdb.Model { - return dao.DB().Model(dao.table).Safe().Ctx(ctx) + model := dao.DB().Model(dao.table) + for _, handler := range dao.handlers { + model = handler(model) + } + return model.Safe().Ctx(ctx) } // Transaction wraps the transaction logic using function f. -// It rollbacks the transaction and returns the error from function f if it returns non-nil error. +// It rolls back the transaction and returns the error if function f returns a non-nil error. // It commits the transaction and returns nil if function f returns nil. // -// Note that, you should not Commit or Rollback the transaction in function f +// Note: Do not commit or roll back the transaction in function f, // as it is automatically handled by this function. func (dao *AdminRoleMenuDao) Transaction(ctx context.Context, f func(ctx context.Context, tx gdb.TX) error) (err error) { return dao.Ctx(ctx).Transaction(ctx, f) diff --git a/server/internal/dao/internal/pay_log.go b/server/internal/dao/internal/pay_log.go index d42efe6..0ef4f61 100755 --- a/server/internal/dao/internal/pay_log.go +++ b/server/internal/dao/internal/pay_log.go @@ -11,14 +11,15 @@ import ( "github.com/gogf/gf/v2/frame/g" ) -// PayLogDao is the data access object for table hg_pay_log. +// PayLogDao is the data access object for the table hg_pay_log. type PayLogDao struct { - table string // table is the underlying table name of the DAO. - group string // group is the database configuration group name of current DAO. - columns PayLogColumns // columns contains all the column names of Table for convenient usage. + table string // table is the underlying table name of the DAO. + group string // group is the database configuration group name of the current DAO. + columns PayLogColumns // columns contains all the column names of Table for convenient usage. + handlers []gdb.ModelHandler // handlers for customized model modification. } -// PayLogColumns defines and stores column names for table hg_pay_log. +// PayLogColumns defines and stores column names for the table hg_pay_log. type PayLogColumns struct { Id string // 主键 MemberId string // 会员ID @@ -52,7 +53,7 @@ type PayLogColumns struct { UpdatedAt string // 修改时间 } -// payLogColumns holds the columns for table hg_pay_log. +// payLogColumns holds the columns for the table hg_pay_log. var payLogColumns = PayLogColumns{ Id: "id", MemberId: "member_id", @@ -87,44 +88,49 @@ var payLogColumns = PayLogColumns{ } // NewPayLogDao creates and returns a new DAO object for table data access. -func NewPayLogDao() *PayLogDao { +func NewPayLogDao(handlers ...gdb.ModelHandler) *PayLogDao { return &PayLogDao{ - group: "default", - table: "hg_pay_log", - columns: payLogColumns, + group: "default", + table: "hg_pay_log", + columns: payLogColumns, + handlers: handlers, } } -// DB retrieves and returns the underlying raw database management object of current DAO. +// DB retrieves and returns the underlying raw database management object of the current DAO. func (dao *PayLogDao) DB() gdb.DB { return g.DB(dao.group) } -// Table returns the table name of current dao. +// Table returns the table name of the current DAO. func (dao *PayLogDao) Table() string { return dao.table } -// Columns returns all column names of current dao. +// Columns returns all column names of the current DAO. func (dao *PayLogDao) Columns() PayLogColumns { return dao.columns } -// Group returns the configuration group name of database of current dao. +// Group returns the database configuration group name of the current DAO. func (dao *PayLogDao) Group() string { return dao.group } -// Ctx creates and returns the Model for current DAO, It automatically sets the context for current operation. +// Ctx creates and returns a Model for the current DAO. It automatically sets the context for the current operation. func (dao *PayLogDao) Ctx(ctx context.Context) *gdb.Model { - return dao.DB().Model(dao.table).Safe().Ctx(ctx) + model := dao.DB().Model(dao.table) + for _, handler := range dao.handlers { + model = handler(model) + } + return model.Safe().Ctx(ctx) } // Transaction wraps the transaction logic using function f. -// It rollbacks the transaction and returns the error from function f if it returns non-nil error. +// It rolls back the transaction and returns the error if function f returns a non-nil error. // It commits the transaction and returns nil if function f returns nil. // -// Note that, you should not Commit or Rollback the transaction in function f +// Note: Do not commit or roll back the transaction in function f, // as it is automatically handled by this function. func (dao *PayLogDao) Transaction(ctx context.Context, f func(ctx context.Context, tx gdb.TX) error) (err error) { return dao.Ctx(ctx).Transaction(ctx, f) diff --git a/server/internal/dao/internal/pay_refund.go b/server/internal/dao/internal/pay_refund.go index 83d7fce..8b7684f 100755 --- a/server/internal/dao/internal/pay_refund.go +++ b/server/internal/dao/internal/pay_refund.go @@ -11,14 +11,15 @@ import ( "github.com/gogf/gf/v2/frame/g" ) -// PayRefundDao is the data access object for table hg_pay_refund. +// PayRefundDao is the data access object for the table hg_pay_refund. type PayRefundDao struct { - table string // table is the underlying table name of the DAO. - group string // group is the database configuration group name of current DAO. - columns PayRefundColumns // columns contains all the column names of Table for convenient usage. + table string // table is the underlying table name of the DAO. + group string // group is the database configuration group name of the current DAO. + columns PayRefundColumns // columns contains all the column names of Table for convenient usage. + handlers []gdb.ModelHandler // handlers for customized model modification. } -// PayRefundColumns defines and stores column names for table hg_pay_refund. +// PayRefundColumns defines and stores column names for the table hg_pay_refund. type PayRefundColumns struct { Id string // 主键ID MemberId string // 会员ID @@ -35,7 +36,7 @@ type PayRefundColumns struct { UpdatedAt string // 更新时间 } -// payRefundColumns holds the columns for table hg_pay_refund. +// payRefundColumns holds the columns for the table hg_pay_refund. var payRefundColumns = PayRefundColumns{ Id: "id", MemberId: "member_id", @@ -53,44 +54,49 @@ var payRefundColumns = PayRefundColumns{ } // NewPayRefundDao creates and returns a new DAO object for table data access. -func NewPayRefundDao() *PayRefundDao { +func NewPayRefundDao(handlers ...gdb.ModelHandler) *PayRefundDao { return &PayRefundDao{ - group: "default", - table: "hg_pay_refund", - columns: payRefundColumns, + group: "default", + table: "hg_pay_refund", + columns: payRefundColumns, + handlers: handlers, } } -// DB retrieves and returns the underlying raw database management object of current DAO. +// DB retrieves and returns the underlying raw database management object of the current DAO. func (dao *PayRefundDao) DB() gdb.DB { return g.DB(dao.group) } -// Table returns the table name of current dao. +// Table returns the table name of the current DAO. func (dao *PayRefundDao) Table() string { return dao.table } -// Columns returns all column names of current dao. +// Columns returns all column names of the current DAO. func (dao *PayRefundDao) Columns() PayRefundColumns { return dao.columns } -// Group returns the configuration group name of database of current dao. +// Group returns the database configuration group name of the current DAO. func (dao *PayRefundDao) Group() string { return dao.group } -// Ctx creates and returns the Model for current DAO, It automatically sets the context for current operation. +// Ctx creates and returns a Model for the current DAO. It automatically sets the context for the current operation. func (dao *PayRefundDao) Ctx(ctx context.Context) *gdb.Model { - return dao.DB().Model(dao.table).Safe().Ctx(ctx) + model := dao.DB().Model(dao.table) + for _, handler := range dao.handlers { + model = handler(model) + } + return model.Safe().Ctx(ctx) } // Transaction wraps the transaction logic using function f. -// It rollbacks the transaction and returns the error from function f if it returns non-nil error. +// It rolls back the transaction and returns the error if function f returns a non-nil error. // It commits the transaction and returns nil if function f returns nil. // -// Note that, you should not Commit or Rollback the transaction in function f +// Note: Do not commit or roll back the transaction in function f, // as it is automatically handled by this function. func (dao *PayRefundDao) Transaction(ctx context.Context, f func(ctx context.Context, tx gdb.TX) error) (err error) { return dao.Ctx(ctx).Transaction(ctx, f) diff --git a/server/internal/dao/internal/sys_addons_config.go b/server/internal/dao/internal/sys_addons_config.go index d6e0c71..41135bb 100755 --- a/server/internal/dao/internal/sys_addons_config.go +++ b/server/internal/dao/internal/sys_addons_config.go @@ -11,14 +11,15 @@ import ( "github.com/gogf/gf/v2/frame/g" ) -// SysAddonsConfigDao is the data access object for table hg_sys_addons_config. +// SysAddonsConfigDao is the data access object for the table hg_sys_addons_config. type SysAddonsConfigDao struct { - table string // table is the underlying table name of the DAO. - group string // group is the database configuration group name of current DAO. - columns SysAddonsConfigColumns // columns contains all the column names of Table for convenient usage. + table string // table is the underlying table name of the DAO. + group string // group is the database configuration group name of the current DAO. + columns SysAddonsConfigColumns // columns contains all the column names of Table for convenient usage. + handlers []gdb.ModelHandler // handlers for customized model modification. } -// SysAddonsConfigColumns defines and stores column names for table hg_sys_addons_config. +// SysAddonsConfigColumns defines and stores column names for the table hg_sys_addons_config. type SysAddonsConfigColumns struct { Id string // 配置ID AddonName string // 插件名称 @@ -36,7 +37,7 @@ type SysAddonsConfigColumns struct { UpdatedAt string // 更新时间 } -// sysAddonsConfigColumns holds the columns for table hg_sys_addons_config. +// sysAddonsConfigColumns holds the columns for the table hg_sys_addons_config. var sysAddonsConfigColumns = SysAddonsConfigColumns{ Id: "id", AddonName: "addon_name", @@ -55,44 +56,49 @@ var sysAddonsConfigColumns = SysAddonsConfigColumns{ } // NewSysAddonsConfigDao creates and returns a new DAO object for table data access. -func NewSysAddonsConfigDao() *SysAddonsConfigDao { +func NewSysAddonsConfigDao(handlers ...gdb.ModelHandler) *SysAddonsConfigDao { return &SysAddonsConfigDao{ - group: "default", - table: "hg_sys_addons_config", - columns: sysAddonsConfigColumns, + group: "default", + table: "hg_sys_addons_config", + columns: sysAddonsConfigColumns, + handlers: handlers, } } -// DB retrieves and returns the underlying raw database management object of current DAO. +// DB retrieves and returns the underlying raw database management object of the current DAO. func (dao *SysAddonsConfigDao) DB() gdb.DB { return g.DB(dao.group) } -// Table returns the table name of current dao. +// Table returns the table name of the current DAO. func (dao *SysAddonsConfigDao) Table() string { return dao.table } -// Columns returns all column names of current dao. +// Columns returns all column names of the current DAO. func (dao *SysAddonsConfigDao) Columns() SysAddonsConfigColumns { return dao.columns } -// Group returns the configuration group name of database of current dao. +// Group returns the database configuration group name of the current DAO. func (dao *SysAddonsConfigDao) Group() string { return dao.group } -// Ctx creates and returns the Model for current DAO, It automatically sets the context for current operation. +// Ctx creates and returns a Model for the current DAO. It automatically sets the context for the current operation. func (dao *SysAddonsConfigDao) Ctx(ctx context.Context) *gdb.Model { - return dao.DB().Model(dao.table).Safe().Ctx(ctx) + model := dao.DB().Model(dao.table) + for _, handler := range dao.handlers { + model = handler(model) + } + return model.Safe().Ctx(ctx) } // Transaction wraps the transaction logic using function f. -// It rollbacks the transaction and returns the error from function f if it returns non-nil error. +// It rolls back the transaction and returns the error if function f returns a non-nil error. // It commits the transaction and returns nil if function f returns nil. // -// Note that, you should not Commit or Rollback the transaction in function f +// Note: Do not commit or roll back the transaction in function f, // as it is automatically handled by this function. func (dao *SysAddonsConfigDao) Transaction(ctx context.Context, f func(ctx context.Context, tx gdb.TX) error) (err error) { return dao.Ctx(ctx).Transaction(ctx, f) diff --git a/server/internal/dao/internal/sys_addons_install.go b/server/internal/dao/internal/sys_addons_install.go new file mode 100644 index 0000000..9611545 --- /dev/null +++ b/server/internal/dao/internal/sys_addons_install.go @@ -0,0 +1,89 @@ +// ========================================================================== +// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT. +// ========================================================================== + +package internal + +import ( + "context" + + "github.com/gogf/gf/v2/database/gdb" + "github.com/gogf/gf/v2/frame/g" +) + +// SysAddonsInstallDao is the data access object for the table hg_sys_addons_install. +type SysAddonsInstallDao struct { + table string // table is the underlying table name of the DAO. + group string // group is the database configuration group name of the current DAO. + columns SysAddonsInstallColumns // columns contains all the column names of Table for convenient usage. + handlers []gdb.ModelHandler // handlers for customized model modification. +} + +// SysAddonsInstallColumns defines and stores column names for the table hg_sys_addons_install. +type SysAddonsInstallColumns struct { + Id string // 主键 + Name string // 插件名称 + Version string // 版本号 + Status string // 状态 + CreatedAt string // 创建时间 + UpdatedAt string // 更新时间 +} + +// sysAddonsInstallColumns holds the columns for the table hg_sys_addons_install. +var sysAddonsInstallColumns = SysAddonsInstallColumns{ + Id: "id", + Name: "name", + Version: "version", + Status: "status", + CreatedAt: "created_at", + UpdatedAt: "updated_at", +} + +// NewSysAddonsInstallDao creates and returns a new DAO object for table data access. +func NewSysAddonsInstallDao(handlers ...gdb.ModelHandler) *SysAddonsInstallDao { + return &SysAddonsInstallDao{ + group: "default", + table: "hg_sys_addons_install", + columns: sysAddonsInstallColumns, + handlers: handlers, + } +} + +// DB retrieves and returns the underlying raw database management object of the current DAO. +func (dao *SysAddonsInstallDao) DB() gdb.DB { + return g.DB(dao.group) +} + +// Table returns the table name of the current DAO. +func (dao *SysAddonsInstallDao) Table() string { + return dao.table +} + +// Columns returns all column names of the current DAO. +func (dao *SysAddonsInstallDao) Columns() SysAddonsInstallColumns { + return dao.columns +} + +// Group returns the database configuration group name of the current DAO. +func (dao *SysAddonsInstallDao) Group() string { + return dao.group +} + +// Ctx creates and returns a Model for the current DAO. It automatically sets the context for the current operation. +func (dao *SysAddonsInstallDao) Ctx(ctx context.Context) *gdb.Model { + model := dao.DB().Model(dao.table) + for _, handler := range dao.handlers { + model = handler(model) + } + return model.Safe().Ctx(ctx) +} + +// Transaction wraps the transaction logic using function f. +// It rolls back the transaction and returns the error if function f returns a non-nil error. +// It commits the transaction and returns nil if function f returns nil. +// +// Note: Do not commit or roll back the transaction in function f, +// as it is automatically handled by this function. +func (dao *SysAddonsInstallDao) Transaction(ctx context.Context, f func(ctx context.Context, tx gdb.TX) error) (err error) { + return dao.Ctx(ctx).Transaction(ctx, f) +} diff --git a/server/internal/dao/internal/sys_attachment.go b/server/internal/dao/internal/sys_attachment.go index e76272f..dcd6558 100755 --- a/server/internal/dao/internal/sys_attachment.go +++ b/server/internal/dao/internal/sys_attachment.go @@ -11,14 +11,15 @@ import ( "github.com/gogf/gf/v2/frame/g" ) -// SysAttachmentDao is the data access object for table hg_sys_attachment. +// SysAttachmentDao is the data access object for the table hg_sys_attachment. type SysAttachmentDao struct { - table string // table is the underlying table name of the DAO. - group string // group is the database configuration group name of current DAO. - columns SysAttachmentColumns // columns contains all the column names of Table for convenient usage. + table string // table is the underlying table name of the DAO. + group string // group is the database configuration group name of the current DAO. + columns SysAttachmentColumns // columns contains all the column names of Table for convenient usage. + handlers []gdb.ModelHandler // handlers for customized model modification. } -// SysAttachmentColumns defines and stores column names for table hg_sys_attachment. +// SysAttachmentColumns defines and stores column names for the table hg_sys_attachment. type SysAttachmentColumns struct { Id string // 文件ID AppId string // 应用ID @@ -39,7 +40,7 @@ type SysAttachmentColumns struct { UpdatedAt string // 修改时间 } -// sysAttachmentColumns holds the columns for table hg_sys_attachment. +// sysAttachmentColumns holds the columns for the table hg_sys_attachment. var sysAttachmentColumns = SysAttachmentColumns{ Id: "id", AppId: "app_id", @@ -61,44 +62,49 @@ var sysAttachmentColumns = SysAttachmentColumns{ } // NewSysAttachmentDao creates and returns a new DAO object for table data access. -func NewSysAttachmentDao() *SysAttachmentDao { +func NewSysAttachmentDao(handlers ...gdb.ModelHandler) *SysAttachmentDao { return &SysAttachmentDao{ - group: "default", - table: "hg_sys_attachment", - columns: sysAttachmentColumns, + group: "default", + table: "hg_sys_attachment", + columns: sysAttachmentColumns, + handlers: handlers, } } -// DB retrieves and returns the underlying raw database management object of current DAO. +// DB retrieves and returns the underlying raw database management object of the current DAO. func (dao *SysAttachmentDao) DB() gdb.DB { return g.DB(dao.group) } -// Table returns the table name of current dao. +// Table returns the table name of the current DAO. func (dao *SysAttachmentDao) Table() string { return dao.table } -// Columns returns all column names of current dao. +// Columns returns all column names of the current DAO. func (dao *SysAttachmentDao) Columns() SysAttachmentColumns { return dao.columns } -// Group returns the configuration group name of database of current dao. +// Group returns the database configuration group name of the current DAO. func (dao *SysAttachmentDao) Group() string { return dao.group } -// Ctx creates and returns the Model for current DAO, It automatically sets the context for current operation. +// Ctx creates and returns a Model for the current DAO. It automatically sets the context for the current operation. func (dao *SysAttachmentDao) Ctx(ctx context.Context) *gdb.Model { - return dao.DB().Model(dao.table).Safe().Ctx(ctx) + model := dao.DB().Model(dao.table) + for _, handler := range dao.handlers { + model = handler(model) + } + return model.Safe().Ctx(ctx) } // Transaction wraps the transaction logic using function f. -// It rollbacks the transaction and returns the error from function f if it returns non-nil error. +// It rolls back the transaction and returns the error if function f returns a non-nil error. // It commits the transaction and returns nil if function f returns nil. // -// Note that, you should not Commit or Rollback the transaction in function f +// Note: Do not commit or roll back the transaction in function f, // as it is automatically handled by this function. func (dao *SysAttachmentDao) Transaction(ctx context.Context, f func(ctx context.Context, tx gdb.TX) error) (err error) { return dao.Ctx(ctx).Transaction(ctx, f) diff --git a/server/internal/dao/internal/sys_blacklist.go b/server/internal/dao/internal/sys_blacklist.go index 99498bf..1838a14 100755 --- a/server/internal/dao/internal/sys_blacklist.go +++ b/server/internal/dao/internal/sys_blacklist.go @@ -11,14 +11,15 @@ import ( "github.com/gogf/gf/v2/frame/g" ) -// SysBlacklistDao is the data access object for table hg_sys_blacklist. +// SysBlacklistDao is the data access object for the table hg_sys_blacklist. type SysBlacklistDao struct { - table string // table is the underlying table name of the DAO. - group string // group is the database configuration group name of current DAO. - columns SysBlacklistColumns // columns contains all the column names of Table for convenient usage. + table string // table is the underlying table name of the DAO. + group string // group is the database configuration group name of the current DAO. + columns SysBlacklistColumns // columns contains all the column names of Table for convenient usage. + handlers []gdb.ModelHandler // handlers for customized model modification. } -// SysBlacklistColumns defines and stores column names for table hg_sys_blacklist. +// SysBlacklistColumns defines and stores column names for the table hg_sys_blacklist. type SysBlacklistColumns struct { Id string // 黑名单ID Ip string // IP地址 @@ -28,7 +29,7 @@ type SysBlacklistColumns struct { UpdatedAt string // 更新时间 } -// sysBlacklistColumns holds the columns for table hg_sys_blacklist. +// sysBlacklistColumns holds the columns for the table hg_sys_blacklist. var sysBlacklistColumns = SysBlacklistColumns{ Id: "id", Ip: "ip", @@ -39,44 +40,49 @@ var sysBlacklistColumns = SysBlacklistColumns{ } // NewSysBlacklistDao creates and returns a new DAO object for table data access. -func NewSysBlacklistDao() *SysBlacklistDao { +func NewSysBlacklistDao(handlers ...gdb.ModelHandler) *SysBlacklistDao { return &SysBlacklistDao{ - group: "default", - table: "hg_sys_blacklist", - columns: sysBlacklistColumns, + group: "default", + table: "hg_sys_blacklist", + columns: sysBlacklistColumns, + handlers: handlers, } } -// DB retrieves and returns the underlying raw database management object of current DAO. +// DB retrieves and returns the underlying raw database management object of the current DAO. func (dao *SysBlacklistDao) DB() gdb.DB { return g.DB(dao.group) } -// Table returns the table name of current dao. +// Table returns the table name of the current DAO. func (dao *SysBlacklistDao) Table() string { return dao.table } -// Columns returns all column names of current dao. +// Columns returns all column names of the current DAO. func (dao *SysBlacklistDao) Columns() SysBlacklistColumns { return dao.columns } -// Group returns the configuration group name of database of current dao. +// Group returns the database configuration group name of the current DAO. func (dao *SysBlacklistDao) Group() string { return dao.group } -// Ctx creates and returns the Model for current DAO, It automatically sets the context for current operation. +// Ctx creates and returns a Model for the current DAO. It automatically sets the context for the current operation. func (dao *SysBlacklistDao) Ctx(ctx context.Context) *gdb.Model { - return dao.DB().Model(dao.table).Safe().Ctx(ctx) + model := dao.DB().Model(dao.table) + for _, handler := range dao.handlers { + model = handler(model) + } + return model.Safe().Ctx(ctx) } // Transaction wraps the transaction logic using function f. -// It rollbacks the transaction and returns the error from function f if it returns non-nil error. +// It rolls back the transaction and returns the error if function f returns a non-nil error. // It commits the transaction and returns nil if function f returns nil. // -// Note that, you should not Commit or Rollback the transaction in function f +// Note: Do not commit or roll back the transaction in function f, // as it is automatically handled by this function. func (dao *SysBlacklistDao) Transaction(ctx context.Context, f func(ctx context.Context, tx gdb.TX) error) (err error) { return dao.Ctx(ctx).Transaction(ctx, f) diff --git a/server/internal/dao/internal/sys_config.go b/server/internal/dao/internal/sys_config.go index cfd138a..637f6a2 100755 --- a/server/internal/dao/internal/sys_config.go +++ b/server/internal/dao/internal/sys_config.go @@ -11,14 +11,15 @@ import ( "github.com/gogf/gf/v2/frame/g" ) -// SysConfigDao is the data access object for table hg_sys_config. +// SysConfigDao is the data access object for the table hg_sys_config. type SysConfigDao struct { - table string // table is the underlying table name of the DAO. - group string // group is the database configuration group name of current DAO. - columns SysConfigColumns // columns contains all the column names of Table for convenient usage. + table string // table is the underlying table name of the DAO. + group string // group is the database configuration group name of the current DAO. + columns SysConfigColumns // columns contains all the column names of Table for convenient usage. + handlers []gdb.ModelHandler // handlers for customized model modification. } -// SysConfigColumns defines and stores column names for table hg_sys_config. +// SysConfigColumns defines and stores column names for the table hg_sys_config. type SysConfigColumns struct { Id string // 配置ID Group string // 配置分组 @@ -35,7 +36,7 @@ type SysConfigColumns struct { UpdatedAt string // 更新时间 } -// sysConfigColumns holds the columns for table hg_sys_config. +// sysConfigColumns holds the columns for the table hg_sys_config. var sysConfigColumns = SysConfigColumns{ Id: "id", Group: "group", @@ -53,44 +54,49 @@ var sysConfigColumns = SysConfigColumns{ } // NewSysConfigDao creates and returns a new DAO object for table data access. -func NewSysConfigDao() *SysConfigDao { +func NewSysConfigDao(handlers ...gdb.ModelHandler) *SysConfigDao { return &SysConfigDao{ - group: "default", - table: "hg_sys_config", - columns: sysConfigColumns, + group: "default", + table: "hg_sys_config", + columns: sysConfigColumns, + handlers: handlers, } } -// DB retrieves and returns the underlying raw database management object of current DAO. +// DB retrieves and returns the underlying raw database management object of the current DAO. func (dao *SysConfigDao) DB() gdb.DB { return g.DB(dao.group) } -// Table returns the table name of current dao. +// Table returns the table name of the current DAO. func (dao *SysConfigDao) Table() string { return dao.table } -// Columns returns all column names of current dao. +// Columns returns all column names of the current DAO. func (dao *SysConfigDao) Columns() SysConfigColumns { return dao.columns } -// Group returns the configuration group name of database of current dao. +// Group returns the database configuration group name of the current DAO. func (dao *SysConfigDao) Group() string { return dao.group } -// Ctx creates and returns the Model for current DAO, It automatically sets the context for current operation. +// Ctx creates and returns a Model for the current DAO. It automatically sets the context for the current operation. func (dao *SysConfigDao) Ctx(ctx context.Context) *gdb.Model { - return dao.DB().Model(dao.table).Safe().Ctx(ctx) + model := dao.DB().Model(dao.table) + for _, handler := range dao.handlers { + model = handler(model) + } + return model.Safe().Ctx(ctx) } // Transaction wraps the transaction logic using function f. -// It rollbacks the transaction and returns the error from function f if it returns non-nil error. +// It rolls back the transaction and returns the error if function f returns a non-nil error. // It commits the transaction and returns nil if function f returns nil. // -// Note that, you should not Commit or Rollback the transaction in function f +// Note: Do not commit or roll back the transaction in function f, // as it is automatically handled by this function. func (dao *SysConfigDao) Transaction(ctx context.Context, f func(ctx context.Context, tx gdb.TX) error) (err error) { return dao.Ctx(ctx).Transaction(ctx, f) diff --git a/server/internal/dao/internal/sys_cron.go b/server/internal/dao/internal/sys_cron.go index 6928ddd..a8a8dac 100755 --- a/server/internal/dao/internal/sys_cron.go +++ b/server/internal/dao/internal/sys_cron.go @@ -11,14 +11,15 @@ import ( "github.com/gogf/gf/v2/frame/g" ) -// SysCronDao is the data access object for table hg_sys_cron. +// SysCronDao is the data access object for the table hg_sys_cron. type SysCronDao struct { - table string // table is the underlying table name of the DAO. - group string // group is the database configuration group name of current DAO. - columns SysCronColumns // columns contains all the column names of Table for convenient usage. + table string // table is the underlying table name of the DAO. + group string // group is the database configuration group name of the current DAO. + columns SysCronColumns // columns contains all the column names of Table for convenient usage. + handlers []gdb.ModelHandler // handlers for customized model modification. } -// SysCronColumns defines and stores column names for table hg_sys_cron. +// SysCronColumns defines and stores column names for the table hg_sys_cron. type SysCronColumns struct { Id string // 任务ID GroupId string // 分组ID @@ -35,7 +36,7 @@ type SysCronColumns struct { UpdatedAt string // 更新时间 } -// sysCronColumns holds the columns for table hg_sys_cron. +// sysCronColumns holds the columns for the table hg_sys_cron. var sysCronColumns = SysCronColumns{ Id: "id", GroupId: "group_id", @@ -53,44 +54,49 @@ var sysCronColumns = SysCronColumns{ } // NewSysCronDao creates and returns a new DAO object for table data access. -func NewSysCronDao() *SysCronDao { +func NewSysCronDao(handlers ...gdb.ModelHandler) *SysCronDao { return &SysCronDao{ - group: "default", - table: "hg_sys_cron", - columns: sysCronColumns, + group: "default", + table: "hg_sys_cron", + columns: sysCronColumns, + handlers: handlers, } } -// DB retrieves and returns the underlying raw database management object of current DAO. +// DB retrieves and returns the underlying raw database management object of the current DAO. func (dao *SysCronDao) DB() gdb.DB { return g.DB(dao.group) } -// Table returns the table name of current dao. +// Table returns the table name of the current DAO. func (dao *SysCronDao) Table() string { return dao.table } -// Columns returns all column names of current dao. +// Columns returns all column names of the current DAO. func (dao *SysCronDao) Columns() SysCronColumns { return dao.columns } -// Group returns the configuration group name of database of current dao. +// Group returns the database configuration group name of the current DAO. func (dao *SysCronDao) Group() string { return dao.group } -// Ctx creates and returns the Model for current DAO, It automatically sets the context for current operation. +// Ctx creates and returns a Model for the current DAO. It automatically sets the context for the current operation. func (dao *SysCronDao) Ctx(ctx context.Context) *gdb.Model { - return dao.DB().Model(dao.table).Safe().Ctx(ctx) + model := dao.DB().Model(dao.table) + for _, handler := range dao.handlers { + model = handler(model) + } + return model.Safe().Ctx(ctx) } // Transaction wraps the transaction logic using function f. -// It rollbacks the transaction and returns the error from function f if it returns non-nil error. +// It rolls back the transaction and returns the error if function f returns a non-nil error. // It commits the transaction and returns nil if function f returns nil. // -// Note that, you should not Commit or Rollback the transaction in function f +// Note: Do not commit or roll back the transaction in function f, // as it is automatically handled by this function. func (dao *SysCronDao) Transaction(ctx context.Context, f func(ctx context.Context, tx gdb.TX) error) (err error) { return dao.Ctx(ctx).Transaction(ctx, f) diff --git a/server/internal/dao/internal/sys_cron_group.go b/server/internal/dao/internal/sys_cron_group.go index 78c617f..983a238 100755 --- a/server/internal/dao/internal/sys_cron_group.go +++ b/server/internal/dao/internal/sys_cron_group.go @@ -11,14 +11,15 @@ import ( "github.com/gogf/gf/v2/frame/g" ) -// SysCronGroupDao is the data access object for table hg_sys_cron_group. +// SysCronGroupDao is the data access object for the table hg_sys_cron_group. type SysCronGroupDao struct { - table string // table is the underlying table name of the DAO. - group string // group is the database configuration group name of current DAO. - columns SysCronGroupColumns // columns contains all the column names of Table for convenient usage. + table string // table is the underlying table name of the DAO. + group string // group is the database configuration group name of the current DAO. + columns SysCronGroupColumns // columns contains all the column names of Table for convenient usage. + handlers []gdb.ModelHandler // handlers for customized model modification. } -// SysCronGroupColumns defines and stores column names for table hg_sys_cron_group. +// SysCronGroupColumns defines and stores column names for the table hg_sys_cron_group. type SysCronGroupColumns struct { Id string // 任务分组ID Pid string // 父类任务分组ID @@ -31,7 +32,7 @@ type SysCronGroupColumns struct { UpdatedAt string // 更新时间 } -// sysCronGroupColumns holds the columns for table hg_sys_cron_group. +// sysCronGroupColumns holds the columns for the table hg_sys_cron_group. var sysCronGroupColumns = SysCronGroupColumns{ Id: "id", Pid: "pid", @@ -45,44 +46,49 @@ var sysCronGroupColumns = SysCronGroupColumns{ } // NewSysCronGroupDao creates and returns a new DAO object for table data access. -func NewSysCronGroupDao() *SysCronGroupDao { +func NewSysCronGroupDao(handlers ...gdb.ModelHandler) *SysCronGroupDao { return &SysCronGroupDao{ - group: "default", - table: "hg_sys_cron_group", - columns: sysCronGroupColumns, + group: "default", + table: "hg_sys_cron_group", + columns: sysCronGroupColumns, + handlers: handlers, } } -// DB retrieves and returns the underlying raw database management object of current DAO. +// DB retrieves and returns the underlying raw database management object of the current DAO. func (dao *SysCronGroupDao) DB() gdb.DB { return g.DB(dao.group) } -// Table returns the table name of current dao. +// Table returns the table name of the current DAO. func (dao *SysCronGroupDao) Table() string { return dao.table } -// Columns returns all column names of current dao. +// Columns returns all column names of the current DAO. func (dao *SysCronGroupDao) Columns() SysCronGroupColumns { return dao.columns } -// Group returns the configuration group name of database of current dao. +// Group returns the database configuration group name of the current DAO. func (dao *SysCronGroupDao) Group() string { return dao.group } -// Ctx creates and returns the Model for current DAO, It automatically sets the context for current operation. +// Ctx creates and returns a Model for the current DAO. It automatically sets the context for the current operation. func (dao *SysCronGroupDao) Ctx(ctx context.Context) *gdb.Model { - return dao.DB().Model(dao.table).Safe().Ctx(ctx) + model := dao.DB().Model(dao.table) + for _, handler := range dao.handlers { + model = handler(model) + } + return model.Safe().Ctx(ctx) } // Transaction wraps the transaction logic using function f. -// It rollbacks the transaction and returns the error from function f if it returns non-nil error. +// It rolls back the transaction and returns the error if function f returns a non-nil error. // It commits the transaction and returns nil if function f returns nil. // -// Note that, you should not Commit or Rollback the transaction in function f +// Note: Do not commit or roll back the transaction in function f, // as it is automatically handled by this function. func (dao *SysCronGroupDao) Transaction(ctx context.Context, f func(ctx context.Context, tx gdb.TX) error) (err error) { return dao.Ctx(ctx).Transaction(ctx, f) diff --git a/server/internal/dao/internal/sys_dict_data.go b/server/internal/dao/internal/sys_dict_data.go index 7ea6495..89b72d5 100755 --- a/server/internal/dao/internal/sys_dict_data.go +++ b/server/internal/dao/internal/sys_dict_data.go @@ -11,14 +11,15 @@ import ( "github.com/gogf/gf/v2/frame/g" ) -// SysDictDataDao is the data access object for table hg_sys_dict_data. +// SysDictDataDao is the data access object for the table hg_sys_dict_data. type SysDictDataDao struct { - table string // table is the underlying table name of the DAO. - group string // group is the database configuration group name of current DAO. - columns SysDictDataColumns // columns contains all the column names of Table for convenient usage. + table string // table is the underlying table name of the DAO. + group string // group is the database configuration group name of the current DAO. + columns SysDictDataColumns // columns contains all the column names of Table for convenient usage. + handlers []gdb.ModelHandler // handlers for customized model modification. } -// SysDictDataColumns defines and stores column names for table hg_sys_dict_data. +// SysDictDataColumns defines and stores column names for the table hg_sys_dict_data. type SysDictDataColumns struct { Id string // 字典数据ID Label string // 字典标签 @@ -34,7 +35,7 @@ type SysDictDataColumns struct { UpdatedAt string // 更新时间 } -// sysDictDataColumns holds the columns for table hg_sys_dict_data. +// sysDictDataColumns holds the columns for the table hg_sys_dict_data. var sysDictDataColumns = SysDictDataColumns{ Id: "id", Label: "label", @@ -51,44 +52,49 @@ var sysDictDataColumns = SysDictDataColumns{ } // NewSysDictDataDao creates and returns a new DAO object for table data access. -func NewSysDictDataDao() *SysDictDataDao { +func NewSysDictDataDao(handlers ...gdb.ModelHandler) *SysDictDataDao { return &SysDictDataDao{ - group: "default", - table: "hg_sys_dict_data", - columns: sysDictDataColumns, + group: "default", + table: "hg_sys_dict_data", + columns: sysDictDataColumns, + handlers: handlers, } } -// DB retrieves and returns the underlying raw database management object of current DAO. +// DB retrieves and returns the underlying raw database management object of the current DAO. func (dao *SysDictDataDao) DB() gdb.DB { return g.DB(dao.group) } -// Table returns the table name of current dao. +// Table returns the table name of the current DAO. func (dao *SysDictDataDao) Table() string { return dao.table } -// Columns returns all column names of current dao. +// Columns returns all column names of the current DAO. func (dao *SysDictDataDao) Columns() SysDictDataColumns { return dao.columns } -// Group returns the configuration group name of database of current dao. +// Group returns the database configuration group name of the current DAO. func (dao *SysDictDataDao) Group() string { return dao.group } -// Ctx creates and returns the Model for current DAO, It automatically sets the context for current operation. +// Ctx creates and returns a Model for the current DAO. It automatically sets the context for the current operation. func (dao *SysDictDataDao) Ctx(ctx context.Context) *gdb.Model { - return dao.DB().Model(dao.table).Safe().Ctx(ctx) + model := dao.DB().Model(dao.table) + for _, handler := range dao.handlers { + model = handler(model) + } + return model.Safe().Ctx(ctx) } // Transaction wraps the transaction logic using function f. -// It rollbacks the transaction and returns the error from function f if it returns non-nil error. +// It rolls back the transaction and returns the error if function f returns a non-nil error. // It commits the transaction and returns nil if function f returns nil. // -// Note that, you should not Commit or Rollback the transaction in function f +// Note: Do not commit or roll back the transaction in function f, // as it is automatically handled by this function. func (dao *SysDictDataDao) Transaction(ctx context.Context, f func(ctx context.Context, tx gdb.TX) error) (err error) { return dao.Ctx(ctx).Transaction(ctx, f) diff --git a/server/internal/dao/internal/sys_dict_type.go b/server/internal/dao/internal/sys_dict_type.go index 5599329..b0b05f7 100755 --- a/server/internal/dao/internal/sys_dict_type.go +++ b/server/internal/dao/internal/sys_dict_type.go @@ -11,14 +11,15 @@ import ( "github.com/gogf/gf/v2/frame/g" ) -// SysDictTypeDao is the data access object for table hg_sys_dict_type. +// SysDictTypeDao is the data access object for the table hg_sys_dict_type. type SysDictTypeDao struct { - table string // table is the underlying table name of the DAO. - group string // group is the database configuration group name of current DAO. - columns SysDictTypeColumns // columns contains all the column names of Table for convenient usage. + table string // table is the underlying table name of the DAO. + group string // group is the database configuration group name of the current DAO. + columns SysDictTypeColumns // columns contains all the column names of Table for convenient usage. + handlers []gdb.ModelHandler // handlers for customized model modification. } -// SysDictTypeColumns defines and stores column names for table hg_sys_dict_type. +// SysDictTypeColumns defines and stores column names for the table hg_sys_dict_type. type SysDictTypeColumns struct { Id string // 字典类型ID Pid string // 父类字典类型ID @@ -31,7 +32,7 @@ type SysDictTypeColumns struct { UpdatedAt string // 更新时间 } -// sysDictTypeColumns holds the columns for table hg_sys_dict_type. +// sysDictTypeColumns holds the columns for the table hg_sys_dict_type. var sysDictTypeColumns = SysDictTypeColumns{ Id: "id", Pid: "pid", @@ -45,44 +46,49 @@ var sysDictTypeColumns = SysDictTypeColumns{ } // NewSysDictTypeDao creates and returns a new DAO object for table data access. -func NewSysDictTypeDao() *SysDictTypeDao { +func NewSysDictTypeDao(handlers ...gdb.ModelHandler) *SysDictTypeDao { return &SysDictTypeDao{ - group: "default", - table: "hg_sys_dict_type", - columns: sysDictTypeColumns, + group: "default", + table: "hg_sys_dict_type", + columns: sysDictTypeColumns, + handlers: handlers, } } -// DB retrieves and returns the underlying raw database management object of current DAO. +// DB retrieves and returns the underlying raw database management object of the current DAO. func (dao *SysDictTypeDao) DB() gdb.DB { return g.DB(dao.group) } -// Table returns the table name of current dao. +// Table returns the table name of the current DAO. func (dao *SysDictTypeDao) Table() string { return dao.table } -// Columns returns all column names of current dao. +// Columns returns all column names of the current DAO. func (dao *SysDictTypeDao) Columns() SysDictTypeColumns { return dao.columns } -// Group returns the configuration group name of database of current dao. +// Group returns the database configuration group name of the current DAO. func (dao *SysDictTypeDao) Group() string { return dao.group } -// Ctx creates and returns the Model for current DAO, It automatically sets the context for current operation. +// Ctx creates and returns a Model for the current DAO. It automatically sets the context for the current operation. func (dao *SysDictTypeDao) Ctx(ctx context.Context) *gdb.Model { - return dao.DB().Model(dao.table).Safe().Ctx(ctx) + model := dao.DB().Model(dao.table) + for _, handler := range dao.handlers { + model = handler(model) + } + return model.Safe().Ctx(ctx) } // Transaction wraps the transaction logic using function f. -// It rollbacks the transaction and returns the error from function f if it returns non-nil error. +// It rolls back the transaction and returns the error if function f returns a non-nil error. // It commits the transaction and returns nil if function f returns nil. // -// Note that, you should not Commit or Rollback the transaction in function f +// Note: Do not commit or roll back the transaction in function f, // as it is automatically handled by this function. func (dao *SysDictTypeDao) Transaction(ctx context.Context, f func(ctx context.Context, tx gdb.TX) error) (err error) { return dao.Ctx(ctx).Transaction(ctx, f) diff --git a/server/internal/dao/internal/sys_ems_log.go b/server/internal/dao/internal/sys_ems_log.go index ed44cd4..3cac58d 100755 --- a/server/internal/dao/internal/sys_ems_log.go +++ b/server/internal/dao/internal/sys_ems_log.go @@ -11,14 +11,15 @@ import ( "github.com/gogf/gf/v2/frame/g" ) -// SysEmsLogDao is the data access object for table hg_sys_ems_log. +// SysEmsLogDao is the data access object for the table hg_sys_ems_log. type SysEmsLogDao struct { - table string // table is the underlying table name of the DAO. - group string // group is the database configuration group name of current DAO. - columns SysEmsLogColumns // columns contains all the column names of Table for convenient usage. + table string // table is the underlying table name of the DAO. + group string // group is the database configuration group name of the current DAO. + columns SysEmsLogColumns // columns contains all the column names of Table for convenient usage. + handlers []gdb.ModelHandler // handlers for customized model modification. } -// SysEmsLogColumns defines and stores column names for table hg_sys_ems_log. +// SysEmsLogColumns defines and stores column names for the table hg_sys_ems_log. type SysEmsLogColumns struct { Id string // 主键 Event string // 事件 @@ -32,7 +33,7 @@ type SysEmsLogColumns struct { UpdatedAt string // 更新时间 } -// sysEmsLogColumns holds the columns for table hg_sys_ems_log. +// sysEmsLogColumns holds the columns for the table hg_sys_ems_log. var sysEmsLogColumns = SysEmsLogColumns{ Id: "id", Event: "event", @@ -47,44 +48,49 @@ var sysEmsLogColumns = SysEmsLogColumns{ } // NewSysEmsLogDao creates and returns a new DAO object for table data access. -func NewSysEmsLogDao() *SysEmsLogDao { +func NewSysEmsLogDao(handlers ...gdb.ModelHandler) *SysEmsLogDao { return &SysEmsLogDao{ - group: "default", - table: "hg_sys_ems_log", - columns: sysEmsLogColumns, + group: "default", + table: "hg_sys_ems_log", + columns: sysEmsLogColumns, + handlers: handlers, } } -// DB retrieves and returns the underlying raw database management object of current DAO. +// DB retrieves and returns the underlying raw database management object of the current DAO. func (dao *SysEmsLogDao) DB() gdb.DB { return g.DB(dao.group) } -// Table returns the table name of current dao. +// Table returns the table name of the current DAO. func (dao *SysEmsLogDao) Table() string { return dao.table } -// Columns returns all column names of current dao. +// Columns returns all column names of the current DAO. func (dao *SysEmsLogDao) Columns() SysEmsLogColumns { return dao.columns } -// Group returns the configuration group name of database of current dao. +// Group returns the database configuration group name of the current DAO. func (dao *SysEmsLogDao) Group() string { return dao.group } -// Ctx creates and returns the Model for current DAO, It automatically sets the context for current operation. +// Ctx creates and returns a Model for the current DAO. It automatically sets the context for the current operation. func (dao *SysEmsLogDao) Ctx(ctx context.Context) *gdb.Model { - return dao.DB().Model(dao.table).Safe().Ctx(ctx) + model := dao.DB().Model(dao.table) + for _, handler := range dao.handlers { + model = handler(model) + } + return model.Safe().Ctx(ctx) } // Transaction wraps the transaction logic using function f. -// It rollbacks the transaction and returns the error from function f if it returns non-nil error. +// It rolls back the transaction and returns the error if function f returns a non-nil error. // It commits the transaction and returns nil if function f returns nil. // -// Note that, you should not Commit or Rollback the transaction in function f +// Note: Do not commit or roll back the transaction in function f, // as it is automatically handled by this function. func (dao *SysEmsLogDao) Transaction(ctx context.Context, f func(ctx context.Context, tx gdb.TX) error) (err error) { return dao.Ctx(ctx).Transaction(ctx, f) diff --git a/server/internal/dao/internal/sys_gen_codes.go b/server/internal/dao/internal/sys_gen_codes.go index 6e0784b..e909a3f 100755 --- a/server/internal/dao/internal/sys_gen_codes.go +++ b/server/internal/dao/internal/sys_gen_codes.go @@ -11,14 +11,15 @@ import ( "github.com/gogf/gf/v2/frame/g" ) -// SysGenCodesDao is the data access object for table hg_sys_gen_codes. +// SysGenCodesDao is the data access object for the table hg_sys_gen_codes. type SysGenCodesDao struct { - table string // table is the underlying table name of the DAO. - group string // group is the database configuration group name of current DAO. - columns SysGenCodesColumns // columns contains all the column names of Table for convenient usage. + table string // table is the underlying table name of the DAO. + group string // group is the database configuration group name of the current DAO. + columns SysGenCodesColumns // columns contains all the column names of Table for convenient usage. + handlers []gdb.ModelHandler // handlers for customized model modification. } -// SysGenCodesColumns defines and stores column names for table hg_sys_gen_codes. +// SysGenCodesColumns defines and stores column names for the table hg_sys_gen_codes. type SysGenCodesColumns struct { Id string // 生成ID GenType string // 生成类型 @@ -36,7 +37,7 @@ type SysGenCodesColumns struct { UpdatedAt string // 更新时间 } -// sysGenCodesColumns holds the columns for table hg_sys_gen_codes. +// sysGenCodesColumns holds the columns for the table hg_sys_gen_codes. var sysGenCodesColumns = SysGenCodesColumns{ Id: "id", GenType: "gen_type", @@ -55,44 +56,49 @@ var sysGenCodesColumns = SysGenCodesColumns{ } // NewSysGenCodesDao creates and returns a new DAO object for table data access. -func NewSysGenCodesDao() *SysGenCodesDao { +func NewSysGenCodesDao(handlers ...gdb.ModelHandler) *SysGenCodesDao { return &SysGenCodesDao{ - group: "default", - table: "hg_sys_gen_codes", - columns: sysGenCodesColumns, + group: "default", + table: "hg_sys_gen_codes", + columns: sysGenCodesColumns, + handlers: handlers, } } -// DB retrieves and returns the underlying raw database management object of current DAO. +// DB retrieves and returns the underlying raw database management object of the current DAO. func (dao *SysGenCodesDao) DB() gdb.DB { return g.DB(dao.group) } -// Table returns the table name of current dao. +// Table returns the table name of the current DAO. func (dao *SysGenCodesDao) Table() string { return dao.table } -// Columns returns all column names of current dao. +// Columns returns all column names of the current DAO. func (dao *SysGenCodesDao) Columns() SysGenCodesColumns { return dao.columns } -// Group returns the configuration group name of database of current dao. +// Group returns the database configuration group name of the current DAO. func (dao *SysGenCodesDao) Group() string { return dao.group } -// Ctx creates and returns the Model for current DAO, It automatically sets the context for current operation. +// Ctx creates and returns a Model for the current DAO. It automatically sets the context for the current operation. func (dao *SysGenCodesDao) Ctx(ctx context.Context) *gdb.Model { - return dao.DB().Model(dao.table).Safe().Ctx(ctx) + model := dao.DB().Model(dao.table) + for _, handler := range dao.handlers { + model = handler(model) + } + return model.Safe().Ctx(ctx) } // Transaction wraps the transaction logic using function f. -// It rollbacks the transaction and returns the error from function f if it returns non-nil error. +// It rolls back the transaction and returns the error if function f returns a non-nil error. // It commits the transaction and returns nil if function f returns nil. // -// Note that, you should not Commit or Rollback the transaction in function f +// Note: Do not commit or roll back the transaction in function f, // as it is automatically handled by this function. func (dao *SysGenCodesDao) Transaction(ctx context.Context, f func(ctx context.Context, tx gdb.TX) error) (err error) { return dao.Ctx(ctx).Transaction(ctx, f) diff --git a/server/internal/dao/internal/sys_gen_curd_demo.go b/server/internal/dao/internal/sys_gen_curd_demo.go index 35b7376..25bd694 100755 --- a/server/internal/dao/internal/sys_gen_curd_demo.go +++ b/server/internal/dao/internal/sys_gen_curd_demo.go @@ -11,14 +11,15 @@ import ( "github.com/gogf/gf/v2/frame/g" ) -// SysGenCurdDemoDao is the data access object for table hg_sys_gen_curd_demo. +// SysGenCurdDemoDao is the data access object for the table hg_sys_gen_curd_demo. type SysGenCurdDemoDao struct { - table string // table is the underlying table name of the DAO. - group string // group is the database configuration group name of current DAO. - columns SysGenCurdDemoColumns // columns contains all the column names of Table for convenient usage. + table string // table is the underlying table name of the DAO. + group string // group is the database configuration group name of the current DAO. + columns SysGenCurdDemoColumns // columns contains all the column names of Table for convenient usage. + handlers []gdb.ModelHandler // handlers for customized model modification. } -// SysGenCurdDemoColumns defines and stores column names for table hg_sys_gen_curd_demo. +// SysGenCurdDemoColumns defines and stores column names for the table hg_sys_gen_curd_demo. type SysGenCurdDemoColumns struct { Id string // ID CategoryId string // 分类ID @@ -39,7 +40,7 @@ type SysGenCurdDemoColumns struct { DeletedAt string // 删除时间 } -// sysGenCurdDemoColumns holds the columns for table hg_sys_gen_curd_demo. +// sysGenCurdDemoColumns holds the columns for the table hg_sys_gen_curd_demo. var sysGenCurdDemoColumns = SysGenCurdDemoColumns{ Id: "id", CategoryId: "category_id", @@ -61,44 +62,49 @@ var sysGenCurdDemoColumns = SysGenCurdDemoColumns{ } // NewSysGenCurdDemoDao creates and returns a new DAO object for table data access. -func NewSysGenCurdDemoDao() *SysGenCurdDemoDao { +func NewSysGenCurdDemoDao(handlers ...gdb.ModelHandler) *SysGenCurdDemoDao { return &SysGenCurdDemoDao{ - group: "default", - table: "hg_sys_gen_curd_demo", - columns: sysGenCurdDemoColumns, + group: "default", + table: "hg_sys_gen_curd_demo", + columns: sysGenCurdDemoColumns, + handlers: handlers, } } -// DB retrieves and returns the underlying raw database management object of current DAO. +// DB retrieves and returns the underlying raw database management object of the current DAO. func (dao *SysGenCurdDemoDao) DB() gdb.DB { return g.DB(dao.group) } -// Table returns the table name of current dao. +// Table returns the table name of the current DAO. func (dao *SysGenCurdDemoDao) Table() string { return dao.table } -// Columns returns all column names of current dao. +// Columns returns all column names of the current DAO. func (dao *SysGenCurdDemoDao) Columns() SysGenCurdDemoColumns { return dao.columns } -// Group returns the configuration group name of database of current dao. +// Group returns the database configuration group name of the current DAO. func (dao *SysGenCurdDemoDao) Group() string { return dao.group } -// Ctx creates and returns the Model for current DAO, It automatically sets the context for current operation. +// Ctx creates and returns a Model for the current DAO. It automatically sets the context for the current operation. func (dao *SysGenCurdDemoDao) Ctx(ctx context.Context) *gdb.Model { - return dao.DB().Model(dao.table).Safe().Ctx(ctx) + model := dao.DB().Model(dao.table) + for _, handler := range dao.handlers { + model = handler(model) + } + return model.Safe().Ctx(ctx) } // Transaction wraps the transaction logic using function f. -// It rollbacks the transaction and returns the error from function f if it returns non-nil error. +// It rolls back the transaction and returns the error if function f returns a non-nil error. // It commits the transaction and returns nil if function f returns nil. // -// Note that, you should not Commit or Rollback the transaction in function f +// Note: Do not commit or roll back the transaction in function f, // as it is automatically handled by this function. func (dao *SysGenCurdDemoDao) Transaction(ctx context.Context, f func(ctx context.Context, tx gdb.TX) error) (err error) { return dao.Ctx(ctx).Transaction(ctx, f) diff --git a/server/internal/dao/internal/sys_gen_tree_demo.go b/server/internal/dao/internal/sys_gen_tree_demo.go index 583f210..5e3cdc5 100755 --- a/server/internal/dao/internal/sys_gen_tree_demo.go +++ b/server/internal/dao/internal/sys_gen_tree_demo.go @@ -11,14 +11,15 @@ import ( "github.com/gogf/gf/v2/frame/g" ) -// SysGenTreeDemoDao is the data access object for table hg_sys_gen_tree_demo. +// SysGenTreeDemoDao is the data access object for the table hg_sys_gen_tree_demo. type SysGenTreeDemoDao struct { - table string // table is the underlying table name of the DAO. - group string // group is the database configuration group name of current DAO. - columns SysGenTreeDemoColumns // columns contains all the column names of Table for convenient usage. + table string // table is the underlying table name of the DAO. + group string // group is the database configuration group name of the current DAO. + columns SysGenTreeDemoColumns // columns contains all the column names of Table for convenient usage. + handlers []gdb.ModelHandler // handlers for customized model modification. } -// SysGenTreeDemoColumns defines and stores column names for table hg_sys_gen_tree_demo. +// SysGenTreeDemoColumns defines and stores column names for the table hg_sys_gen_tree_demo. type SysGenTreeDemoColumns struct { Id string // ID Pid string // 上级ID @@ -36,7 +37,7 @@ type SysGenTreeDemoColumns struct { DeletedAt string // 删除时间 } -// sysGenTreeDemoColumns holds the columns for table hg_sys_gen_tree_demo. +// sysGenTreeDemoColumns holds the columns for the table hg_sys_gen_tree_demo. var sysGenTreeDemoColumns = SysGenTreeDemoColumns{ Id: "id", Pid: "pid", @@ -55,44 +56,49 @@ var sysGenTreeDemoColumns = SysGenTreeDemoColumns{ } // NewSysGenTreeDemoDao creates and returns a new DAO object for table data access. -func NewSysGenTreeDemoDao() *SysGenTreeDemoDao { +func NewSysGenTreeDemoDao(handlers ...gdb.ModelHandler) *SysGenTreeDemoDao { return &SysGenTreeDemoDao{ - group: "default", - table: "hg_sys_gen_tree_demo", - columns: sysGenTreeDemoColumns, + group: "default", + table: "hg_sys_gen_tree_demo", + columns: sysGenTreeDemoColumns, + handlers: handlers, } } -// DB retrieves and returns the underlying raw database management object of current DAO. +// DB retrieves and returns the underlying raw database management object of the current DAO. func (dao *SysGenTreeDemoDao) DB() gdb.DB { return g.DB(dao.group) } -// Table returns the table name of current dao. +// Table returns the table name of the current DAO. func (dao *SysGenTreeDemoDao) Table() string { return dao.table } -// Columns returns all column names of current dao. +// Columns returns all column names of the current DAO. func (dao *SysGenTreeDemoDao) Columns() SysGenTreeDemoColumns { return dao.columns } -// Group returns the configuration group name of database of current dao. +// Group returns the database configuration group name of the current DAO. func (dao *SysGenTreeDemoDao) Group() string { return dao.group } -// Ctx creates and returns the Model for current DAO, It automatically sets the context for current operation. +// Ctx creates and returns a Model for the current DAO. It automatically sets the context for the current operation. func (dao *SysGenTreeDemoDao) Ctx(ctx context.Context) *gdb.Model { - return dao.DB().Model(dao.table).Safe().Ctx(ctx) + model := dao.DB().Model(dao.table) + for _, handler := range dao.handlers { + model = handler(model) + } + return model.Safe().Ctx(ctx) } // Transaction wraps the transaction logic using function f. -// It rollbacks the transaction and returns the error from function f if it returns non-nil error. +// It rolls back the transaction and returns the error if function f returns a non-nil error. // It commits the transaction and returns nil if function f returns nil. // -// Note that, you should not Commit or Rollback the transaction in function f +// Note: Do not commit or roll back the transaction in function f, // as it is automatically handled by this function. func (dao *SysGenTreeDemoDao) Transaction(ctx context.Context, f func(ctx context.Context, tx gdb.TX) error) (err error) { return dao.Ctx(ctx).Transaction(ctx, f) diff --git a/server/internal/dao/internal/sys_log.go b/server/internal/dao/internal/sys_log.go index d3af6c1..79813b3 100755 --- a/server/internal/dao/internal/sys_log.go +++ b/server/internal/dao/internal/sys_log.go @@ -11,14 +11,15 @@ import ( "github.com/gogf/gf/v2/frame/g" ) -// SysLogDao is the data access object for table hg_sys_log. +// SysLogDao is the data access object for the table hg_sys_log. type SysLogDao struct { - table string // table is the underlying table name of the DAO. - group string // group is the database configuration group name of current DAO. - columns SysLogColumns // columns contains all the column names of Table for convenient usage. + table string // table is the underlying table name of the DAO. + group string // group is the database configuration group name of the current DAO. + columns SysLogColumns // columns contains all the column names of Table for convenient usage. + handlers []gdb.ModelHandler // handlers for customized model modification. } -// SysLogColumns defines and stores column names for table hg_sys_log. +// SysLogColumns defines and stores column names for the table hg_sys_log. type SysLogColumns struct { Id string // 日志ID ReqId string // 对外ID @@ -45,7 +46,7 @@ type SysLogColumns struct { UpdatedAt string // 修改时间 } -// sysLogColumns holds the columns for table hg_sys_log. +// sysLogColumns holds the columns for the table hg_sys_log. var sysLogColumns = SysLogColumns{ Id: "id", ReqId: "req_id", @@ -73,44 +74,49 @@ var sysLogColumns = SysLogColumns{ } // NewSysLogDao creates and returns a new DAO object for table data access. -func NewSysLogDao() *SysLogDao { +func NewSysLogDao(handlers ...gdb.ModelHandler) *SysLogDao { return &SysLogDao{ - group: "default", - table: "hg_sys_log", - columns: sysLogColumns, + group: "default", + table: "hg_sys_log", + columns: sysLogColumns, + handlers: handlers, } } -// DB retrieves and returns the underlying raw database management object of current DAO. +// DB retrieves and returns the underlying raw database management object of the current DAO. func (dao *SysLogDao) DB() gdb.DB { return g.DB(dao.group) } -// Table returns the table name of current dao. +// Table returns the table name of the current DAO. func (dao *SysLogDao) Table() string { return dao.table } -// Columns returns all column names of current dao. +// Columns returns all column names of the current DAO. func (dao *SysLogDao) Columns() SysLogColumns { return dao.columns } -// Group returns the configuration group name of database of current dao. +// Group returns the database configuration group name of the current DAO. func (dao *SysLogDao) Group() string { return dao.group } -// Ctx creates and returns the Model for current DAO, It automatically sets the context for current operation. +// Ctx creates and returns a Model for the current DAO. It automatically sets the context for the current operation. func (dao *SysLogDao) Ctx(ctx context.Context) *gdb.Model { - return dao.DB().Model(dao.table).Safe().Ctx(ctx) + model := dao.DB().Model(dao.table) + for _, handler := range dao.handlers { + model = handler(model) + } + return model.Safe().Ctx(ctx) } // Transaction wraps the transaction logic using function f. -// It rollbacks the transaction and returns the error from function f if it returns non-nil error. +// It rolls back the transaction and returns the error if function f returns a non-nil error. // It commits the transaction and returns nil if function f returns nil. // -// Note that, you should not Commit or Rollback the transaction in function f +// Note: Do not commit or roll back the transaction in function f, // as it is automatically handled by this function. func (dao *SysLogDao) Transaction(ctx context.Context, f func(ctx context.Context, tx gdb.TX) error) (err error) { return dao.Ctx(ctx).Transaction(ctx, f) diff --git a/server/internal/dao/internal/sys_login_log.go b/server/internal/dao/internal/sys_login_log.go index 5d0cfac..0637049 100755 --- a/server/internal/dao/internal/sys_login_log.go +++ b/server/internal/dao/internal/sys_login_log.go @@ -11,14 +11,15 @@ import ( "github.com/gogf/gf/v2/frame/g" ) -// SysLoginLogDao is the data access object for table hg_sys_login_log. +// SysLoginLogDao is the data access object for the table hg_sys_login_log. type SysLoginLogDao struct { - table string // table is the underlying table name of the DAO. - group string // group is the database configuration group name of current DAO. - columns SysLoginLogColumns // columns contains all the column names of Table for convenient usage. + table string // table is the underlying table name of the DAO. + group string // group is the database configuration group name of the current DAO. + columns SysLoginLogColumns // columns contains all the column names of Table for convenient usage. + handlers []gdb.ModelHandler // handlers for customized model modification. } -// SysLoginLogColumns defines and stores column names for table hg_sys_login_log. +// SysLoginLogColumns defines and stores column names for the table hg_sys_login_log. type SysLoginLogColumns struct { Id string // 日志ID ReqId string // 请求ID @@ -36,7 +37,7 @@ type SysLoginLogColumns struct { UpdatedAt string // 修改时间 } -// sysLoginLogColumns holds the columns for table hg_sys_login_log. +// sysLoginLogColumns holds the columns for the table hg_sys_login_log. var sysLoginLogColumns = SysLoginLogColumns{ Id: "id", ReqId: "req_id", @@ -55,44 +56,49 @@ var sysLoginLogColumns = SysLoginLogColumns{ } // NewSysLoginLogDao creates and returns a new DAO object for table data access. -func NewSysLoginLogDao() *SysLoginLogDao { +func NewSysLoginLogDao(handlers ...gdb.ModelHandler) *SysLoginLogDao { return &SysLoginLogDao{ - group: "default", - table: "hg_sys_login_log", - columns: sysLoginLogColumns, + group: "default", + table: "hg_sys_login_log", + columns: sysLoginLogColumns, + handlers: handlers, } } -// DB retrieves and returns the underlying raw database management object of current DAO. +// DB retrieves and returns the underlying raw database management object of the current DAO. func (dao *SysLoginLogDao) DB() gdb.DB { return g.DB(dao.group) } -// Table returns the table name of current dao. +// Table returns the table name of the current DAO. func (dao *SysLoginLogDao) Table() string { return dao.table } -// Columns returns all column names of current dao. +// Columns returns all column names of the current DAO. func (dao *SysLoginLogDao) Columns() SysLoginLogColumns { return dao.columns } -// Group returns the configuration group name of database of current dao. +// Group returns the database configuration group name of the current DAO. func (dao *SysLoginLogDao) Group() string { return dao.group } -// Ctx creates and returns the Model for current DAO, It automatically sets the context for current operation. +// Ctx creates and returns a Model for the current DAO. It automatically sets the context for the current operation. func (dao *SysLoginLogDao) Ctx(ctx context.Context) *gdb.Model { - return dao.DB().Model(dao.table).Safe().Ctx(ctx) + model := dao.DB().Model(dao.table) + for _, handler := range dao.handlers { + model = handler(model) + } + return model.Safe().Ctx(ctx) } // Transaction wraps the transaction logic using function f. -// It rollbacks the transaction and returns the error from function f if it returns non-nil error. +// It rolls back the transaction and returns the error if function f returns a non-nil error. // It commits the transaction and returns nil if function f returns nil. // -// Note that, you should not Commit or Rollback the transaction in function f +// Note: Do not commit or roll back the transaction in function f, // as it is automatically handled by this function. func (dao *SysLoginLogDao) Transaction(ctx context.Context, f func(ctx context.Context, tx gdb.TX) error) (err error) { return dao.Ctx(ctx).Transaction(ctx, f) diff --git a/server/internal/dao/internal/sys_provinces.go b/server/internal/dao/internal/sys_provinces.go index 76d3510..377de59 100755 --- a/server/internal/dao/internal/sys_provinces.go +++ b/server/internal/dao/internal/sys_provinces.go @@ -11,14 +11,15 @@ import ( "github.com/gogf/gf/v2/frame/g" ) -// SysProvincesDao is the data access object for table hg_sys_provinces. +// SysProvincesDao is the data access object for the table hg_sys_provinces. type SysProvincesDao struct { - table string // table is the underlying table name of the DAO. - group string // group is the database configuration group name of current DAO. - columns SysProvincesColumns // columns contains all the column names of Table for convenient usage. + table string // table is the underlying table name of the DAO. + group string // group is the database configuration group name of the current DAO. + columns SysProvincesColumns // columns contains all the column names of Table for convenient usage. + handlers []gdb.ModelHandler // handlers for customized model modification. } -// SysProvincesColumns defines and stores column names for table hg_sys_provinces. +// SysProvincesColumns defines and stores column names for the table hg_sys_provinces. type SysProvincesColumns struct { Id string // 省市区ID Title string // 栏目名称 @@ -34,7 +35,7 @@ type SysProvincesColumns struct { UpdatedAt string // 更新时间 } -// sysProvincesColumns holds the columns for table hg_sys_provinces. +// sysProvincesColumns holds the columns for the table hg_sys_provinces. var sysProvincesColumns = SysProvincesColumns{ Id: "id", Title: "title", @@ -51,44 +52,49 @@ var sysProvincesColumns = SysProvincesColumns{ } // NewSysProvincesDao creates and returns a new DAO object for table data access. -func NewSysProvincesDao() *SysProvincesDao { +func NewSysProvincesDao(handlers ...gdb.ModelHandler) *SysProvincesDao { return &SysProvincesDao{ - group: "default", - table: "hg_sys_provinces", - columns: sysProvincesColumns, + group: "default", + table: "hg_sys_provinces", + columns: sysProvincesColumns, + handlers: handlers, } } -// DB retrieves and returns the underlying raw database management object of current DAO. +// DB retrieves and returns the underlying raw database management object of the current DAO. func (dao *SysProvincesDao) DB() gdb.DB { return g.DB(dao.group) } -// Table returns the table name of current dao. +// Table returns the table name of the current DAO. func (dao *SysProvincesDao) Table() string { return dao.table } -// Columns returns all column names of current dao. +// Columns returns all column names of the current DAO. func (dao *SysProvincesDao) Columns() SysProvincesColumns { return dao.columns } -// Group returns the configuration group name of database of current dao. +// Group returns the database configuration group name of the current DAO. func (dao *SysProvincesDao) Group() string { return dao.group } -// Ctx creates and returns the Model for current DAO, It automatically sets the context for current operation. +// Ctx creates and returns a Model for the current DAO. It automatically sets the context for the current operation. func (dao *SysProvincesDao) Ctx(ctx context.Context) *gdb.Model { - return dao.DB().Model(dao.table).Safe().Ctx(ctx) + model := dao.DB().Model(dao.table) + for _, handler := range dao.handlers { + model = handler(model) + } + return model.Safe().Ctx(ctx) } // Transaction wraps the transaction logic using function f. -// It rollbacks the transaction and returns the error from function f if it returns non-nil error. +// It rolls back the transaction and returns the error if function f returns a non-nil error. // It commits the transaction and returns nil if function f returns nil. // -// Note that, you should not Commit or Rollback the transaction in function f +// Note: Do not commit or roll back the transaction in function f, // as it is automatically handled by this function. func (dao *SysProvincesDao) Transaction(ctx context.Context, f func(ctx context.Context, tx gdb.TX) error) (err error) { return dao.Ctx(ctx).Transaction(ctx, f) diff --git a/server/internal/dao/internal/sys_serve_license.go b/server/internal/dao/internal/sys_serve_license.go index b87e57f..46ef2f5 100755 --- a/server/internal/dao/internal/sys_serve_license.go +++ b/server/internal/dao/internal/sys_serve_license.go @@ -11,14 +11,15 @@ import ( "github.com/gogf/gf/v2/frame/g" ) -// SysServeLicenseDao is the data access object for table hg_sys_serve_license. +// SysServeLicenseDao is the data access object for the table hg_sys_serve_license. type SysServeLicenseDao struct { - table string // table is the underlying table name of the DAO. - group string // group is the database configuration group name of current DAO. - columns SysServeLicenseColumns // columns contains all the column names of Table for convenient usage. + table string // table is the underlying table name of the DAO. + group string // group is the database configuration group name of the current DAO. + columns SysServeLicenseColumns // columns contains all the column names of Table for convenient usage. + handlers []gdb.ModelHandler // handlers for customized model modification. } -// SysServeLicenseColumns defines and stores column names for table hg_sys_serve_license. +// SysServeLicenseColumns defines and stores column names for the table hg_sys_serve_license. type SysServeLicenseColumns struct { Id string // 许可ID Group string // 分组 @@ -39,7 +40,7 @@ type SysServeLicenseColumns struct { UpdatedAt string // 修改时间 } -// sysServeLicenseColumns holds the columns for table hg_sys_serve_license. +// sysServeLicenseColumns holds the columns for the table hg_sys_serve_license. var sysServeLicenseColumns = SysServeLicenseColumns{ Id: "id", Group: "group", @@ -61,44 +62,49 @@ var sysServeLicenseColumns = SysServeLicenseColumns{ } // NewSysServeLicenseDao creates and returns a new DAO object for table data access. -func NewSysServeLicenseDao() *SysServeLicenseDao { +func NewSysServeLicenseDao(handlers ...gdb.ModelHandler) *SysServeLicenseDao { return &SysServeLicenseDao{ - group: "default", - table: "hg_sys_serve_license", - columns: sysServeLicenseColumns, + group: "default", + table: "hg_sys_serve_license", + columns: sysServeLicenseColumns, + handlers: handlers, } } -// DB retrieves and returns the underlying raw database management object of current DAO. +// DB retrieves and returns the underlying raw database management object of the current DAO. func (dao *SysServeLicenseDao) DB() gdb.DB { return g.DB(dao.group) } -// Table returns the table name of current dao. +// Table returns the table name of the current DAO. func (dao *SysServeLicenseDao) Table() string { return dao.table } -// Columns returns all column names of current dao. +// Columns returns all column names of the current DAO. func (dao *SysServeLicenseDao) Columns() SysServeLicenseColumns { return dao.columns } -// Group returns the configuration group name of database of current dao. +// Group returns the database configuration group name of the current DAO. func (dao *SysServeLicenseDao) Group() string { return dao.group } -// Ctx creates and returns the Model for current DAO, It automatically sets the context for current operation. +// Ctx creates and returns a Model for the current DAO. It automatically sets the context for the current operation. func (dao *SysServeLicenseDao) Ctx(ctx context.Context) *gdb.Model { - return dao.DB().Model(dao.table).Safe().Ctx(ctx) + model := dao.DB().Model(dao.table) + for _, handler := range dao.handlers { + model = handler(model) + } + return model.Safe().Ctx(ctx) } // Transaction wraps the transaction logic using function f. -// It rollbacks the transaction and returns the error from function f if it returns non-nil error. +// It rolls back the transaction and returns the error if function f returns a non-nil error. // It commits the transaction and returns nil if function f returns nil. // -// Note that, you should not Commit or Rollback the transaction in function f +// Note: Do not commit or roll back the transaction in function f, // as it is automatically handled by this function. func (dao *SysServeLicenseDao) Transaction(ctx context.Context, f func(ctx context.Context, tx gdb.TX) error) (err error) { return dao.Ctx(ctx).Transaction(ctx, f) diff --git a/server/internal/dao/internal/sys_serve_log.go b/server/internal/dao/internal/sys_serve_log.go index df9c7e8..abf52f9 100755 --- a/server/internal/dao/internal/sys_serve_log.go +++ b/server/internal/dao/internal/sys_serve_log.go @@ -11,14 +11,15 @@ import ( "github.com/gogf/gf/v2/frame/g" ) -// SysServeLogDao is the data access object for table hg_sys_serve_log. +// SysServeLogDao is the data access object for the table hg_sys_serve_log. type SysServeLogDao struct { - table string // table is the underlying table name of the DAO. - group string // group is the database configuration group name of current DAO. - columns SysServeLogColumns // columns contains all the column names of Table for convenient usage. + table string // table is the underlying table name of the DAO. + group string // group is the database configuration group name of the current DAO. + columns SysServeLogColumns // columns contains all the column names of Table for convenient usage. + handlers []gdb.ModelHandler // handlers for customized model modification. } -// SysServeLogColumns defines and stores column names for table hg_sys_serve_log. +// SysServeLogColumns defines and stores column names for the table hg_sys_serve_log. type SysServeLogColumns struct { Id string // 日志ID TraceId string // 链路ID @@ -32,7 +33,7 @@ type SysServeLogColumns struct { UpdatedAt string // 修改时间 } -// sysServeLogColumns holds the columns for table hg_sys_serve_log. +// sysServeLogColumns holds the columns for the table hg_sys_serve_log. var sysServeLogColumns = SysServeLogColumns{ Id: "id", TraceId: "trace_id", @@ -47,44 +48,49 @@ var sysServeLogColumns = SysServeLogColumns{ } // NewSysServeLogDao creates and returns a new DAO object for table data access. -func NewSysServeLogDao() *SysServeLogDao { +func NewSysServeLogDao(handlers ...gdb.ModelHandler) *SysServeLogDao { return &SysServeLogDao{ - group: "default", - table: "hg_sys_serve_log", - columns: sysServeLogColumns, + group: "default", + table: "hg_sys_serve_log", + columns: sysServeLogColumns, + handlers: handlers, } } -// DB retrieves and returns the underlying raw database management object of current DAO. +// DB retrieves and returns the underlying raw database management object of the current DAO. func (dao *SysServeLogDao) DB() gdb.DB { return g.DB(dao.group) } -// Table returns the table name of current dao. +// Table returns the table name of the current DAO. func (dao *SysServeLogDao) Table() string { return dao.table } -// Columns returns all column names of current dao. +// Columns returns all column names of the current DAO. func (dao *SysServeLogDao) Columns() SysServeLogColumns { return dao.columns } -// Group returns the configuration group name of database of current dao. +// Group returns the database configuration group name of the current DAO. func (dao *SysServeLogDao) Group() string { return dao.group } -// Ctx creates and returns the Model for current DAO, It automatically sets the context for current operation. +// Ctx creates and returns a Model for the current DAO. It automatically sets the context for the current operation. func (dao *SysServeLogDao) Ctx(ctx context.Context) *gdb.Model { - return dao.DB().Model(dao.table).Safe().Ctx(ctx) + model := dao.DB().Model(dao.table) + for _, handler := range dao.handlers { + model = handler(model) + } + return model.Safe().Ctx(ctx) } // Transaction wraps the transaction logic using function f. -// It rollbacks the transaction and returns the error from function f if it returns non-nil error. +// It rolls back the transaction and returns the error if function f returns a non-nil error. // It commits the transaction and returns nil if function f returns nil. // -// Note that, you should not Commit or Rollback the transaction in function f +// Note: Do not commit or roll back the transaction in function f, // as it is automatically handled by this function. func (dao *SysServeLogDao) Transaction(ctx context.Context, f func(ctx context.Context, tx gdb.TX) error) (err error) { return dao.Ctx(ctx).Transaction(ctx, f) diff --git a/server/internal/dao/internal/sys_sms_log.go b/server/internal/dao/internal/sys_sms_log.go index 0103dea..da73d87 100755 --- a/server/internal/dao/internal/sys_sms_log.go +++ b/server/internal/dao/internal/sys_sms_log.go @@ -11,14 +11,15 @@ import ( "github.com/gogf/gf/v2/frame/g" ) -// SysSmsLogDao is the data access object for table hg_sys_sms_log. +// SysSmsLogDao is the data access object for the table hg_sys_sms_log. type SysSmsLogDao struct { - table string // table is the underlying table name of the DAO. - group string // group is the database configuration group name of current DAO. - columns SysSmsLogColumns // columns contains all the column names of Table for convenient usage. + table string // table is the underlying table name of the DAO. + group string // group is the database configuration group name of the current DAO. + columns SysSmsLogColumns // columns contains all the column names of Table for convenient usage. + handlers []gdb.ModelHandler // handlers for customized model modification. } -// SysSmsLogColumns defines and stores column names for table hg_sys_sms_log. +// SysSmsLogColumns defines and stores column names for the table hg_sys_sms_log. type SysSmsLogColumns struct { Id string // 主键 Event string // 事件 @@ -31,7 +32,7 @@ type SysSmsLogColumns struct { UpdatedAt string // 更新时间 } -// sysSmsLogColumns holds the columns for table hg_sys_sms_log. +// sysSmsLogColumns holds the columns for the table hg_sys_sms_log. var sysSmsLogColumns = SysSmsLogColumns{ Id: "id", Event: "event", @@ -45,44 +46,49 @@ var sysSmsLogColumns = SysSmsLogColumns{ } // NewSysSmsLogDao creates and returns a new DAO object for table data access. -func NewSysSmsLogDao() *SysSmsLogDao { +func NewSysSmsLogDao(handlers ...gdb.ModelHandler) *SysSmsLogDao { return &SysSmsLogDao{ - group: "default", - table: "hg_sys_sms_log", - columns: sysSmsLogColumns, + group: "default", + table: "hg_sys_sms_log", + columns: sysSmsLogColumns, + handlers: handlers, } } -// DB retrieves and returns the underlying raw database management object of current DAO. +// DB retrieves and returns the underlying raw database management object of the current DAO. func (dao *SysSmsLogDao) DB() gdb.DB { return g.DB(dao.group) } -// Table returns the table name of current dao. +// Table returns the table name of the current DAO. func (dao *SysSmsLogDao) Table() string { return dao.table } -// Columns returns all column names of current dao. +// Columns returns all column names of the current DAO. func (dao *SysSmsLogDao) Columns() SysSmsLogColumns { return dao.columns } -// Group returns the configuration group name of database of current dao. +// Group returns the database configuration group name of the current DAO. func (dao *SysSmsLogDao) Group() string { return dao.group } -// Ctx creates and returns the Model for current DAO, It automatically sets the context for current operation. +// Ctx creates and returns a Model for the current DAO. It automatically sets the context for the current operation. func (dao *SysSmsLogDao) Ctx(ctx context.Context) *gdb.Model { - return dao.DB().Model(dao.table).Safe().Ctx(ctx) + model := dao.DB().Model(dao.table) + for _, handler := range dao.handlers { + model = handler(model) + } + return model.Safe().Ctx(ctx) } // Transaction wraps the transaction logic using function f. -// It rollbacks the transaction and returns the error from function f if it returns non-nil error. +// It rolls back the transaction and returns the error if function f returns a non-nil error. // It commits the transaction and returns nil if function f returns nil. // -// Note that, you should not Commit or Rollback the transaction in function f +// Note: Do not commit or roll back the transaction in function f, // as it is automatically handled by this function. func (dao *SysSmsLogDao) Transaction(ctx context.Context, f func(ctx context.Context, tx gdb.TX) error) (err error) { return dao.Ctx(ctx).Transaction(ctx, f) diff --git a/server/internal/dao/internal/test_category.go b/server/internal/dao/internal/test_category.go index d6d895a..1ebbc81 100755 --- a/server/internal/dao/internal/test_category.go +++ b/server/internal/dao/internal/test_category.go @@ -11,14 +11,15 @@ import ( "github.com/gogf/gf/v2/frame/g" ) -// TestCategoryDao is the data access object for table hg_test_category. +// TestCategoryDao is the data access object for the table hg_test_category. type TestCategoryDao struct { - table string // table is the underlying table name of the DAO. - group string // group is the database configuration group name of current DAO. - columns TestCategoryColumns // columns contains all the column names of Table for convenient usage. + table string // table is the underlying table name of the DAO. + group string // group is the database configuration group name of the current DAO. + columns TestCategoryColumns // columns contains all the column names of Table for convenient usage. + handlers []gdb.ModelHandler // handlers for customized model modification. } -// TestCategoryColumns defines and stores column names for table hg_test_category. +// TestCategoryColumns defines and stores column names for the table hg_test_category. type TestCategoryColumns struct { Id string // 分类ID Name string // 分类名称 @@ -32,7 +33,7 @@ type TestCategoryColumns struct { DeletedAt string // 删除时间 } -// testCategoryColumns holds the columns for table hg_test_category. +// testCategoryColumns holds the columns for the table hg_test_category. var testCategoryColumns = TestCategoryColumns{ Id: "id", Name: "name", @@ -47,44 +48,49 @@ var testCategoryColumns = TestCategoryColumns{ } // NewTestCategoryDao creates and returns a new DAO object for table data access. -func NewTestCategoryDao() *TestCategoryDao { +func NewTestCategoryDao(handlers ...gdb.ModelHandler) *TestCategoryDao { return &TestCategoryDao{ - group: "default", - table: "hg_test_category", - columns: testCategoryColumns, + group: "default", + table: "hg_test_category", + columns: testCategoryColumns, + handlers: handlers, } } -// DB retrieves and returns the underlying raw database management object of current DAO. +// DB retrieves and returns the underlying raw database management object of the current DAO. func (dao *TestCategoryDao) DB() gdb.DB { return g.DB(dao.group) } -// Table returns the table name of current dao. +// Table returns the table name of the current DAO. func (dao *TestCategoryDao) Table() string { return dao.table } -// Columns returns all column names of current dao. +// Columns returns all column names of the current DAO. func (dao *TestCategoryDao) Columns() TestCategoryColumns { return dao.columns } -// Group returns the configuration group name of database of current dao. +// Group returns the database configuration group name of the current DAO. func (dao *TestCategoryDao) Group() string { return dao.group } -// Ctx creates and returns the Model for current DAO, It automatically sets the context for current operation. +// Ctx creates and returns a Model for the current DAO. It automatically sets the context for the current operation. func (dao *TestCategoryDao) Ctx(ctx context.Context) *gdb.Model { - return dao.DB().Model(dao.table).Safe().Ctx(ctx) + model := dao.DB().Model(dao.table) + for _, handler := range dao.handlers { + model = handler(model) + } + return model.Safe().Ctx(ctx) } // Transaction wraps the transaction logic using function f. -// It rollbacks the transaction and returns the error from function f if it returns non-nil error. +// It rolls back the transaction and returns the error if function f returns a non-nil error. // It commits the transaction and returns nil if function f returns nil. // -// Note that, you should not Commit or Rollback the transaction in function f +// Note: Do not commit or roll back the transaction in function f, // as it is automatically handled by this function. func (dao *TestCategoryDao) Transaction(ctx context.Context, f func(ctx context.Context, tx gdb.TX) error) (err error) { return dao.Ctx(ctx).Transaction(ctx, f) diff --git a/server/internal/dao/sys_addons_install.go b/server/internal/dao/sys_addons_install.go new file mode 100644 index 0000000..3eb6bac --- /dev/null +++ b/server/internal/dao/sys_addons_install.go @@ -0,0 +1,22 @@ +// ================================================================================= +// This file is auto-generated by the GoFrame CLI tool. You may modify it as needed. +// ================================================================================= + +package dao + +import ( + "hotgo/internal/dao/internal" +) + +// sysAddonsInstallDao is the data access object for the table hg_sys_addons_install. +// You can define custom methods on it to extend its functionality as needed. +type sysAddonsInstallDao struct { + *internal.SysAddonsInstallDao +} + +var ( + // SysAddonsInstall is a globally accessible object for table hg_sys_addons_install operations. + SysAddonsInstall = sysAddonsInstallDao{internal.NewSysAddonsInstallDao()} +) + +// Add your custom methods and functionality below. diff --git a/server/internal/library/casbin/enforcer.go b/server/internal/library/casbin/enforcer.go index fa06097..3676d11 100644 --- a/server/internal/library/casbin/enforcer.go +++ b/server/internal/library/casbin/enforcer.go @@ -16,6 +16,7 @@ import ( "github.com/casbin/casbin/v2" "github.com/casbin/casbin/v2/model" _ "github.com/gogf/gf/contrib/drivers/mysql/v2" + "github.com/gogf/gf/v2/container/gvar" "github.com/gogf/gf/v2/frame/g" "github.com/gogf/gf/v2/os/gfile" "github.com/gogf/gf/v2/os/gres" @@ -35,7 +36,7 @@ var Enforcer *casbin.Enforcer // InitEnforcer 初始化 func InitEnforcer(ctx context.Context) { var ( - link = g.Cfg().MustGet(ctx, "database.default.link") + link = getDbLink(ctx) a, err = NewAdapter(link.String()) ) @@ -70,6 +71,26 @@ func InitEnforcer(ctx context.Context) { loadPermissions(ctx) } +// GetDbLink 获取数据库链接 +func getDbLink(ctx context.Context) *gvar.Var { + + link := g.Cfg().MustGet(ctx, "database.default") + //读写分离 + if !link.IsSlice() { + return g.Cfg().MustGet(ctx, "database.default.link") + } + + for _, v := range link.Array() { + // 只获取主库 + val := v.(map[string]interface{}) + if val["role"] == "master" { + return gvar.New(val["link"]) + } + } + return gvar.New("database.default.0.link") + +} + func loadPermissions(ctx context.Context) { type Policy struct { Key string `json:"key"` diff --git a/server/internal/library/payment/wxpay/handle.go b/server/internal/library/payment/wxpay/handle.go index 6e55d73..86de3db 100644 --- a/server/internal/library/payment/wxpay/handle.go +++ b/server/internal/library/payment/wxpay/handle.go @@ -11,6 +11,7 @@ import ( "github.com/go-pay/crypto/xpem" "github.com/go-pay/gopay" "github.com/go-pay/gopay/wechat/v3" + "github.com/go-pay/smap" "github.com/gogf/gf/v2/errors/gerror" "github.com/gogf/gf/v2/net/ghttp" "github.com/gogf/gf/v2/os/gtime" @@ -142,16 +143,16 @@ func GetClient(config *model.PayConfig) (client *wechat.ClientV3, err error) { if err != nil { return } - snPkMap := make(map[string]*rsa.PublicKey) + + client.SnCertMap = smap.Map[string, *rsa.PublicKey]{} for sn, cert := range snCertMap { pubKey, err := xpem.DecodePublicKey([]byte(cert)) if err != nil { return nil, err } - snPkMap[sn] = pubKey + client.SnCertMap.Store(sn, pubKey) } - client.SnCertMap = snPkMap client.WxSerialNo = serialNo // 打开Debug开关,输出日志,默认关闭 @@ -167,15 +168,14 @@ func getPublicKeyMap(client *wechat.ClientV3) (wxPublicKeyMap map[string]*rsa.Pu return } - snPkMap := make(map[string]*rsa.PublicKey) + client.SnCertMap = smap.Map[string, *rsa.PublicKey]{} for sn, cert := range snCertMap { pubKey, err := xpem.DecodePublicKey([]byte(cert)) if err != nil { return nil, err } - snPkMap[sn] = pubKey + client.SnCertMap.Store(sn, pubKey) } - client.SnCertMap = snPkMap client.WxSerialNo = serialNo wxPublicKeyMap = client.WxPublicKeyMap() diff --git a/server/internal/model/do/sys_addons_install.go b/server/internal/model/do/sys_addons_install.go new file mode 100644 index 0000000..7af0467 --- /dev/null +++ b/server/internal/model/do/sys_addons_install.go @@ -0,0 +1,21 @@ +// ================================================================================= +// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT. +// ================================================================================= + +package do + +import ( + "github.com/gogf/gf/v2/frame/g" + "github.com/gogf/gf/v2/os/gtime" +) + +// SysAddonsInstall is the golang structure of table hg_sys_addons_install for DAO operations like Where/Data. +type SysAddonsInstall struct { + g.Meta `orm:"table:hg_sys_addons_install, do:true"` + Id interface{} // 主键 + Name interface{} // 插件名称 + Version interface{} // 版本号 + Status interface{} // 状态 + CreatedAt *gtime.Time // 创建时间 + UpdatedAt *gtime.Time // 更新时间 +} diff --git a/server/internal/model/entity/sys_addons_install.go b/server/internal/model/entity/sys_addons_install.go new file mode 100644 index 0000000..ab03e1c --- /dev/null +++ b/server/internal/model/entity/sys_addons_install.go @@ -0,0 +1,19 @@ +// ================================================================================= +// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT. +// ================================================================================= + +package entity + +import ( + "github.com/gogf/gf/v2/os/gtime" +) + +// SysAddonsInstall is the golang structure for table sys_addons_install. +type SysAddonsInstall struct { + Id int64 `json:"id" orm:"id" description:"主键"` + Name string `json:"name" orm:"name" description:"插件名称"` + Version string `json:"version" orm:"version" description:"版本号"` + Status int `json:"status" orm:"status" description:"状态"` + CreatedAt *gtime.Time `json:"createdAt" orm:"created_at" description:"创建时间"` + UpdatedAt *gtime.Time `json:"updatedAt" orm:"updated_at" description:"更新时间"` +} diff --git a/server/utility/excel/excel.go b/server/utility/excel/excel.go index b9d1094..e9d0cab 100644 --- a/server/utility/excel/excel.go +++ b/server/utility/excel/excel.go @@ -26,7 +26,17 @@ var ( // 单元格表头 char = []string{"", "A", "B", "C", "D", "E", "F", "G", "H", "I", "J", "K", "L", "M", "N", "O", "P", "Q", "R", "S", "T", "U", "V", "W", "X", "Y", "Z"} // 默认行样式 - defaultRowStyle = `{"font":{"color":"#666666","size":13,"family":"arial"},"alignment":{"vertical":"center","horizontal":"center"}}` + defaultRowStyle = &excelize.Style{ + Font: &excelize.Font{ + Color: "#666666", + Size: 13, + Family: "Arial", + }, + Alignment: &excelize.Alignment{ + Horizontal: "center", + Vertical: "center", + }, + } ) // ExportByStructs 导出切片结构体到excel表格 diff --git a/web/.env.development b/web/.env.development index 6a1e227..d618ebf 100644 --- a/web/.env.development +++ b/web/.env.development @@ -13,6 +13,7 @@ VITE_DROP_CONSOLE=true #VITE_PROXY = [["/appApi","http://localhost:8001"],["/upload","http://localhost:8001/upload"]] VITE_PROXY=[["/admin","http://localhost:8000/admin"]] + # API 接口地址 VITE_GLOB_API_URL= @@ -24,3 +25,10 @@ VITE_GLOB_IMG_URL= # 接口前缀 VITE_GLOB_API_URL_PREFIX=/admin + +# 快速登录账号密码配置,没有配置则不开启快速登录 +## 格式为 [["账号名称","账号密码","角色名称"],["账号名称","账号密码"],["账号名称"]] +## 帐号名称不能为空,密码为空则和帐号名称相同 +## 角色名称可选,如果不填写则默认使用账号名称作为角色名称 +## 账号名称和角色名称可以重复,账号名称和密码可以重复 +VITE_APP_DEMO_ACCOUNT=[["admin","123456","超管"],["test","123456","管理员"],["ameng","123456","租户"],["abai","123456","商户"],["asong","123456","用户"]] \ No newline at end of file diff --git a/web/build/utils.ts b/web/build/utils.ts index b319538..9653cea 100644 --- a/web/build/utils.ts +++ b/web/build/utils.ts @@ -34,7 +34,7 @@ export function wrapperEnv(envConf: Recordable): ViteEnv { } catch (error) {} } ret[envName] = realName; - process.env[envName] = realName; + // process.env[envName] = realName; } return ret; } diff --git a/web/src/debug/account.ts b/web/src/debug/account.ts new file mode 100644 index 0000000..df545ee --- /dev/null +++ b/web/src/debug/account.ts @@ -0,0 +1,43 @@ +import { isArray } from "@/utils/is"; + +interface Account { + /** + * 账号名称 + */ + name: string; + /** + * 用户名 + */ + username: string; + /** + * 密码 + */ + password: string; +} +/** + * 获取配置的账号信息 + * @returns {[]Account} 返回账号信息数组 + */ +export function getDemoAccounts() { + + let envConf = import.meta.env.VITE_APP_DEMO_ACCOUNT || ""; + // 帐号密码一样 + // [["username"],["username","password"],["username","password","name"]] + try { + let accounts = JSON.parse(envConf); + if (accounts && isArray(accounts)) { + return accounts.map((item: String[]) => { + let [username = "", password = "", name = ""] = item; + username = username; + password = password || username; + name = name || username; + return { + name, + username, + password, + } as Account; + }); + } + } catch (error) {} + return [] as Account[]; +} diff --git a/web/src/hooks/useBoolean.ts b/web/src/hooks/useBoolean.ts new file mode 100644 index 0000000..1646ffa --- /dev/null +++ b/web/src/hooks/useBoolean.ts @@ -0,0 +1,49 @@ +import { ref, Ref } from "vue"; + +type Resettable = + /** + * 基础形式为一个元组,包含: + * 1. `Ref`:状态引用,可以直接访问和修改状态值 + * 2. `() => void`:切换真假 + * 3. `(value: boolean) => void`:设置状态 + * 4.`() => void`:设置为`true`方法 + * 5.`() => void`:设置为`false`方法 + */ + [Ref, () => void, () => void] & /** + * 同时扩展为一个对象形式,提供以下属性和方法: + * - `loading: Ref`:状态引用,与元组中的第一个元素相同 + * - `startLoading: () => void`:开始加载方法,与元组中的第二个元素相同 + * - `endLoading: () => void`:结束加载方法,与元组中的第三个元素相同 + */ { + /** 加载状态引用 */ + bool: Ref; + toggle: () => void; + setBool: (value: boolean) => void; + setTrue: () => void; + setFalse: () => void; + }; +export default function useBoolean(initValue = false): Resettable { + const bool = ref(initValue); + + function setBool(value: boolean) { + bool.value = value; + } + function setTrue() { + setBool(true); + } + function setFalse() { + setBool(false); + } + function toggle() { + setBool(!bool.value); + } + + // 返回带加载状态引用、开始加载和结束加载方法的扩展数组 + return (Object.assign([bool, toggle, setBool, setTrue, setFalse], { + bool, + toggle, + setBool, + setTrue, + setFalse, + }) as unknown) as Resettable; +} diff --git a/web/src/layout/components/Header/Search.vue b/web/src/layout/components/Header/Search.vue new file mode 100644 index 0000000..05cdee1 --- /dev/null +++ b/web/src/layout/components/Header/Search.vue @@ -0,0 +1,241 @@ + + + diff --git a/web/src/layout/components/Header/index.vue b/web/src/layout/components/Header/index.vue index 3e91bcb..8756836 100644 --- a/web/src/layout/components/Header/index.vue +++ b/web/src/layout/components/Header/index.vue @@ -69,6 +69,7 @@
+ @@ -200,6 +201,8 @@ import { notificationStoreWidthOut } from '@/store/modules/notification'; import { getIcon } from '@/enums/systemMessageEnum'; + import Search from './Search.vue'; + export default defineComponent({ name: 'PageHeader', components: { @@ -208,6 +211,7 @@ ProjectSetting, AsideMenu, SystemMessage, + Search, }, props: { collapsed: { diff --git a/web/src/utils/tree.ts b/web/src/utils/tree.ts new file mode 100644 index 0000000..b67e076 --- /dev/null +++ b/web/src/utils/tree.ts @@ -0,0 +1,97 @@ +/** + * 树形数组转平级 + * @date 2023-01-09 + * @returns {array} + */ +export const tree2FlatArray = (tree: any[], childrenKey: string = "children") => { + return tree.reduce((arr, item) => { + var children = item?.[childrenKey] ?? []; + var obj = item; + delete obj[childrenKey]; + //解构赋值+默认值 + return arr.concat([obj], tree2FlatArray(children)); //children部分进行递归 + }, []); +}; +/** + * 树形数组转对象 + * @date 2023-01-09 + * @returns {object} + */ +export const tree2Objects = ( + tree: any[], + key: string = "id", + childrenKey: string = "children" +) => { + let rows = tree2FlatArray(tree, childrenKey); + let objects = {}; + rows.forEach((item) => { + objects[item[key]] = item; + }); + return objects; +}; + +/** + * 树形菜单数据输出 + * @date 2022-04-20 + * @param {object} data - 数据 + * @param {string} pid="parent_id" - 父类名称 + * @param {string} children="children" - 子类名称 + * @returns {object} + */ +export const treesBy = ( + data: any[], + pid: string = "parent_id", + children: string = "children" +) => { + let map = {}, + val = []; + data.forEach((item) => { + item[children] = []; + map[item.id] = item; + }); + data.forEach((item) => { + const parent = map[item[pid]]; + if (!!parent) { + parent[children].push(item); + } else { + val.push(item); + } + }); + return val; +}; +/** + * 格式化树形菜单,省市区 + * @param {object} org + * @returns {object} + */ +export const mapTree = (org: any, keyId = "v", keyChild = "s", keyName = "n") => { + const haveChildren = + org[keyChild] && Array.isArray(org[keyChild]) && org[keyChild].length > 0; + return { + key: org[keyId], + value: String(org[keyId]), + label: org[keyName], + isLeaf: true, + children: haveChildren ? org[keyChild].map((i) => mapTree(i)) : [], + }; +}; + +/** + * 格式化树形菜单,省市区 + * @param {object} org + * @returns {object} + */ +export const toFlatArray = ( + tree: any[], + parentId: string | number, + keyId: string | number = "key" +) => { + return tree.reduce((t, _) => { + const child = _["children"]; + return [ + ...t, + { [keyId]: _[keyId], parentId }, + ...(child && child.length ? toFlatArray(child, _[keyId]) : []), + ]; + }, []); +}; diff --git a/web/src/views/login/login/demo-account.vue b/web/src/views/login/login/demo-account.vue index 7a725c1..5dda468 100644 --- a/web/src/views/login/login/demo-account.vue +++ b/web/src/views/login/login/demo-account.vue @@ -1,60 +1,37 @@