ltotal 2 rokov pred
commit
32a9871819
52 zmenil súbory, kde vykonal 1322 pridanie a 0 odobranie
  1. 1 0
      .gitattributes
  2. 20 0
      .gitignore
  3. 74 0
      Makefile
  4. 9 0
      README.MD
  5. 12 0
      api/api.go
  6. 14 0
      api/fund.go
  7. 35 0
      go.mod
  8. 179 0
      go.sum
  9. 10 0
      hack/config.yaml
  10. 34 0
      internal/cmd/cmd.go
  11. 1 0
      internal/consts/consts.go
  12. 6 0
      internal/consts/status.go
  13. 26 0
      internal/controller/fund.go
  14. 27 0
      internal/dao/fund_information.go
  15. 27 0
      internal/dao/fund_last_nav.go
  16. 243 0
      internal/dao/internal/fund_information.go
  17. 85 0
      internal/dao/internal/fund_last_nav.go
  18. 0 0
      internal/logic/.gitkeep
  19. 14 0
      internal/middleware/auth.go
  20. 10 0
      internal/middleware/cors.go
  21. 7 0
      internal/middleware/ctx.go
  22. 9 0
      internal/middleware/log.go
  23. 57 0
      internal/middleware/res.go
  24. 11 0
      internal/middleware/session.go
  25. 0 0
      internal/model/.gitkeep
  26. 0 0
      internal/model/do/.gitkeep
  27. 101 0
      internal/model/do/fund_information.go
  28. 22 0
      internal/model/do/fund_last_nav.go
  29. 0 0
      internal/model/entity/.gitkeep
  30. 99 0
      internal/model/entity/fund_information.go
  31. 20 0
      internal/model/entity/fund_last_nav.go
  32. 1 0
      internal/packed/packed.go
  33. 28 0
      internal/service/fund.go
  34. 3 0
      internal/service/service.go
  35. 13 0
      main.go
  36. 21 0
      manifest/config/config.yaml
  37. 21 0
      manifest/deploy/kustomize/base/deployment.yaml
  38. 8 0
      manifest/deploy/kustomize/base/kustomization.yaml
  39. 12 0
      manifest/deploy/kustomize/base/service.yaml
  40. 14 0
      manifest/deploy/kustomize/overlays/develop/configmap.yaml
  41. 10 0
      manifest/deploy/kustomize/overlays/develop/deployment.yaml
  42. 14 0
      manifest/deploy/kustomize/overlays/develop/kustomization.yaml
  43. 16 0
      manifest/docker/Dockerfile
  44. 8 0
      manifest/docker/docker.sh
  45. 0 0
      resource/i18n/.gitkeep
  46. 0 0
      resource/public/html/.gitkeep
  47. 0 0
      resource/public/plugin/.gitkeep
  48. 0 0
      resource/public/resource/css/.gitkeep
  49. 0 0
      resource/public/resource/image/.gitkeep
  50. 0 0
      resource/public/resource/js/.gitkeep
  51. 0 0
      resource/template/.gitkeep
  52. 0 0
      utility/.gitkeep

+ 1 - 0
.gitattributes

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

+ 20 - 0
.gitignore

@@ -0,0 +1,20 @@
+.buildpath
+.hgignore.swp
+.project
+.orig
+.swp
+.idea/
+.settings/
+.vscode/
+vendor/
+composer.lock
+gitpush.sh
+pkg/
+bin/
+cbuild
+**/.DS_Store
+.test/
+main
+output/
+manifest/output/
+temp/

+ 74 - 0
Makefile

@@ -0,0 +1,74 @@
+ROOT_DIR    = $(shell pwd)
+NAMESPACE   = "default"
+DEPLOY_NAME = "template-single"
+DOCKER_NAME = "template-single"
+
+# 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;
+
+
+# Generate Go files for DAO/DO/Entity.
+.PHONY: dao
+dao: cli.install
+	@gf gen dao
+
+# Generate Go files for Service.
+.PHONY: service
+service: cli.install
+	@gf gen service
+
+# Build image, deploy image and yaml to current kubectl environment and make port forward to local machine.
+.PHONY: start
+start:
+	@set -e; \
+	make image; \
+	make deploy; \
+	make port;
+
+# Build docker image.
+.PHONY: image
+image: cli.install
+	$(eval _TAG  = $(shell git log -1 --format="%cd.%h" --date=format:"%Y%m%d%H%M%S"))
+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 -p -b "-a amd64 -s linux -p temp" -t $(DOCKER_NAME):${_TAG};
+
+
+# Build docker image and automatically push to docker repo.
+.PHONY: image.push
+image.push:
+	@make image PUSH=-p;
+
+
+# Deploy image and yaml to current kubectl environment.
+.PHONY: deploy
+deploy:
+	$(eval _TAG = $(if ${TAG},  ${TAG}, develop))
+
+	@set -e; \
+	mkdir -p $(ROOT_DIR)/temp/kustomize;\
+	cd $(ROOT_DIR)/manifest/deploy/kustomize/overlays/${_TAG};\
+	kustomize build > $(ROOT_DIR)/temp/kustomize.yaml;\
+	kubectl   apply -f $(ROOT_DIR)/temp/kustomize.yaml; \
+	kubectl   patch -n $(NAMESPACE) deployment/$(DEPLOY_NAME) -p "{\"spec\":{\"template\":{\"metadata\":{\"labels\":{\"date\":\"$(shell date +%s)\"}}}}}";
+
+

+ 9 - 0
README.MD

@@ -0,0 +1,9 @@
+# GoFrame Template For SingleRepo
+
+Project Makefile Commands: 
+- `make cli`: Install or Update to the latest GoFrame CLI tool.
+- `make dao`: Generate go files for `Entity/DAO/DO` according to the configuration file from `hack` folder.
+- `make service`: Parse `logic` folder to generate interface go files into `service` folder.
+- `make image TAG=xxx`: Run `docker build` to build image according `manifest/docker`.
+- `make image.push TAG=xxx`: Run `docker build` and `docker push` to build and push image according `manifest/docker`.
+- `make deploy TAG=xxx`: Run `kustomize build` to build and deploy deployment to kubernetes server group according `manifest/deploy`.

+ 12 - 0
api/api.go

@@ -0,0 +1,12 @@
+package api
+
+type CommonRes struct {
+	Data interface{} `json:"data"`
+}
+
+type PagerRes struct {
+	Code  int         `json:"code"`
+	Msg   string      `json:"msg"`
+	Data  interface{} `json:"data"`
+	Pager interface{} `json:"pager"`
+}

+ 14 - 0
api/fund.go

@@ -0,0 +1,14 @@
+package api
+
+import "github.com/gogf/gf/v2/frame/g"
+
+type FundListReq struct {
+	g.Meta   `path:"/fund/list" method:"get" tags:"基金相关" summary:"获取基金列表"`
+	Page     int `p:"page" d:"1" v:"required"`
+	PageSize int `p:"page_size" d:"20" v:"required"`
+}
+
+type FundDetailReq struct {
+	g.Meta `path:"/fund/detail" method:"get" tags:"基金相关" summary:"获取特定基金详情"`
+	FundId string `p:"fund_id" v:"required#基金id缺失"`
+}

+ 35 - 0
go.mod

@@ -0,0 +1,35 @@
+module gof_ppw_api
+
+go 1.19
+
+require (
+	github.com/gogf/gf/contrib/drivers/mysql/v2 v2.1.2
+	github.com/gogf/gf/v2 v2.1.2
+)
+
+require (
+	github.com/BurntSushi/toml v1.1.0 // indirect
+	github.com/cespare/xxhash/v2 v2.1.2 // indirect
+	github.com/clbanning/mxj/v2 v2.5.5 // indirect
+	github.com/dgryski/go-rendezvous v0.0.0-20200823014737-9f7001d12a5f // indirect
+	github.com/fatih/color v1.13.0 // indirect
+	github.com/fsnotify/fsnotify v1.5.4 // indirect
+	github.com/go-logr/logr v1.2.3 // indirect
+	github.com/go-logr/stdr v1.2.2 // indirect
+	github.com/go-redis/redis/v8 v8.11.5 // indirect
+	github.com/go-sql-driver/mysql v1.6.0 // indirect
+	github.com/gorilla/websocket v1.5.0 // indirect
+	github.com/grokify/html-strip-tags-go v0.0.1 // indirect
+	github.com/magiconair/properties v1.8.6 // indirect
+	github.com/mattn/go-colorable v0.1.9 // indirect
+	github.com/mattn/go-isatty v0.0.14 // indirect
+	github.com/mattn/go-runewidth v0.0.9 // indirect
+	github.com/olekukonko/tablewriter v0.0.5 // indirect
+	go.opentelemetry.io/otel v1.7.0 // indirect
+	go.opentelemetry.io/otel/sdk v1.7.0 // indirect
+	go.opentelemetry.io/otel/trace v1.7.0 // indirect
+	golang.org/x/net v0.0.0-20211112202133-69e39bad7dc2 // indirect
+	golang.org/x/sys v0.0.0-20220412211240-33da011f77ad // indirect
+	golang.org/x/text v0.3.8-0.20211105212822-18b340fc7af2 // indirect
+	gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b // indirect
+)

+ 179 - 0
go.sum

