Compare commits

...

2 Commits
master ... dev

Author SHA1 Message Date
ZHANGZENGNING cfcb706b15 初版 1 month ago
ZHANGZENGNING b2f18aad31 电子书全部查询 1 month ago
  1. 15
      api/hello/hello.go
  2. 12
      api/hello/v1/hello.go
  3. 8
      api/v1/ebooks/ebooks.go
  4. 9
      api/v1/live_streams/live_streams.go
  5. 11
      api/v1/shows/shows.go
  6. 4
      go.mod
  7. 56
      go.sum
  8. 4
      hack/config.yaml
  9. 21
      internal/cmd/cmd.go
  10. 23
      internal/controller/ebooks/ebooks.go
  11. 5
      internal/controller/hello/hello.go
  12. 15
      internal/controller/hello/hello_new.go
  13. 13
      internal/controller/hello/hello_v1_hello.go
  14. 23
      internal/controller/live_streams/live_streams.go
  15. 25
      internal/controller/shows/shows.go
  16. 27
      internal/dao/ebooks.go
  17. 81
      internal/dao/internal/ebooks.go
  18. 85
      internal/dao/internal/live_streams.go
  19. 95
      internal/dao/internal/shows.go
  20. 27
      internal/dao/live_streams.go
  21. 27
      internal/dao/shows.go
  22. 25
      internal/logic/ebooks.go
  23. 37
      internal/logic/live_streams.go
  24. 57
      internal/logic/shows.go
  25. 19
      internal/model/do/ebooks.go
  26. 22
      internal/model/do/live_streams.go
  27. 27
      internal/model/do/shows.go
  28. 14
      internal/model/entity/ebooks.go
  29. 20
      internal/model/entity/live_streams.go
  30. 25
      internal/model/entity/shows.go
  31. 27
      internal/service/ebooks.go
  32. 27
      internal/service/live_streams.go
  33. 26
      internal/service/shows.go
  34. 6
      main.go
  35. BIN
      resource/public/resource/image/ebook1.png
  36. BIN
      resource/public/resource/image/ebook2.png
  37. BIN
      resource/public/resource/image/ebook3.png
  38. BIN
      resource/public/resource/image/ebook4.png
  39. BIN
      resource/public/resource/image/live/p1.png
  40. BIN
      resource/public/resource/image/shows/t1.png
  41. BIN
      resource/public/resource/image/shows/v1.png

15
api/hello/hello.go

@ -1,15 +0,0 @@
// =================================================================================
// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT.
// =================================================================================
package hello
import (
"context"
"practice_Go/api/hello/v1"
)
type IHelloV1 interface {
Hello(ctx context.Context, req *v1.HelloReq) (res *v1.HelloRes, err error)
}

12
api/hello/v1/hello.go

@ -1,12 +0,0 @@
package v1
import (
"github.com/gogf/gf/v2/frame/g"
)
type HelloReq struct {
g.Meta `path:"/hello" tags:"Hello" method:"get" summary:"You first hello api"`
}
type HelloRes struct {
g.Meta `mime:"text/html" example:"string"`
}

8
api/v1/ebooks/ebooks.go

@ -0,0 +1,8 @@
package ebooks
import "practice_Go/internal/model/entity"
type GetEbooksListReq struct{}
type GetEbooksListRes struct {
List []*entity.Ebooks `json:"list" dc:"ebooks list"`
}

9
api/v1/live_streams/live_streams.go

@ -0,0 +1,9 @@
package live_streams
import "practice_Go/internal/model/entity"
type GetLiveListReq struct {
}
type GetLiveListRes struct {
List []*entity.LiveStreams `json:"list" dc:"LiveStreams list"`
}

11
api/v1/shows/shows.go

@ -0,0 +1,11 @@
package shows
import "practice_Go/internal/model/entity"
type ShowReq struct {
QueryType int `v:"required|in:1,2,3,4" p:"queryType"` // 验证参数有效性
}
type GetShowsListRes struct {
List []*entity.Shows `json:"list" dc:"shows list"`
}

4
go.mod

