Browse Source

投票系统 4.29

dev
ZHANGZENGNING 3 weeks ago
parent
commit
b16d36d4dd
  1. 4
      .idea/material_theme_project_new.xml
  2. 15
      api/hello/hello.go
  3. 12
      api/hello/v1/hello.go
  4. 18
      api/v1/vote/vote.go
  5. 45
      go.mod
  6. 98
      go.sum
  7. 5
      hack/config.yaml
  8. 18
      internal/cmd/cmd.go
  9. 5
      internal/controller/hello/hello.go
  10. 15
      internal/controller/hello/hello_new.go
  11. 13
      internal/controller/hello/hello_v1_hello.go
  12. 76
      internal/controller/vote.go
  13. 27
      internal/dao/able_sign_users.go
  14. 27
      internal/dao/comment.go
  15. 27
      internal/dao/comment_zan.go
  16. 27
      internal/dao/experience_officer_sign.go
  17. 27
      internal/dao/experience_officer_vote.go
  18. 27
      internal/dao/hot_jwcode.go
  19. 27
      internal/dao/hot_subject.go
  20. 27
      internal/dao/hot_wish.go
  21. 77
      internal/dao/internal/able_sign_users.go
  22. 89
      internal/dao/internal/comment.go
  23. 79
      internal/dao/internal/comment_zan.go
  24. 89
      internal/dao/internal/experience_officer_sign.go
  25. 89
      internal/dao/internal/experience_officer_vote.go
  26. 79
      internal/dao/internal/hot_jwcode.go
  27. 79
      internal/dao/internal/hot_subject.go
  28. 79
      internal/dao/internal/hot_wish.go
  29. 79
      internal/dao/internal/lecturers.go
  30. 85
      internal/dao/internal/manager.go
  31. 89
      internal/dao/internal/member_info.go
  32. 89
      internal/dao/internal/notice.go
  33. 79
      internal/dao/internal/product.go
  34. 77
      internal/dao/internal/subject.go
  35. 81
      internal/dao/internal/support.go
  36. 79
      internal/dao/internal/transaction_lecturer_records.go
  37. 81
      internal/dao/internal/transaction_plan_files.go
  38. 79
      internal/dao/internal/vote_1_indicators.go
  39. 81
      internal/dao/internal/vote_1_records.go
  40. 81
      internal/dao/internal/vote_1_virtual_records.go
  41. 77
      internal/dao/internal/vote_indicators.go
  42. 81
      internal/dao/internal/vote_records.go
  43. 123
      internal/dao/internal/wish.go
  44. 85
      internal/dao/internal/wish_cost.go
  45. 77
      internal/dao/internal/wish_related.go
  46. 79
      internal/dao/internal/wish_state.go
  47. 83
      internal/dao/internal/wish_translate.go
  48. 79
      internal/dao/internal/wish_zan.go
  49. 27
      internal/dao/lecturers.go
  50. 27
      internal/dao/manager.go
  51. 27
      internal/dao/member_info.go
  52. 27
      internal/dao/notice.go
  53. 27
      internal/dao/product.go
  54. 27
      internal/dao/subject.go
  55. 27
      internal/dao/support.go
  56. 27
      internal/dao/transaction_lecturer_records.go
  57. 27
      internal/dao/transaction_plan_files.go
  58. 27
      internal/dao/vote_1_indicators.go
  59. 27
      internal/dao/vote_1_records.go
  60. 27
      internal/dao/vote_1_virtual_records.go
  61. 27
      internal/dao/vote_indicators.go
  62. 27
      internal/dao/vote_records.go
  63. 27
      internal/dao/wish.go
  64. 27
      internal/dao/wish_cost.go
  65. 27
      internal/dao/wish_related.go
  66. 27
      internal/dao/wish_state.go
  67. 27
      internal/dao/wish_translate.go
  68. 27
      internal/dao/wish_zan.go
  69. 124
      internal/logic/vote.go
  70. 17
      internal/model/do/able_sign_users.go
  71. 23
      internal/model/do/comment.go
  72. 18
      internal/model/do/comment_zan.go
  73. 24
      internal/model/do/experience_officer_sign.go
  74. 24
      internal/model/do/experience_officer_vote.go
  75. 18
      internal/model/do/hot_jwcode.go
  76. 18
      internal/model/do/hot_subject.go
  77. 18
      internal/model/do/hot_wish.go
  78. 18
      internal/model/do/lecturers.go
  79. 21
      internal/model/do/manager.go
  80. 23
      internal/model/do/member_info.go
  81. 23
      internal/model/do/notice.go
  82. 18
      internal/model/do/product.go
  83. 17
      internal/model/do/subject.go
  84. 19
      internal/model/do/support.go
  85. 18
      internal/model/do/transaction_lecturer_records.go
  86. 19
      internal/model/do/transaction_plan_files.go
  87. 18
      internal/model/do/vote_1_indicators.go
  88. 20
      internal/model/do/vote_1_records.go
  89. 20
      internal/model/do/vote_1_virtual_records.go
  90. 17
      internal/model/do/vote_indicators.go
  91. 20
      internal/model/do/vote_records.go
  92. 41
      internal/model/do/wish.go
  93. 21
      internal/model/do/wish_cost.go
  94. 17
      internal/model/do/wish_related.go
  95. 18
      internal/model/do/wish_state.go
  96. 20
      internal/model/do/wish_translate.go
  97. 18
      internal/model/do/wish_zan.go
  98. 80
      internal/model/dto/Result.go
  99. 13
      internal/model/dto/activityDto.go
  100. 12
      internal/model/dto/voteDto.go

4
.idea/material_theme_project_new.xml

@ -3,7 +3,9 @@
<component name="MaterialThemeProjectNewConfig">
<option name="metadata">
<MTProjectMetadataState>
<option name="userId" value="-7a328c97:19665a4d1f8:-7e83" />
<option name="migrated" value="true" />
<option name="pristineConfig" value="false" />
<option name="userId" value="-7a63e17c:19622cf3528:-7ffe" />
</MTProjectMetadataState>
</option>
</component>

15
api/hello/hello.go