@@ -0,0 +1,179 @@
+github.com/BurntSushi/toml v0.4.1/go.mod h1:CxXYINrC8qIiEnFrOxCa7Jy5BFHlXnUU2pbicEuybxQ=
+github.com/BurntSushi/toml v1.1.0 h1:ksErzDEI1khOiGPgpwuI7x2ebx/uXQNw7xJpn9Eq1+I=
+github.com/BurntSushi/toml v1.1.0/go.mod h1:CxXYINrC8qIiEnFrOxCa7Jy5BFHlXnUU2pbicEuybxQ=
+github.com/cespare/xxhash/v2 v2.1.2 h1:YRXhKfTDauu4ajMg1TPgFO5jnlC2HCbmLXMcTG5cbYE=
+github.com/cespare/xxhash/v2 v2.1.2/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs=
+github.com/chzyer/logex v1.1.10/go.mod h1:+Ywpsq7O8HXn0nuIou7OrIPyXbp3wmkHB+jjWRnGsAI=
+github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e/go.mod h1:nSuG5e5PlCu98SY8svDHJxuZscDgtXS6KTTbou5AhLI=
+github.com/chzyer/test v0.0.0-20180213035817-a1ea475d72b1/go.mod h1:Q3SI9o4m/ZMnBNeIyt5eFwwo7qiLfzFZmjNmxjkiQlU=
+github.com/clbanning/mxj/v2 v2.5.5 h1:oT81vUeEiQQ/DcHbzSytRngP6Ky9O+L+0Bw0zSJag9E=
+github.com/clbanning/mxj/v2 v2.5.5/go.mod h1:hNiWqW14h+kc+MdF9C6/YoRfjEJoR3ou6tn/Qo+ve2s=
+github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
+github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
+github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
+github.com/dgryski/go-rendezvous v0.0.0-20200823014737-9f7001d12a5f h1:lO4WD4F/rVNCu3HqELle0jiPLLBs70cWOduZpkS1E78=
+github.com/dgryski/go-rendezvous v0.0.0-20200823014737-9f7001d12a5f/go.mod h1:cuUVRXasLTGF7a8hSLbxyZXjz+1KgoB3wDUb6vlszIc=
+github.com/fatih/color v1.13.0 h1:8LOYc1KYPPmyKMuN8QV2DNRWNbLo6LZ0iLs8+mlH53w=
+github.com/fatih/color v1.13.0/go.mod h1:kLAiJbzzSOZDVNGyDpeOxJ47H46qBXwg5ILebYFFOfk=
+github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo=
+github.com/fsnotify/fsnotify v1.4.9/go.mod h1:znqG4EE+3YCdAaPaxE2ZRY/06pZUdp0tY4IgpuI1SZQ=
+github.com/fsnotify/fsnotify v1.5.1/go.mod h1:T3375wBYaZdLLcVNkcVbzGHY7f1l/uK5T5Ai1i3InKU=
+github.com/fsnotify/fsnotify v1.5.4 h1:jRbGcIw6P2Meqdwuo0H1p6JVLbL5DHKAKlYndzMwVZI=
+github.com/fsnotify/fsnotify v1.5.4/go.mod h1:OVB6XrOHzAwXMpEM7uPOzcehqUV2UqJxmVXmkdnm1bU=
+github.com/go-logr/logr v1.2.2/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A=
+github.com/go-logr/logr v1.2.3 h1:2DntVwHkVopvECVRSlL5PSo9eG+cAkDCuckLubN+rq0=
+github.com/go-logr/logr v1.2.3/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A=
+github.com/go-logr/stdr v1.2.2 h1:hSWxHoqTgW2S2qGc0LTAI563KZ5YKYRhT3MFKZMbjag=
+github.com/go-logr/stdr v1.2.2/go.mod h1:mMo/vtBO5dYbehREoey6XUKy/eSumjCCveDpRre4VKE=
+github.com/go-redis/redis/v8 v8.11.4/go.mod h1:2Z2wHZXdQpCDXEGzqMockDpNyYvi2l4Pxt6RJr792+w=
+github.com/go-redis/redis/v8 v8.11.5 h1:AcZZR7igkdvfVmQTPnu9WE37LRrO/YrBH5zWyjDC0oI=
+github.com/go-redis/redis/v8 v8.11.5/go.mod h1:gREzHqY1hg6oD9ngVRbLStwAWKhA0FEgq8Jd4h5lpwo=
+github.com/go-sql-driver/mysql v1.6.0 h1:BCTh4TKNUYmOmMUcQ3IipzF5prigylS7XXjEkfCHuOE=
+github.com/go-sql-driver/mysql v1.6.0/go.mod h1:DCzpHaOWr8IXmIStZouvnhqoel9Qv2LBy8hT2VhHyBg=
+github.com/go-task/slim-sprig v0.0.0-20210107165309-348f09dbbbc0/go.mod h1:fyg7847qk6SyHyPtNmDHnmrv/HOrqktSC+C9fM+CJOE=
+github.com/gogf/gf/contrib/drivers/mysql/v2 v2.1.2 h1:EZvWnqzFkT5oS17p5LbAX19OPMzWwPcYFv0Ulz2A/Es=
+github.com/gogf/gf/contrib/drivers/mysql/v2 v2.1.2/go.mod h1:z+/0qiOwMroAnj5ESuobTv0l5P83rf+XR3r6Fj8WJyk=
+github.com/gogf/gf/v2 v2.0.0/go.mod h1:apktt6TleWtCIwpz63vBqUnw8MX8gWKoZyxgDpXFtgM=
+github.com/gogf/gf/v2 v2.1.2 h1:3YHfbdfJl4SyBp+8R85jvQIa8jy/iR2fr7iHPqnxOWY=
+github.com/gogf/gf/v2 v2.1.2/go.mod h1:thvkyb43RWUu/m05sRm4CbH9r7t7/FrW2M56L9Ystwk=
+github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U=
+github.com/golang/protobuf v1.4.0-rc.1/go.mod h1:ceaxUfeHdC40wWswd/P6IGgMaK3YpKi5j83Wpe3EHw8=
+github.com/golang/protobuf v1.4.0-rc.1.0.20200221234624-67d41d38c208/go.mod h1:xKAWHe0F5eneWXFV3EuXVDTCmh+JuBKY0li0aMyXATA=
+github.com/golang/protobuf v1.4.0-rc.2/go.mod h1:LlEzMj4AhA7rCAGe4KMBDvJI+AwstrUpVNzEA03Pprs=
+github.com/golang/protobuf v1.4.0-rc.4.0.20200313231945-b860323f09d0/go.mod h1:WU3c8KckQ9AFe+yFwt9sWVRKCVIyN9cPHBJSNnbL67w=
+github.com/golang/protobuf v1.4.0/go.mod h1:jodUvKwWbYaEsadDk5Fwe5c77LiNKVO9IDvqG2KuDX0=
+github.com/golang/protobuf v1.4.2/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI=
+github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk=
+github.com/golang/protobuf v1.5.2/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY=
+github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU=
+github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU=
+github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
+github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
+github.com/google/go-cmp v0.5.6/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
+github.com/google/go-cmp v0.5.7 h1:81/ik6ipDQS2aGcBfIN5dHDB36BwrStyeAQquSYCV4o=
+github.com/google/go-cmp v0.5.7/go.mod h1:n+brtR0CgQNWTVd5ZUFpTBC8YFBDLK/h/bpaJ8/DtOE=
+github.com/google/pprof v0.0.0-20210407192527-94a9f03dee38/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE=
+github.com/gorilla/websocket v1.4.2/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE=
+github.com/gorilla/websocket v1.5.0 h1:PPwGk2jz7EePpoHN/+ClbZu8SPxiqlu12wZP/3sWmnc=
+github.com/gorilla/websocket v1.5.0/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE=
+github.com/grokify/html-strip-tags-go v0.0.1 h1:0fThFwLbW7P/kOiTBs03FsJSV9RM2M/Q/MOnCQxKMo0=
+github.com/grokify/html-strip-tags-go v0.0.1/go.mod h1:2Su6romC5/1VXOQMaWL2yb618ARB8iVo6/DR99A6d78=
+github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU=
+github.com/ianlancetaylor/demangle v0.0.0-20200824232613-28f6c0f3b639/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc=
+github.com/magiconair/properties v1.8.6 h1:5ibWZ6iY0NctNGWo87LalDlEZ6R41TqbbDamhfG/Qzo=
+github.com/magiconair/properties v1.8.6/go.mod h1:y3VJvCyxH9uVvJTWEGAELF3aiYNyPKd5NZ3oSwXrF60=
+github.com/mattn/go-colorable v0.1.9 h1:sqDoxXbdeALODt0DAeJCVp38ps9ZogZEAXjus69YV3U=
+github.com/mattn/go-colorable v0.1.9/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc=
+github.com/mattn/go-isatty v0.0.12/go.mod h1:cbi8OIDigv2wuxKPP5vlRcQ1OAZbq2CE4Kysco4FUpU=
+github.com/mattn/go-isatty v0.0.14 h1:yVuAays6BHfxijgZPzw+3Zlu5yQgKGP2/hcQbHb7S9Y=
+github.com/mattn/go-isatty v0.0.14/go.mod h1:7GGIvUiUoEMVVmxf/4nioHXj79iQHKdU27kJ6hsGG94=
+github.com/mattn/go-runewidth v0.0.9 h1:Lm995f3rfxdpd6TSmuVCHVb/QhupuXlYr8sCI/QdE+0=
+github.com/mattn/go-runewidth v0.0.9/go.mod h1:H031xJmbD/WCDINGzjvQ9THkh0rPKHF+m2gUSrubnMI=
+github.com/nxadm/tail v1.4.4/go.mod h1:kenIhsEOeOJmVchQTgglprH7qJGnHDVpk1VPCcaMI8A=
+github.com/nxadm/tail v1.4.8 h1:nPr65rt6Y5JFSKQO7qToXr7pePgD6Gwiw05lkbyAQTE=
+github.com/nxadm/tail v1.4.8/go.mod h1:+ncqLTQzXmGhMZNUePPaPqPvBxHAIsmXswZKocGu+AU=
+github.com/olekukonko/tablewriter v0.0.5 h1:P2Ga83D34wi1o9J6Wh1mRuqd4mF/x/lgBS7N7AbDhec=
+github.com/olekukonko/tablewriter v0.0.5/go.mod h1:hPp6KlRPjbx+hW8ykQs1w3UBbZlj6HuIJcUGPhkA7kY=
+github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE=
+github.com/onsi/ginkgo v1.12.1/go.mod h1:zj2OWP4+oCPe1qIXoGWkgMRwljMUYCdkwsT2108oapk=
+github.com/onsi/ginkgo v1.16.4/go.mod h1:dX+/inL/fNMqNlz0e9LfyB9TswhZpCVdJM/Z6Vvnwo0=
+github.com/onsi/ginkgo v1.16.5 h1:8xi0RTUf59SOSfEtZMvwTvXYMzG4gV23XVHOZiXNtnE=
+github.com/onsi/ginkgo v1.16.5/go.mod h1:+E8gABHa3K6zRBolWtd+ROzc/U5bkGt0FwiG042wbpU=
+github.com/onsi/ginkgo/v2 v2.0.0/go.mod h1:vw5CSIxN1JObi/U8gcbwft7ZxR2dgaR70JSE3/PpL4c=
+github.com/onsi/gomega v1.7.1/go.mod h1:XdKZgCCFLUoM/7CFJVPcG8C1xQ1AJ0vpAezJrB7JYyY=
+github.com/onsi/gomega v1.10.1/go.mod h1:iN09h71vgCQne3DLsj+A5owkum+a2tYe+TOCB1ybHNo=
+github.com/onsi/gomega v1.16.0/go.mod h1:HnhC7FXeEQY45zxNK3PPoIUhzk/80Xly9PcubAlGdZY=
+github.com/onsi/gomega v1.17.0/go.mod h1:HnhC7FXeEQY45zxNK3PPoIUhzk/80Xly9PcubAlGdZY=
+github.com/onsi/gomega v1.18.1 h1:M1GfJqGRrBrrGGsbxzV5dqM2U2ApXefZCQpkukxYRLE=
+github.com/onsi/gomega v1.18.1/go.mod h1:0q+aL8jAiMXy9hbwj2mr5GziHiwhAIQpFmmtT5hitRs=
+github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
+github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
+github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
+github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA=
+github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
+github.com/stretchr/testify v1.7.1 h1:5TQK59W5E3v0r2duFAb7P95B6hEeOyEnHRa8MjYSMTY=
+github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
+github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
+github.com/yuin/goldmark v1.4.0/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k=
+go.opentelemetry.io/otel v1.0.0/go.mod h1:AjRVh9A5/5DE7S+mZtTR6t8vpKKryam+0lREnfmS4cg=
+go.opentelemetry.io/otel v1.7.0 h1:Z2lA3Tdch0iDcrhJXDIlC94XE+bxok1F9B+4Lz/lGsM=
+go.opentelemetry.io/otel v1.7.0/go.mod h1:5BdUoMIz5WEs0vt0CUEMtSSaTSHBBVwrhnz7+nrD5xk=
+go.opentelemetry.io/otel/sdk v1.0.0/go.mod h1:PCrDHlSy5x1kjezSdL37PhbFUMjrsLRshJ2zCzeXwbM=
+go.opentelemetry.io/otel/sdk v1.7.0 h1:4OmStpcKVOfvDOgCt7UriAPtKolwIhxpnSNI/yK+1B0=
+go.opentelemetry.io/otel/sdk v1.7.0/go.mod h1:uTEOTwaqIVuTGiJN7ii13Ibp75wJmYUDe374q6cZwUU=
+go.opentelemetry.io/otel/trace v1.0.0/go.mod h1:PXTWqayeFUlJV1YDNhsJYB184+IvAH814St6o6ajzIs=
+go.opentelemetry.io/otel/trace v1.7.0 h1:O37Iogk1lEkMRXewVtZ1BBTVn5JEp8GrJvP92bJqC6o=
+go.opentelemetry.io/otel/trace v1.7.0/go.mod h1:fzLSB9nqR2eXzxPXb2JW9IKE+ScyXA48yyE4TNvoHqU=
+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.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
+golang.org/x/mod v0.4.2/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
+golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
+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-20200520004742-59133d7f0dd7/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A=
+golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU=
+golang.org/x/net v0.0.0-20210428140749-89ef3d95e781/go.mod h1:OJAsFXCWl8Ukc7SiCT/9KSuxbyM7479/AVlXFRxuMCk=
+golang.org/x/net v0.0.0-20210805182204-aaa1db679c0d/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y=
+golang.org/x/net v0.0.0-20211112202133-69e39bad7dc2 h1:CIJ76btIcR3eFI5EgSo6k1qKw9KJexJuRLI9G7Hp5wE=
+golang.org/x/net v0.0.0-20211112202133-69e39bad7dc2/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y=
+golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
+golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
+golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
+golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
+golang.org/x/sys v0.0.0-20180909124046-d0be0721c37e/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
+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-20190904154756-749cb33beabd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
+golang.org/x/sys v0.0.0-20191005200804-aed5e4c7ecf9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
+golang.org/x/sys v0.0.0-20191120155948-bd437916bb0e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
+golang.org/x/sys v0.0.0-20191204072324-ce4227a45e2e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
+golang.org/x/sys v0.0.0-20200116001909-b77594299b42/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
+golang.org/x/sys v0.0.0-20200223170610-d5e6a3e2c0ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
+golang.org/x/sys v0.0.0-20200323222414-85ca7c5b95cd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
+golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
+golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
+golang.org/x/sys v0.0.0-20210112080510-489259a85091/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
+golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
+golang.org/x/sys v0.0.0-20210423185535-09eb48e85fd7/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
+golang.org/x/sys v0.0.0-20210630005230-0f9fa26af87c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
+golang.org/x/sys v0.0.0-20210809222454-d867a43fc93e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
+golang.org/x/sys v0.0.0-20211216021012-1d35b9e2eb4e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
+golang.org/x/sys v0.0.0-20220412211240-33da011f77ad h1:ntjMns5wyP/fN65tdBD4g8J5w8n015+iIIs9rtjXkY0=
+golang.org/x/sys v0.0.0-20220412211240-33da011f77ad/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
+golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
+golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
+golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
+golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
+golang.org/x/text v0.3.8-0.20211105212822-18b340fc7af2 h1:GLw7MR8AfAG2GmGcmVgObFOHXYypgGjnGno25RDwn3Y=
+golang.org/x/text v0.3.8-0.20211105212822-18b340fc7af2/go.mod h1:EFNZuWvGYxIRUEX+K8UmCFwYmZjqcrnq15ZuVldZkZ0=
+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-20201224043029-2b0845dc783e/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA=
+golang.org/x/tools v0.1.7/go.mod h1:LGqMHiF4EqQNHR1JncWGqT5BVaXmza+X+BDGol+dOxo=
+golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
+golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
+golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
+golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
+google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8=
+google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0=
+google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM=
+google.golang.org/protobuf v1.20.1-0.20200309200217-e05f789c0967/go.mod h1:A+miEFZTKqfCUM6K7xSMQL9OKL/b6hQv+e19PK+JZNE=
+google.golang.org/protobuf v1.21.0/go.mod h1:47Nbq4nVaFHyn7ilMalzfO3qCViNmqZ2kzikPIcrTAo=
+google.golang.org/protobuf v1.23.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU=
+google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw=
+google.golang.org/protobuf v1.26.0/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/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMys=
+gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 h1:uRGJdciOHaEIrze2W8Q3AKkepLTh2hOroT7a+7czfdQ=
+gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7/go.mod h1:dt/ZhP58zS4L8KSrWDmTeBkI65Dw0HsyUHuEVlX15mw=
+gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
+gopkg.in/yaml.v2 v2.2.4/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
+gopkg.in/yaml.v2 v2.3.0/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
+gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY=
+gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ=
+gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
+gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b h1:h8qDotaEPuJATrMmW04NCwg7v22aHH28wwpauUhK9Oo=
+gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=

