fuwencai 5 сар өмнө
commit
62f54a7bb9
100 өөрчлөгдсөн 2445 нэмэгдсэн , 0 устгасан
  1. 8 0
      .idea/.gitignore
  2. 6 0
      .idea/misc.xml
  3. 8 0
      .idea/modules.xml
  4. 9 0
      .idea/newusertask.iml
  5. 6 0
      .idea/vcs.xml
  6. 9 0
      go.mod
  7. 8 0
      go.sum
  8. 1 0
      newuserGet/.gitattributes
  9. 19 0
      newuserGet/.gitignore
  10. 7 0
      newuserGet/Makefile
  11. 4 0
      newuserGet/README.MD
  12. 15 0
      newuserGet/api/hello/hello.go
  13. 12 0
      newuserGet/api/hello/v1/hello.go
  14. 41 0
      newuserGet/go.mod
  15. 148 0
      newuserGet/go.sum
  16. 22 0
      newuserGet/hack/config.yaml
  17. 20 0
      newuserGet/hack/hack-cli.mk
  18. 75 0
      newuserGet/hack/hack.mk
  19. 30 0
      newuserGet/internal/cmd/cmd.go
  20. 1 0
      newuserGet/internal/consts/consts.go
  21. 5 0
      newuserGet/internal/controller/hello/hello.go
  22. 16 0
      newuserGet/internal/controller/hello/hello_new.go
  23. 13 0
      newuserGet/internal/controller/hello/hello_v1_hello.go
  24. 0 0
      newuserGet/internal/dao/.gitkeep
  25. 27 0
      newuserGet/internal/dao/dwd_d_user_tag.go
  26. 27 0
      newuserGet/internal/dao/dwd_mgo_position.go
  27. 75 0
      newuserGet/internal/dao/internal/dwd_d_user_tag.go
  28. 83 0
      newuserGet/internal/dao/internal/dwd_mgo_position.go
  29. 85 0
      newuserGet/internal/dao/internal/new_user_send_log.go
  30. 87 0
      newuserGet/internal/dao/internal/new_user_send_rule.go
  31. 171 0
      newuserGet/internal/dao/internal/voice_record.go
  32. 27 0
      newuserGet/internal/dao/new_user_send_log.go
  33. 27 0
      newuserGet/internal/dao/new_user_send_rule.go
  34. 27 0
      newuserGet/internal/dao/voice_record.go
  35. 0 0
      newuserGet/internal/logic/.gitkeep
  36. 185 0
      newuserGet/internal/logic/task.go
  37. 0 0
      newuserGet/internal/model/.gitkeep
  38. 0 0
      newuserGet/internal/model/do/.gitkeep
  39. 16 0
      newuserGet/internal/model/do/dwd_d_user_tag.go
  40. 20 0
      newuserGet/internal/model/do/dwd_mgo_position.go
  41. 22 0
      newuserGet/internal/model/do/new_user_send_log.go
  42. 23 0
      newuserGet/internal/model/do/new_user_send_rule.go
  43. 65 0
      newuserGet/internal/model/do/voice_record.go
  44. 0 0
      newuserGet/internal/model/entity/.gitkeep
  45. 11 0
      newuserGet/internal/model/entity/dwd_d_user_tag.go
  46. 15 0
      newuserGet/internal/model/entity/dwd_mgo_position.go
  47. 20 0
      newuserGet/internal/model/entity/new_user_send_log.go
  48. 21 0
      newuserGet/internal/model/entity/new_user_send_rule.go
  49. 63 0
      newuserGet/internal/model/entity/voice_record.go
  50. 1 0
      newuserGet/internal/packed/packed.go
  51. 0 0
      newuserGet/internal/service/.gitkeep
  52. 32 0
      newuserGet/main.go
  53. 21 0
      newuserGet/manifest/deploy/kustomize/base/deployment.yaml
  54. 8 0
      newuserGet/manifest/deploy/kustomize/base/kustomization.yaml
  55. 12 0
      newuserGet/manifest/deploy/kustomize/base/service.yaml
  56. 14 0
      newuserGet/manifest/deploy/kustomize/overlays/develop/configmap.yaml
  57. 10 0
      newuserGet/manifest/deploy/kustomize/overlays/develop/deployment.yaml
  58. 14 0
      newuserGet/manifest/deploy/kustomize/overlays/develop/kustomization.yaml
  59. 16 0
      newuserGet/manifest/docker/Dockerfile
  60. 8 0
      newuserGet/manifest/docker/docker.sh
  61. 0 0
      newuserGet/manifest/i18n/.gitkeep
  62. 0 0
      newuserGet/manifest/protobuf/.keep-if-necessary
  63. 0 0
      newuserGet/utility/.gitkeep
  64. 1 0
      newuserSend/.gitattributes
  65. 19 0
      newuserSend/.gitignore
  66. 7 0
      newuserSend/Makefile
  67. 4 0
      newuserSend/README.MD
  68. 15 0
      newuserSend/api/hello/hello.go
  69. 12 0
      newuserSend/api/hello/v1/hello.go
  70. 31 0
      newuserSend/go.mod
  71. 60 0
      newuserSend/go.sum
  72. 13 0
      newuserSend/hack/config.yaml
  73. 20 0
      newuserSend/hack/hack-cli.mk
  74. 75 0
      newuserSend/hack/hack.mk
  75. 30 0
      newuserSend/internal/cmd/cmd.go
  76. 1 0
      newuserSend/internal/consts/consts.go
  77. 5 0
      newuserSend/internal/controller/hello/hello.go
  78. 16 0
      newuserSend/internal/controller/hello/hello_new.go
  79. 13 0
      newuserSend/internal/controller/hello/hello_v1_hello.go
  80. 0 0
      newuserSend/internal/dao/.gitkeep
  81. 89 0
      newuserSend/internal/dao/internal/new_user_send_content.go
  82. 85 0
      newuserSend/internal/dao/internal/new_user_send_log.go
  83. 27 0
      newuserSend/internal/dao/new_user_send_content.go
  84. 27 0
      newuserSend/internal/dao/new_user_send_log.go
  85. 0 0
      newuserSend/internal/logic/.gitkeep
  86. 0 0
      newuserSend/internal/model/.gitkeep
  87. 0 0
      newuserSend/internal/model/do/.gitkeep
  88. 24 0
      newuserSend/internal/model/do/new_user_send_content.go
  89. 22 0
      newuserSend/internal/model/do/new_user_send_log.go
  90. 0 0
      newuserSend/internal/model/entity/.gitkeep
  91. 22 0
      newuserSend/internal/model/entity/new_user_send_content.go
  92. 20 0
      newuserSend/internal/model/entity/new_user_send_log.go
  93. 1 0
      newuserSend/internal/packed/packed.go
  94. 0 0
      newuserSend/internal/service/.gitkeep
  95. 32 0
      newuserSend/main.go
  96. 3 0
      newuserSend/manifest/config/sms.yaml
  97. 21 0
      newuserSend/manifest/deploy/kustomize/base/deployment.yaml
  98. 8 0
      newuserSend/manifest/deploy/kustomize/base/kustomization.yaml
  99. 12 0
      newuserSend/manifest/deploy/kustomize/base/service.yaml
  100. 14 0
      newuserSend/manifest/deploy/kustomize/overlays/develop/configmap.yaml

+ 8 - 0
.idea/.gitignore

@@ -0,0 +1,8 @@
+# Default ignored files
+/shelf/
+/workspace.xml
+# Editor-based HTTP Client requests
+/httpRequests/
+# Datasource local storage ignored files
+/dataSources/
+/dataSources.local.xml

+ 6 - 0
.idea/misc.xml

@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project version="4">
+  <component name="MarkdownSettingsMigration">
+    <option name="stateVersion" value="1" />
+  </component>
+</project>

+ 8 - 0
.idea/modules.xml

@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project version="4">
+  <component name="ProjectModuleManager">
+    <modules>
+      <module fileurl="file://$PROJECT_DIR$/.idea/newusertask.iml" filepath="$PROJECT_DIR$/.idea/newusertask.iml" />
+    </modules>
+  </component>
+</project>

+ 9 - 0
.idea/newusertask.iml

@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<module type="WEB_MODULE" version="4">
+  <component name="Go" enabled="true" />
+  <component name="NewModuleRootManager">
+    <content url="file://$MODULE_DIR$" />
+    <orderEntry type="inheritedJdk" />
+    <orderEntry type="sourceFolder" forTests="false" />
+  </component>
+</module>

+ 6 - 0
.idea/vcs.xml

@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project version="4">
+  <component name="VcsDirectoryMappings">
+    <mapping directory="$PROJECT_DIR$" vcs="Git" />
+  </component>
+</project>

+ 9 - 0
go.mod

@@ -0,0 +1,9 @@
+module newusertask
+
+go 1.20
+
+require (
+	github.com/google/go-querystring v1.1.0 // indirect
+	github.com/levigross/grequests v0.0.0-20231203190023-9c307ef1f48d // indirect
+	golang.org/x/net v0.34.0 // indirect
+)

+ 8 - 0
go.sum

@@ -0,0 +1,8 @@
+github.com/google/go-cmp v0.5.2/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
+github.com/google/go-querystring v1.1.0 h1:AnCroh3fv4ZBgVIf1Iwtovgjaw/GiKJo8M8yD/fhyJ8=
+github.com/google/go-querystring v1.1.0/go.mod h1:Kcdr2DB4koayq7X8pmAG4sNG59So17icRSOU623lUBU=
+github.com/levigross/grequests v0.0.0-20231203190023-9c307ef1f48d h1:8fVmm2qScPn4JAF/YdTtqrPP3n58FgZ4GbKTNfaPuRs=
+github.com/levigross/grequests v0.0.0-20231203190023-9c307ef1f48d/go.mod h1:dFu6nuJHC3u9kCDcyGrEL7LwhK2m6Mt+alyiiIjDrRY=
+golang.org/x/net v0.34.0 h1:Mb7Mrk043xzHgnRM88suvJFwzVrRfHEHJEl5/71CKw0=
+golang.org/x/net v0.34.0/go.mod h1:di0qlW3YNM5oh6GqDGQr92MyTozJPmybPK4Ev/Gm31k=
+golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=

+ 1 - 0
newuserGet/.gitattributes

@@ -0,0 +1 @@
+* linguist-language=GO

+ 19 - 0
newuserGet/.gitignore

@@ -0,0 +1,19 @@
+.buildpath
+.hgignore.swp
+.project
+.orig
+.swp
+.idea/
+.settings/
+.vscode/
+bin/
+**/.DS_Store
+gf
+main
+main.exe
+output/
+manifest/output/
+temp/
+temp.yaml
+bin
+**/config/config.yaml

+ 7 - 0
newuserGet/Makefile

@@ -0,0 +1,7 @@
+ROOT_DIR    = $(shell pwd)
+NAMESPACE   = "default"
+DEPLOY_NAME = "template-single"
+DOCKER_NAME = "template-single"
+
+include ./hack/hack-cli.mk
+include ./hack/hack.mk

+ 4 - 0
newuserGet/README.MD

@@ -0,0 +1,4 @@
+# GoFrame Template For SingleRepo
+
+Quick Start: 
+- https://goframe.org/quick

+ 15 - 0
newuserGet/api/hello/hello.go

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

+ 12 - 0
newuserGet/api/hello/v1/hello.go

@@ -0,0 +1,12 @@
+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"`
+}

+ 41 - 0
newuserGet/go.mod

@@ -0,0 +1,41 @@
+module newuserGet
+
+go 1.18
+
+require (
+	github.com/gogf/gf/contrib/drivers/clickhouse/v2 v2.8.3
+	github.com/gogf/gf/contrib/drivers/mysql/v2 v2.8.3
+	github.com/gogf/gf/v2 v2.8.3
+)
+
+require (
+	github.com/BurntSushi/toml v1.4.0 // indirect
+	github.com/ClickHouse/clickhouse-go/v2 v2.0.15 // indirect
+	github.com/clbanning/mxj/v2 v2.7.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.4.2 // indirect
+	github.com/go-logr/stdr v1.2.2 // indirect
+	github.com/go-sql-driver/mysql v1.7.1 // indirect
+	github.com/google/uuid v1.3.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.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.16 // indirect
+	github.com/olekukonko/tablewriter v0.0.5 // indirect
+	github.com/paulmach/orb v0.7.1 // indirect
+	github.com/pierrec/lz4/v4 v4.1.14 // indirect
+	github.com/rivo/uniseg v0.4.7 // indirect
+	github.com/shopspring/decimal v1.3.1 // indirect
+	go.opentelemetry.io/otel v1.24.0 // indirect
+	go.opentelemetry.io/otel/metric v1.24.0 // indirect
+	go.opentelemetry.io/otel/sdk v1.24.0 // indirect
+	go.opentelemetry.io/otel/trace v1.24.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
+)

+ 148 - 0
newuserGet/go.sum