@ -1,15 +0,0 @@
// =================================================================================
// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT.
// =================================================================================
package hello
import (
"context"
"VoteManage_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"`
}

18
api/v1/vote/vote.go

@ -0,0 +1,18 @@
package vote
// 条件筛选
type GetVoteDetailListReq struct {
PageNo int `v:"required" json:"pageNo" dc:"页码" d:"1"`
PageSize int `v:"required" json:"pageSize" dc:"页面大小" d:"10"`
ActivityId int `v:"required" json:"activityId" dc:"活动id"`
Jwcode string `json:"jwcode" dc:"查询条件中的精网号"`
Dept string `json:"dept" dc:"查询条件中的部门"`
StartDate string `json:"startDate" dc:"开始时间"`
EndDate string `json:"endDate" dc:"结束时间"`
//StartTime *gtime.Time `json:"startTime" dc:"开始时间"`
// EndTime *gtime.Time `json:"endTime" dc:"结束时间"`
}
type GetActivityListReq struct {
PageNo int `v:"required" json:"pageNo" dc:"页码" d:"1"`
PageSize int `v:"required" json:"pageSize" dc:"页面大小" d:"24"`
}

45
go.mod

@ -1,28 +1,45 @@
module VoteManage_Go
go 1.18
go 1.22
require github.com/gogf/gf/v2 v2.7.1
toolchain go1.23.8
require (
github.com/BurntSushi/toml v1.3.2 // indirect
github.com/gogf/gf/contrib/drivers/mysql/v2 v2.9.0
github.com/gogf/gf/v2 v2.9.0
github.com/xuri/excelize/v2 v2.9.0
)
require (
github.com/BurntSushi/toml v1.4.0 // indirect
github.com/clbanning/mxj/v2 v2.7.0 // indirect
github.com/fatih/color v1.16.0 // indirect
github.com/emirpasic/gods v1.18.1 // indirect
github.com/fatih/color v1.18.0 // indirect
github.com/fsnotify/fsnotify v1.7.0 // indirect
github.com/go-logr/logr v1.2.3 // indirect
github.com/go-logr/logr v1.4.2 // indirect
github.com/go-logr/stdr v1.2.2 // indirect
github.com/gorilla/websocket v1.5.1 // indirect
github.com/go-sql-driver/mysql v1.7.1 // indirect
github.com/google/uuid v1.6.0 // indirect
github.com/gorilla/websocket v1.5.3 // indirect
github.com/grokify/html-strip-tags-go v0.1.0 // indirect
github.com/magiconair/properties v1.8.7 // indirect
github.com/magiconair/properties v1.8.9 // indirect
github.com/mattn/go-colorable v0.1.13 // indirect
github.com/mattn/go-isatty v0.0.20 // indirect
github.com/mattn/go-runewidth v0.0.9 // indirect
github.com/mattn/go-runewidth v0.0.16 // indirect
github.com/mohae/deepcopy v0.0.0-20170929034955-c48cc78d4826 // indirect
github.com/olekukonko/tablewriter v0.0.5 // indirect
go.opentelemetry.io/otel v1.14.0 // indirect
go.opentelemetry.io/otel/sdk v1.14.0 // indirect
go.opentelemetry.io/otel/trace v1.14.0 // indirect
golang.org/x/net v0.24.0 // indirect
golang.org/x/sys v0.19.0 // indirect
golang.org/x/text v0.14.0 // 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
github.com/xuri/efp v0.0.0-20240408161823-9ad904a10d6d // indirect
github.com/xuri/nfp v0.0.0-20240318013403-ab9948c2c4a7 // indirect
go.opentelemetry.io/otel v1.32.0 // indirect
go.opentelemetry.io/otel/metric v1.32.0 // indirect
go.opentelemetry.io/otel/sdk v1.32.0 // indirect
go.opentelemetry.io/otel/trace v1.32.0 // indirect
golang.org/x/crypto v0.30.0 // indirect
golang.org/x/net v0.32.0 // indirect
golang.org/x/sys v0.28.0 // indirect
golang.org/x/text v0.21.0 // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
)

98
go.sum

@ -1,52 +1,94 @@
github.com/BurntSushi/toml v1.3.2 h1:o7IhLm0Msx3BaB+n3Ag7L8EVlByGnpq14C4YWiu/gL8=
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/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.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
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/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/emirpasic/gods v1.18.1 h1:FXtiHYKDGKCW2KzwZKx0iC0PQmdlorYgdFG9jPXJ1Bc=
github.com/emirpasic/gods v1.18.1/go.mod h1:8tpGGwCnJ5H4r6BWwaV6OrWmMoPhUl5jm/FMNAnJvWQ=
github.com/fatih/color v1.18.0 h1:S8gINlzdQ840/4pfAwic/ZE0djQEH3wM94VfqLTZcOM=
github.com/fatih/color v1.18.0/go.mod h1:4FelSpRwEGDpQ12mAdzqdOukCy4u8WUtOY6lkT/6HfU=
github.com/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=
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/logr v1.4.2 h1:6pFjapn8bFcIbiKo3XT4j/BhANplGihG6tvd+8rYgrY=
github.com/go-logr/logr v1.4.2/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY=
github.com/go-logr/stdr v1.2.2 h1:hSWxHoqTgW2S2qGc0LTAI563KZ5YKYRhT3MFKZMbjag=
github.com/go-logr/stdr v1.2.2/go.mod h1:mMo/vtBO5dYbehREoey6XUKy/eSumjCCveDpRre4VKE=
github.com/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.9 h1:O2Tfq5qg4qc4AmwVlvv0oLiVAGB7enBSJ2x2DqQFi38=
github.com/gorilla/websocket v1.5.1 h1:gmztn0JnHVt9JZquRuzLw3g4wouNVzKL15iLr/zn/QY=
github.com/gorilla/websocket v1.5.1/go.mod h1:x3kM2JMyaluk02fnUJpQuwD2dCS5NDG2ZHL0uE0tcaY=
github.com/go-sql-driver/mysql v1.7.1 h1:lUIinVbN1DY0xBg0eMOzmmtGoHwWBbvnWubQUrtU8EI=
github.com/go-sql-driver/mysql v1.7.1/go.mod h1:OXbVy3sEdcQ2Doequ6Z5BW6fXNQTmx+9S1MCJN5yJMI=
github.com/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/v2 v2.9.0 h1:semN5Q5qGjDQEv4620VzxcJzJlSD07gmyJ9Sy9zfbHk=
github.com/gogf/gf/v2 v2.9.0/go.mod h1:sWGQw+pLILtuHmbOxoe0D+0DdaXxbleT57axOLH2vKI=
github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI=
github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY=
github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0=
github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
github.com/gorilla/websocket v1.5.3 h1:saDtZ6Pbx/0u+bgYQ3q96pZgCzfhKXGPqt7kZ72aNNg=
github.com/gorilla/websocket v1.5.3/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE=
github.com/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.7 h1:IeQXZAiQcpL9mgcAe1Nu6cX9LLw6ExEHKjN0VQdvPDY=
github.com/magiconair/properties v1.8.7/go.mod h1:Dhd985XPs7jluiymwWYZ0G4Z61jb3vdS329zhj2hYo0=
github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE=
github.com/kr/pretty v0.3.1/go.mod h1:hoEshYVHaxMs3cyo3Yncou5ZscifuDolrwPKZanG3xk=
github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY=
github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE=
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/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 h1:Lm995f3rfxdpd6TSmuVCHVb/QhupuXlYr8sCI/QdE+0=
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/mohae/deepcopy v0.0.0-20170929034955-c48cc78d4826 h1:RWengNIwukTxcDr9M+97sNutRR1RKhG96O6jWumTTnw=
github.com/mohae/deepcopy v0.0.0-20170929034955-c48cc78d4826/go.mod h1:TaXosZuwdSHYgviHp1DAtfrULt5eUgsSMsZf+YrPgl8=
github.com/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/stretchr/testify v1.8.2 h1:+h33VjcLVPDHtOdpUCuF+7gSuG3yGIftsP1YvFihtJ8=
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.14.0 h1:PDCppFRDq8A1jL9v6KMI6dYesaq+DFcDZvjsoGvxGzY=
go.opentelemetry.io/otel/sdk v1.14.0/go.mod h1:bwIC5TjrNG6QDCHNWvW4HLHtUQ4I+VQDsnjhvyZCALM=
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/net v0.24.0 h1:1PcaxkF854Fu3+lvBIx5SYn9wRlBzzcnHZSiaFFAb0w=
golang.org/x/net v0.24.0/go.mod h1:2Q7sJY5mzlzWjKtYUEXSlBWCdyaioyXzRB2RtU8KVE8=
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
github.com/richardlehane/mscfb v1.0.4 h1:WULscsljNPConisD5hR0+OyZjwK46Pfyr6mPu5ZawpM=
github.com/richardlehane/mscfb v1.0.4/go.mod h1:YzVpcZg9czvAuhk9T+a3avCpcFPMUWm7gK3DypaEsUk=
github.com/richardlehane/msoleps v1.0.1/go.mod h1:BWev5JBpU9Ko2WAgmZEuiz4/u3ZYTKbjLycmwiWUfWg=
github.com/richardlehane/msoleps v1.0.4 h1:WuESlvhX3gH2IHcd8UqyCuFY5yiq/GR/yqaSM/9/g00=
github.com/richardlehane/msoleps v1.0.4/go.mod h1:BWev5JBpU9Ko2WAgmZEuiz4/u3ZYTKbjLycmwiWUfWg=
github.com/rivo/uniseg v0.2.0/go.mod h1:J6wj4VEh+S6ZtnVlnTBMWIodfgj8LQOQFoIToxlJtxc=
github.com/rivo/uniseg v0.4.7 h1:WUdvkW8uEhrYfLC4ZzdpI2ztxP1I582+49Oc5Mq64VQ=
github.com/rivo/uniseg v0.4.7/go.mod h1:FN3SvrM+Zdj16jyLfmOkMNblXMcoc8DfTHruCPUcx88=
github.com/rogpeppe/go-internal v1.13.1 h1:KvO1DLK/DRN07sQ1LQKScxyZJuNnedQ5/wKSR38lUII=
github.com/rogpeppe/go-internal v1.13.1/go.mod h1:uMEvuHeurkdAXX61udpOXGD/AzZDWNMNyH2VO9fmH0o=
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/xuri/efp v0.0.0-20240408161823-9ad904a10d6d h1:llb0neMWDQe87IzJLS4Ci7psK/lVsjIS2otl+1WyRyY=
github.com/xuri/efp v0.0.0-20240408161823-9ad904a10d6d/go.mod h1:ybY/Jr0T0GTCnYjKqmdwxyxn2BQf2RcQIIvex5QldPI=
github.com/xuri/excelize/v2 v2.9.0 h1:1tgOaEq92IOEumR1/JfYS/eR0KHOCsRv/rYXXh6YJQE=
github.com/xuri/excelize/v2 v2.9.0/go.mod h1:uqey4QBZ9gdMeWApPLdhm9x+9o2lq4iVmjiLfBS5hdE=
github.com/xuri/nfp v0.0.0-20240318013403-ab9948c2c4a7 h1:hPVCafDV85blFTabnqKgNhDCkJX25eik94Si9cTER4A=
github.com/xuri/nfp v0.0.0-20240318013403-ab9948c2c4a7/go.mod h1:WwHg+CVyzlv/TX9xqBFXEZAuxOPxn2k1GNHwG41IIUQ=
go.opentelemetry.io/otel v1.32.0 h1:WnBN+Xjcteh0zdk01SVqV55d/m62NJLJdIyb4y/WO5U=
go.opentelemetry.io/otel v1.32.0/go.mod h1:00DCVSB0RQcnzlwyTfqtxSm+DRr9hpYrHjNGiBHVQIg=
go.opentelemetry.io/otel/metric v1.32.0 h1:xV2umtmNcThh2/a/aCP+h64Xx5wsj8qqnkYZktzNa0M=
go.opentelemetry.io/otel/metric v1.32.0/go.mod h1:jH7CIbbK6SH2V2wE16W05BHCtIDzauciCRLoc/SyMv8=
go.opentelemetry.io/otel/sdk v1.32.0 h1:RNxepc9vK59A8XsgZQouW8ue8Gkb4jpWtJm9ge5lEG4=
go.opentelemetry.io/otel/sdk v1.32.0/go.mod h1:LqgegDBjKMmb2GC6/PrTnteJG39I8/vJCAP9LlJXEjU=
go.opentelemetry.io/otel/trace v1.32.0 h1:WIC9mYrXf8TmY/EXuULKc8hR17vE+Hjv2cssQDe03fM=
go.opentelemetry.io/otel/trace v1.32.0/go.mod h1:+i4rkvCraA+tG6AzwloGaCtkx53Fa+L+V8e9a7YvhT8=
golang.org/x/crypto v0.30.0 h1:RwoQn3GkWiMkzlX562cLB7OxWvjH1L8xutO2WoJcRoY=
golang.org/x/crypto v0.30.0/go.mod h1:kDsLvtWBEx7MV9tJOj9bnXsPbxwJQ6csT/x4KIN4Ssk=
golang.org/x/image v0.18.0 h1:jGzIakQa/ZXI1I0Fxvaa9W7yP25TqT6cHIHn+6CqvSQ=
golang.org/x/image v0.18.0/go.mod h1:4yyo5vMFQjVjUcVk4jEQcU9MGy/rulF5WvUILseCM2E=
golang.org/x/net v0.32.0 h1:ZqPmj8Kzc+Y6e0+skZsuACbx+wzMgo5MQsJh9Qd6aYI=
golang.org/x/net v0.32.0/go.mod h1:CwU0IoeOlnQQWJ6ioyFrfRuomB8GKF6KbYXZVyeXNfs=
golang.org/x/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/text v0.14.0 h1:ScX5w1eTa3QqT8oi6+ziP7dTV1S2+ALU0bI+0zXKWiQ=
golang.org/x/text v0.14.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU=
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405 h1:yhCVgyC4o1eVCa2tZl7eS0r+SDo693bJlVdllGtEeKM=
golang.org/x/sys v0.28.0 h1:Fksou7UEQUWlKvIdsqzJmUmCX3cZuD2+P3XyyzwMhlA=
golang.org/x/sys v0.28.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
golang.org/x/text v0.21.0 h1:zyQAAkrwaneQ066sspRyJaG9VNi/YJ1NfzcGB3hZ/qo=
golang.org/x/text v0.21.0/go.mod h1:4IBbMaMmOPCJ8SecivzSH54+73PCFmPWxNTLm+vZkEQ=
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk=
gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q=
gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA=
gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=

5
hack/config.yaml

@ -6,7 +6,10 @@ gfcli:
dao:
- link: "mysql:shequ:7bMDPChJSdLMAwNR@tcp(121.89.234.155:3306)/shequ"
descriptionTag: true
tables: "member_info,vote_records"
- link: "mysql:live:p4jMAMShNM8HTrbX@tcp(39.101.133.168:3306)/live"
descriptionTag: true
tables: "float_window"
docker:
build: "-a amd64 -s linux -p temp -ew"
tagPrefixes:

18
internal/cmd/cmd.go

@ -1,15 +1,19 @@
package cmd
import (
"VoteManage_Go/internal/controller"
"context"
"github.com/gogf/gf/v2/frame/g"
"github.com/gogf/gf/v2/net/ghttp"
"github.com/gogf/gf/v2/os/gcmd"
"VoteManage_Go/internal/controller/hello"
)
func MiddlewareCORS(r *ghttp.Request) {
r.Response.CORSDefault()
r.Middleware.Next()
}
var (
Main = gcmd.Command{
Name: "main",
@ -17,11 +21,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("/vote", controller.Vote().GetVoteDetailList)
group.POST("/export", controller.Vote().ExportVote)
group.POST("/activity", controller.Vote().GetActivityList)
})
s.Run()
return nil

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 (
"VoteManage_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"
"VoteManage_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
}

76
internal/controller/vote.go

@ -0,0 +1,76 @@
package controller
import (
"VoteManage_Go/api/v1/vote"
"VoteManage_Go/internal/model/dto"
"VoteManage_Go/internal/service"
"github.com/gogf/gf/v2/frame/g"
"github.com/gogf/gf/v2/net/ghttp"
)
type cVote struct{}
func Vote() *cVote {
return &cVote{}
}
func (c cVote) GetVoteDetailList(r *ghttp.Request) {
var req *vote.GetVoteDetailListReq
if err := r.Parse(&req); err != nil {
r.Response.WriteJsonExit(dto.Result{
Code: 400,
Message: err.Error(),
})
}
res, total, err := service.Vote().GetVoteByCondition(r.Context(), req)
if err != nil {
r.Response.WriteJsonExit(dto.Result{
Code: 400,
Message: err.Error(),
})
}
r.Response.WriteJsonExit(dto.Result{
Code: 200,
Message: "success",
Data: g.Map{
"list": res,
"total": total,
},
})
}
func (c *cVote) ExportVote(r *ghttp.Request) {
var req *vote.GetVoteDetailListReq
// 解析请求参数
if err := r.Parse(&req); err != nil {
r.Response.WriteJsonExit(dto.Error(err.Error()))
}
//查询数据,创建excel文件,设置表头,写入数据,设置文件名,保存到缓冲区并返回,设置响应头,指定内容类型为excel文件,指定文件名为fileName,将buffer中的内容写入响应
service.Vote().ExportVote(r, req)
}
func (c *cVote) GetActivityList(r *ghttp.Request) {
var req *vote.GetActivityListReq
if err := r.Parse(&req); err != nil {
r.Response.WriteJsonExit(dto.Result{
Code: 400,
Message: err.Error(),
})
}
res, total, err := service.Vote().GetActivityList(r.Context(), req)
if err != nil {
r.Response.WriteJsonExit(dto.Result{
Code: 400,
Message: err.Error(),
})
}
r.Response.WriteJsonExit(dto.Result{
Code: 200,
Message: "success",
Data: g.Map{
"list": res,
"total": total,
},
})
}

27
internal/dao/able_sign_users.go

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

27
internal/dao/comment.go

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

27
internal/dao/comment_zan.go

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

27
internal/dao/experience_officer_sign.go

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

27
internal/dao/experience_officer_vote.go

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

27
internal/dao/hot_jwcode.go

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

27
internal/dao/hot_subject.go

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

27
internal/dao/hot_wish.go

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

77
internal/dao/internal/able_sign_users.go

@ -1,77 +0,0 @@
// ==========================================================================
// 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"
)
// AbleSignUsersDao is the data access object for table able_sign_users.
type AbleSignUsersDao 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 AbleSignUsersColumns // columns contains all the column names of Table for convenient usage.
}
// AbleSignUsersColumns defines and stores column names for table able_sign_users.
type AbleSignUsersColumns struct {
Id string //
Jwcode string //
Type string // 1 博股会员 2 信息费5年 3 购买三个指标
}
// ableSignUsersColumns holds the columns for table able_sign_users.
var ableSignUsersColumns = AbleSignUsersColumns{
Id: "id",
Jwcode: "jwcode",
Type: "type",
}
// NewAbleSignUsersDao creates and returns a new DAO object for table data access.
func NewAbleSignUsersDao() *AbleSignUsersDao {
return &AbleSignUsersDao{
group: "default",
table: "able_sign_users",
columns: ableSignUsersColumns,
}
}
// DB retrieves and returns the underlying raw database management object of current DAO.
func (dao *AbleSignUsersDao) DB() gdb.DB {
return g.DB(dao.group)
}
// Table returns the table name of current dao.
func (dao *AbleSignUsersDao) Table() string {
return dao.table
}
// Columns returns all column names of current dao.
func (dao *AbleSignUsersDao) Columns() AbleSignUsersColumns {
return dao.columns
}
// Group returns the configuration group name of database of current dao.
func (dao *AbleSignUsersDao) Group() string {
return dao.group
}
// Ctx creates and returns the Model for current DAO, It automatically sets the context for current operation.
func (dao *AbleSignUsersDao) 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 *AbleSignUsersDao) Transaction(ctx context.Context, f func(ctx context.Context, tx gdb.TX) error) (err error) {
return dao.Ctx(ctx).Transaction(ctx, f)
}

89
internal/dao/internal/comment.go

@ -1,89 +0,0 @@
// ==========================================================================
// 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"
)
// CommentDao is the data access object for table comment.
type CommentDao 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 CommentColumns // columns contains all the column names of Table for convenient usage.
}
// CommentColumns defines and stores column names for table comment.
type CommentColumns struct {
Id string //
WishId string // 心愿ID
Jwcode string // 评论人code
Content string // 评论内容
Image string // 图片,多张图片用json格式保存
ReplyNum string // 回复数
Pid string // 父级评论ID
Delete string // 0正常1删除
CreatedAt string // 评论时间
}
// commentColumns holds the columns for table comment.
var commentColumns = CommentColumns{
Id: "id",
WishId: "wish_id",
Jwcode: "jwcode",
Content: "content",
Image: "image",
ReplyNum: "reply_num",
Pid: "pid",
Delete: "delete",
CreatedAt: "created_at",
}
// NewCommentDao creates and returns a new DAO object for table data access.
func NewCommentDao() *CommentDao {
return &CommentDao{
group: "default",
table: "comment",
columns: commentColumns,
}
}
// DB retrieves and returns the underlying raw database management object of current DAO.
func (dao *CommentDao) DB() gdb.DB {
return g.DB(dao.group)
}
// Table returns the table name of current dao.
func (dao *CommentDao) Table() string {
return dao.table
}
// Columns returns all column names of current dao.
func (dao *CommentDao) Columns() CommentColumns {
return dao.columns
}
// Group returns the configuration group name of database of current dao.
func (dao *CommentDao) Group() string {
return dao.group
}
// Ctx creates and returns the Model for current DAO, It automatically sets the context for current operation.
func (dao *CommentDao) 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 *CommentDao) Transaction(ctx context.Context, f func(ctx context.Context, tx gdb.TX) error) (err error) {
return dao.Ctx(ctx).Transaction(ctx, f)
}

79
internal/dao/internal/comment_zan.go

@ -1,79 +0,0 @@
// ==========================================================================
// 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"
)
// CommentZanDao is the data access object for table comment_zan.
type CommentZanDao 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 CommentZanColumns // columns contains all the column names of Table for convenient usage.
}
// CommentZanColumns defines and stores column names for table comment_zan.
type CommentZanColumns struct {
Id string //
Jwcode string //
CommentId string //
CreatedAt string //
}
// commentZanColumns holds the columns for table comment_zan.
var commentZanColumns = CommentZanColumns{
Id: "id",
Jwcode: "jwcode",
CommentId: "comment_id",
CreatedAt: "created_at",
}
// NewCommentZanDao creates and returns a new DAO object for table data access.
func NewCommentZanDao() *CommentZanDao {
return &CommentZanDao{
group: "default",
table: "comment_zan",
columns: commentZanColumns,
}
}
// DB retrieves and returns the underlying raw database management object of current DAO.
func (dao *CommentZanDao) DB() gdb.DB {
return g.DB(dao.group)
}
// Table returns the table name of current dao.
func (dao *CommentZanDao) Table() string {
return dao.table
}
// Columns returns all column names of current dao.
func (dao *CommentZanDao) Columns() CommentZanColumns {
return dao.columns
}
// Group returns the configuration group name of database of current dao.
func (dao *CommentZanDao) Group() string {
return dao.group
}
// Ctx creates and returns the Model for current DAO, It automatically sets the context for current operation.
func (dao *CommentZanDao) 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 *CommentZanDao) Transaction(ctx context.Context, f func(ctx context.Context, tx gdb.TX) error) (err error) {
return dao.Ctx(ctx).Transaction(ctx, f)
}

89
internal/dao/internal/experience_officer_sign.go

@ -1,89 +0,0 @@
// ==========================================================================
// 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"
)
// ExperienceOfficerSignDao is the data access object for table experience_officer_sign.
type ExperienceOfficerSignDao 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 ExperienceOfficerSignColumns // columns contains all the column names of Table for convenient usage.
}
// ExperienceOfficerSignColumns defines and stores column names for table experience_officer_sign.
type ExperienceOfficerSignColumns struct {
Id string //
Jwcode string //
Time string //
State string // 1 报名用户
Location string // 1 新加坡 2 马来 3 香港 4 美股 5 A股
Identity string // 1 博股会员 2 金卡会员
ReservationCode string //
Seat string //
Date string //
}
// experienceOfficerSignColumns holds the columns for table experience_officer_sign.
var experienceOfficerSignColumns = ExperienceOfficerSignColumns{
Id: "id",
Jwcode: "jwcode",
Time: "time",
State: "state",
Location: "location",
Identity: "identity",
ReservationCode: "reservation_code",
Seat: "seat",
Date: "date",
}
// NewExperienceOfficerSignDao creates and returns a new DAO object for table data access.
func NewExperienceOfficerSignDao() *ExperienceOfficerSignDao {
return &ExperienceOfficerSignDao{
group: "default",
table: "experience_officer_sign",
columns: experienceOfficerSignColumns,
}
}
// DB retrieves and returns the underlying raw database management object of current DAO.
func (dao *ExperienceOfficerSignDao) DB() gdb.DB {
return g.DB(dao.group)
}
// Table returns the table name of current dao.
func (dao *ExperienceOfficerSignDao) Table() string {
return dao.table
}
// Columns returns all column names of current dao.
func (dao *ExperienceOfficerSignDao) Columns() ExperienceOfficerSignColumns {
return dao.columns
}
// Group returns the configuration group name of database of current dao.
func (dao *ExperienceOfficerSignDao) Group() string {
return dao.group
}
// Ctx creates and returns the Model for current DAO, It automatically sets the context for current operation.
func (dao *ExperienceOfficerSignDao) 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 *ExperienceOfficerSignDao) Transaction(ctx context.Context, f func(ctx context.Context, tx gdb.TX) error) (err error) {
return dao.Ctx(ctx).Transaction(ctx, f)
}

89
internal/dao/internal/experience_officer_vote.go

@ -1,89 +0,0 @@
// ==========================================================================
// 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"
)
// ExperienceOfficerVoteDao is the data access object for table experience_officer_vote.
type ExperienceOfficerVoteDao 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 ExperienceOfficerVoteColumns // columns contains all the column names of Table for convenient usage.
}
// ExperienceOfficerVoteColumns defines and stores column names for table experience_officer_vote.
type ExperienceOfficerVoteColumns struct {
Id string //
Jwcode string //
Time string //
State string // 1 报名用户
Location string // 1 新加坡 2 马来 3 香港 4 美股 5 A股
Identity string // 1 博股会员 2 金卡会员
ReservationCode string //
Seat string //
Date string //
}
// experienceOfficerVoteColumns holds the columns for table experience_officer_vote.
var experienceOfficerVoteColumns = ExperienceOfficerVoteColumns{
Id: "id",
Jwcode: "jwcode",
Time: "time",
State: "state",
Location: "location",
Identity: "identity",
ReservationCode: "reservation_code",
Seat: "seat",
Date: "date",
}
// NewExperienceOfficerVoteDao creates and returns a new DAO object for table data access.
func NewExperienceOfficerVoteDao() *ExperienceOfficerVoteDao {
return &ExperienceOfficerVoteDao{
group: "default",
table: "experience_officer_vote",
columns: experienceOfficerVoteColumns,
}
}
// DB retrieves and returns the underlying raw database management object of current DAO.
func (dao *ExperienceOfficerVoteDao) DB() gdb.DB {
return g.DB(dao.group)
}
// Table returns the table name of current dao.
func (dao *ExperienceOfficerVoteDao) Table() string {
return dao.table
}
// Columns returns all column names of current dao.
func (dao *ExperienceOfficerVoteDao) Columns() ExperienceOfficerVoteColumns {
return dao.columns
}
// Group returns the configuration group name of database of current dao.
func (dao *ExperienceOfficerVoteDao) Group() string {
return dao.group
}
// Ctx creates and returns the Model for current DAO, It automatically sets the context for current operation.
func (dao *ExperienceOfficerVoteDao) 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 *ExperienceOfficerVoteDao) Transaction(ctx context.Context, f func(ctx context.Context, tx gdb.TX) error) (err error) {
return dao.Ctx(ctx).Transaction(ctx, f)
}

79
internal/dao/internal/hot_jwcode.go

@ -1,79 +0,0 @@
// ==========================================================================
// 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"
)
// HotJwcodeDao is the data access object for table hot_jwcode.
type HotJwcodeDao 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 HotJwcodeColumns // columns contains all the column names of Table for convenient usage.
}
// HotJwcodeColumns defines and stores column names for table hot_jwcode.
type HotJwcodeColumns struct {
Id string //
Jwcode string // 精网号
Hot string // 热度值
UpdatedAt string //
}
// hotJwcodeColumns holds the columns for table hot_jwcode.
var hotJwcodeColumns = HotJwcodeColumns{
Id: "id",
Jwcode: "jwcode",
Hot: "hot",
UpdatedAt: "updated_at",
}
// NewHotJwcodeDao creates and returns a new DAO object for table data access.
func NewHotJwcodeDao() *HotJwcodeDao {
return &HotJwcodeDao{
group: "default",
table: "hot_jwcode",
columns: hotJwcodeColumns,
}
}
// DB retrieves and returns the underlying raw database management object of current DAO.
func (dao *HotJwcodeDao) DB() gdb.DB {
return g.DB(dao.group)
}
// Table returns the table name of current dao.
func (dao *HotJwcodeDao) Table() string {
return dao.table
}
// Columns returns all column names of current dao.
func (dao *HotJwcodeDao) Columns() HotJwcodeColumns {
return dao.columns
}
// Group returns the configuration group name of database of current dao.
func (dao *HotJwcodeDao) Group() string {
return dao.group
}
// Ctx creates and returns the Model for current DAO, It automatically sets the context for current operation.
func (dao *HotJwcodeDao) 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 *HotJwcodeDao) Transaction(ctx context.Context, f func(ctx context.Context, tx gdb.TX) error) (err error) {
return dao.Ctx(ctx).Transaction(ctx, f)
}

79
internal/dao/internal/hot_subject.go

@ -1,79 +0,0 @@
// ==========================================================================
// 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"
)
// HotSubjectDao is the data access object for table hot_subject.
type HotSubjectDao 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 HotSubjectColumns // columns contains all the column names of Table for convenient usage.
}
// HotSubjectColumns defines and stores column names for table hot_subject.
type HotSubjectColumns struct {
Id string //
SubjectId string // 话题ID
Hot string // 热度值
UpdatedAt string //
}
// hotSubjectColumns holds the columns for table hot_subject.
var hotSubjectColumns = HotSubjectColumns{
Id: "id",
SubjectId: "subject_id",
Hot: "hot",
UpdatedAt: "updated_at",
}
// NewHotSubjectDao creates and returns a new DAO object for table data access.
func NewHotSubjectDao() *HotSubjectDao {
return &HotSubjectDao{
group: "default",
table: "hot_subject",
columns: hotSubjectColumns,
}
}
// DB retrieves and returns the underlying raw database management object of current DAO.
func (dao *HotSubjectDao) DB() gdb.DB {
return g.DB(dao.group)
}
// Table returns the table name of current dao.
func (dao *HotSubjectDao) Table() string {
return dao.table
}
// Columns returns all column names of current dao.
func (dao *HotSubjectDao) Columns() HotSubjectColumns {
return dao.columns
}
// Group returns the configuration group name of database of current dao.
func (dao *HotSubjectDao) Group() string {
return dao.group
}
// Ctx creates and returns the Model for current DAO, It automatically sets the context for current operation.
func (dao *HotSubjectDao) 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 *HotSubjectDao) Transaction(ctx context.Context, f func(ctx context.Context, tx gdb.TX) error) (err error) {
return dao.Ctx(ctx).Transaction(ctx, f)
}

79
internal/dao/internal/hot_wish.go

@ -1,79 +0,0 @@
// ==========================================================================
// 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"
)
// HotWishDao is the data access object for table hot_wish.
type HotWishDao 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 HotWishColumns // columns contains all the column names of Table for convenient usage.
}
// HotWishColumns defines and stores column names for table hot_wish.
type HotWishColumns struct {
Id string //
WishId string // 心愿ID
Hot string // 热度值
UpdatedAt string //
}
// hotWishColumns holds the columns for table hot_wish.
var hotWishColumns = HotWishColumns{
Id: "id",
WishId: "wish_id",
Hot: "hot",
UpdatedAt: "updated_at",
}
// NewHotWishDao creates and returns a new DAO object for table data access.
func NewHotWishDao() *HotWishDao {
return &HotWishDao{
group: "default",
table: "hot_wish",
columns: hotWishColumns,
}
}
// DB retrieves and returns the underlying raw database management object of current DAO.
func (dao *HotWishDao) DB() gdb.DB {
return g.DB(dao.group)
}
// Table returns the table name of current dao.
func (dao *HotWishDao) Table() string {
return dao.table
}
// Columns returns all column names of current dao.
func (dao *HotWishDao) Columns() HotWishColumns {
return dao.columns
}
// Group returns the configuration group name of database of current dao.
func (dao *HotWishDao) Group() string {
return dao.group
}
// Ctx creates and returns the Model for current DAO, It automatically sets the context for current operation.
func (dao *HotWishDao) 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 *HotWishDao) Transaction(ctx context.Context, f func(ctx context.Context, tx gdb.TX) error) (err error) {
return dao.Ctx(ctx).Transaction(ctx, f)
}

79
internal/dao/internal/lecturers.go

@ -1,79 +0,0 @@
// ==========================================================================
// 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"
)
// LecturersDao is the data access object for table lecturers.
type LecturersDao 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 LecturersColumns // columns contains all the column names of Table for convenient usage.
}
// LecturersColumns defines and stores column names for table lecturers.
type LecturersColumns struct {
Id string //
Jwcode string //
Avatar string //
Name string //
}
// lecturersColumns holds the columns for table lecturers.
var lecturersColumns = LecturersColumns{
Id: "id",
Jwcode: "jwcode",
Avatar: "avatar",
Name: "name",
}
// NewLecturersDao creates and returns a new DAO object for table data access.
func NewLecturersDao() *LecturersDao {
return &LecturersDao{
group: "default",
table: "lecturers",
columns: lecturersColumns,
}
}
// DB retrieves and returns the underlying raw database management object of current DAO.
func (dao *LecturersDao) DB() gdb.DB {
return g.DB(dao.group)
}
// Table returns the table name of current dao.
func (dao *LecturersDao) Table() string {
return dao.table
}
// Columns returns all column names of current dao.
func (dao *LecturersDao) Columns() LecturersColumns {
return dao.columns
}
// Group returns the configuration group name of database of current dao.
func (dao *LecturersDao) Group() string {
return dao.group
}
// Ctx creates and returns the Model for current DAO, It automatically sets the context for current operation.
func (dao *LecturersDao) 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 *LecturersDao) 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/manager.go

@ -1,85 +0,0 @@
// ==========================================================================
// 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"
)
// ManagerDao is the data access object for table manager.
type ManagerDao 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 ManagerColumns // columns contains all the column names of Table for convenient usage.
}
// ManagerColumns defines and stores column names for table manager.
type ManagerColumns struct {
Id string //
Jwcode string //
Name string //
Type string // 产品ID
LanguageKey string //
Enabled string //
CreatedAt string //
}
// managerColumns holds the columns for table manager.
var managerColumns = ManagerColumns{
Id: "id",
Jwcode: "jwcode",
Name: "name",
Type: "type",
LanguageKey: "language_key",
Enabled: "enabled",
CreatedAt: "created_at",
}
// NewManagerDao creates and returns a new DAO object for table data access.
func NewManagerDao() *ManagerDao {
return &ManagerDao{
group: "default",
table: "manager",
columns: managerColumns,
}
}
// DB retrieves and returns the underlying raw database management object of current DAO.
func (dao *ManagerDao) DB() gdb.DB {
return g.DB(dao.group)
}
// Table returns the table name of current dao.
func (dao *ManagerDao) Table() string {
return dao.table
}
// Columns returns all column names of current dao.
func (dao *ManagerDao) Columns() ManagerColumns {
return dao.columns
}
// Group returns the configuration group name of database of current dao.
func (dao *ManagerDao) Group() string {
return dao.group
}
// Ctx creates and returns the Model for current DAO, It automatically sets the context for current operation.
func (dao *ManagerDao) 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 *ManagerDao) Transaction(ctx context.Context, f func(ctx context.Context, tx gdb.TX) error) (err error) {
return dao.Ctx(ctx).Transaction(ctx, f)
}

89
internal/dao/internal/member_info.go

@ -1,89 +0,0 @@
// ==========================================================================
// 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"
)
// MemberInfoDao is the data access object for table member_info.
type MemberInfoDao 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 MemberInfoColumns // columns contains all the column names of Table for convenient usage.
}
// MemberInfoColumns defines and stores column names for table member_info.
type MemberInfoColumns struct {
Id string //
Jwcode string //
Nickname string //
Img string //
Medal string // 体验官勋章url
LocMarket string //
Dept string //
Shop string //
BoguMember string // 1:博股会员,0:不是
}
// memberInfoColumns holds the columns for table member_info.
var memberInfoColumns = MemberInfoColumns{
Id: "id",
Jwcode: "jwcode",
Nickname: "nickname",
Img: "img",
Medal: "medal",
LocMarket: "loc_market",
Dept: "dept",
Shop: "shop",
BoguMember: "bogu_member",
}
// NewMemberInfoDao creates and returns a new DAO object for table data access.
func NewMemberInfoDao() *MemberInfoDao {
return &MemberInfoDao{
group: "default",
table: "member_info",
columns: memberInfoColumns,
}
}
// DB retrieves and returns the underlying raw database management object of current DAO.
func (dao *MemberInfoDao) DB() gdb.DB {
return g.DB(dao.group)
}
// Table returns the table name of current dao.
func (dao *MemberInfoDao) Table() string {
return dao.table
}
// Columns returns all column names of current dao.
func (dao *MemberInfoDao) Columns() MemberInfoColumns {
return dao.columns
}
// Group returns the configuration group name of database of current dao.
func (dao *MemberInfoDao) Group() string {
return dao.group
}
// Ctx creates and returns the Model for current DAO, It automatically sets the context for current operation.
func (dao *MemberInfoDao) 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 *MemberInfoDao) Transaction(ctx context.Context, f func(ctx context.Context, tx gdb.TX) error) (err error) {
return dao.Ctx(ctx).Transaction(ctx, f)
}

89
internal/dao/internal/notice.go

@ -1,89 +0,0 @@
// ==========================================================================
// 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"
)
// NoticeDao is the data access object for table notice.
type NoticeDao 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 NoticeColumns // columns contains all the column names of Table for convenient usage.
}
// NoticeColumns defines and stores column names for table notice.
type NoticeColumns struct {
Id string //
Type string // 1进度修改2评论3点赞
WishId string // 心愿ID
CommentId string //
Jwcode string // 操作人
NoticeJwcode string // 通知人
State string // 0新通知1已看
WishState string // 把心愿改成的状态
CreatedAt string //
}
// noticeColumns holds the columns for table notice.
var noticeColumns = NoticeColumns{
Id: "id",
Type: "type",
WishId: "wish_id",
CommentId: "comment_id",
Jwcode: "jwcode",
NoticeJwcode: "notice_jwcode",
State: "state",
WishState: "wish_state",
CreatedAt: "created_at",
}
// NewNoticeDao creates and returns a new DAO object for table data access.
func NewNoticeDao() *NoticeDao {
return &NoticeDao{
group: "default",
table: "notice",
columns: noticeColumns,
}
}
// DB retrieves and returns the underlying raw database management object of current DAO.
func (dao *NoticeDao) DB() gdb.DB {
return g.DB(dao.group)
}
// Table returns the table name of current dao.
func (dao *NoticeDao) Table() string {
return dao.table
}
// Columns returns all column names of current dao.
func (dao *NoticeDao) Columns() NoticeColumns {
return dao.columns
}
// Group returns the configuration group name of database of current dao.
func (dao *NoticeDao) Group() string {
return dao.group
}
// Ctx creates and returns the Model for current DAO, It automatically sets the context for current operation.
func (dao *NoticeDao) 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 *NoticeDao) Transaction(ctx context.Context, f func(ctx context.Context, tx gdb.TX) error) (err error) {
return dao.Ctx(ctx).Transaction(ctx, f)
}

79
internal/dao/internal/product.go

@ -1,79 +0,0 @@
// ==========================================================================
// 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"
)
// ProductDao is the data access object for table product.
type ProductDao 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 ProductColumns // columns contains all the column names of Table for convenient usage.
}
// ProductColumns defines and stores column names for table product.
type ProductColumns struct {
Id string //
Name string //
Enabled string //
ZhCN string //
}
// productColumns holds the columns for table product.
var productColumns = ProductColumns{
Id: "id",
Name: "name",
Enabled: "enabled",
ZhCN: "zh_CN",
}
// NewProductDao creates and returns a new DAO object for table data access.
func NewProductDao() *ProductDao {
return &ProductDao{
group: "default",
table: "product",
columns: productColumns,
}
}
// DB retrieves and returns the underlying raw database management object of current DAO.
func (dao *ProductDao) DB() gdb.DB {
return g.DB(dao.group)
}
// Table returns the table name of current dao.
func (dao *ProductDao) Table() string {
return dao.table
}
// Columns returns all column names of current dao.
func (dao *ProductDao) Columns() ProductColumns {
return dao.columns
}
// Group returns the configuration group name of database of current dao.
func (dao *ProductDao) Group() string {
return dao.group
}
// Ctx creates and returns the Model for current DAO, It automatically sets the context for current operation.
func (dao *ProductDao) 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 *ProductDao) Transaction(ctx context.Context, f func(ctx context.Context, tx gdb.TX) error) (err error) {
return dao.Ctx(ctx).Transaction(ctx, f)
}

77
internal/dao/internal/subject.go

@ -1,77 +0,0 @@
// ==========================================================================
// 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"
)
// SubjectDao is the data access object for table subject.
type SubjectDao 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 SubjectColumns // columns contains all the column names of Table for convenient usage.
}
// SubjectColumns defines and stores column names for table subject.
type SubjectColumns struct {
Id string //
Type string //
Content string //
}
// subjectColumns holds the columns for table subject.
var subjectColumns = SubjectColumns{
Id: "id",
Type: "type",
Content: "content",
}
// NewSubjectDao creates and returns a new DAO object for table data access.
func NewSubjectDao() *SubjectDao {
return &SubjectDao{
group: "default",
table: "subject",
columns: subjectColumns,
}
}
// DB retrieves and returns the underlying raw database management object of current DAO.
func (dao *SubjectDao) DB() gdb.DB {
return g.DB(dao.group)
}
// Table returns the table name of current dao.
func (dao *SubjectDao) Table() string {
return dao.table
}
// Columns returns all column names of current dao.
func (dao *SubjectDao) Columns() SubjectColumns {
return dao.columns
}
// Group returns the configuration group name of database of current dao.
func (dao *SubjectDao) Group() string {
return dao.group
}
// Ctx creates and returns the Model for current DAO, It automatically sets the context for current operation.
func (dao *SubjectDao) 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 *SubjectDao) Transaction(ctx context.Context, f func(ctx context.Context, tx gdb.TX) error) (err error) {
return dao.Ctx(ctx).Transaction(ctx, f)
}

81
internal/dao/internal/support.go

@ -1,81 +0,0 @@
// ==========================================================================
// 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"
)
// SupportDao is the data access object for table support.
type SupportDao 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 SupportColumns // columns contains all the column names of Table for convenient usage.
}
// SupportColumns defines and stores column names for table support.
type SupportColumns struct {
Id string //
Jwcode string // 用户标识
WishId string // 心愿ID
Type string // 1支持2反对
CreatedAt string // 时间
}
// supportColumns holds the columns for table support.
var supportColumns = SupportColumns{
Id: "id",
Jwcode: "jwcode",
WishId: "wish_id",
Type: "type",
CreatedAt: "created_at",
}
// NewSupportDao creates and returns a new DAO object for table data access.
func NewSupportDao() *SupportDao {
return &SupportDao{
group: "default",
table: "support",
columns: supportColumns,
}
}
// DB retrieves and returns the underlying raw database management object of current DAO.
func (dao *SupportDao) DB() gdb.DB {
return g.DB(dao.group)
}
// Table returns the table name of current dao.
func (dao *SupportDao) Table() string {
return dao.table
}
// Columns returns all column names of current dao.
func (dao *SupportDao) Columns() SupportColumns {
return dao.columns
}
// Group returns the configuration group name of database of current dao.
func (dao *SupportDao) Group() string {
return dao.group
}
// Ctx creates and returns the Model for current DAO, It automatically sets the context for current operation.
func (dao *SupportDao) 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 *SupportDao) Transaction(ctx context.Context, f func(ctx context.Context, tx gdb.TX) error) (err error) {
return dao.Ctx(ctx).Transaction(ctx, f)
}

79
internal/dao/internal/transaction_lecturer_records.go

@ -1,79 +0,0 @@
// ==========================================================================
// 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"
)
// TransactionLecturerRecordsDao is the data access object for table transaction_lecturer_records.
type TransactionLecturerRecordsDao 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 TransactionLecturerRecordsColumns // columns contains all the column names of Table for convenient usage.
}
// TransactionLecturerRecordsColumns defines and stores column names for table transaction_lecturer_records.
type TransactionLecturerRecordsColumns struct {
Id string //
Jwcode string //
LecturerJwcode string //
Time string //
}
// transactionLecturerRecordsColumns holds the columns for table transaction_lecturer_records.
var transactionLecturerRecordsColumns = TransactionLecturerRecordsColumns{
Id: "id",
Jwcode: "jwcode",
LecturerJwcode: "lecturer_jwcode",
Time: "time",
}
// NewTransactionLecturerRecordsDao creates and returns a new DAO object for table data access.
func NewTransactionLecturerRecordsDao() *TransactionLecturerRecordsDao {
return &TransactionLecturerRecordsDao{
group: "default",
table: "transaction_lecturer_records",
columns: transactionLecturerRecordsColumns,
}
}
// DB retrieves and returns the underlying raw database management object of current DAO.
func (dao *TransactionLecturerRecordsDao) DB() gdb.DB {
return g.DB(dao.group)
}
// Table returns the table name of current dao.
func (dao *TransactionLecturerRecordsDao) Table() string {
return dao.table
}
// Columns returns all column names of current dao.
func (dao *TransactionLecturerRecordsDao) Columns() TransactionLecturerRecordsColumns {
return dao.columns
}
// Group returns the configuration group name of database of current dao.
func (dao *TransactionLecturerRecordsDao) Group() string {
return dao.group
}
// Ctx creates and returns the Model for current DAO, It automatically sets the context for current operation.
func (dao *TransactionLecturerRecordsDao) 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 *TransactionLecturerRecordsDao) Transaction(ctx context.Context, f func(ctx context.Context, tx gdb.TX) error) (err error) {
return dao.Ctx(ctx).Transaction(ctx, f)
}

81
internal/dao/internal/transaction_plan_files.go

@ -1,81 +0,0 @@
// ==========================================================================
// 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"
)
// TransactionPlanFilesDao is the data access object for table transaction_plan_files.
type TransactionPlanFilesDao 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 TransactionPlanFilesColumns // columns contains all the column names of Table for convenient usage.
}
// TransactionPlanFilesColumns defines and stores column names for table transaction_plan_files.
type TransactionPlanFilesColumns struct {
Id string //
Jwcode string //
Content string //
Time string // 提交时间
EncryptionId string //
}
// transactionPlanFilesColumns holds the columns for table transaction_plan_files.
var transactionPlanFilesColumns = TransactionPlanFilesColumns{
Id: "id",
Jwcode: "jwcode",
Content: "content",
Time: "time",
EncryptionId: "encryption_id",
}
// NewTransactionPlanFilesDao creates and returns a new DAO object for table data access.
func NewTransactionPlanFilesDao() *TransactionPlanFilesDao {
return &TransactionPlanFilesDao{
group: "default",
table: "transaction_plan_files",
columns: transactionPlanFilesColumns,
}
}
// DB retrieves and returns the underlying raw database management object of current DAO.
func (dao *TransactionPlanFilesDao) DB() gdb.DB {
return g.DB(dao.group)
}
// Table returns the table name of current dao.
func (dao *TransactionPlanFilesDao) Table() string {
return dao.table
}
// Columns returns all column names of current dao.
func (dao *TransactionPlanFilesDao) Columns() TransactionPlanFilesColumns {
return dao.columns
}
// Group returns the configuration group name of database of current dao.
func (dao *TransactionPlanFilesDao) Group() string {
return dao.group
}
// Ctx creates and returns the Model for current DAO, It automatically sets the context for current operation.
func (dao *TransactionPlanFilesDao) 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 *TransactionPlanFilesDao) Transaction(ctx context.Context, f func(ctx context.Context, tx gdb.TX) error) (err error) {
return dao.Ctx(ctx).Transaction(ctx, f)
}

79
internal/dao/internal/vote_1_indicators.go

@ -1,79 +0,0 @@
// ==========================================================================
// 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"
)
// Vote1IndicatorsDao is the data access object for table vote1_indicators.
type Vote1IndicatorsDao 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 Vote1IndicatorsColumns // columns contains all the column names of Table for convenient usage.
}
// Vote1IndicatorsColumns defines and stores column names for table vote1_indicators.
type Vote1IndicatorsColumns struct {
Id string //
Title string //
Description string //
Img string //
}
// vote1IndicatorsColumns holds the columns for table vote1_indicators.
var vote1IndicatorsColumns = Vote1IndicatorsColumns{
Id: "id",
Title: "title",
Description: "description",
Img: "img",
}
// NewVote1IndicatorsDao creates and returns a new DAO object for table data access.
func NewVote1IndicatorsDao() *Vote1IndicatorsDao {
return &Vote1IndicatorsDao{
group: "default",
table: "vote1_indicators",
columns: vote1IndicatorsColumns,
}
}
// DB retrieves and returns the underlying raw database management object of current DAO.
func (dao *Vote1IndicatorsDao) DB() gdb.DB {
return g.DB(dao.group)
}
// Table returns the table name of current dao.
func (dao *Vote1IndicatorsDao) Table() string {
return dao.table
}
// Columns returns all column names of current dao.
func (dao *Vote1IndicatorsDao) Columns() Vote1IndicatorsColumns {
return dao.columns
}
// Group returns the configuration group name of database of current dao.
func (dao *Vote1IndicatorsDao) Group() string {
return dao.group
}
// Ctx creates and returns the Model for current DAO, It automatically sets the context for current operation.
func (dao *Vote1IndicatorsDao) 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 *Vote1IndicatorsDao) Transaction(ctx context.Context, f func(ctx context.Context, tx gdb.TX) error) (err error) {
return dao.Ctx(ctx).Transaction(ctx, f)
}

81
internal/dao/internal/vote_1_records.go

@ -1,81 +0,0 @@
// ==========================================================================
// 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"
)
// Vote1RecordsDao is the data access object for table vote1_records.
type Vote1RecordsDao 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 Vote1RecordsColumns // columns contains all the column names of Table for convenient usage.
}
// Vote1RecordsColumns defines and stores column names for table vote1_records.
type Vote1RecordsColumns struct {
Id string //
Jwcode string //
VId string //
VoteDate string //
Time string //
}
// vote1RecordsColumns holds the columns for table vote1_records.
var vote1RecordsColumns = Vote1RecordsColumns{
Id: "id",
Jwcode: "jwcode",
VId: "v_id",
VoteDate: "vote_date",
Time: "time",
}
// NewVote1RecordsDao creates and returns a new DAO object for table data access.
func NewVote1RecordsDao() *Vote1RecordsDao {
return &Vote1RecordsDao{
group: "default",
table: "vote1_records",
columns: vote1RecordsColumns,
}
}
// DB retrieves and returns the underlying raw database management object of current DAO.
func (dao *Vote1RecordsDao) DB() gdb.DB {
return g.DB(dao.group)
}
// Table returns the table name of current dao.
func (dao *Vote1RecordsDao) Table() string {
return dao.table
}
// Columns returns all column names of current dao.
func (dao *Vote1RecordsDao) Columns() Vote1RecordsColumns {
return dao.columns
}
// Group returns the configuration group name of database of current dao.
func (dao *Vote1RecordsDao) Group() string {
return dao.group
}
// Ctx creates and returns the Model for current DAO, It automatically sets the context for current operation.
func (dao *Vote1RecordsDao) 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 *Vote1RecordsDao) Transaction(ctx context.Context, f func(ctx context.Context, tx gdb.TX) error) (err error) {
return dao.Ctx(ctx).Transaction(ctx, f)
}

81
internal/dao/internal/vote_1_virtual_records.go

@ -1,81 +0,0 @@
// ==========================================================================
// 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"
)
// Vote1VirtualRecordsDao is the data access object for table vote1_virtual_records.
type Vote1VirtualRecordsDao 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 Vote1VirtualRecordsColumns // columns contains all the column names of Table for convenient usage.
}
// Vote1VirtualRecordsColumns defines and stores column names for table vote1_virtual_records.
type Vote1VirtualRecordsColumns struct {
Id string //
VId string //
Votes string //
VoteDate string //
Time string //
}
// vote1VirtualRecordsColumns holds the columns for table vote1_virtual_records.
var vote1VirtualRecordsColumns = Vote1VirtualRecordsColumns{
Id: "id",
VId: "v_id",
Votes: "votes",
VoteDate: "vote_date",
Time: "time",
}
// NewVote1VirtualRecordsDao creates and returns a new DAO object for table data access.
func NewVote1VirtualRecordsDao() *Vote1VirtualRecordsDao {
return &Vote1VirtualRecordsDao{
group: "default",
table: "vote1_virtual_records",
columns: vote1VirtualRecordsColumns,
}
}
// DB retrieves and returns the underlying raw database management object of current DAO.
func (dao *Vote1VirtualRecordsDao) DB() gdb.DB {
return g.DB(dao.group)
}
// Table returns the table name of current dao.
func (dao *Vote1VirtualRecordsDao) Table() string {
return dao.table
}
// Columns returns all column names of current dao.
func (dao *Vote1VirtualRecordsDao) Columns() Vote1VirtualRecordsColumns {
return dao.columns
}
// Group returns the configuration group name of database of current dao.
func (dao *Vote1VirtualRecordsDao) Group() string {
return dao.group
}
// Ctx creates and returns the Model for current DAO, It automatically sets the context for current operation.
func (dao *Vote1VirtualRecordsDao) 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 *Vote1VirtualRecordsDao) Transaction(ctx context.Context, f func(ctx context.Context, tx gdb.TX) error) (err error) {
return dao.Ctx(ctx).Transaction(ctx, f)
}

77
internal/dao/internal/vote_indicators.go

@ -1,77 +0,0 @@
// ==========================================================================
// 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"
)
// VoteIndicatorsDao is the data access object for table vote_indicators.
type VoteIndicatorsDao 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 VoteIndicatorsColumns // columns contains all the column names of Table for convenient usage.
}
// VoteIndicatorsColumns defines and stores column names for table vote_indicators.
type VoteIndicatorsColumns struct {
Id string //
Title string //
Num string // 选择人数
}
// voteIndicatorsColumns holds the columns for table vote_indicators.
var voteIndicatorsColumns = VoteIndicatorsColumns{
Id: "id",
Title: "title",
Num: "num",
}
// NewVoteIndicatorsDao creates and returns a new DAO object for table data access.
func NewVoteIndicatorsDao() *VoteIndicatorsDao {
return &VoteIndicatorsDao{
group: "default",
table: "vote_indicators",
columns: voteIndicatorsColumns,
}
}
// DB retrieves and returns the underlying raw database management object of current DAO.
func (dao *VoteIndicatorsDao) DB() gdb.DB {
return g.DB(dao.group)
}
// Table returns the table name of current dao.
func (dao *VoteIndicatorsDao) Table() string {
return dao.table
}
// Columns returns all column names of current dao.
func (dao *VoteIndicatorsDao) Columns() VoteIndicatorsColumns {
return dao.columns
}
// Group returns the configuration group name of database of current dao.
func (dao *VoteIndicatorsDao) Group() string {
return dao.group
}
// Ctx creates and returns the Model for current DAO, It automatically sets the context for current operation.
func (dao *VoteIndicatorsDao) 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 *VoteIndicatorsDao) Transaction(ctx context.Context, f func(ctx context.Context, tx gdb.TX) error) (err error) {
return dao.Ctx(ctx).Transaction(ctx, f)
}

81
internal/dao/internal/vote_records.go

@ -1,81 +0,0 @@
// ==========================================================================
// 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"
)
// VoteRecordsDao is the data access object for table vote_records.
type VoteRecordsDao 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 VoteRecordsColumns // columns contains all the column names of Table for convenient usage.
}
// VoteRecordsColumns defines and stores column names for table vote_records.
type VoteRecordsColumns struct {
Id string //
Jwcode string //
VoteDate string //
Time string //
OptionsTitle string //
}
// voteRecordsColumns holds the columns for table vote_records.
var voteRecordsColumns = VoteRecordsColumns{
Id: "id",
Jwcode: "jwcode",
VoteDate: "vote_date",
Time: "time",
OptionsTitle: "options_title",
}
// NewVoteRecordsDao creates and returns a new DAO object for table data access.
func NewVoteRecordsDao() *VoteRecordsDao {
return &VoteRecordsDao{
group: "default",
table: "vote_records",
columns: voteRecordsColumns,
}
}
// DB retrieves and returns the underlying raw database management object of current DAO.
func (dao *VoteRecordsDao) DB() gdb.DB {
return g.DB(dao.group)
}
// Table returns the table name of current dao.
func (dao *VoteRecordsDao) Table() string {
return dao.table
}
// Columns returns all column names of current dao.
func (dao *VoteRecordsDao) Columns() VoteRecordsColumns {
return dao.columns
}
// Group returns the configuration group name of database of current dao.
func (dao *VoteRecordsDao) Group() string {
return dao.group
}
// Ctx creates and returns the Model for current DAO, It automatically sets the context for current operation.
func (dao *VoteRecordsDao) 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 *VoteRecordsDao) Transaction(ctx context.Context, f func(ctx context.Context, tx gdb.TX) error) (err error) {
return dao.Ctx(ctx).Transaction(ctx, f)
}

123
internal/dao/internal/wish.go

@ -1,123 +0,0 @@
// ==========================================================================
// 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"
)
// WishDao is the data access object for table wish.
type WishDao 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 WishColumns // columns contains all the column names of Table for convenient usage.
}
// WishColumns defines and stores column names for table wish.
type WishColumns struct {
Id string //
Jwcode string // 用户标识
Title string // 心愿名称
Content string // 心愿内容
Image string // 图片,多张图片用json格式保存
Type string // 1精网2弘历软件3大财神4锦囊5L-2产品
Status string // 0隐藏1待处理2排期中3在开发4已上线
Support string // 点赞数
Opposition string // 反对数
Comment string // 评论数
Fee string // 打赏当午券数
FeeNum string // 打赏人数
Vote string // 总票数
Zan string // 点赞数
See string // 观看数
Class string // 1心愿2公告
Label string // 1软件bug2产品需求3市场建议
Delete string // 0正常1删除2隐藏
ManagerJwcode string // 负责人的jwcode
Order string // 排序
Coding string // 是否经过开发
DeadLine string // 上线日期
Language string //
SubjectId string // 话题ID
CreatedAt string //
UpdatedAt string //
}
// wishColumns holds the columns for table wish.
var wishColumns = WishColumns{
Id: "id",
Jwcode: "jwcode",
Title: "title",
Content: "content",
Image: "image",
Type: "type",
Status: "status",
Support: "support",
Opposition: "opposition",
Comment: "comment",
Fee: "fee",
FeeNum: "fee_num",
Vote: "vote",
Zan: "zan",
See: "see",
Class: "class",
Label: "label",
Delete: "delete",
ManagerJwcode: "manager_jwcode",
Order: "order",
Coding: "coding",
DeadLine: "dead_line",
Language: "language",
SubjectId: "subject_id",
CreatedAt: "created_at",
UpdatedAt: "updated_at",
}
// NewWishDao creates and returns a new DAO object for table data access.
func NewWishDao() *WishDao {
return &WishDao{
group: "default",
table: "wish",
columns: wishColumns,
}
}
// DB retrieves and returns the underlying raw database management object of current DAO.
func (dao *WishDao) DB() gdb.DB {
return g.DB(dao.group)
}
// Table returns the table name of current dao.
func (dao *WishDao) Table() string {
return dao.table
}
// Columns returns all column names of current dao.
func (dao *WishDao) Columns() WishColumns {
return dao.columns
}
// Group returns the configuration group name of database of current dao.
func (dao *WishDao) Group() string {
return dao.group
}
// Ctx creates and returns the Model for current DAO, It automatically sets the context for current operation.
func (dao *WishDao) 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 *WishDao) 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/wish_cost.go

@ -1,85 +0,0 @@
// ==========================================================================
// 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"
)
// WishCostDao is the data access object for table wish_cost.
type WishCostDao 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 WishCostColumns // columns contains all the column names of Table for convenient usage.
}
// WishCostColumns defines and stores column names for table wish_cost.
type WishCostColumns struct {
Id string //
Jwcode string //
WishId string //
Coin string //
Status string // 1新建2成功3未成功
Msg string //
CreatedAt string //
}
// wishCostColumns holds the columns for table wish_cost.
var wishCostColumns = WishCostColumns{
Id: "id",
Jwcode: "jwcode",
WishId: "wish_id",
Coin: "coin",
Status: "status",
Msg: "msg",
CreatedAt: "created_at",
}
// NewWishCostDao creates and returns a new DAO object for table data access.
func NewWishCostDao() *WishCostDao {
return &WishCostDao{
group: "default",
table: "wish_cost",
columns: wishCostColumns,
}
}
// DB retrieves and returns the underlying raw database management object of current DAO.
func (dao *WishCostDao) DB() gdb.DB {
return g.DB(dao.group)
}
// Table returns the table name of current dao.
func (dao *WishCostDao) Table() string {
return dao.table
}
// Columns returns all column names of current dao.
func (dao *WishCostDao) Columns() WishCostColumns {
return dao.columns
}
// Group returns the configuration group name of database of current dao.
func (dao *WishCostDao) Group() string {
return dao.group
}
// Ctx creates and returns the Model for current DAO, It automatically sets the context for current operation.
func (dao *WishCostDao) 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 *WishCostDao) Transaction(ctx context.Context, f func(ctx context.Context, tx gdb.TX) error) (err error) {
return dao.Ctx(ctx).Transaction(ctx, f)
}

77
internal/dao/internal/wish_related.go

@ -1,77 +0,0 @@
// ==========================================================================
// 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"
)
// WishRelatedDao is the data access object for table wish_related.
type WishRelatedDao 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 WishRelatedColumns // columns contains all the column names of Table for convenient usage.
}
// WishRelatedColumns defines and stores column names for table wish_related.
type WishRelatedColumns struct {
Id string //
WishId string // 心愿ID
NoticeId string // 公告ID
}
// wishRelatedColumns holds the columns for table wish_related.
var wishRelatedColumns = WishRelatedColumns{
Id: "id",
WishId: "wish_id",
NoticeId: "notice_id",
}
// NewWishRelatedDao creates and returns a new DAO object for table data access.
func NewWishRelatedDao() *WishRelatedDao {
return &WishRelatedDao{
group: "default",
table: "wish_related",
columns: wishRelatedColumns,
}
}
// DB retrieves and returns the underlying raw database management object of current DAO.
func (dao *WishRelatedDao) DB() gdb.DB {
return g.DB(dao.group)
}
// Table returns the table name of current dao.
func (dao *WishRelatedDao) Table() string {
return dao.table
}
// Columns returns all column names of current dao.
func (dao *WishRelatedDao) Columns() WishRelatedColumns {
return dao.columns
}
// Group returns the configuration group name of database of current dao.
func (dao *WishRelatedDao) Group() string {
return dao.group
}
// Ctx creates and returns the Model for current DAO, It automatically sets the context for current operation.
func (dao *WishRelatedDao) 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 *WishRelatedDao) Transaction(ctx context.Context, f func(ctx context.Context, tx gdb.TX) error) (err error) {
return dao.Ctx(ctx).Transaction(ctx, f)
}

79
internal/dao/internal/wish_state.go

@ -1,79 +0,0 @@
// ==========================================================================
// 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"
)
// WishStateDao is the data access object for table wish_state.
type WishStateDao 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 WishStateColumns // columns contains all the column names of Table for convenient usage.
}
// WishStateColumns defines and stores column names for table wish_state.
type WishStateColumns struct {
Id string //
Language string //
Type string //
Name string //
}
// wishStateColumns holds the columns for table wish_state.
var wishStateColumns = WishStateColumns{
Id: "id",
Language: "language",
Type: "type",
Name: "name",
}
// NewWishStateDao creates and returns a new DAO object for table data access.
func NewWishStateDao() *WishStateDao {
return &WishStateDao{
group: "default",
table: "wish_state",
columns: wishStateColumns,
}
}
// DB retrieves and returns the underlying raw database management object of current DAO.
func (dao *WishStateDao) DB() gdb.DB {
return g.DB(dao.group)
}
// Table returns the table name of current dao.
func (dao *WishStateDao) Table() string {
return dao.table
}
// Columns returns all column names of current dao.
func (dao *WishStateDao) Columns() WishStateColumns {
return dao.columns
}
// Group returns the configuration group name of database of current dao.
func (dao *WishStateDao) Group() string {
return dao.group
}
// Ctx creates and returns the Model for current DAO, It automatically sets the context for current operation.
func (dao *WishStateDao) 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 *WishStateDao) Transaction(ctx context.Context, f func(ctx context.Context, tx gdb.TX) error) (err error) {
return dao.Ctx(ctx).Transaction(ctx, f)
}

83
internal/dao/internal/wish_translate.go

@ -1,83 +0,0 @@
// ==========================================================================
// 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"
)
// WishTranslateDao is the data access object for table wish_translate.
type WishTranslateDao 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 WishTranslateColumns // columns contains all the column names of Table for convenient usage.
}
// WishTranslateColumns defines and stores column names for table wish_translate.
type WishTranslateColumns struct {
Id string //
WishId string //
SourceLanguage string //
TargetLanguage string //
Title string //
Content string //
}
// wishTranslateColumns holds the columns for table wish_translate.
var wishTranslateColumns = WishTranslateColumns{
Id: "id",
WishId: "wish_id",
SourceLanguage: "source_language",
TargetLanguage: "target_language",
Title: "title",
Content: "content",
}
// NewWishTranslateDao creates and returns a new DAO object for table data access.
func NewWishTranslateDao() *WishTranslateDao {
return &WishTranslateDao{
group: "default",
table: "wish_translate",
columns: wishTranslateColumns,
}
}
// DB retrieves and returns the underlying raw database management object of current DAO.
func (dao *WishTranslateDao) DB() gdb.DB {
return g.DB(dao.group)
}
// Table returns the table name of current dao.
func (dao *WishTranslateDao) Table() string {
return dao.table
}
// Columns returns all column names of current dao.
func (dao *WishTranslateDao) Columns() WishTranslateColumns {
return dao.columns
}
// Group returns the configuration group name of database of current dao.
func (dao *WishTranslateDao) Group() string {
return dao.group
}
// Ctx creates and returns the Model for current DAO, It automatically sets the context for current operation.
func (dao *WishTranslateDao) 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 *WishTranslateDao) Transaction(ctx context.Context, f func(ctx context.Context, tx gdb.TX) error) (err error) {
return dao.Ctx(ctx).Transaction(ctx, f)
}

79
internal/dao/internal/wish_zan.go

@ -1,79 +0,0 @@
// ==========================================================================
// 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"
)
// WishZanDao is the data access object for table wish_zan.
type WishZanDao 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 WishZanColumns // columns contains all the column names of Table for convenient usage.
}
// WishZanColumns defines and stores column names for table wish_zan.
type WishZanColumns struct {
Id string //
Jwcode string //
WishId string //
CreatedAt string //
}
// wishZanColumns holds the columns for table wish_zan.
var wishZanColumns = WishZanColumns{
Id: "id",
Jwcode: "jwcode",
WishId: "wish_id",
CreatedAt: "created_at",
}
// NewWishZanDao creates and returns a new DAO object for table data access.
func NewWishZanDao() *WishZanDao {
return &WishZanDao{
group: "default",
table: "wish_zan",
columns: wishZanColumns,
}
}
// DB retrieves and returns the underlying raw database management object of current DAO.
func (dao *WishZanDao) DB() gdb.DB {
return g.DB(dao.group)
}
// Table returns the table name of current dao.
func (dao *WishZanDao) Table() string {
return dao.table
}
// Columns returns all column names of current dao.
func (dao *WishZanDao) Columns() WishZanColumns {
return dao.columns
}
// Group returns the configuration group name of database of current dao.
func (dao *WishZanDao) Group() string {
return dao.group
}
// Ctx creates and returns the Model for current DAO, It automatically sets the context for current operation.
func (dao *WishZanDao) 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 *WishZanDao) 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/lecturers.go

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

27
internal/dao/manager.go

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

27
internal/dao/member_info.go

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

27
internal/dao/notice.go

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

27
internal/dao/product.go

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

27
internal/dao/subject.go

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

27
internal/dao/support.go

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

27
internal/dao/transaction_lecturer_records.go

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

27
internal/dao/transaction_plan_files.go

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

27
internal/dao/vote_1_indicators.go

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

27
internal/dao/vote_1_records.go

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

27
internal/dao/vote_1_virtual_records.go

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

27
internal/dao/vote_indicators.go

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

27
internal/dao/vote_records.go

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

27
internal/dao/wish.go

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

27
internal/dao/wish_cost.go

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

27
internal/dao/wish_related.go

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

27
internal/dao/wish_state.go

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

27
internal/dao/wish_translate.go

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

27
internal/dao/wish_zan.go

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

124
internal/logic/vote.go

@ -0,0 +1,124 @@
package logic
import (
"VoteManage_Go/api/v1/vote"
"VoteManage_Go/internal/dao"
"VoteManage_Go/internal/model/dto"
"VoteManage_Go/internal/service"
"context"
"fmt"
"github.com/gogf/gf/v2/frame/g"
"github.com/gogf/gf/v2/net/ghttp"
"github.com/gogf/gf/v2/os/gtime"
"github.com/xuri/excelize/v2"
"net/url"
"strconv"
"time"
)
type sVote struct{}
func init() {
service.RegisterVote(New())
}
func New() *sVote {
return &sVote{}
}
func (s *sVote) GetVoteByCondition(ctx context.Context, req *vote.GetVoteDetailListReq) (votes []*dto.VoteDto, total int, err error) {
query := g.Model("vote_records v").LeftJoin("member_info m", "v.jwcode = m.jwcode").
Fields("v.id, m.nickname, v.jwcode, m.dept, v.options_title, v.time").
Where("v.activity_id = ?", req.ActivityId)
// 条件1:jwcode输入(精确匹配)
if req.Jwcode != "" {
query = query.Where("v.jwcode = ?", req.Jwcode)
}
// 条件2:地区dept下拉框(精确匹配)dept是汉字
if req.Dept != "" {
query = query.Where("m.dept = ?", req.Dept)
}
// 条件3:投票日期范围(时间戳转换)
//if req.StartTime != nil && req.EndTime != nil {
// // 将前端日期字符串转为Unix时间戳(示例:2025.04.01 00:00:00 → 时间戳)
// query = query.Where("v.time BETWEEN ? AND ?", req.StartTime.Unix(), req.EndTime.Unix())
//}
if req.StartDate != "" && req.EndDate != "" {
start := gtime.New(req.StartDate + " 00:00:00").Unix()
end := gtime.New(req.EndDate + " 23:59:59").Unix()
query = query.Where("v.time BETWEEN ? AND ?", start, end)
}
// 条件4:分页
query.Page(req.PageNo, req.PageSize).ScanAndCount(&votes, &total, false)
return
}
func (s *sVote) ExportVote(r *ghttp.Request, req *vote.GetVoteDetailListReq) {
votes, _, err := s.GetVoteByCondition(r.Context(), req)
if err != nil {
r.Response.WriteJsonExit(dto.Error("查询失败:" + err.Error()))
return
}
if len(votes) == 0 {
r.Response.WriteJsonExit(dto.Error("查询结果为空"))
return
}
// 内存中创建Excel文件(不落盘)
excelFile := excelize.NewFile()
sheetName := "投票记录"
excelFile.SetSheetName("Sheet1", sheetName)
// 设置表头样式
headers := []string{"序号", "姓名", "精网号", "地区", "投票明细", "投票时间"}
for i, header := range headers {
col := string('A' + i)
excelFile.SetCellValue(sheetName, col+"1", header)
excelFile.SetColWidth(sheetName, col, col, 18) // 列宽调整
}
// 动态写入数据
for rowIdx, vote := range votes {
row := strconv.Itoa(rowIdx + 2)
excelFile.SetCellValue(sheetName, "A"+row, rowIdx+1)
excelFile.SetCellValue(sheetName, "B"+row, vote.Nickname)
excelFile.SetCellValue(sheetName, "C"+row, vote.Jwcode)
excelFile.SetCellValue(sheetName, "D"+row, vote.Dept)
excelFile.SetCellValue(sheetName, "E"+row, vote.OptionsTitle)
excelFile.SetCellValue(sheetName, "F"+row, vote.Time)
}
// 生成唯一文件名并响应流
fileName := fmt.Sprintf("投票记录_%s.xlsx",
time.Now().Format("20060102150405"),
)
r.Response.Header().Set("Content-Type", "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet")
r.Response.Header().Set("Content-Disposition", "attachment; filename*=UTF-8''"+url.QueryEscape(fileName))
// 直接写入HTTP响应流
if buffer, err := excelFile.WriteToBuffer(); err == nil {
r.Response.Write(buffer.Bytes())
} else {
r.Response.WriteJsonExit(dto.Error("文件生成失败:" + err.Error()))
}
}
func (s *sVote) GetActivityList(ctx context.Context, req *vote.GetActivityListReq) (activities []*dto.Activity, total int, err error) {
err = g.DB("live").Model("float_window").Fields("id, title, start, end, created_at").
OrderDesc("id").Page(req.PageNo, req.PageSize).ScanAndCount(&activities, &total, false)
for _, v := range activities {
v.VoteCount, _ = dao.VoteRecords.Ctx(ctx).Where("activity_id", v.Id).Fields("DISTINCT jwcode").Count()
//fmt.Printf(strconv.Itoa(v.VoteCount))
if gtime.Date() < v.Start {
v.Status = 1
} else if gtime.Date() > v.End {
v.Status = 3
} else {
v.Status = 2
}
}
return
}

17
internal/model/do/able_sign_users.go

@ -1,17 +0,0 @@
// =================================================================================
// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT.
// =================================================================================
package do
import (
"github.com/gogf/gf/v2/frame/g"
)
// AbleSignUsers is the golang structure of table able_sign_users for DAO operations like Where/Data.
type AbleSignUsers struct {
g.Meta `orm:"table:able_sign_users, do:true"`
Id interface{} //
Jwcode interface{} //
Type interface{} // 1 博股会员 2 信息费5年 3 购买三个指标
}

23
internal/model/do/comment.go

@ -1,23 +0,0 @@
// =================================================================================
// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT.
// =================================================================================
package do
import (
"github.com/gogf/gf/v2/frame/g"
)
// Comment is the golang structure of table comment for DAO operations like Where/Data.
type Comment struct {
g.Meta `orm:"table:comment, do:true"`
Id interface{} //
WishId interface{} // 心愿ID
Jwcode interface{} // 评论人code
Content interface{} // 评论内容
Image interface{} // 图片,多张图片用json格式保存
ReplyNum interface{} // 回复数
Pid interface{} // 父级评论ID
Delete interface{} // 0正常1删除
CreatedAt interface{} // 评论时间
}

18
internal/model/do/comment_zan.go

@ -1,18 +0,0 @@
// =================================================================================
// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT.
// =================================================================================
package do
import (
"github.com/gogf/gf/v2/frame/g"
)
// CommentZan is the golang structure of table comment_zan for DAO operations like Where/Data.
type CommentZan struct {
g.Meta `orm:"table:comment_zan, do:true"`
Id interface{} //
Jwcode interface{} //
CommentId interface{} //
CreatedAt interface{} //
}

24
internal/model/do/experience_officer_sign.go

@ -1,24 +0,0 @@
// =================================================================================
// 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"
)
// ExperienceOfficerSign is the golang structure of table experience_officer_sign for DAO operations like Where/Data.
type ExperienceOfficerSign struct {
g.Meta `orm:"table:experience_officer_sign, do:true"`
Id interface{} //
Jwcode interface{} //
Time interface{} //
State interface{} // 1 报名用户
Location interface{} // 1 新加坡 2 马来 3 香港 4 美股 5 A股
Identity interface{} // 1 博股会员 2 金卡会员
ReservationCode interface{} //
Seat interface{} //
Date *gtime.Time //
}

24
internal/model/do/experience_officer_vote.go

@ -1,24 +0,0 @@
// =================================================================================
// 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"
)
// ExperienceOfficerVote is the golang structure of table experience_officer_vote for DAO operations like Where/Data.
type ExperienceOfficerVote struct {
g.Meta `orm:"table:experience_officer_vote, do:true"`
Id interface{} //
Jwcode interface{} //
Time interface{} //
State interface{} // 1 报名用户
Location interface{} // 1 新加坡 2 马来 3 香港 4 美股 5 A股
Identity interface{} // 1 博股会员 2 金卡会员
ReservationCode interface{} //
Seat interface{} //
Date *gtime.Time //
}

18
internal/model/do/hot_jwcode.go

@ -1,18 +0,0 @@
// =================================================================================
// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT.
// =================================================================================
package do
import (
"github.com/gogf/gf/v2/frame/g"
)
// HotJwcode is the golang structure of table hot_jwcode for DAO operations like Where/Data.
type HotJwcode struct {
g.Meta `orm:"table:hot_jwcode, do:true"`
Id interface{} //
Jwcode interface{} // 精网号
Hot interface{} // 热度值
UpdatedAt interface{} //
}

18
internal/model/do/hot_subject.go

@ -1,18 +0,0 @@
// =================================================================================
// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT.
// =================================================================================
package do
import (
"github.com/gogf/gf/v2/frame/g"
)
// HotSubject is the golang structure of table hot_subject for DAO operations like Where/Data.
type HotSubject struct {
g.Meta `orm:"table:hot_subject, do:true"`
Id interface{} //
SubjectId interface{} // 话题ID
Hot interface{} // 热度值
UpdatedAt interface{} //
}

18
internal/model/do/hot_wish.go

@ -1,18 +0,0 @@
// =================================================================================
// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT.
// =================================================================================
package do
import (
"github.com/gogf/gf/v2/frame/g"
)
// HotWish is the golang structure of table hot_wish for DAO operations like Where/Data.
type HotWish struct {
g.Meta `orm:"table:hot_wish, do:true"`
Id interface{} //
WishId interface{} // 心愿ID
Hot interface{} // 热度值
UpdatedAt interface{} //
}

18
internal/model/do/lecturers.go

@ -1,18 +0,0 @@
// =================================================================================
// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT.
// =================================================================================
package do
import (
"github.com/gogf/gf/v2/frame/g"
)
// Lecturers is the golang structure of table lecturers for DAO operations like Where/Data.
type Lecturers struct {
g.Meta `orm:"table:lecturers, do:true"`
Id interface{} //
Jwcode interface{} //
Avatar interface{} //
Name interface{} //
}

21
internal/model/do/manager.go

@ -1,21 +0,0 @@
// =================================================================================
// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT.
// =================================================================================
package do
import (
"github.com/gogf/gf/v2/frame/g"
)
// Manager is the golang structure of table manager for DAO operations like Where/Data.
type Manager struct {
g.Meta `orm:"table:manager, do:true"`
Id interface{} //
Jwcode interface{} //
Name interface{} //
Type interface{} // 产品ID
LanguageKey interface{} //
Enabled interface{} //
CreatedAt interface{} //
}

23
internal/model/do/member_info.go

@ -1,23 +0,0 @@
// =================================================================================
// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT.
// =================================================================================
package do
import (
"github.com/gogf/gf/v2/frame/g"
)
// MemberInfo is the golang structure of table member_info for DAO operations like Where/Data.
type MemberInfo struct {
g.Meta `orm:"table:member_info, do:true"`
Id interface{} //
Jwcode interface{} //
Nickname interface{} //
Img interface{} //
Medal interface{} // 体验官勋章url
LocMarket interface{} //
Dept interface{} //
Shop interface{} //
BoguMember interface{} // 1:博股会员,0:不是
}

23
internal/model/do/notice.go

@ -1,23 +0,0 @@
// =================================================================================
// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT.
// =================================================================================
package do
import (
"github.com/gogf/gf/v2/frame/g"
)
// Notice is the golang structure of table notice for DAO operations like Where/Data.
type Notice struct {
g.Meta `orm:"table:notice, do:true"`
Id interface{} //
Type interface{} // 1进度修改2评论3点赞
WishId interface{} // 心愿ID
CommentId interface{} //
Jwcode interface{} // 操作人
NoticeJwcode interface{} // 通知人
State interface{} // 0新通知1已看
WishState interface{} // 把心愿改成的状态
CreatedAt interface{} //
}

18
internal/model/do/product.go

@ -1,18 +0,0 @@
// =================================================================================
// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT.
// =================================================================================
package do
import (
"github.com/gogf/gf/v2/frame/g"
)
// Product is the golang structure of table product for DAO operations like Where/Data.
type Product struct {
g.Meta `orm:"table:product, do:true"`
Id interface{} //
Name interface{} //
Enabled interface{} //
ZhCN interface{} //
}

17
internal/model/do/subject.go

@ -1,17 +0,0 @@
// =================================================================================
// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT.
// =================================================================================
package do
import (
"github.com/gogf/gf/v2/frame/g"
)
// Subject is the golang structure of table subject for DAO operations like Where/Data.
type Subject struct {
g.Meta `orm:"table:subject, do:true"`
Id interface{} //
Type interface{} //
Content interface{} //
}

19
internal/model/do/support.go

@ -1,19 +0,0 @@
// =================================================================================
// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT.
// =================================================================================
package do
import (
"github.com/gogf/gf/v2/frame/g"
)
// Support is the golang structure of table support for DAO operations like Where/Data.
type Support struct {
g.Meta `orm:"table:support, do:true"`
Id interface{} //
Jwcode interface{} // 用户标识
WishId interface{} // 心愿ID
Type interface{} // 1支持2反对
CreatedAt interface{} // 时间
}

18
internal/model/do/transaction_lecturer_records.go

@ -1,18 +0,0 @@
// =================================================================================
// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT.
// =================================================================================
package do
import (
"github.com/gogf/gf/v2/frame/g"
)
// TransactionLecturerRecords is the golang structure of table transaction_lecturer_records for DAO operations like Where/Data.
type TransactionLecturerRecords struct {
g.Meta `orm:"table:transaction_lecturer_records, do:true"`
Id interface{} //
Jwcode interface{} //
LecturerJwcode interface{} //
Time interface{} //
}

19
internal/model/do/transaction_plan_files.go

@ -1,19 +0,0 @@
// =================================================================================
// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT.
// =================================================================================
package do
import (
"github.com/gogf/gf/v2/frame/g"
)
// TransactionPlanFiles is the golang structure of table transaction_plan_files for DAO operations like Where/Data.
type TransactionPlanFiles struct {
g.Meta `orm:"table:transaction_plan_files, do:true"`
Id interface{} //
Jwcode interface{} //
Content interface{} //
Time interface{} // 提交时间
EncryptionId interface{} //
}

18
internal/model/do/vote_1_indicators.go

@ -1,18 +0,0 @@
// =================================================================================
// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT.
// =================================================================================
package do
import (
"github.com/gogf/gf/v2/frame/g"
)
// Vote1Indicators is the golang structure of table vote1_indicators for DAO operations like Where/Data.
type Vote1Indicators struct {
g.Meta `orm:"table:vote1_indicators, do:true"`
Id interface{} //
Title interface{} //
Description interface{} //
Img interface{} //
}

20
internal/model/do/vote_1_records.go

@ -1,20 +0,0 @@
// =================================================================================
// 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"
)
// Vote1Records is the golang structure of table vote1_records for DAO operations like Where/Data.
type Vote1Records struct {
g.Meta `orm:"table:vote1_records, do:true"`
Id interface{} //
Jwcode interface{} //
VId interface{} //
VoteDate *gtime.Time //
Time interface{} //
}

20
internal/model/do/vote_1_virtual_records.go

@ -1,20 +0,0 @@
// =================================================================================
// 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"
)
// Vote1VirtualRecords is the golang structure of table vote1_virtual_records for DAO operations like Where/Data.
type Vote1VirtualRecords struct {
g.Meta `orm:"table:vote1_virtual_records, do:true"`
Id interface{} //
VId interface{} //
Votes interface{} //
VoteDate *gtime.Time //
Time interface{} //
}

17
internal/model/do/vote_indicators.go

@ -1,17 +0,0 @@
// =================================================================================
// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT.
// =================================================================================
package do
import (
"github.com/gogf/gf/v2/frame/g"
)
// VoteIndicators is the golang structure of table vote_indicators for DAO operations like Where/Data.
type VoteIndicators struct {
g.Meta `orm:"table:vote_indicators, do:true"`
Id interface{} //
Title interface{} //
Num interface{} // 选择人数
}

20
internal/model/do/vote_records.go

@ -1,20 +0,0 @@
// =================================================================================
// 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"
)
// VoteRecords is the golang structure of table vote_records for DAO operations like Where/Data.
type VoteRecords struct {
g.Meta `orm:"table:vote_records, do:true"`
Id interface{} //
Jwcode interface{} //
VoteDate *gtime.Time //
Time interface{} //
OptionsTitle interface{} //
}

41
internal/model/do/wish.go

@ -1,41 +0,0 @@
// =================================================================================
// 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"
)
// Wish is the golang structure of table wish for DAO operations like Where/Data.
type Wish struct {
g.Meta `orm:"table:wish, do:true"`
Id interface{} //
Jwcode interface{} // 用户标识
Title interface{} // 心愿名称
Content interface{} // 心愿内容
Image interface{} // 图片,多张图片用json格式保存
Type interface{} // 1精网2弘历软件3大财神4锦囊5L-2产品
Status interface{} // 0隐藏1待处理2排期中3在开发4已上线
Support interface{} // 点赞数
Opposition interface{} // 反对数
Comment interface{} // 评论数
Fee interface{} // 打赏当午券数
FeeNum interface{} // 打赏人数
Vote interface{} // 总票数
Zan interface{} // 点赞数
See interface{} // 观看数
Class interface{} // 1心愿2公告
Label interface{} // 1软件bug2产品需求3市场建议
Delete interface{} // 0正常1删除2隐藏
ManagerJwcode interface{} // 负责人的jwcode
Order interface{} // 排序
Coding interface{} // 是否经过开发
DeadLine *gtime.Time // 上线日期
Language interface{} //
SubjectId interface{} // 话题ID
CreatedAt interface{} //
UpdatedAt interface{} //
}

21
internal/model/do/wish_cost.go

@ -1,21 +0,0 @@
// =================================================================================
// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT.
// =================================================================================
package do
import (
"github.com/gogf/gf/v2/frame/g"
)
// WishCost is the golang structure of table wish_cost for DAO operations like Where/Data.
type WishCost struct {
g.Meta `orm:"table:wish_cost, do:true"`
Id interface{} //
Jwcode interface{} //
WishId interface{} //
Coin interface{} //
Status interface{} // 1新建2成功3未成功
Msg interface{} //
CreatedAt interface{} //
}

17
internal/model/do/wish_related.go

@ -1,17 +0,0 @@
// =================================================================================
// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT.
// =================================================================================
package do
import (
"github.com/gogf/gf/v2/frame/g"
)
// WishRelated is the golang structure of table wish_related for DAO operations like Where/Data.
type WishRelated struct {
g.Meta `orm:"table:wish_related, do:true"`
Id interface{} //
WishId interface{} // 心愿ID
NoticeId interface{} // 公告ID
}

18
internal/model/do/wish_state.go

@ -1,18 +0,0 @@
// =================================================================================
// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT.
// =================================================================================
package do
import (
"github.com/gogf/gf/v2/frame/g"
)
// WishState is the golang structure of table wish_state for DAO operations like Where/Data.
type WishState struct {
g.Meta `orm:"table:wish_state, do:true"`
Id interface{} //
Language interface{} //
Type interface{} //
Name interface{} //
}

20
internal/model/do/wish_translate.go

@ -1,20 +0,0 @@
// =================================================================================
// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT.
// =================================================================================
package do
import (
"github.com/gogf/gf/v2/frame/g"
)
// WishTranslate is the golang structure of table wish_translate for DAO operations like Where/Data.
type WishTranslate struct {
g.Meta `orm:"table:wish_translate, do:true"`
Id interface{} //
WishId interface{} //
SourceLanguage interface{} //
TargetLanguage interface{} //
Title interface{} //
Content interface{} //
}

18
internal/model/do/wish_zan.go

@ -1,18 +0,0 @@
// =================================================================================
// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT.
// =================================================================================
package do
import (
"github.com/gogf/gf/v2/frame/g"
)
// WishZan is the golang structure of table wish_zan for DAO operations like Where/Data.
type WishZan struct {
g.Meta `orm:"table:wish_zan, do:true"`
Id interface{} //
Jwcode interface{} //
WishId interface{} //
CreatedAt interface{} //
}

80
internal/model/dto/Result.go

@ -0,0 +1,80 @@
package dto
// 定义响应结构
type Result struct {
Code int `json:"code"`
Message string `json:"message"`
Data interface{} `json:"data"` // 修改为实体类型
}
/*成功,没有数据*/
func Success() *Result {
return &Result{
Code: 200,
Message: "success",
Data: nil,
}
}
/*成功,自定义相应信息*/
func SuccessWithMsg(msg string) *Result {
return &Result{
Code: 200,
Message: msg,
Data: nil,
}
}
/*成功,有数据*/
func SuccessWithData(data interface{}) *Result {
return &Result{
Code: 200,
Message: "success",
Data: data,
}
}
/*成功,自定义信息和数据*/
func SuccessWithMsgAndData(msg string, data interface{}) *Result {
return &Result{
Code: 200,
Message: msg,
Data: data,
}
}
/*错误,只有错误信息,错误码0*/
func Error(msg string) *Result {
return &Result{
Code: 400, // 错误码
Message: msg, // 错误信息
Data: nil,
}
}
/*错误,有错误信息,有错误码*/
func ErrorWithCode(code int, msg string) *Result {
return &Result{
Code: code, // 错误码
Message: msg, // 错误信息
Data: nil,
}
}
/*未授权,有错误信息,错误码为401*/
func Unauthorized(msg string) *Result {
return &Result{
Code: 401, // 错误码
Message: msg, // 错误信息
Data: nil,
}
}
/*未授权,有错误信息,允许自定义错误码*/
func UnauthorizedWithCode(code int, msg string) *Result {
return &Result{
Code: code, // 错误码
Message: msg, // 错误信息
Data: nil,
}
}

13
internal/model/dto/activityDto.go

@ -0,0 +1,13 @@
package dto
type Activity struct {
Id int `json:"id"`
Title string `json:"title"`
Detail string `json:"detail" dc:"活动详情" `
VisitCount int `json:"visit_count" dc:"访问人数"`
VoteCount int `json:"vote_count" dc:"投票人数"`
Start string `json:"start" dc:"开始时间"`
End string `json:"end" dc:"结束时间"`
CreatedAt string `json:"created_at" dc:"创建时间"`
Status int `json:"status" dc:"活动状态"`
}

12
internal/model/dto/voteDto.go

@ -0,0 +1,12 @@
package dto
import "github.com/gogf/gf/v2/os/gtime"
type VoteDto struct {
Id uint `json:"id"`
Jwcode string `json:"jwcode"`
Nickname string `json:"nickname"`
Dept string `json:"dept"`
OptionsTitle string `json:"options_title"`
Time *gtime.Time `json:"time"`
}

Some files were not shown because too many files changed in this diff

Loading…
Cancel
Save