+ 10 - 0
hack/config.yaml

@@ -0,0 +1,10 @@
+
+# CLI tool, only in development environment.
+# https://goframe.org/pages/viewpage.action?pageId=3673173
+gfcli:
+  gen:
+    dao:
+      - link:         "mysql:root:root@tcp(127.0.0.1:3306)/ppw_data_core"
+        removePrefix: "dc_"
+        overwriteDao: false
+        jsonCase:     "Snake"

+ 34 - 0
internal/cmd/cmd.go

@@ -0,0 +1,34 @@
+package cmd
+
+import (
+	"context"
+	"gof_ppw_api/internal/middleware"
+
+	"github.com/gogf/gf/v2/frame/g"
+	"github.com/gogf/gf/v2/net/ghttp"
+	"github.com/gogf/gf/v2/os/gcmd"
+
+	"gof_ppw_api/internal/controller"
+)
+
+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.Use(middleware.Session)
+			s.Use(middleware.Auth)
+			s.Use(middleware.Log)
+			s.Group("/api", func(group *ghttp.RouterGroup) {
+				group.Middleware(middleware.Res)
+				group.Bind(
+					controller.Fund,
+				)
+			})
+			s.Run()
+			return nil
+		},
+	}
+)

+ 1 - 0
internal/consts/consts.go

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