@@ -0,0 +1,148 @@
+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/ClickHouse/clickhouse-go v1.5.4/go.mod h1:EaI/sW7Azgz9UATzd5ZdZHRUhHgv5+JMS9NSr2smCJI=
+github.com/ClickHouse/clickhouse-go/v2 v2.0.15 h1:lLAZliqrZEygkxosLaW1qHyeTb4Ho7fVCZ0WKCpLocU=
+github.com/ClickHouse/clickhouse-go/v2 v2.0.15/go.mod h1:Z21o82zD8FFqefOQDg93c0XITlxGbTsWQuRm588Azkk=
+github.com/StackExchange/wmi v0.0.0-20190523213315-cbe66965904d/go.mod h1:3eOhrUMpNV+6aFIbp5/iudMxNCF27Vw2OZgy4xEx0Fg=
+github.com/bkaradzic/go-lz4 v1.0.0/go.mod h1:0YdlkowM3VswSROI7qDxhRvJ3sLhlFrRRwjwegp5jy4=
+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/cloudflare/golz4 v0.0.0-20150217214814-ef862a3cdc58/go.mod h1:EOBUe0h4xcZ5GoxqC5SDxFQ8gwyZPKQoEzownBlhI80=
+github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
+github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
+github.com/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/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/go-ole/go-ole v1.2.4/go.mod h1:XCwSNxSkXRo4vlyPy93sltvi/qJq0jqQhjqQNIwKuxM=
+github.com/go-ole/go-ole v1.2.6/go.mod h1:pprOEPIfldk/42T2oK7lQ4v4JSDwmV0As9GaiUsvbm0=
+github.com/go-sql-driver/mysql v1.4.0/go.mod h1:zAC/RDZ24gD3HViQzih4MyKcchzm+sOG5ZlKdlhCg5w=
+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/clickhouse/v2 v2.8.3 h1:b/AQMTxiHKPHsidEdk471AC5pkfoK88a5cPmKnzE53U=
+github.com/gogf/gf/contrib/drivers/clickhouse/v2 v2.8.3/go.mod h1:qYrF+x5urXLhce3pMcUAyccIsw3Oec0htynoDE4Boi4=
+github.com/gogf/gf/contrib/drivers/mysql/v2 v2.8.3 h1:RtoBg5HWACFrgIrFkpzH94kxSd5EWefNAq5k6olNY6c=
+github.com/gogf/gf/contrib/drivers/mysql/v2 v2.8.3/go.mod h1:elZjckHRCejwml5Kdx2zfhOUDiAV3r5i4BgXcKAeH00=
+github.com/gogf/gf/v2 v2.8.3 h1:h9Px3lqJnnH6It0AqHRz4/1hx0JmvaSf1IvUir5x1rA=
+github.com/gogf/gf/v2 v2.8.3/go.mod h1:n++xPYGUUMadw6IygLEgGZqc6y6DRLrJKg5kqCrPLWY=
+github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q=
+github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk=
+github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
+github.com/google/go-cmp v0.5.7/go.mod h1:n+brtR0CgQNWTVd5ZUFpTBC8YFBDLK/h/bpaJ8/DtOE=
+github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI=
+github.com/google/uuid v1.3.0 h1:t6JiXgmwXMjEs8VusXIJk2BXHsn+wx8BZdTaoZ5fu7I=
+github.com/google/uuid v1.3.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
+github.com/gorilla/handlers v1.4.2/go.mod h1:Qkdc/uu4tH4g6mTK6auzZ766c4CA0Ng8+o/OAirnOIQ=
+github.com/gorilla/websocket v1.4.1/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE=
+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/jmoiron/sqlx v1.2.0/go.mod h1:1FEQNm3xlJgrMD+FBdI9+xvCksHtbpVBBw5dYhBSsks=
+github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8=
+github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck=
+github.com/lib/pq v1.0.0/go.mod h1:5WUZQaWbwv1U+lTReE5YruASi9Al49XbQIvNi/34Woo=
+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/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/mattn/go-sqlite3 v1.9.0/go.mod h1:FPy6KqzDD04eiIsT53CuJW3U88zkxoIYsOqkbpncsNc=
+github.com/mkevac/debugcharts v0.0.0-20191222103121-ae1c48aa8615/go.mod h1:Ad7oeElCZqA1Ufj0U9/liOF4BtVepxRcTvr2ey7zTvM=
+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/paulmach/orb v0.7.1 h1:Zha++Z5OX/l168sqHK3k4z18LDvr+YAO/VjK0ReQ9rU=
+github.com/paulmach/orb v0.7.1/go.mod h1:FWRlTgl88VI1RBx/MkrwWDRhQ96ctqMCh8boXhmqB/A=
+github.com/paulmach/protoscan v0.2.1/go.mod h1:SpcSwydNLrxUGSDvXvO0P7g7AuhJ7lcKfDlhJCDw2gY=
+github.com/pierrec/lz4 v2.0.5+incompatible/go.mod h1:pdkljMzZIN41W+lC3N2tnIh5sFi+IEE17M5jbnwPHcY=
+github.com/pierrec/lz4/v4 v4.1.14 h1:+fL8AQEZtz/ijeNnpduH0bROTu0O3NZAlPjQxGn8LwE=
+github.com/pierrec/lz4/v4 v4.1.14/go.mod h1:gZWDp/Ze/IJXGXf23ltt2EXimqmTUXEy0GFuRQyBid4=
+github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
+github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
+github.com/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/shirou/gopsutil v2.19.11+incompatible/go.mod h1:5b4v6he4MtMOwMlS0TUMTu2PcXUg8+E1lC7eC3UO/RA=
+github.com/shirou/gopsutil v3.21.11+incompatible/go.mod h1:5b4v6he4MtMOwMlS0TUMTu2PcXUg8+E1lC7eC3UO/RA=
+github.com/shirou/w32 v0.0.0-20160930032740-bb4de0191aa4/go.mod h1:qsXQc7+bwAM3Q1u/4XEfrquwF8Lw7D7y5cD8CuHnfIc=
+github.com/shopspring/decimal v1.3.1 h1:2Usl1nmF/WZucqkFZhnfFYxxxu8LG21F6nPQBE5gKV8=
+github.com/shopspring/decimal v1.3.1/go.mod h1:DKyhrW/HYNuLGql+MJL6WCR6knT2jwCFRcu2hWCYk4o=
+github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
+github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI=
+github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4=
+github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
+github.com/stretchr/testify v1.7.2/go.mod h1:R6va5+xMeoiuVRoj+gSkQ7d3FALtqAAGI1FQKckRals=
+github.com/stretchr/testify v1.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcUk=
+github.com/tklauser/go-sysconf v0.3.10/go.mod h1:C8XykCvCb+Gn0oNCWPIlcb0RuglQTYaQ2hGm7jmxEFk=
+github.com/tklauser/numcpus v0.4.0/go.mod h1:1+UI3pD8NW14VMwdgJNJ1ESk2UnwhAnz5hMwiKKqXCQ=
+github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
+github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
+github.com/yusufpapurcu/wmi v1.2.2/go.mod h1:SBZ9tNy3G9/m5Oi98Zks0QjeHVDvuK0qfxQmPyzfmi0=
+go.opentelemetry.io/otel v1.7.0/go.mod h1:5BdUoMIz5WEs0vt0CUEMtSSaTSHBBVwrhnz7+nrD5xk=
+go.opentelemetry.io/otel v1.24.0 h1:0LAOdjNmQeSTzGBzduGe/rU4tZhMwL5rWgtp9Ku5Jfo=
+go.opentelemetry.io/otel v1.24.0/go.mod h1:W7b9Ozg4nkF5tWI5zsXkaKKDjdVjpD4oAt9Qi/MArHo=
+go.opentelemetry.io/otel/metric v1.24.0 h1:6EhoGWWK28x1fbpA4tYTOWBkPefTDQnb8WSGXlc88kI=
+go.opentelemetry.io/otel/metric v1.24.0/go.mod h1:VYhLe1rFfxuTXLgj4CBiyz+9WYBA8pNGJgDcSFRKBco=
+go.opentelemetry.io/otel/sdk v1.24.0 h1:YMPPDNymmQN3ZgczicBY3B6sf9n62Dlj9pWD3ucgoDw=
+go.opentelemetry.io/otel/sdk v1.24.0/go.mod h1:KVrIYw6tEubO9E96HQpcmpTKDVn9gdv35HoYiQWGDFg=
+go.opentelemetry.io/otel/trace v1.7.0/go.mod h1:fzLSB9nqR2eXzxPXb2JW9IKE+ScyXA48yyE4TNvoHqU=
+go.opentelemetry.io/otel/trace v1.24.0 h1:CsKnnL4dUAr/0llH9FKuc698G04IrpWV0MQA/Y1YELI=
+go.opentelemetry.io/otel/trace v1.24.0/go.mod h1:HPc3Xr/cOApsBI154IU0OI0HJexz+aw5uPdbs3UCjNU=
+golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
+golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=
+golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto=
+golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
+golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
+golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=
+golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
+golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
+golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU=
+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/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
+golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
+golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
+golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
+golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
+golang.org/x/sys v0.0.0-20190916202348-b4ddaad3f8a3/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
+golang.org/x/sys v0.0.0-20191220220014-0732a990476f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
+golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
+golang.org/x/sys v0.0.0-20220128215802-99c3d69c2c27/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
+golang.org/x/sys v0.0.0-20220429233432-b5fbb4746d32/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
+golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
+golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
+golang.org/x/sys v0.28.0 h1:Fksou7UEQUWlKvIdsqzJmUmCX3cZuD2+P3XyyzwMhlA=
+golang.org/x/sys v0.28.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
+golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
+golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
+golang.org/x/text v0.21.0 h1:zyQAAkrwaneQ066sspRyJaG9VNi/YJ1NfzcGB3hZ/qo=
+golang.org/x/text v0.21.0/go.mod h1:4IBbMaMmOPCJ8SecivzSH54+73PCFmPWxNTLm+vZkEQ=
+golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
+golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
+golang.org/x/tools v0.0.0-20200619180055-7c47624df98f/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE=
+golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA=
+golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
+golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
+golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
+golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
+google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw=
+google.golang.org/protobuf v1.27.1/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc=
+gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405 h1:yhCVgyC4o1eVCa2tZl7eS0r+SDo693bJlVdllGtEeKM=
+gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
+gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
+gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
+gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA=
+gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=

+ 22 - 0
newuserGet/hack/config.yaml

@@ -0,0 +1,22 @@
+
+# CLI tool, only in development environment.
+# https://goframe.org/docs/cli
+gfcli:
+  gen:
+    dao:
+      - link: "mysql:root:=PDT49#80Z!RVv52_z@tcp(192.168.3.14:4000)/jianyu"
+        descriptionTag: true
+        tables: "new_user_send_log,new_user_send_rule"
+      - link: "clickhouse:jytop:pwdTopJy123@tcp(192.168.3.207:19000)/pub_tags"
+        descriptionTag: true
+        tables: "dwd_d_user_tag,dwd_mgo_position"
+        group: tags
+      - link: "mysql:root:=PDT49#80Z!RVv52_z@tcp(192.168.3.14:4000)/Call_Accounting_test"
+        descriptionTag: true
+        tables: "voice_record"
+        group: call
+
+  docker:
+    build: "-a amd64 -s linux -p temp -ew"
+    tagPrefixes:
+      - my.image.pub/my-app

+ 20 - 0
newuserGet/hack/hack-cli.mk

@@ -0,0 +1,20 @@
+
+# Install/Update to the latest CLI tool.
+.PHONY: cli
+cli:
+	@set -e; \
+	wget -O gf \
+	https://github.com/gogf/gf/releases/latest/download/gf_$(shell go env GOOS)_$(shell go env GOARCH) && \
+	chmod +x gf && \
+	./gf install -y && \
+	rm ./gf
+
+
+# Check and install CLI tool.
+.PHONY: cli.install
+cli.install:
+	@set -e; \
+	gf -v > /dev/null 2>&1 || if [[ "$?" -ne "0" ]]; then \
+  		echo "GoFame CLI is not installed, start proceeding auto installation..."; \
+		make cli; \
+	fi;

+ 75 - 0
newuserGet/hack/hack.mk

@@ -0,0 +1,75 @@
+.DEFAULT_GOAL := build
+
+# Update GoFrame and its CLI to latest stable version.
+.PHONY: up
+up: cli.install
+	@gf up -a
+
+# Build binary using configuration from hack/config.yaml.
+.PHONY: build
+build: cli.install
+	@gf build -ew
+
+# Parse api and generate controller/sdk.
+.PHONY: ctrl
+ctrl: cli.install
+	@gf gen ctrl
+
+# Generate Go files for DAO/DO/Entity.
+.PHONY: dao
+dao: cli.install
+	@gf gen dao
+
+# Parse current project go files and generate enums go file.
+.PHONY: enums
+enums: cli.install
+	@gf gen enums
+
+# Generate Go files for Service.
+.PHONY: service
+service: cli.install
+	@gf gen service
+
+
+# Build docker image.
+.PHONY: image
+image: cli.install
+	$(eval _TAG  = $(shell git rev-parse --short HEAD))
+ifneq (, $(shell git status --porcelain 2>/dev/null))
+	$(eval _TAG  = $(_TAG).dirty)
+endif
+	$(eval _TAG  = $(if ${TAG},  ${TAG}, $(_TAG)))
+	$(eval _PUSH = $(if ${PUSH}, ${PUSH}, ))
+	@gf docker ${_PUSH} -tn $(DOCKER_NAME):${_TAG};
+
+
+# Build docker image and automatically push to docker repo.
+.PHONY: image.push
+image.push: cli.install
+	@make image PUSH=-p;
+
+
+# Deploy image and yaml to current kubectl environment.
+.PHONY: deploy
+deploy: cli.install
+	$(eval _TAG = $(if ${TAG},  ${TAG}, develop))
+
+	@set -e; \
+	mkdir -p $(ROOT_DIR)/temp/kustomize;\
+	cd $(ROOT_DIR)/manifest/deploy/kustomize/overlays/${_ENV};\
+	kustomize build > $(ROOT_DIR)/temp/kustomize.yaml;\
+	kubectl   apply -f $(ROOT_DIR)/temp/kustomize.yaml; \
+	if [ $(DEPLOY_NAME) != "" ]; then \
+		kubectl patch -n $(NAMESPACE) deployment/$(DEPLOY_NAME) -p "{\"spec\":{\"template\":{\"metadata\":{\"labels\":{\"date\":\"$(shell date +%s)\"}}}}}"; \
+	fi;
+
+
+# Parsing protobuf files and generating go files.
+.PHONY: pb
+pb: cli.install
+	@gf gen pb
+
+# Generate protobuf files for database tables.
+.PHONY: pbentity
+pbentity: cli.install
+	@gf gen pbentity