@ -4,6 +4,8 @@ go 1.18
require github.com/gogf/gf/v2 v2.7.1
require github.com/go-sql-driver/mysql v1.6.0 // indirect
require (
github.com/BurntSushi/toml v1.3.2 // indirect
github.com/clbanning/mxj/v2 v2.7.0 // indirect
@ -11,6 +13,7 @@ require (
github.com/fsnotify/fsnotify v1.7.0 // indirect
github.com/go-logr/logr v1.2.3 // indirect
github.com/go-logr/stdr v1.2.2 // indirect
github.com/gogf/gf/contrib/drivers/mysql/v2 v2.4.1
github.com/gorilla/websocket v1.5.1 // indirect
github.com/grokify/html-strip-tags-go v0.1.0 // indirect
github.com/magiconair/properties v1.8.7 // indirect
@ -25,4 +28,5 @@ require (
golang.org/x/sys v0.19.0 // indirect
golang.org/x/text v0.14.0 // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
)

56
go.sum

@ -1,10 +1,15 @@
github.com/BurntSushi/toml v1.1.0/go.mod h1:CxXYINrC8qIiEnFrOxCa7Jy5BFHlXnUU2pbicEuybxQ=
github.com/BurntSushi/toml v1.3.2 h1:o7IhLm0Msx3BaB+n3Ag7L8EVlByGnpq14C4YWiu/gL8=
github.com/BurntSushi/toml v1.3.2/go.mod h1:CxXYINrC8qIiEnFrOxCa7Jy5BFHlXnUU2pbicEuybxQ=
github.com/clbanning/mxj/v2 v2.5.5/go.mod h1:hNiWqW14h+kc+MdF9C6/YoRfjEJoR3ou6tn/Qo+ve2s=
github.com/clbanning/mxj/v2 v2.7.0 h1:WA/La7UGCanFe5NpHF0Q3DNtnCsVoxbPKuyBNHWRyME=
github.com/clbanning/mxj/v2 v2.7.0/go.mod h1:hNiWqW14h+kc+MdF9C6/YoRfjEJoR3ou6tn/Qo+ve2s=
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
github.com/fatih/color v1.13.0/go.mod h1:kLAiJbzzSOZDVNGyDpeOxJ47H46qBXwg5ILebYFFOfk=
github.com/fatih/color v1.16.0 h1:zmkK9Ngbjj+K0yRhTVONQh1p/HknKYSlNT+vZCzyokM=
github.com/fatih/color v1.16.0/go.mod h1:fL2Sau1YI5c0pdGEVCbKQbLXB6edEj1ZgiY4NijnWvE=
github.com/fsnotify/fsnotify v1.5.4/go.mod h1:OVB6XrOHzAwXMpEM7uPOzcehqUV2UqJxmVXmkdnm1bU=
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/go-logr/logr v1.2.2/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A=
@ -12,17 +17,29 @@ github.com/go-logr/logr v1.2.3 h1:2DntVwHkVopvECVRSlL5PSo9eG+cAkDCuckLubN+rq0=
github.com/go-logr/logr v1.2.3/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A=
github.com/go-logr/stdr v1.2.2 h1:hSWxHoqTgW2S2qGc0LTAI563KZ5YKYRhT3MFKZMbjag=
github.com/go-logr/stdr v1.2.2/go.mod h1:mMo/vtBO5dYbehREoey6XUKy/eSumjCCveDpRre4VKE=
github.com/go-sql-driver/mysql v1.6.0 h1:BCTh4TKNUYmOmMUcQ3IipzF5prigylS7XXjEkfCHuOE=
github.com/go-sql-driver/mysql v1.6.0/go.mod h1:DCzpHaOWr8IXmIStZouvnhqoel9Qv2LBy8hT2VhHyBg=
github.com/gogf/gf/contrib/drivers/mysql/v2 v2.4.1 h1:ra6aO6+KUufCg9eK52oj6Q2SnCdrmkSZF9pd32EIivQ=
github.com/gogf/gf/contrib/drivers/mysql/v2 v2.4.1/go.mod h1:xubKxCvgbPt9r4yD3ecJoP3DC3sHqcJoMyS0eX837Zg=
github.com/gogf/gf/v2 v2.4.1/go.mod h1:tsbmtwcAl2chcYoq/fP9W2FZf06aw4i89X34nbSHo9Y=
github.com/gogf/gf/v2 v2.7.1 h1:Ukp7vzwh6VKnivEEx/xiMc61dL1HVZqCCHl//3GBRxc=
github.com/gogf/gf/v2 v2.7.1/go.mod h1:3oyGjyLHtSSo8kQ57Nj1TPdUNc0e2HS0A2J+KkXoW+I=
github.com/google/go-cmp v0.5.7/go.mod h1:n+brtR0CgQNWTVd5ZUFpTBC8YFBDLK/h/bpaJ8/DtOE=
github.com/google/go-cmp v0.5.9 h1:O2Tfq5qg4qc4AmwVlvv0oLiVAGB7enBSJ2x2DqQFi38=
github.com/gorilla/websocket v1.5.0/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE=
github.com/gorilla/websocket v1.5.1 h1:gmztn0JnHVt9JZquRuzLw3g4wouNVzKL15iLr/zn/QY=
github.com/gorilla/websocket v1.5.1/go.mod h1:x3kM2JMyaluk02fnUJpQuwD2dCS5NDG2ZHL0uE0tcaY=
github.com/grokify/html-strip-tags-go v0.0.1/go.mod h1:2Su6romC5/1VXOQMaWL2yb618ARB8iVo6/DR99A6d78=
github.com/grokify/html-strip-tags-go v0.1.0 h1:03UrQLjAny8xci+R+qjCce/MYnpNXCtgzltlQbOBae4=
github.com/grokify/html-strip-tags-go v0.1.0/go.mod h1:ZdzgfHEzAfz9X6Xe5eBLVblWIxXfYSQ40S/VKrAOGpc=
github.com/magiconair/properties v1.8.6/go.mod h1:y3VJvCyxH9uVvJTWEGAELF3aiYNyPKd5NZ3oSwXrF60=
github.com/magiconair/properties v1.8.7 h1:IeQXZAiQcpL9mgcAe1Nu6cX9LLw6ExEHKjN0VQdvPDY=
github.com/magiconair/properties v1.8.7/go.mod h1:Dhd985XPs7jluiymwWYZ0G4Z61jb3vdS329zhj2hYo0=
github.com/mattn/go-colorable v0.1.9/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc=
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.12/go.mod h1:cbi8OIDigv2wuxKPP5vlRcQ1OAZbq2CE4Kysco4FUpU=
github.com/mattn/go-isatty v0.0.14/go.mod h1:7GGIvUiUoEMVVmxf/4nioHXj79iQHKdU27kJ6hsGG94=
github.com/mattn/go-isatty v0.0.16/go.mod h1:kYGgaQfpe5nmfYZH+SKPsOc2e4SrIfOl2e/yFXSvRLM=
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=
@ -31,22 +48,61 @@ github.com/mattn/go-runewidth v0.0.9/go.mod h1:H031xJmbD/WCDINGzjvQ9THkh0rPKHF+m
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/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
github.com/stretchr/testify v1.8.2 h1:+h33VjcLVPDHtOdpUCuF+7gSuG3yGIftsP1YvFihtJ8=
github.com/yuin/goldmark v1.4.0/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k=
go.opentelemetry.io/otel v1.7.0/go.mod h1:5BdUoMIz5WEs0vt0CUEMtSSaTSHBBVwrhnz7+nrD5xk=
go.opentelemetry.io/otel v1.14.0 h1:/79Huy8wbf5DnIPhemGB+zEPVwnN6fuQybr/SRXa6hM=
go.opentelemetry.io/otel v1.14.0/go.mod h1:o4buv+dJzx8rohcUeRmWUZhqupFvzWis188WlggnNeU=
go.opentelemetry.io/otel/sdk v1.7.0/go.mod h1:uTEOTwaqIVuTGiJN7ii13Ibp75wJmYUDe374q6cZwUU=
go.opentelemetry.io/otel/sdk v1.14.0 h1:PDCppFRDq8A1jL9v6KMI6dYesaq+DFcDZvjsoGvxGzY=
go.opentelemetry.io/otel/sdk v1.14.0/go.mod h1:bwIC5TjrNG6QDCHNWvW4HLHtUQ4I+VQDsnjhvyZCALM=
go.opentelemetry.io/otel/trace v1.7.0/go.mod h1:fzLSB9nqR2eXzxPXb2JW9IKE+ScyXA48yyE4TNvoHqU=
go.opentelemetry.io/otel/trace v1.14.0 h1:wp2Mmvj41tDsyAJXiWDWpfNsOiIyd38fy85pyKcFq/M=
go.opentelemetry.io/otel/trace v1.14.0/go.mod h1:8avnQLK+CG77yNLUae4ea2JDQ6iT+gozhnZjy/rw9G8=
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=
golang.org/x/mod v0.4.2/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=
golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
golang.org/x/net v0.0.0-20210805182204-aaa1db679c0d/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y=
golang.org/x/net v0.0.0-20211112202133-69e39bad7dc2/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y=
golang.org/x/net v0.24.0 h1:1PcaxkF854Fu3+lvBIx5SYn9wRlBzzcnHZSiaFFAb0w=
golang.org/x/net v0.24.0/go.mod h1:2Q7sJY5mzlzWjKtYUEXSlBWCdyaioyXzRB2RtU8KVE8=
golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20200116001909-b77594299b42/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20200223170610-d5e6a3e2c0ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20210423185535-09eb48e85fd7/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20210630005230-0f9fa26af87c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.0.0-20210809222454-d867a43fc93e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.0.0-20220412211240-33da011f77ad/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.19.0 h1:q5f1RH2jigJ1MoAWp2KTp3gm5zAGFUTarQZ5U386+4o=
golang.org/x/sys v0.19.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
golang.org/x/text v0.3.8-0.20211105212822-18b340fc7af2/go.mod h1:EFNZuWvGYxIRUEX+K8UmCFwYmZjqcrnq15ZuVldZkZ0=
golang.org/x/text v0.14.0 h1:ScX5w1eTa3QqT8oi6+ziP7dTV1S2+ALU0bI+0zXKWiQ=
golang.org/x/text v0.14.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU=
golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
golang.org/x/tools v0.1.7/go.mod h1:LGqMHiF4EqQNHR1JncWGqT5BVaXmza+X+BDGol+dOxo=
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=
golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405 h1:yhCVgyC4o1eVCa2tZl7eS0r+SDo693bJlVdllGtEeKM=
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA=
gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=

4
hack/config.yaml

@ -4,9 +4,9 @@
gfcli:
gen:
dao:
- link: "mysql:root:12345678@tcp(127.0.0.1:3306)/test"
- link: "mysql:root:zzn20020930@tcp(127.0.0.1:3306)/homily_link?parseTime=True&loc=Local"
tables: "ebooks,live_streams,shows"
descriptionTag: true
docker:
build: "-a amd64 -s linux -p temp -ew"
tagPrefixes:

21
internal/cmd/cmd.go

@ -2,14 +2,21 @@ package cmd
import (
"context"
"practice_Go/internal/controller/shows"
"practice_Go/internal/controller/ebooks"
"practice_Go/internal/controller/live_streams"
"github.com/gogf/gf/v2/frame/g"
"github.com/gogf/gf/v2/net/ghttp"
"github.com/gogf/gf/v2/os/gcmd"
"practice_Go/internal/controller/hello"
)
func MiddlewareCORS(r *ghttp.Request) {
r.Response.CORSDefault()
r.Middleware.Next()
}
var (
Main = gcmd.Command{
Name: "main",
@ -17,11 +24,11 @@ var (
Brief: "start http server",
Func: func(ctx context.Context, parser *gcmd.Parser) (err error) {
s := g.Server()
s.Group("/", func(group *ghttp.RouterGroup) {
group.Middleware(ghttp.MiddlewareHandlerResponse)
group.Bind(
hello.NewV1(),
)
s.Group("/api", func(group *ghttp.RouterGroup) {
group.Middleware(MiddlewareCORS)
group.POST("/ebooks/getEbookList", ebooks.Ebooks.GetEbooksList)
group.POST("/live/getLiveList", live_streams.Live.GetLiveList)
group.POST("/show/getShowList", shows.Shows.GetShowList)
})
s.Run()
return nil

23
internal/controller/ebooks/ebooks.go

@ -0,0 +1,23 @@
package ebooks
import (
"github.com/gogf/gf/v2/net/ghttp"
"practice_Go/api/v1/ebooks"
ebook "practice_Go/internal/service"
)
type cEbooks struct{}
var Ebooks = cEbooks{}
func (c *cEbooks) GetEbooksList(r *ghttp.Request) {
var req *ebooks.GetEbooksListReq
if err := r.Parse(&req); err != nil {
r.Response.WriteJsonExit(err.Error())
}
res, err := ebook.Ebooks().GetEbooksList(r.Context(), req)
if err != nil {
r.Response.WriteJsonExit(err.Error())
}
r.Response.WriteJsonExit(res)
}

5
internal/controller/hello/hello.go

@ -1,5 +0,0 @@
// =================================================================================
// This is auto-generated by GoFrame CLI tool only once. Fill this file as you wish.
// =================================================================================
package hello

15
internal/controller/hello/hello_new.go

@ -1,15 +0,0 @@
// =================================================================================
// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT.
// =================================================================================
package hello
import (
"practice_Go/api/hello"
)
type ControllerV1 struct{}
func NewV1() hello.IHelloV1 {
return &ControllerV1{}
}

13
internal/controller/hello/hello_v1_hello.go

@ -1,13 +0,0 @@
package hello
import (
"context"
"github.com/gogf/gf/v2/frame/g"
"practice_Go/api/hello/v1"
)
func (c *ControllerV1) Hello(ctx context.Context, req *v1.HelloReq) (res *v1.HelloRes, err error) {
g.RequestFromCtx(ctx).Response.Writeln("Hello World!")
return
}

23
internal/controller/live_streams/live_streams.go

@ -0,0 +1,23 @@
package live_streams
import (
"github.com/gogf/gf/v2/net/ghttp"
"practice_Go/api/v1/live_streams"
live "practice_Go/internal/service"
)
type cLive struct{}
var Live = cLive{}
func (c *cLive) GetLiveList(r *ghttp.Request) {
var req *live_streams.GetLiveListReq
if err := r.Parse(&req); err != nil {
r.Response.WriteJsonExit(err.Error())
}
res, err := live.Live().GetLiveList(r.Context(), req)
if err != nil {
r.Response.WriteJsonExit(err.Error())
}
r.Response.WriteJsonExit(res)
}

25
internal/controller/shows/shows.go

@ -0,0 +1,25 @@
package shows
import (
"github.com/gogf/gf/v2/errors/gcode"
"github.com/gogf/gf/v2/net/ghttp"
"practice_Go/api/v1/shows"
"practice_Go/internal/service"
)
type cShows struct{}
var Shows = cShows{}
func (c *cShows) GetShowList(r *ghttp.Request) {
var req *shows.ShowReq
if err := r.Parse(&req); err != nil {
r.Response.WriteJsonExit(gcode.New(400, "参数错误", nil))
}
res, err := service.Shows().GetShowsList(r.Context(), req)
if err != nil {
r.Response.WriteJsonExit(gcode.New(500, err.Error(), nil))
}
r.Response.WriteJson(res)
}

27
internal/dao/ebooks.go

@ -0,0 +1,27 @@
// =================================================================================
// This is auto-generated by GoFrame CLI tool only once. Fill this file as you wish.
// =================================================================================
package dao
import (
"practice_Go/internal/dao/internal"
)
// internalEbooksDao is internal type for wrapping internal DAO implements.
type internalEbooksDao = *internal.EbooksDao
// ebooksDao is the data access object for table ebooks.
// You can define custom methods on it to extend its functionality as you wish.
type ebooksDao struct {
internalEbooksDao
}
var (
// Ebooks is globally public accessible object for table ebooks operations.
Ebooks = ebooksDao{
internal.NewEbooksDao(),
}
)
// Fill with you ideas below.

81
internal/dao/internal/ebooks.go

@ -0,0 +1,81 @@
// ==========================================================================
// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT.
// ==========================================================================
package internal
import (
"context"
"github.com/gogf/gf/v2/database/gdb"
"github.com/gogf/gf/v2/frame/g"
)
// EbooksDao is the data access object for table ebooks.
type EbooksDao struct {
table string // table is the underlying table name of the DAO.
group string // group is the database configuration group name of current DAO.
columns EbooksColumns // columns contains all the column names of Table for convenient usage.
}
// EbooksColumns defines and stores column names for table ebooks.
type EbooksColumns struct {
Id string // 主键
Cover string // 封面图URL
Title string // 书名(唯一约束)
Description string // 简介
ViewCount string // 观看人数
}
// ebooksColumns holds the columns for table ebooks.
var ebooksColumns = EbooksColumns{
Id: "id",
Cover: "cover",
Title: "title",
Description: "description",
ViewCount: "view_count",
}
// NewEbooksDao creates and returns a new DAO object for table data access.
func NewEbooksDao() *EbooksDao {
return &EbooksDao{
group: "default",
table: "ebooks",
columns: ebooksColumns,
}
}
// DB retrieves and returns the underlying raw database management object of current DAO.
func (dao *EbooksDao) DB() gdb.DB {
return g.DB(dao.group)
}
// Table returns the table name of current dao.
func (dao *EbooksDao) Table() string {
return dao.table
}
// Columns returns all column names of current dao.
func (dao *EbooksDao) Columns() EbooksColumns {
return dao.columns
}
// Group returns the configuration group name of database of current dao.
func (dao *EbooksDao) Group() string {
return dao.group
}
// Ctx creates and returns the Model for current DAO, It automatically sets the context for current operation.
func (dao *EbooksDao) Ctx(ctx context.Context) *gdb.Model {
return dao.DB().Model(dao.table).Safe().Ctx(ctx)
}
// Transaction wraps the transaction logic using function f.
// It rollbacks the transaction and returns the error from function f if it returns non-nil error.
// It commits the transaction and returns nil if function f returns nil.
//
// Note that, you should not Commit or Rollback the transaction in function f
// as it is automatically handled by this function.
func (dao *EbooksDao) Transaction(ctx context.Context, f func(ctx context.Context, tx gdb.TX) error) (err error) {
return dao.Ctx(ctx).Transaction(ctx, f)
}

85
internal/dao/internal/live_streams.go

@ -0,0 +1,85 @@
// ==========================================================================
// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT.
// ==========================================================================
package internal
import (
"context"
"github.com/gogf/gf/v2/database/gdb"
"github.com/gogf/gf/v2/frame/g"
)
// LiveStreamsDao is the data access object for table live_streams.
type LiveStreamsDao struct {
table string // table is the underlying table name of the DAO.
group string // group is the database configuration group name of current DAO.
columns LiveStreamsColumns // columns contains all the column names of Table for convenient usage.
}
// LiveStreamsColumns defines and stores column names for table live_streams.
type LiveStreamsColumns struct {
Id string // 主键
Cover string // 直播封面URL
Title string // 直播标题
Avatar string // 主播头像URL
PublisherName string // 主播名字
StartTime string // 计划开播时间
Status string // 开播状态(0=未开播,1=直播中)
}
// liveStreamsColumns holds the columns for table live_streams.
var liveStreamsColumns = LiveStreamsColumns{
Id: "id",
Cover: "cover",
Title: "title",
Avatar: "avatar",
PublisherName: "publisher_name",
StartTime: "start_time",
Status: "status",
}
// NewLiveStreamsDao creates and returns a new DAO object for table data access.
func NewLiveStreamsDao() *LiveStreamsDao {
return &LiveStreamsDao{
group: "default",
table: "live_streams",
columns: liveStreamsColumns,
}
}
// DB retrieves and returns the underlying raw database management object of current DAO.
func (dao *LiveStreamsDao) DB() gdb.DB {
return g.DB(dao.group)
}
// Table returns the table name of current dao.
func (dao *LiveStreamsDao) Table() string {
return dao.table
}
// Columns returns all column names of current dao.
func (dao *LiveStreamsDao) Columns() LiveStreamsColumns {
return dao.columns
}
// Group returns the configuration group name of database of current dao.
func (dao *LiveStreamsDao) Group() string {
return dao.group
}
// Ctx creates and returns the Model for current DAO, It automatically sets the context for current operation.
func (dao *LiveStreamsDao) Ctx(ctx context.Context) *gdb.Model {
return dao.DB().Model(dao.table).Safe().Ctx(ctx)
}
// Transaction wraps the transaction logic using function f.
// It rollbacks the transaction and returns the error from function f if it returns non-nil error.
// It commits the transaction and returns nil if function f returns nil.
//
// Note that, you should not Commit or Rollback the transaction in function f
// as it is automatically handled by this function.
func (dao *LiveStreamsDao) Transaction(ctx context.Context, f func(ctx context.Context, tx gdb.TX) error) (err error) {
return dao.Ctx(ctx).Transaction(ctx, f)
}

95
internal/dao/internal/shows.go

@ -0,0 +1,95 @@
// ==========================================================================
// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT.
// ==========================================================================
package internal
import (
"context"
"github.com/gogf/gf/v2/database/gdb"
"github.com/gogf/gf/v2/frame/g"
)
// ShowsDao is the data access object for table shows.
type ShowsDao struct {
table string // table is the underlying table name of the DAO.
group string // group is the database configuration group name of current DAO.
columns ShowsColumns // columns contains all the column names of Table for convenient usage.
}
// ShowsColumns defines and stores column names for table shows.
type ShowsColumns struct {
Id string // 主键
Cover string // 封面图URL
Title string // 标题
PublisherName string // 发布人名字
PublisherAvatar string // 发布人头像URL
PublishTime string // 发布时间
ViewCount string // 观看人数
CommentCount string // 评论数
LikeCount string // 点赞数
Type string // 类型(1=文章,2=视频)
ClubId string // 所属俱乐部(0=无,1=博古)
VideoDuration string // 视频时长(秒)
}
// showsColumns holds the columns for table shows.
var showsColumns = ShowsColumns{
Id: "id",
Cover: "cover",
Title: "title",
PublisherName: "publisher_name",
PublisherAvatar: "publisher_avatar",
PublishTime: "publish_time",
ViewCount: "view_count",
CommentCount: "comment_count",
LikeCount: "like_count",
Type: "type",
ClubId: "club_id",
VideoDuration: "video_duration",
}
// NewShowsDao creates and returns a new DAO object for table data access.
func NewShowsDao() *ShowsDao {
return &ShowsDao{
group: "default",
table: "shows",
columns: showsColumns,
}
}
// DB retrieves and returns the underlying raw database management object of current DAO.
func (dao *ShowsDao) DB() gdb.DB {
return g.DB(dao.group)
}
// Table returns the table name of current dao.
func (dao *ShowsDao) Table() string {
return dao.table
}
// Columns returns all column names of current dao.
func (dao *ShowsDao) Columns() ShowsColumns {
return dao.columns
}
// Group returns the configuration group name of database of current dao.
func (dao *ShowsDao) Group() string {
return dao.group
}
// Ctx creates and returns the Model for current DAO, It automatically sets the context for current operation.
func (dao *ShowsDao) Ctx(ctx context.Context) *gdb.Model {
return dao.DB().Model(dao.table).Safe().Ctx(ctx)
}
// Transaction wraps the transaction logic using function f.
// It rollbacks the transaction and returns the error from function f if it returns non-nil error.
// It commits the transaction and returns nil if function f returns nil.
//
// Note that, you should not Commit or Rollback the transaction in function f
// as it is automatically handled by this function.
func (dao *ShowsDao) Transaction(ctx context.Context, f func(ctx context.Context, tx gdb.TX) error) (err error) {
return dao.Ctx(ctx).Transaction(ctx, f)
}

27
internal/dao/live_streams.go

@ -0,0 +1,27 @@
// =================================================================================
// This is auto-generated by GoFrame CLI tool only once. Fill this file as you wish.
// =================================================================================
package dao
import (
"practice_Go/internal/dao/internal"
)
// internalLiveStreamsDao is internal type for wrapping internal DAO implements.
type internalLiveStreamsDao = *internal.LiveStreamsDao
// liveStreamsDao is the data access object for table live_streams.
// You can define custom methods on it to extend its functionality as you wish.
type liveStreamsDao struct {
internalLiveStreamsDao
}
var (
// LiveStreams is globally public accessible object for table live_streams operations.
LiveStreams = liveStreamsDao{
internal.NewLiveStreamsDao(),
}
)
// Fill with you ideas below.

27
internal/dao/shows.go

@ -0,0 +1,27 @@
// =================================================================================
// This is auto-generated by GoFrame CLI tool only once. Fill this file as you wish.
// =================================================================================
package dao
import (
"practice_Go/internal/dao/internal"
)
// internalShowsDao is internal type for wrapping internal DAO implements.
type internalShowsDao = *internal.ShowsDao
// showsDao is the data access object for table shows.
// You can define custom methods on it to extend its functionality as you wish.
type showsDao struct {
internalShowsDao
}
var (
// Shows is globally public accessible object for table shows operations.
Shows = showsDao{
internal.NewShowsDao(),
}
)
// Fill with you ideas below.

25
internal/logic/ebooks.go

@ -0,0 +1,25 @@
package logic
import (
"context"
"practice_Go/api/v1/ebooks"
"practice_Go/internal/dao"
ebook "practice_Go/internal/service"
)
type sEbooks struct{}
func init() {
ebook.RegisterEbooks(New())
}
func New() *sEbooks {
return &sEbooks{}
}
func (c *sEbooks) GetEbooksList(ctx context.Context, req *ebooks.GetEbooksListReq) (res ebooks.GetEbooksListRes, err error) {
err = dao.Ebooks.Ctx(ctx).Scan(&res.List)
if err != nil {
return
}
return
}

37
internal/logic/live_streams.go

@ -0,0 +1,37 @@
package logic
import (
"context"
"github.com/gogf/gf/v2/errors/gerror"
"github.com/gogf/gf/v2/frame/g"
"practice_Go/api/v1/live_streams"
"practice_Go/internal/dao"
"practice_Go/internal/model/entity"
live "practice_Go/internal/service"
)
type sLives struct{}
func init() {
live.RegisterLives(NewLive())
}
func NewLive() *sLives {
return &sLives{}
}
// 实现接口 ILive 的方法
func (s *sLives) GetLiveList(ctx context.Context, req *live_streams.GetLiveListReq) (res live_streams.GetLiveListRes, err error) {
var list []*entity.LiveStreams
err = dao.LiveStreams.Ctx(ctx).
OrderAsc("start_time"). // 按开播时间升序
Limit(8). // 取前8条
Scan(&list)
if err != nil {
g.Log().Errorf(ctx, "直播数据获取失败:%v", err)
return res, gerror.Wrap(err, "直播数据服务异常")
}
// 将 list 转换为 live_streams.GetLiveListRes 的结构
res.List = list
return res, nil
}

57
internal/logic/shows.go

@ -0,0 +1,57 @@
package logic
import (
"context"
"github.com/gogf/gf/v2/errors/gcode"
"github.com/gogf/gf/v2/errors/gerror"
"github.com/gogf/gf/v2/frame/g"
v1 "practice_Go/api/v1/shows"
"practice_Go/internal/dao"
"practice_Go/internal/model/entity"
show "practice_Go/internal/service"
)
type sShows struct{}
func init() {
show.RegisterShows(NewShows())
}
func NewShows() *sShows {
return &sShows{}
}
const (
QueryRecommend = iota + 1 // 推荐界面
QueryVideo // 精选视频
QueryClub // 博股俱乐部
QueryChannel // homilyLink频道
)
// 实现 IShows 接口中的 GetShowsList 方法
func (s *sShows) GetShowsList(ctx context.Context, req *v1.ShowReq) (res v1.GetShowsListRes, err error) {
model := dao.Shows.Ctx(ctx)
// 根据请求类型动态调整查询条件
switch req.QueryType {
case QueryVideo:
model = model.Where("type", 2).OrderAsc("publish_time") // 视频类型正序
case QueryClub:
model = model.Where("club_id", 1).OrderDesc("publish_time") // 俱乐部倒序
case QueryChannel:
model = model.Where("publisher_name", "homilyLink").OrderDesc("publish_time")
default:
model = model.OrderDesc("publish_time") // 默认推荐倒序
}
// 查询数据并填充到结果列表
var list []*entity.Shows
if err := model.Scan(&list); err != nil {
g.Log().Errorf(ctx, "内容查询异常|类型:%d|错误:%v", req.QueryType, err)
return res, gerror.WrapCode(gcode.CodeDbOperationError, err, "数据获取失败")
}
// 将查询结果赋值给返回值
res.List = list
return res, nil
}

19
internal/model/do/ebooks.go

@ -0,0 +1,19 @@
// =================================================================================
// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT.
// =================================================================================
package do
import (
"github.com/gogf/gf/v2/frame/g"
)
// Ebooks is the golang structure of table ebooks for DAO operations like Where/Data.
type Ebooks struct {
g.Meta `orm:"table:ebooks, do:true"`
Id interface{} // 主键
Cover interface{} // 封面图URL
Title interface{} // 书名(唯一约束)
Description interface{} // 简介
ViewCount interface{} // 观看人数
}

22
internal/model/do/live_streams.go

@ -0,0 +1,22 @@
// =================================================================================
// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT.
// =================================================================================
package do
import (
"github.com/gogf/gf/v2/frame/g"
"github.com/gogf/gf/v2/os/gtime"
)
// LiveStreams is the golang structure of table live_streams for DAO operations like Where/Data.
type LiveStreams struct {
g.Meta `orm:"table:live_streams, do:true"`
Id interface{} // 主键
Cover interface{} // 直播封面URL
Title interface{} // 直播标题
Avatar interface{} // 主播头像URL
PublisherName interface{} // 主播名字
StartTime *gtime.Time // 计划开播时间
Status interface{} // 开播状态(0=未开播,1=直播中)
}

27
internal/model/do/shows.go

@ -0,0 +1,27 @@
// =================================================================================
// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT.
// =================================================================================
package do
import (
"github.com/gogf/gf/v2/frame/g"
"github.com/gogf/gf/v2/os/gtime"
)
// Shows is the golang structure of table shows for DAO operations like Where/Data.
type Shows struct {
g.Meta `orm:"table:shows, do:true"`
Id interface{} // 主键
Cover interface{} // 封面图URL
Title interface{} // 标题
PublisherName interface{} // 发布人名字
PublisherAvatar interface{} // 发布人头像URL
PublishTime *gtime.Time // 发布时间
ViewCount interface{} // 观看人数
CommentCount interface{} // 评论数
LikeCount interface{} // 点赞数
Type interface{} // 类型(1=文章,2=视频)
ClubId interface{} // 所属俱乐部(0=无,1=博古)
VideoDuration interface{} // 视频时长(秒)
}

14
internal/model/entity/ebooks.go

@ -0,0 +1,14 @@
// =================================================================================
// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT.
// =================================================================================
package entity
// Ebooks is the golang structure for table ebooks.
type Ebooks struct {
Id uint64 `json:"id" orm:"id" description:"主键"` // 主键
Cover string `json:"cover" orm:"cover" description:"封面图URL"` // 封面图URL
Title string `json:"title" orm:"title" description:"书名(唯一约束)"` // 书名(唯一约束)
Description string `json:"description" orm:"description" description:"简介"` // 简介
ViewCount uint `json:"viewCount" orm:"view_count" description:"观看人数"` // 观看人数
}

20
internal/model/entity/live_streams.go

@ -0,0 +1,20 @@
// =================================================================================
// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT.
// =================================================================================
package entity
import (
"github.com/gogf/gf/v2/os/gtime"
)
// LiveStreams is the golang structure for table live_streams.
type LiveStreams struct {
Id uint64 `json:"id" orm:"id" description:"主键"` // 主键
Cover string `json:"cover" orm:"cover" description:"直播封面URL"` // 直播封面URL
Title string `json:"title" orm:"title" description:"直播标题"` // 直播标题
Avatar string `json:"avatar" orm:"avatar" description:"主播头像URL"` // 主播头像URL
PublisherName string `json:"publisherName" orm:"publisher_name" description:"主播名字"` // 主播名字
StartTime *gtime.Time `json:"startTime" orm:"start_time" description:"计划开播时间"` // 计划开播时间
Status int `json:"status" orm:"status" description:"开播状态(0=未开播,1=直播中)"` // 开播状态(0=未开播,1=直播中)
}

25
internal/model/entity/shows.go

@ -0,0 +1,25 @@
// =================================================================================
// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT.
// =================================================================================
package entity
import (
"github.com/gogf/gf/v2/os/gtime"
)
// Shows is the golang structure for table shows.
type Shows struct {
Id uint64 `json:"id" orm:"id" description:"主键"` // 主键
Cover string `json:"cover" orm:"cover" description:"封面图URL"` // 封面图URL
Title string `json:"title" orm:"title" description:"标题"` // 标题
PublisherName string `json:"publisherName" orm:"publisher_name" description:"发布人名字"` // 发布人名字
PublisherAvatar string `json:"publisherAvatar" orm:"publisher_avatar" description:"发布人头像URL"` // 发布人头像URL
PublishTime *gtime.Time `json:"publishTime" orm:"publish_time" description:"发布时间"` // 发布时间
ViewCount uint `json:"viewCount" orm:"view_count" description:"观看人数"` // 观看人数
CommentCount uint `json:"commentCount" orm:"comment_count" description:"评论数"` // 评论数
LikeCount uint `json:"likeCount" orm:"like_count" description:"点赞数"` // 点赞数
Type int `json:"type" orm:"type" description:"类型(1=文章,2=视频)"` // 类型(1=文章,2=视频)
ClubId int `json:"clubId" orm:"club_id" description:"所属俱乐部(0=无,1=博古)"` // 所属俱乐部(0=无,1=博古)
VideoDuration uint `json:"videoDuration" orm:"video_duration" description:"视频时长(秒)"` // 视频时长(秒)
}

27
internal/service/ebooks.go

@ -0,0 +1,27 @@
package service
import (
"context"
"practice_Go/api/v1/ebooks"
)
type (
IEbooks interface {
GetEbooksList(ctx context.Context, req *ebooks.GetEbooksListReq) (res ebooks.GetEbooksListRes, err error)
}
)
var (
localBooks IEbooks
)
func Ebooks() IEbooks {
if localBooks == nil {
panic("implement not found for interface IUser, forgot register?")
}
return localBooks
}
func RegisterEbooks(i IEbooks) {
localBooks = i
}

27
internal/service/live_streams.go

@ -0,0 +1,27 @@
package service
import (
"context"
"practice_Go/api/v1/live_streams"
)
type (
ILive interface {
GetLiveList(ctx context.Context, req *live_streams.GetLiveListReq) (res live_streams.GetLiveListRes, err error)
}
)
var (
localLive ILive
)
func Live() ILive {
if localLive == nil {
panic("implement not found for interface IUser, forgot register?")
}
return localLive
}
func RegisterLives(i ILive) {
localLive = i
}

26
internal/service/shows.go

@ -0,0 +1,26 @@
package service
import (
"context"
"practice_Go/api/v1/shows"
)
type (
IShows interface {
GetShowsList(ctx context.Context, req *shows.ShowReq) (res shows.GetShowsListRes, err error)
}
)
var (
localShows IShows
)
func Shows() IShows {
if localShows == nil {
panic("implement not found for interface IShows")
}
return localShows
}
func RegisterShows(i IShows) {
localShows = i
}

6
main.go

@ -1,11 +1,11 @@
package main
import (
_ "practice_Go/internal/packed"
_ "github.com/gogf/gf/contrib/drivers/mysql/v2"
"github.com/gogf/gf/v2/os/gctx"
"practice_Go/internal/cmd"
_ "practice_Go/internal/logic"
_ "practice_Go/internal/packed"
)
func main() {

BIN
resource/public/resource/image/ebook1.png

After

Width: 119  |  Height: 169  |  Size: 40 KiB

BIN
resource/public/resource/image/ebook2.png

After

Width: 123  |  Height: 170  |  Size: 43 KiB

BIN
resource/public/resource/image/ebook3.png

After

Width: 116  |  Height: 166  |  Size: 48 KiB

BIN
resource/public/resource/image/ebook4.png

After

Width: 122  |  Height: 170  |  Size: 52 KiB

BIN
resource/public/resource/image/live/p1.png

After

Width: 228  |  Height: 106  |  Size: 36 KiB

BIN
resource/public/resource/image/shows/t1.png

After

Width: 145  |  Height: 92  |  Size: 20 KiB

BIN
resource/public/resource/image/shows/v1.png

After

Width: 191  |  Height: 121  |  Size: 64 KiB

Loading…
Cancel
Save