+ 6 - 0
internal/consts/status.go

@@ -0,0 +1,6 @@
+package consts
+
+const (
+	OkStatus               = 200 //请求正常
+	ParamsParseErrorStatus = 401 //http请求参数校验失败
+)

+ 26 - 0
internal/controller/fund.go

@@ -0,0 +1,26 @@
+package controller
+
+import (
+	"context"
+	"gof_ppw_api/api"
+	"gof_ppw_api/internal/service"
+)
+
+var Fund = new(FundController)
+
+type FundController struct{}
+
+// List 基金列表
+func (p *FundController) List(ctx context.Context, req *api.FundListReq) (res *api.CommonRes, err error) {
+	return
+}
+
+// Detail 基金详情
+func (p *FundController) Detail(ctx context.Context, req *api.FundDetailReq) (res api.CommonRes, err error) {
+	data, err := service.Fund.Detail(ctx, req.FundId)
+	//g.RequestFromCtx(ctx).Response.WriteJson(data)
+	res = api.CommonRes{
+		Data: data,
+	}
+	return
+}

+ 27 - 0
internal/dao/fund_information.go

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

+ 27 - 0
internal/dao/fund_last_nav.go

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

+ 243 - 0
internal/dao/internal/fund_information.go

@@ -0,0 +1,243 @@
+// ==========================================================================
+// Code generated 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"
+)
+
+// FundInformationDao is the data access object for table dc_fund_information.
+type FundInformationDao struct {
+	table   string                 // table is the underlying table name of the DAO.
+	group   string                 // group is the database configuration group name of current DAO.
+	columns FundInformationColumns // columns contains all the column names of Table for convenient usage.
+}
+
+// FundInformationColumns defines and stores column names for table dc_fund_information.
+type FundInformationColumns struct {
+	Id                        string // 主键ID
+	PFundId                   string // 父级产品ID
+	FundId                    string // 基金id,'HF'开头(后加36进制编码格式,不足8位长度左补零) 例:HF00000001
+	FundName                  string // 基金中文全称
+	FundShortName             string // 基金中文简称
+	FundStructure             string // 基金形式:1-公司型,2-合伙型,3-契约型,-1-其他
+	FundType                  string // 基金类型:1-信托计 划,2-有限合伙,3-券商资管,4-公募专户,5-单账户,6-证券投资基金,7-海外基金,8-期货资管,9-保险资管、10-创业投 资基金、11-股权投资基金、12-银行理财、13-类固收信托 、 14-私募资产配置基金  -1其他投资基金
+	PublicFundType            string // (即将弃用)公募基金类型:1-混合型、2-债券型、3-定开债券、4-联接基金、5-货币型、6-债券指数、7-保本型、8-理财型、9-QDII、10-股票指数、11-QDII-指数、12-股票型、13-固定收益、14-分级杠杆、15-ETF-场内、16-QDII-ETF、17-债券创新-场内、18-封闭式
+	PubFundType               string // 公募基金类型-基础参数,见fund_parameters:1-股票型、2-混合型、3-债券型、4-货币型、5-商品型、6-市场中性型、7-FOF、8-海外型
+	PubSubFundType            string // 公募基金子类型-基础参数,见fund_parameters:1-主动型、2-被动型、3-偏股型、4-平衡型、5-偏债型、6-普通债券型、7-可转债型、8-指数型、9-商品型、10-市场中性型、11-货币型、12-理财型
+	FundCharacteristic        string // 券商资管产品特点
+	BaseCurrency              string // 基础货币,1-人民币,2-港币,3-美元,4-份,-1-其他
+	InceptionDate             string // 成立日期
+	Domicile                  string // 注册国家,1-中国大陆、2-香港、3-新加坡、4-开曼群岛、5-台湾、6-英属维尔京群岛BVI、-1-其他
+	PrimaryBenchmarkId        string // 指数id,以'IN'开头(后加36进制编码格式,不足8位长度左补零) 例:IN00000001
+	SecondaryBenchmark        string // 业绩基准指数及其说明
+	LockupPeriod              string // 封闭期,单位:月,-1:不确定,0:无封闭期
+	LockupPeriodUnit          string // 封闭期单位:1-天 2-月
+	LockupPeriod2             string // 准封闭期
+	LockPeriod                string // 锁定期,单位:月,-1:不确定,0:无锁定期
+	LockPeriodUnit            string // 锁定期单位:1-天 2-月
+	OpenDay                   string // 开放日
+	RedemptionDay             string // 赎回日
+	Duration                  string // 产品存续期,单位:月。-1,不确定,0,无固定期限,999999永续
+	InitialUnitValue          string // 单位面值
+	InvestmentScope           string // 基金投资范围
+	InvestmentObjective       string // 投资目标
+	FundPortfolio             string // 基金资产配置比例
+	InvestmentRestriction     string // 投资限制
+	FundInvestmentPhilosophy  string // 投资理念
+	FundStrategyDescription   string // 投资策略
+	InvestmentProcess         string // 投资决策流程
+	AdvisorId                 string // 投资顾问Id
+	CustodianId               string // 托管银行Id
+	BrokerId                  string // 证券经纪人Id
+	BrokerFutureId            string // 期货经纪人id
+	LiquidationAgencyId       string // 外包机构Id
+	TrustId                   string // 基金管理公司Id
+	AdministratorId           string // 行政管理人Id
+	LegalCounselId            string // 法律顾问Id
+	AuditorId                 string // 审计机构
+	GeneralServiceId          string // 综合服务商id
+	NavFrequency              string // 净值披露频率
+	PerformanceDisclosureMark string // 产品业绩披露标识:1-A,2-B,3-C
+	PerformanceDisclosureType string // 产品业绩披露方式:1-净值,2-万份收益
+	IsVisible                 string // 基金在前台是否可见
+	ManagerType               string // 管理类型:1-顾问管理  2-受托管理 3-自我管理
+	BeginMemberCnt            string // 成立时参与人户数
+	RegisterPeriod            string // 1-暂行办法实施前成立的基金,2-暂行办法实施后的基金
+	ZjxLastInfoUpdateTime     string // 中基协最后更新时间
+	SpecialTips               string // 基金协会特别提示
+	AmacUrl                   string // 中基协页面地址
+	RaiseType                 string // 募集方式:1-私募,2-公募
+	RiskReturnDesc            string // 风险收益特征
+	Creatorid                 string // 创建者Id,默认第一次创建者名称,创建后不变更
+	Createtime                string // 创建时间,默认第一次创建的getdate()时间
+	Updaterid                 string // 修改者Id;第一次创建时与Creator值相同,修改时与修改人值相同
+	Updatetime                string // 修改时间;第一次创建时与CreatTime值相同,修改时与修改时间相同
+	Isvalid                   string // 记录的有效性;1-有效;0-无效;
+	RegisterNumber            string //
+	Istiered                  string // 是否分级:1-分级,0-不分级;
+	IstieredDesc              string // 分级说明:0-空 1-优先份额 2-中间份额 3-劣后份额
+	RegisterDate              string // 备案日期
+	IsRanking                 string // 是否参与排名,1-参与排名 0-不参与排名
+	IsRating                  string // 是否参与评级,1-参与评级 0-不参与评级
+	NavSource                 string // 基金净值来源地址
+	ContractName              string // 合同文件名称
+	ContractPath              string // 合同文件存储路径
+	IsAuthorized              string // 是否授权:1-是,0-否,-1-未确定(默认)
+	IsInResearch              string // 是否调查中:1-是,0-否
+	VisibleCtrl               string // 展示控制(业务场景),结合d_fund_visible_ctrl_set设置前台是否可见、净值是否可见、净值是否可见(B端)
+	IsNavVisible              string // 净值是否可见:1-是,0-否
+	IsNavVisibleOrg           string // 净值是否可见(B端):1-是,0-否
+	IsFeeBefore               string // 是否费前:1-是 0-否
+	IsDeductReward            string // 是否扣除业绩报酬:1-是 0-否("是否费前"为"否"才会有值,否则为空)
+	ValuationInstitutionId    string // 估值机构id
+	TrustRegisterNumber       string // 信托登记系统产品编码
+	IsConsignment             string // 是否代销产品: 1-是 , 0-否
+	IsQdii                    string // 是否qdii:1-是,0-否
+	IsExclusive               string // 是否独家
+	IsShowIndependent         string // 是否独立展示(用于子基金)
+	TrustApplyRegisterDate    string // 申请登记日期(中信登)
+	TrustPublicityDate        string // 公示日期(中信登)
+	TrustMainIndustry         string // 主要投向行业
+	TrustPropertyApplication  string // 财产运用方式
+	TrustFunction             string // 信托功能:1-融资类 2-投资类 3-事务管理
+}
+
+//  fundInformationColumns holds the columns for table dc_fund_information.
+var fundInformationColumns = FundInformationColumns{
+	Id:                        "id",
+	PFundId:                   "p_fund_id",
+	FundId:                    "fund_id",
+	FundName:                  "fund_name",
+	FundShortName:             "fund_short_name",
+	FundStructure:             "fund_structure",
+	FundType:                  "fund_type",
+	PublicFundType:            "public_fund_type",
+	PubFundType:               "pub_fund_type",
+	PubSubFundType:            "pub_sub_fund_type",
+	FundCharacteristic:        "fund_characteristic",
+	BaseCurrency:              "base_currency",
+	InceptionDate:             "inception_date",
+	Domicile:                  "domicile",
+	PrimaryBenchmarkId:        "primary_benchmark_id",
+	SecondaryBenchmark:        "secondary_benchmark",
+	LockupPeriod:              "lockup_period",
+	LockupPeriodUnit:          "lockup_period_unit",
+	LockupPeriod2:             "lockup_period2",
+	LockPeriod:                "lock_period",
+	LockPeriodUnit:            "lock_period_unit",
+	OpenDay:                   "open_day",
+	RedemptionDay:             "redemption_day",
+	Duration:                  "duration",
+	InitialUnitValue:          "initial_unit_value",
+	InvestmentScope:           "investment_scope",
+	InvestmentObjective:       "investment_objective",
+	FundPortfolio:             "fund_portfolio",
+	InvestmentRestriction:     "investment_restriction",
+	FundInvestmentPhilosophy:  "fund_investment_philosophy",
+	FundStrategyDescription:   "fund_strategy_description",
+	InvestmentProcess:         "investment_process",
+	AdvisorId:                 "advisor_id",
+	CustodianId:               "custodian_id",
+	BrokerId:                  "broker_id",
+	BrokerFutureId:            "broker_future_id",
+	LiquidationAgencyId:       "liquidation_agency_id",
+	TrustId:                   "trust_id",
+	AdministratorId:           "administrator_id",
+	LegalCounselId:            "legal_counsel_id",
+	AuditorId:                 "auditor_id",
+	GeneralServiceId:          "general_service_id",
+	NavFrequency:              "nav_frequency",
+	PerformanceDisclosureMark: "performance_disclosure_mark",
+	PerformanceDisclosureType: "performance_disclosure_type",
+	IsVisible:                 "IsVisible",
+	ManagerType:               "manager_type",
+	BeginMemberCnt:            "begin_member_cnt",
+	RegisterPeriod:            "register_period",
+	ZjxLastInfoUpdateTime:     "zjx_last_info_update_time",
+	SpecialTips:               "special_tips",
+	AmacUrl:                   "amac_url",
+	RaiseType:                 "raise_type",
+	RiskReturnDesc:            "risk_return_desc",
+	Creatorid:                 "creatorid",
+	Createtime:                "createtime",
+	Updaterid:                 "updaterid",
+	Updatetime:                "updatetime",
+	Isvalid:                   "isvalid",
+	RegisterNumber:            "register_number",
+	Istiered:                  "istiered",
+	IstieredDesc:              "istiered_desc",
+	RegisterDate:              "register_date",
+	IsRanking:                 "is_ranking",
+	IsRating:                  "is_rating",
+	NavSource:                 "nav_source",
+	ContractName:              "contract_name",
+	ContractPath:              "contract_path",
+	IsAuthorized:              "is_authorized",
+	IsInResearch:              "is_in_research",
+	VisibleCtrl:               "visible_ctrl",
+	IsNavVisible:              "is_nav_visible",
+	IsNavVisibleOrg:           "is_nav_visible_org",
+	IsFeeBefore:               "is_fee_before",
+	IsDeductReward:            "is_deduct_reward",
+	ValuationInstitutionId:    "valuation_institution_id",
+	TrustRegisterNumber:       "trust_register_number",
+	IsConsignment:             "is_consignment",
+	IsQdii:                    "is_qdii",
+	IsExclusive:               "is_exclusive",
+	IsShowIndependent:         "is_show_independent",
+	TrustApplyRegisterDate:    "trust_apply_register_date",
+	TrustPublicityDate:        "trust_publicity_date",
+	TrustMainIndustry:         "trust_main_industry",
+	TrustPropertyApplication:  "trust_property_application",
+	TrustFunction:             "trust_function",
+}
+
+// NewFundInformationDao creates and returns a new DAO object for table data access.
+func NewFundInformationDao() *FundInformationDao {
+	return &FundInformationDao{
+		group:   "default",
+		table:   "dc_fund_information",
+		columns: fundInformationColumns,
+	}
+}
+
+// DB retrieves and returns the underlying raw database management object of current DAO.
+func (dao *FundInformationDao) DB() gdb.DB {
+	return g.DB(dao.group)
+}
+
+// Table returns the table name of current dao.
+func (dao *FundInformationDao) Table() string {
+	return dao.table
+}
+
+// Columns returns all column names of current dao.
+func (dao *FundInformationDao) Columns() FundInformationColumns {
+	return dao.columns
+}
+
+// Group returns the configuration group name of database of current dao.
+func (dao *FundInformationDao) Group() string {
+	return dao.group
+}
+
+// Ctx creates and returns the Model for current DAO, It automatically sets the context for current operation.
+func (dao *FundInformationDao) Ctx(ctx context.Context) *gdb.Model {
+	return dao.DB().Model(dao.table).Safe().Ctx(ctx)
+}
+
+// Transaction wraps the transaction logic using function f.
+// It rollbacks the transaction and returns the error from function f if it returns non-nil error.
+// It commits the transaction and returns nil if function f returns nil.
+//
+// Note that, you should not Commit or Rollback the transaction in function f
+// as it is automatically handled by this function.
+func (dao *FundInformationDao) Transaction(ctx context.Context, f func(ctx context.Context, tx *gdb.TX) error) (err error) {
+	return dao.Ctx(ctx).Transaction(ctx, f)
+}