+ 30 - 0
newuserGet/internal/cmd/cmd.go

@@ -0,0 +1,30 @@
+package cmd
+
+import (
+	"context"
+
+	"github.com/gogf/gf/v2/frame/g"
+	"github.com/gogf/gf/v2/net/ghttp"
+	"github.com/gogf/gf/v2/os/gcmd"
+
+	"newuserGet/internal/controller/hello"
+)
+
+var (
+	Main = gcmd.Command{
+		Name:  "main",
+		Usage: "main",
+		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.Run()
+			return nil
+		},
+	}
+)

+ 1 - 0
newuserGet/internal/consts/consts.go

@@ -0,0 +1 @@
+package consts

+ 5 - 0
newuserGet/internal/controller/hello/hello.go

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

+ 16 - 0
newuserGet/internal/controller/hello/hello_new.go

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

+ 13 - 0
newuserGet/internal/controller/hello/hello_v1_hello.go

@@ -0,0 +1,13 @@
+package hello
+
+import (
+	"context"
+	"github.com/gogf/gf/v2/frame/g"
+
+	"newuserGet/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
+}

+ 0 - 0
newuserGet/internal/dao/.gitkeep


+ 27 - 0
newuserGet/internal/dao/dwd_d_user_tag.go

@@ -0,0 +1,27 @@
+// =================================================================================
+// This file is auto-generated by the GoFrame CLI tool. You may modify it as needed.
+// =================================================================================
+
+package dao
+
+import (
+	"newuserGet/internal/dao/internal"
+)
+
+// internalDwdDUserTagDao is an internal type for wrapping the internal DAO implementation.
+type internalDwdDUserTagDao = *internal.DwdDUserTagDao
+
+// dwdDUserTagDao is the data access object for the table dwd_d_user_tag.
+// You can define custom methods on it to extend its functionality as needed.
+type dwdDUserTagDao struct {
+	internalDwdDUserTagDao
+}
+
+var (
+	// DwdDUserTag is a globally accessible object for table dwd_d_user_tag operations.
+	DwdDUserTag = dwdDUserTagDao{
+		internal.NewDwdDUserTagDao(),
+	}
+)
+
+// Add your custom methods and functionality below.

+ 27 - 0
newuserGet/internal/dao/dwd_mgo_position.go

@@ -0,0 +1,27 @@
+// =================================================================================
+// This file is auto-generated by the GoFrame CLI tool. You may modify it as needed.
+// =================================================================================
+
+package dao
+
+import (
+	"newuserGet/internal/dao/internal"
+)
+
+// internalDwdMgoPositionDao is an internal type for wrapping the internal DAO implementation.
+type internalDwdMgoPositionDao = *internal.DwdMgoPositionDao
+
+// dwdMgoPositionDao is the data access object for the table dwd_mgo_position.
+// You can define custom methods on it to extend its functionality as needed.
+type dwdMgoPositionDao struct {
+	internalDwdMgoPositionDao
+}
+
+var (
+	// DwdMgoPosition is a globally accessible object for table dwd_mgo_position operations.
+	DwdMgoPosition = dwdMgoPositionDao{
+		internal.NewDwdMgoPositionDao(),
+	}
+)
+
+// Add your custom methods and functionality below.

+ 75 - 0
newuserGet/internal/dao/internal/dwd_d_user_tag.go

@@ -0,0 +1,75 @@
+// ==========================================================================
+// 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"
+)
+
+// DwdDUserTagDao is the data access object for the table dwd_d_user_tag.
+type DwdDUserTagDao struct {
+	table   string             // table is the underlying table name of the DAO.
+	group   string             // group is the database configuration group name of the current DAO.
+	columns DwdDUserTagColumns // columns contains all the column names of Table for convenient usage.
+}
+
+// DwdDUserTagColumns defines and stores column names for the table dwd_d_user_tag.
+type DwdDUserTagColumns struct {
+	BaseUserId string //
+	Bitobj     string //
+}
+
+// dwdDUserTagColumns holds the columns for the table dwd_d_user_tag.
+var dwdDUserTagColumns = DwdDUserTagColumns{
+	BaseUserId: "baseUserId",
+	Bitobj:     "bitobj",
+}
+
+// NewDwdDUserTagDao creates and returns a new DAO object for table data access.
+func NewDwdDUserTagDao() *DwdDUserTagDao {
+	return &DwdDUserTagDao{
+		group:   "tags",
+		table:   "dwd_d_user_tag",
+		columns: dwdDUserTagColumns,
+	}
+}
+
+// DB retrieves and returns the underlying raw database management object of the current DAO.
+func (dao *DwdDUserTagDao) DB() gdb.DB {
+	return g.DB(dao.group)
+}
+
+// Table returns the table name of the current DAO.
+func (dao *DwdDUserTagDao) Table() string {
+	return dao.table
+}
+
+// Columns returns all column names of the current DAO.
+func (dao *DwdDUserTagDao) Columns() DwdDUserTagColumns {
+	return dao.columns
+}
+
+// Group returns the database configuration group name of the current DAO.
+func (dao *DwdDUserTagDao) Group() string {
+	return dao.group
+}
+
+// Ctx creates and returns a Model for the current DAO. It automatically sets the context for the current operation.
+func (dao *DwdDUserTagDao) Ctx(ctx context.Context) *gdb.Model {
+	return dao.DB().Model(dao.table).Safe().Ctx(ctx)
+}
+
+// Transaction wraps the transaction logic using function f.
+// It rolls back the transaction and returns the error if function f returns a non-nil error.
+// It commits the transaction and returns nil if function f returns nil.
+//
+// Note: Do not commit or roll back the transaction in function f,
+// as it is automatically handled by this function.
+func (dao *DwdDUserTagDao) Transaction(ctx context.Context, f func(ctx context.Context, tx gdb.TX) error) (err error) {
+	return dao.Ctx(ctx).Transaction(ctx, f)
+}

+ 83 - 0
newuserGet/internal/dao/internal/dwd_mgo_position.go

@@ -0,0 +1,83 @@
+// ==========================================================================
+// 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"
+)
+
+// DwdMgoPositionDao is the data access object for the table dwd_mgo_position.
+type DwdMgoPositionDao struct {
+	table   string                // table is the underlying table name of the DAO.
+	group   string                // group is the database configuration group name of the current DAO.
+	columns DwdMgoPositionColumns // columns contains all the column names of Table for convenient usage.
+}
+
+// DwdMgoPositionColumns defines and stores column names for the table dwd_mgo_position.
+type DwdMgoPositionColumns struct {
+	MgoUserId    string //
+	PositionId   string //
+	BaseUserId   string //
+	Phone        string //
+	RegisterTime string //
+	Type         string //
+}
+
+// dwdMgoPositionColumns holds the columns for the table dwd_mgo_position.
+var dwdMgoPositionColumns = DwdMgoPositionColumns{
+	MgoUserId:    "mgoUserId",
+	PositionId:   "positionId",
+	BaseUserId:   "baseUserId",
+	Phone:        "phone",
+	RegisterTime: "register_time",
+	Type:         "type",
+}
+
+// NewDwdMgoPositionDao creates and returns a new DAO object for table data access.
+func NewDwdMgoPositionDao() *DwdMgoPositionDao {
+	return &DwdMgoPositionDao{
+		group:   "tags",
+		table:   "dwd_mgo_position",
+		columns: dwdMgoPositionColumns,
+	}
+}
+
+// DB retrieves and returns the underlying raw database management object of the current DAO.
+func (dao *DwdMgoPositionDao) DB() gdb.DB {
+	return g.DB(dao.group)
+}
+
+// Table returns the table name of the current DAO.
+func (dao *DwdMgoPositionDao) Table() string {
+	return dao.table
+}
+
+// Columns returns all column names of the current DAO.
+func (dao *DwdMgoPositionDao) Columns() DwdMgoPositionColumns {
+	return dao.columns
+}
+
+// Group returns the database configuration group name of the current DAO.
+func (dao *DwdMgoPositionDao) Group() string {
+	return dao.group
+}
+
+// Ctx creates and returns a Model for the current DAO. It automatically sets the context for the current operation.
+func (dao *DwdMgoPositionDao) Ctx(ctx context.Context) *gdb.Model {
+	return dao.DB().Model(dao.table).Safe().Ctx(ctx)
+}
+
+// Transaction wraps the transaction logic using function f.
+// It rolls back the transaction and returns the error if function f returns a non-nil error.
+// It commits the transaction and returns nil if function f returns nil.
+//
+// Note: Do not commit or roll back the transaction in function f,
+// as it is automatically handled by this function.
+func (dao *DwdMgoPositionDao) Transaction(ctx context.Context, f func(ctx context.Context, tx gdb.TX) error) (err error) {
+	return dao.Ctx(ctx).Transaction(ctx, f)
+}

+ 85 - 0
newuserGet/internal/dao/internal/new_user_send_log.go

@@ -0,0 +1,85 @@
+// ==========================================================================
+// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT.
+// ==========================================================================
+
+package internal
+
+import (
+	"context"
+
+	"github.com/gogf/gf/v2/database/gdb"
+	"github.com/gogf/gf/v2/frame/g"
+)
+
+// NewUserSendLogDao is the data access object for the table new_user_send_log.
+type NewUserSendLogDao struct {
+	table   string                // table is the underlying table name of the DAO.
+	group   string                // group is the database configuration group name of the current DAO.
+	columns NewUserSendLogColumns // columns contains all the column names of Table for convenient usage.
+}
+
+// NewUserSendLogColumns defines and stores column names for the table new_user_send_log.
+type NewUserSendLogColumns struct {
+	Id         string // 新注册用户发送记录表
+	UserId     string // mgo库的id
+	Phone      string //
+	RuleId     string // 规则表id
+	State      string // 发送状态:-1 :取消发送 0:待发送 1:已发送
+	CreateTime string //
+	UpdateTime string //
+}
+
+// newUserSendLogColumns holds the columns for the table new_user_send_log.
+var newUserSendLogColumns = NewUserSendLogColumns{
+	Id:         "id",
+	UserId:     "user_id",
+	Phone:      "phone",
+	RuleId:     "rule_id",
+	State:      "state",
+	CreateTime: "create_time",
+	UpdateTime: "update_time",
+}
+
+// NewNewUserSendLogDao creates and returns a new DAO object for table data access.
+func NewNewUserSendLogDao() *NewUserSendLogDao {
+	return &NewUserSendLogDao{
+		group:   "default",
+		table:   "new_user_send_log",
+		columns: newUserSendLogColumns,
+	}
+}
+
+// DB retrieves and returns the underlying raw database management object of the current DAO.
+func (dao *NewUserSendLogDao) DB() gdb.DB {
+	return g.DB(dao.group)
+}
+
+// Table returns the table name of the current DAO.
+func (dao *NewUserSendLogDao) Table() string {
+	return dao.table
+}
+
+// Columns returns all column names of the current DAO.
+func (dao *NewUserSendLogDao) Columns() NewUserSendLogColumns {
+	return dao.columns
+}
+
+// Group returns the database configuration group name of the current DAO.
+func (dao *NewUserSendLogDao) Group() string {
+	return dao.group
+}
+
+// Ctx creates and returns a Model for the current DAO. It automatically sets the context for the current operation.
+func (dao *NewUserSendLogDao) Ctx(ctx context.Context) *gdb.Model {
+	return dao.DB().Model(dao.table).Safe().Ctx(ctx)
+}
+
+// Transaction wraps the transaction logic using function f.
+// It rolls back the transaction and returns the error if function f returns a non-nil error.
+// It commits the transaction and returns nil if function f returns nil.
+//
+// Note: Do not commit or roll back the transaction in function f,
+// as it is automatically handled by this function.
+func (dao *NewUserSendLogDao) Transaction(ctx context.Context, f func(ctx context.Context, tx gdb.TX) error) (err error) {
+	return dao.Ctx(ctx).Transaction(ctx, f)
+}

+ 87 - 0
newuserGet/internal/dao/internal/new_user_send_rule.go

