Przeglądaj źródła

查询新增字段

WH01243 2 lat temu
rodzic
commit
72a7cefedc
4 zmienionych plików z 157 dodań i 529 usunięć
  1. 50 44
      go.mod
  2. 80 480
      go.sum
  3. 26 4
      middleground/publicservice.go
  4. 1 1
      public/public.go

+ 50 - 44
go.mod

@@ -4,7 +4,7 @@ go 1.18
 
 require (
 	app.yhyue.com/moapp/jyMarketing v0.0.2-0.20230304035551-21bb1eedf547
-	app.yhyue.com/moapp/jybase v0.0.0-20230517064222-e0bdfc8ee0e8
+	app.yhyue.com/moapp/jybase v0.0.0-20230614085041-f8f20842d5cb
 	app.yhyue.com/moapp/message v0.0.0-20221223100203-6402e389d9ae
 	bp.jydev.jianyu360.cn/BaseService/entManageApplication v0.0.0-20230214091519-89a98c01ab0e
 	bp.jydev.jianyu360.cn/BaseService/powerCheckCenter v0.0.0-20230222052351-9d6fad062447
@@ -14,8 +14,9 @@ require (
 	github.com/robfig/cron v1.2.0
 	github.com/tealeg/xlsx v1.0.5
 	github.com/thinxer/go-word2vec v0.0.0-20150917053916-5c19ec7379ed
-	github.com/zeromicro/go-zero v1.4.4
-	go.mongodb.org/mongo-driver v1.11.1
+	github.com/zeromicro/go-zero v1.5.3
+	go.mongodb.org/mongo-driver v1.11.6
+	jygit.jydev.jianyu360.cn/ApplicationCenter/publicService v0.0.0-20230626055559-2b719f6c6602
 )
 
 require (
@@ -23,84 +24,87 @@ require (
 	github.com/beorn7/perks v1.0.1 // indirect
 	github.com/cenkalti/backoff/v4 v4.2.1 // indirect
 	github.com/cespare/xxhash/v2 v2.2.0 // indirect
-	github.com/coreos/go-semver v0.3.0 // indirect
-	github.com/coreos/go-systemd/v22 v22.3.2 // indirect
+	github.com/coreos/go-semver v0.3.1 // indirect
+	github.com/coreos/go-systemd/v22 v22.5.0 // indirect
 	github.com/davecgh/go-spew v1.1.1 // indirect
-	github.com/dchest/captcha v0.0.0-20200903113550-03f5f0333e1f // indirect
 	github.com/dgryski/go-rendezvous v0.0.0-20200823014737-9f7001d12a5f // indirect
-	github.com/fatih/color v1.13.0 // indirect
-	github.com/felixge/fgprof v0.9.3 // indirect
+	github.com/emicklei/go-restful/v3 v3.9.0 // indirect
+	github.com/fatih/color v1.15.0 // indirect
 	github.com/garyburd/redigo v1.6.2 // indirect
 	github.com/go-logr/logr v1.2.4 // indirect
 	github.com/go-logr/stdr v1.2.2 // indirect
+	github.com/go-openapi/jsonpointer v0.19.6 // indirect
+	github.com/go-openapi/jsonreference v0.20.1 // indirect
+	github.com/go-openapi/swag v0.22.3 // indirect
 	github.com/go-redis/redis/v8 v8.11.5 // indirect
-	github.com/go-sql-driver/mysql v1.7.0 // indirect
+	github.com/go-sql-driver/mysql v1.7.1 // indirect
 	github.com/gogo/protobuf v1.3.2 // indirect
 	github.com/golang/mock v1.6.0 // indirect
-	github.com/golang/protobuf v1.5.2 // indirect
+	github.com/golang/protobuf v1.5.3 // indirect
 	github.com/golang/snappy v0.0.4 // indirect
 	github.com/gomodule/redigo v2.0.0+incompatible // indirect
+	github.com/google/gnostic v0.5.7-v3refs // indirect
 	github.com/google/go-cmp v0.5.9 // indirect
 	github.com/google/gofuzz v1.2.0 // indirect
-	github.com/google/pprof v0.0.0-20211214055906-6f57359322fd // indirect
-	github.com/googleapis/gnostic v0.5.5 // indirect
-	github.com/grpc-ecosystem/grpc-gateway/v2 v2.7.0 // indirect
+	github.com/grpc-ecosystem/grpc-gateway/v2 v2.15.0 // indirect
 	github.com/howeyc/fsnotify v0.9.0 // indirect
 	github.com/jinzhu/inflection v1.0.0 // indirect
 	github.com/jinzhu/now v1.1.1 // indirect
 	github.com/josharian/intern v1.0.0 // indirect
 	github.com/json-iterator/go v1.1.12 // indirect
-	github.com/klauspost/compress v1.15.11 // indirect
+	github.com/klauspost/compress v1.15.15 // indirect
 	github.com/mailru/easyjson v0.7.7 // indirect
-	github.com/mattn/go-colorable v0.1.9 // indirect
-	github.com/mattn/go-isatty v0.0.14 // indirect
-	github.com/matttproud/golang_protobuf_extensions v1.0.2-0.20181231171920-c182affec369 // indirect
+	github.com/mattn/go-colorable v0.1.13 // indirect
+	github.com/mattn/go-isatty v0.0.17 // indirect
+	github.com/matttproud/golang_protobuf_extensions v1.0.4 // indirect
 	github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect
 	github.com/modern-go/reflect2 v1.0.2 // indirect
 	github.com/montanaflynn/stats v0.0.0-20171201202039-1bf9dbcd8cbe // indirect
+	github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 // indirect
 	github.com/olivere/elastic v6.2.37+incompatible // indirect
 	github.com/olivere/elastic/v7 v7.0.22 // indirect
 	github.com/openzipkin/zipkin-go v0.4.1 // indirect
-	github.com/pelletier/go-toml/v2 v2.0.6 // indirect
+	github.com/pelletier/go-toml/v2 v2.0.8 // indirect
 	github.com/pkg/errors v0.9.1 // indirect
-	github.com/prometheus/client_golang v1.13.0 // indirect
-	github.com/prometheus/client_model v0.2.0 // indirect
-	github.com/prometheus/common v0.37.0 // indirect
-	github.com/prometheus/procfs v0.8.0 // indirect
+	github.com/prometheus/client_golang v1.15.1 // indirect
+	github.com/prometheus/client_model v0.3.0 // indirect
+	github.com/prometheus/common v0.42.0 // indirect
+	github.com/prometheus/procfs v0.9.0 // indirect
 	github.com/spaolacci/murmur3 v1.1.0 // indirect
 	github.com/xdg-go/pbkdf2 v1.0.0 // indirect
 	github.com/xdg-go/scram v1.1.1 // indirect
 	github.com/xdg-go/stringprep v1.0.3 // indirect
 	github.com/youmark/pkcs8 v0.0.0-20181117223130-1be2e3e5546d // indirect
 	github.com/ziutek/blas v0.0.0-20190227122918-da4ca23e90bb // indirect
-	go.etcd.io/etcd/api/v3 v3.5.5 // indirect
-	go.etcd.io/etcd/client/pkg/v3 v3.5.5 // indirect
-	go.etcd.io/etcd/client/v3 v3.5.5 // indirect
+	go.etcd.io/etcd/api/v3 v3.5.9 // indirect
+	go.etcd.io/etcd/client/pkg/v3 v3.5.9 // indirect
+	go.etcd.io/etcd/client/v3 v3.5.9 // indirect
 	go.opentelemetry.io/otel v1.15.1 // indirect
 	go.opentelemetry.io/otel/exporters/jaeger v1.15.1 // indirect
 	go.opentelemetry.io/otel/exporters/otlp/internal/retry v1.15.1 // indirect
 	go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.15.1 // indirect
 	go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.15.1 // indirect
 	go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.15.1 // indirect
+	go.opentelemetry.io/otel/exporters/stdout/stdouttrace v1.14.0 // indirect
 	go.opentelemetry.io/otel/exporters/zipkin v1.15.1 // indirect
 	go.opentelemetry.io/otel/sdk v1.15.1 // indirect
 	go.opentelemetry.io/otel/trace v1.15.1 // indirect
 	go.opentelemetry.io/proto/otlp v0.19.0 // indirect
-	go.uber.org/atomic v1.9.0 // indirect
-	go.uber.org/automaxprocs v1.5.1 // indirect
-	go.uber.org/multierr v1.8.0 // indirect
-	go.uber.org/zap v1.21.0 // indirect
-	golang.org/x/crypto v0.0.0-20221010152910-d6f0a8c073c2 // indirect
-	golang.org/x/net v0.8.0 // indirect
-	golang.org/x/oauth2 v0.4.0 // indirect
+	go.uber.org/atomic v1.10.0 // indirect
+	go.uber.org/automaxprocs v1.5.2 // indirect
+	go.uber.org/multierr v1.9.0 // indirect
+	go.uber.org/zap v1.24.0 // indirect
+	golang.org/x/crypto v0.6.0 // indirect
+	golang.org/x/net v0.10.0 // indirect
+	golang.org/x/oauth2 v0.7.0 // indirect
 	golang.org/x/sync v0.1.0 // indirect
-	golang.org/x/sys v0.7.0 // indirect
-	golang.org/x/term v0.6.0 // indirect
-	golang.org/x/text v0.8.0 // indirect
+	golang.org/x/sys v0.8.0 // indirect
+	golang.org/x/term v0.8.0 // indirect
+	golang.org/x/text v0.9.0 // indirect
 	golang.org/x/time v0.3.0 // indirect
 	google.golang.org/appengine v1.6.7 // indirect
-	google.golang.org/genproto v0.0.0-20230110181048-76db0878b65f // indirect
-	google.golang.org/grpc v1.54.0 // indirect
+	google.golang.org/genproto v0.0.0-20230410155749-daa745c078e1 // indirect
+	google.golang.org/grpc v1.56.1 // indirect
 	google.golang.org/protobuf v1.30.0 // indirect
 	gopkg.in/alexcesaro/quotedprintable.v3 v3.0.0-20150716171945-2caba252f4dc // indirect
 	gopkg.in/inf.v0 v0.9.1 // indirect
@@ -108,11 +112,13 @@ require (
 	gopkg.in/yaml.v3 v3.0.1 // indirect
 	gorm.io/driver/mysql v1.0.5 // indirect
 	gorm.io/gorm v1.21.3 // indirect
-	k8s.io/api v0.22.9 // indirect
-	k8s.io/apimachinery v0.22.9 // indirect
-	k8s.io/client-go v0.22.9 // indirect
-	k8s.io/klog/v2 v2.80.1 // indirect
-	k8s.io/utils v0.0.0-20221108210102-8e77b1f39fe2 // indirect
-	sigs.k8s.io/structured-merge-diff/v4 v4.2.1 // indirect
-	sigs.k8s.io/yaml v1.2.0 // indirect
+	k8s.io/api v0.26.3 // indirect
+	k8s.io/apimachinery v0.27.0-alpha.3 // indirect
+	k8s.io/client-go v0.26.3 // indirect
+	k8s.io/klog/v2 v2.90.1 // indirect
+	k8s.io/kube-openapi v0.0.0-20230307230338-69ee2d25a840 // indirect
+	k8s.io/utils v0.0.0-20230209194617-a36077c30491 // indirect
+	sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd // indirect
+	sigs.k8s.io/structured-merge-diff/v4 v4.2.3 // indirect
+	sigs.k8s.io/yaml v1.3.0 // indirect
 )

Plik diff jest za duży
+ 80 - 480
go.sum


+ 26 - 4
middleground/publicservice.go

@@ -1,20 +1,23 @@
 package middleground
 
 import (
+	"context"
+	"jygit.jydev.jianyu360.cn/ApplicationCenter/publicService/rpc/datasmt"
+	"jygit.jydev.jianyu360.cn/ApplicationCenter/publicService/rpc/pb"
 	"log"
 
 	"github.com/zeromicro/go-zero/core/discov"
 	"github.com/zeromicro/go-zero/zrpc"
 )
 
-type publicservice struct {
+type publicService struct {
 	hosts  []string
 	key    string
 	client zrpc.Client
 }
 
-func newPublicservice(hosts []string, key string) *publicservice {
-	r := &publicservice{
+func newPublicservice(hosts []string, key string) *publicService {
+	r := &publicService{
 		hosts: hosts,
 		key:   key,
 	}
@@ -22,7 +25,7 @@ func newPublicservice(hosts []string, key string) *publicservice {
 	return r
 }
 
-func (u *publicservice) NewClient() zrpc.Client {
+func (u *publicService) NewClient() zrpc.Client {
 	if u.client != nil && u.client.Conn() != nil {
 		return u.client
 	}
@@ -39,3 +42,22 @@ func (u *publicservice) NewClient() zrpc.Client {
 	u.client = client
 	return client
 }
+
+//获取身份列表
+func (p *publicService) List(searchValue, dataType string, pageNum, pageSize int64) *pb.DatasmtRespList {
+	client := u.NewClient()
+	if client == nil {
+		return nil
+	}
+	resp, err := datasmt.NewDatasmt(client).List(context.Background(), &pb.DatasmtReqList{
+		SearchValue: searchValue,
+		DataType:    dataType,
+		PageNum:     pageNum,
+		PageSize:    pageSize,
+	})
+	if err != nil {
+		log.Println(err)
+		return nil
+	}
+	return resp
+}

+ 1 - 1
public/public.go

@@ -23,7 +23,7 @@ var filterReg_3 = regexp.MustCompile("(项目|公告|公示)$")
 var filterReg_2 = regexp.MustCompile("^[)\\)>》】\\]}}〕,,;;::'\"“”。.\\??、/+=\\_—*&……\\^%$¥@!!`~·(\\(<《【\\[{{〔]+$")
 var filterReg_1 = regexp.MustCompile("^([0-9]{1,3}|[零一二三四五六七八九十]{1,2}|联系人?|电话|地址|编号|采购|政府采购|成交|更正|招标|中标|变更|结果)$")
 var filterReg = regexp.MustCompile("^[的人号时元万公告项目地址电话邮编日期联系招标中结果成交项目项目采购采购项目政府采购公告更正公告]+$")
-var MgoBiddingFields = `{"_id":1,"projectname":1,"projectcode":1,"title":1,"s_winner":1,"buyertel":1,"bidstatus":1,"site":1,"bidamount":1,"toptype":1,"winneraddr":1,"winner":1,"agency":1,"buyer":1,"detail":1,"city":1,"subtype":1,"buyerclass":1,"href":1,"comeintime":1,"winnertel":1,"area":1,"publishtime":1,"buyeraddr":1,"agencytel":1,"budget":1,"entidlist":1,"buyerperson":1,"winnerperson":1,"agencyaddr":1,"recommended_service":1,"competehref":1,"owner":1,"total_investment":1,"projectaddr":1,"projectperiod":1,"approvedept":1,"approvecontent":1,"approvecode":1,"approvenumber":1,"approvetime":1,"approvestatus":1,"project_scale":1}`
+var MgoBiddingFields = `{"_id":1,"purchasinglist":1,"projectname":1,"projectcode":1,"title":1,"s_winner":1,"buyertel":1,"bidstatus":1,"site":1,"bidamount":1,"toptype":1,"winneraddr":1,"winner":1,"agency":1,"buyer":1,"detail":1,"city":1,"subtype":1,"buyerclass":1,"href":1,"comeintime":1,"winnertel":1,"area":1,"publishtime":1,"buyeraddr":1,"agencytel":1,"budget":1,"entidlist":1,"buyerperson":1,"winnerperson":1,"agencyaddr":1,"recommended_service":1,"competehref":1,"owner":1,"total_investment":1,"projectaddr":1,"projectperiod":1,"approvedept":1,"approvecontent":1,"approvecode":1,"approvenumber":1,"approvetime":1,"approvestatus":1,"project_scale":1}`
 
 const (
 	INDEX = "bidding"

Niektóre pliki nie zostały wyświetlone z powodu dużej ilości zmienionych plików