+ 85 - 0
internal/dao/internal/fund_last_nav.go

@@ -0,0 +1,85 @@
+// ==========================================================================
+// Code generated 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"
+)
+
+// FundLastNavDao is the data access object for table dc_fund_last_nav.
+type FundLastNavDao struct {
+	table   string             // table is the underlying table name of the DAO.
+	group   string             // group is the database configuration group name of current DAO.
+	columns FundLastNavColumns // columns contains all the column names of Table for convenient usage.
+}
+
+// FundLastNavColumns defines and stores column names for table dc_fund_last_nav.
+type FundLastNavColumns struct {
+	FundId                  string // 基金id,'HF'开头(后加36进制编码格式,不足8位长度左补零) 例:HF00000001
+	PriceDate               string // 净值日期
+	PrePriceDate            string // 上一个净值日期
+	Nav                     string // 单位净值
+	CumulativeNav           string // 考虑分红再投资的单位累计净值
+	CumulativeNavWithdrawal string // 分红不投资的单位累计净值
+	Updatetime              string // 修改时间;第一次创建时与CreatTime值相同,修改时与修改时间相同
+}
+
+//  fundLastNavColumns holds the columns for table dc_fund_last_nav.
+var fundLastNavColumns = FundLastNavColumns{
+	FundId:                  "fund_id",
+	PriceDate:               "price_date",
+	PrePriceDate:            "pre_price_date",
+	Nav:                     "nav",
+	CumulativeNav:           "cumulative_nav",
+	CumulativeNavWithdrawal: "cumulative_nav_withdrawal",
+	Updatetime:              "updatetime",
+}
+
+// NewFundLastNavDao creates and returns a new DAO object for table data access.
+func NewFundLastNavDao() *FundLastNavDao {
+	return &FundLastNavDao{
+		group:   "default",
+		table:   "dc_fund_last_nav",
+		columns: fundLastNavColumns,
+	}
+}
+
+// DB retrieves and returns the underlying raw database management object of current DAO.
+func (dao *FundLastNavDao) DB() gdb.DB {
+	return g.DB(dao.group)
+}
+
+// Table returns the table name of current dao.
+func (dao *FundLastNavDao) Table() string {
+	return dao.table
+}
+
+// Columns returns all column names of current dao.
+func (dao *FundLastNavDao) Columns() FundLastNavColumns {
+	return dao.columns
+}
+
+// Group returns the configuration group name of database of current dao.
+func (dao *FundLastNavDao) Group() string {
+	return dao.group
+}
+
+// Ctx creates and returns the Model for current DAO, It automatically sets the context for current operation.
+func (dao *FundLastNavDao) Ctx(ctx context.Context) *gdb.Model {
+	return dao.DB().Model(dao.table).Safe().Ctx(ctx)
+}
+
+// Transaction wraps the transaction logic using function f.
+// It rollbacks the transaction and returns the error from function f if it returns non-nil error.
+// It commits the transaction and returns nil if function f returns nil.
+//
+// Note that, you should not Commit or Rollback the transaction in function f
+// as it is automatically handled by this function.
+func (dao *FundLastNavDao) Transaction(ctx context.Context, f func(ctx context.Context, tx *gdb.TX) error) (err error) {
+	return dao.Ctx(ctx).Transaction(ctx, f)
+}