@@ -0,0 +1,87 @@
+// ==========================================================================
+// 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"
+)
+
+// NewUserSendRuleDao is the data access object for the table new_user_send_rule.
+type NewUserSendRuleDao struct {
+	table   string                 // table is the underlying table name of the DAO.
+	group   string                 // group is the database configuration group name of the current DAO.
+	columns NewUserSendRuleColumns // columns contains all the column names of Table for convenient usage.
+}
+
+// NewUserSendRuleColumns defines and stores column names for the table new_user_send_rule.
+type NewUserSendRuleColumns struct {
+	Id             string //
+	Name           string // 规则名称
+	RegisterTagIds string // 注册标签id,多个时使用逗号分割
+	CallState      string // 外呼状态 多个时使用逗号分割
+	BehaviorTagIds string // 行为标签id,多个时逗号分割
+	CreateTime     string //
+	UpdateTime     string //
+	Trailstatus    string // 销售进程,jianyu_subjectdb_test.dwd_f_crm_clue_info  00-无意向,09-拒绝沟通
+}
+
+// newUserSendRuleColumns holds the columns for the table new_user_send_rule.
+var newUserSendRuleColumns = NewUserSendRuleColumns{
+	Id:             "id",
+	Name:           "name",
+	RegisterTagIds: "register_tag_ids",
+	CallState:      "call_state",
+	BehaviorTagIds: "behavior_tag_ids",
+	CreateTime:     "create_time",
+	UpdateTime:     "update_time",
+	Trailstatus:    "trailstatus",
+}
+
+// NewNewUserSendRuleDao creates and returns a new DAO object for table data access.
+func NewNewUserSendRuleDao() *NewUserSendRuleDao {
+	return &NewUserSendRuleDao{
+		group:   "default",
+		table:   "new_user_send_rule",
+		columns: newUserSendRuleColumns,
+	}
+}
+
+// DB retrieves and returns the underlying raw database management object of the current DAO.
+func (dao *NewUserSendRuleDao) DB() gdb.DB {
+	return g.DB(dao.group)
+}
+
+// Table returns the table name of the current DAO.
+func (dao *NewUserSendRuleDao) Table() string {
+	return dao.table
+}
+
+// Columns returns all column names of the current DAO.
+func (dao *NewUserSendRuleDao) Columns() NewUserSendRuleColumns {
+	return dao.columns
+}
+
+// Group returns the database configuration group name of the current DAO.
+func (dao *NewUserSendRuleDao) Group() string {
+	return dao.group
+}
+
+// Ctx creates and returns a Model for the current DAO. It automatically sets the context for the current operation.
+func (dao *NewUserSendRuleDao) Ctx(ctx context.Context) *gdb.Model {
+	return dao.DB().Model(dao.table).Safe().Ctx(ctx)
+}
+
+// Transaction wraps the transaction logic using function f.
+// It rolls back the transaction and returns the error if function f returns a non-nil error.
+// It commits the transaction and returns nil if function f returns nil.
+//
+// Note: Do not commit or roll back the transaction in function f,
+// as it is automatically handled by this function.
+func (dao *NewUserSendRuleDao) Transaction(ctx context.Context, f func(ctx context.Context, tx gdb.TX) error) (err error) {
+	return dao.Ctx(ctx).Transaction(ctx, f)
+}

+ 171 - 0
newuserGet/internal/dao/internal/voice_record.go

@@ -0,0 +1,171 @@
+// ==========================================================================
+// 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"
+)
+
+// VoiceRecordDao is the data access object for the table voice_record.
+type VoiceRecordDao struct {
+	table   string             // table is the underlying table name of the DAO.
+	group   string             // group is the database configuration group name of the current DAO.
+	columns VoiceRecordColumns // columns contains all the column names of Table for convenient usage.
+}
+
+// VoiceRecordColumns defines and stores column names for the table voice_record.
+type VoiceRecordColumns struct {
+	Id                 string // 记录ID
+	CreateTime         string // 创建时间
+	CallSheetID        string // 通话记录的ID
+	CallID             string // 通话ID
+	CustomerName       string // 客户名称
+	CustomerID         string // 客户ID
+	CallType           string // 呼叫类型
+	CallNo             string // 主叫号码
+	CalledNo           string // 被叫号码
+	Ring               string // 开始呼叫时间
+	RingingTime        string // 响铃时间
+	Begin              string // 摘机接通时间
+	End                string // 通话结束时间
+	CallTimeLength     string // 通话时长(单元:秒)
+	QueueTime          string // 呼入来电进入技能组时间
+	Queue              string // 呼入来电进入的技能组
+	QueueId            string // 呼入来电进入的技能组号
+	AccountID          string // 账户ID
+	ActionID           string // 请求ID
+	Agent              string // 坐席登录名
+	Exten              string // 坐席工号
+	State              string // 通话记录状态
+	MonitorFilename    string // 录音文件链接地址
+	RecordFile         string // 录音文件名
+	FileServer         string // 录音文件地址
+	Pbx                string // 坐席所在的PBX
+	AgentName          string // 坐席姓名
+	DepartmentName     string // 坐席所在部门名称
+	CallState          string // 事件状态
+	RealState          string // 内部处理参数
+	Province           string // 省份
+	District           string // 市区
+	IsInQueue          string // 是否进入技能组
+	Ivrkey             string // IVR按键值
+	IVRKeyName         string // IVR按键名称
+	Hanguper           string // 挂断方,CALLER:主叫,CALLEE:被叫,SYSTEMTRANSFER:系统转接,TRANSFEROUTER:转接外线,AGENT:坐席,CUSTOMER:客户
+	Uptimestamp        string // 坐席接起电话的时间戳
+	DisposalAgentLocal string // 接听坐席的直线号码
+	LastIVRNode        string // 终结节点
+	Investigate        string // 满意度按键值
+	HangupCause        string // 通话拦截原因
+	HangupCauseDetail  string // 外呼防骚扰拦截原因
+	DoMainName         string // 通话服务器域名
+	TaskId             string // 表单批量任务ID
+	FormId             string // 表单ID
+	Callrescode        string // 表单ID_1
+	Detail             string // 表单ID_2
+	OriginalFromCID    string // 表单ID_3
+	CallText           string // 通话内容
+	CallHistoryId      string //
+}
+
+// voiceRecordColumns holds the columns for the table voice_record.
+var voiceRecordColumns = VoiceRecordColumns{
+	Id:                 "id",
+	CreateTime:         "createTime",
+	CallSheetID:        "CallSheetID",
+	CallID:             "CallID",
+	CustomerName:       "CustomerName",
+	CustomerID:         "CustomerID",
+	CallType:           "CallType",
+	CallNo:             "CallNo",
+	CalledNo:           "CalledNo",
+	Ring:               "Ring",
+	RingingTime:        "RingingTime",
+	Begin:              "Begin",
+	End:                "End",
+	CallTimeLength:     "CallTimeLength",
+	QueueTime:          "QueueTime",
+	Queue:              "Queue",
+	QueueId:            "QueueId",
+	AccountID:          "AccountID",
+	ActionID:           "ActionID",
+	Agent:              "Agent",
+	Exten:              "Exten",
+	State:              "State",
+	MonitorFilename:    "MonitorFilename",
+	RecordFile:         "RecordFile",
+	FileServer:         "FileServer",
+	Pbx:                "PBX",
+	AgentName:          "AgentName",
+	DepartmentName:     "DepartmentName",
+	CallState:          "CallState",
+	RealState:          "RealState",
+	Province:           "Province",
+	District:           "District",
+	IsInQueue:          "isInQueue",
+	Ivrkey:             "IVRKEY",
+	IVRKeyName:         "IVRKeyName",
+	Hanguper:           "Hanguper",
+	Uptimestamp:        "uptimestamp",
+	DisposalAgentLocal: "DisposalAgentLocal",
+	LastIVRNode:        "LastIVRNode",
+	Investigate:        "Investigate",
+	HangupCause:        "HangupCause",
+	HangupCauseDetail:  "HangupCauseDetail",
+	DoMainName:         "DoMainName",
+	TaskId:             "TASK_ID",
+	FormId:             "FORM_ID",
+	Callrescode:        "callrescode",
+	Detail:             "detail",
+	OriginalFromCID:    "OriginalFromCID",
+	CallText:           "callText",
+	CallHistoryId:      "callHistoryId",
+}
+
+// NewVoiceRecordDao creates and returns a new DAO object for table data access.
+func NewVoiceRecordDao() *VoiceRecordDao {
+	return &VoiceRecordDao{
+		group:   "call",
+		table:   "voice_record",
+		columns: voiceRecordColumns,
+	}
+}
+
+// DB retrieves and returns the underlying raw database management object of the current DAO.
+func (dao *VoiceRecordDao) DB() gdb.DB {
+	return g.DB(dao.group)
+}
+
+// Table returns the table name of the current DAO.
+func (dao *VoiceRecordDao) Table() string {
+	return dao.table
+}
+
+// Columns returns all column names of the current DAO.
+func (dao *VoiceRecordDao) Columns() VoiceRecordColumns {
+	return dao.columns
+}
+
+// Group returns the database configuration group name of the current DAO.
+func (dao *VoiceRecordDao) Group() string {
+	return dao.group
+}
+
+// Ctx creates and returns a Model for the current DAO. It automatically sets the context for the current operation.
+func (dao *VoiceRecordDao) Ctx(ctx context.Context) *gdb.Model {
+	return dao.DB().Model(dao.table).Safe().Ctx(ctx)
+}
+
+// Transaction wraps the transaction logic using function f.
+// It rolls back the transaction and returns the error if function f returns a non-nil error.
+// It commits the transaction and returns nil if function f returns nil.
+//
+// Note: Do not commit or roll back the transaction in function f,
+// as it is automatically handled by this function.
+func (dao *VoiceRecordDao) Transaction(ctx context.Context, f func(ctx context.Context, tx gdb.TX) error) (err error) {
+	return dao.Ctx(ctx).Transaction(ctx, f)
+}

+ 27 - 0
newuserGet/internal/dao/new_user_send_log.go

@@ -0,0 +1,27 @@
+// =================================================================================
+// This file is auto-generated by the GoFrame CLI tool. You may modify it as needed.
+// =================================================================================
+
+package dao
+
+import (
+	"newuserGet/internal/dao/internal"
+)
+
+// internalNewUserSendLogDao is an internal type for wrapping the internal DAO implementation.
+type internalNewUserSendLogDao = *internal.NewUserSendLogDao
+
+// newUserSendLogDao is the data access object for the table new_user_send_log.
+// You can define custom methods on it to extend its functionality as needed.
+type newUserSendLogDao struct {
+	internalNewUserSendLogDao
+}
+
+var (
+	// NewUserSendLog is a globally accessible object for table new_user_send_log operations.
+	NewUserSendLog = newUserSendLogDao{
+		internal.NewNewUserSendLogDao(),
+	}
+)
+
+// Add your custom methods and functionality below.

+ 27 - 0
newuserGet/internal/dao/new_user_send_rule.go

@@ -0,0 +1,27 @@
+// =================================================================================
+// This file is auto-generated by the GoFrame CLI tool. You may modify it as needed.
+// =================================================================================
+
+package dao
+
+import (
+	"newuserGet/internal/dao/internal"
+)
+
+// internalNewUserSendRuleDao is an internal type for wrapping the internal DAO implementation.
+type internalNewUserSendRuleDao = *internal.NewUserSendRuleDao
+
+// newUserSendRuleDao is the data access object for the table new_user_send_rule.
+// You can define custom methods on it to extend its functionality as needed.
+type newUserSendRuleDao struct {
+	internalNewUserSendRuleDao
+}
+
+var (
+	// NewUserSendRule is a globally accessible object for table new_user_send_rule operations.
+	NewUserSendRule = newUserSendRuleDao{
+		internal.NewNewUserSendRuleDao(),
+	}
+)
+
+// Add your custom methods and functionality below.

+ 27 - 0
newuserGet/internal/dao/voice_record.go

@@ -0,0 +1,27 @@
+// =================================================================================
+// This file is auto-generated by the GoFrame CLI tool. You may modify it as needed.
+// =================================================================================
+
+package dao
+
+import (
+	"newuserGet/internal/dao/internal"
+)
+
+// internalVoiceRecordDao is an internal type for wrapping the internal DAO implementation.
+type internalVoiceRecordDao = *internal.VoiceRecordDao
+
+// voiceRecordDao is the data access object for the table voice_record.
+// You can define custom methods on it to extend its functionality as needed.
+type voiceRecordDao struct {
+	internalVoiceRecordDao
+}
+
+var (
+	// VoiceRecord is a globally accessible object for table voice_record operations.
+	VoiceRecord = voiceRecordDao{
+		internal.NewVoiceRecordDao(),
+	}
+)
+
+// Add your custom methods and functionality below.

+ 0 - 0
newuserGet/internal/logic/.gitkeep


+ 185 - 0
newuserGet/internal/logic/task.go

