mirror of
https://github.com/bufanyun/hotgo.git
synced 2025-11-13 12:43:45 +08:00
发布v2.18.6版本,更新内容请查看:https://github.com/bufanyun/hotgo/blob/v2.0/docs/guide-zh-CN/start-update-log.md
This commit is contained in:
@@ -77,6 +77,9 @@ type SiteLoginConfigReq struct {
|
||||
|
||||
type SiteLoginConfigRes struct {
|
||||
*model.LoginConfig
|
||||
I18nSwitch bool `json:"i18nSwitch" dc:"国际化开关"`
|
||||
DefaultLanguage string `json:"defaultLanguage" dc:"默认语言设置"`
|
||||
ProjectName string `json:"projectName" dc:"项目名称"`
|
||||
}
|
||||
|
||||
// SitePingReq ping
|
||||
|
||||
@@ -36,3 +36,13 @@ type UploadPartReq struct {
|
||||
type UploadPartRes struct {
|
||||
*sysin.UploadPartModel
|
||||
}
|
||||
|
||||
// ImageTransferStorageReq 图片链接转存
|
||||
type ImageTransferStorageReq struct {
|
||||
g.Meta `path:"/upload/imageTransferStorage" tags:"附件" method:"post" summary:"图片链接转存"`
|
||||
sysin.ImageTransferStorageInp
|
||||
}
|
||||
|
||||
type ImageTransferStorageRes struct {
|
||||
*sysin.ImageTransferStorageModel
|
||||
}
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
// Package optiontreedemo
|
||||
// @Link https://github.com/bufanyun/hotgo
|
||||
// @Copyright Copyright (c) 2024 HotGo CLI
|
||||
// @Copyright Copyright (c) 2025 HotGo CLI
|
||||
// @Author Ms <133814250@qq.com>
|
||||
// @License https://github.com/bufanyun/hotgo/blob/master/LICENSE
|
||||
// @AutoGenerate Version 2.15.7
|
||||
// @AutoGenerate Version 2.17.8
|
||||
package optiontreedemo
|
||||
|
||||
import (
|
||||
@@ -66,4 +66,4 @@ type TreeOptionReq struct {
|
||||
g.Meta `path:"/optionTreeDemo/treeOption" method:"get" tags:"选项树表" summary:"获取选项树表关系树选项"`
|
||||
}
|
||||
|
||||
type TreeOptionRes []tree.Node
|
||||
type TreeOptionRes []tree.Node
|
||||
@@ -14,17 +14,18 @@ require (
|
||||
github.com/forgoer/openssl v1.6.1
|
||||
github.com/go-pay/crypto v0.0.1
|
||||
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/go-pay/smap v0.0.2
|
||||
github.com/gogf/gf/contrib/drivers/mysql/v2 v2.9.4
|
||||
github.com/gogf/gf/contrib/nosql/redis/v2 v2.9.4
|
||||
github.com/gogf/gf/contrib/trace/jaeger/v2 v2.7.4
|
||||
github.com/gogf/gf/v2 v2.9.1-0.20250624075347-5fa656d1cc92
|
||||
github.com/gogf/gf/v2 v2.9.4
|
||||
github.com/gogf/selfupdate v0.0.0-20231215043001-5c48c528462f
|
||||
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.94
|
||||
github.com/mojocn/base64Captcha v1.3.8
|
||||
github.com/olekukonko/tablewriter v0.0.5
|
||||
github.com/olekukonko/tablewriter v1.1.0
|
||||
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
|
||||
@@ -34,16 +35,16 @@ require (
|
||||
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
|
||||
go.opentelemetry.io/otel v1.38.0
|
||||
golang.org/x/mod v0.26.0
|
||||
golang.org/x/net v0.43.0
|
||||
golang.org/x/tools v0.35.0
|
||||
gopkg.in/yaml.v3 v3.0.1
|
||||
)
|
||||
|
||||
require (
|
||||
aead.dev/minisign v0.2.0 // indirect
|
||||
github.com/BurntSushi/toml v1.4.0 // indirect
|
||||
github.com/BurntSushi/toml v1.5.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
|
||||
@@ -66,14 +67,13 @@ 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.7.0 // indirect
|
||||
github.com/fsnotify/fsnotify v1.9.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.3 // indirect
|
||||
github.com/go-logr/stdr v1.2.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
|
||||
@@ -100,8 +100,8 @@ require (
|
||||
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/mattn/go-colorable v0.1.13 // indirect
|
||||
github.com/magiconair/properties v1.8.10 // indirect
|
||||
github.com/mattn/go-colorable v0.1.14 // 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
|
||||
@@ -111,15 +111,15 @@ require (
|
||||
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect
|
||||
github.com/modern-go/reflect2 v1.0.2 // 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/olekukonko/errors v1.1.0 // indirect
|
||||
github.com/olekukonko/ll v0.0.9 // indirect
|
||||
github.com/patrickmn/go-cache v2.1.0+incompatible // 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/redis/go-redis/v9 v9.12.1 // indirect
|
||||
github.com/richardlehane/mscfb v1.0.4 // indirect
|
||||
github.com/richardlehane/msoleps v1.0.4 // indirect
|
||||
github.com/rivo/uniseg v0.4.7 // indirect
|
||||
@@ -140,17 +140,17 @@ require (
|
||||
github.com/yusufpapurcu/wmi v1.2.4 // 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.37.0 // indirect
|
||||
go.opentelemetry.io/otel/metric v1.38.0 // indirect
|
||||
go.opentelemetry.io/otel/sdk v1.38.0 // indirect
|
||||
go.opentelemetry.io/otel/trace v1.38.0 // indirect
|
||||
go.uber.org/atomic v1.5.1 // indirect
|
||||
golang.org/x/crypto v0.39.0 // indirect
|
||||
golang.org/x/crypto v0.41.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/sync v0.16.0 // indirect
|
||||
golang.org/x/sys v0.35.0 // indirect
|
||||
golang.org/x/term v0.34.0 // indirect
|
||||
golang.org/x/text v0.28.0 // indirect
|
||||
golang.org/x/time v0.12.0 // indirect
|
||||
gopkg.in/ini.v1 v1.67.0 // indirect
|
||||
gopkg.in/natefinch/lumberjack.v2 v2.0.0 // indirect
|
||||
|
||||
107
server/go.sum
107
server/go.sum
@@ -4,8 +4,8 @@ cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMT
|
||||
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/BurntSushi/toml v1.5.0 h1:W5quZX/G/csjUnuI8SUYlsHs9M38FC7znL0lIO+DvMg=
|
||||
github.com/BurntSushi/toml v1.5.0/go.mod h1:ukJfTF/6rtPPRCnwkur4qwRxa8vTRFBF0uk2lLoLwho=
|
||||
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=
|
||||
@@ -131,8 +131,8 @@ github.com/fortytw2/leaktest v1.3.0 h1:u8491cBMTQ8ft8aeV+adlcytMZylmA5nnwwkRZjI8
|
||||
github.com/fortytw2/leaktest v1.3.0/go.mod h1:jDsjWgpAGjm2CA7WthBh/CdZYEPF31XHquHwclZch5g=
|
||||
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.7.0 h1:8JEhPFa5W2WU7YfeZzPNqzMP6Lwt7L2715Ggo0nosvA=
|
||||
github.com/fsnotify/fsnotify v1.7.0/go.mod h1:40Bi/Hjc2AVfZrqy+aj+yEI+/bRxZnMJyTJwOpGvigM=
|
||||
github.com/fsnotify/fsnotify v1.9.0 h1:2Ml+OJNzbYCTzsxtv8vKSFD9PbJjmhYF14k/jKC7S9k=
|
||||
github.com/fsnotify/fsnotify v1.9.0/go.mod h1:8jBTzvmWwFyi3Pb8djgCCO5IBqzKJ/Jwo8TRcHyHii0=
|
||||
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=
|
||||
@@ -173,16 +173,14 @@ 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/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=
|
||||
github.com/gogf/gf/contrib/nosql/redis/v2 v2.9.0/go.mod h1:LHrxY+2IzNTHVTPG/s5yaz1VmXbj+CQ7Hr5SeVkHiTw=
|
||||
github.com/gogf/gf/contrib/drivers/mysql/v2 v2.9.4 h1:ntAPahCjQwQ79CC6tI67QDgj17NTWp+lMd1SaL2jJhs=
|
||||
github.com/gogf/gf/contrib/drivers/mysql/v2 v2.9.4/go.mod h1:/350+9clTW5ktUvF+hePMN9yDknB2ipslqcx3Y2rLDQ=
|
||||
github.com/gogf/gf/contrib/nosql/redis/v2 v2.9.4 h1:iKXUQ+8TklSriAqOQjfwioI36zlByqrDqz4ISaRFvm8=
|
||||
github.com/gogf/gf/contrib/nosql/redis/v2 v2.9.4/go.mod h1:PYVwyQ0gN+w3wL7zKAoeUpy2WFs4/V8+Ls+eNsy7Uo0=
|
||||
github.com/gogf/gf/contrib/trace/jaeger/v2 v2.7.4 h1:JnUjXb7C9vmwcZFwXqnxi9H4/I0rir9LmRryIX7xNds=
|
||||
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/gf/v2 v2.9.4 h1:6vleEWypot9WBPncP2GjbpgAUeG6Mzb1YESb9nPMkjY=
|
||||
github.com/gogf/gf/v2 v2.9.4/go.mod h1:Ukl+5HUH9S7puBmNLR4L1zUqeRwi0nrW4OigOknEztU=
|
||||
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/go.mod h1:pqrtFR0X4osieyHYxtmOUWsAWrfe1Q5UVIyoH402zdk=
|
||||
@@ -289,14 +287,12 @@ github.com/leodido/go-urn v1.2.0/go.mod h1:+8+nEpDfqqsY+g338gtMEUOtuK+4dEMhiQEgx
|
||||
github.com/leodido/go-urn v1.2.1/go.mod h1:zt4jvISO2HfUBqxjfIshjdMTYS56ZS/qv49ictyFfxY=
|
||||
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/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=
|
||||
github.com/magiconair/properties v1.8.10 h1:s31yESBquKXCV9a/ScB3ESkOjUYYv+X0rg8SYxI99mE=
|
||||
github.com/magiconair/properties v1.8.10/go.mod h1:Dhd985XPs7jluiymwWYZ0G4Z61jb3vdS329zhj2hYo0=
|
||||
github.com/mattn/go-colorable v0.1.14 h1:9A9LHSqF/7dyVVX6g0U9cwm9pG3kP9gSzcuIPHPsaIE=
|
||||
github.com/mattn/go-colorable v0.1.14/go.mod h1:6LmQG8QLFO4G5z1gPvYEzlUgJ2wF+stgPZH1UqBm1s8=
|
||||
github.com/mattn/go-isatty v0.0.20 h1:xfD0iDuEKnDkl03q4limB+vH+GxLEtL/jb4xVJSWWEY=
|
||||
github.com/mattn/go-isatty v0.0.20/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y=
|
||||
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=
|
||||
@@ -325,14 +321,12 @@ github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e/go.mod h1:zD1mROLA
|
||||
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/olekukonko/errors v1.1.0 h1:RNuGIh15QdDenh+hNvKrJkmxxjV4hcS50Db478Ou5sM=
|
||||
github.com/olekukonko/errors v1.1.0/go.mod h1:ppzxA5jBKcO1vIpCXQ9ZqgDh8iwODz6OXIGKU8r5m4Y=
|
||||
github.com/olekukonko/ll v0.0.9 h1:Y+1YqDfVkqMWuEQMclsF9HUR5+a82+dxJuL1HHSRpxI=
|
||||
github.com/olekukonko/ll v0.0.9/go.mod h1:En+sEW0JNETl26+K8eZ6/W4UQ7CYSrrgg/EdIYT2H8g=
|
||||
github.com/olekukonko/tablewriter v1.1.0 h1:N0LHrshF4T39KvI96fn6GT8HEjXRXYNDrDjKFDB7RIY=
|
||||
github.com/olekukonko/tablewriter v1.1.0/go.mod h1:5c+EBPeSqvXnLLgkm9isDdzR3wjfBkHR9Nhfp3NWrzo=
|
||||
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=
|
||||
@@ -364,8 +358,8 @@ github.com/qiniu/go-sdk/v7 v7.25.4/go.mod h1:dmKtJ2ahhPWFVi9o1D5GemmWoh/ctuB9peq
|
||||
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=
|
||||
github.com/redis/go-redis/v9 v9.7.0 h1:HhLSs+B6O021gwzl+locl0zEDnyNkxMtf/Z3NNBMa9E=
|
||||
github.com/redis/go-redis/v9 v9.7.0/go.mod h1:f6zhXITC7JUJIlPEiBOTXxJgPLdZcA93GewI7inzyWw=
|
||||
github.com/redis/go-redis/v9 v9.12.1 h1:k5iquqv27aBtnTm2tIkROUDp8JBXhXZIVu1InSgvovg=
|
||||
github.com/redis/go-redis/v9 v9.12.1/go.mod h1:huWgSWd8mW6+m0VPhJjSSQ+d6Nh1VICQ6Q5lHuCH/Iw=
|
||||
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=
|
||||
@@ -415,8 +409,8 @@ github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/
|
||||
github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
|
||||
github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU=
|
||||
github.com/stretchr/testify v1.8.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4=
|
||||
github.com/stretchr/testify v1.10.0 h1:Xv5erBjTwe/5IxqUQTdXv5kgmIvbHo3QQyRwhJsOfJA=
|
||||
github.com/stretchr/testify v1.10.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY=
|
||||
github.com/stretchr/testify v1.11.1 h1:7s2iGBzp5EwR7/aIZr8ao5+dra3wiQyKjjFuvgVKu7U=
|
||||
github.com/stretchr/testify v1.11.1/go.mod h1:wZwfW3scLgRK+23gO65QZefKpKQRnfz6sD981Nm4B6U=
|
||||
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.1200/go.mod h1:r5r4xbfxSaeR04b166HGsBa/R4U3SueirEUpXGuw+Q0=
|
||||
github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common v1.0.1202 h1:3QTQZXLLGLALyHNHs6WAsFCWvElMEXfOdaFM01/3Zjo=
|
||||
@@ -462,18 +456,22 @@ github.com/yusufpapurcu/wmi v1.2.4 h1:zFUKzehAFReQwLys1b/iSMl+JQGSCSjtVqQn9bBrPo
|
||||
github.com/yusufpapurcu/wmi v1.2.4/go.mod h1:SBZ9tNy3G9/m5Oi98Zks0QjeHVDvuK0qfxQmPyzfmi0=
|
||||
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 v1.38.0 h1:RkfdswUDRimDg0m2Az18RKOsnI8UDzppJAtj01/Ymk8=
|
||||
go.opentelemetry.io/otel v1.38.0/go.mod h1:zcmtmQ1+YmQM9wrNsTGV/q/uyusom3P8RxwExxkZhjM=
|
||||
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.37.0 h1:HLdcFNbRQBE2imdSEgm/kwqmQj1Or1l/7bW6mxVK7z4=
|
||||
go.opentelemetry.io/otel/trace v1.37.0/go.mod h1:TlgrlQ+PtQO5XFerSPUYG0JSgGyryXewPGyayAWSBS0=
|
||||
go.opentelemetry.io/otel/metric v1.38.0 h1:Kl6lzIYGAh5M159u9NgiRkmoMKjvbsKtYRwgfrA6WpA=
|
||||
go.opentelemetry.io/otel/metric v1.38.0/go.mod h1:kB5n/QoRM8YwmUahxvI3bO34eVtQf2i4utNVLr9gEmI=
|
||||
go.opentelemetry.io/otel/sdk v1.38.0 h1:l48sr5YbNf2hpCUj/FoGhW9yDkl+Ma+LrVl8qaM5b+E=
|
||||
go.opentelemetry.io/otel/sdk v1.38.0/go.mod h1:ghmNdGlVemJI3+ZB5iDEuk4bWA3GkTpW+DOoZMYBVVg=
|
||||
go.opentelemetry.io/otel/sdk/metric v1.38.0 h1:aSH66iL0aZqo//xXzQLYozmWrXxyFkBJ6qT5wthqPoM=
|
||||
go.opentelemetry.io/otel/sdk/metric v1.38.0/go.mod h1:dg9PBnW9XdQ1Hd6ZnRz689CbtrUp0wMMs9iPcgT9EZA=
|
||||
go.opentelemetry.io/otel/trace v1.38.0 h1:Fxk5bKrDZJUH+AMyyIXGcFAPah0oRcT+LuNtJrmcNLE=
|
||||
go.opentelemetry.io/otel/trace v1.38.0/go.mod h1:j1P9ivuFsTceSWe1oY+EeW3sc+Pp42sO++GHkg4wwhs=
|
||||
go.uber.org/atomic v1.5.1 h1:rsqfU5vBkVknbhUGbAUwQKR2H4ItV8tjJ+6kJX4cxHM=
|
||||
go.uber.org/atomic v1.5.1/go.mod h1:sABNBOSYdrvTF6hTgEIbc7YasKWGhgEQZyfxyTvoXHQ=
|
||||
go.uber.org/goleak v1.3.0 h1:2K3zAYmnTNqV73imy9J1T3WC+gmCePx2hEGkimedGto=
|
||||
go.uber.org/goleak v1.3.0/go.mod h1:CoHD4mav9JJNrW/WLlf7HGZPjdw8EucARQHekz1X6bE=
|
||||
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=
|
||||
@@ -492,8 +490,8 @@ golang.org/x/crypto v0.19.0/go.mod h1:Iy9bg/ha4yyC70EfRS8jz+B6ybOBKMaSxLj6P6oBDf
|
||||
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/crypto v0.41.0 h1:WKYxWedPGCTVVl5+WHSSrOBT0O8lx32+zxmHxijgXp4=
|
||||
golang.org/x/crypto v0.41.0/go.mod h1:pO5AFd7FA68rFak7rOAGVuygIISepHftHnr8dr6+sUc=
|
||||
golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA=
|
||||
golang.org/x/image v0.23.0/go.mod h1:wJJBTdLfCCf3tiHa1fNxpZmUI4mmoZvwMCPP0ddoNKY=
|
||||
golang.org/x/image v0.25.0 h1:Y6uW6rH1y5y/LK1J8BPWZtr6yZ7hrsy6hFrXjgsc2fQ=
|
||||
@@ -510,8 +508,8 @@ golang.org/x/mod v0.8.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs=
|
||||
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/mod v0.26.0 h1:EGMPT//Ezu+ylkCijjPc+f4Aih7sZvaAr+O3EHBxvZg=
|
||||
golang.org/x/mod v0.26.0/go.mod h1:/j6NAhSk8iQ723BGAUyoAcn7SlD7s15Dp9Nd/SfeaFQ=
|
||||
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=
|
||||
@@ -539,8 +537,8 @@ 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/net v0.43.0 h1:lat02VYK2j4aLzMzecihNvTlJNQUq316m2Mr9rnM6YE=
|
||||
golang.org/x/net v0.43.0/go.mod h1:vhO1fvI4dGsIjh73sWfUVjj3N7CA9WkKJNQm2svM6Jg=
|
||||
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=
|
||||
@@ -554,8 +552,8 @@ 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/sync v0.16.0 h1:ycBJEhp9p4vXvUZNszeOq0kGTPghopOL8q0fq3vstxw=
|
||||
golang.org/x/sync v0.16.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=
|
||||
@@ -581,7 +579,6 @@ golang.org/x/sys v0.0.0-20211216021012-1d35b9e2eb4e/go.mod h1:oPkhp1MJrh7nUepCBc
|
||||
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.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=
|
||||
@@ -593,8 +590,8 @@ 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/sys v0.35.0 h1:vz1N37gP5bs89s7He8XuIYXpyY0+QlsKmzipCbUtyxI=
|
||||
golang.org/x/sys v0.35.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=
|
||||
@@ -608,8 +605,8 @@ 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/term v0.34.0 h1:O/2T7POpk0ZZ7MAzMeWFSg6S5IpWd/RXDlM9hgM3DR4=
|
||||
golang.org/x/term v0.34.0/go.mod h1:5jC53AEywhIVebHgPVeg0mj8OD3VO9OzclacVrqpaAw=
|
||||
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=
|
||||
@@ -622,8 +619,8 @@ golang.org/x/text v0.14.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU=
|
||||
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/text v0.26.0 h1:P42AVeLghgTYr4+xUnTRKDMqpar+PtX7KWuNQL21L8M=
|
||||
golang.org/x/text v0.26.0/go.mod h1:QK15LZJUUQVJxhz7wXgxSy/CJaTFjd0G+YLonydOVQA=
|
||||
golang.org/x/text v0.28.0 h1:rhazDwis8INMIwQ4tpjLDzUhx6RlXqZNPEM0huQojng=
|
||||
golang.org/x/text v0.28.0/go.mod h1:U8nCwOR8jO/marOQ0QbDiOngZVEBB7MAiitBuMjXiNU=
|
||||
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=
|
||||
@@ -641,8 +638,8 @@ 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.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/tools v0.35.0 h1:mBffYraMEf7aa0sB+NuKnuCy8qI/9Bughn8dC2Gu5r0=
|
||||
golang.org/x/tools v0.35.0/go.mod h1:NKdj5HkL/73byiZSJjqJgKn3ep7KjFkBOkR/Hps3VPw=
|
||||
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=
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
// Package consts
|
||||
// @Link https://github.com/bufanyun/hotgo
|
||||
// @Copyright Copyright (c) 2023 HotGo CLI
|
||||
// @Copyright Copyright (c) 2025 HotGo CLI
|
||||
// @Author Ms <133814250@qq.com>
|
||||
// @License https://github.com/bufanyun/hotgo/blob/master/LICENSE
|
||||
package consts
|
||||
@@ -9,11 +9,12 @@ package consts
|
||||
|
||||
const (
|
||||
DemoTips = "演示系统已隐藏" // 演示系统敏感数据打码
|
||||
NilJsonToString = "{}" // 空json初始化值
|
||||
RegionSpilt = " / " // 地区分隔符
|
||||
Unknown = "Unknown" // Unknown
|
||||
SuperRoleKey = "super" // 超管角色唯一标识符,通过角色验证超管
|
||||
MaxServeLogContentLen = 2048 // 最大保留服务日志内容大小
|
||||
NilJsonToString = "{}" // 空json初始化值
|
||||
RegionSpilt = " / " // 地区分隔符
|
||||
Unknown = "Unknown" // Unknown
|
||||
SuperRoleKey = "super" // 超管角色唯一标识符,通过角色验证超管
|
||||
MaxServeLogContentLen = 2048 // 最大保留服务日志内容大小
|
||||
SysDefaultLanguage = "zh_CN" // 系统默认语言,当配置文件没有国际化配置时生效
|
||||
)
|
||||
|
||||
// curd.
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
// Package consts
|
||||
// @Link https://github.com/bufanyun/hotgo
|
||||
// @Copyright Copyright (c) 2023 HotGo CLI
|
||||
// @Copyright Copyright (c) 2025 HotGo CLI
|
||||
// @Author Ms <133814250@qq.com>
|
||||
// @License https://github.com/bufanyun/hotgo/blob/master/LICENSE
|
||||
package consts
|
||||
|
||||
// VersionApp HotGo版本
|
||||
const (
|
||||
VersionApp = "2.17.8"
|
||||
VersionApp = "2.18.6"
|
||||
)
|
||||
|
||||
@@ -7,6 +7,7 @@ package common
|
||||
|
||||
import (
|
||||
"context"
|
||||
"github.com/gogf/gf/v2/i18n/gi18n"
|
||||
"hotgo/api/admin/common"
|
||||
"hotgo/internal/consts"
|
||||
"hotgo/internal/library/captcha"
|
||||
@@ -90,6 +91,9 @@ func (c *cSite) LoginConfig(ctx context.Context, _ *common.SiteLoginConfigReq) (
|
||||
}
|
||||
|
||||
res.LoginConfig = login
|
||||
res.I18nSwitch = g.Cfg().MustGet(ctx, "system.i18n.switch", true).Bool()
|
||||
res.DefaultLanguage = g.Cfg().MustGet(ctx, "system.i18n.defaultLanguage", consts.SysDefaultLanguage).String()
|
||||
res.ProjectName = gi18n.T(ctx, "HotGo管理系统")
|
||||
return
|
||||
}
|
||||
|
||||
|
||||
@@ -57,3 +57,10 @@ func (c *cUpload) UploadPart(ctx context.Context, req *common.UploadPartReq) (re
|
||||
res.UploadPartModel = data
|
||||
return
|
||||
}
|
||||
|
||||
// ImageTransferStorage 图片链接转存
|
||||
func (c *cUpload) ImageTransferStorage(ctx context.Context, req *common.ImageTransferStorageReq) (res *common.ImageTransferStorageRes, err error) {
|
||||
res = new(common.ImageTransferStorageRes)
|
||||
res.ImageTransferStorageModel, err = service.CommonUpload().ImageTransferStorage(ctx, &req.ImageTransferStorageInp)
|
||||
return
|
||||
}
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
// Package sys
|
||||
// @Link https://github.com/bufanyun/hotgo
|
||||
// @Copyright Copyright (c) 2024 HotGo CLI
|
||||
// @Copyright Copyright (c) 2025 HotGo CLI
|
||||
// @Author Ms <133814250@qq.com>
|
||||
// @License https://github.com/bufanyun/hotgo/blob/master/LICENSE
|
||||
// @AutoGenerate Version 2.15.7
|
||||
// @AutoGenerate Version 2.17.8
|
||||
package sys
|
||||
|
||||
import (
|
||||
@@ -86,4 +86,4 @@ func (c *cOptionTreeDemo) TreeOption(ctx context.Context, req *optiontreedemo.Tr
|
||||
res = &temp
|
||||
}
|
||||
return
|
||||
}
|
||||
}
|
||||
@@ -1,5 +1,5 @@
|
||||
// =================================================================================
|
||||
// This is auto-generated by GoFrame CLI tool only once. Fill this file as you wish.
|
||||
// This file is auto-generated by the GoFrame CLI tool. You may modify it as needed.
|
||||
// =================================================================================
|
||||
|
||||
package dao
|
||||
@@ -8,20 +8,15 @@ import (
|
||||
"hotgo/internal/dao/internal"
|
||||
)
|
||||
|
||||
// internalAddonHgexampleTableDao is internal type for wrapping internal DAO implements.
|
||||
type internalAddonHgexampleTableDao = *internal.AddonHgexampleTableDao
|
||||
|
||||
// addonHgexampleTableDao is the data access object for table hg_addon_hgexample_table.
|
||||
// You can define custom methods on it to extend its functionality as you wish.
|
||||
// addonHgexampleTableDao is the data access object for the table hg_addon_hgexample_table.
|
||||
// You can define custom methods on it to extend its functionality as needed.
|
||||
type addonHgexampleTableDao struct {
|
||||
internalAddonHgexampleTableDao
|
||||
*internal.AddonHgexampleTableDao
|
||||
}
|
||||
|
||||
var (
|
||||
// AddonHgexampleTable is globally public accessible object for table hg_addon_hgexample_table operations.
|
||||
AddonHgexampleTable = addonHgexampleTableDao{
|
||||
internal.NewAddonHgexampleTableDao(),
|
||||
}
|
||||
// AddonHgexampleTable is a globally accessible object for table hg_addon_hgexample_table operations.
|
||||
AddonHgexampleTable = addonHgexampleTableDao{internal.NewAddonHgexampleTableDao()}
|
||||
)
|
||||
|
||||
// Fill with you ideas below.
|
||||
// Add your custom methods and functionality below.
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
// =================================================================================
|
||||
// This is auto-generated by GoFrame CLI tool only once. Fill this file as you wish.
|
||||
// This file is auto-generated by the GoFrame CLI tool. You may modify it as needed.
|
||||
// =================================================================================
|
||||
|
||||
package dao
|
||||
@@ -8,20 +8,15 @@ import (
|
||||
"hotgo/internal/dao/internal"
|
||||
)
|
||||
|
||||
// internalAddonHgexampleTenantOrderDao is internal type for wrapping internal DAO implements.
|
||||
type internalAddonHgexampleTenantOrderDao = *internal.AddonHgexampleTenantOrderDao
|
||||
|
||||
// addonHgexampleTenantOrderDao is the data access object for table hg_addon_hgexample_tenant_order.
|
||||
// You can define custom methods on it to extend its functionality as you wish.
|
||||
// addonHgexampleTenantOrderDao is the data access object for the table hg_addon_hgexample_tenant_order.
|
||||
// You can define custom methods on it to extend its functionality as needed.
|
||||
type addonHgexampleTenantOrderDao struct {
|
||||
internalAddonHgexampleTenantOrderDao
|
||||
*internal.AddonHgexampleTenantOrderDao
|
||||
}
|
||||
|
||||
var (
|
||||
// AddonHgexampleTenantOrder is globally public accessible object for table hg_addon_hgexample_tenant_order operations.
|
||||
AddonHgexampleTenantOrder = addonHgexampleTenantOrderDao{
|
||||
internal.NewAddonHgexampleTenantOrderDao(),
|
||||
}
|
||||
// AddonHgexampleTenantOrder is a globally accessible object for table hg_addon_hgexample_tenant_order operations.
|
||||
AddonHgexampleTenantOrder = addonHgexampleTenantOrderDao{internal.NewAddonHgexampleTenantOrderDao()}
|
||||
)
|
||||
|
||||
// Fill with you ideas below.
|
||||
// Add your custom methods and functionality below.
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
// =================================================================================
|
||||
// This is auto-generated by GoFrame CLI tool only once. Fill this file as you wish.
|
||||
// This file is auto-generated by the GoFrame CLI tool. You may modify it as needed.
|
||||
// =================================================================================
|
||||
|
||||
package dao
|
||||
@@ -8,20 +8,15 @@ import (
|
||||
"hotgo/internal/dao/internal"
|
||||
)
|
||||
|
||||
// internalAdminCashDao is internal type for wrapping internal DAO implements.
|
||||
type internalAdminCashDao = *internal.AdminCashDao
|
||||
|
||||
// adminCashDao is the data access object for table hg_admin_cash.
|
||||
// You can define custom methods on it to extend its functionality as you wish.
|
||||
// adminCashDao is the data access object for the table hg_admin_cash.
|
||||
// You can define custom methods on it to extend its functionality as needed.
|
||||
type adminCashDao struct {
|
||||
internalAdminCashDao
|
||||
*internal.AdminCashDao
|
||||
}
|
||||
|
||||
var (
|
||||
// AdminCash is globally public accessible object for table hg_admin_cash operations.
|
||||
AdminCash = adminCashDao{
|
||||
internal.NewAdminCashDao(),
|
||||
}
|
||||
// AdminCash is a globally accessible object for table hg_admin_cash operations.
|
||||
AdminCash = adminCashDao{internal.NewAdminCashDao()}
|
||||
)
|
||||
|
||||
// Fill with you ideas below.
|
||||
// Add your custom methods and functionality below.
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
// =================================================================================
|
||||
// This is auto-generated by GoFrame CLI tool only once. Fill this file as you wish.
|
||||
// This file is auto-generated by the GoFrame CLI tool. You may modify it as needed.
|
||||
// =================================================================================
|
||||
|
||||
package dao
|
||||
@@ -8,20 +8,15 @@ import (
|
||||
"hotgo/internal/dao/internal"
|
||||
)
|
||||
|
||||
// internalAdminCreditsLogDao is internal type for wrapping internal DAO implements.
|
||||
type internalAdminCreditsLogDao = *internal.AdminCreditsLogDao
|
||||
|
||||
// adminCreditsLogDao is the data access object for table hg_admin_credits_log.
|
||||
// You can define custom methods on it to extend its functionality as you wish.
|
||||
// adminCreditsLogDao is the data access object for the table hg_admin_credits_log.
|
||||
// You can define custom methods on it to extend its functionality as needed.
|
||||
type adminCreditsLogDao struct {
|
||||
internalAdminCreditsLogDao
|
||||
*internal.AdminCreditsLogDao
|
||||
}
|
||||
|
||||
var (
|
||||
// AdminCreditsLog is globally public accessible object for table hg_admin_credits_log operations.
|
||||
AdminCreditsLog = adminCreditsLogDao{
|
||||
internal.NewAdminCreditsLogDao(),
|
||||
}
|
||||
// AdminCreditsLog is a globally accessible object for table hg_admin_credits_log operations.
|
||||
AdminCreditsLog = adminCreditsLogDao{internal.NewAdminCreditsLogDao()}
|
||||
)
|
||||
|
||||
// Fill with you ideas below.
|
||||
// Add your custom methods and functionality below.
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
// =================================================================================
|
||||
// This is auto-generated by GoFrame CLI tool only once. Fill this file as you wish.
|
||||
// This file is auto-generated by the GoFrame CLI tool. You may modify it as needed.
|
||||
// =================================================================================
|
||||
|
||||
package dao
|
||||
@@ -8,20 +8,15 @@ import (
|
||||
"hotgo/internal/dao/internal"
|
||||
)
|
||||
|
||||
// internalAdminDeptDao is internal type for wrapping internal DAO implements.
|
||||
type internalAdminDeptDao = *internal.AdminDeptDao
|
||||
|
||||
// adminDeptDao is the data access object for table hg_admin_dept.
|
||||
// You can define custom methods on it to extend its functionality as you wish.
|
||||
// adminDeptDao is the data access object for the table hg_admin_dept.
|
||||
// You can define custom methods on it to extend its functionality as needed.
|
||||
type adminDeptDao struct {
|
||||
internalAdminDeptDao
|
||||
*internal.AdminDeptDao
|
||||
}
|
||||
|
||||
var (
|
||||
// AdminDept is globally public accessible object for table hg_admin_dept operations.
|
||||
AdminDept = adminDeptDao{
|
||||
internal.NewAdminDeptDao(),
|
||||
}
|
||||
// AdminDept is a globally accessible object for table hg_admin_dept operations.
|
||||
AdminDept = adminDeptDao{internal.NewAdminDeptDao()}
|
||||
)
|
||||
|
||||
// Fill with you ideas below.
|
||||
// Add your custom methods and functionality below.
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
// =================================================================================
|
||||
// This is auto-generated by GoFrame CLI tool only once. Fill this file as you wish.
|
||||
// This file is auto-generated by the GoFrame CLI tool. You may modify it as needed.
|
||||
// =================================================================================
|
||||
|
||||
package dao
|
||||
@@ -8,20 +8,15 @@ import (
|
||||
"hotgo/internal/dao/internal"
|
||||
)
|
||||
|
||||
// internalAdminMemberDao is internal type for wrapping internal DAO implements.
|
||||
type internalAdminMemberDao = *internal.AdminMemberDao
|
||||
|
||||
// adminMemberDao is the data access object for table hg_admin_member.
|
||||
// You can define custom methods on it to extend its functionality as you wish.
|
||||
// adminMemberDao is the data access object for the table hg_admin_member.
|
||||
// You can define custom methods on it to extend its functionality as needed.
|
||||
type adminMemberDao struct {
|
||||
internalAdminMemberDao
|
||||
*internal.AdminMemberDao
|
||||
}
|
||||
|
||||
var (
|
||||
// AdminMember is globally public accessible object for table hg_admin_member operations.
|
||||
AdminMember = adminMemberDao{
|
||||
internal.NewAdminMemberDao(),
|
||||
}
|
||||
// AdminMember is a globally accessible object for table hg_admin_member operations.
|
||||
AdminMember = adminMemberDao{internal.NewAdminMemberDao()}
|
||||
)
|
||||
|
||||
// Fill with you ideas below.
|
||||
// Add your custom methods and functionality below.
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
// =================================================================================
|
||||
// This is auto-generated by GoFrame CLI tool only once. Fill this file as you wish.
|
||||
// This file is auto-generated by the GoFrame CLI tool. You may modify it as needed.
|
||||
// =================================================================================
|
||||
|
||||
package dao
|
||||
@@ -8,20 +8,15 @@ import (
|
||||
"hotgo/internal/dao/internal"
|
||||
)
|
||||
|
||||
// internalAdminMemberPostDao is internal type for wrapping internal DAO implements.
|
||||
type internalAdminMemberPostDao = *internal.AdminMemberPostDao
|
||||
|
||||
// adminMemberPostDao is the data access object for table hg_admin_member_post.
|
||||
// You can define custom methods on it to extend its functionality as you wish.
|
||||
// adminMemberPostDao is the data access object for the table hg_admin_member_post.
|
||||
// You can define custom methods on it to extend its functionality as needed.
|
||||
type adminMemberPostDao struct {
|
||||
internalAdminMemberPostDao
|
||||
*internal.AdminMemberPostDao
|
||||
}
|
||||
|
||||
var (
|
||||
// AdminMemberPost is globally public accessible object for table hg_admin_member_post operations.
|
||||
AdminMemberPost = adminMemberPostDao{
|
||||
internal.NewAdminMemberPostDao(),
|
||||
}
|
||||
// AdminMemberPost is a globally accessible object for table hg_admin_member_post operations.
|
||||
AdminMemberPost = adminMemberPostDao{internal.NewAdminMemberPostDao()}
|
||||
)
|
||||
|
||||
// Fill with you ideas below.
|
||||
// Add your custom methods and functionality below.
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
// =================================================================================
|
||||
// This is auto-generated by GoFrame CLI tool only once. Fill this file as you wish.
|
||||
// This file is auto-generated by the GoFrame CLI tool. You may modify it as needed.
|
||||
// =================================================================================
|
||||
|
||||
package dao
|
||||
@@ -8,20 +8,15 @@ import (
|
||||
"hotgo/internal/dao/internal"
|
||||
)
|
||||
|
||||
// internalAdminMemberRoleDao is internal type for wrapping internal DAO implements.
|
||||
type internalAdminMemberRoleDao = *internal.AdminMemberRoleDao
|
||||
|
||||
// adminMemberRoleDao is the data access object for table hg_admin_member_role.
|
||||
// You can define custom methods on it to extend its functionality as you wish.
|
||||
// adminMemberRoleDao is the data access object for the table hg_admin_member_role.
|
||||
// You can define custom methods on it to extend its functionality as needed.
|
||||
type adminMemberRoleDao struct {
|
||||
internalAdminMemberRoleDao
|
||||
*internal.AdminMemberRoleDao
|
||||
}
|
||||
|
||||
var (
|
||||
// AdminMemberRole is globally public accessible object for table hg_admin_member_role operations.
|
||||
AdminMemberRole = adminMemberRoleDao{
|
||||
internal.NewAdminMemberRoleDao(),
|
||||
}
|
||||
// AdminMemberRole is a globally accessible object for table hg_admin_member_role operations.
|
||||
AdminMemberRole = adminMemberRoleDao{internal.NewAdminMemberRoleDao()}
|
||||
)
|
||||
|
||||
// Fill with you ideas below.
|
||||
// Add your custom methods and functionality below.
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
// =================================================================================
|
||||
// This is auto-generated by GoFrame CLI tool only once. Fill this file as you wish.
|
||||
// This file is auto-generated by the GoFrame CLI tool. You may modify it as needed.
|
||||
// =================================================================================
|
||||
|
||||
package dao
|
||||
@@ -8,20 +8,15 @@ import (
|
||||
"hotgo/internal/dao/internal"
|
||||
)
|
||||
|
||||
// internalAdminMenuDao is internal type for wrapping internal DAO implements.
|
||||
type internalAdminMenuDao = *internal.AdminMenuDao
|
||||
|
||||
// adminMenuDao is the data access object for table hg_admin_menu.
|
||||
// You can define custom methods on it to extend its functionality as you wish.
|
||||
// adminMenuDao is the data access object for the table hg_admin_menu.
|
||||
// You can define custom methods on it to extend its functionality as needed.
|
||||
type adminMenuDao struct {
|
||||
internalAdminMenuDao
|
||||
*internal.AdminMenuDao
|
||||
}
|
||||
|
||||
var (
|
||||
// AdminMenu is globally public accessible object for table hg_admin_menu operations.
|
||||
AdminMenu = adminMenuDao{
|
||||
internal.NewAdminMenuDao(),
|
||||
}
|
||||
// AdminMenu is a globally accessible object for table hg_admin_menu operations.
|
||||
AdminMenu = adminMenuDao{internal.NewAdminMenuDao()}
|
||||
)
|
||||
|
||||
// Fill with you ideas below.
|
||||
// Add your custom methods and functionality below.
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
// =================================================================================
|
||||
// This is auto-generated by GoFrame CLI tool only once. Fill this file as you wish.
|
||||
// This file is auto-generated by the GoFrame CLI tool. You may modify it as needed.
|
||||
// =================================================================================
|
||||
|
||||
package dao
|
||||
@@ -8,20 +8,15 @@ import (
|
||||
"hotgo/internal/dao/internal"
|
||||
)
|
||||
|
||||
// internalAdminNoticeDao is internal type for wrapping internal DAO implements.
|
||||
type internalAdminNoticeDao = *internal.AdminNoticeDao
|
||||
|
||||
// adminNoticeDao is the data access object for table hg_admin_notice.
|
||||
// You can define custom methods on it to extend its functionality as you wish.
|
||||
// adminNoticeDao is the data access object for the table hg_admin_notice.
|
||||
// You can define custom methods on it to extend its functionality as needed.
|
||||
type adminNoticeDao struct {
|
||||
internalAdminNoticeDao
|
||||
*internal.AdminNoticeDao
|
||||
}
|
||||
|
||||
var (
|
||||
// AdminNotice is globally public accessible object for table hg_admin_notice operations.
|
||||
AdminNotice = adminNoticeDao{
|
||||
internal.NewAdminNoticeDao(),
|
||||
}
|
||||
// AdminNotice is a globally accessible object for table hg_admin_notice operations.
|
||||
AdminNotice = adminNoticeDao{internal.NewAdminNoticeDao()}
|
||||
)
|
||||
|
||||
// Fill with you ideas below.
|
||||
// Add your custom methods and functionality below.
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
// =================================================================================
|
||||
// This is auto-generated by GoFrame CLI tool only once. Fill this file as you wish.
|
||||
// This file is auto-generated by the GoFrame CLI tool. You may modify it as needed.
|
||||
// =================================================================================
|
||||
|
||||
package dao
|
||||
@@ -8,20 +8,15 @@ import (
|
||||
"hotgo/internal/dao/internal"
|
||||
)
|
||||
|
||||
// internalAdminNoticeReadDao is internal type for wrapping internal DAO implements.
|
||||
type internalAdminNoticeReadDao = *internal.AdminNoticeReadDao
|
||||
|
||||
// adminNoticeReadDao is the data access object for table hg_admin_notice_read.
|
||||
// You can define custom methods on it to extend its functionality as you wish.
|
||||
// adminNoticeReadDao is the data access object for the table hg_admin_notice_read.
|
||||
// You can define custom methods on it to extend its functionality as needed.
|
||||
type adminNoticeReadDao struct {
|
||||
internalAdminNoticeReadDao
|
||||
*internal.AdminNoticeReadDao
|
||||
}
|
||||
|
||||
var (
|
||||
// AdminNoticeRead is globally public accessible object for table hg_admin_notice_read operations.
|
||||
AdminNoticeRead = adminNoticeReadDao{
|
||||
internal.NewAdminNoticeReadDao(),
|
||||
}
|
||||
// AdminNoticeRead is a globally accessible object for table hg_admin_notice_read operations.
|
||||
AdminNoticeRead = adminNoticeReadDao{internal.NewAdminNoticeReadDao()}
|
||||
)
|
||||
|
||||
// Fill with you ideas below.
|
||||
// Add your custom methods and functionality below.
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
// =================================================================================
|
||||
// This is auto-generated by GoFrame CLI tool only once. Fill this file as you wish.
|
||||
// This file is auto-generated by the GoFrame CLI tool. You may modify it as needed.
|
||||
// =================================================================================
|
||||
|
||||
package dao
|
||||
@@ -8,20 +8,15 @@ import (
|
||||
"hotgo/internal/dao/internal"
|
||||
)
|
||||
|
||||
// internalAdminOauthDao is internal type for wrapping internal DAO implements.
|
||||
type internalAdminOauthDao = *internal.AdminOauthDao
|
||||
|
||||
// adminOauthDao is the data access object for table hg_admin_oauth.
|
||||
// You can define custom methods on it to extend its functionality as you wish.
|
||||
// adminOauthDao is the data access object for the table hg_admin_oauth.
|
||||
// You can define custom methods on it to extend its functionality as needed.
|
||||
type adminOauthDao struct {
|
||||
internalAdminOauthDao
|
||||
*internal.AdminOauthDao
|
||||
}
|
||||
|
||||
var (
|
||||
// AdminOauth is globally public accessible object for table hg_admin_oauth operations.
|
||||
AdminOauth = adminOauthDao{
|
||||
internal.NewAdminOauthDao(),
|
||||
}
|
||||
// AdminOauth is a globally accessible object for table hg_admin_oauth operations.
|
||||
AdminOauth = adminOauthDao{internal.NewAdminOauthDao()}
|
||||
)
|
||||
|
||||
// Fill with you ideas below.
|
||||
// Add your custom methods and functionality below.
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
// =================================================================================
|
||||
// This is auto-generated by GoFrame CLI tool only once. Fill this file as you wish.
|
||||
// This file is auto-generated by the GoFrame CLI tool. You may modify it as needed.
|
||||
// =================================================================================
|
||||
|
||||
package dao
|
||||
@@ -8,20 +8,15 @@ import (
|
||||
"hotgo/internal/dao/internal"
|
||||
)
|
||||
|
||||
// internalAdminOrderDao is internal type for wrapping internal DAO implements.
|
||||
type internalAdminOrderDao = *internal.AdminOrderDao
|
||||
|
||||
// adminOrderDao is the data access object for table hg_admin_order.
|
||||
// You can define custom methods on it to extend its functionality as you wish.
|
||||
// adminOrderDao is the data access object for the table hg_admin_order.
|
||||
// You can define custom methods on it to extend its functionality as needed.
|
||||
type adminOrderDao struct {
|
||||
internalAdminOrderDao
|
||||
*internal.AdminOrderDao
|
||||
}
|
||||
|
||||
var (
|
||||
// AdminOrder is globally public accessible object for table hg_admin_order operations.
|
||||
AdminOrder = adminOrderDao{
|
||||
internal.NewAdminOrderDao(),
|
||||
}
|
||||
// AdminOrder is a globally accessible object for table hg_admin_order operations.
|
||||
AdminOrder = adminOrderDao{internal.NewAdminOrderDao()}
|
||||
)
|
||||
|
||||
// Fill with you ideas below.
|
||||
// Add your custom methods and functionality below.
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
// =================================================================================
|
||||
// This is auto-generated by GoFrame CLI tool only once. Fill this file as you wish.
|
||||
// This file is auto-generated by the GoFrame CLI tool. You may modify it as needed.
|
||||
// =================================================================================
|
||||
|
||||
package dao
|
||||
@@ -8,20 +8,15 @@ import (
|
||||
"hotgo/internal/dao/internal"
|
||||
)
|
||||
|
||||
// internalAdminPostDao is internal type for wrapping internal DAO implements.
|
||||
type internalAdminPostDao = *internal.AdminPostDao
|
||||
|
||||
// adminPostDao is the data access object for table hg_admin_post.
|
||||
// You can define custom methods on it to extend its functionality as you wish.
|
||||
// adminPostDao is the data access object for the table hg_admin_post.
|
||||
// You can define custom methods on it to extend its functionality as needed.
|
||||
type adminPostDao struct {
|
||||
internalAdminPostDao
|
||||
*internal.AdminPostDao
|
||||
}
|
||||
|
||||
var (
|
||||
// AdminPost is globally public accessible object for table hg_admin_post operations.
|
||||
AdminPost = adminPostDao{
|
||||
internal.NewAdminPostDao(),
|
||||
}
|
||||
// AdminPost is a globally accessible object for table hg_admin_post operations.
|
||||
AdminPost = adminPostDao{internal.NewAdminPostDao()}
|
||||
)
|
||||
|
||||
// Fill with you ideas below.
|
||||
// Add your custom methods and functionality below.
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
// =================================================================================
|
||||
// This is auto-generated by GoFrame CLI tool only once. Fill this file as you wish.
|
||||
// This file is auto-generated by the GoFrame CLI tool. You may modify it as needed.
|
||||
// =================================================================================
|
||||
|
||||
package dao
|
||||
@@ -8,20 +8,15 @@ import (
|
||||
"hotgo/internal/dao/internal"
|
||||
)
|
||||
|
||||
// internalAdminRoleDao is internal type for wrapping internal DAO implements.
|
||||
type internalAdminRoleDao = *internal.AdminRoleDao
|
||||
|
||||
// adminRoleDao is the data access object for table hg_admin_role.
|
||||
// You can define custom methods on it to extend its functionality as you wish.
|
||||
// adminRoleDao is the data access object for the table hg_admin_role.
|
||||
// You can define custom methods on it to extend its functionality as needed.
|
||||
type adminRoleDao struct {
|
||||
internalAdminRoleDao
|
||||
*internal.AdminRoleDao
|
||||
}
|
||||
|
||||
var (
|
||||
// AdminRole is globally public accessible object for table hg_admin_role operations.
|
||||
AdminRole = adminRoleDao{
|
||||
internal.NewAdminRoleDao(),
|
||||
}
|
||||
// AdminRole is a globally accessible object for table hg_admin_role operations.
|
||||
AdminRole = adminRoleDao{internal.NewAdminRoleDao()}
|
||||
)
|
||||
|
||||
// Fill with you ideas below.
|
||||
// Add your custom methods and functionality below.
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
// =================================================================================
|
||||
// This is auto-generated by GoFrame CLI tool only once. Fill this file as you wish.
|
||||
// This file is auto-generated by the GoFrame CLI tool. You may modify it as needed.
|
||||
// =================================================================================
|
||||
|
||||
package dao
|
||||
@@ -8,20 +8,15 @@ import (
|
||||
"hotgo/internal/dao/internal"
|
||||
)
|
||||
|
||||
// internalAdminRoleCasbinDao is internal type for wrapping internal DAO implements.
|
||||
type internalAdminRoleCasbinDao = *internal.AdminRoleCasbinDao
|
||||
|
||||
// adminRoleCasbinDao is the data access object for table hg_admin_role_casbin.
|
||||
// You can define custom methods on it to extend its functionality as you wish.
|
||||
// adminRoleCasbinDao is the data access object for the table hg_admin_role_casbin.
|
||||
// You can define custom methods on it to extend its functionality as needed.
|
||||
type adminRoleCasbinDao struct {
|
||||
internalAdminRoleCasbinDao
|
||||
*internal.AdminRoleCasbinDao
|
||||
}
|
||||
|
||||
var (
|
||||
// AdminRoleCasbin is globally public accessible object for table hg_admin_role_casbin operations.
|
||||
AdminRoleCasbin = adminRoleCasbinDao{
|
||||
internal.NewAdminRoleCasbinDao(),
|
||||
}
|
||||
// AdminRoleCasbin is a globally accessible object for table hg_admin_role_casbin operations.
|
||||
AdminRoleCasbin = adminRoleCasbinDao{internal.NewAdminRoleCasbinDao()}
|
||||
)
|
||||
|
||||
// Fill with you ideas below.
|
||||
// Add your custom methods and functionality below.
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
// =================================================================================
|
||||
// This is auto-generated by GoFrame CLI tool only once. Fill this file as you wish.
|
||||
// This file is auto-generated by the GoFrame CLI tool. You may modify it as needed.
|
||||
// =================================================================================
|
||||
|
||||
package dao
|
||||
@@ -8,20 +8,15 @@ import (
|
||||
"hotgo/internal/dao/internal"
|
||||
)
|
||||
|
||||
// internalAdminRoleMenuDao is internal type for wrapping internal DAO implements.
|
||||
type internalAdminRoleMenuDao = *internal.AdminRoleMenuDao
|
||||
|
||||
// adminRoleMenuDao is the data access object for table hg_admin_role_menu.
|
||||
// You can define custom methods on it to extend its functionality as you wish.
|
||||
// adminRoleMenuDao is the data access object for the table hg_admin_role_menu.
|
||||
// You can define custom methods on it to extend its functionality as needed.
|
||||
type adminRoleMenuDao struct {
|
||||
internalAdminRoleMenuDao
|
||||
*internal.AdminRoleMenuDao
|
||||
}
|
||||
|
||||
var (
|
||||
// AdminRoleMenu is globally public accessible object for table hg_admin_role_menu operations.
|
||||
AdminRoleMenu = adminRoleMenuDao{
|
||||
internal.NewAdminRoleMenuDao(),
|
||||
}
|
||||
// AdminRoleMenu is a globally accessible object for table hg_admin_role_menu operations.
|
||||
AdminRoleMenu = adminRoleMenuDao{internal.NewAdminRoleMenuDao()}
|
||||
)
|
||||
|
||||
// Fill with you ideas below.
|
||||
// Add your custom methods and functionality below.
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
// =================================================================================
|
||||
// This is auto-generated by GoFrame CLI tool only once. Fill this file as you wish.
|
||||
// This file is auto-generated by the GoFrame CLI tool. You may modify it as needed.
|
||||
// =================================================================================
|
||||
|
||||
package dao
|
||||
@@ -8,20 +8,15 @@ import (
|
||||
"hotgo/internal/dao/internal"
|
||||
)
|
||||
|
||||
// internalPayLogDao is internal type for wrapping internal DAO implements.
|
||||
type internalPayLogDao = *internal.PayLogDao
|
||||
|
||||
// payLogDao is the data access object for table hg_pay_log.
|
||||
// You can define custom methods on it to extend its functionality as you wish.
|
||||
// payLogDao is the data access object for the table hg_pay_log.
|
||||
// You can define custom methods on it to extend its functionality as needed.
|
||||
type payLogDao struct {
|
||||
internalPayLogDao
|
||||
*internal.PayLogDao
|
||||
}
|
||||
|
||||
var (
|
||||
// PayLog is globally public accessible object for table hg_pay_log operations.
|
||||
PayLog = payLogDao{
|
||||
internal.NewPayLogDao(),
|
||||
}
|
||||
// PayLog is a globally accessible object for table hg_pay_log operations.
|
||||
PayLog = payLogDao{internal.NewPayLogDao()}
|
||||
)
|
||||
|
||||
// Fill with you ideas below.
|
||||
// Add your custom methods and functionality below.
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
// =================================================================================
|
||||
// This is auto-generated by GoFrame CLI tool only once. Fill this file as you wish.
|
||||
// This file is auto-generated by the GoFrame CLI tool. You may modify it as needed.
|
||||
// =================================================================================
|
||||
|
||||
package dao
|
||||
@@ -8,20 +8,15 @@ import (
|
||||
"hotgo/internal/dao/internal"
|
||||
)
|
||||
|
||||
// internalPayRefundDao is internal type for wrapping internal DAO implements.
|
||||
type internalPayRefundDao = *internal.PayRefundDao
|
||||
|
||||
// payRefundDao is the data access object for table hg_pay_refund.
|
||||
// You can define custom methods on it to extend its functionality as you wish.
|
||||
// payRefundDao is the data access object for the table hg_pay_refund.
|
||||
// You can define custom methods on it to extend its functionality as needed.
|
||||
type payRefundDao struct {
|
||||
internalPayRefundDao
|
||||
*internal.PayRefundDao
|
||||
}
|
||||
|
||||
var (
|
||||
// PayRefund is globally public accessible object for table hg_pay_refund operations.
|
||||
PayRefund = payRefundDao{
|
||||
internal.NewPayRefundDao(),
|
||||
}
|
||||
// PayRefund is a globally accessible object for table hg_pay_refund operations.
|
||||
PayRefund = payRefundDao{internal.NewPayRefundDao()}
|
||||
)
|
||||
|
||||
// Fill with you ideas below.
|
||||
// Add your custom methods and functionality below.
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
// =================================================================================
|
||||
// This is auto-generated by GoFrame CLI tool only once. Fill this file as you wish.
|
||||
// This file is auto-generated by the GoFrame CLI tool. You may modify it as needed.
|
||||
// =================================================================================
|
||||
|
||||
package dao
|
||||
@@ -8,20 +8,15 @@ import (
|
||||
"hotgo/internal/dao/internal"
|
||||
)
|
||||
|
||||
// internalSysAddonsConfigDao is internal type for wrapping internal DAO implements.
|
||||
type internalSysAddonsConfigDao = *internal.SysAddonsConfigDao
|
||||
|
||||
// sysAddonsConfigDao is the data access object for table hg_sys_addons_config.
|
||||
// You can define custom methods on it to extend its functionality as you wish.
|
||||
// sysAddonsConfigDao is the data access object for the table hg_sys_addons_config.
|
||||
// You can define custom methods on it to extend its functionality as needed.
|
||||
type sysAddonsConfigDao struct {
|
||||
internalSysAddonsConfigDao
|
||||
*internal.SysAddonsConfigDao
|
||||
}
|
||||
|
||||
var (
|
||||
// SysAddonsConfig is globally public accessible object for table hg_sys_addons_config operations.
|
||||
SysAddonsConfig = sysAddonsConfigDao{
|
||||
internal.NewSysAddonsConfigDao(),
|
||||
}
|
||||
// SysAddonsConfig is a globally accessible object for table hg_sys_addons_config operations.
|
||||
SysAddonsConfig = sysAddonsConfigDao{internal.NewSysAddonsConfigDao()}
|
||||
)
|
||||
|
||||
// Fill with you ideas below.
|
||||
// Add your custom methods and functionality below.
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
// =================================================================================
|
||||
// This is auto-generated by GoFrame CLI tool only once. Fill this file as you wish.
|
||||
// This file is auto-generated by the GoFrame CLI tool. You may modify it as needed.
|
||||
// =================================================================================
|
||||
|
||||
package dao
|
||||
@@ -8,20 +8,15 @@ import (
|
||||
"hotgo/internal/dao/internal"
|
||||
)
|
||||
|
||||
// internalSysAttachmentDao is internal type for wrapping internal DAO implements.
|
||||
type internalSysAttachmentDao = *internal.SysAttachmentDao
|
||||
|
||||
// sysAttachmentDao is the data access object for table hg_sys_attachment.
|
||||
// You can define custom methods on it to extend its functionality as you wish.
|
||||
// sysAttachmentDao is the data access object for the table hg_sys_attachment.
|
||||
// You can define custom methods on it to extend its functionality as needed.
|
||||
type sysAttachmentDao struct {
|
||||
internalSysAttachmentDao
|
||||
*internal.SysAttachmentDao
|
||||
}
|
||||
|
||||
var (
|
||||
// SysAttachment is globally public accessible object for table hg_sys_attachment operations.
|
||||
SysAttachment = sysAttachmentDao{
|
||||
internal.NewSysAttachmentDao(),
|
||||
}
|
||||
// SysAttachment is a globally accessible object for table hg_sys_attachment operations.
|
||||
SysAttachment = sysAttachmentDao{internal.NewSysAttachmentDao()}
|
||||
)
|
||||
|
||||
// Fill with you ideas below.
|
||||
// Add your custom methods and functionality below.
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
// =================================================================================
|
||||
// This is auto-generated by GoFrame CLI tool only once. Fill this file as you wish.
|
||||
// This file is auto-generated by the GoFrame CLI tool. You may modify it as needed.
|
||||
// =================================================================================
|
||||
|
||||
package dao
|
||||
@@ -8,20 +8,15 @@ import (
|
||||
"hotgo/internal/dao/internal"
|
||||
)
|
||||
|
||||
// internalSysBlacklistDao is internal type for wrapping internal DAO implements.
|
||||
type internalSysBlacklistDao = *internal.SysBlacklistDao
|
||||
|
||||
// sysBlacklistDao is the data access object for table hg_sys_blacklist.
|
||||
// You can define custom methods on it to extend its functionality as you wish.
|
||||
// sysBlacklistDao is the data access object for the table hg_sys_blacklist.
|
||||
// You can define custom methods on it to extend its functionality as needed.
|
||||
type sysBlacklistDao struct {
|
||||
internalSysBlacklistDao
|
||||
*internal.SysBlacklistDao
|
||||
}
|
||||
|
||||
var (
|
||||
// SysBlacklist is globally public accessible object for table hg_sys_blacklist operations.
|
||||
SysBlacklist = sysBlacklistDao{
|
||||
internal.NewSysBlacklistDao(),
|
||||
}
|
||||
// SysBlacklist is a globally accessible object for table hg_sys_blacklist operations.
|
||||
SysBlacklist = sysBlacklistDao{internal.NewSysBlacklistDao()}
|
||||
)
|
||||
|
||||
// Fill with you ideas below.
|
||||
// Add your custom methods and functionality below.
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
// =================================================================================
|
||||
// This is auto-generated by GoFrame CLI tool only once. Fill this file as you wish.
|
||||
// This file is auto-generated by the GoFrame CLI tool. You may modify it as needed.
|
||||
// =================================================================================
|
||||
|
||||
package dao
|
||||
@@ -8,20 +8,15 @@ import (
|
||||
"hotgo/internal/dao/internal"
|
||||
)
|
||||
|
||||
// internalSysConfigDao is internal type for wrapping internal DAO implements.
|
||||
type internalSysConfigDao = *internal.SysConfigDao
|
||||
|
||||
// sysConfigDao is the data access object for table hg_sys_config.
|
||||
// You can define custom methods on it to extend its functionality as you wish.
|
||||
// sysConfigDao is the data access object for the table hg_sys_config.
|
||||
// You can define custom methods on it to extend its functionality as needed.
|
||||
type sysConfigDao struct {
|
||||
internalSysConfigDao
|
||||
*internal.SysConfigDao
|
||||
}
|
||||
|
||||
var (
|
||||
// SysConfig is globally public accessible object for table hg_sys_config operations.
|
||||
SysConfig = sysConfigDao{
|
||||
internal.NewSysConfigDao(),
|
||||
}
|
||||
// SysConfig is a globally accessible object for table hg_sys_config operations.
|
||||
SysConfig = sysConfigDao{internal.NewSysConfigDao()}
|
||||
)
|
||||
|
||||
// Fill with you ideas below.
|
||||
// Add your custom methods and functionality below.
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
// =================================================================================
|
||||
// This is auto-generated by GoFrame CLI tool only once. Fill this file as you wish.
|
||||
// This file is auto-generated by the GoFrame CLI tool. You may modify it as needed.
|
||||
// =================================================================================
|
||||
|
||||
package dao
|
||||
@@ -8,20 +8,15 @@ import (
|
||||
"hotgo/internal/dao/internal"
|
||||
)
|
||||
|
||||
// internalSysCronDao is internal type for wrapping internal DAO implements.
|
||||
type internalSysCronDao = *internal.SysCronDao
|
||||
|
||||
// sysCronDao is the data access object for table hg_sys_cron.
|
||||
// You can define custom methods on it to extend its functionality as you wish.
|
||||
// sysCronDao is the data access object for the table hg_sys_cron.
|
||||
// You can define custom methods on it to extend its functionality as needed.
|
||||
type sysCronDao struct {
|
||||
internalSysCronDao
|
||||
*internal.SysCronDao
|
||||
}
|
||||
|
||||
var (
|
||||
// SysCron is globally public accessible object for table hg_sys_cron operations.
|
||||
SysCron = sysCronDao{
|
||||
internal.NewSysCronDao(),
|
||||
}
|
||||
// SysCron is a globally accessible object for table hg_sys_cron operations.
|
||||
SysCron = sysCronDao{internal.NewSysCronDao()}
|
||||
)
|
||||
|
||||
// Fill with you ideas below.
|
||||
// Add your custom methods and functionality below.
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
// =================================================================================
|
||||
// This is auto-generated by GoFrame CLI tool only once. Fill this file as you wish.
|
||||
// This file is auto-generated by the GoFrame CLI tool. You may modify it as needed.
|
||||
// =================================================================================
|
||||
|
||||
package dao
|
||||
@@ -8,20 +8,15 @@ import (
|
||||
"hotgo/internal/dao/internal"
|
||||
)
|
||||
|
||||
// internalSysCronGroupDao is internal type for wrapping internal DAO implements.
|
||||
type internalSysCronGroupDao = *internal.SysCronGroupDao
|
||||
|
||||
// sysCronGroupDao is the data access object for table hg_sys_cron_group.
|
||||
// You can define custom methods on it to extend its functionality as you wish.
|
||||
// sysCronGroupDao is the data access object for the table hg_sys_cron_group.
|
||||
// You can define custom methods on it to extend its functionality as needed.
|
||||
type sysCronGroupDao struct {
|
||||
internalSysCronGroupDao
|
||||
*internal.SysCronGroupDao
|
||||
}
|
||||
|
||||
var (
|
||||
// SysCronGroup is globally public accessible object for table hg_sys_cron_group operations.
|
||||
SysCronGroup = sysCronGroupDao{
|
||||
internal.NewSysCronGroupDao(),
|
||||
}
|
||||
// SysCronGroup is a globally accessible object for table hg_sys_cron_group operations.
|
||||
SysCronGroup = sysCronGroupDao{internal.NewSysCronGroupDao()}
|
||||
)
|
||||
|
||||
// Fill with you ideas below.
|
||||
// Add your custom methods and functionality below.
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
// =================================================================================
|
||||
// This is auto-generated by GoFrame CLI tool only once. Fill this file as you wish.
|
||||
// This file is auto-generated by the GoFrame CLI tool. You may modify it as needed.
|
||||
// =================================================================================
|
||||
|
||||
package dao
|
||||
@@ -8,20 +8,15 @@ import (
|
||||
"hotgo/internal/dao/internal"
|
||||
)
|
||||
|
||||
// internalSysDictDataDao is internal type for wrapping internal DAO implements.
|
||||
type internalSysDictDataDao = *internal.SysDictDataDao
|
||||
|
||||
// sysDictDataDao is the data access object for table hg_sys_dict_data.
|
||||
// You can define custom methods on it to extend its functionality as you wish.
|
||||
// sysDictDataDao is the data access object for the table hg_sys_dict_data.
|
||||
// You can define custom methods on it to extend its functionality as needed.
|
||||
type sysDictDataDao struct {
|
||||
internalSysDictDataDao
|
||||
*internal.SysDictDataDao
|
||||
}
|
||||
|
||||
var (
|
||||
// SysDictData is globally public accessible object for table hg_sys_dict_data operations.
|
||||
SysDictData = sysDictDataDao{
|
||||
internal.NewSysDictDataDao(),
|
||||
}
|
||||
// SysDictData is a globally accessible object for table hg_sys_dict_data operations.
|
||||
SysDictData = sysDictDataDao{internal.NewSysDictDataDao()}
|
||||
)
|
||||
|
||||
// Fill with you ideas below.
|
||||
// Add your custom methods and functionality below.
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
// =================================================================================
|
||||
// This is auto-generated by GoFrame CLI tool only once. Fill this file as you wish.
|
||||
// This file is auto-generated by the GoFrame CLI tool. You may modify it as needed.
|
||||
// =================================================================================
|
||||
|
||||
package dao
|
||||
@@ -8,20 +8,15 @@ import (
|
||||
"hotgo/internal/dao/internal"
|
||||
)
|
||||
|
||||
// internalSysDictTypeDao is internal type for wrapping internal DAO implements.
|
||||
type internalSysDictTypeDao = *internal.SysDictTypeDao
|
||||
|
||||
// sysDictTypeDao is the data access object for table hg_sys_dict_type.
|
||||
// You can define custom methods on it to extend its functionality as you wish.
|
||||
// sysDictTypeDao is the data access object for the table hg_sys_dict_type.
|
||||
// You can define custom methods on it to extend its functionality as needed.
|
||||
type sysDictTypeDao struct {
|
||||
internalSysDictTypeDao
|
||||
*internal.SysDictTypeDao
|
||||
}
|
||||
|
||||
var (
|
||||
// SysDictType is globally public accessible object for table hg_sys_dict_type operations.
|
||||
SysDictType = sysDictTypeDao{
|
||||
internal.NewSysDictTypeDao(),
|
||||
}
|
||||
// SysDictType is a globally accessible object for table hg_sys_dict_type operations.
|
||||
SysDictType = sysDictTypeDao{internal.NewSysDictTypeDao()}
|
||||
)
|
||||
|
||||
// Fill with you ideas below.
|
||||
// Add your custom methods and functionality below.
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
// =================================================================================
|
||||
// This is auto-generated by GoFrame CLI tool only once. Fill this file as you wish.
|
||||
// This file is auto-generated by the GoFrame CLI tool. You may modify it as needed.
|
||||
// =================================================================================
|
||||
|
||||
package dao
|
||||
@@ -8,20 +8,15 @@ import (
|
||||
"hotgo/internal/dao/internal"
|
||||
)
|
||||
|
||||
// internalSysEmsLogDao is internal type for wrapping internal DAO implements.
|
||||
type internalSysEmsLogDao = *internal.SysEmsLogDao
|
||||
|
||||
// sysEmsLogDao is the data access object for table hg_sys_ems_log.
|
||||
// You can define custom methods on it to extend its functionality as you wish.
|
||||
// sysEmsLogDao is the data access object for the table hg_sys_ems_log.
|
||||
// You can define custom methods on it to extend its functionality as needed.
|
||||
type sysEmsLogDao struct {
|
||||
internalSysEmsLogDao
|
||||
*internal.SysEmsLogDao
|
||||
}
|
||||
|
||||
var (
|
||||
// SysEmsLog is globally public accessible object for table hg_sys_ems_log operations.
|
||||
SysEmsLog = sysEmsLogDao{
|
||||
internal.NewSysEmsLogDao(),
|
||||
}
|
||||
// SysEmsLog is a globally accessible object for table hg_sys_ems_log operations.
|
||||
SysEmsLog = sysEmsLogDao{internal.NewSysEmsLogDao()}
|
||||
)
|
||||
|
||||
// Fill with you ideas below.
|
||||
// Add your custom methods and functionality below.
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
// =================================================================================
|
||||
// This is auto-generated by GoFrame CLI tool only once. Fill this file as you wish.
|
||||
// This file is auto-generated by the GoFrame CLI tool. You may modify it as needed.
|
||||
// =================================================================================
|
||||
|
||||
package dao
|
||||
@@ -8,20 +8,15 @@ import (
|
||||
"hotgo/internal/dao/internal"
|
||||
)
|
||||
|
||||
// internalSysGenCodesDao is internal type for wrapping internal DAO implements.
|
||||
type internalSysGenCodesDao = *internal.SysGenCodesDao
|
||||
|
||||
// sysGenCodesDao is the data access object for table hg_sys_gen_codes.
|
||||
// You can define custom methods on it to extend its functionality as you wish.
|
||||
// sysGenCodesDao is the data access object for the table hg_sys_gen_codes.
|
||||
// You can define custom methods on it to extend its functionality as needed.
|
||||
type sysGenCodesDao struct {
|
||||
internalSysGenCodesDao
|
||||
*internal.SysGenCodesDao
|
||||
}
|
||||
|
||||
var (
|
||||
// SysGenCodes is globally public accessible object for table hg_sys_gen_codes operations.
|
||||
SysGenCodes = sysGenCodesDao{
|
||||
internal.NewSysGenCodesDao(),
|
||||
}
|
||||
// SysGenCodes is a globally accessible object for table hg_sys_gen_codes operations.
|
||||
SysGenCodes = sysGenCodesDao{internal.NewSysGenCodesDao()}
|
||||
)
|
||||
|
||||
// Fill with you ideas below.
|
||||
// Add your custom methods and functionality below.
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
// =================================================================================
|
||||
// This is auto-generated by GoFrame CLI tool only once. Fill this file as you wish.
|
||||
// This file is auto-generated by the GoFrame CLI tool. You may modify it as needed.
|
||||
// =================================================================================
|
||||
|
||||
package dao
|
||||
@@ -8,20 +8,15 @@ import (
|
||||
"hotgo/internal/dao/internal"
|
||||
)
|
||||
|
||||
// internalSysGenCurdDemoDao is internal type for wrapping internal DAO implements.
|
||||
type internalSysGenCurdDemoDao = *internal.SysGenCurdDemoDao
|
||||
|
||||
// sysGenCurdDemoDao is the data access object for table hg_sys_gen_curd_demo.
|
||||
// You can define custom methods on it to extend its functionality as you wish.
|
||||
// sysGenCurdDemoDao is the data access object for the table hg_sys_gen_curd_demo.
|
||||
// You can define custom methods on it to extend its functionality as needed.
|
||||
type sysGenCurdDemoDao struct {
|
||||
internalSysGenCurdDemoDao
|
||||
*internal.SysGenCurdDemoDao
|
||||
}
|
||||
|
||||
var (
|
||||
// SysGenCurdDemo is globally public accessible object for table hg_sys_gen_curd_demo operations.
|
||||
SysGenCurdDemo = sysGenCurdDemoDao{
|
||||
internal.NewSysGenCurdDemoDao(),
|
||||
}
|
||||
// SysGenCurdDemo is a globally accessible object for table hg_sys_gen_curd_demo operations.
|
||||
SysGenCurdDemo = sysGenCurdDemoDao{internal.NewSysGenCurdDemoDao()}
|
||||
)
|
||||
|
||||
// Fill with you ideas below.
|
||||
// Add your custom methods and functionality below.
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
// =================================================================================
|
||||
// This is auto-generated by GoFrame CLI tool only once. Fill this file as you wish.
|
||||
// This file is auto-generated by the GoFrame CLI tool. You may modify it as needed.
|
||||
// =================================================================================
|
||||
|
||||
package dao
|
||||
@@ -8,20 +8,15 @@ import (
|
||||
"hotgo/internal/dao/internal"
|
||||
)
|
||||
|
||||
// internalSysGenTreeDemoDao is internal type for wrapping internal DAO implements.
|
||||
type internalSysGenTreeDemoDao = *internal.SysGenTreeDemoDao
|
||||
|
||||
// sysGenTreeDemoDao is the data access object for table hg_sys_gen_tree_demo.
|
||||
// You can define custom methods on it to extend its functionality as you wish.
|
||||
// sysGenTreeDemoDao is the data access object for the table hg_sys_gen_tree_demo.
|
||||
// You can define custom methods on it to extend its functionality as needed.
|
||||
type sysGenTreeDemoDao struct {
|
||||
internalSysGenTreeDemoDao
|
||||
*internal.SysGenTreeDemoDao
|
||||
}
|
||||
|
||||
var (
|
||||
// SysGenTreeDemo is globally public accessible object for table hg_sys_gen_tree_demo operations.
|
||||
SysGenTreeDemo = sysGenTreeDemoDao{
|
||||
internal.NewSysGenTreeDemoDao(),
|
||||
}
|
||||
// SysGenTreeDemo is a globally accessible object for table hg_sys_gen_tree_demo operations.
|
||||
SysGenTreeDemo = sysGenTreeDemoDao{internal.NewSysGenTreeDemoDao()}
|
||||
)
|
||||
|
||||
// Fill with you ideas below.
|
||||
// Add your custom methods and functionality below.
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
// =================================================================================
|
||||
// This is auto-generated by GoFrame CLI tool only once. Fill this file as you wish.
|
||||
// This file is auto-generated by the GoFrame CLI tool. You may modify it as needed.
|
||||
// =================================================================================
|
||||
|
||||
package dao
|
||||
@@ -8,20 +8,15 @@ import (
|
||||
"hotgo/internal/dao/internal"
|
||||
)
|
||||
|
||||
// internalSysLogDao is internal type for wrapping internal DAO implements.
|
||||
type internalSysLogDao = *internal.SysLogDao
|
||||
|
||||
// sysLogDao is the data access object for table hg_sys_log.
|
||||
// You can define custom methods on it to extend its functionality as you wish.
|
||||
// sysLogDao is the data access object for the table hg_sys_log.
|
||||
// You can define custom methods on it to extend its functionality as needed.
|
||||
type sysLogDao struct {
|
||||
internalSysLogDao
|
||||
*internal.SysLogDao
|
||||
}
|
||||
|
||||
var (
|
||||
// SysLog is globally public accessible object for table hg_sys_log operations.
|
||||
SysLog = sysLogDao{
|
||||
internal.NewSysLogDao(),
|
||||
}
|
||||
// SysLog is a globally accessible object for table hg_sys_log operations.
|
||||
SysLog = sysLogDao{internal.NewSysLogDao()}
|
||||
)
|
||||
|
||||
// Fill with you ideas below.
|
||||
// Add your custom methods and functionality below.
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
// =================================================================================
|
||||
// This is auto-generated by GoFrame CLI tool only once. Fill this file as you wish.
|
||||
// This file is auto-generated by the GoFrame CLI tool. You may modify it as needed.
|
||||
// =================================================================================
|
||||
|
||||
package dao
|
||||
@@ -8,20 +8,15 @@ import (
|
||||
"hotgo/internal/dao/internal"
|
||||
)
|
||||
|
||||
// internalSysLoginLogDao is internal type for wrapping internal DAO implements.
|
||||
type internalSysLoginLogDao = *internal.SysLoginLogDao
|
||||
|
||||
// sysLoginLogDao is the data access object for table hg_sys_login_log.
|
||||
// You can define custom methods on it to extend its functionality as you wish.
|
||||
// sysLoginLogDao is the data access object for the table hg_sys_login_log.
|
||||
// You can define custom methods on it to extend its functionality as needed.
|
||||
type sysLoginLogDao struct {
|
||||
internalSysLoginLogDao
|
||||
*internal.SysLoginLogDao
|
||||
}
|
||||
|
||||
var (
|
||||
// SysLoginLog is globally public accessible object for table hg_sys_login_log operations.
|
||||
SysLoginLog = sysLoginLogDao{
|
||||
internal.NewSysLoginLogDao(),
|
||||
}
|
||||
// SysLoginLog is a globally accessible object for table hg_sys_login_log operations.
|
||||
SysLoginLog = sysLoginLogDao{internal.NewSysLoginLogDao()}
|
||||
)
|
||||
|
||||
// Fill with you ideas below.
|
||||
// Add your custom methods and functionality below.
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
// =================================================================================
|
||||
// This is auto-generated by GoFrame CLI tool only once. Fill this file as you wish.
|
||||
// This file is auto-generated by the GoFrame CLI tool. You may modify it as needed.
|
||||
// =================================================================================
|
||||
|
||||
package dao
|
||||
@@ -8,20 +8,15 @@ import (
|
||||
"hotgo/internal/dao/internal"
|
||||
)
|
||||
|
||||
// internalSysProvincesDao is internal type for wrapping internal DAO implements.
|
||||
type internalSysProvincesDao = *internal.SysProvincesDao
|
||||
|
||||
// sysProvincesDao is the data access object for table hg_sys_provinces.
|
||||
// You can define custom methods on it to extend its functionality as you wish.
|
||||
// sysProvincesDao is the data access object for the table hg_sys_provinces.
|
||||
// You can define custom methods on it to extend its functionality as needed.
|
||||
type sysProvincesDao struct {
|
||||
internalSysProvincesDao
|
||||
*internal.SysProvincesDao
|
||||
}
|
||||
|
||||
var (
|
||||
// SysProvinces is globally public accessible object for table hg_sys_provinces operations.
|
||||
SysProvinces = sysProvincesDao{
|
||||
internal.NewSysProvincesDao(),
|
||||
}
|
||||
// SysProvinces is a globally accessible object for table hg_sys_provinces operations.
|
||||
SysProvinces = sysProvincesDao{internal.NewSysProvincesDao()}
|
||||
)
|
||||
|
||||
// Fill with you ideas below.
|
||||
// Add your custom methods and functionality below.
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
// =================================================================================
|
||||
// This is auto-generated by GoFrame CLI tool only once. Fill this file as you wish.
|
||||
// This file is auto-generated by the GoFrame CLI tool. You may modify it as needed.
|
||||
// =================================================================================
|
||||
|
||||
package dao
|
||||
@@ -8,20 +8,15 @@ import (
|
||||
"hotgo/internal/dao/internal"
|
||||
)
|
||||
|
||||
// internalSysServeLicenseDao is internal type for wrapping internal DAO implements.
|
||||
type internalSysServeLicenseDao = *internal.SysServeLicenseDao
|
||||
|
||||
// sysServeLicenseDao is the data access object for table hg_sys_serve_license.
|
||||
// You can define custom methods on it to extend its functionality as you wish.
|
||||
// sysServeLicenseDao is the data access object for the table hg_sys_serve_license.
|
||||
// You can define custom methods on it to extend its functionality as needed.
|
||||
type sysServeLicenseDao struct {
|
||||
internalSysServeLicenseDao
|
||||
*internal.SysServeLicenseDao
|
||||
}
|
||||
|
||||
var (
|
||||
// SysServeLicense is globally public accessible object for table hg_sys_serve_license operations.
|
||||
SysServeLicense = sysServeLicenseDao{
|
||||
internal.NewSysServeLicenseDao(),
|
||||
}
|
||||
// SysServeLicense is a globally accessible object for table hg_sys_serve_license operations.
|
||||
SysServeLicense = sysServeLicenseDao{internal.NewSysServeLicenseDao()}
|
||||
)
|
||||
|
||||
// Fill with you ideas below.
|
||||
// Add your custom methods and functionality below.
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
// =================================================================================
|
||||
// This is auto-generated by GoFrame CLI tool only once. Fill this file as you wish.
|
||||
// This file is auto-generated by the GoFrame CLI tool. You may modify it as needed.
|
||||
// =================================================================================
|
||||
|
||||
package dao
|
||||
@@ -8,20 +8,15 @@ import (
|
||||
"hotgo/internal/dao/internal"
|
||||
)
|
||||
|
||||
// internalSysServeLogDao is internal type for wrapping internal DAO implements.
|
||||
type internalSysServeLogDao = *internal.SysServeLogDao
|
||||
|
||||
// sysServeLogDao is the data access object for table hg_sys_serve_log.
|
||||
// You can define custom methods on it to extend its functionality as you wish.
|
||||
// sysServeLogDao is the data access object for the table hg_sys_serve_log.
|
||||
// You can define custom methods on it to extend its functionality as needed.
|
||||
type sysServeLogDao struct {
|
||||
internalSysServeLogDao
|
||||
*internal.SysServeLogDao
|
||||
}
|
||||
|
||||
var (
|
||||
// SysServeLog is globally public accessible object for table hg_sys_serve_log operations.
|
||||
SysServeLog = sysServeLogDao{
|
||||
internal.NewSysServeLogDao(),
|
||||
}
|
||||
// SysServeLog is a globally accessible object for table hg_sys_serve_log operations.
|
||||
SysServeLog = sysServeLogDao{internal.NewSysServeLogDao()}
|
||||
)
|
||||
|
||||
// Fill with you ideas below.
|
||||
// Add your custom methods and functionality below.
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
// =================================================================================
|
||||
// This is auto-generated by GoFrame CLI tool only once. Fill this file as you wish.
|
||||
// This file is auto-generated by the GoFrame CLI tool. You may modify it as needed.
|
||||
// =================================================================================
|
||||
|
||||
package dao
|
||||
@@ -8,20 +8,15 @@ import (
|
||||
"hotgo/internal/dao/internal"
|
||||
)
|
||||
|
||||
// internalSysSmsLogDao is internal type for wrapping internal DAO implements.
|
||||
type internalSysSmsLogDao = *internal.SysSmsLogDao
|
||||
|
||||
// sysSmsLogDao is the data access object for table hg_sys_sms_log.
|
||||
// You can define custom methods on it to extend its functionality as you wish.
|
||||
// sysSmsLogDao is the data access object for the table hg_sys_sms_log.
|
||||
// You can define custom methods on it to extend its functionality as needed.
|
||||
type sysSmsLogDao struct {
|
||||
internalSysSmsLogDao
|
||||
*internal.SysSmsLogDao
|
||||
}
|
||||
|
||||
var (
|
||||
// SysSmsLog is globally public accessible object for table hg_sys_sms_log operations.
|
||||
SysSmsLog = sysSmsLogDao{
|
||||
internal.NewSysSmsLogDao(),
|
||||
}
|
||||
// SysSmsLog is a globally accessible object for table hg_sys_sms_log operations.
|
||||
SysSmsLog = sysSmsLogDao{internal.NewSysSmsLogDao()}
|
||||
)
|
||||
|
||||
// Fill with you ideas below.
|
||||
// Add your custom methods and functionality below.
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
// =================================================================================
|
||||
// This is auto-generated by GoFrame CLI tool only once. Fill this file as you wish.
|
||||
// This file is auto-generated by the GoFrame CLI tool. You may modify it as needed.
|
||||
// =================================================================================
|
||||
|
||||
package dao
|
||||
@@ -8,20 +8,15 @@ import (
|
||||
"hotgo/internal/dao/internal"
|
||||
)
|
||||
|
||||
// internalTestCategoryDao is internal type for wrapping internal DAO implements.
|
||||
type internalTestCategoryDao = *internal.TestCategoryDao
|
||||
|
||||
// testCategoryDao is the data access object for table hg_test_category.
|
||||
// You can define custom methods on it to extend its functionality as you wish.
|
||||
// testCategoryDao is the data access object for the table hg_test_category.
|
||||
// You can define custom methods on it to extend its functionality as needed.
|
||||
type testCategoryDao struct {
|
||||
internalTestCategoryDao
|
||||
*internal.TestCategoryDao
|
||||
}
|
||||
|
||||
var (
|
||||
// TestCategory is globally public accessible object for table hg_test_category operations.
|
||||
TestCategory = testCategoryDao{
|
||||
internal.NewTestCategoryDao(),
|
||||
}
|
||||
// TestCategory is a globally accessible object for table hg_test_category operations.
|
||||
TestCategory = testCategoryDao{internal.NewTestCategoryDao()}
|
||||
)
|
||||
|
||||
// Fill with you ideas below.
|
||||
// Add your custom methods and functionality below.
|
||||
|
||||
@@ -30,12 +30,10 @@ import (
|
||||
"hotgo/internal/library/hggen/internal/utility/mlog"
|
||||
)
|
||||
|
||||
var (
|
||||
Build = cBuild{
|
||||
nodeNameInConfigFile: "gfcli.build",
|
||||
packedGoFileName: "internal/packed/build_pack_data.go",
|
||||
}
|
||||
)
|
||||
var Build = cBuild{
|
||||
nodeNameInConfigFile: "gfcli.build",
|
||||
packedGoFileName: "internal/packed/build_pack_data.go",
|
||||
}
|
||||
|
||||
type cBuild struct {
|
||||
g.Meta `name:"build" brief:"{cBuildBrief}" dc:"{cBuildDc}" eg:"{cBuildEg}" ad:"{cBuildAd}"`
|
||||
@@ -65,45 +63,67 @@ It provides much more features for building binary:
|
||||
`
|
||||
cBuildAd = `
|
||||
PLATFORMS
|
||||
aix ppc64
|
||||
android 386,amd64,arm,arm64
|
||||
darwin amd64,arm64
|
||||
dragonfly amd64
|
||||
freebsd 386,amd64,arm
|
||||
linux 386,amd64,arm,arm64,ppc64,ppc64le,mips,mipsle,mips64,mips64le
|
||||
illumos amd64
|
||||
ios arm64
|
||||
js wasm
|
||||
linux 386,amd64,arm,arm64,loong64,mips,mipsle,mips64,mips64le,ppc64,ppc64le,riscv64,s390x
|
||||
netbsd 386,amd64,arm
|
||||
openbsd 386,amd64,arm
|
||||
windows 386,amd64
|
||||
openbsd 386,amd64,arm,arm64
|
||||
plan9 386,amd64,arm
|
||||
solaris amd64
|
||||
wasip1 wasm
|
||||
windows 386,amd64,arm,arm64
|
||||
`
|
||||
// https://golang.google.cn/doc/install/source
|
||||
cBuildPlatforms = `
|
||||
aix ppc64
|
||||
android 386
|
||||
android amd64
|
||||
android arm
|
||||
android arm64
|
||||
darwin amd64
|
||||
darwin arm64
|
||||
ios amd64
|
||||
ios arm64
|
||||
dragonfly amd64
|
||||
freebsd 386
|
||||
freebsd amd64
|
||||
freebsd arm
|
||||
illumos amd64
|
||||
ios arm64
|
||||
js wasm
|
||||
linux 386
|
||||
linux amd64
|
||||
linux arm
|
||||
linux arm64
|
||||
linux ppc64
|
||||
linux ppc64le
|
||||
linux loong64
|
||||
linux mips
|
||||
linux mipsle
|
||||
linux mips64
|
||||
linux mips64le
|
||||
linux ppc64
|
||||
linux ppc64le
|
||||
linux riscv64
|
||||
linux s390x
|
||||
netbsd 386
|
||||
netbsd amd64
|
||||
netbsd arm
|
||||
openbsd 386
|
||||
openbsd amd64
|
||||
openbsd arm
|
||||
windows 386
|
||||
windows amd64
|
||||
android arm
|
||||
dragonfly amd64
|
||||
openbsd arm64
|
||||
plan9 386
|
||||
plan9 amd64
|
||||
plan9 arm
|
||||
solaris amd64
|
||||
wasip1 wasm
|
||||
windows 386
|
||||
windows amd64
|
||||
windows arm
|
||||
windows arm64
|
||||
`
|
||||
)
|
||||
|
||||
|
||||
@@ -11,6 +11,8 @@ import (
|
||||
"context"
|
||||
|
||||
"github.com/olekukonko/tablewriter"
|
||||
"github.com/olekukonko/tablewriter/renderer"
|
||||
"github.com/olekukonko/tablewriter/tw"
|
||||
|
||||
"github.com/gogf/gf/v2/frame/g"
|
||||
"github.com/gogf/gf/v2/os/gproc"
|
||||
@@ -61,10 +63,23 @@ func (c cEnv) Index(ctx context.Context, in cEnvInput) (out *cEnvOutput, err err
|
||||
}
|
||||
array = append(array, []string{gstr.Trim(match[1]), gstr.Trim(match[2])})
|
||||
}
|
||||
tw := tablewriter.NewWriter(buffer)
|
||||
tw.SetColumnAlignment([]int{tablewriter.ALIGN_LEFT, tablewriter.ALIGN_LEFT})
|
||||
tw.AppendBulk(array)
|
||||
tw.Render()
|
||||
table := tablewriter.NewTable(buffer,
|
||||
tablewriter.WithRenderer(renderer.NewBlueprint(tw.Rendition{
|
||||
Settings: tw.Settings{
|
||||
Separators: tw.Separators{BetweenRows: tw.Off, BetweenColumns: tw.On},
|
||||
},
|
||||
Symbols: tw.NewSymbols(tw.StyleASCII),
|
||||
})),
|
||||
tablewriter.WithConfig(tablewriter.Config{
|
||||
Row: tw.CellConfig{
|
||||
Formatting: tw.CellFormatting{AutoWrap: tw.WrapNone},
|
||||
Alignment: tw.CellAlignment{PerColumn: []tw.Align{tw.AlignLeft, tw.AlignLeft}},
|
||||
ColMaxWidths: tw.CellWidth{Global: 84},
|
||||
},
|
||||
}),
|
||||
)
|
||||
table.Bulk(array)
|
||||
table.Render()
|
||||
mlog.Print(buffer.String())
|
||||
return
|
||||
}
|
||||
|
||||
@@ -13,6 +13,7 @@ import (
|
||||
"path/filepath"
|
||||
"runtime"
|
||||
"strings"
|
||||
"time"
|
||||
|
||||
"github.com/gogf/gf/v2/container/gtype"
|
||||
"github.com/gogf/gf/v2/frame/g"
|
||||
@@ -26,9 +27,7 @@ import (
|
||||
"hotgo/internal/library/hggen/internal/utility/mlog"
|
||||
)
|
||||
|
||||
var (
|
||||
Run = cRun{}
|
||||
)
|
||||
var Run = cRun{}
|
||||
|
||||
type cRun struct {
|
||||
g.Meta `name:"run" usage:"{cRunUsage}" brief:"{cRunBrief}" eg:"{cRunEg}" dc:"{cRunDc}"`
|
||||
@@ -62,9 +61,7 @@ which compiles and runs the go codes asynchronously when codes change.
|
||||
cRunWatchPathsBrief = `watch additional paths for live reload, separated by ",". i.e. "manifest/config/*.yaml"`
|
||||
)
|
||||
|
||||
var (
|
||||
process *gproc.Process
|
||||
)
|
||||
var process *gproc.Process
|
||||
|
||||
func init() {
|
||||
gtag.Sets(g.MapStrStr{
|
||||
@@ -118,8 +115,12 @@ func (c cRun) Index(ctx context.Context, in cRunInput) (out *cRunOutput, err err
|
||||
}
|
||||
dirty := gtype.NewBool()
|
||||
|
||||
var outputPath = app.genOutputPath()
|
||||
outputPath := app.genOutputPath()
|
||||
callbackFunc := func(event *gfsnotify.Event) {
|
||||
if !event.IsWrite() && !event.IsCreate() && !event.IsRemove() && !event.IsRename() {
|
||||
return
|
||||
}
|
||||
|
||||
if gfile.ExtName(event.Path) != "go" {
|
||||
return
|
||||
}
|
||||
@@ -207,8 +208,37 @@ func (app *cRunApp) End(ctx context.Context, sig os.Signal, outputPath string) {
|
||||
// Delete the binary file.
|
||||
// firstly, kill the process.
|
||||
if process != nil {
|
||||
if err := process.Kill(); err != nil {
|
||||
mlog.Debugf("kill process error: %s", err.Error())
|
||||
if sig != nil && runtime.GOOS != "windows" {
|
||||
if err := process.Signal(sig); err != nil {
|
||||
mlog.Debugf("send signal to process error: %s", err.Error())
|
||||
if err := process.Kill(); err != nil {
|
||||
mlog.Debugf("kill process error: %s", err.Error())
|
||||
}
|
||||
} else {
|
||||
waitCtx, cancel := context.WithTimeout(ctx, 30*time.Second)
|
||||
defer cancel()
|
||||
done := make(chan error, 1)
|
||||
go func() {
|
||||
select {
|
||||
case <-waitCtx.Done():
|
||||
done <- waitCtx.Err()
|
||||
case done <- process.Wait():
|
||||
}
|
||||
}()
|
||||
err := <-done
|
||||
if err != nil {
|
||||
mlog.Debugf("process wait error: %s", err.Error())
|
||||
if err := process.Kill(); err != nil {
|
||||
mlog.Debugf("kill process error: %s", err.Error())
|
||||
}
|
||||
} else {
|
||||
mlog.Debug("process exited gracefully")
|
||||
}
|
||||
}
|
||||
} else {
|
||||
if err := process.Kill(); err != nil {
|
||||
mlog.Debugf("kill process error: %s", err.Error())
|
||||
}
|
||||
}
|
||||
}
|
||||
if err := gfile.RemoveFile(outputPath); err != nil {
|
||||
|
||||
@@ -15,6 +15,7 @@ import (
|
||||
|
||||
"github.com/gogf/gf/v2/container/gset"
|
||||
"github.com/gogf/gf/v2/frame/g"
|
||||
"github.com/gogf/gf/v2/os/genv"
|
||||
"github.com/gogf/gf/v2/os/gfile"
|
||||
"github.com/gogf/gf/v2/os/gproc"
|
||||
"github.com/gogf/gf/v2/text/gstr"
|
||||
@@ -39,7 +40,11 @@ gf up
|
||||
gf up -a
|
||||
gf up -c
|
||||
gf up -cf
|
||||
gf up -a -m=install
|
||||
gf up -a -m=install -p=github.com/gogf/gf/cmd/gf/v2@latest
|
||||
`
|
||||
cliMethodHttpDownload = "http"
|
||||
cliMethodGoInstall = "install"
|
||||
)
|
||||
|
||||
func init() {
|
||||
@@ -49,10 +54,14 @@ func init() {
|
||||
}
|
||||
|
||||
type cUpInput struct {
|
||||
g.Meta `name:"up" config:"gfcli.up"`
|
||||
All bool `name:"all" short:"a" brief:"upgrade both version and cli, auto fix codes" orphan:"true"`
|
||||
Cli bool `name:"cli" short:"c" brief:"also upgrade CLI tool" orphan:"true"`
|
||||
Fix bool `name:"fix" short:"f" brief:"auto fix codes(it only make sense if cli is to be upgraded)" orphan:"true"`
|
||||
g.Meta `name:"up" config:"gfcli.up"`
|
||||
All bool `name:"all" short:"a" brief:"upgrade both version and cli, auto fix codes" orphan:"true"`
|
||||
Cli bool `name:"cli" short:"c" brief:"also upgrade CLI tool" orphan:"true"`
|
||||
Fix bool `name:"fix" short:"f" brief:"auto fix codes(it only make sense if cli is to be upgraded)" orphan:"true"`
|
||||
CliDownloadingMethod string `name:"cli-download-method" short:"m" brief:"cli upgrade method: http=download binary via HTTP GET, install=upgrade via go install" d:"http"`
|
||||
// CliModulePath specifies the module path for CLI installation via go install.
|
||||
// This is used when CliDownloadingMethod is set to "install".
|
||||
CliModulePath string `name:"cli-module-path" short:"p" brief:"custom cli module path for upgrade CLI tool with go install method" d:"github.com/gogf/gf/cmd/gf/v2@latest"`
|
||||
}
|
||||
|
||||
type cUpOutput struct{}
|
||||
@@ -76,7 +85,7 @@ func (c cUp) Index(ctx context.Context, in cUpInput) (out *cUpOutput, err error)
|
||||
}
|
||||
|
||||
if in.Cli {
|
||||
if err = c.doUpgradeCLI(ctx); err != nil {
|
||||
if err = c.doUpgradeCLI(ctx, in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
}
|
||||
@@ -170,8 +179,22 @@ func (c cUp) doUpgradeVersion(ctx context.Context, in cUpInput) (out *doUpgradeV
|
||||
}
|
||||
|
||||
// doUpgradeCLI downloads the new version binary with process.
|
||||
func (c cUp) doUpgradeCLI(ctx context.Context) (err error) {
|
||||
func (c cUp) doUpgradeCLI(ctx context.Context, in cUpInput) (err error) {
|
||||
mlog.Print(`start upgrading cli...`)
|
||||
fmt.Println(` cli upgrade method:`, in.CliDownloadingMethod)
|
||||
switch in.CliDownloadingMethod {
|
||||
case cliMethodHttpDownload:
|
||||
return c.doUpgradeCLIWithHttpDownload(ctx)
|
||||
case cliMethodGoInstall:
|
||||
return c.doUpgradeCLIWithGoInstall(ctx, in)
|
||||
default:
|
||||
mlog.Fatalf(`invalid cli upgrade method: "%s", please use "http" or "install"`, in.CliDownloadingMethod)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
func (c cUp) doUpgradeCLIWithHttpDownload(ctx context.Context) (err error) {
|
||||
mlog.Print(`start upgrading cli with http get download...`)
|
||||
var (
|
||||
downloadUrl = fmt.Sprintf(
|
||||
`https://github.com/gogf/gf/releases/latest/download/gf_%s_%s`,
|
||||
@@ -213,6 +236,41 @@ func (c cUp) doUpgradeCLI(ctx context.Context) (err error) {
|
||||
return
|
||||
}
|
||||
|
||||
func (c cUp) doUpgradeCLIWithGoInstall(ctx context.Context, in cUpInput) (err error) {
|
||||
mlog.Print(`upgrading cli with go install...`)
|
||||
if !genv.Contains("GOPATH") {
|
||||
mlog.Fatal(`"GOPATH" environment variable does not exist, please check your go installation`)
|
||||
}
|
||||
|
||||
command := fmt.Sprintf(`go install %s`, in.CliModulePath)
|
||||
mlog.Printf(`running command: %s`, command)
|
||||
err = gproc.ShellRun(ctx, command)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
cliFilePath := gfile.Join(genv.Get("GOPATH").String(), "bin/gf")
|
||||
if runtime.GOOS == "windows" {
|
||||
cliFilePath += ".exe"
|
||||
}
|
||||
|
||||
// It fails if file not exist or its size is less than 1MB.
|
||||
if !gfile.Exists(cliFilePath) || gfile.Size(cliFilePath) < 1024*1024 {
|
||||
mlog.Fatalf(`go install %s failed, "%s" does not exist or its size is less than 1MB`, in.CliModulePath, cliFilePath)
|
||||
}
|
||||
|
||||
newFile, err := gfile.Open(cliFilePath)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
// selfupdate
|
||||
err = selfupdate.Apply(newFile, selfupdate.Options{})
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
func (c cUp) doAutoFixing(ctx context.Context, dirPath string, version string) (err error) {
|
||||
mlog.Printf(`auto fixing directory path "%s" from version "%s" ...`, dirPath, version)
|
||||
command := fmt.Sprintf(`gf fix -p %s`, dirPath)
|
||||
|
||||
@@ -15,6 +15,7 @@ import (
|
||||
"github.com/gogf/gf/v2/os/gtime"
|
||||
"github.com/gogf/gf/v2/util/gconv"
|
||||
"github.com/gogf/gf/v2/util/gtag"
|
||||
|
||||
"hotgo/internal/library/hggen/internal/utility/mlog"
|
||||
)
|
||||
|
||||
|
||||
@@ -11,6 +11,9 @@ import (
|
||||
"fmt"
|
||||
"strings"
|
||||
|
||||
"github.com/olekukonko/tablewriter"
|
||||
"github.com/olekukonko/tablewriter/renderer"
|
||||
"github.com/olekukonko/tablewriter/tw"
|
||||
"golang.org/x/mod/modfile"
|
||||
|
||||
"github.com/gogf/gf/v2/container/garray"
|
||||
@@ -44,8 +47,10 @@ type (
|
||||
JsonCase string `name:"jsonCase" short:"j" brief:"{CGenDaoBriefJsonCase}" d:"CamelLower"`
|
||||
ImportPrefix string `name:"importPrefix" short:"i" brief:"{CGenDaoBriefImportPrefix}"`
|
||||
DaoPath string `name:"daoPath" short:"d" brief:"{CGenDaoBriefDaoPath}" d:"dao"`
|
||||
TablePath string `name:"tablePath" short:"tp" brief:"{CGenDaoBriefTablePath}" d:"table"`
|
||||
DoPath string `name:"doPath" short:"o" brief:"{CGenDaoBriefDoPath}" d:"model/do"`
|
||||
EntityPath string `name:"entityPath" short:"e" brief:"{CGenDaoBriefEntityPath}" d:"model/entity"`
|
||||
TplDaoTablePath string `name:"tplDaoTablePath" short:"t0" brief:"{CGenDaoBriefTplDaoTablePath}"`
|
||||
TplDaoIndexPath string `name:"tplDaoIndexPath" short:"t1" brief:"{CGenDaoBriefTplDaoIndexPath}"`
|
||||
TplDaoInternalPath string `name:"tplDaoInternalPath" short:"t2" brief:"{CGenDaoBriefTplDaoInternalPath}"`
|
||||
TplDaoDoPath string `name:"tplDaoDoPath" short:"t3" brief:"{CGenDaoBriefTplDaoDoPathPath}"`
|
||||
@@ -58,6 +63,7 @@ type (
|
||||
NoJsonTag bool `name:"noJsonTag" short:"k" brief:"{CGenDaoBriefNoJsonTag}" orphan:"true"`
|
||||
NoModelComment bool `name:"noModelComment" short:"m" brief:"{CGenDaoBriefNoModelComment}" orphan:"true"`
|
||||
Clear bool `name:"clear" short:"a" brief:"{CGenDaoBriefClear}" orphan:"true"`
|
||||
GenTable bool `name:"genTable" short:"gt" brief:"{CGenDaoBriefGenTable}" orphan:"true"`
|
||||
|
||||
TypeMapping map[DBFieldTypeName]CustomAttributeType `name:"typeMapping" short:"y" brief:"{CGenDaoBriefTypeMapping}" orphan:"true"`
|
||||
FieldMapping map[DBTableFieldName]CustomAttributeType `name:"fieldMapping" short:"fm" brief:"{CGenDaoBriefFieldMapping}" orphan:"true"`
|
||||
@@ -99,6 +105,20 @@ var (
|
||||
Type: "float64",
|
||||
},
|
||||
}
|
||||
|
||||
// tablewriter Options
|
||||
twRenderer = tablewriter.WithRenderer(renderer.NewBlueprint(tw.Rendition{
|
||||
Borders: tw.Border{Top: tw.Off, Bottom: tw.Off, Left: tw.Off, Right: tw.Off},
|
||||
Settings: tw.Settings{
|
||||
Separators: tw.Separators{BetweenRows: tw.Off, BetweenColumns: tw.Off},
|
||||
},
|
||||
Symbols: tw.NewSymbols(tw.StyleASCII),
|
||||
}))
|
||||
twConfig = tablewriter.WithConfig(tablewriter.Config{
|
||||
Row: tw.CellConfig{
|
||||
Formatting: tw.CellFormatting{AutoWrap: tw.WrapNone},
|
||||
},
|
||||
})
|
||||
)
|
||||
|
||||
func (c CGenDao) Dao(ctx context.Context, in CGenDaoInput) (out *CGenDaoOutput, err error) {
|
||||
@@ -127,7 +147,7 @@ func doGenDaoForArray(ctx context.Context, index int, in CGenDaoInput) {
|
||||
if in.genItems == nil {
|
||||
in.genItems = newCGenDaoInternalGenItems()
|
||||
}
|
||||
|
||||
|
||||
var (
|
||||
err error
|
||||
db gdb.DB
|
||||
@@ -177,8 +197,29 @@ func doGenDaoForArray(ctx context.Context, index int, in CGenDaoInput) {
|
||||
// Table excluding.
|
||||
if in.TablesEx != "" {
|
||||
array := garray.NewStrArrayFrom(tableNames)
|
||||
for _, v := range gstr.SplitAndTrim(in.TablesEx, ",") {
|
||||
array.RemoveValue(v)
|
||||
for _, p := range gstr.SplitAndTrim(in.TablesEx, ",") {
|
||||
if gstr.Contains(p, "*") || gstr.Contains(p, "?") {
|
||||
p = gstr.ReplaceByMap(p, map[string]string{
|
||||
"\r": "",
|
||||
"\n": "",
|
||||
})
|
||||
p = gstr.ReplaceByMap(p, map[string]string{
|
||||
"*": "\r",
|
||||
"?": "\n",
|
||||
})
|
||||
p = gregex.Quote(p)
|
||||
p = gstr.ReplaceByMap(p, map[string]string{
|
||||
"\r": ".*",
|
||||
"\n": ".",
|
||||
})
|
||||
for _, v := range array.Clone().Slice() {
|
||||
if gregex.IsMatchString(p, v) {
|
||||
array.RemoveValue(v)
|
||||
}
|
||||
}
|
||||
} else {
|
||||
array.RemoveValue(p)
|
||||
}
|
||||
}
|
||||
tableNames = array.Slice()
|
||||
}
|
||||
@@ -223,14 +264,18 @@ func doGenDaoForArray(ctx context.Context, index int, in CGenDaoInput) {
|
||||
tableNames[i] = ""
|
||||
continue
|
||||
}
|
||||
shardingNewTableSet.Add(newTableName)
|
||||
// Add prefix to sharding table name, if not, the isSharding check would not match.
|
||||
shardingNewTableSet.Add(in.Prefix + newTableName)
|
||||
}
|
||||
}
|
||||
newTableName = in.Prefix + newTableName
|
||||
newTableNames[i] = newTableName
|
||||
if tableNames[i] != "" {
|
||||
// If shardingNewTableSet contains newTableName (tableName is empty), it should not be added to tableNames, make it empty and filter later.
|
||||
newTableNames[i] = newTableName
|
||||
}
|
||||
}
|
||||
tableNames = garray.NewStrArrayFrom(tableNames).FilterEmpty().Slice()
|
||||
|
||||
newTableNames = garray.NewStrArrayFrom(newTableNames).FilterEmpty().Slice() // Filter empty table names. make sure that newTableNames and tableNames have the same length.
|
||||
in.genItems.Scale()
|
||||
|
||||
// Dao: index and internal.
|
||||
@@ -241,6 +286,14 @@ func doGenDaoForArray(ctx context.Context, index int, in CGenDaoInput) {
|
||||
NewTableNames: newTableNames,
|
||||
ShardingTableSet: shardingNewTableSet,
|
||||
})
|
||||
// Table: table fields.
|
||||
generateTable(ctx, CGenDaoInternalInput{
|
||||
CGenDaoInput: in,
|
||||
DB: db,
|
||||
TableNames: tableNames,
|
||||
NewTableNames: newTableNames,
|
||||
ShardingTableSet: shardingNewTableSet,
|
||||
})
|
||||
// Do.
|
||||
generateDo(ctx, CGenDaoInternalInput{
|
||||
CGenDaoInput: in,
|
||||
|
||||
@@ -127,6 +127,7 @@ func generateDaoIndex(in generateDaoIndexInput) {
|
||||
tplView.ClearAssigns()
|
||||
tplView.Assigns(gview.Params{
|
||||
tplVarTableSharding: in.IsSharding,
|
||||
tplVarTableShardingPrefix: in.NewTableName + "_",
|
||||
tplVarImportPrefix: in.ImportPrefix,
|
||||
tplVarTableName: in.TableName,
|
||||
tplVarTableNameCamelCase: in.TableNameCamelCase,
|
||||
@@ -210,13 +211,9 @@ func generateColumnNamesForDao(fieldMap map[string]*gdb.TableField, removeFieldP
|
||||
fmt.Sprintf(` #"%s",`, field.Name),
|
||||
}
|
||||
}
|
||||
tw := tablewriter.NewWriter(buffer)
|
||||
tw.SetBorder(false)
|
||||
tw.SetRowLine(false)
|
||||
tw.SetAutoWrapText(false)
|
||||
tw.SetColumnSeparator("")
|
||||
tw.AppendBulk(array)
|
||||
tw.Render()
|
||||
table := tablewriter.NewTable(buffer, twRenderer, twConfig)
|
||||
table.Bulk(array)
|
||||
table.Render()
|
||||
namesContent := buffer.String()
|
||||
// Let's do this hack of table writer for indent!
|
||||
namesContent = gstr.Replace(namesContent, " #", "")
|
||||
@@ -251,13 +248,9 @@ func generateColumnDefinitionForDao(fieldMap map[string]*gdb.TableField, removeF
|
||||
" #" + fmt.Sprintf(`// %s`, comment),
|
||||
}
|
||||
}
|
||||
tw := tablewriter.NewWriter(buffer)
|
||||
tw.SetBorder(false)
|
||||
tw.SetRowLine(false)
|
||||
tw.SetAutoWrapText(false)
|
||||
tw.SetColumnSeparator("")
|
||||
tw.AppendBulk(array)
|
||||
tw.Render()
|
||||
table := tablewriter.NewTable(buffer, twRenderer, twConfig)
|
||||
table.Bulk(array)
|
||||
table.Render()
|
||||
defineContent := buffer.String()
|
||||
// Let's do this hack of table writer for indent!
|
||||
defineContent = gstr.Replace(defineContent, " #", "")
|
||||
|
||||
@@ -45,14 +45,14 @@ func generateDo(ctx context.Context, in CGenDaoInternalInput) {
|
||||
IsDo: true,
|
||||
})
|
||||
)
|
||||
// replace all types to interface{}.
|
||||
// replace all types to any.
|
||||
structDefinition, _ = gregex.ReplaceStringFuncMatch(
|
||||
"([A-Z]\\w*?)\\s+([\\w\\*\\.]+?)\\s+(//)",
|
||||
structDefinition,
|
||||
func(match []string) string {
|
||||
// If the type is already a pointer/slice/map, it does nothing.
|
||||
if !gstr.HasPrefix(match[2], "*") && !gstr.HasPrefix(match[2], "[]") && !gstr.HasPrefix(match[2], "map") {
|
||||
return fmt.Sprintf(`%s interface{} %s`, match[1], match[3])
|
||||
return fmt.Sprintf(`%s any %s`, match[1], match[3])
|
||||
}
|
||||
return match[0]
|
||||
},
|
||||
|
||||
@@ -41,28 +41,55 @@ func generateStructDefinition(ctx context.Context, in generateStructDefinitionIn
|
||||
appendImports = append(appendImports, imports)
|
||||
}
|
||||
}
|
||||
tw := tablewriter.NewWriter(buffer)
|
||||
tw.SetBorder(false)
|
||||
tw.SetRowLine(false)
|
||||
tw.SetAutoWrapText(false)
|
||||
tw.SetColumnSeparator("")
|
||||
tw.AppendBulk(array)
|
||||
tw.Render()
|
||||
table := tablewriter.NewTable(buffer, twRenderer, twConfig)
|
||||
table.Bulk(array)
|
||||
table.Render()
|
||||
stContent := buffer.String()
|
||||
// Let's do this hack of table writer for indent!
|
||||
stContent = gstr.Replace(stContent, " #", "")
|
||||
stContent = gstr.Replace(stContent, "` ", "`")
|
||||
stContent = gstr.Replace(stContent, "``", "")
|
||||
buffer.Reset()
|
||||
buffer.WriteString(fmt.Sprintf("type %s struct {\n", in.StructName))
|
||||
fmt.Fprintf(buffer, "type %s struct {\n", in.StructName)
|
||||
if in.IsDo {
|
||||
buffer.WriteString(fmt.Sprintf("g.Meta `orm:\"table:%s, do:true\"`\n", in.TableName))
|
||||
fmt.Fprintf(buffer, "g.Meta `orm:\"table:%s, do:true\"`\n", in.TableName)
|
||||
}
|
||||
buffer.WriteString(stContent)
|
||||
buffer.WriteString("}")
|
||||
return buffer.String(), appendImports
|
||||
}
|
||||
|
||||
func getTypeMappingInfo(
|
||||
ctx context.Context, fieldType string, inTypeMapping map[DBFieldTypeName]CustomAttributeType,
|
||||
) (typeNameStr, importStr string) {
|
||||
if typeMapping, ok := inTypeMapping[strings.ToLower(fieldType)]; ok {
|
||||
typeNameStr = typeMapping.Type
|
||||
importStr = typeMapping.Import
|
||||
return
|
||||
}
|
||||
tryTypeMatch, _ := gregex.MatchString(`(.+?)\(([^\(\)]+)\)([\s\)]*)`, fieldType)
|
||||
var (
|
||||
tryTypeName string
|
||||
moreTry bool
|
||||
)
|
||||
if len(tryTypeMatch) == 4 {
|
||||
tryTypeMatch3, _ := gregex.ReplaceString(`\s+`, "", tryTypeMatch[3])
|
||||
tryTypeName = gstr.Trim(tryTypeMatch[1]) + tryTypeMatch3
|
||||
moreTry = tryTypeMatch3 != ""
|
||||
} else {
|
||||
tryTypeName = gstr.Split(fieldType, " ")[0]
|
||||
}
|
||||
if tryTypeName != "" {
|
||||
if typeMapping, ok := inTypeMapping[strings.ToLower(tryTypeName)]; ok {
|
||||
typeNameStr = typeMapping.Type
|
||||
importStr = typeMapping.Import
|
||||
} else if moreTry {
|
||||
typeNameStr, importStr = getTypeMappingInfo(ctx, tryTypeName, inTypeMapping)
|
||||
}
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// generateStructFieldDefinition generates and returns the attribute definition for specified field.
|
||||
func generateStructFieldDefinition(
|
||||
ctx context.Context, field *gdb.TableField, in generateStructDefinitionInput,
|
||||
@@ -75,21 +102,7 @@ func generateStructFieldDefinition(
|
||||
)
|
||||
|
||||
if in.TypeMapping != nil && len(in.TypeMapping) > 0 {
|
||||
var (
|
||||
tryTypeName string
|
||||
)
|
||||
tryTypeMatch, _ := gregex.MatchString(`(.+?)\((.+)\)`, field.Type)
|
||||
if len(tryTypeMatch) == 3 {
|
||||
tryTypeName = gstr.Trim(tryTypeMatch[1])
|
||||
} else {
|
||||
tryTypeName = gstr.Split(field.Type, " ")[0]
|
||||
}
|
||||
if tryTypeName != "" {
|
||||
if typeMapping, ok := in.TypeMapping[strings.ToLower(tryTypeName)]; ok {
|
||||
localTypeNameStr = typeMapping.Type
|
||||
appendImport = typeMapping.Import
|
||||
}
|
||||
}
|
||||
localTypeNameStr, appendImport = getTypeMappingInfo(ctx, field.Type, in.TypeMapping)
|
||||
}
|
||||
|
||||
if localTypeNameStr == "" {
|
||||
|
||||
@@ -0,0 +1,147 @@
|
||||
// Copyright GoFrame gf Author(https://goframe.org). All Rights Reserved.
|
||||
//
|
||||
// This Source Code Form is subject to the terms of the MIT License.
|
||||
// If a copy of the MIT was not distributed with this file,
|
||||
// You can obtain one at https://github.com/gogf/gf.
|
||||
|
||||
package gendao
|
||||
|
||||
import (
|
||||
"bytes"
|
||||
"context"
|
||||
"path/filepath"
|
||||
"sort"
|
||||
"strconv"
|
||||
"strings"
|
||||
|
||||
"github.com/gogf/gf/v2/database/gdb"
|
||||
"github.com/gogf/gf/v2/os/gfile"
|
||||
"github.com/gogf/gf/v2/os/gview"
|
||||
"github.com/gogf/gf/v2/text/gstr"
|
||||
"github.com/gogf/gf/v2/util/gconv"
|
||||
|
||||
"hotgo/internal/library/hggen/internal/consts"
|
||||
"hotgo/internal/library/hggen/internal/utility/mlog"
|
||||
"hotgo/internal/library/hggen/internal/utility/utils"
|
||||
)
|
||||
|
||||
// generateTable generates dao files for given tables.
|
||||
func generateTable(ctx context.Context, in CGenDaoInternalInput) {
|
||||
dirPathTable := gfile.Join(in.Path, in.TablePath)
|
||||
if !in.GenTable {
|
||||
if gfile.Exists(dirPathTable) {
|
||||
in.genItems.AppendDirPath(dirPathTable)
|
||||
}
|
||||
return
|
||||
}
|
||||
in.genItems.AppendDirPath(dirPathTable)
|
||||
for i := 0; i < len(in.TableNames); i++ {
|
||||
var (
|
||||
realTableName = in.TableNames[i]
|
||||
newTableName = in.NewTableNames[i]
|
||||
)
|
||||
generateTableSingle(ctx, generateTableSingleInput{
|
||||
CGenDaoInternalInput: in,
|
||||
TableName: realTableName,
|
||||
NewTableName: newTableName,
|
||||
DirPathTable: dirPathTable,
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
// generateTableSingleInput is the input parameter for generateTableSingle.
|
||||
type generateTableSingleInput struct {
|
||||
CGenDaoInternalInput
|
||||
// TableName specifies the table name of the table.
|
||||
TableName string
|
||||
// NewTableName specifies the prefix-stripped or custom edited name of the table.
|
||||
NewTableName string
|
||||
DirPathTable string
|
||||
}
|
||||
|
||||
// generateTableSingle generates dao files for a single table.
|
||||
func generateTableSingle(ctx context.Context, in generateTableSingleInput) {
|
||||
// Generating table data preparing.
|
||||
fieldMap, err := in.DB.TableFields(ctx, in.TableName)
|
||||
if err != nil {
|
||||
mlog.Fatalf(`fetching tables fields failed for table "%s": %+v`, in.TableName, err)
|
||||
}
|
||||
|
||||
tableNameSnakeCase := gstr.CaseSnake(in.NewTableName)
|
||||
fileName := gstr.Trim(tableNameSnakeCase, "-_.")
|
||||
if len(fileName) > 5 && fileName[len(fileName)-5:] == "_test" {
|
||||
// Add suffix to avoid the table name which contains "_test",
|
||||
// which would make the go file a testing file.
|
||||
fileName += "_table"
|
||||
}
|
||||
path := filepath.FromSlash(gfile.Join(in.DirPathTable, fileName+".go"))
|
||||
in.genItems.AppendGeneratedFilePath(path)
|
||||
if in.OverwriteDao || !gfile.Exists(path) {
|
||||
var (
|
||||
ctx = context.Background()
|
||||
tplContent = getTemplateFromPathOrDefault(
|
||||
in.TplDaoTablePath, consts.TemplateGenTableContent,
|
||||
)
|
||||
)
|
||||
tplView.ClearAssigns()
|
||||
tplView.Assigns(gview.Params{
|
||||
tplVarGroupName: in.Group,
|
||||
tplVarTableName: in.TableName,
|
||||
tplVarTableNameCamelCase: formatFieldName(in.NewTableName, FieldNameCaseCamel),
|
||||
tplVarPackageName: filepath.Base(in.TablePath),
|
||||
tplVarTableFields: generateTableFields(fieldMap),
|
||||
})
|
||||
indexContent, err := tplView.ParseContent(ctx, tplContent)
|
||||
if err != nil {
|
||||
mlog.Fatalf("parsing template content failed: %v", err)
|
||||
}
|
||||
if err = gfile.PutContents(path, strings.TrimSpace(indexContent)); err != nil {
|
||||
mlog.Fatalf("writing content to '%s' failed: %v", path, err)
|
||||
} else {
|
||||
utils.GoFmt(path)
|
||||
mlog.Print("generated:", gfile.RealPath(path))
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// generateTableFields generates and returns the field definition content for specified table.
|
||||
func generateTableFields(fields map[string]*gdb.TableField) string {
|
||||
var buf bytes.Buffer
|
||||
fieldNames := make([]string, 0, len(fields))
|
||||
for fieldName := range fields {
|
||||
fieldNames = append(fieldNames, fieldName)
|
||||
}
|
||||
sort.Slice(fieldNames, func(i, j int) bool {
|
||||
return fields[fieldNames[i]].Index < fields[fieldNames[j]].Index // asc
|
||||
})
|
||||
for index, fieldName := range fieldNames {
|
||||
field := fields[fieldName]
|
||||
buf.WriteString(" " + strconv.Quote(field.Name) + ": {\n")
|
||||
buf.WriteString(" Index: " + gconv.String(field.Index) + ",\n")
|
||||
buf.WriteString(" Name: " + strconv.Quote(field.Name) + ",\n")
|
||||
buf.WriteString(" Type: " + strconv.Quote(field.Type) + ",\n")
|
||||
buf.WriteString(" Null: " + gconv.String(field.Null) + ",\n")
|
||||
buf.WriteString(" Key: " + strconv.Quote(field.Key) + ",\n")
|
||||
buf.WriteString(" Default: " + generateDefaultValue(field.Default) + ",\n")
|
||||
buf.WriteString(" Extra: " + strconv.Quote(field.Extra) + ",\n")
|
||||
buf.WriteString(" Comment: " + strconv.Quote(field.Comment) + ",\n")
|
||||
buf.WriteString(" },")
|
||||
if index != len(fieldNames)-1 {
|
||||
buf.WriteString("\n")
|
||||
}
|
||||
}
|
||||
return buf.String()
|
||||
}
|
||||
|
||||
// generateDefaultValue generates and returns the default value definition for specified field.
|
||||
func generateDefaultValue(value interface{}) string {
|
||||
if value == nil {
|
||||
return "nil"
|
||||
}
|
||||
switch v := value.(type) {
|
||||
case string:
|
||||
return strconv.Quote(v)
|
||||
default:
|
||||
return gconv.String(v)
|
||||
}
|
||||
}
|
||||
@@ -60,6 +60,7 @@ CONFIGURATION SUPPORT
|
||||
CGenDaoBriefGJsonSupport = `use gJsonSupport to use *gjson.Json instead of string for generated json fields of tables`
|
||||
CGenDaoBriefImportPrefix = `custom import prefix for generated go files`
|
||||
CGenDaoBriefDaoPath = `directory path for storing generated dao files under path`
|
||||
CGenDaoBriefTablePath = `directory path for storing generated table files under path`
|
||||
CGenDaoBriefDoPath = `directory path for storing generated do files under path`
|
||||
CGenDaoBriefEntityPath = `directory path for storing generated entity files under path`
|
||||
CGenDaoBriefOverwriteDao = `overwrite all dao files both inside/outside internal folder`
|
||||
@@ -69,6 +70,7 @@ CONFIGURATION SUPPORT
|
||||
CGenDaoBriefNoJsonTag = `no json tag will be added for each field`
|
||||
CGenDaoBriefNoModelComment = `no model comment will be added for each field`
|
||||
CGenDaoBriefClear = `delete all generated go files that do not exist in database`
|
||||
CGenDaoBriefGenTable = `generate table files`
|
||||
CGenDaoBriefTypeMapping = `custom local type mapping for generated struct attributes relevant to fields of table`
|
||||
CGenDaoBriefFieldMapping = `custom local type mapping for generated struct attributes relevant to specific fields of table`
|
||||
CGenDaoBriefShardingPattern = `sharding pattern for table name, e.g. "users_?" will be replace tables "users_001,users_002,..." to "users" dao`
|
||||
@@ -97,6 +99,8 @@ generated json tag case for model struct, cases are as follows:
|
||||
tplVarTableNameCamelCase = `TplTableNameCamelCase`
|
||||
tplVarTableNameCamelLowerCase = `TplTableNameCamelLowerCase`
|
||||
tplVarTableSharding = `TplTableSharding`
|
||||
tplVarTableShardingPrefix = `TplTableShardingPrefix`
|
||||
tplVarTableFields = `TplTableFields`
|
||||
tplVarPackageImports = `TplPackageImports`
|
||||
tplVarImportPrefix = `TplImportPrefix`
|
||||
tplVarStructDefine = `TplStructDefine`
|
||||
@@ -125,6 +129,7 @@ func init() {
|
||||
`CGenDaoBriefStdTime`: CGenDaoBriefStdTime,
|
||||
`CGenDaoBriefWithTime`: CGenDaoBriefWithTime,
|
||||
`CGenDaoBriefDaoPath`: CGenDaoBriefDaoPath,
|
||||
`CGenDaoBriefTablePath`: CGenDaoBriefTablePath,
|
||||
`CGenDaoBriefDoPath`: CGenDaoBriefDoPath,
|
||||
`CGenDaoBriefEntityPath`: CGenDaoBriefEntityPath,
|
||||
`CGenDaoBriefGJsonSupport`: CGenDaoBriefGJsonSupport,
|
||||
@@ -136,6 +141,7 @@ func init() {
|
||||
`CGenDaoBriefNoJsonTag`: CGenDaoBriefNoJsonTag,
|
||||
`CGenDaoBriefNoModelComment`: CGenDaoBriefNoModelComment,
|
||||
`CGenDaoBriefClear`: CGenDaoBriefClear,
|
||||
`CGenDaoBriefGenTable`: CGenDaoBriefGenTable,
|
||||
`CGenDaoBriefTypeMapping`: CGenDaoBriefTypeMapping,
|
||||
`CGenDaoBriefFieldMapping`: CGenDaoBriefFieldMapping,
|
||||
`CGenDaoBriefShardingPattern`: CGenDaoBriefShardingPattern,
|
||||
|
||||
@@ -113,12 +113,12 @@ func (p *EnumsParser) ParsePackage(pkg *packages.Package) {
|
||||
}
|
||||
|
||||
func (p *EnumsParser) Export() string {
|
||||
var typeEnumMap = make(map[string][]interface{})
|
||||
var typeEnumMap = make(map[string][]any)
|
||||
for _, enum := range p.enums {
|
||||
if typeEnumMap[enum.Type] == nil {
|
||||
typeEnumMap[enum.Type] = make([]interface{}, 0)
|
||||
typeEnumMap[enum.Type] = make([]any, 0)
|
||||
}
|
||||
var value interface{}
|
||||
var value any
|
||||
switch enum.Kind {
|
||||
case constant.Int:
|
||||
value = gconv.Int64(enum.Value)
|
||||
|
||||
@@ -109,7 +109,7 @@ func (c CGenPb) tagCommentIntoListMap(comment string, lineTagMap *gmap.ListMap)
|
||||
|
||||
func (c CGenPb) listMapToStructTag(lineTagMap *gmap.ListMap) string {
|
||||
var tag string
|
||||
lineTagMap.Iterator(func(key, value interface{}) bool {
|
||||
lineTagMap.Iterator(func(key, value any) bool {
|
||||
if tag != "" {
|
||||
tag += " "
|
||||
}
|
||||
|
||||
@@ -15,6 +15,8 @@ import (
|
||||
"strings"
|
||||
|
||||
"github.com/olekukonko/tablewriter"
|
||||
"github.com/olekukonko/tablewriter/renderer"
|
||||
"github.com/olekukonko/tablewriter/tw"
|
||||
|
||||
"github.com/gogf/gf/v2/container/garray"
|
||||
"github.com/gogf/gf/v2/container/gset"
|
||||
@@ -37,18 +39,19 @@ type (
|
||||
CGenPbEntity struct{}
|
||||
CGenPbEntityInput struct {
|
||||
g.Meta `name:"pbentity" config:"{CGenPbEntityConfig}" brief:"{CGenPbEntityBrief}" eg:"{CGenPbEntityEg}" ad:"{CGenPbEntityAd}"`
|
||||
Path string `name:"path" short:"p" brief:"{CGenPbEntityBriefPath}" d:"manifest/protobuf/pbentity"`
|
||||
Package string `name:"package" short:"k" brief:"{CGenPbEntityBriefPackage}"`
|
||||
GoPackage string `name:"goPackage" short:"g" brief:"{CGenPbEntityBriefGoPackage}"`
|
||||
Link string `name:"link" short:"l" brief:"{CGenPbEntityBriefLink}"`
|
||||
Tables string `name:"tables" short:"t" brief:"{CGenPbEntityBriefTables}"`
|
||||
Prefix string `name:"prefix" short:"f" brief:"{CGenPbEntityBriefPrefix}"`
|
||||
RemovePrefix string `name:"removePrefix" short:"r" brief:"{CGenPbEntityBriefRemovePrefix}"`
|
||||
RemoveFieldPrefix string `name:"removeFieldPrefix" short:"rf" brief:"{CGenPbEntityBriefRemoveFieldPrefix}"`
|
||||
TablesEx string `name:"tablesEx" short:"x" brief:"{CGenDaoBriefTablesEx}"`
|
||||
NameCase string `name:"nameCase" short:"n" brief:"{CGenPbEntityBriefNameCase}" d:"Camel"`
|
||||
JsonCase string `name:"jsonCase" short:"j" brief:"{CGenPbEntityBriefJsonCase}" d:"none"`
|
||||
Option string `name:"option" short:"o" brief:"{CGenPbEntityBriefOption}"`
|
||||
Path string `name:"path" short:"p" brief:"{CGenPbEntityBriefPath}" d:"manifest/protobuf/pbentity"`
|
||||
Package string `name:"package" short:"k" brief:"{CGenPbEntityBriefPackage}"`
|
||||
GoPackage string `name:"goPackage" short:"g" brief:"{CGenPbEntityBriefGoPackage}"`
|
||||
Link string `name:"link" short:"l" brief:"{CGenPbEntityBriefLink}"`
|
||||
Tables string `name:"tables" short:"t" brief:"{CGenPbEntityBriefTables}"`
|
||||
Prefix string `name:"prefix" short:"f" brief:"{CGenPbEntityBriefPrefix}"`
|
||||
RemovePrefix string `name:"removePrefix" short:"r" brief:"{CGenPbEntityBriefRemovePrefix}"`
|
||||
RemoveFieldPrefix string `name:"removeFieldPrefix" short:"rf" brief:"{CGenPbEntityBriefRemoveFieldPrefix}"`
|
||||
TablesEx string `name:"tablesEx" short:"x" brief:"{CGenDaoBriefTablesEx}"`
|
||||
NameCase string `name:"nameCase" short:"n" brief:"{CGenPbEntityBriefNameCase}" d:"Camel"`
|
||||
JsonCase string `name:"jsonCase" short:"j" brief:"{CGenPbEntityBriefJsonCase}" d:"none"`
|
||||
Option string `name:"option" short:"o" brief:"{CGenPbEntityBriefOption}"`
|
||||
ShardingPattern []string `name:"shardingPattern" short:"sp" brief:"{CGenDaoBriefShardingPattern}"`
|
||||
|
||||
TypeMapping map[DBFieldTypeName]CustomAttributeType `name:"typeMapping" short:"y" brief:"{CGenPbEntityBriefTypeMapping}" orphan:"true"`
|
||||
FieldMapping map[DBTableFieldName]CustomAttributeType `name:"fieldMapping" short:"fm" brief:"{CGenPbEntityBriefFieldMapping}" orphan:"true"`
|
||||
@@ -122,6 +125,7 @@ CONFIGURATION SUPPORT
|
||||
CGenPbEntityBriefTablesEx = `generate all models exclude the specified tables, multiple prefix separated with ','`
|
||||
CGenPbEntityBriefRemoveFieldPrefix = `remove specified prefix of the field, multiple prefix separated with ','`
|
||||
CGenPbEntityBriefOption = `extra protobuf options`
|
||||
CGenPbEntityBriefShardingPattern = `sharding pattern for table name, e.g. "users_?" will replace tables "users_001,users_002,..." to "users" pbentity`
|
||||
CGenPbEntityBriefGroup = `
|
||||
specifying the configuration group name of database for generated ORM instance,
|
||||
it's not necessary and the default value is "default"
|
||||
@@ -252,6 +256,7 @@ func init() {
|
||||
`CGenPbEntityBriefNameCase`: CGenPbEntityBriefNameCase,
|
||||
`CGenPbEntityBriefJsonCase`: CGenPbEntityBriefJsonCase,
|
||||
`CGenPbEntityBriefOption`: CGenPbEntityBriefOption,
|
||||
`CGenPbEntityBriefShardingPattern`: CGenPbEntityBriefShardingPattern,
|
||||
`CGenPbEntityBriefTypeMapping`: CGenPbEntityBriefTypeMapping,
|
||||
`CGenPbEntityBriefFieldMapping`: CGenPbEntityBriefFieldMapping,
|
||||
})
|
||||
@@ -321,6 +326,7 @@ func doGenPbEntityForArray(ctx context.Context, index int, in CGenPbEntityInput)
|
||||
}
|
||||
|
||||
tableNames := ([]string)(nil)
|
||||
shardingNewTableSet := gset.NewStrSet()
|
||||
if in.Tables != "" {
|
||||
tableNames = gstr.SplitAndTrim(in.Tables, ",")
|
||||
} else {
|
||||
@@ -348,6 +354,31 @@ func doGenPbEntityForArray(ctx context.Context, index int, in CGenPbEntityInput)
|
||||
for _, v := range removePrefixArray {
|
||||
newTableName = gstr.TrimLeftStr(newTableName, v, 1)
|
||||
}
|
||||
var shardingTableName string
|
||||
if len(in.ShardingPattern) > 0 {
|
||||
for _, pattern := range in.ShardingPattern {
|
||||
var (
|
||||
match []string
|
||||
regPattern = gstr.Replace(pattern, "?", `(.+)`)
|
||||
)
|
||||
match, err = gregex.MatchString(regPattern, newTableName)
|
||||
if err != nil {
|
||||
mlog.Fatalf(`invalid sharding pattern "%s": %+v`, pattern, err)
|
||||
}
|
||||
if len(match) < 2 {
|
||||
continue
|
||||
}
|
||||
shardingTableName = gstr.Replace(pattern, "?", "")
|
||||
shardingTableName = gstr.Trim(shardingTableName, `_.-`)
|
||||
}
|
||||
}
|
||||
if shardingTableName != "" {
|
||||
if shardingNewTableSet.Contains(shardingTableName) {
|
||||
continue
|
||||
}
|
||||
shardingNewTableSet.Add(shardingTableName)
|
||||
newTableName = shardingTableName
|
||||
}
|
||||
generatePbEntityContentFile(ctx, CGenPbEntityInternalInput{
|
||||
CGenPbEntityInput: in,
|
||||
DB: db,
|
||||
@@ -414,13 +445,22 @@ func generateEntityMessageDefinition(entityName string, fieldMap map[string]*gdb
|
||||
appendImports = append(appendImports, imports)
|
||||
}
|
||||
}
|
||||
tw := tablewriter.NewWriter(buffer)
|
||||
tw.SetBorder(false)
|
||||
tw.SetRowLine(false)
|
||||
tw.SetAutoWrapText(false)
|
||||
tw.SetColumnSeparator("")
|
||||
tw.AppendBulk(array)
|
||||
tw.Render()
|
||||
table := tablewriter.NewTable(buffer,
|
||||
tablewriter.WithRenderer(renderer.NewBlueprint(tw.Rendition{
|
||||
Borders: tw.Border{Top: tw.Off, Bottom: tw.Off, Left: tw.On, Right: tw.Off},
|
||||
Settings: tw.Settings{
|
||||
Separators: tw.Separators{BetweenRows: tw.Off, BetweenColumns: tw.Off},
|
||||
},
|
||||
Symbols: tw.NewSymbolCustom("Proto").WithColumn(" "),
|
||||
})),
|
||||
tablewriter.WithConfig(tablewriter.Config{
|
||||
Row: tw.CellConfig{
|
||||
Formatting: tw.CellFormatting{AutoWrap: tw.WrapNone},
|
||||
},
|
||||
}),
|
||||
)
|
||||
table.Bulk(array)
|
||||
table.Render()
|
||||
stContent := buffer.String()
|
||||
// Let's do this hack of table writer for indent!
|
||||
stContent = regexp.MustCompile(`\s+\n`).ReplaceAllString(gstr.Replace(stContent, " #", ""), "\n")
|
||||
@@ -441,14 +481,23 @@ func generateMessageFieldForPbEntity(index int, field *gdb.TableField, in CGenPb
|
||||
err error
|
||||
ctx = gctx.GetInitCtx()
|
||||
)
|
||||
|
||||
if in.TypeMapping != nil && len(in.TypeMapping) > 0 {
|
||||
// match typeMapping after local type transform.
|
||||
// eg: double => string, varchar => string etc.
|
||||
localTypeName, err = in.DB.CheckLocalTypeForField(ctx, field.Type, nil)
|
||||
if err != nil {
|
||||
panic(err)
|
||||
}
|
||||
if localTypeName != "" {
|
||||
if typeMapping, ok := in.TypeMapping[strings.ToLower(string(localTypeName))]; ok {
|
||||
if typeMappingLocal, localOk := in.TypeMapping[strings.ToLower(string(localTypeName))]; localOk {
|
||||
localTypeNameStr = typeMappingLocal.Type
|
||||
appendImport = typeMappingLocal.Import
|
||||
}
|
||||
}
|
||||
// Try match unknown / string localTypeName with db type.
|
||||
if localTypeName == "" || localTypeName == gdb.LocalTypeString {
|
||||
formattedFieldType, _ := in.DB.GetFormattedDBTypeNameForField(field.Type)
|
||||
if typeMapping, ok := in.TypeMapping[strings.ToLower(formattedFieldType)]; ok {
|
||||
localTypeNameStr = typeMapping.Type
|
||||
appendImport = typeMapping.Import
|
||||
}
|
||||
|
||||
@@ -23,6 +23,7 @@ import (
|
||||
"github.com/gogf/gf/v2/text/gstr"
|
||||
"github.com/gogf/gf/v2/util/gconv"
|
||||
"github.com/gogf/gf/v2/util/gtag"
|
||||
|
||||
"hotgo/internal/library/hggen/internal/utility/mlog"
|
||||
"hotgo/internal/library/hggen/internal/utility/utils"
|
||||
)
|
||||
|
||||
@@ -33,7 +33,7 @@ func (c CGenService) generateType(generatedContent *bytes.Buffer, srcStructFunct
|
||||
generatedContent.WriteString("type(")
|
||||
generatedContent.WriteString("\n")
|
||||
|
||||
srcStructFunctions.Iterator(func(key, value interface{}) bool {
|
||||
srcStructFunctions.Iterator(func(key, value any) bool {
|
||||
var (
|
||||
funcContents = make([]string, 0)
|
||||
funcContent string
|
||||
@@ -71,7 +71,7 @@ func (c CGenService) generateVar(generatedContent *bytes.Buffer, srcStructFuncti
|
||||
// Generating variable and register definitions.
|
||||
var variableContent string
|
||||
|
||||
srcStructFunctions.Iterator(func(key, value interface{}) bool {
|
||||
srcStructFunctions.Iterator(func(key, value any) bool {
|
||||
structName := key.(string)
|
||||
variableContent += gstr.Trim(gstr.ReplaceByMap(consts.TemplateGenServiceContentVariable, g.MapStrStr{
|
||||
"{StructName}": structName,
|
||||
@@ -93,7 +93,7 @@ func (c CGenService) generateVar(generatedContent *bytes.Buffer, srcStructFuncti
|
||||
// See: const.TemplateGenServiceContentRegister
|
||||
func (c CGenService) generateFunc(generatedContent *bytes.Buffer, srcStructFunctions *gmap.ListMap) {
|
||||
// Variable register function definitions.
|
||||
srcStructFunctions.Iterator(func(key, value interface{}) bool {
|
||||
srcStructFunctions.Iterator(func(key, value any) bool {
|
||||
structName := key.(string)
|
||||
generatedContent.WriteString(gstr.Trim(gstr.ReplaceByMap(consts.TemplateGenServiceContentRegister, g.MapStrStr{
|
||||
"{StructName}": structName,
|
||||
|
||||
@@ -27,7 +27,7 @@ var (
|
||||
// {{.TplTableNameCamelCase}} is a globally accessible object for table {{.TplTableName}} operations.
|
||||
{{.TplTableNameCamelCase}} = {{.TplTableNameCamelLowerCase}}Dao{
|
||||
{{- if .TplTableSharding -}}
|
||||
internal.New{{.TplTableNameCamelCase}}Dao(userShardingHandler),
|
||||
internal.New{{.TplTableNameCamelCase}}Dao({{.TplTableNameCamelLowerCase}}ShardingHandler),
|
||||
{{- else -}}
|
||||
internal.New{{.TplTableNameCamelCase}}Dao(),
|
||||
{{- end -}}
|
||||
@@ -35,13 +35,13 @@ var (
|
||||
)
|
||||
|
||||
{{if .TplTableSharding -}}
|
||||
// userShardingHandler is the handler for sharding operations.
|
||||
// {{.TplTableNameCamelLowerCase}}ShardingHandler is the handler for sharding operations.
|
||||
// You can fill this sharding handler with your custom implementation.
|
||||
func userShardingHandler(m *gdb.Model) *gdb.Model {
|
||||
func {{.TplTableNameCamelLowerCase}}ShardingHandler(m *gdb.Model) *gdb.Model {
|
||||
m = m.Sharding(gdb.ShardingConfig{
|
||||
Table: gdb.ShardingTableConfig{
|
||||
Enable: true,
|
||||
Prefix: "",
|
||||
Prefix: "{{.TplTableShardingPrefix}}",
|
||||
// Replace Rule field with your custom sharding rule.
|
||||
// Or you can use "&gdb.DefaultShardingRule{}" for default sharding rule.
|
||||
Rule: nil,
|
||||
|
||||
@@ -0,0 +1,35 @@
|
||||
// Copyright GoFrame gf Author(https://goframe.org). All Rights Reserved.
|
||||
//
|
||||
// This Source Code Form is subject to the terms of the MIT License.
|
||||
// If a copy of the MIT was not distributed with this file,
|
||||
// You can obtain one at https://github.com/gogf/gf.
|
||||
|
||||
package consts
|
||||
|
||||
const TemplateGenTableContent = `
|
||||
// =================================================================================
|
||||
// This file is auto-generated by the GoFrame CLI tool. You may modify it as needed.
|
||||
// =================================================================================
|
||||
|
||||
package {{.TplPackageName}}
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
||||
"github.com/gogf/gf/v2/database/gdb"
|
||||
)
|
||||
|
||||
// {{.TplTableNameCamelCase}} defines the fields of table "{{.TplTableName}}" with their properties.
|
||||
// This map is used internally by GoFrame ORM to understand table structure.
|
||||
var {{.TplTableNameCamelCase}} = map[string]*gdb.TableField{
|
||||
{{.TplTableFields}}
|
||||
}
|
||||
|
||||
// Set{{.TplTableNameCamelCase}}TableFields registers the table fields definition to the database instance.
|
||||
// db: database instance that implements gdb.DB interface.
|
||||
// schema: optional schema/namespace name, especially for databases that support schemas.
|
||||
func Set{{.TplTableNameCamelCase}}TableFields(ctx context.Context, db gdb.DB, schema ...string) error {
|
||||
return db.GetCore().SetTableFields(ctx, "{{.TplTableName}}", {{.TplTableNameCamelCase}}, schema...)
|
||||
}
|
||||
|
||||
`
|
||||
@@ -1,7 +0,0 @@
|
||||
// Copyright GoFrame gf Author(https://goframe.org). All Rights Reserved.
|
||||
//
|
||||
// This Source Code Form is subject to the terms of the MIT License.
|
||||
// If a copy of the MIT was not distributed with this file,
|
||||
// You can obtain one at https://github.com/gogf/gf.
|
||||
|
||||
package packed
|
||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -51,26 +51,26 @@ func SetHeaderPrint(enabled bool) {
|
||||
}
|
||||
}
|
||||
|
||||
func Print(v ...interface{}) {
|
||||
func Print(v ...any) {
|
||||
logger.Print(ctx, v...)
|
||||
}
|
||||
|
||||
func Printf(format string, v ...interface{}) {
|
||||
func Printf(format string, v ...any) {
|
||||
logger.Printf(ctx, format, v...)
|
||||
}
|
||||
|
||||
func Fatal(v ...interface{}) {
|
||||
func Fatal(v ...any) {
|
||||
logger.Fatal(ctx, v...)
|
||||
}
|
||||
|
||||
func Fatalf(format string, v ...interface{}) {
|
||||
func Fatalf(format string, v ...any) {
|
||||
logger.Fatalf(ctx, format, v...)
|
||||
}
|
||||
|
||||
func Debug(v ...interface{}) {
|
||||
func Debug(v ...any) {
|
||||
logger.Debug(ctx, v...)
|
||||
}
|
||||
|
||||
func Debugf(format string, v ...interface{}) {
|
||||
func Debugf(format string, v ...any) {
|
||||
logger.Debugf(ctx, format, v...)
|
||||
}
|
||||
|
||||
@@ -16,6 +16,7 @@ import (
|
||||
"github.com/gogf/gf/v2/os/gproc"
|
||||
"github.com/gogf/gf/v2/text/gregex"
|
||||
"github.com/gogf/gf/v2/text/gstr"
|
||||
|
||||
"hotgo/internal/library/hggen/internal/consts"
|
||||
"hotgo/internal/library/hggen/internal/utility/mlog"
|
||||
)
|
||||
|
||||
@@ -1,23 +0,0 @@
|
||||
// Copyright GoFrame gf Author(https://goframe.org). All Rights Reserved.
|
||||
//
|
||||
// This Source Code Form is subject to the terms of the MIT License.
|
||||
// If a copy of the MIT was not distributed with this file,
|
||||
// You can obtain one at https://github.com/gogf/gf.
|
||||
|
||||
package utils_test
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"testing"
|
||||
|
||||
"github.com/gogf/gf/v2/test/gtest"
|
||||
|
||||
"hotgo/internal/library/hggen/internal/utility/utils"
|
||||
)
|
||||
|
||||
func Test_GetModPath(t *testing.T) {
|
||||
gtest.C(t, func(t *gtest.T) {
|
||||
goModPath := utils.GetModPath()
|
||||
fmt.Println(goModPath)
|
||||
})
|
||||
}
|
||||
@@ -9,6 +9,8 @@ import (
|
||||
"bytes"
|
||||
"context"
|
||||
"fmt"
|
||||
"github.com/olekukonko/tablewriter/renderer"
|
||||
"github.com/olekukonko/tablewriter/tw"
|
||||
"strings"
|
||||
|
||||
"hotgo/internal/dao"
|
||||
@@ -33,6 +35,22 @@ const (
|
||||
EditInpValidatorYaml = "if err := validate.ValidateYAML(in.%s); err != nil {\n\t\treturn gerror.Newf(\"%s必须为有效的YAML格式: %%s\", err.Error())\n\t}\n"
|
||||
)
|
||||
|
||||
var (
|
||||
// tablewriter Options
|
||||
twRenderer = tablewriter.WithRenderer(renderer.NewBlueprint(tw.Rendition{
|
||||
Borders: tw.Border{Top: tw.Off, Bottom: tw.Off, Left: tw.Off, Right: tw.Off},
|
||||
Settings: tw.Settings{
|
||||
Separators: tw.Separators{BetweenRows: tw.Off, BetweenColumns: tw.Off},
|
||||
},
|
||||
Symbols: tw.NewSymbols(tw.StyleASCII),
|
||||
}))
|
||||
twConfig = tablewriter.WithConfig(tablewriter.Config{
|
||||
Row: tw.CellConfig{
|
||||
Formatting: tw.CellFormatting{AutoWrap: tw.WrapNone},
|
||||
},
|
||||
})
|
||||
)
|
||||
|
||||
func (l *gCurd) inputTplData(ctx context.Context, in *CurdPreviewInput) (data g.Map, err error) {
|
||||
data = make(g.Map)
|
||||
data["listInpColumns"] = l.generateInputListColumns(ctx, in, InputTypeListInp)
|
||||
@@ -68,13 +86,9 @@ func (l *gCurd) generateInputViewColumns(ctx context.Context, in *CurdPreviewInp
|
||||
}
|
||||
}
|
||||
|
||||
tw := tablewriter.NewWriter(buffer)
|
||||
tw.SetBorder(false)
|
||||
tw.SetRowLine(false)
|
||||
tw.SetAutoWrapText(false)
|
||||
tw.SetColumnSeparator("")
|
||||
tw.AppendBulk(array)
|
||||
tw.Render()
|
||||
table := tablewriter.NewTable(buffer, twRenderer, twConfig)
|
||||
table.Bulk(array)
|
||||
table.Render()
|
||||
stContent := buffer.String()
|
||||
// Let's do this hack of table writer for indent!
|
||||
stContent = gstr.Replace(stContent, " #", "")
|
||||
@@ -132,13 +146,9 @@ func (l *gCurd) generateInputListColumns(ctx context.Context, in *CurdPreviewInp
|
||||
}
|
||||
}
|
||||
|
||||
tw := tablewriter.NewWriter(buffer)
|
||||
tw.SetBorder(false)
|
||||
tw.SetRowLine(false)
|
||||
tw.SetAutoWrapText(false)
|
||||
tw.SetColumnSeparator("")
|
||||
tw.AppendBulk(array)
|
||||
tw.Render()
|
||||
table := tablewriter.NewTable(buffer, twRenderer, twConfig)
|
||||
table.Bulk(array)
|
||||
table.Render()
|
||||
stContent := buffer.String()
|
||||
// Let's do this hack of table writer for indent!
|
||||
stContent = gstr.Replace(stContent, " #", "")
|
||||
|
||||
@@ -182,12 +182,12 @@ func IsUnique(ctx context.Context, dao daoInstance, where g.Map, message string,
|
||||
m = m.WhereNot(field, pkId[0])
|
||||
}
|
||||
|
||||
count, err := m.Count(1)
|
||||
exist, err := m.Exist()
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
if count > 0 {
|
||||
if exist {
|
||||
if message == "" {
|
||||
for k := range where {
|
||||
message = fmt.Sprintf("in the table:%s, %v not uniqued", dao.Table(), where[k])
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
// Package wechat
|
||||
// @Link https://github.com/bufanyun/hotgo
|
||||
// @Copyright Copyright (c) 2023 HotGo CLI
|
||||
// @Copyright Copyright (c) 2025 HotGo CLI
|
||||
// @Author Ms <133814250@qq.com>
|
||||
// @License https://github.com/bufanyun/hotgo/blob/master/LICENSE
|
||||
package wechat
|
||||
|
||||
@@ -1,18 +1,64 @@
|
||||
// Package wechat
|
||||
// @Link https://github.com/bufanyun/hotgo
|
||||
// @Copyright Copyright (c) 2023 HotGo CLI
|
||||
// @Copyright Copyright (c) 2025 HotGo CLI
|
||||
// @Author Ms <133814250@qq.com>
|
||||
// @License https://github.com/bufanyun/hotgo/blob/master/LICENSE
|
||||
package wechat
|
||||
|
||||
import "hotgo/internal/model"
|
||||
import (
|
||||
"context"
|
||||
"github.com/gogf/gf/v2/os/gctx"
|
||||
"github.com/silenceper/wechat/v2"
|
||||
"github.com/silenceper/wechat/v2/officialaccount"
|
||||
offConfig "github.com/silenceper/wechat/v2/officialaccount/config"
|
||||
officialJs "github.com/silenceper/wechat/v2/officialaccount/js"
|
||||
"hotgo/internal/model"
|
||||
)
|
||||
|
||||
var config *model.WechatConfig
|
||||
var (
|
||||
config *model.WechatConfig
|
||||
officialAccount *officialaccount.OfficialAccount // 微信公众号
|
||||
)
|
||||
|
||||
func SetConfig(c *model.WechatConfig) {
|
||||
config = c
|
||||
ctx := gctx.GetInitCtx()
|
||||
GetOfficialAccount(ctx, true)
|
||||
}
|
||||
|
||||
func GetConfig() *model.WechatConfig {
|
||||
return config
|
||||
}
|
||||
|
||||
// NewOfficialAccount 微信公众号实例
|
||||
func NewOfficialAccount(ctx context.Context) *officialaccount.OfficialAccount {
|
||||
cfg := &offConfig.Config{
|
||||
AppID: config.OfficialAppID,
|
||||
AppSecret: config.OfficialAppSecret,
|
||||
Token: config.OfficialToken,
|
||||
EncodingAESKey: config.OfficialEncodingAESKey,
|
||||
Cache: NewCache(ctx),
|
||||
UseStableAK: true,
|
||||
}
|
||||
wc := wechat.NewWechat()
|
||||
return wc.GetOfficialAccount(cfg)
|
||||
}
|
||||
|
||||
// GetOfficialAccount 微信公众号实例
|
||||
func GetOfficialAccount(ctx context.Context, refresh ...bool) *officialaccount.OfficialAccount {
|
||||
isRefresh := false
|
||||
if len(refresh) > 0 {
|
||||
isRefresh = refresh[0]
|
||||
}
|
||||
if officialAccount != nil && !isRefresh {
|
||||
return officialAccount
|
||||
}
|
||||
|
||||
officialAccount = NewOfficialAccount(ctx)
|
||||
return officialAccount
|
||||
}
|
||||
|
||||
// GetJsConfig 获取js配置
|
||||
func GetJsConfig(ctx context.Context, uri string) (config *officialJs.Config, err error) {
|
||||
return GetOfficialAccount(ctx).GetJs().GetConfig(uri)
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
// Package wechat
|
||||
// @Link https://github.com/bufanyun/hotgo
|
||||
// @Copyright Copyright (c) 2023 HotGo CLI
|
||||
// @Copyright Copyright (c) 2025 HotGo CLI
|
||||
// @Author Ms <133814250@qq.com>
|
||||
// @License https://github.com/bufanyun/hotgo/blob/master/LICENSE
|
||||
package wechat
|
||||
@@ -8,91 +8,26 @@ package wechat
|
||||
import (
|
||||
"context"
|
||||
"github.com/gogf/gf/v2/errors/gerror"
|
||||
"github.com/silenceper/wechat/v2"
|
||||
"github.com/silenceper/wechat/v2/officialaccount"
|
||||
offConfig "github.com/silenceper/wechat/v2/officialaccount/config"
|
||||
officialJs "github.com/silenceper/wechat/v2/officialaccount/js"
|
||||
officialOauth "github.com/silenceper/wechat/v2/officialaccount/oauth"
|
||||
"github.com/silenceper/wechat/v2/openplatform"
|
||||
openConfig "github.com/silenceper/wechat/v2/openplatform/config"
|
||||
"hotgo/internal/consts"
|
||||
)
|
||||
|
||||
// NewOfficialAccount 微信公众号实例
|
||||
func NewOfficialAccount(ctx context.Context) *officialaccount.OfficialAccount {
|
||||
cfg := &offConfig.Config{
|
||||
AppID: config.OfficialAppID,
|
||||
AppSecret: config.OfficialAppSecret,
|
||||
Token: config.OfficialToken,
|
||||
EncodingAESKey: config.OfficialEncodingAESKey,
|
||||
Cache: NewCache(ctx),
|
||||
}
|
||||
return wechat.NewWechat().GetOfficialAccount(cfg)
|
||||
}
|
||||
|
||||
// NewOpenPlatform 开放平台实例
|
||||
func NewOpenPlatform(ctx context.Context) *openplatform.OpenPlatform {
|
||||
cfg := &openConfig.Config{
|
||||
AppID: config.OpenAppID,
|
||||
AppSecret: config.OpenAppSecret,
|
||||
Token: config.OpenToken,
|
||||
EncodingAESKey: config.OpenEncodingAESKey,
|
||||
Cache: NewCache(ctx),
|
||||
}
|
||||
return wechat.NewWechat().GetOpenPlatform(cfg)
|
||||
}
|
||||
|
||||
// GetOpenOauthURL 代第三方公众号 - 获取网页授权地址
|
||||
func GetOpenOauthURL(ctx context.Context, redirectURI, scope, state string) (location string, err error) {
|
||||
op := NewOpenPlatform(ctx)
|
||||
appid := config.OfficialAppID // 公众号appid
|
||||
oauth := op.GetOfficialAccount(appid).PlatformOauth()
|
||||
if scope == "" {
|
||||
scope = consts.WechatScopeBase
|
||||
}
|
||||
location, err = oauth.GetRedirectURL(redirectURI, scope, state, appid)
|
||||
return
|
||||
}
|
||||
|
||||
// GetOpenUserAccessToken 代第三方公众号 - 通过网页授权的code 换取access_token
|
||||
func GetOpenUserAccessToken(ctx context.Context, code string) (accessToken officialOauth.ResAccessToken, err error) {
|
||||
op := NewOpenPlatform(ctx)
|
||||
appid := config.OfficialAppID // 公众号appid
|
||||
officialAccount := op.GetOfficialAccount(appid)
|
||||
componentAccessToken, err := op.GetComponentAccessToken()
|
||||
if err != nil {
|
||||
return
|
||||
}
|
||||
|
||||
accessToken, err = officialAccount.PlatformOauth().GetUserAccessToken(code, appid, componentAccessToken)
|
||||
if err != nil {
|
||||
return
|
||||
}
|
||||
|
||||
if accessToken.ErrCode > 0 {
|
||||
err = gerror.Newf("GetOpenUserAccessToken err:%+v", accessToken.ErrMsg)
|
||||
return
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// GetUserInfo 获取用户信息
|
||||
func GetUserInfo(ctx context.Context, token officialOauth.ResAccessToken) (info officialOauth.UserInfo, err error) {
|
||||
oauth := NewOfficialAccount(ctx).GetOauth()
|
||||
oauth := GetOfficialAccount(ctx).GetOauth()
|
||||
info, err = oauth.GetUserInfo(token.AccessToken, token.OpenID, "")
|
||||
return
|
||||
}
|
||||
|
||||
// GetOauthURL 获取网页授权地址
|
||||
func GetOauthURL(ctx context.Context, redirectURI, scope, state string) (location string, err error) {
|
||||
oauth := NewOfficialAccount(ctx).GetOauth()
|
||||
oauth := GetOfficialAccount(ctx).GetOauth()
|
||||
location, err = oauth.GetRedirectURL(redirectURI, scope, state)
|
||||
return
|
||||
}
|
||||
|
||||
// GetUserAccessToken 通过网页授权的code 换取access_token
|
||||
func GetUserAccessToken(ctx context.Context, code string) (accessToken officialOauth.ResAccessToken, err error) {
|
||||
oauth := NewOfficialAccount(ctx).GetOauth()
|
||||
oauth := GetOfficialAccount(ctx).GetOauth()
|
||||
accessToken, err = oauth.GetUserAccessToken(code)
|
||||
if err != nil {
|
||||
return
|
||||
@@ -104,8 +39,3 @@ func GetUserAccessToken(ctx context.Context, code string) (accessToken officialO
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// GetJsConfig 获取js配置
|
||||
func GetJsConfig(ctx context.Context, uri string) (config *officialJs.Config, err error) {
|
||||
return NewOfficialAccount(ctx).GetJs().GetConfig(uri)
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
// Package admin
|
||||
// @Link https://github.com/bufanyun/hotgo
|
||||
// @Copyright Copyright (c) 2023 HotGo CLI
|
||||
// @Copyright Copyright (c) 2025 HotGo CLI
|
||||
// @Author Ms <133814250@qq.com>
|
||||
// @License https://github.com/bufanyun/hotgo/blob/master/LICENSE
|
||||
package admin
|
||||
@@ -231,16 +231,26 @@ func (s *sAdminRole) Delete(ctx context.Context, in *adminin.RoleDeleteInp) (err
|
||||
return gerror.New("超管角色禁止删除!")
|
||||
}
|
||||
|
||||
has, err := dao.AdminRole.Ctx(ctx).Where("pid", models.Id).One()
|
||||
exist, err := dao.AdminRole.Ctx(ctx).Where("pid", models.Id).Exist()
|
||||
if err != nil {
|
||||
err = gerror.Wrap(err, consts.ErrorORM)
|
||||
return
|
||||
}
|
||||
|
||||
if !has.IsEmpty() {
|
||||
if exist {
|
||||
return gerror.New("请先删除该角色下得所有子级!")
|
||||
}
|
||||
|
||||
exist, err = dao.AdminMember.Ctx(ctx).Where("role_id", models.Id).Exist()
|
||||
if err != nil {
|
||||
err = gerror.Wrap(err, consts.ErrorORM)
|
||||
return
|
||||
}
|
||||
|
||||
if exist {
|
||||
return gerror.New("请先删除该角色下得所有用户账号!")
|
||||
}
|
||||
|
||||
if _, err = dao.AdminRole.Ctx(ctx).Where("id", in.Id).Delete(); err != nil {
|
||||
err = gerror.Wrap(err, consts.ErrorORM)
|
||||
}
|
||||
|
||||
@@ -1,17 +1,24 @@
|
||||
// Package common
|
||||
// @Link https://github.com/bufanyun/hotgo
|
||||
// @Copyright Copyright (c) 2023 HotGo CLI
|
||||
// @Copyright Copyright (c) 2025 HotGo CLI
|
||||
// @Author Ms <133814250@qq.com>
|
||||
// @License https://github.com/bufanyun/hotgo/blob/master/LICENSE
|
||||
package common
|
||||
|
||||
import (
|
||||
"context"
|
||||
"github.com/gogf/gf/v2/net/ghttp"
|
||||
"hotgo/internal/library/storager"
|
||||
"hotgo/internal/model/input/sysin"
|
||||
"hotgo/internal/service"
|
||||
"hotgo/utility/file"
|
||||
"hotgo/utility/format"
|
||||
"time"
|
||||
|
||||
"github.com/gogf/gf/v2/errors/gerror"
|
||||
"github.com/gogf/gf/v2/frame/g"
|
||||
"github.com/gogf/gf/v2/net/ghttp"
|
||||
"github.com/gogf/gf/v2/text/gstr"
|
||||
"github.com/gogf/gf/v2/util/grand"
|
||||
)
|
||||
|
||||
type sCommonUpload struct{}
|
||||
@@ -60,3 +67,38 @@ func (s *sCommonUpload) UploadPart(ctx context.Context, in *sysin.UploadPartInp)
|
||||
res.UploadPartModel = data
|
||||
return
|
||||
}
|
||||
|
||||
// ImageTransferStorage 图片链接转存
|
||||
func (s *sCommonUpload) ImageTransferStorage(ctx context.Context, in *sysin.ImageTransferStorageInp) (res *sysin.ImageTransferStorageModel, err error) {
|
||||
if !gstr.HasPrefix(in.Url, "http://") && !gstr.HasPrefix(in.Url, "https://") {
|
||||
return nil, gerror.New("仅支持 HTTP/HTTPS 协议的图片链接")
|
||||
}
|
||||
|
||||
resp, err := g.Client().SetTimeout(time.Second*30).Get(ctx, in.Url)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
defer resp.Close()
|
||||
|
||||
if resp.StatusCode != 200 {
|
||||
return nil, gerror.Newf("请求图片资源失败, StatusCode:%v", resp.StatusCode)
|
||||
}
|
||||
|
||||
contentType := gstr.ToLower(resp.Header.Get("Content-Type"))
|
||||
if !gstr.HasPrefix(contentType, "image/") {
|
||||
return nil, gerror.New("资源不是图片类型")
|
||||
}
|
||||
|
||||
content := resp.ReadAll()
|
||||
if len(content) == 0 {
|
||||
return nil, gerror.New("图片内容为空")
|
||||
}
|
||||
|
||||
res = new(sysin.ImageTransferStorageModel)
|
||||
fileHeader, err := file.NewMultipartFileHeader("its-"+grand.Letters(8)+".png", content)
|
||||
if err != nil {
|
||||
return nil, gerror.Newf("创建文件头失败:%v", err)
|
||||
}
|
||||
res.AttachmentListModel, err = s.UploadFile(ctx, storager.KindImg, &ghttp.UploadFile{FileHeader: fileHeader})
|
||||
return
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
// Package middleware
|
||||
// @Link https://github.com/bufanyun/hotgo
|
||||
// @Copyright Copyright (c) 2023 HotGo CLI
|
||||
// @Copyright Copyright (c) 2025 HotGo CLI
|
||||
// @Author Ms <133814250@qq.com>
|
||||
// @License https://github.com/bufanyun/hotgo/blob/master/LICENSE
|
||||
package middleware
|
||||
@@ -11,6 +11,7 @@ import (
|
||||
"github.com/gogf/gf/v2/encoding/gjson"
|
||||
"github.com/gogf/gf/v2/errors/gcode"
|
||||
"github.com/gogf/gf/v2/frame/g"
|
||||
"github.com/gogf/gf/v2/i18n/gi18n"
|
||||
"github.com/gogf/gf/v2/net/ghttp"
|
||||
"github.com/gogf/gf/v2/net/gtrace"
|
||||
"github.com/gogf/gf/v2/os/gctx"
|
||||
@@ -56,6 +57,10 @@ func NewMiddleware() *sMiddleware {
|
||||
|
||||
// Ctx 初始化请求上下文
|
||||
func (s *sMiddleware) Ctx(r *ghttp.Request) {
|
||||
// 国际化
|
||||
r.SetCtx(gi18n.WithLanguage(r.Context(), simple.GetHeaderLocale(r.Context())))
|
||||
|
||||
// 链路追踪
|
||||
if g.Cfg().MustGet(r.Context(), "jaeger.switch").Bool() {
|
||||
ctx, span := gtrace.NewSpan(r.Context(), "middleware.ctx")
|
||||
span.SetAttributes(attribute.KeyValue{
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
// Package sys
|
||||
// @Link https://github.com/bufanyun/hotgo
|
||||
// @Copyright Copyright (c) 2024 HotGo CLI
|
||||
// @Copyright Copyright (c) 2025 HotGo CLI
|
||||
// @Author Ms <133814250@qq.com>
|
||||
// @License https://github.com/bufanyun/hotgo/blob/master/LICENSE
|
||||
// @AutoGenerate Version 2.15.7
|
||||
// @AutoGenerate Version 2.17.8
|
||||
package sys
|
||||
|
||||
import (
|
||||
@@ -174,4 +174,4 @@ func (s *sSysOptionTreeDemo) TreeOption(ctx context.Context) (nodes []tree.Node,
|
||||
nodes[i] = v
|
||||
}
|
||||
return tree.ListToTree(0, nodes)
|
||||
}
|
||||
}
|
||||
@@ -13,40 +13,40 @@ import (
|
||||
// AddonHgexampleTable is the golang structure of table hg_addon_hgexample_table for DAO operations like Where/Data.
|
||||
type AddonHgexampleTable struct {
|
||||
g.Meta `orm:"table:hg_addon_hgexample_table, do:true"`
|
||||
Id interface{} // ID
|
||||
Pid interface{} // 上级ID
|
||||
Level interface{} // 树等级
|
||||
Tree interface{} // 关系树
|
||||
CategoryId interface{} // 分类ID
|
||||
Id any // ID
|
||||
Pid any // 上级ID
|
||||
Level any // 树等级
|
||||
Tree any // 关系树
|
||||
CategoryId any // 分类ID
|
||||
Flag *gjson.Json // 标签
|
||||
Title interface{} // 标题
|
||||
Description interface{} // 描述
|
||||
Content interface{} // 内容
|
||||
Image interface{} // 单图
|
||||
Title any // 标题
|
||||
Description any // 描述
|
||||
Content any // 内容
|
||||
Image any // 单图
|
||||
Images *gjson.Json // 多图
|
||||
Attachfile interface{} // 附件
|
||||
Attachfile any // 附件
|
||||
Attachfiles *gjson.Json // 多附件
|
||||
Map *gjson.Json // 动态键值对
|
||||
Star interface{} // 推荐星
|
||||
Price interface{} // 价格
|
||||
Views interface{} // 浏览次数
|
||||
Star any // 推荐星
|
||||
Price any // 价格
|
||||
Views any // 浏览次数
|
||||
ActivityAt *gtime.Time // 活动时间
|
||||
StartAt *gtime.Time // 开启时间
|
||||
EndAt *gtime.Time // 结束时间
|
||||
Switch interface{} // 开关
|
||||
Sort interface{} // 排序
|
||||
Avatar interface{} // 头像
|
||||
Sex interface{} // 性别
|
||||
Qq interface{} // qq
|
||||
Email interface{} // 邮箱
|
||||
Mobile interface{} // 手机号码
|
||||
Switch any // 开关
|
||||
Sort any // 排序
|
||||
Avatar any // 头像
|
||||
Sex any // 性别
|
||||
Qq any // qq
|
||||
Email any // 邮箱
|
||||
Mobile any // 手机号码
|
||||
Hobby *gjson.Json // 爱好
|
||||
Channel interface{} // 渠道
|
||||
CityId interface{} // 所在城市
|
||||
Remark interface{} // 备注
|
||||
Status interface{} // 状态
|
||||
CreatedBy interface{} // 创建者
|
||||
UpdatedBy interface{} // 更新者
|
||||
Channel any // 渠道
|
||||
CityId any // 所在城市
|
||||
Remark any // 备注
|
||||
Status any // 状态
|
||||
CreatedBy any // 创建者
|
||||
UpdatedBy any // 更新者
|
||||
CreatedAt *gtime.Time // 创建时间
|
||||
UpdatedAt *gtime.Time // 修改时间
|
||||
DeletedAt *gtime.Time // 删除时间
|
||||
|
||||
@@ -12,15 +12,15 @@ import (
|
||||
// AddonHgexampleTenantOrder is the golang structure of table hg_addon_hgexample_tenant_order for DAO operations like Where/Data.
|
||||
type AddonHgexampleTenantOrder struct {
|
||||
g.Meta `orm:"table:hg_addon_hgexample_tenant_order, do:true"`
|
||||
Id interface{} // 主键
|
||||
TenantId interface{} // 租户ID
|
||||
MerchantId interface{} // 商户ID
|
||||
UserId interface{} // 用户ID
|
||||
ProductName interface{} // 购买产品
|
||||
OrderSn interface{} // 订单号
|
||||
Money interface{} // 充值金额
|
||||
Remark interface{} // 备注
|
||||
Status interface{} // 订单状态
|
||||
Id any // 主键
|
||||
TenantId any // 租户ID
|
||||
MerchantId any // 商户ID
|
||||
UserId any // 用户ID
|
||||
ProductName any // 购买产品
|
||||
OrderSn any // 订单号
|
||||
Money any // 充值金额
|
||||
Remark any // 备注
|
||||
Status any // 订单状态
|
||||
CreatedAt *gtime.Time // 创建时间
|
||||
UpdatedAt *gtime.Time // 修改时间
|
||||
}
|
||||
|
||||
@@ -12,14 +12,14 @@ import (
|
||||
// AdminCash is the golang structure of table hg_admin_cash for DAO operations like Where/Data.
|
||||
type AdminCash struct {
|
||||
g.Meta `orm:"table:hg_admin_cash, do:true"`
|
||||
Id interface{} // ID
|
||||
MemberId interface{} // 管理员ID
|
||||
Money interface{} // 提现金额
|
||||
Fee interface{} // 手续费
|
||||
LastMoney interface{} // 最终到账金额
|
||||
Ip interface{} // 申请人IP
|
||||
Status interface{} // 状态码
|
||||
Msg interface{} // 处理结果
|
||||
Id any // ID
|
||||
MemberId any // 管理员ID
|
||||
Money any // 提现金额
|
||||
Fee any // 手续费
|
||||
LastMoney any // 最终到账金额
|
||||
Ip any // 申请人IP
|
||||
Status any // 状态码
|
||||
Msg any // 处理结果
|
||||
HandleAt *gtime.Time // 处理时间
|
||||
CreatedAt *gtime.Time // 申请时间
|
||||
}
|
||||
|
||||
@@ -12,19 +12,19 @@ import (
|
||||
// AdminCreditsLog is the golang structure of table hg_admin_credits_log for DAO operations like Where/Data.
|
||||
type AdminCreditsLog struct {
|
||||
g.Meta `orm:"table:hg_admin_credits_log, do:true"`
|
||||
Id interface{} // 变动ID
|
||||
MemberId interface{} // 管理员ID
|
||||
AppId interface{} // 应用id
|
||||
AddonsName interface{} // 插件名称
|
||||
CreditType interface{} // 变动类型
|
||||
CreditGroup interface{} // 变动组别
|
||||
BeforeNum interface{} // 变动前
|
||||
Num interface{} // 变动数据
|
||||
AfterNum interface{} // 变动后
|
||||
Remark interface{} // 备注
|
||||
Ip interface{} // 操作人IP
|
||||
MapId interface{} // 关联ID
|
||||
Status interface{} // 状态
|
||||
Id any // 变动ID
|
||||
MemberId any // 管理员ID
|
||||
AppId any // 应用id
|
||||
AddonsName any // 插件名称
|
||||
CreditType any // 变动类型
|
||||
CreditGroup any // 变动组别
|
||||
BeforeNum any // 变动前
|
||||
Num any // 变动数据
|
||||
AfterNum any // 变动后
|
||||
Remark any // 备注
|
||||
Ip any // 操作人IP
|
||||
MapId any // 关联ID
|
||||
Status any // 状态
|
||||
CreatedAt *gtime.Time // 创建时间
|
||||
UpdatedAt *gtime.Time // 修改时间
|
||||
}
|
||||
|
||||
@@ -12,18 +12,18 @@ import (
|
||||
// AdminDept is the golang structure of table hg_admin_dept for DAO operations like Where/Data.
|
||||
type AdminDept struct {
|
||||
g.Meta `orm:"table:hg_admin_dept, do:true"`
|
||||
Id interface{} // 部门ID
|
||||
Pid interface{} // 父部门ID
|
||||
Name interface{} // 部门名称
|
||||
Code interface{} // 部门编码
|
||||
Type interface{} // 部门类型
|
||||
Leader interface{} // 负责人
|
||||
Phone interface{} // 联系电话
|
||||
Email interface{} // 邮箱
|
||||
Level interface{} // 关系树等级
|
||||
Tree interface{} // 关系树
|
||||
Sort interface{} // 排序
|
||||
Status interface{} // 部门状态
|
||||
Id any // 部门ID
|
||||
Pid any // 父部门ID
|
||||
Name any // 部门名称
|
||||
Code any // 部门编码
|
||||
Type any // 部门类型
|
||||
Leader any // 负责人
|
||||
Phone any // 联系电话
|
||||
Email any // 邮箱
|
||||
Level any // 关系树等级
|
||||
Tree any // 关系树
|
||||
Sort any // 排序
|
||||
Status any // 部门状态
|
||||
CreatedAt *gtime.Time // 创建时间
|
||||
UpdatedAt *gtime.Time // 更新时间
|
||||
}
|
||||
|
||||
@@ -13,32 +13,32 @@ import (
|
||||
// AdminMember is the golang structure of table hg_admin_member for DAO operations like Where/Data.
|
||||
type AdminMember struct {
|
||||
g.Meta `orm:"table:hg_admin_member, do:true"`
|
||||
Id interface{} // 管理员ID
|
||||
DeptId interface{} // 部门ID
|
||||
RoleId interface{} // 角色ID
|
||||
RealName interface{} // 真实姓名
|
||||
Username interface{} // 帐号
|
||||
PasswordHash interface{} // 密码
|
||||
Salt interface{} // 密码盐
|
||||
PasswordResetToken interface{} // 密码重置令牌
|
||||
Integral interface{} // 积分
|
||||
Balance interface{} // 余额
|
||||
Avatar interface{} // 头像
|
||||
Sex interface{} // 性别
|
||||
Qq interface{} // qq
|
||||
Email interface{} // 邮箱
|
||||
Mobile interface{} // 手机号码
|
||||
Id any // 管理员ID
|
||||
DeptId any // 部门ID
|
||||
RoleId any // 角色ID
|
||||
RealName any // 真实姓名
|
||||
Username any // 帐号
|
||||
PasswordHash any // 密码
|
||||
Salt any // 密码盐
|
||||
PasswordResetToken any // 密码重置令牌
|
||||
Integral any // 积分
|
||||
Balance any // 余额
|
||||
Avatar any // 头像
|
||||
Sex any // 性别
|
||||
Qq any // qq
|
||||
Email any // 邮箱
|
||||
Mobile any // 手机号码
|
||||
Birthday *gtime.Time // 生日
|
||||
CityId interface{} // 城市编码
|
||||
Address interface{} // 联系地址
|
||||
Pid interface{} // 上级管理员ID
|
||||
Level interface{} // 关系树等级
|
||||
Tree interface{} // 关系树
|
||||
InviteCode interface{} // 邀请码
|
||||
CityId any // 城市编码
|
||||
Address any // 联系地址
|
||||
Pid any // 上级管理员ID
|
||||
Level any // 关系树等级
|
||||
Tree any // 关系树
|
||||
InviteCode any // 邀请码
|
||||
Cash *gjson.Json // 提现配置
|
||||
LastActiveAt *gtime.Time // 最后活跃时间
|
||||
Remark interface{} // 备注
|
||||
Status interface{} // 状态
|
||||
Remark any // 备注
|
||||
Status any // 状态
|
||||
CreatedAt *gtime.Time // 创建时间
|
||||
UpdatedAt *gtime.Time // 修改时间
|
||||
}
|
||||
|
||||
@@ -11,6 +11,6 @@ import (
|
||||
// AdminMemberPost is the golang structure of table hg_admin_member_post for DAO operations like Where/Data.
|
||||
type AdminMemberPost struct {
|
||||
g.Meta `orm:"table:hg_admin_member_post, do:true"`
|
||||
MemberId interface{} // 管理员ID
|
||||
PostId interface{} // 岗位ID
|
||||
MemberId any // 管理员ID
|
||||
PostId any // 岗位ID
|
||||
}
|
||||
|
||||
@@ -11,6 +11,6 @@ import (
|
||||
// AdminMemberRole is the golang structure of table hg_admin_member_role for DAO operations like Where/Data.
|
||||
type AdminMemberRole struct {
|
||||
g.Meta `orm:"table:hg_admin_member_role, do:true"`
|
||||
MemberId interface{} // 管理员ID
|
||||
RoleId interface{} // 角色ID
|
||||
MemberId any // 管理员ID
|
||||
RoleId any // 角色ID
|
||||
}
|
||||
|
||||
@@ -12,30 +12,30 @@ import (
|
||||
// AdminMenu is the golang structure of table hg_admin_menu for DAO operations like Where/Data.
|
||||
type AdminMenu struct {
|
||||
g.Meta `orm:"table:hg_admin_menu, do:true"`
|
||||
Id interface{} // 菜单ID
|
||||
Pid interface{} // 父菜单ID
|
||||
Level interface{} // 关系树等级
|
||||
Tree interface{} // 关系树
|
||||
Title interface{} // 菜单名称
|
||||
Name interface{} // 名称编码
|
||||
Path interface{} // 路由地址
|
||||
Icon interface{} // 菜单图标
|
||||
Type interface{} // 菜单类型(1目录 2菜单 3按钮)
|
||||
Redirect interface{} // 重定向地址
|
||||
Permissions interface{} // 菜单包含权限集合
|
||||
PermissionName interface{} // 权限名称
|
||||
Component interface{} // 组件路径
|
||||
AlwaysShow interface{} // 取消自动计算根路由模式
|
||||
ActiveMenu interface{} // 高亮菜单编码
|
||||
IsRoot interface{} // 是否跟路由
|
||||
IsFrame interface{} // 是否内嵌
|
||||
FrameSrc interface{} // 内联外部地址
|
||||
KeepAlive interface{} // 缓存该路由
|
||||
Hidden interface{} // 是否隐藏
|
||||
Affix interface{} // 是否固定
|
||||
Sort interface{} // 排序
|
||||
Remark interface{} // 备注
|
||||
Status interface{} // 菜单状态
|
||||
Id any // 菜单ID
|
||||
Pid any // 父菜单ID
|
||||
Level any // 关系树等级
|
||||
Tree any // 关系树
|
||||
Title any // 菜单名称
|
||||
Name any // 名称编码
|
||||
Path any // 路由地址
|
||||
Icon any // 菜单图标
|
||||
Type any // 菜单类型(1目录 2菜单 3按钮)
|
||||
Redirect any // 重定向地址
|
||||
Permissions any // 菜单包含权限集合
|
||||
PermissionName any // 权限名称
|
||||
Component any // 组件路径
|
||||
AlwaysShow any // 取消自动计算根路由模式
|
||||
ActiveMenu any // 高亮菜单编码
|
||||
IsRoot any // 是否跟路由
|
||||
IsFrame any // 是否内嵌
|
||||
FrameSrc any // 内联外部地址
|
||||
KeepAlive any // 缓存该路由
|
||||
Hidden any // 是否隐藏
|
||||
Affix any // 是否固定
|
||||
Sort any // 排序
|
||||
Remark any // 备注
|
||||
Status any // 菜单状态
|
||||
UpdatedAt *gtime.Time // 更新时间
|
||||
CreatedAt *gtime.Time // 创建时间
|
||||
}
|
||||
|
||||
@@ -13,17 +13,17 @@ import (
|
||||
// AdminNotice is the golang structure of table hg_admin_notice for DAO operations like Where/Data.
|
||||
type AdminNotice struct {
|
||||
g.Meta `orm:"table:hg_admin_notice, do:true"`
|
||||
Id interface{} // 公告ID
|
||||
Title interface{} // 公告标题
|
||||
Type interface{} // 公告类型
|
||||
Tag interface{} // 标签
|
||||
Content interface{} // 公告内容
|
||||
Id any // 公告ID
|
||||
Title any // 公告标题
|
||||
Type any // 公告类型
|
||||
Tag any // 标签
|
||||
Content any // 公告内容
|
||||
Receiver *gjson.Json // 接收者
|
||||
Remark interface{} // 备注
|
||||
Sort interface{} // 排序
|
||||
Status interface{} // 公告状态
|
||||
CreatedBy interface{} // 发送人
|
||||
UpdatedBy interface{} // 修改人
|
||||
Remark any // 备注
|
||||
Sort any // 排序
|
||||
Status any // 公告状态
|
||||
CreatedBy any // 发送人
|
||||
UpdatedBy any // 修改人
|
||||
CreatedAt *gtime.Time // 创建时间
|
||||
UpdatedAt *gtime.Time // 更新时间
|
||||
DeletedAt *gtime.Time // 删除时间
|
||||
|
||||
@@ -12,10 +12,10 @@ import (
|
||||
// AdminNoticeRead is the golang structure of table hg_admin_notice_read for DAO operations like Where/Data.
|
||||
type AdminNoticeRead struct {
|
||||
g.Meta `orm:"table:hg_admin_notice_read, do:true"`
|
||||
Id interface{} // 记录ID
|
||||
NoticeId interface{} // 公告ID
|
||||
MemberId interface{} // 会员ID
|
||||
Clicks interface{} // 已读次数
|
||||
Id any // 记录ID
|
||||
NoticeId any // 公告ID
|
||||
MemberId any // 会员ID
|
||||
Clicks any // 已读次数
|
||||
UpdatedAt *gtime.Time // 更新时间
|
||||
CreatedAt *gtime.Time // 阅读时间
|
||||
}
|
||||
|
||||
@@ -12,19 +12,19 @@ import (
|
||||
// AdminOauth is the golang structure of table hg_admin_oauth for DAO operations like Where/Data.
|
||||
type AdminOauth struct {
|
||||
g.Meta `orm:"table:hg_admin_oauth, do:true"`
|
||||
Id interface{} // 主键
|
||||
MemberId interface{} // 用户ID
|
||||
Unionid interface{} // 唯一ID
|
||||
OauthClient interface{} // 授权组别
|
||||
OauthOpenid interface{} // 授权开放ID
|
||||
Sex interface{} // 性别
|
||||
Nickname interface{} // 昵称
|
||||
HeadPortrait interface{} // 头像
|
||||
Id any // 主键
|
||||
MemberId any // 用户ID
|
||||
Unionid any // 唯一ID
|
||||
OauthClient any // 授权组别
|
||||
OauthOpenid any // 授权开放ID
|
||||
Sex any // 性别
|
||||
Nickname any // 昵称
|
||||
HeadPortrait any // 头像
|
||||
Birthday *gtime.Time // 生日
|
||||
Country interface{} // 国家
|
||||
Province interface{} // 省
|
||||
City interface{} // 市
|
||||
Status interface{} // 状态
|
||||
Country any // 国家
|
||||
Province any // 省
|
||||
City any // 市
|
||||
Status any // 状态
|
||||
CreatedAt *gtime.Time // 创建时间
|
||||
UpdatedAt *gtime.Time // 修改时间
|
||||
}
|
||||
|
||||
@@ -12,16 +12,16 @@ import (
|
||||
// AdminOrder is the golang structure of table hg_admin_order for DAO operations like Where/Data.
|
||||
type AdminOrder struct {
|
||||
g.Meta `orm:"table:hg_admin_order, do:true"`
|
||||
Id interface{} // 主键
|
||||
MemberId interface{} // 管理员id
|
||||
OrderType interface{} // 订单类型
|
||||
ProductId interface{} // 产品id
|
||||
OrderSn interface{} // 关联订单号
|
||||
Money interface{} // 充值金额
|
||||
Remark interface{} // 备注
|
||||
RefundReason interface{} // 退款原因
|
||||
RejectRefundReason interface{} // 拒绝退款原因
|
||||
Status interface{} // 状态
|
||||
Id any // 主键
|
||||
MemberId any // 管理员id
|
||||
OrderType any // 订单类型
|
||||
ProductId any // 产品id
|
||||
OrderSn any // 关联订单号
|
||||
Money any // 充值金额
|
||||
Remark any // 备注
|
||||
RefundReason any // 退款原因
|
||||
RejectRefundReason any // 拒绝退款原因
|
||||
Status any // 状态
|
||||
CreatedAt *gtime.Time // 创建时间
|
||||
UpdatedAt *gtime.Time // 修改时间
|
||||
}
|
||||
|
||||
@@ -12,12 +12,12 @@ import (
|
||||
// AdminPost is the golang structure of table hg_admin_post for DAO operations like Where/Data.
|
||||
type AdminPost struct {
|
||||
g.Meta `orm:"table:hg_admin_post, do:true"`
|
||||
Id interface{} // 岗位ID
|
||||
Code interface{} // 岗位编码
|
||||
Name interface{} // 岗位名称
|
||||
Remark interface{} // 备注
|
||||
Sort interface{} // 排序
|
||||
Status interface{} // 状态
|
||||
Id any // 岗位ID
|
||||
Code any // 岗位编码
|
||||
Name any // 岗位名称
|
||||
Remark any // 备注
|
||||
Sort any // 排序
|
||||
Status any // 状态
|
||||
CreatedAt *gtime.Time // 创建时间
|
||||
UpdatedAt *gtime.Time // 更新时间
|
||||
}
|
||||
|
||||
@@ -13,17 +13,17 @@ import (
|
||||
// AdminRole is the golang structure of table hg_admin_role for DAO operations like Where/Data.
|
||||
type AdminRole struct {
|
||||
g.Meta `orm:"table:hg_admin_role, do:true"`
|
||||
Id interface{} // 角色ID
|
||||
Name interface{} // 角色名称
|
||||
Key interface{} // 角色权限字符串
|
||||
DataScope interface{} // 数据范围
|
||||
Id any // 角色ID
|
||||
Name any // 角色名称
|
||||
Key any // 角色权限字符串
|
||||
DataScope any // 数据范围
|
||||
CustomDept *gjson.Json // 自定义部门权限
|
||||
Pid interface{} // 上级角色ID
|
||||
Level interface{} // 关系树等级
|
||||
Tree interface{} // 关系树
|
||||
Remark interface{} // 备注
|
||||
Sort interface{} // 排序
|
||||
Status interface{} // 角色状态
|
||||
Pid any // 上级角色ID
|
||||
Level any // 关系树等级
|
||||
Tree any // 关系树
|
||||
Remark any // 备注
|
||||
Sort any // 排序
|
||||
Status any // 角色状态
|
||||
CreatedAt *gtime.Time // 创建时间
|
||||
UpdatedAt *gtime.Time // 更新时间
|
||||
}
|
||||
|
||||
@@ -11,12 +11,12 @@ import (
|
||||
// AdminRoleCasbin is the golang structure of table hg_admin_role_casbin for DAO operations like Where/Data.
|
||||
type AdminRoleCasbin struct {
|
||||
g.Meta `orm:"table:hg_admin_role_casbin, do:true"`
|
||||
Id interface{} //
|
||||
PType interface{} //
|
||||
V0 interface{} //
|
||||
V1 interface{} //
|
||||
V2 interface{} //
|
||||
V3 interface{} //
|
||||
V4 interface{} //
|
||||
V5 interface{} //
|
||||
Id any //
|
||||
PType any //
|
||||
V0 any //
|
||||
V1 any //
|
||||
V2 any //
|
||||
V3 any //
|
||||
V4 any //
|
||||
V5 any //
|
||||
}
|
||||
|
||||
@@ -11,6 +11,6 @@ import (
|
||||
// AdminRoleMenu is the golang structure of table hg_admin_role_menu for DAO operations like Where/Data.
|
||||
type AdminRoleMenu struct {
|
||||
g.Meta `orm:"table:hg_admin_role_menu, do:true"`
|
||||
RoleId interface{} // 角色ID
|
||||
MenuId interface{} // 菜单ID
|
||||
RoleId any // 角色ID
|
||||
MenuId any // 菜单ID
|
||||
}
|
||||
|
||||
@@ -13,34 +13,34 @@ import (
|
||||
// PayLog is the golang structure of table hg_pay_log for DAO operations like Where/Data.
|
||||
type PayLog struct {
|
||||
g.Meta `orm:"table:hg_pay_log, do:true"`
|
||||
Id interface{} // 主键
|
||||
MemberId interface{} // 会员ID
|
||||
AppId interface{} // 应用ID
|
||||
AddonsName interface{} // 插件名称
|
||||
OrderSn interface{} // 关联订单号
|
||||
OrderGroup interface{} // 组别[默认统一支付类型]
|
||||
Openid interface{} // openid
|
||||
MchId interface{} // 商户支付账户
|
||||
Subject interface{} // 订单标题
|
||||
Id any // 主键
|
||||
MemberId any // 会员ID
|
||||
AppId any // 应用ID
|
||||
AddonsName any // 插件名称
|
||||
OrderSn any // 关联订单号
|
||||
OrderGroup any // 组别[默认统一支付类型]
|
||||
Openid any // openid
|
||||
MchId any // 商户支付账户
|
||||
Subject any // 订单标题
|
||||
Detail *gjson.Json // 支付商品详情
|
||||
AuthCode interface{} // 刷卡码
|
||||
OutTradeNo interface{} // 商户订单号
|
||||
TransactionId interface{} // 交易号
|
||||
PayType interface{} // 支付类型
|
||||
PayAmount interface{} // 支付金额
|
||||
ActualAmount interface{} // 实付金额
|
||||
PayStatus interface{} // 支付状态
|
||||
AuthCode any // 刷卡码
|
||||
OutTradeNo any // 商户订单号
|
||||
TransactionId any // 交易号
|
||||
PayType any // 支付类型
|
||||
PayAmount any // 支付金额
|
||||
ActualAmount any // 实付金额
|
||||
PayStatus any // 支付状态
|
||||
PayAt *gtime.Time // 支付时间
|
||||
TradeType interface{} // 交易类型
|
||||
RefundSn interface{} // 退款单号
|
||||
IsRefund interface{} // 是否退款
|
||||
Custom interface{} // 自定义参数
|
||||
CreateIp interface{} // 创建者IP
|
||||
PayIp interface{} // 支付者IP
|
||||
NotifyUrl interface{} // 支付通知回调地址
|
||||
ReturnUrl interface{} // 买家付款成功跳转地址
|
||||
TradeType any // 交易类型
|
||||
RefundSn any // 退款单号
|
||||
IsRefund any // 是否退款
|
||||
Custom any // 自定义参数
|
||||
CreateIp any // 创建者IP
|
||||
PayIp any // 支付者IP
|
||||
NotifyUrl any // 支付通知回调地址
|
||||
ReturnUrl any // 买家付款成功跳转地址
|
||||
TraceIds *gjson.Json // 链路ID集合
|
||||
Status interface{} // 状态
|
||||
Status any // 状态
|
||||
CreatedAt *gtime.Time // 创建时间
|
||||
UpdatedAt *gtime.Time // 修改时间
|
||||
}
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user