+ 0 - 0
internal/logic/.gitkeep


+ 14 - 0
internal/middleware/auth.go

@@ -0,0 +1,14 @@
+package middleware
+
+import (
+	"github.com/gogf/gf/v2/net/ghttp"
+	"net/http"
+)
+
+func Auth(r *ghttp.Request) {
+	if true {
+		r.Middleware.Next()
+	} else {
+		r.Response.WriteStatus(http.StatusForbidden)
+	}
+}

+ 10 - 0
internal/middleware/cors.go

@@ -0,0 +1,10 @@
+package middleware
+
+import (
+	"github.com/gogf/gf/v2/net/ghttp"
+)
+
+func CORS(r *ghttp.Request) {
+	r.Response.CORSDefault()
+	r.Middleware.Next()
+}

+ 7 - 0
internal/middleware/ctx.go

@@ -0,0 +1,7 @@
+package middleware
+
+import "github.com/gogf/gf/v2/net/ghttp"
+
+func Ctx(r *ghttp.Request) {
+	r.Middleware.Next()
+}

+ 9 - 0
internal/middleware/log.go

@@ -0,0 +1,9 @@
+package middleware
+
+import (
+	"github.com/gogf/gf/v2/net/ghttp"
+)
+
+func Log(r *ghttp.Request) {
+	r.Middleware.Next()
+}

+ 57 - 0
internal/middleware/res.go

@@ -0,0 +1,57 @@
+package middleware
+
+import (
+	"fmt"
+	"github.com/gogf/gf/v2/errors/gcode"
+	"github.com/gogf/gf/v2/errors/gerror"
+	"github.com/gogf/gf/v2/net/ghttp"
+	"net/http"
+	"reflect"
+)
+
+type DefaultHandlerResponse struct {
+	Code    int         `json:"code" dc:"响应状态码"`
+	Message string      `json:"msg" dc:"响应信息"`
+	Data    interface{} `json:"data" dc:"响应数据"`
+}
+
+func Res(r *ghttp.Request) {
+	r.Middleware.Next()
+
+	// There's custom buffer content, it then exits current handler.
+	if r.Response.BufferLength() > 0 {
+		return
+	}
+
+	var (
+		msg  string
+		err  = r.GetError()
+		res  = r.GetHandlerResponse()
+		code = gerror.Code(err)
+	)
+	if err != nil {
+		if code == gcode.CodeNil {
+			code = gcode.CodeInternalError
+		}
+		msg = err.Error()
+	} else if r.Response.Status > 0 && r.Response.Status != http.StatusOK {
+		msg = http.StatusText(r.Response.Status)
+		switch r.Response.Status {
+		case http.StatusNotFound:
+			code = gcode.CodeNotFound
+		case http.StatusForbidden:
+			code = gcode.CodeNotAuthorized
+		default:
+			code = gcode.CodeUnknown
+		}
+	} else {
+		code = gcode.CodeOK
+	}
+	fmt.Println("res_type: ", reflect.TypeOf(res))
+	fmt.Println("res_data: ", res)
+	r.Response.WriteJsonExit(DefaultHandlerResponse{
+		Code:    code.Code(),
+		Message: msg,
+		Data:    res,
+	})
+}

+ 11 - 0
internal/middleware/session.go

@@ -0,0 +1,11 @@
+package middleware
+
+import (
+	"github.com/gogf/gf/v2/net/ghttp"
+)
+
+func Session(r *ghttp.Request) {
+	//fmt.Println("using session middleware..")
+	//_ = r.Session.Set("time", gtime.Timestamp())
+	r.Middleware.Next()
+}

+ 0 - 0
internal/model/.gitkeep


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


+ 101 - 0
internal/model/do/fund_information.go

@@ -0,0 +1,101 @@
+// =================================================================================
+// Code generated by GoFrame CLI tool. DO NOT EDIT.
+// =================================================================================
+
+package do
+
+import (
+	"github.com/gogf/gf/v2/frame/g"
+	"github.com/gogf/gf/v2/os/gtime"
+)
+
+// FundInformation is the golang structure of table dc_fund_information for DAO operations like Where/Data.
+type FundInformation struct {
+	g.Meta                    `orm:"table:dc_fund_information, do:true"`
+	Id                        interface{} // 主键ID
+	PFundId                   interface{} // 父级产品ID
+	FundId                    interface{} // 基金id,'HF'开头(后加36进制编码格式,不足8位长度左补零) 例:HF00000001
+	FundName                  interface{} // 基金中文全称
+	FundShortName             interface{} // 基金中文简称
+	FundStructure             interface{} // 基金形式:1-公司型,2-合伙型,3-契约型,-1-其他
+	FundType                  interface{} // 基金类型:1-信托计 划,2-有限合伙,3-券商资管,4-公募专户,5-单账户,6-证券投资基金,7-海外基金,8-期货资管,9-保险资管、10-创业投 资基金、11-股权投资基金、12-银行理财、13-类固收信托 、 14-私募资产配置基金  -1其他投资基金
+	PublicFundType            interface{} // (即将弃用)公募基金类型:1-混合型、2-债券型、3-定开债券、4-联接基金、5-货币型、6-债券指数、7-保本型、8-理财型、9-QDII、10-股票指数、11-QDII-指数、12-股票型、13-固定收益、14-分级杠杆、15-ETF-场内、16-QDII-ETF、17-债券创新-场内、18-封闭式
+	PubFundType               interface{} // 公募基金类型-基础参数,见fund_parameters:1-股票型、2-混合型、3-债券型、4-货币型、5-商品型、6-市场中性型、7-FOF、8-海外型
+	PubSubFundType            interface{} // 公募基金子类型-基础参数,见fund_parameters:1-主动型、2-被动型、3-偏股型、4-平衡型、5-偏债型、6-普通债券型、7-可转债型、8-指数型、9-商品型、10-市场中性型、11-货币型、12-理财型
+	FundCharacteristic        interface{} // 券商资管产品特点
+	BaseCurrency              interface{} // 基础货币,1-人民币,2-港币,3-美元,4-份,-1-其他
+	InceptionDate             *gtime.Time // 成立日期
+	Domicile                  interface{} // 注册国家,1-中国大陆、2-香港、3-新加坡、4-开曼群岛、5-台湾、6-英属维尔京群岛BVI、-1-其他
+	PrimaryBenchmarkId        interface{} // 指数id,以'IN'开头(后加36进制编码格式,不足8位长度左补零) 例:IN00000001
+	SecondaryBenchmark        interface{} // 业绩基准指数及其说明
+	LockupPeriod              interface{} // 封闭期,单位:月,-1:不确定,0:无封闭期
+	LockupPeriodUnit          interface{} // 封闭期单位:1-天 2-月
+	LockupPeriod2             interface{} // 准封闭期
+	LockPeriod                interface{} // 锁定期,单位:月,-1:不确定,0:无锁定期
+	LockPeriodUnit            interface{} // 锁定期单位:1-天 2-月
+	OpenDay                   interface{} // 开放日
+	RedemptionDay             interface{} // 赎回日
+	Duration                  interface{} // 产品存续期,单位:月。-1,不确定,0,无固定期限,999999永续
+	InitialUnitValue          interface{} // 单位面值
+	InvestmentScope           interface{} // 基金投资范围
+	InvestmentObjective       interface{} // 投资目标
+	FundPortfolio             interface{} // 基金资产配置比例
+	InvestmentRestriction     interface{} // 投资限制
+	FundInvestmentPhilosophy  interface{} // 投资理念
+	FundStrategyDescription   interface{} // 投资策略
+	InvestmentProcess         interface{} // 投资决策流程
+	AdvisorId                 interface{} // 投资顾问Id
+	CustodianId               interface{} // 托管银行Id
+	BrokerId                  interface{} // 证券经纪人Id
+	BrokerFutureId            interface{} // 期货经纪人id
+	LiquidationAgencyId       interface{} // 外包机构Id
+	TrustId                   interface{} // 基金管理公司Id
+	AdministratorId           interface{} // 行政管理人Id
+	LegalCounselId            interface{} // 法律顾问Id
+	AuditorId                 interface{} // 审计机构
+	GeneralServiceId          interface{} // 综合服务商id
+	NavFrequency              interface{} // 净值披露频率
+	PerformanceDisclosureMark interface{} // 产品业绩披露标识:1-A,2-B,3-C
+	PerformanceDisclosureType interface{} // 产品业绩披露方式:1-净值,2-万份收益
+	IsVisible                 interface{} // 基金在前台是否可见
+	ManagerType               interface{} // 管理类型:1-顾问管理  2-受托管理 3-自我管理
+	BeginMemberCnt            interface{} // 成立时参与人户数
+	RegisterPeriod            interface{} // 1-暂行办法实施前成立的基金,2-暂行办法实施后的基金
+	ZjxLastInfoUpdateTime     interface{} // 中基协最后更新时间
+	SpecialTips               interface{} // 基金协会特别提示
+	AmacUrl                   interface{} // 中基协页面地址
+	RaiseType                 interface{} // 募集方式:1-私募,2-公募
+	RiskReturnDesc            interface{} // 风险收益特征
+	Creatorid                 interface{} // 创建者Id,默认第一次创建者名称,创建后不变更
+	Createtime                *gtime.Time // 创建时间,默认第一次创建的getdate()时间
+	Updaterid                 interface{} // 修改者Id;第一次创建时与Creator值相同,修改时与修改人值相同
+	Updatetime                *gtime.Time // 修改时间;第一次创建时与CreatTime值相同,修改时与修改时间相同
+	Isvalid                   interface{} // 记录的有效性;1-有效;0-无效;
+	RegisterNumber            interface{} //
+	Istiered                  interface{} // 是否分级:1-分级,0-不分级;
+	IstieredDesc              interface{} // 分级说明:0-空 1-优先份额 2-中间份额 3-劣后份额
+	RegisterDate              *gtime.Time // 备案日期
+	IsRanking                 interface{} // 是否参与排名,1-参与排名 0-不参与排名
+	IsRating                  interface{} // 是否参与评级,1-参与评级 0-不参与评级
+	NavSource                 interface{} // 基金净值来源地址
+	ContractName              interface{} // 合同文件名称
+	ContractPath              interface{} // 合同文件存储路径
+	IsAuthorized              interface{} // 是否授权:1-是,0-否,-1-未确定(默认)
+	IsInResearch              interface{} // 是否调查中:1-是,0-否
+	VisibleCtrl               interface{} // 展示控制(业务场景),结合d_fund_visible_ctrl_set设置前台是否可见、净值是否可见、净值是否可见(B端)
+	IsNavVisible              interface{} // 净值是否可见:1-是,0-否
+	IsNavVisibleOrg           interface{} // 净值是否可见(B端):1-是,0-否
+	IsFeeBefore               interface{} // 是否费前:1-是 0-否
+	IsDeductReward            interface{} // 是否扣除业绩报酬:1-是 0-否("是否费前"为"否"才会有值,否则为空)
+	ValuationInstitutionId    interface{} // 估值机构id
+	TrustRegisterNumber       interface{} // 信托登记系统产品编码
+	IsConsignment             interface{} // 是否代销产品: 1-是 , 0-否
+	IsQdii                    interface{} // 是否qdii:1-是,0-否
+	IsExclusive               interface{} // 是否独家
+	IsShowIndependent         interface{} // 是否独立展示(用于子基金)
+	TrustApplyRegisterDate    *gtime.Time // 申请登记日期(中信登)
+	TrustPublicityDate        *gtime.Time // 公示日期(中信登)
+	TrustMainIndustry         interface{} // 主要投向行业
+	TrustPropertyApplication  interface{} // 财产运用方式
+	TrustFunction             interface{} // 信托功能:1-融资类 2-投资类 3-事务管理
+}