@@ -0,0 +1,185 @@
+package logic
+
+import (
+	"context"
+	"errors"
+	"fmt"
+	"github.com/gogf/gf/v2/frame/g"
+	"github.com/gogf/gf/v2/os/gtime"
+	"newuserGet/internal/dao"
+	"newuserGet/internal/model/do"
+	"newuserGet/internal/model/entity"
+	"strings"
+	"time"
+)
+
+func Task(ctx context.Context) {
+	// get rule
+	var rules []entity.NewUserSendRule
+	err := dao.NewUserSendRule.Ctx(ctx).Scan(&rules)
+	if err != nil {
+		g.Log().Error(ctx, "获取规则失败", err)
+		return
+	}
+	// 遍历规则
+	for i := 0; i < len(rules); i++ {
+		g.Log().Infof(ctx, "开始处理第%v个规则:id-%v name:%v \n", i, rules[i].Id, rules[i].Name)
+		// 获取注册时间规则用户和过滤行为
+		userList, err := getFromRegisterBehavior(ctx, rules[i])
+		if err != nil {
+			g.Log().Error(ctx, err)
+			continue
+		}
+		if len(userList) == 0 {
+			g.Log().Info(ctx, "当前规则getFromRegisterBehavior未获取到有效用户", rules[i].Id, rules[i].Name)
+			continue
+		}
+		if rules[i].CallState != "" {
+			// 过滤外呼状态
+			userList, err = filterCallState(ctx, rules[i], userList)
+			if err != nil {
+				g.Log().Error(ctx, err)
+				continue
+			}
+			if len(userList) == 0 {
+				g.Log().Info(ctx, "当前规则filterCallState未获取到有效用户", rules[i].Id, rules[i].Name)
+				continue
+			}
+		}
+
+		// 过滤销售进程
+		userList = filterTrailStatus(ctx, rules[i], userList)
+		// 保存用户
+		saveList := []do.NewUserSendLog{}
+		for j := 0; j <= len(userList); j++ {
+			saveList = append(saveList, do.NewUserSendLog{
+				Phone:      userList[j].Phone,
+				UserId:     userList[j].MgoId,
+				CreateTime: gtime.Now(),
+			})
+		}
+		g.Log().Infof(ctx, "完成--第%v个规则:id-%v name:%v \n", i, rules[i].Id, rules[i].Name)
+
+	}
+
+}
+
+type User struct {
+	Phone string `json:"phone"`
+	MgoId string `json:"mgoId"`
+}
+
+const (
+	OrSQL          = "SELECT  bitobj from pub_tags.dwd_d_tag ddt WHERE  ddt.id in (%s) "
+	BitMapSQL      = "SELECT bitmapAnd((%s),(%s)) as userIds"
+	QueryUserIdSQL = `SELECT
+	DISTINCT dmp.mgoUserId as mgoId,dmp.phone as phone
+from
+	pub_tags.dwd_mgo_position dmp
+WHERE
+	bitmapHasAny( (%s),
+	bitmapBuild([toUInt64(dmp.baseUserId)]))  and dmp.mgoUserId!='' and dmp.phone!='';`
+	CallStateNotDialed = "0"       // 未拨打
+	CallStateNotDeal   = "notDeal" // 振铃未接通
+	CallStateIvr       = "ivr"     // ivr
+	CallStatDealing    = "dealing" //已接听
+)
+
+// 通过时间和行为计算用户
+func getFromRegisterBehavior(ctx context.Context, rule entity.NewUserSendRule) (userList []*User, err error) {
+	start := time.Now()
+	defer func() {
+		g.Log().Info(ctx, "getFromRegisterBehavior 耗时:", time.Since(start))
+
+	}()
+	//   时间标签并 之后与行为标签交
+	// 处理注册时间标签
+	if rule.RegisterTagIds == "" {
+		return nil, errors.New("注册时间标签id为空")
+	}
+	regQuery := fmt.Sprintf(OrSQL, rule.RegisterTagIds)
+	filterQuery := regQuery
+	if rule.BehaviorTagIds != "" {
+		//拼接行为标签sql
+		behQuery := fmt.Sprintf(OrSQL, rule.BehaviorTagIds)
+		filterQuery = fmt.Sprintf(BitMapSQL, regQuery, behQuery)
+	}
+	// 处理mgoid和手机号 拼接sql
+	finalQuery := fmt.Sprintf(QueryUserIdSQL, filterQuery)
+	g.Log().Info(ctx, "getFromRegisterBehavior 查询sql", finalQuery)
+	err = dao.DwdDUserTag.DB().Raw(finalQuery).Scan(&userList)
+	if err != nil {
+		return nil, err
+	}
+	g.Log().Info(ctx, userList)
+	return
+}
+
+// 外呼状态
+func filterCallState(ctx context.Context, rule entity.NewUserSendRule, userList []*User) (newUserList []*User, err error) {
+	start := time.Now()
+	defer func() {
+		g.Log().Info(ctx, "filterCallState 耗时:", time.Since(start))
+
+	}()
+	callstateList := strings.Split(rule.CallState, ",")
+	for i := 0; i < len(userList); i++ {
+		for j := 0; j < len(callstateList); j++ {
+			// 未拨打  判断不存在
+			if callstateList[j] == CallStateNotDialed {
+				exist, err := dao.VoiceRecord.Ctx(ctx).Where("CalledNo=?", userList[i].Phone).Exist()
+				if err != nil {
+					g.Log().Error(ctx, "filterCallState CallStateNotDialed err:", err)
+					continue
+				}
+				if !exist {
+					newUserList = append(newUserList, userList[i])
+					continue
+				}
+			}
+			// 已接听 至少一个记录
+			if callstateList[j] == CallStatDealing {
+				exist, err := dao.VoiceRecord.Ctx(ctx).Where("CalledNo=? and State=?", userList[i].Phone, CallStatDealing).Exist()
+				if err != nil {
+					g.Log().Error(ctx, "filterCallState CallStatDealing err:", err, userList[i])
+					continue
+				}
+				if exist {
+					newUserList = append(newUserList, userList[i])
+					continue
+				}
+			}
+			// 其他的 判断是否存在记录
+			findState := strings.Split(callstateList[j], "#")
+			exist, err := dao.VoiceRecord.Ctx(ctx).Where("CalledNo=?", userList[i].Phone).WhereNotIn(dao.VoiceRecord.Columns().CallState, findState).Exist()
+			if err != nil {
+				g.Log().Error(ctx, "filterCallState otherstate err:", err, findState, userList[i])
+				continue
+			}
+			if !exist {
+				continue
+			}
+			// 存在则查询是否包含其他记录
+			exist, err = dao.VoiceRecord.Ctx(ctx).Where("CalledNo=?", userList[i].Phone).WhereNotIn(dao.VoiceRecord.Columns().CallState, findState).Exist()
+			if err != nil {
+				g.Log().Error(ctx, "filterCallState otherstate notin err:", err, findState, userList[i])
+				continue
+			}
+			if !exist {
+				newUserList = append(newUserList, userList[i])
+				continue
+			}
+		}
+	}
+
+	return
+}
+
+// 跟进状态
+func filterTrailStatus(ctx context.Context, rule entity.NewUserSendRule, userList []*User) (newUserList []*User) {
+
+	// 拒绝沟通 最后一次销售跟进状态为拒绝沟通
+
+	// 无意向客户 最后一次跟进状态为无意向客户
+	return
+}

+ 0 - 0
newuserGet/internal/model/.gitkeep


+ 0 - 0
newuserGet/internal/model/do/.gitkeep


+ 16 - 0
newuserGet/internal/model/do/dwd_d_user_tag.go

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

+ 20 - 0
newuserGet/internal/model/do/dwd_mgo_position.go

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

+ 22 - 0
newuserGet/internal/model/do/new_user_send_log.go

@@ -0,0 +1,22 @@
+// =================================================================================
+// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT.
+// =================================================================================
+
+package do
+
+import (
+	"github.com/gogf/gf/v2/frame/g"
+	"github.com/gogf/gf/v2/os/gtime"
+)
+
+// NewUserSendLog is the golang structure of table new_user_send_log for DAO operations like Where/Data.
+type NewUserSendLog struct {
+	g.Meta     `orm:"table:new_user_send_log, do:true"`
+	Id         interface{} // 新注册用户发送记录表
+	UserId     interface{} // mgo库的id
+	Phone      interface{} //
+	RuleId     interface{} // 规则表id
+	State      interface{} // 发送状态:-1 :取消发送 0:待发送 1:已发送
+	CreateTime *gtime.Time //
+	UpdateTime *gtime.Time //
+}

+ 23 - 0
newuserGet/internal/model/do/new_user_send_rule.go

@@ -0,0 +1,23 @@
+// =================================================================================
+// 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"
+)
+
+// NewUserSendRule is the golang structure of table new_user_send_rule for DAO operations like Where/Data.
+type NewUserSendRule struct {
+	g.Meta         `orm:"table:new_user_send_rule, do:true"`
+	Id             interface{} //
+	Name           interface{} // 规则名称
+	RegisterTagIds interface{} // 注册标签id,多个时使用逗号分割
+	CallState      interface{} // 外呼状态 多个时使用逗号分割
+	BehaviorTagIds interface{} // 行为标签id,多个时逗号分割
+	CreateTime     *gtime.Time //
+	UpdateTime     *gtime.Time //
+	Trailstatus    interface{} // 销售进程,jianyu_subjectdb_test.dwd_f_crm_clue_info  00-无意向,09-拒绝沟通
+}

+ 65 - 0
newuserGet/internal/model/do/voice_record.go

@@ -0,0 +1,65 @@
+// =================================================================================
+// 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"
+)
+
+// VoiceRecord is the golang structure of table voice_record for DAO operations like Where/Data.
+type VoiceRecord struct {
+	g.Meta             `orm:"table:voice_record, do:true"`
+	Id                 interface{} // 记录ID
+	CreateTime         *gtime.Time // 创建时间
+	CallSheetID        interface{} // 通话记录的ID
+	CallID             interface{} // 通话ID
+	CustomerName       interface{} // 客户名称
+	CustomerID         interface{} // 客户ID
+	CallType           interface{} // 呼叫类型
+	CallNo             interface{} // 主叫号码
+	CalledNo           interface{} // 被叫号码
+	Ring               *gtime.Time // 开始呼叫时间
+	RingingTime        *gtime.Time // 响铃时间
+	Begin              *gtime.Time // 摘机接通时间
+	End                *gtime.Time // 通话结束时间
+	CallTimeLength     interface{} // 通话时长(单元:秒)
+	QueueTime          *gtime.Time // 呼入来电进入技能组时间
+	Queue              interface{} // 呼入来电进入的技能组
+	QueueId            interface{} // 呼入来电进入的技能组号
+	AccountID          interface{} // 账户ID
+	ActionID           interface{} // 请求ID
+	Agent              interface{} // 坐席登录名
+	Exten              interface{} // 坐席工号
+	State              interface{} // 通话记录状态
+	MonitorFilename    interface{} // 录音文件链接地址
+	RecordFile         interface{} // 录音文件名
+	FileServer         interface{} // 录音文件地址
+	Pbx                interface{} // 坐席所在的PBX
+	AgentName          interface{} // 坐席姓名
+	DepartmentName     interface{} // 坐席所在部门名称
+	CallState          interface{} // 事件状态
+	RealState          interface{} // 内部处理参数
+	Province           interface{} // 省份
+	District           interface{} // 市区
+	IsInQueue          interface{} // 是否进入技能组
+	Ivrkey             interface{} // IVR按键值
+	IVRKeyName         interface{} // IVR按键名称
+	Hanguper           interface{} // 挂断方,CALLER:主叫,CALLEE:被叫,SYSTEMTRANSFER:系统转接,TRANSFEROUTER:转接外线,AGENT:坐席,CUSTOMER:客户
+	Uptimestamp        interface{} // 坐席接起电话的时间戳
+	DisposalAgentLocal interface{} // 接听坐席的直线号码
+	LastIVRNode        interface{} // 终结节点
+	Investigate        interface{} // 满意度按键值
+	HangupCause        interface{} // 通话拦截原因
+	HangupCauseDetail  interface{} // 外呼防骚扰拦截原因
+	DoMainName         interface{} // 通话服务器域名
+	TaskId             interface{} // 表单批量任务ID
+	FormId             interface{} // 表单ID
+	Callrescode        interface{} // 表单ID_1
+	Detail             interface{} // 表单ID_2
+	OriginalFromCID    interface{} // 表单ID_3
+	CallText           interface{} // 通话内容
+	CallHistoryId      interface{} //
+}

+ 0 - 0
newuserGet/internal/model/entity/.gitkeep


+ 11 - 0
newuserGet/internal/model/entity/dwd_d_user_tag.go

@@ -0,0 +1,11 @@
+// =================================================================================
+// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT.
+// =================================================================================
+
+package entity
+
+// DwdDUserTag is the golang structure for table dwd_d_user_tag.
+type DwdDUserTag struct {
+	BaseUserId int    `json:"baseUserId" orm:"baseUserId" description:""` //
+	Bitobj     string `json:"bitobj"     orm:"bitobj"     description:""` //
+}

+ 15 - 0
newuserGet/internal/model/entity/dwd_mgo_position.go

@@ -0,0 +1,15 @@
+// =================================================================================
+// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT.
+// =================================================================================
+
+package entity
+
+// DwdMgoPosition is the golang structure for table dwd_mgo_position.
+type DwdMgoPosition struct {
+	MgoUserId    string `json:"mgoUserId"    orm:"mgoUserId"     description:""` //
+	PositionId   int    `json:"positionId"   orm:"positionId"    description:""` //
+	BaseUserId   int    `json:"baseUserId"   orm:"baseUserId"    description:""` //
+	Phone        string `json:"phone"        orm:"phone"         description:""` //
+	RegisterTime int    `json:"registerTime" orm:"register_time" description:""` //
+	Type         int    `json:"type"         orm:"type"          description:""` //
+}

+ 20 - 0
newuserGet/internal/model/entity/new_user_send_log.go