+ 22 - 0
internal/model/do/fund_last_nav.go

@@ -0,0 +1,22 @@
+// =================================================================================
+// Code generated by GoFrame CLI tool. DO NOT EDIT.
+// =================================================================================
+
+package do
+
+import (
+	"github.com/gogf/gf/v2/frame/g"
+	"github.com/gogf/gf/v2/os/gtime"
+)
+
+// FundLastNav is the golang structure of table dc_fund_last_nav for DAO operations like Where/Data.
+type FundLastNav struct {
+	g.Meta                  `orm:"table:dc_fund_last_nav, do:true"`
+	FundId                  interface{} // 基金id,'HF'开头(后加36进制编码格式,不足8位长度左补零) 例:HF00000001
+	PriceDate               *gtime.Time // 净值日期
+	PrePriceDate            *gtime.Time // 上一个净值日期
+	Nav                     interface{} // 单位净值
+	CumulativeNav           interface{} // 考虑分红再投资的单位累计净值
+	CumulativeNavWithdrawal interface{} // 分红不投资的单位累计净值
+	Updatetime              *gtime.Time // 修改时间;第一次创建时与CreatTime值相同,修改时与修改时间相同
+}

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


+ 99 - 0
internal/model/entity/fund_information.go

@@ -0,0 +1,99 @@
+// =================================================================================
+// Code generated by GoFrame CLI tool. DO NOT EDIT.
+// =================================================================================
+
+package entity
+
+import (
+	"github.com/gogf/gf/v2/os/gtime"
+)
+
+// FundInformation is the golang structure for table fund_information.
+type FundInformation struct {
+	Id                        uint        `json:"id"                          ` // 主键ID
+	PFundId                   string      `json:"p_fund_id"                   ` // 父级产品ID
+	FundId                    string      `json:"fund_id"                     ` // 基金id,'HF'开头(后加36进制编码格式,不足8位长度左补零) 例:HF00000001
+	FundName                  string      `json:"fund_name"                   ` // 基金中文全称
+	FundShortName             string      `json:"fund_short_name"             ` // 基金中文简称
+	FundStructure             int         `json:"fund_structure"              ` // 基金形式:1-公司型,2-合伙型,3-契约型,-1-其他
+	FundType                  int         `json:"fund_type"                   ` // 基金类型:1-信托计 划,2-有限合伙,3-券商资管,4-公募专户,5-单账户,6-证券投资基金,7-海外基金,8-期货资管,9-保险资管、10-创业投 资基金、11-股权投资基金、12-银行理财、13-类固收信托 、 14-私募资产配置基金  -1其他投资基金
+	PublicFundType            int         `json:"public_fund_type"            ` // (即将弃用)公募基金类型:1-混合型、2-债券型、3-定开债券、4-联接基金、5-货币型、6-债券指数、7-保本型、8-理财型、9-QDII、10-股票指数、11-QDII-指数、12-股票型、13-固定收益、14-分级杠杆、15-ETF-场内、16-QDII-ETF、17-债券创新-场内、18-封闭式
+	PubFundType               int         `json:"pub_fund_type"               ` // 公募基金类型-基础参数,见fund_parameters:1-股票型、2-混合型、3-债券型、4-货币型、5-商品型、6-市场中性型、7-FOF、8-海外型
+	PubSubFundType            int         `json:"pub_sub_fund_type"           ` // 公募基金子类型-基础参数,见fund_parameters:1-主动型、2-被动型、3-偏股型、4-平衡型、5-偏债型、6-普通债券型、7-可转债型、8-指数型、9-商品型、10-市场中性型、11-货币型、12-理财型
+	FundCharacteristic        string      `json:"fund_characteristic"         ` // 券商资管产品特点
+	BaseCurrency              int         `json:"base_currency"               ` // 基础货币,1-人民币,2-港币,3-美元,4-份,-1-其他
+	InceptionDate             *gtime.Time `json:"inception_date"              ` // 成立日期
+	Domicile                  int         `json:"domicile"                    ` // 注册国家,1-中国大陆、2-香港、3-新加坡、4-开曼群岛、5-台湾、6-英属维尔京群岛BVI、-1-其他
+	PrimaryBenchmarkId        string      `json:"primary_benchmark_id"        ` // 指数id,以'IN'开头(后加36进制编码格式,不足8位长度左补零) 例:IN00000001
+	SecondaryBenchmark        string      `json:"secondary_benchmark"         ` // 业绩基准指数及其说明
+	LockupPeriod              int         `json:"lockup_period"               ` // 封闭期,单位:月,-1:不确定,0:无封闭期
+	LockupPeriodUnit          int         `json:"lockup_period_unit"          ` // 封闭期单位:1-天 2-月
+	LockupPeriod2             string      `json:"lockup_period_2"             ` // 准封闭期
+	LockPeriod                int         `json:"lock_period"                 ` // 锁定期,单位:月,-1:不确定,0:无锁定期
+	LockPeriodUnit            int         `json:"lock_period_unit"            ` // 锁定期单位:1-天 2-月
+	OpenDay                   string      `json:"open_day"                    ` // 开放日
+	RedemptionDay             string      `json:"redemption_day"              ` // 赎回日
+	Duration                  int         `json:"duration"                    ` // 产品存续期,单位:月。-1,不确定,0,无固定期限,999999永续
+	InitialUnitValue          float64     `json:"initial_unit_value"          ` // 单位面值
+	InvestmentScope           string      `json:"investment_scope"            ` // 基金投资范围
+	InvestmentObjective       string      `json:"investment_objective"        ` // 投资目标
+	FundPortfolio             string      `json:"fund_portfolio"              ` // 基金资产配置比例
+	InvestmentRestriction     string      `json:"investment_restriction"      ` // 投资限制
+	FundInvestmentPhilosophy  string      `json:"fund_investment_philosophy"  ` // 投资理念
+	FundStrategyDescription   string      `json:"fund_strategy_description"   ` // 投资策略
+	InvestmentProcess         string      `json:"investment_process"          ` // 投资决策流程
+	AdvisorId                 string      `json:"advisor_id"                  ` // 投资顾问Id
+	CustodianId               string      `json:"custodian_id"                ` // 托管银行Id
+	BrokerId                  string      `json:"broker_id"                   ` // 证券经纪人Id
+	BrokerFutureId            string      `json:"broker_future_id"            ` // 期货经纪人id
+	LiquidationAgencyId       string      `json:"liquidation_agency_id"       ` // 外包机构Id
+	TrustId                   string      `json:"trust_id"                    ` // 基金管理公司Id
+	AdministratorId           string      `json:"administrator_id"            ` // 行政管理人Id
+	LegalCounselId            string      `json:"legal_counsel_id"            ` // 法律顾问Id
+	AuditorId                 string      `json:"auditor_id"                  ` // 审计机构
+	GeneralServiceId          string      `json:"general_service_id"          ` // 综合服务商id
+	NavFrequency              string      `json:"nav_frequency"               ` // 净值披露频率
+	PerformanceDisclosureMark int         `json:"performance_disclosure_mark" ` // 产品业绩披露标识:1-A,2-B,3-C
+	PerformanceDisclosureType int         `json:"performance_disclosure_type" ` // 产品业绩披露方式:1-净值,2-万份收益
+	IsVisible                 int         `json:"is_visible"                  ` // 基金在前台是否可见
+	ManagerType               int         `json:"manager_type"                ` // 管理类型:1-顾问管理  2-受托管理 3-自我管理
+	BeginMemberCnt            int         `json:"begin_member_cnt"            ` // 成立时参与人户数
+	RegisterPeriod            int         `json:"register_period"             ` // 1-暂行办法实施前成立的基金,2-暂行办法实施后的基金
+	ZjxLastInfoUpdateTime     string      `json:"zjx_last_info_update_time"   ` // 中基协最后更新时间
+	SpecialTips               string      `json:"special_tips"                ` // 基金协会特别提示
+	AmacUrl                   string      `json:"amac_url"                    ` // 中基协页面地址
+	RaiseType                 int         `json:"raise_type"                  ` // 募集方式:1-私募,2-公募
+	RiskReturnDesc            string      `json:"risk_return_desc"            ` // 风险收益特征
+	Creatorid                 int         `json:"creatorid"                   ` // 创建者Id,默认第一次创建者名称,创建后不变更
+	Createtime                *gtime.Time `json:"createtime"                  ` // 创建时间,默认第一次创建的getdate()时间
+	Updaterid                 int         `json:"updaterid"                   ` // 修改者Id;第一次创建时与Creator值相同,修改时与修改人值相同
+	Updatetime                *gtime.Time `json:"updatetime"                  ` // 修改时间;第一次创建时与CreatTime值相同,修改时与修改时间相同
+	Isvalid                   int         `json:"isvalid"                     ` // 记录的有效性;1-有效;0-无效;
+	RegisterNumber            string      `json:"register_number"             ` //
+	Istiered                  int         `json:"istiered"                    ` // 是否分级:1-分级,0-不分级;
+	IstieredDesc              int         `json:"istiered_desc"               ` // 分级说明:0-空 1-优先份额 2-中间份额 3-劣后份额
+	RegisterDate              *gtime.Time `json:"register_date"               ` // 备案日期
+	IsRanking                 int         `json:"is_ranking"                  ` // 是否参与排名,1-参与排名 0-不参与排名
+	IsRating                  int         `json:"is_rating"                   ` // 是否参与评级,1-参与评级 0-不参与评级
+	NavSource                 string      `json:"nav_source"                  ` // 基金净值来源地址
+	ContractName              string      `json:"contract_name"               ` // 合同文件名称
+	ContractPath              string      `json:"contract_path"               ` // 合同文件存储路径
+	IsAuthorized              int         `json:"is_authorized"               ` // 是否授权:1-是,0-否,-1-未确定(默认)
+	IsInResearch              int         `json:"is_in_research"              ` // 是否调查中:1-是,0-否
+	VisibleCtrl               int         `json:"visible_ctrl"                ` // 展示控制(业务场景),结合d_fund_visible_ctrl_set设置前台是否可见、净值是否可见、净值是否可见(B端)
+	IsNavVisible              int         `json:"is_nav_visible"              ` // 净值是否可见:1-是,0-否
+	IsNavVisibleOrg           int         `json:"is_nav_visible_org"          ` // 净值是否可见(B端):1-是,0-否
+	IsFeeBefore               int         `json:"is_fee_before"               ` // 是否费前:1-是 0-否
+	IsDeductReward            int         `json:"is_deduct_reward"            ` // 是否扣除业绩报酬:1-是 0-否("是否费前"为"否"才会有值,否则为空)
+	ValuationInstitutionId    string      `json:"valuation_institution_id"    ` // 估值机构id
+	TrustRegisterNumber       string      `json:"trust_register_number"       ` // 信托登记系统产品编码
+	IsConsignment             int         `json:"is_consignment"              ` // 是否代销产品: 1-是 , 0-否
+	IsQdii                    int         `json:"is_qdii"                     ` // 是否qdii:1-是,0-否
+	IsExclusive               int         `json:"is_exclusive"                ` // 是否独家
+	IsShowIndependent         int         `json:"is_show_independent"         ` // 是否独立展示(用于子基金)
+	TrustApplyRegisterDate    *gtime.Time `json:"trust_apply_register_date"   ` // 申请登记日期(中信登)
+	TrustPublicityDate        *gtime.Time `json:"trust_publicity_date"        ` // 公示日期(中信登)
+	TrustMainIndustry         string      `json:"trust_main_industry"         ` // 主要投向行业
+	TrustPropertyApplication  string      `json:"trust_property_application"  ` // 财产运用方式
+	TrustFunction             int         `json:"trust_function"              ` // 信托功能:1-融资类 2-投资类 3-事务管理
+}