@@ -0,0 +1,20 @@
+// =================================================================================
+// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT.
+// =================================================================================
+
+package entity
+
+import (
+	"github.com/gogf/gf/v2/os/gtime"
+)
+
+// NewUserSendLog is the golang structure for table new_user_send_log.
+type NewUserSendLog struct {
+	Id         int         `json:"id"         orm:"id"          description:"新注册用户发送记录表"`                // 新注册用户发送记录表
+	UserId     string      `json:"userId"     orm:"user_id"     description:"mgo库的id"`                   // mgo库的id
+	Phone      string      `json:"phone"      orm:"phone"       description:""`                          //
+	RuleId     int         `json:"ruleId"     orm:"rule_id"     description:"规则表id"`                     // 规则表id
+	State      int         `json:"state"      orm:"state"       description:"发送状态:-1 :取消发送 0:待发送 1:已发送"` // 发送状态:-1 :取消发送 0:待发送 1:已发送
+	CreateTime *gtime.Time `json:"createTime" orm:"create_time" description:""`                          //
+	UpdateTime *gtime.Time `json:"updateTime" orm:"update_time" description:""`                          //
+}

+ 21 - 0
newuserGet/internal/model/entity/new_user_send_rule.go

@@ -0,0 +1,21 @@
+// =================================================================================
+// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT.
+// =================================================================================
+
+package entity
+
+import (
+	"github.com/gogf/gf/v2/os/gtime"
+)
+
+// NewUserSendRule is the golang structure for table new_user_send_rule.
+type NewUserSendRule struct {
+	Id             int         `json:"id"             orm:"id"               description:""`                                                               //
+	Name           string      `json:"name"           orm:"name"             description:"规则名称"`                                                           // 规则名称
+	RegisterTagIds string      `json:"registerTagIds" orm:"register_tag_ids" description:"注册标签id,多个时使用逗号分割"`                                               // 注册标签id,多个时使用逗号分割
+	CallState      string      `json:"callState"      orm:"call_state"       description:"外呼状态 多个时使用逗号分割"`                                                 // 外呼状态 多个时使用逗号分割
+	BehaviorTagIds string      `json:"behaviorTagIds" orm:"behavior_tag_ids" description:"行为标签id,多个时逗号分割"`                                                 // 行为标签id,多个时逗号分割
+	CreateTime     *gtime.Time `json:"createTime"     orm:"create_time"      description:""`                                                               //
+	UpdateTime     *gtime.Time `json:"updateTime"     orm:"update_time"      description:""`                                                               //
+	Trailstatus    string      `json:"trailstatus"    orm:"trailstatus"      description:"销售进程,jianyu_subjectdb_test.dwd_f_crm_clue_info  00-无意向,09-拒绝沟通"` // 销售进程,jianyu_subjectdb_test.dwd_f_crm_clue_info  00-无意向,09-拒绝沟通
+}

+ 63 - 0
newuserGet/internal/model/entity/voice_record.go

@@ -0,0 +1,63 @@
+// =================================================================================
+// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT.
+// =================================================================================
+
+package entity
+
+import (
+	"github.com/gogf/gf/v2/os/gtime"
+)
+
+// VoiceRecord is the golang structure for table voice_record.
+type VoiceRecord struct {
+	Id                 int         `json:"id"                 orm:"id"                 description:"记录ID"`                                                                                // 记录ID
+	CreateTime         *gtime.Time `json:"createTime"         orm:"createTime"         description:"创建时间"`                                                                                // 创建时间
+	CallSheetID        string      `json:"callSheetID"        orm:"CallSheetID"        description:"通话记录的ID"`                                                                             // 通话记录的ID
+	CallID             string      `json:"callID"             orm:"CallID"             description:"通话ID"`                                                                                // 通话ID
+	CustomerName       string      `json:"customerName"       orm:"CustomerName"       description:"客户名称"`                                                                                // 客户名称
+	CustomerID         string      `json:"customerID"         orm:"CustomerID"         description:"客户ID"`                                                                                // 客户ID
+	CallType           string      `json:"callType"           orm:"CallType"           description:"呼叫类型"`                                                                                // 呼叫类型
+	CallNo             string      `json:"callNo"             orm:"CallNo"             description:"主叫号码"`                                                                                // 主叫号码
+	CalledNo           string      `json:"calledNo"           orm:"CalledNo"           description:"被叫号码"`                                                                                // 被叫号码
+	Ring               *gtime.Time `json:"ring"               orm:"Ring"               description:"开始呼叫时间"`                                                                              // 开始呼叫时间
+	RingingTime        *gtime.Time `json:"ringingTime"        orm:"RingingTime"        description:"响铃时间"`                                                                                // 响铃时间
+	Begin              *gtime.Time `json:"begin"              orm:"Begin"              description:"摘机接通时间"`                                                                              // 摘机接通时间
+	End                *gtime.Time `json:"end"                orm:"End"                description:"通话结束时间"`                                                                              // 通话结束时间
+	CallTimeLength     int         `json:"callTimeLength"     orm:"CallTimeLength"     description:"通话时长(单元:秒)"`                                                                          // 通话时长(单元:秒)
+	QueueTime          *gtime.Time `json:"queueTime"          orm:"QueueTime"          description:"呼入来电进入技能组时间"`                                                                         // 呼入来电进入技能组时间
+	Queue              string      `json:"queue"              orm:"Queue"              description:"呼入来电进入的技能组"`                                                                          // 呼入来电进入的技能组
+	QueueId            string      `json:"queueId"            orm:"QueueId"            description:"呼入来电进入的技能组号"`                                                                         // 呼入来电进入的技能组号
+	AccountID          string      `json:"accountID"          orm:"AccountID"          description:"账户ID"`                                                                                // 账户ID
+	ActionID           string      `json:"actionID"           orm:"ActionID"           description:"请求ID"`                                                                                // 请求ID
+	Agent              string      `json:"agent"              orm:"Agent"              description:"坐席登录名"`                                                                               // 坐席登录名
+	Exten              string      `json:"exten"              orm:"Exten"              description:"坐席工号"`                                                                                // 坐席工号
+	State              string      `json:"state"              orm:"State"              description:"通话记录状态"`                                                                              // 通话记录状态
+	MonitorFilename    string      `json:"monitorFilename"    orm:"MonitorFilename"    description:"录音文件链接地址"`                                                                            // 录音文件链接地址
+	RecordFile         string      `json:"recordFile"         orm:"RecordFile"         description:"录音文件名"`                                                                               // 录音文件名
+	FileServer         string      `json:"fileServer"         orm:"FileServer"         description:"录音文件地址"`                                                                              // 录音文件地址
+	Pbx                string      `json:"pBX"                orm:"PBX"                description:"坐席所在的PBX"`                                                                            // 坐席所在的PBX
+	AgentName          string      `json:"agentName"          orm:"AgentName"          description:"坐席姓名"`                                                                                // 坐席姓名
+	DepartmentName     string      `json:"departmentName"     orm:"DepartmentName"     description:"坐席所在部门名称"`                                                                            // 坐席所在部门名称
+	CallState          string      `json:"callState"          orm:"CallState"          description:"事件状态"`                                                                                // 事件状态
+	RealState          string      `json:"realState"          orm:"RealState"          description:"内部处理参数"`                                                                              // 内部处理参数
+	Province           string      `json:"province"           orm:"Province"           description:"省份"`                                                                                  // 省份
+	District           string      `json:"district"           orm:"District"           description:"市区"`                                                                                  // 市区
+	IsInQueue          string      `json:"isInQueue"          orm:"isInQueue"          description:"是否进入技能组"`                                                                             // 是否进入技能组
+	Ivrkey             string      `json:"iVRKEY"             orm:"IVRKEY"             description:"IVR按键值"`                                                                              // IVR按键值
+	IVRKeyName         string      `json:"iVRKeyName"         orm:"IVRKeyName"         description:"IVR按键名称"`                                                                             // IVR按键名称
+	Hanguper           string      `json:"hanguper"           orm:"Hanguper"           description:"挂断方,CALLER:主叫,CALLEE:被叫,SYSTEMTRANSFER:系统转接,TRANSFEROUTER:转接外线,AGENT:坐席,CUSTOMER:客户"` // 挂断方,CALLER:主叫,CALLEE:被叫,SYSTEMTRANSFER:系统转接,TRANSFEROUTER:转接外线,AGENT:坐席,CUSTOMER:客户
+	Uptimestamp        string      `json:"uptimestamp"        orm:"uptimestamp"        description:"坐席接起电话的时间戳"`                                                                          // 坐席接起电话的时间戳
+	DisposalAgentLocal string      `json:"disposalAgentLocal" orm:"DisposalAgentLocal" description:"接听坐席的直线号码"`                                                                           // 接听坐席的直线号码
+	LastIVRNode        string      `json:"lastIVRNode"        orm:"LastIVRNode"        description:"终结节点"`                                                                                // 终结节点
+	Investigate        string      `json:"investigate"        orm:"Investigate"        description:"满意度按键值"`                                                                              // 满意度按键值
+	HangupCause        string      `json:"hangupCause"        orm:"HangupCause"        description:"通话拦截原因"`                                                                              // 通话拦截原因
+	HangupCauseDetail  string      `json:"hangupCauseDetail"  orm:"HangupCauseDetail"  description:"外呼防骚扰拦截原因"`                                                                           // 外呼防骚扰拦截原因
+	DoMainName         string      `json:"doMainName"         orm:"DoMainName"         description:"通话服务器域名"`                                                                             // 通话服务器域名
+	TaskId             string      `json:"tASKID"             orm:"TASK_ID"            description:"表单批量任务ID"`                                                                            // 表单批量任务ID
+	FormId             string      `json:"fORMID"             orm:"FORM_ID"            description:"表单ID"`                                                                                // 表单ID
+	Callrescode        string      `json:"callrescode"        orm:"callrescode"        description:"表单ID_1"`                                                                              // 表单ID_1
+	Detail             string      `json:"detail"             orm:"detail"             description:"表单ID_2"`                                                                              // 表单ID_2
+	OriginalFromCID    string      `json:"originalFromCID"    orm:"OriginalFromCID"    description:"表单ID_3"`                                                                              // 表单ID_3
+	CallText           string      `json:"callText"           orm:"callText"           description:"通话内容"`                                                                                // 通话内容
+	CallHistoryId      int         `json:"callHistoryId"      orm:"callHistoryId"      description:""`                                                                                    //
+}

+ 1 - 0
newuserGet/internal/packed/packed.go

@@ -0,0 +1 @@
+package packed

+ 0 - 0
newuserGet/internal/service/.gitkeep


+ 32 - 0
newuserGet/main.go

@@ -0,0 +1,32 @@
+package main
+
+import (
+	//"context"
+	//_ "getuser/internal/packed"
+	//"github.com/gogf/gf/v2/frame/g"
+	//"github.com/gogf/gf/v2/os/gcron"
+	_ "github.com/gogf/gf/contrib/drivers/clickhouse/v2"
+	_ "github.com/gogf/gf/contrib/drivers/mysql/v2"
+	"github.com/gogf/gf/v2/os/gctx"
+	"newuserGet/internal/logic"
+)
+
+func main() {
+
+	var (
+		//err error
+		ctx = gctx.New()
+	)
+	logic.Task(ctx)
+	//
+	//	_, err = gcron.AddSingleton(ctx, "* * * * * *", func(ctx context.Context) {
+	//		g.Log().Print(ctx, "doing start")
+	//		logic.Task(ctx)
+	//		g.Log().Print(ctx, "end")
+	//
+	//	})
+	//	if err != nil {
+	//		panic(err)
+	//	}
+	//	select {}
+}

+ 21 - 0
newuserGet/manifest/deploy/kustomize/base/deployment.yaml

@@ -0,0 +1,21 @@
+apiVersion: apps/v1
+kind: Deployment
+metadata:
+  name: template-single
+  labels:
+    app: template-single
+spec:
+  replicas: 1
+  selector:
+    matchLabels:
+      app: template-single
+  template:
+    metadata:
+      labels:
+        app: template-single
+    spec:
+      containers:
+        - name : main
+          image: template-single
+          imagePullPolicy: Always
+

+ 8 - 0
newuserGet/manifest/deploy/kustomize/base/kustomization.yaml

@@ -0,0 +1,8 @@
+apiVersion: kustomize.config.k8s.io/v1beta1
+kind: Kustomization
+resources:
+- deployment.yaml
+- service.yaml
+
+
+

+ 12 - 0
newuserGet/manifest/deploy/kustomize/base/service.yaml

@@ -0,0 +1,12 @@
+apiVersion: v1
+kind: Service
+metadata:
+  name: template-single
+spec:
+  ports:
+  - port: 80
+    protocol: TCP
+    targetPort: 8000
+  selector:
+    app: template-single
+

+ 14 - 0
newuserGet/manifest/deploy/kustomize/overlays/develop/configmap.yaml

@@ -0,0 +1,14 @@
+apiVersion: v1
+kind: ConfigMap
+metadata:
+  name: template-single-configmap
+data:
+  config.yaml: |
+    server:
+      address:     ":8000"
+      openapiPath: "/api.json"
+      swaggerPath: "/swagger"
+
+    logger:
+      level : "all"
+      stdout: true

+ 10 - 0
newuserGet/manifest/deploy/kustomize/overlays/develop/deployment.yaml

@@ -0,0 +1,10 @@
+apiVersion: apps/v1
+kind: Deployment
+metadata:
+  name: template-single
+spec:
+  template:
+    spec:
+      containers:
+        - name : main
+          image: template-single:develop

+ 14 - 0
newuserGet/manifest/deploy/kustomize/overlays/develop/kustomization.yaml