+ 20 - 0
internal/model/entity/fund_last_nav.go

@@ -0,0 +1,20 @@
+// =================================================================================
+// Code generated by GoFrame CLI tool. DO NOT EDIT.
+// =================================================================================
+
+package entity
+
+import (
+	"github.com/gogf/gf/v2/os/gtime"
+)
+
+// FundLastNav is the golang structure for table fund_last_nav.
+type FundLastNav struct {
+	FundId                  string      `json:"fund_id"                   ` // 基金id,'HF'开头(后加36进制编码格式,不足8位长度左补零) 例:HF00000001
+	PriceDate               *gtime.Time `json:"price_date"                ` // 净值日期
+	PrePriceDate            *gtime.Time `json:"pre_price_date"            ` // 上一个净值日期
+	Nav                     float64     `json:"nav"                       ` // 单位净值
+	CumulativeNav           float64     `json:"cumulative_nav"            ` // 考虑分红再投资的单位累计净值
+	CumulativeNavWithdrawal float64     `json:"cumulative_nav_withdrawal" ` // 分红不投资的单位累计净值
+	Updatetime              *gtime.Time `json:"updatetime"                ` // 修改时间;第一次创建时与CreatTime值相同,修改时与修改时间相同
+}

+ 1 - 0
internal/packed/packed.go

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

+ 28 - 0
internal/service/fund.go

@@ -0,0 +1,28 @@
+package service
+
+import (
+	"context"
+	"gof_ppw_api/internal/dao"
+)
+
+var Fund = new(FundService)
+
+type FundService struct {
+	Service
+}
+
+// List 基金列表
+func (p *FundService) List() {
+}
+
+// Detail 特定基金详情
+func (p *FundService) Detail(ctx context.Context, fundId string) (m interface{}, err error) {
+	one, err := dao.FundInformation.Ctx(ctx).
+		Where("fund_id", fundId).
+		Fields("fund_id,fund_name,fund_short_name").
+		One()
+	if err != nil {
+		return nil, err
+	}
+	return one.Map(), nil
+}

+ 3 - 0
internal/service/service.go

@@ -0,0 +1,3 @@
+package service
+
+type Service struct{}

+ 13 - 0
main.go

@@ -0,0 +1,13 @@
+package main
+
+import (
+	_ "github.com/gogf/gf/contrib/drivers/mysql/v2"
+	_ "gof_ppw_api/internal/packed"
+
+	"github.com/gogf/gf/v2/os/gctx"
+	"gof_ppw_api/internal/cmd"
+)
+
+func main() {
+	cmd.Main.Run(gctx.New())
+}

+ 21 - 0
manifest/config/config.yaml

@@ -0,0 +1,21 @@
+server:
+  address:          ":8080"
+  dumpRouterMap:    true
+  routeOverWrite:   true
+  accessLogEnabled: true
+  openapiPath:      "/api.json"
+  swaggerPath:      "/swagger"
+
+logger:
+  level : "all"
+  stdout: true
+
+# Database.
+database:
+  logger:
+    level:   "all"
+    stdout:  true
+
+  default:
+    link:   "mysql:root:root@tcp(127.0.0.1:3306)/ppw_data_core"
+    debug:  true

+ 21 - 0
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
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
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
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
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
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
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
manifest/docker/docker.sh

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

+ 0 - 0
resource/i18n/.gitkeep


+ 0 - 0
resource/public/html/.gitkeep


+ 0 - 0
resource/public/plugin/.gitkeep


+ 0 - 0
resource/public/resource/css/.gitkeep


+ 0 - 0
resource/public/resource/image/.gitkeep


+ 0 - 0
resource/public/resource/js/.gitkeep


+ 0 - 0
resource/template/.gitkeep


+ 0 - 0
utility/.gitkeep