@@ -0,0 +1,14 @@
+apiVersion: kustomize.config.k8s.io/v1beta1
+kind: Kustomization
+
+resources:
+- ../../base
+- configmap.yaml
+
+patchesStrategicMerge:
+- deployment.yaml
+
+namespace: default
+
+
+

+ 16 - 0
newuserGet/manifest/docker/Dockerfile

@@ -0,0 +1,16 @@
+FROM loads/alpine:3.8
+
+###############################################################################
+#                                INSTALLATION
+###############################################################################
+
+ENV WORKDIR                 /app
+ADD resource                $WORKDIR/
+ADD ./temp/linux_amd64/main $WORKDIR/main
+RUN chmod +x $WORKDIR/main
+
+###############################################################################
+#                                   START
+###############################################################################
+WORKDIR $WORKDIR
+CMD ./main

+ 8 - 0
newuserGet/manifest/docker/docker.sh

@@ -0,0 +1,8 @@
+#!/bin/bash
+
+# This shell is executed before docker build.
+
+
+
+
+

+ 0 - 0
newuserGet/manifest/i18n/.gitkeep


+ 0 - 0
newuserGet/manifest/protobuf/.keep-if-necessary


+ 0 - 0
newuserGet/utility/.gitkeep


+ 1 - 0
newuserSend/.gitattributes

@@ -0,0 +1 @@
+* linguist-language=GO

+ 19 - 0
newuserSend/.gitignore

@@ -0,0 +1,19 @@
+.buildpath
+.hgignore.swp
+.project
+.orig
+.swp
+.idea/
+.settings/
+.vscode/
+bin/
+**/.DS_Store
+gf
+main
+main.exe
+output/
+manifest/output/
+temp/
+temp.yaml
+bin
+**/config/config.yaml

+ 7 - 0
newuserSend/Makefile

@@ -0,0 +1,7 @@
+ROOT_DIR    = $(shell pwd)
+NAMESPACE   = "default"
+DEPLOY_NAME = "template-single"
+DOCKER_NAME = "template-single"
+
+include ./hack/hack-cli.mk
+include ./hack/hack.mk

+ 4 - 0
newuserSend/README.MD

@@ -0,0 +1,4 @@
+# GoFrame Template For SingleRepo
+
+Quick Start: 
+- https://goframe.org/quick

+ 15 - 0
newuserSend/api/hello/hello.go

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

+ 12 - 0
newuserSend/api/hello/v1/hello.go

@@ -0,0 +1,12 @@
+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"`
+}

+ 31 - 0
newuserSend/go.mod

@@ -0,0 +1,31 @@
+module newuserSend
+
+go 1.18
+
+require github.com/gogf/gf/v2 v2.8.3
+
+require (
+	github.com/BurntSushi/toml v1.4.0 // indirect
+	github.com/clbanning/mxj/v2 v2.7.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.4.2 // indirect
+	github.com/go-logr/stdr v1.2.2 // 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.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.16 // indirect
+	github.com/olekukonko/tablewriter v0.0.5 // indirect
+	github.com/rivo/uniseg v0.4.7 // indirect
+	go.opentelemetry.io/otel v1.24.0 // indirect
+	go.opentelemetry.io/otel/metric v1.24.0 // indirect
+	go.opentelemetry.io/otel/sdk v1.24.0 // indirect
+	go.opentelemetry.io/otel/trace v1.24.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
+)

+ 60 - 0
newuserSend/go.sum

@@ -0,0 +1,60 @@
+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/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.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.8.3 h1:h9Px3lqJnnH6It0AqHRz4/1hx0JmvaSf1IvUir5x1rA=
+github.com/gogf/gf/v2 v2.8.3/go.mod h1:n++xPYGUUMadw6IygLEgGZqc6y6DRLrJKg5kqCrPLWY=
+github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI=
+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.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/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/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/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/stretchr/testify v1.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcUk=
+go.opentelemetry.io/otel v1.24.0 h1:0LAOdjNmQeSTzGBzduGe/rU4tZhMwL5rWgtp9Ku5Jfo=
+go.opentelemetry.io/otel v1.24.0/go.mod h1:W7b9Ozg4nkF5tWI5zsXkaKKDjdVjpD4oAt9Qi/MArHo=
+go.opentelemetry.io/otel/metric v1.24.0 h1:6EhoGWWK28x1fbpA4tYTOWBkPefTDQnb8WSGXlc88kI=
+go.opentelemetry.io/otel/metric v1.24.0/go.mod h1:VYhLe1rFfxuTXLgj4CBiyz+9WYBA8pNGJgDcSFRKBco=
+go.opentelemetry.io/otel/sdk v1.24.0 h1:YMPPDNymmQN3ZgczicBY3B6sf9n62Dlj9pWD3ucgoDw=
+go.opentelemetry.io/otel/sdk v1.24.0/go.mod h1:KVrIYw6tEubO9E96HQpcmpTKDVn9gdv35HoYiQWGDFg=
+go.opentelemetry.io/otel/trace v1.24.0 h1:CsKnnL4dUAr/0llH9FKuc698G04IrpWV0MQA/Y1YELI=
+go.opentelemetry.io/otel/trace v1.24.0/go.mod h1:HPc3Xr/cOApsBI154IU0OI0HJexz+aw5uPdbs3UCjNU=
+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.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 h1:yhCVgyC4o1eVCa2tZl7eS0r+SDo693bJlVdllGtEeKM=
+gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
+gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA=
+gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=

+ 13 - 0
newuserSend/hack/config.yaml

@@ -0,0 +1,13 @@
+
+# CLI tool, only in development environment.
+# https://goframe.org/docs/cli
+gfcli:
+  gen:
+    dao:
+      - link: "mysql:root:=PDT49#80Z!RVv52_z@tcp(192.168.3.14:4000)/jianyu"
+        descriptionTag: true
+        tables: "new_user_send_log,new_user_send_content"
+  docker:
+    build: "-a amd64 -s linux -p temp -ew"
+    tagPrefixes:
+      - my.image.pub/my-app

+ 20 - 0
newuserSend/hack/hack-cli.mk

@@ -0,0 +1,20 @@
+
+# Install/Update to the latest CLI tool.
+.PHONY: cli
+cli:
+	@set -e; \
+	wget -O gf \
+	https://github.com/gogf/gf/releases/latest/download/gf_$(shell go env GOOS)_$(shell go env GOARCH) && \
+	chmod +x gf && \
+	./gf install -y && \
+	rm ./gf
+
+
+# Check and install CLI tool.
+.PHONY: cli.install
+cli.install:
+	@set -e; \
+	gf -v > /dev/null 2>&1 || if [[ "$?" -ne "0" ]]; then \
+  		echo "GoFame CLI is not installed, start proceeding auto installation..."; \
+		make cli; \
+	fi;

+ 75 - 0
newuserSend/hack/hack.mk

@@ -0,0 +1,75 @@
+.DEFAULT_GOAL := build
+
+# Update GoFrame and its CLI to latest stable version.
+.PHONY: up
+up: cli.install
+	@gf up -a
+
+# Build binary using configuration from hack/config.yaml.
+.PHONY: build
+build: cli.install
+	@gf build -ew
+
+# Parse api and generate controller/sdk.
+.PHONY: ctrl
+ctrl: cli.install
+	@gf gen ctrl
+
+# Generate Go files for DAO/DO/Entity.
+.PHONY: dao
+dao: cli.install
+	@gf gen dao
+
+# Parse current project go files and generate enums go file.
+.PHONY: enums
+enums: cli.install
+	@gf gen enums
+
+# Generate Go files for Service.
+.PHONY: service
+service: cli.install
+	@gf gen service
+
+
+# Build docker image.
+.PHONY: image
+image: cli.install
+	$(eval _TAG  = $(shell git rev-parse --short HEAD))
+ifneq (, $(shell git status --porcelain 2>/dev/null))
+	$(eval _TAG  = $(_TAG).dirty)
+endif
+	$(eval _TAG  = $(if ${TAG},  ${TAG}, $(_TAG)))
+	$(eval _PUSH = $(if ${PUSH}, ${PUSH}, ))
+	@gf docker ${_PUSH} -tn $(DOCKER_NAME):${_TAG};
+
+
+# Build docker image and automatically push to docker repo.
+.PHONY: image.push
+image.push: cli.install
+	@make image PUSH=-p;
+
+
+# Deploy image and yaml to current kubectl environment.
+.PHONY: deploy
+deploy: cli.install
+	$(eval _TAG = $(if ${TAG},  ${TAG}, develop))
+
+	@set -e; \
+	mkdir -p $(ROOT_DIR)/temp/kustomize;\
+	cd $(ROOT_DIR)/manifest/deploy/kustomize/overlays/${_ENV};\
+	kustomize build > $(ROOT_DIR)/temp/kustomize.yaml;\
+	kubectl   apply -f $(ROOT_DIR)/temp/kustomize.yaml; \
+	if [ $(DEPLOY_NAME) != "" ]; then \
+		kubectl patch -n $(NAMESPACE) deployment/$(DEPLOY_NAME) -p "{\"spec\":{\"template\":{\"metadata\":{\"labels\":{\"date\":\"$(shell date +%s)\"}}}}}"; \
+	fi;
+
+
+# Parsing protobuf files and generating go files.
+.PHONY: pb
+pb: cli.install
+	@gf gen pb
+
+# Generate protobuf files for database tables.
+.PHONY: pbentity
+pbentity: cli.install
+	@gf gen pbentity

+ 30 - 0
newuserSend/internal/cmd/cmd.go

@@ -0,0 +1,30 @@
+package cmd
+
+import (
+	"context"
+
+	"github.com/gogf/gf/v2/frame/g"
+	"github.com/gogf/gf/v2/net/ghttp"
+	"github.com/gogf/gf/v2/os/gcmd"
+
+	"newuserSend/internal/controller/hello"
+)
+
+var (
+	Main = gcmd.Command{
+		Name:  "main",
+		Usage: "main",
+		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.Run()
+			return nil
+		},
+	}
+)

+ 1 - 0
newuserSend/internal/consts/consts.go

@@ -0,0 +1 @@
+package consts

+ 5 - 0
newuserSend/internal/controller/hello/hello.go

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

+ 16 - 0
newuserSend/internal/controller/hello/hello_new.go

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

+ 13 - 0
newuserSend/internal/controller/hello/hello_v1_hello.go

@@ -0,0 +1,13 @@
+package hello
+
+import (
+	"context"
+	"github.com/gogf/gf/v2/frame/g"
+
+	"newuserSend/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
+}

+ 0 - 0
newuserSend/internal/dao/.gitkeep


+ 89 - 0
newuserSend/internal/dao/internal/new_user_send_content.go

@@ -0,0 +1,89 @@
+// ==========================================================================
+// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT.
+// ==========================================================================
+
+package internal
+
+import (
+	"context"
+
+	"github.com/gogf/gf/v2/database/gdb"
+	"github.com/gogf/gf/v2/frame/g"
+)
+
+// NewUserSendContentDao is the data access object for the table new_user_send_content.
+type NewUserSendContentDao struct {
+	table   string                    // table is the underlying table name of the DAO.
+	group   string                    // group is the database configuration group name of the current DAO.
+	columns NewUserSendContentColumns // columns contains all the column names of Table for convenient usage.
+}
+
+// NewUserSendContentColumns defines and stores column names for the table new_user_send_content.
+type NewUserSendContentColumns struct {
+	Id          string //
+	RuleId      string // new_user_send_rule的id
+	SendChannel string // 发送渠道:1-短信 2-站内信 3-邮件
+	SmsId       string // 短信模板id
+	MsgUrl      string // 站内信跳转地址,各端一样时填一个就行,不一样时按以下顺序逗号分割,pc,安卓,苹果,wx,
+	MsgTitle    string //
+	MsgContent  string //
+	CreateTime  string //
+	UpdateTime  string //
+}
+
+// newUserSendContentColumns holds the columns for the table new_user_send_content.
+var newUserSendContentColumns = NewUserSendContentColumns{
+	Id:          "id",
+	RuleId:      "rule_id",
+	SendChannel: "send_channel",
+	SmsId:       "sms_id",
+	MsgUrl:      "msg_url",
+	MsgTitle:    "msg_title",
+	MsgContent:  "msg_content",
+	CreateTime:  "create_time",
+	UpdateTime:  "update_time",
+}
+
+// NewNewUserSendContentDao creates and returns a new DAO object for table data access.
+func NewNewUserSendContentDao() *NewUserSendContentDao {
+	return &NewUserSendContentDao{
+		group:   "default",
+		table:   "new_user_send_content",
+		columns: newUserSendContentColumns,
+	}
+}
+
+// DB retrieves and returns the underlying raw database management object of the current DAO.
+func (dao *NewUserSendContentDao) DB() gdb.DB {
+	return g.DB(dao.group)
+}
+
+// Table returns the table name of the current DAO.
+func (dao *NewUserSendContentDao) Table() string {
+	return dao.table
+}
+
+// Columns returns all column names of the current DAO.
+func (dao *NewUserSendContentDao) Columns() NewUserSendContentColumns {
+	return dao.columns
+}
+
+// Group returns the database configuration group name of the current DAO.
+func (dao *NewUserSendContentDao) Group() string {
+	return dao.group
+}
+
+// Ctx creates and returns a Model for the current DAO. It automatically sets the context for the current operation.
+func (dao *NewUserSendContentDao) Ctx(ctx context.Context) *gdb.Model {
+	return dao.DB().Model(dao.table).Safe().Ctx(ctx)
+}
+
+// Transaction wraps the transaction logic using function f.
+// It rolls back the transaction and returns the error if function f returns a non-nil error.
+// It commits the transaction and returns nil if function f returns nil.
+//
+// Note: Do not commit or roll back the transaction in function f,
+// as it is automatically handled by this function.
+func (dao *NewUserSendContentDao) Transaction(ctx context.Context, f func(ctx context.Context, tx gdb.TX) error) (err error) {
+	return dao.Ctx(ctx).Transaction(ctx, f)
+}

+ 85 - 0
newuserSend/internal/dao/internal/new_user_send_log.go

@@ -0,0 +1,85 @@
+// ==========================================================================
+// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT.
+// ==========================================================================
+
+package internal
+
+import (
+	"context"
+
+	"github.com/gogf/gf/v2/database/gdb"
+	"github.com/gogf/gf/v2/frame/g"
+)
+
+// NewUserSendLogDao is the data access object for the table new_user_send_log.
+type NewUserSendLogDao struct {
+	table   string                // table is the underlying table name of the DAO.
+	group   string                // group is the database configuration group name of the current DAO.
+	columns NewUserSendLogColumns // columns contains all the column names of Table for convenient usage.
+}
+
+// NewUserSendLogColumns defines and stores column names for the table new_user_send_log.
+type NewUserSendLogColumns struct {
+	Id         string // 新注册用户发送记录表
+	UserId     string // mgo库的id
+	Phone      string //
+	RuleId     string // 规则表id
+	State      string // 发送状态:-1 :取消发送 0:待发送 1:已发送
+	CreateTime string //
+	UpdateTime string //
+}
+
+// newUserSendLogColumns holds the columns for the table new_user_send_log.
+var newUserSendLogColumns = NewUserSendLogColumns{
+	Id:         "id",
+	UserId:     "user_id",
+	Phone:      "phone",
+	RuleId:     "rule_id",
+	State:      "state",
+	CreateTime: "create_time",
+	UpdateTime: "update_time",
+}
+
+// NewNewUserSendLogDao creates and returns a new DAO object for table data access.
+func NewNewUserSendLogDao() *NewUserSendLogDao {
+	return &NewUserSendLogDao{
+		group:   "default",
+		table:   "new_user_send_log",
+		columns: newUserSendLogColumns,
+	}
+}
+
+// DB retrieves and returns the underlying raw database management object of the current DAO.
+func (dao *NewUserSendLogDao) DB() gdb.DB {
+	return g.DB(dao.group)
+}
+
+// Table returns the table name of the current DAO.
+func (dao *NewUserSendLogDao) Table() string {
+	return dao.table
+}
+
+// Columns returns all column names of the current DAO.
+func (dao *NewUserSendLogDao) Columns() NewUserSendLogColumns {
+	return dao.columns
+}
+
+// Group returns the database configuration group name of the current DAO.
+func (dao *NewUserSendLogDao) Group() string {
+	return dao.group
+}
+
+// Ctx creates and returns a Model for the current DAO. It automatically sets the context for the current operation.
+func (dao *NewUserSendLogDao) Ctx(ctx context.Context) *gdb.Model {
+	return dao.DB().Model(dao.table).Safe().Ctx(ctx)
+}
+
+// Transaction wraps the transaction logic using function f.
+// It rolls back the transaction and returns the error if function f returns a non-nil error.
+// It commits the transaction and returns nil if function f returns nil.
+//
+// Note: Do not commit or roll back the transaction in function f,
+// as it is automatically handled by this function.
+func (dao *NewUserSendLogDao) Transaction(ctx context.Context, f func(ctx context.Context, tx gdb.TX) error) (err error) {
+	return dao.Ctx(ctx).Transaction(ctx, f)
+}

+ 27 - 0
newuserSend/internal/dao/new_user_send_content.go

@@ -0,0 +1,27 @@
+// =================================================================================
+// This file is auto-generated by the GoFrame CLI tool. You may modify it as needed.
+// =================================================================================
+
+package dao
+
+import (
+	"newuserSend/internal/dao/internal"
+)
+
+// internalNewUserSendContentDao is an internal type for wrapping the internal DAO implementation.
+type internalNewUserSendContentDao = *internal.NewUserSendContentDao
+
+// newUserSendContentDao is the data access object for the table new_user_send_content.
+// You can define custom methods on it to extend its functionality as needed.
+type newUserSendContentDao struct {
+	internalNewUserSendContentDao
+}
+
+var (
+	// NewUserSendContent is a globally accessible object for table new_user_send_content operations.
+	NewUserSendContent = newUserSendContentDao{
+		internal.NewNewUserSendContentDao(),
+	}
+)
+
+// Add your custom methods and functionality below.

+ 27 - 0
newuserSend/internal/dao/new_user_send_log.go

@@ -0,0 +1,27 @@
+// =================================================================================
+// This file is auto-generated by the GoFrame CLI tool. You may modify it as needed.
+// =================================================================================
+
+package dao
+
+import (
+	"newuserSend/internal/dao/internal"
+)
+
+// internalNewUserSendLogDao is an internal type for wrapping the internal DAO implementation.
+type internalNewUserSendLogDao = *internal.NewUserSendLogDao
+
+// newUserSendLogDao is the data access object for the table new_user_send_log.
+// You can define custom methods on it to extend its functionality as needed.
+type newUserSendLogDao struct {
+	internalNewUserSendLogDao
+}
+
+var (
+	// NewUserSendLog is a globally accessible object for table new_user_send_log operations.
+	NewUserSendLog = newUserSendLogDao{
+		internal.NewNewUserSendLogDao(),
+	}
+)
+
+// Add your custom methods and functionality below.

+ 0 - 0
newuserSend/internal/logic/.gitkeep


+ 0 - 0
newuserSend/internal/model/.gitkeep


+ 0 - 0
newuserSend/internal/model/do/.gitkeep


+ 24 - 0
newuserSend/internal/model/do/new_user_send_content.go

@@ -0,0 +1,24 @@
+// =================================================================================
+// 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"
+)
+
+// NewUserSendContent is the golang structure of table new_user_send_content for DAO operations like Where/Data.
+type NewUserSendContent struct {
+	g.Meta      `orm:"table:new_user_send_content, do:true"`
+	Id          interface{} //
+	RuleId      interface{} // new_user_send_rule的id
+	SendChannel interface{} // 发送渠道:1-短信 2-站内信 3-邮件
+	SmsId       interface{} // 短信模板id
+	MsgUrl      interface{} // 站内信跳转地址,各端一样时填一个就行,不一样时按以下顺序逗号分割,pc,安卓,苹果,wx,
+	MsgTitle    interface{} //
+	MsgContent  interface{} //
+	CreateTime  *gtime.Time //
+	UpdateTime  *gtime.Time //
+}

+ 22 - 0
newuserSend/internal/model/do/new_user_send_log.go

@@ -0,0 +1,22 @@
+// =================================================================================
+// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT.
+// =================================================================================
+
+package do
+
+import (
+	"github.com/gogf/gf/v2/frame/g"
+	"github.com/gogf/gf/v2/os/gtime"
+)
+
+// NewUserSendLog is the golang structure of table new_user_send_log for DAO operations like Where/Data.
+type NewUserSendLog struct {
+	g.Meta     `orm:"table:new_user_send_log, do:true"`
+	Id         interface{} // 新注册用户发送记录表
+	UserId     interface{} // mgo库的id
+	Phone      interface{} //
+	RuleId     interface{} // 规则表id
+	State      interface{} // 发送状态:-1 :取消发送 0:待发送 1:已发送
+	CreateTime *gtime.Time //
+	UpdateTime *gtime.Time //
+}

+ 0 - 0
newuserSend/internal/model/entity/.gitkeep


+ 22 - 0
newuserSend/internal/model/entity/new_user_send_content.go

@@ -0,0 +1,22 @@
+// =================================================================================
+// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT.
+// =================================================================================
+
+package entity
+
+import (
+	"github.com/gogf/gf/v2/os/gtime"
+)
+
+// NewUserSendContent is the golang structure for table new_user_send_content.
+type NewUserSendContent struct {
+	Id          int         `json:"id"          orm:"id"           description:""`                                              //
+	RuleId      int         `json:"ruleId"      orm:"rule_id"      description:"new_user_send_rule的id"`                         // new_user_send_rule的id
+	SendChannel int         `json:"sendChannel" orm:"send_channel" description:"发送渠道:1-短信 2-站内信 3-邮件"`                          // 发送渠道:1-短信 2-站内信 3-邮件
+	SmsId       int         `json:"smsId"       orm:"sms_id"       description:"短信模板id"`                                        // 短信模板id
+	MsgUrl      string      `json:"msgUrl"      orm:"msg_url"      description:"站内信跳转地址,各端一样时填一个就行,不一样时按以下顺序逗号分割,pc,安卓,苹果,wx,"` // 站内信跳转地址,各端一样时填一个就行,不一样时按以下顺序逗号分割,pc,安卓,苹果,wx,
+	MsgTitle    string      `json:"msgTitle"    orm:"msg_title"    description:""`                                              //
+	MsgContent  string      `json:"msgContent"  orm:"msg_content"  description:""`                                              //
+	CreateTime  *gtime.Time `json:"createTime"  orm:"create_time"  description:""`                                              //
+	UpdateTime  *gtime.Time `json:"updateTime"  orm:"update_time"  description:""`                                              //
+}

+ 20 - 0
newuserSend/internal/model/entity/new_user_send_log.go

@@ -0,0 +1,20 @@
+// =================================================================================
+// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT.
+// =================================================================================
+
+package entity
+
+import (
+	"github.com/gogf/gf/v2/os/gtime"
+)
+
+// NewUserSendLog is the golang structure for table new_user_send_log.
+type NewUserSendLog struct {
+	Id         int         `json:"id"         orm:"id"          description:"新注册用户发送记录表"`                // 新注册用户发送记录表
+	UserId     string      `json:"userId"     orm:"user_id"     description:"mgo库的id"`                   // mgo库的id
+	Phone      string      `json:"phone"      orm:"phone"       description:""`                          //
+	RuleId     int         `json:"ruleId"     orm:"rule_id"     description:"规则表id"`                     // 规则表id
+	State      int         `json:"state"      orm:"state"       description:"发送状态:-1 :取消发送 0:待发送 1:已发送"` // 发送状态:-1 :取消发送 0:待发送 1:已发送
+	CreateTime *gtime.Time `json:"createTime" orm:"create_time" description:""`                          //
+	UpdateTime *gtime.Time `json:"updateTime" orm:"update_time" description:""`                          //
+}

+ 1 - 0
newuserSend/internal/packed/packed.go

@@ -0,0 +1 @@
+package packed

+ 0 - 0
newuserSend/internal/service/.gitkeep


+ 32 - 0
newuserSend/main.go

@@ -0,0 +1,32 @@
+package main
+
+import (
+	"context"
+	_ "getuser/internal/packed"
+	"github.com/gogf/gf/v2/frame/g"
+	"github.com/gogf/gf/v2/os/gcron"
+	"github.com/gogf/gf/v2/os/gctx"
+)
+
+func main() {
+
+	var (
+		err error
+		ctx = gctx.New()
+	)
+	_, err = gcron.AddSingleton(ctx, "* * * * * *", func(ctx context.Context) {
+		task()
+		g.Log().Print(ctx, "doing")
+
+	})
+	if err != nil {
+		panic(err)
+	}
+	select {}
+}
+
+func task() {
+	// get user
+	//
+
+}

+ 3 - 0
newuserSend/manifest/config/sms.yaml

@@ -0,0 +1,3 @@
+sendUrl: https://api-shss.zthysms.com/v2/sendSmsTp
+password: tKey
+signature:

+ 21 - 0
newuserSend/manifest/deploy/kustomize/base/deployment.yaml

@@ -0,0 +1,21 @@
+apiVersion: apps/v1
+kind: Deployment
+metadata:
+  name: template-single
+  labels:
+    app: template-single
+spec:
+  replicas: 1
+  selector:
+    matchLabels:
+      app: template-single
+  template:
+    metadata:
+      labels:
+        app: template-single
+    spec:
+      containers:
+        - name : main
+          image: template-single
+          imagePullPolicy: Always
+

+ 8 - 0
newuserSend/manifest/deploy/kustomize/base/kustomization.yaml

@@ -0,0 +1,8 @@
+apiVersion: kustomize.config.k8s.io/v1beta1
+kind: Kustomization
+resources:
+- deployment.yaml
+- service.yaml
+
+
+

+ 12 - 0
newuserSend/manifest/deploy/kustomize/base/service.yaml

@@ -0,0 +1,12 @@
+apiVersion: v1
+kind: Service
+metadata:
+  name: template-single
+spec:
+  ports:
+  - port: 80
+    protocol: TCP
+    targetPort: 8000
+  selector:
+    app: template-single
+

+ 14 - 0
newuserSend/manifest/deploy/kustomize/overlays/develop/configmap.yaml

@@ -0,0 +1,14 @@
+apiVersion: v1
+kind: ConfigMap
+metadata:
+  name: template-single-configmap
+data:
+  config.yaml: |
+    server:
+      address:     ":8000"
+      openapiPath: "/api.json"
+      swaggerPath: "/swagger"
+
+    logger:
+      level : "all"
+      stdout: true

Энэ ялгаанд хэт олон файл өөрчлөгдсөн тул зарим файлыг харуулаагүй болно