Эх сурвалжийг харах

wip:数据导出计算数量由mongodb改为elasticsearch

wangkaiyue 1 жил өмнө
parent
commit
e3bbd4e553

+ 1 - 1
src/go.mod

@@ -6,7 +6,7 @@ require (
 	app.yhyue.com/moapp/jyMarketing v0.0.2-0.20230308011651-df591d32df88
 	app.yhyue.com/moapp/jybase v0.0.0-20231026082242-8eb41c7bdda6
 	app.yhyue.com/moapp/jylog v0.0.0-20230522075550-05d7230ca545
-	app.yhyue.com/moapp/jypkg v1.0.7-0.20231114075116-499de5b076d3
+	app.yhyue.com/moapp/jypkg v1.0.7-0.20231116075926-75c4304c7ccc
 	bp.jydev.jianyu360.cn/BaseService/userCenter v1.2.15-0.20230925060020-8e4db0f1e13e
 	github.com/ClickHouse/clickhouse-go v1.5.4
 	github.com/SKatiyar/qr v0.0.0-20151201054752-25b6bdf44e67

+ 2 - 2
src/go.sum

@@ -9,8 +9,8 @@ app.yhyue.com/moapp/jybase v0.0.0-20231026082242-8eb41c7bdda6 h1:uyaBp5Iuc/Il4+O
 app.yhyue.com/moapp/jybase v0.0.0-20231026082242-8eb41c7bdda6/go.mod h1:Hv9U/7oHRucqH315Tr1+d03NCvS9mOKPfk8pwwlOIwQ=
 app.yhyue.com/moapp/jylog v0.0.0-20230522075550-05d7230ca545 h1:+Lak4m1zgsigQloOsvp8AJ+0XeX/+PGp9QP550xlbBQ=
 app.yhyue.com/moapp/jylog v0.0.0-20230522075550-05d7230ca545/go.mod h1:uFrsdUBFbETiJlEmr4PtJWPsZlUpPj2bHQRhryu6ggk=
-app.yhyue.com/moapp/jypkg v1.0.7-0.20231114075116-499de5b076d3 h1:6Jv5DcoGYCsHVMwUjvlZubuTgY/vu4fWP5+rcXIKNj0=
-app.yhyue.com/moapp/jypkg v1.0.7-0.20231114075116-499de5b076d3/go.mod h1:LuxdVd+j3uwm7N5j2hivmpPU0LJytEV7iwAIljdoc4Q=
+app.yhyue.com/moapp/jypkg v1.0.7-0.20231116075926-75c4304c7ccc h1:vTPIpcwxe2SMLEV9KYddcN9REM1qvMXkeLYbYh20Ewg=
+app.yhyue.com/moapp/jypkg v1.0.7-0.20231116075926-75c4304c7ccc/go.mod h1:LuxdVd+j3uwm7N5j2hivmpPU0LJytEV7iwAIljdoc4Q=
 app.yhyue.com/moapp/message v0.0.0-20221223100203-6402e389d9ae h1:6rDDaz6yxvE8viTSzEBwKYOFWq14TMfuBivSazUZMz4=
 app.yhyue.com/moapp/message v0.0.0-20221223100203-6402e389d9ae/go.mod h1:b0zZHev3gmJao1Fo+2Z2KPVjsuLOJVvVxf+kCnu9WkA=
 bp.jydev.jianyu360.cn/BaseService/entManageApplication v0.0.0-20230214091519-89a98c01ab0e h1:h+VEI3o1qC0jeCzkFGTrLI4f27cfa/W/y+0sXokWMgE=

+ 6 - 6
src/jfw/front/dataExport.go

@@ -266,11 +266,11 @@ func (d *DataExport) SieveData() {
 		"error_msg":  "",
 	}
 	if _id != "" {
-		msgCount := dataexport.GetDataExportSearchCountByScdId(public.MQFW, public.Mgo_Bidding, public.DbConf.Mongodb.Bidding.DbName, public.DbConf.Elasticsearch.Main.Address, _id)
+		msgCount := dataexport.GetDataExportSearchCountByScdId(public.MQFW, public.DbConf.Elasticsearch.Main.Address, _id)
 		//从500条数据中筛选字段最全五条
 		scd := dataexport.GetSqlObjFromId(public.MQFW, _id)
 		kws := scd.Keyword
-		res, err := dataexport.GetDataExportSearchResult(public.Mgo_Bidding, public.DbConf.Mongodb.Bidding.DbName, public.DbConf.Elasticsearch.Main.Address, scd, dataType, -1)
+		res, err := dataexport.GetDataExportSearchResult(public.DbConf.Elasticsearch.Main.Address, scd, dataType, -1)
 		if res == nil || err != nil {
 			_res["error_msg"] = "无数据"
 			d.ServeJson(_res)
@@ -288,7 +288,7 @@ func (d *DataExport) SieveData() {
 			}
 		}
 
-		list := dataexport.FormatExportData(public.Mgo_Ent, &res_screen, config.Sysconfig["webdomain"].(string), dataType, true)
+		list := dataexport.FormatExportData(&res_screen, config.Sysconfig["webdomain"].(string), dataType, true)
 		/*if msgCount > 20000 {
 			msgCount = 20000
 		}*/
@@ -538,7 +538,7 @@ func (d *DataExport) ToCreateOrderPage(_id string) error {
 	} else {
 		d.DelSession("Structed")
 	}
-	msgCount := dataexport.GetDataExportSearchCountByScdId(public.MQFW, public.Mgo_Bidding, public.DbConf.Mongodb.Bidding.DbName, public.DbConf.Elasticsearch.Main.Address, id)
+	msgCount := dataexport.GetDataExportSearchCountByScdId(public.MQFW, public.DbConf.Elasticsearch.Main.Address, id)
 	if msgCount > public.ExConf.MsgMaxCount || msgCount == -1 {
 		msgCount = public.ExConf.MsgMaxCount
 	}
@@ -626,14 +626,14 @@ func (d *DataExport) PreviewData(source, _id string) error {
 	//从500条数据中筛选字段最全五条
 	scd := dataexport.GetSqlObjFromId(public.MQFW, _id)
 	kws := scd.Keyword
-	res, err := dataexport.GetDataExportSearchResult(public.Mgo_Bidding, public.DbConf.Mongodb.Bidding.DbName, public.DbConf.Elasticsearch.Main.Address, scd, dataType, -1)
+	res, err := dataexport.GetDataExportSearchResult(public.DbConf.Elasticsearch.Main.Address, scd, dataType, -1)
 	if res == nil || err != nil {
 		log.Println("PreviewData查询出错", res)
 		return d.Render("/pc/dataExport_noDataErr.html", &d.T)
 	}
 	//格式化字段
 	res_screen := dataexport.ScreenData(res, dataType, 20, kws)
-	list := dataexport.FormatExportData(public.Mgo_Ent, &res_screen, config.Sysconfig["webdomain"].(string), dataType, true)
+	list := dataexport.FormatExportData(&res_screen, config.Sysconfig["webdomain"].(string), dataType, true)
 
 	d.T["data"] = subUrl(list, dataType)
 	d.T["dataType"] = dataType

+ 4 - 4
src/jfw/front/ws_dataExport.go

@@ -200,14 +200,14 @@ func (w *WsDataExport) GetPreview() error {
 	//从500条数据中筛选字段最全五条
 	scd := dataexport.GetSqlObjFromId(public.MQFW, _id)
 	kws := scd.Keyword
-	res, err := dataexport.GetDataExportSearchResult(public.Mgo_Bidding, public.DbConf.Mongodb.Bidding.DbName, public.DbConf.Elasticsearch.Main.Address, scd, dataType, -1)
+	res, err := dataexport.GetDataExportSearchResult(public.DbConf.Elasticsearch.Main.Address, scd, dataType, -1)
 	if res == nil || err != nil {
 		return w.Render("/pc/dataExport_noDataErr.html", &w.T)
 	}
-	msgCount := dataexport.GetDataExportSearchCountByScdId(public.MQFW, public.Mgo_Bidding, public.DbConf.Mongodb.Bidding.DbName, public.DbConf.Elasticsearch.Main.Address, _id)
+	msgCount := dataexport.GetDataExportSearchCountByScdId(public.MQFW, public.DbConf.Elasticsearch.Main.Address, _id)
 	//格式化字段
 	res_screen := dataexport.ScreenData(res, dataType, 20, kws)
-	list := dataexport.FormatExportData(public.Mgo_Ent, &res_screen, config.Sysconfig["webdomain"].(string), dataType, true)
+	list := dataexport.FormatExportData(&res_screen, config.Sysconfig["webdomain"].(string), dataType, true)
 	//if msgCount > 20000 {
 	//	msgCount = 20000
 	//}
@@ -277,7 +277,7 @@ func (w *WsDataExport) SubmitOrder() error {
 			return errors.New("未登录")
 		}
 	}
-	msgCount := dataexport.GetDataExportSearchCountByScdId(public.MQFW, public.Mgo_Bidding, public.DbConf.Mongodb.Bidding.DbName, public.DbConf.Elasticsearch.Main.Address, id)
+	msgCount := dataexport.GetDataExportSearchCountByScdId(public.MQFW, public.DbConf.Elasticsearch.Main.Address, id)
 	if msgCount > public.ExConf.MsgMaxCount || msgCount == -1 {
 		msgCount = public.ExConf.MsgMaxCount
 	}

+ 1 - 1
src/jfw/front/wx_dataExport.go

@@ -280,7 +280,7 @@ func (w *WxDataExport) SaveData() error {
 		saveData["s_userid"] = w.GetSession("userId").(string)
 	}
 	_id := mongodb.Save(dataexport.ExportTable, saveData)
-	msgCount := dataexport.GetDataExportSearchCountByScdId(public.MQFW, public.Mgo_Bidding, public.DbConf.Mongodb.Bidding.DbName, public.DbConf.Elasticsearch.Main.Address, _id)
+	msgCount := dataexport.GetDataExportSearchCountByScdId(public.MQFW, public.DbConf.Elasticsearch.Main.Address, _id)
 	if msgCount > 20000 {
 		msgCount = 20000
 	}

+ 1 - 1
src/jfw/modules/app/src/app/front/dataExport.go

@@ -286,7 +286,7 @@ func (w *WxDataExport) SaveData() error {
 	}
 	_id := mongodb.Save(dataexport.ExportTable, saveData)
 	log.Println("数据导出参数:", saveData)
-	msgCount := dataexport.GetDataExportSearchCountByScdId(public.MQFW, public.Mgo_Bidding, public.DbConf.Mongodb.Bidding.DbName, public.DbConf.Elasticsearch.Main.Address, _id)
+	msgCount := dataexport.GetDataExportSearchCountByScdId(public.MQFW, public.DbConf.Elasticsearch.Main.Address, _id)
 	if msgCount > 20000 {
 		msgCount = 20000
 	}

+ 4 - 4
src/jfw/modules/app/src/app/front/ws_dataExport.go

@@ -66,11 +66,11 @@ func (w *WsDataExport) GetPreview() error {
 	//从500条数据中筛选字段最全五条
 	scd := dataexport.GetSqlObjFromId(public.MQFW, _id)
 	kws := scd.Keyword
-	res, err := dataexport.GetDataExportSearchResult(public.Mgo_Bidding, public.DbConf.Mongodb.Bidding.DbName, public.DbConf.Elasticsearch.Main.Address, scd, dataType, -1)
+	res, err := dataexport.GetDataExportSearchResult(public.DbConf.Elasticsearch.Main.Address, scd, dataType, -1)
 	if res == nil || err != nil {
 		return w.Render("/pc/dataExport_noDataErr.html", &w.T)
 	}
-	msgCount := dataexport.GetDataExportSearchCountByScdId(public.MQFW, public.Mgo_Bidding, public.DbConf.Mongodb.Bidding.DbName, public.DbConf.Elasticsearch.Main.Address, _id)
+	msgCount := dataexport.GetDataExportSearchCountByScdId(public.MQFW, public.DbConf.Elasticsearch.Main.Address, _id)
 	//格式化字段
 	res_screen := dataexport.ScreenData(res, dataType, 20, kws)
 	var EntArr = []string{}
@@ -82,7 +82,7 @@ func (w *WsDataExport) GetPreview() error {
 			}
 		}
 	}
-	list := dataexport.FormatExportData(public.Mgo_Ent, &res_screen, config.Sysconfig["webdomain"].(string), dataType, true)
+	list := dataexport.FormatExportData(&res_screen, config.Sysconfig["webdomain"].(string), dataType, true)
 	//if msgCount > 20000 {
 	//	msgCount = 20000
 	//}
@@ -258,7 +258,7 @@ func (w *WsDataExport) ToCreateOrderPage() error {
 	if userId == "" {
 		return errors.New("未登录")
 	}
-	msgCount := dataexport.GetDataExportSearchCountByScdId(public.MQFW, public.Mgo_Bidding, public.DbConf.Mongodb.Bidding.DbName, public.DbConf.Elasticsearch.Main.Address, id)
+	msgCount := dataexport.GetDataExportSearchCountByScdId(public.MQFW, public.DbConf.Elasticsearch.Main.Address, id)
 	if msgCount > public.ExConf.MsgMaxCount || msgCount == -1 {
 		msgCount = public.ExConf.MsgMaxCount
 	}

+ 1 - 1
src/jfw/modules/app/src/go.mod

@@ -5,7 +5,7 @@ go 1.18
 require (
 	app.yhyue.com/moapp/jybase v0.0.0-20230901064756-2fc66b18db40
 	app.yhyue.com/moapp/jylog v0.0.0-20230522075550-05d7230ca545
-	app.yhyue.com/moapp/jypkg v1.0.7-0.20231114075116-499de5b076d3
+	app.yhyue.com/moapp/jypkg v1.0.7-0.20231116075926-75c4304c7ccc
 	bp.jydev.jianyu360.cn/BaseService/userCenter v1.2.15-0.20230925060020-8e4db0f1e13e
 	github.com/SKatiyar/qr v0.0.0-20151201054752-25b6bdf44e67
 	github.com/gogf/gf/v2 v2.3.1

+ 2 - 2
src/jfw/modules/app/src/go.sum

@@ -9,8 +9,8 @@ app.yhyue.com/moapp/jybase v0.0.0-20230901064756-2fc66b18db40 h1:/FcBvpf/KW8g6GB
 app.yhyue.com/moapp/jybase v0.0.0-20230901064756-2fc66b18db40/go.mod h1:Hv9U/7oHRucqH315Tr1+d03NCvS9mOKPfk8pwwlOIwQ=
 app.yhyue.com/moapp/jylog v0.0.0-20230522075550-05d7230ca545 h1:+Lak4m1zgsigQloOsvp8AJ+0XeX/+PGp9QP550xlbBQ=
 app.yhyue.com/moapp/jylog v0.0.0-20230522075550-05d7230ca545/go.mod h1:uFrsdUBFbETiJlEmr4PtJWPsZlUpPj2bHQRhryu6ggk=
-app.yhyue.com/moapp/jypkg v1.0.7-0.20231114075116-499de5b076d3 h1:6Jv5DcoGYCsHVMwUjvlZubuTgY/vu4fWP5+rcXIKNj0=
-app.yhyue.com/moapp/jypkg v1.0.7-0.20231114075116-499de5b076d3/go.mod h1:LuxdVd+j3uwm7N5j2hivmpPU0LJytEV7iwAIljdoc4Q=
+app.yhyue.com/moapp/jypkg v1.0.7-0.20231116075926-75c4304c7ccc h1:vTPIpcwxe2SMLEV9KYddcN9REM1qvMXkeLYbYh20Ewg=
+app.yhyue.com/moapp/jypkg v1.0.7-0.20231116075926-75c4304c7ccc/go.mod h1:LuxdVd+j3uwm7N5j2hivmpPU0LJytEV7iwAIljdoc4Q=
 app.yhyue.com/moapp/message v0.0.0-20221223100203-6402e389d9ae h1:6rDDaz6yxvE8viTSzEBwKYOFWq14TMfuBivSazUZMz4=
 app.yhyue.com/moapp/message v0.0.0-20221223100203-6402e389d9ae/go.mod h1:b0zZHev3gmJao1Fo+2Z2KPVjsuLOJVvVxf+kCnu9WkA=
 bp.jydev.jianyu360.cn/BaseService/entManageApplication v0.0.0-20230214091519-89a98c01ab0e h1:h+VEI3o1qC0jeCzkFGTrLI4f27cfa/W/y+0sXokWMgE=

+ 3 - 3
src/jfw/modules/bigmember/src/go.mod

@@ -5,8 +5,8 @@ go 1.19
 require (
 	app.yhyue.com/moapp/jybase v0.0.0-20230727083622-4dfc804ea6cf
 	app.yhyue.com/moapp/jylog v0.0.0-20230522075550-05d7230ca545
-	app.yhyue.com/moapp/jypkg v0.0.0-20231024062045-5c364be1561d
-	bp.jydev.jianyu360.cn/BaseService/userCenter v1.2.14
+	app.yhyue.com/moapp/jypkg v1.0.7-0.20231116075926-75c4304c7ccc
+	bp.jydev.jianyu360.cn/BaseService/userCenter v1.2.15-0.20230925060020-8e4db0f1e13e
 	github.com/donnie4w/go-logger v0.0.0-20230316073421-36a48f87a69a
 	github.com/gogf/gf/v2 v2.4.2
 	github.com/olivere/elastic/v7 v7.0.32
@@ -19,7 +19,7 @@ require (
 	app.yhyue.com/moapp/message v0.0.0-20221223100203-6402e389d9ae // indirect
 	bp.jydev.jianyu360.cn/BaseService/entManageApplication v0.0.0-20230214091519-89a98c01ab0e // indirect
 	bp.jydev.jianyu360.cn/BaseService/powerCheckCenter v0.0.0-20230225125145-431a4f70093a // indirect
-	bp.jydev.jianyu360.cn/BaseService/resourceCenter v0.0.7 // indirect
+	bp.jydev.jianyu360.cn/BaseService/resourceCenter v0.0.8 // indirect
 	github.com/BurntSushi/toml v1.1.0 // indirect
 	github.com/beorn7/perks v1.0.1 // indirect
 	github.com/cenkalti/backoff/v4 v4.2.1 // indirect

+ 6 - 6
src/jfw/modules/bigmember/src/go.sum

@@ -9,18 +9,18 @@ app.yhyue.com/moapp/jybase v0.0.0-20230727083622-4dfc804ea6cf h1:/Tk5haITmGc5c3/
 app.yhyue.com/moapp/jybase v0.0.0-20230727083622-4dfc804ea6cf/go.mod h1:D40Ae0rQilH8Hc5o2Vtt04Tjh/DNEFpcS3/WkJMPJb8=
 app.yhyue.com/moapp/jylog v0.0.0-20230522075550-05d7230ca545 h1:+Lak4m1zgsigQloOsvp8AJ+0XeX/+PGp9QP550xlbBQ=
 app.yhyue.com/moapp/jylog v0.0.0-20230522075550-05d7230ca545/go.mod h1:uFrsdUBFbETiJlEmr4PtJWPsZlUpPj2bHQRhryu6ggk=
-app.yhyue.com/moapp/jypkg v0.0.0-20231024062045-5c364be1561d h1:h8SnO8ONZlmtx8ZSYtpw36TdBhYPy8WgLeWHyMGZj0Q=
-app.yhyue.com/moapp/jypkg v0.0.0-20231024062045-5c364be1561d/go.mod h1:76Kz6+MuxcRJRyFad9W8R4AByiQlVGzuGFzklY+2m38=
+app.yhyue.com/moapp/jypkg v1.0.7-0.20231116075926-75c4304c7ccc h1:vTPIpcwxe2SMLEV9KYddcN9REM1qvMXkeLYbYh20Ewg=
+app.yhyue.com/moapp/jypkg v1.0.7-0.20231116075926-75c4304c7ccc/go.mod h1:LuxdVd+j3uwm7N5j2hivmpPU0LJytEV7iwAIljdoc4Q=
 app.yhyue.com/moapp/message v0.0.0-20221223100203-6402e389d9ae h1:6rDDaz6yxvE8viTSzEBwKYOFWq14TMfuBivSazUZMz4=
 app.yhyue.com/moapp/message v0.0.0-20221223100203-6402e389d9ae/go.mod h1:b0zZHev3gmJao1Fo+2Z2KPVjsuLOJVvVxf+kCnu9WkA=
 bp.jydev.jianyu360.cn/BaseService/entManageApplication v0.0.0-20230214091519-89a98c01ab0e h1:h+VEI3o1qC0jeCzkFGTrLI4f27cfa/W/y+0sXokWMgE=
 bp.jydev.jianyu360.cn/BaseService/entManageApplication v0.0.0-20230214091519-89a98c01ab0e/go.mod h1:7Xhygw0KBuL4h0G76FnFg4otQcA9bmOO0c8M0FCjAyQ=
 bp.jydev.jianyu360.cn/BaseService/powerCheckCenter v0.0.0-20230225125145-431a4f70093a h1:JX2jEMrbdLzXfVC/nTUvdFOkqNj5DUxkJFjl3XE1gyg=
 bp.jydev.jianyu360.cn/BaseService/powerCheckCenter v0.0.0-20230225125145-431a4f70093a/go.mod h1:5nimT8GJh46AyfeeDeyRlDQygMlO7TRM8Pwm41Gxemc=
-bp.jydev.jianyu360.cn/BaseService/resourceCenter v0.0.7 h1:G6PHMWAHfYEuY6kbl7OM/KnCQf1Xa54mdhuP7JzK8/I=
-bp.jydev.jianyu360.cn/BaseService/resourceCenter v0.0.7/go.mod h1:rRiGzKG4F/fmkNxXQCxrkxNWc8yf1SmW8qWCKfGIQSM=
-bp.jydev.jianyu360.cn/BaseService/userCenter v1.2.14 h1:L/0RrgU+l8nMS7YO2JizszaX3lAo0gqzg2Bqmu0So0s=
-bp.jydev.jianyu360.cn/BaseService/userCenter v1.2.14/go.mod h1:03M9BWIGHy7BbGxLvjt8V9zZzEZDWhN6BuHVfVcDFbQ=
+bp.jydev.jianyu360.cn/BaseService/resourceCenter v0.0.8 h1:14Yxzutsej7LQe3jnN61wuRX9qjAZ4FtdWMA27ewQ3w=
+bp.jydev.jianyu360.cn/BaseService/resourceCenter v0.0.8/go.mod h1:rRiGzKG4F/fmkNxXQCxrkxNWc8yf1SmW8qWCKfGIQSM=
+bp.jydev.jianyu360.cn/BaseService/userCenter v1.2.15-0.20230925060020-8e4db0f1e13e h1:bncHHkJLqiDW1ZN6MVe+3bj3i0LxWgFkfqge6Gk7lB4=
+bp.jydev.jianyu360.cn/BaseService/userCenter v1.2.15-0.20230925060020-8e4db0f1e13e/go.mod h1:+6ZjaqpCr+ih1GYOh6ZhoDri9ZjiuxxSHvR7ovvhLx0=
 cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw=
 cloud.google.com/go v0.34.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw=
 cloud.google.com/go v0.37.4/go.mod h1:NHPJ89PdicEuT9hdPXMROBD91xc5uRDxsMtSB16k7hw=

+ 216 - 216
src/jfw/modules/publicapply/src/dataexport/service/action.go

@@ -1,98 +1,98 @@
 package service
 
 import (
-	"errors"
-	"fmt"
-	"jy/src/jfw/modules/publicapply/src/config"
-	de "jy/src/jfw/modules/publicapply/src/dataexport/dexport"
-	"jy/src/jfw/modules/publicapply/src/dataexport/entity"
-	"jy/src/jfw/modules/publicapply/src/db"
-	u "jy/src/jfw/modules/publicapply/src/util"
-	"log"
-	"strings"
-	"time"
+    "errors"
+    "fmt"
+    "jy/src/jfw/modules/publicapply/src/config"
+    de "jy/src/jfw/modules/publicapply/src/dataexport/dexport"
+    "jy/src/jfw/modules/publicapply/src/dataexport/entity"
+    "jy/src/jfw/modules/publicapply/src/db"
+    u "jy/src/jfw/modules/publicapply/src/util"
+    "log"
+    "strings"
+    "time"
 
-	. "app.yhyue.com/moapp/jybase/api"
-	util "app.yhyue.com/moapp/jybase/common"
-	"app.yhyue.com/moapp/jybase/encrypt"
-	"app.yhyue.com/moapp/jybase/redis"
-	"app.yhyue.com/moapp/jypkg/common/src/qfw/util/dataexport"
-	"app.yhyue.com/moapp/jypkg/common/src/qfw/util/jy"
+    . "app.yhyue.com/moapp/jybase/api"
+    util "app.yhyue.com/moapp/jybase/common"
+    "app.yhyue.com/moapp/jybase/encrypt"
+    "app.yhyue.com/moapp/jybase/redis"
+    "app.yhyue.com/moapp/jypkg/common/src/qfw/util/dataexport"
+    "app.yhyue.com/moapp/jypkg/common/src/qfw/util/jy"
 
-	"app.yhyue.com/moapp/jybase/go-xweb/xweb"
+    "app.yhyue.com/moapp/jybase/go-xweb/xweb"
 )
 
 type DataExportStruct struct {
-	*xweb.Action
-	//bySelects     xweb.Mapper `xweb:"/dataexpoet/bySelects"`     //数据导出_选择导出
-	byCollection xweb.Mapper `xweb:"/dataexpoet/bycollection"` //数据导出_收藏导出
-	//byPushHistory xweb.Mapper `xweb:"/dataexpoet/byPushHistory"` //数据导出_推送记录
-	payPageParams xweb.Mapper `xweb:"/dataexport/payPageParams"` //数据导出_支付页面参数信息
+    *xweb.Action
+    //bySelects     xweb.Mapper `xweb:"/dataexpoet/bySelects"`     //数据导出_选择导出
+    byCollection xweb.Mapper `xweb:"/dataexpoet/bycollection"` //数据导出_收藏导出
+    //byPushHistory xweb.Mapper `xweb:"/dataexpoet/byPushHistory"` //数据导出_推送记录
+    payPageParams xweb.Mapper `xweb:"/dataexport/payPageParams"` //数据导出_支付页面参数信息
 }
 
 func (des *DataExportStruct) PayPageParams() {
-	userId, _ := des.GetSession("mgoUserId").(string)
-	rData, errMsg := func() (interface{}, error) {
-		defer util.Catch()
-		if userId == "" {
-			return nil, errors.New("未登录")
-		}
-		var res = map[string]interface{}{}
-		id := encrypt.SE.Decode4Hex(des.GetString("id"))
-		//最大导出数据量
-		msgCount := dataexport.GetDataExportSearchCountByScdId(db.Mgo, db.Mgo_Bidding, db.DbConf.Mongodb.Bidding.DbName, db.DbConf.Elasticsearch.Main.Address, id)
-		if msgCount > de.DataExport.MsgMaxCount || msgCount == -1 {
-			msgCount = de.DataExport.MsgMaxCount
-		}
-		if msgCount < 1 {
-			msgCount = 0
-		}
-		res["msgCount"] = msgCount
-		//邮箱
+    userId, _ := des.GetSession("mgoUserId").(string)
+    rData, errMsg := func() (interface{}, error) {
+        defer util.Catch()
+        if userId == "" {
+            return nil, errors.New("未登录")
+        }
+        var res = map[string]interface{}{}
+        id := encrypt.SE.Decode4Hex(des.GetString("id"))
+        //最大导出数据量
+        msgCount := dataexport.GetDataExportSearchCountByScdId(db.Mgo, db.DbConf.Elasticsearch.Main.Address, id)
+        if msgCount > de.DataExport.MsgMaxCount || msgCount == -1 {
+            msgCount = de.DataExport.MsgMaxCount
+        }
+        if msgCount < 1 {
+            msgCount = 0
+        }
+        res["msgCount"] = msgCount
+        //邮箱
 
-		resEmail, _ := des.GetSession("DataExportVerifyEmail_val").(string)
-		resPhone, _ := des.GetSession("DataExportVerifyPhone_val").(string)
-		if resEmail != "" {
-			lastSendDEVerify := util.Int64All(des.GetSession("CreatEVerifyTime"))
-			res["timeSpaceing"] = lastSendDEVerify - time.Now().Unix() + 60*5
-			res["resEmail"] = resEmail
-		}
-		if resPhone != "" {
-			res["resPhone"] = resPhone
-		}
+        resEmail, _ := des.GetSession("DataExportVerifyEmail_val").(string)
+        resPhone, _ := des.GetSession("DataExportVerifyPhone_val").(string)
+        if resEmail != "" {
+            lastSendDEVerify := util.Int64All(des.GetSession("CreatEVerifyTime"))
+            res["timeSpaceing"] = lastSendDEVerify - time.Now().Unix() + 60*5
+            res["resEmail"] = resEmail
+        }
+        if resPhone != "" {
+            res["resPhone"] = resPhone
+        }
 
-		if resEmail == "" || resPhone == "" {
-			lastEmail, lastPhone := "", ""
-			if lastPhone, lastEmail = dataexport.GetLastExportPhoneAndMail(db.Mysql, userId, util.ObjToString(des.GetSession("entUserId"))); lastPhone == "" || lastEmail == "" {
-				userData := config.Compatible.Select( userId, `{"s_myemail":1,"s_phone":1,"s_m_phone":1}`)
-				if userData != nil && len(*userData) > 0 {
-					if lastEmail == "" {
-						lastEmail, _ = (*userData)["s_myemail"].(string)
-					}
-					if lastPhone == "" {
-						lastPhone, _ = util.If((*userData)["s_phone"] != nil, (*userData)["s_phone"], (*userData)["s_m_phone"]).(string)
-					}
-				}
-			}
-			if resEmail == "" && lastEmail != "" {
-				res["resEmail"] = lastEmail
-				des.SetSession("EMVerifySucess", true)
-				des.SetSession("DataExportVerifyEmail_val", lastEmail)
-			}
+        if resEmail == "" || resPhone == "" {
+            lastEmail, lastPhone := "", ""
+            if lastPhone, lastEmail = dataexport.GetLastExportPhoneAndMail(db.Mysql, userId, util.ObjToString(des.GetSession("entUserId"))); lastPhone == "" || lastEmail == "" {
+                userData := config.Compatible.Select(userId, `{"s_myemail":1,"s_phone":1,"s_m_phone":1}`)
+                if userData != nil && len(*userData) > 0 {
+                    if lastEmail == "" {
+                        lastEmail, _ = (*userData)["s_myemail"].(string)
+                    }
+                    if lastPhone == "" {
+                        lastPhone, _ = util.If((*userData)["s_phone"] != nil, (*userData)["s_phone"], (*userData)["s_m_phone"]).(string)
+                    }
+                }
+            }
+            if resEmail == "" && lastEmail != "" {
+                res["resEmail"] = lastEmail
+                des.SetSession("EMVerifySucess", true)
+                des.SetSession("DataExportVerifyEmail_val", lastEmail)
+            }
 
-			if resPhone == "" && lastPhone != "" {
-				des.SetSession("DataExportVerifyPhone_val", lastPhone)
-				res["resPhone"] = lastPhone
-			}
-		}
-		incurKey := fmt.Sprintf("PreviewData_%s_%d", des.GetSession("userId"), time.Now().Day()) //每日限制预览次数
-		res["previewData"] = util.IntAll(redis.Get("other", incurKey))
-		return res, nil
-	}()
-	if errMsg != nil {
-		log.Printf("%s DataExportStruct ByCollection:%s\n", userId, errMsg.Error())
-	}
-	des.ServeJson(NewResult(rData, errMsg))
+            if resPhone == "" && lastPhone != "" {
+                des.SetSession("DataExportVerifyPhone_val", lastPhone)
+                res["resPhone"] = lastPhone
+            }
+        }
+        incurKey := fmt.Sprintf("PreviewData_%s_%d", des.GetSession("userId"), time.Now().Day()) //每日限制预览次数
+        res["previewData"] = util.IntAll(redis.Get("other", incurKey))
+        return res, nil
+    }()
+    if errMsg != nil {
+        log.Printf("%s DataExportStruct ByCollection:%s\n", userId, errMsg.Error())
+    }
+    des.ServeJson(NewResult(rData, errMsg))
 }
 
 //
@@ -134,149 +134,149 @@ func (des *DataExportStruct) PayPageParams() {
 //}
 
 func (des *DataExportStruct) ByCollection() {
-	userId, _ := des.GetSession("userId").(string)
-	rData, errMsg := func() (interface{}, error) {
-		defer util.Catch()
-		ids := []string{}
-		selectIds := strings.TrimSpace(des.GetString("selectIds"))
-		if selectIds != "" { //选中导出
-			for _, encodeId := range strings.Split(selectIds, ",") {
-				if tmp := encrypt.CommonDecodeArticle("content", encodeId); len(tmp) > 0 {
-					if id := tmp[0]; id != "" {
-						ids = append(ids, id)
-					}
-				}
-			}
-		} else {
-			buyerPhone, _ := des.GetInteger("buyerPhone")
-			winnerPhone, _ := des.GetInteger("winnerPhone")
-			sql := u.CollListSql(&u.CollList{
-				Label:       des.GetString("label"),
-				SelectTime:  des.GetString("selectTime"),
-				Buyerclass:  des.GetString("buyerclass"),
-				BuyerPhone:  buyerPhone,
-				WinnerPhone: winnerPhone,
-			}, entity.IsPay(des.Session()), userId)
-			data := db.Mysql.SelectBySql(sql)
-			if data != nil && len(*data) > 0 {
-				for _, v := range *data {
-					ids = append(ids, util.ObjToString(v["bid"]))
-				}
-			}
-		}
-		if len(ids) == 0 {
-			return nil, fmt.Errorf("参数异常")
-		}
+    userId, _ := des.GetSession("userId").(string)
+    rData, errMsg := func() (interface{}, error) {
+        defer util.Catch()
+        ids := []string{}
+        selectIds := strings.TrimSpace(des.GetString("selectIds"))
+        if selectIds != "" { //选中导出
+            for _, encodeId := range strings.Split(selectIds, ",") {
+                if tmp := encrypt.CommonDecodeArticle("content", encodeId); len(tmp) > 0 {
+                    if id := tmp[0]; id != "" {
+                        ids = append(ids, id)
+                    }
+                }
+            }
+        } else {
+            buyerPhone, _ := des.GetInteger("buyerPhone")
+            winnerPhone, _ := des.GetInteger("winnerPhone")
+            sql := u.CollListSql(&u.CollList{
+                Label:       des.GetString("label"),
+                SelectTime:  des.GetString("selectTime"),
+                Buyerclass:  des.GetString("buyerclass"),
+                BuyerPhone:  buyerPhone,
+                WinnerPhone: winnerPhone,
+            }, entity.IsPay(des.Session()), userId)
+            data := db.Mysql.SelectBySql(sql)
+            if data != nil && len(*data) > 0 {
+                for _, v := range *data {
+                    ids = append(ids, util.ObjToString(v["bid"]))
+                }
+            }
+        }
+        if len(ids) == 0 {
+            return nil, fmt.Errorf("参数异常")
+        }
 
-		saveData := map[string]interface{}{
-			"s_userid":   userId,
-			"comeinfrom": "collectionPage",
-			"comeintime": time.Now().Unix(),
-			"selectIds":  ids,
-		}
+        saveData := map[string]interface{}{
+            "s_userid":   userId,
+            "comeinfrom": "collectionPage",
+            "comeintime": time.Now().Unix(),
+            "selectIds":  ids,
+        }
 
-		_id := db.Mgo.Save(dataexport.ExportTable, saveData)
-		if _id == "" {
-			return nil, fmt.Errorf("选择导出异常")
-		}
-		return map[string]interface{}{
-			"_id": encrypt.SE.Encode2Hex(_id),
-		}, nil
-	}()
-	if errMsg != nil {
-		log.Printf("%s DataExportStruct ByCollection:%s\n", userId, errMsg.Error())
-	}
-	des.ServeJson(NewResult(rData, errMsg))
+        _id := db.Mgo.Save(dataexport.ExportTable, saveData)
+        if _id == "" {
+            return nil, fmt.Errorf("选择导出异常")
+        }
+        return map[string]interface{}{
+            "_id": encrypt.SE.Encode2Hex(_id),
+        }, nil
+    }()
+    if errMsg != nil {
+        log.Printf("%s DataExportStruct ByCollection:%s\n", userId, errMsg.Error())
+    }
+    des.ServeJson(NewResult(rData, errMsg))
 }
 
 // ByPushHistory 推送页面筛选导出
 func (des *DataExportStruct) ByPushHistory() {
-	userId, _ := des.GetSession("userId").(string)
-	rData, errMsg := func() (interface{}, error) {
-		defer util.Catch()
-		vipType := des.GetString("vt")
-		if vipType == "" { //默认取已切换的企业
-			vipType = jy.SwitchService.GetEntniche(des.Session(), *config.Middleground)
-		}
-		if vipType == jy.SwitchService.Entniche {
-			userId = fmt.Sprint(util.IntAll(des.GetSession("entUserId")))
-		}
+    userId, _ := des.GetSession("userId").(string)
+    rData, errMsg := func() (interface{}, error) {
+        defer util.Catch()
+        vipType := des.GetString("vt")
+        if vipType == "" { //默认取已切换的企业
+            vipType = jy.SwitchService.GetEntniche(des.Session(), *config.Middleground)
+        }
+        if vipType == jy.SwitchService.Entniche {
+            userId = fmt.Sprint(util.IntAll(des.GetSession("entUserId")))
+        }
 
-		//条件导出
-		exportNum, _ := des.GetInteger("exportNum")
-		spqp := &jy.SubPushQueryParam{
-			Mgo_bidding:   db.Mgo_Bidding,
-			Bidding:       db.DbConf.Mongodb.Bidding.Collection,
-			Bidding_back:  db.DbConf.Mongodb.Bidding.Collection_change,
-			UserId:        userId,
-			PageSize:      exportNum,
-			Export:        true,
-			SelectTime:    des.GetString("selectTime"),
-			Area:          des.GetString("area"),
-			City:          des.GetString("city"),
-			Buyerclass:    des.GetString("buyerclass"),
-			Subtype:       des.GetString("subtype"),
-			Subscopeclass: des.GetString("subscopeclass"),
-			Key:           des.GetString("key"),
-			Price:         des.GetString("price"),
-			FileExists:    des.GetString("fileExists"),
-		}
+        //条件导出
+        exportNum, _ := des.GetInteger("exportNum")
+        spqp := &jy.SubPushQueryParam{
+            Mgo_bidding:   db.Mgo_Bidding,
+            Bidding:       db.DbConf.Mongodb.Bidding.Collection,
+            Bidding_back:  db.DbConf.Mongodb.Bidding.Collection_change,
+            UserId:        userId,
+            PageSize:      exportNum,
+            Export:        true,
+            SelectTime:    des.GetString("selectTime"),
+            Area:          des.GetString("area"),
+            City:          des.GetString("city"),
+            Buyerclass:    des.GetString("buyerclass"),
+            Subtype:       des.GetString("subtype"),
+            Subscopeclass: des.GetString("subscopeclass"),
+            Key:           des.GetString("key"),
+            Price:         des.GetString("price"),
+            FileExists:    des.GetString("fileExists"),
+        }
 
-		//选择导出
-		if selectIds := strings.TrimSpace(des.GetString("selectIds")); selectIds != "" {
-			encodeArr := strings.Split(selectIds, ",")
-			idArr := make([]string, 0, len(encodeArr))
-			for _, encodeId := range encodeArr {
-				if tmp := encrypt.CommonDecodeArticle("content", encodeId); len(tmp) > 0 {
-					if id := tmp[0]; id != "" {
-						idArr = append(idArr, id)
-					}
-				}
-			}
-			spqp.SelectInfoIds = idArr
-		}
+        //选择导出
+        if selectIds := strings.TrimSpace(des.GetString("selectIds")); selectIds != "" {
+            encodeArr := strings.Split(selectIds, ",")
+            idArr := make([]string, 0, len(encodeArr))
+            for _, encodeId := range encodeArr {
+                if tmp := encrypt.CommonDecodeArticle("content", encodeId); len(tmp) > 0 {
+                    if id := tmp[0]; id != "" {
+                        idArr = append(idArr, id)
+                    }
+                }
+            }
+            spqp.SelectInfoIds = idArr
+        }
 
-		if vipType == jy.SwitchService.Member {
-			spqp.PushMysql = db.MysqlMemberPush
-		} else if vipType == jy.SwitchService.Entniche {
-			spqp.PushMysql = db.MysqlEntnichePush
-		} else {
-			spqp.PushMysql = db.MysqlPush
-		}
-		_, _, list := jy.NewSubscribePush(vipType).Datas(spqp)
-		if list == nil || len(list) == 0 {
-			return nil, fmt.Errorf("未匹配到导出数据")
-		}
-		ids := make([]string, 0, len(list))
-		keyWords := make([]string, 0, len(list))
-		for _, pushData := range list {
-			if pushData.Id != "" {
-				if tmp := encrypt.CommonDecodeArticle("content", pushData.Id); len(tmp) > 0 {
-					if id := tmp[0]; id != "" {
-						ids = append(ids, id)
-						keyWords = append(keyWords, strings.Join(pushData.MatchKeys, ","))
-					}
-				}
-			}
-		}
+        if vipType == jy.SwitchService.Member {
+            spqp.PushMysql = db.MysqlMemberPush
+        } else if vipType == jy.SwitchService.Entniche {
+            spqp.PushMysql = db.MysqlEntnichePush
+        } else {
+            spqp.PushMysql = db.MysqlPush
+        }
+        _, _, list := jy.NewSubscribePush(vipType).Datas(spqp)
+        if list == nil || len(list) == 0 {
+            return nil, fmt.Errorf("未匹配到导出数据")
+        }
+        ids := make([]string, 0, len(list))
+        keyWords := make([]string, 0, len(list))
+        for _, pushData := range list {
+            if pushData.Id != "" {
+                if tmp := encrypt.CommonDecodeArticle("content", pushData.Id); len(tmp) > 0 {
+                    if id := tmp[0]; id != "" {
+                        ids = append(ids, id)
+                        keyWords = append(keyWords, strings.Join(pushData.MatchKeys, ","))
+                    }
+                }
+            }
+        }
 
-		saveData := map[string]interface{}{
-			"s_userid":     userId,
-			"comeinfrom":   "pushHistory",
-			"comeintime":   time.Now().Unix(),
-			"selectIds":    ids,
-			"pushKeyWords": keyWords,
-		}
-		_id := db.Mgo.Save(dataexport.ExportTable, saveData)
-		if _id == "" {
-			return nil, fmt.Errorf("创建导出异常")
-		}
-		return map[string]interface{}{
-			"_id": encrypt.SE.Encode2Hex(_id),
-		}, nil
-	}()
-	if errMsg != nil {
-		log.Printf("%s DataExportStruct ByPushHistory:%s\n", userId, errMsg.Error())
-	}
-	des.ServeJson(NewResult(rData, errMsg))
+        saveData := map[string]interface{}{
+            "s_userid":     userId,
+            "comeinfrom":   "pushHistory",
+            "comeintime":   time.Now().Unix(),
+            "selectIds":    ids,
+            "pushKeyWords": keyWords,
+        }
+        _id := db.Mgo.Save(dataexport.ExportTable, saveData)
+        if _id == "" {
+            return nil, fmt.Errorf("创建导出异常")
+        }
+        return map[string]interface{}{
+            "_id": encrypt.SE.Encode2Hex(_id),
+        }, nil
+    }()
+    if errMsg != nil {
+        log.Printf("%s DataExportStruct ByPushHistory:%s\n", userId, errMsg.Error())
+    }
+    des.ServeJson(NewResult(rData, errMsg))
 }

+ 1 - 1
src/jfw/modules/publicapply/src/go.mod

@@ -5,7 +5,7 @@ go 1.18
 require (
 	app.yhyue.com/moapp/jybase v0.0.0-20231026082242-8eb41c7bdda6
 	app.yhyue.com/moapp/jylog v0.0.0-20230522075550-05d7230ca545
-	app.yhyue.com/moapp/jypkg v1.0.7-0.20231114011545-acf570b01ea7
+	app.yhyue.com/moapp/jypkg v1.0.7-0.20231116075926-75c4304c7ccc
 	bp.jydev.jianyu360.cn/BaseService/userCenter v1.2.15
 	github.com/SKatiyar/qr v0.0.0-20151201054752-25b6bdf44e67
 	github.com/alibabacloud-go/darabonba-openapi/v2 v2.0.4

+ 2 - 2
src/jfw/modules/publicapply/src/go.sum

@@ -9,8 +9,8 @@ app.yhyue.com/moapp/jybase v0.0.0-20231026082242-8eb41c7bdda6 h1:uyaBp5Iuc/Il4+O
 app.yhyue.com/moapp/jybase v0.0.0-20231026082242-8eb41c7bdda6/go.mod h1:Hv9U/7oHRucqH315Tr1+d03NCvS9mOKPfk8pwwlOIwQ=
 app.yhyue.com/moapp/jylog v0.0.0-20230522075550-05d7230ca545 h1:+Lak4m1zgsigQloOsvp8AJ+0XeX/+PGp9QP550xlbBQ=
 app.yhyue.com/moapp/jylog v0.0.0-20230522075550-05d7230ca545/go.mod h1:uFrsdUBFbETiJlEmr4PtJWPsZlUpPj2bHQRhryu6ggk=
-app.yhyue.com/moapp/jypkg v1.0.7-0.20231114011545-acf570b01ea7 h1:i7sFy+e/zjqhTQci+0x4E1qEXZOEYCIe6EDug+8LyFk=
-app.yhyue.com/moapp/jypkg v1.0.7-0.20231114011545-acf570b01ea7/go.mod h1:LuxdVd+j3uwm7N5j2hivmpPU0LJytEV7iwAIljdoc4Q=
+app.yhyue.com/moapp/jypkg v1.0.7-0.20231116075926-75c4304c7ccc h1:vTPIpcwxe2SMLEV9KYddcN9REM1qvMXkeLYbYh20Ewg=
+app.yhyue.com/moapp/jypkg v1.0.7-0.20231116075926-75c4304c7ccc/go.mod h1:LuxdVd+j3uwm7N5j2hivmpPU0LJytEV7iwAIljdoc4Q=
 app.yhyue.com/moapp/message v0.0.0-20221223100203-6402e389d9ae h1:6rDDaz6yxvE8viTSzEBwKYOFWq14TMfuBivSazUZMz4=
 app.yhyue.com/moapp/message v0.0.0-20221223100203-6402e389d9ae/go.mod h1:b0zZHev3gmJao1Fo+2Z2KPVjsuLOJVvVxf+kCnu9WkA=
 bp.jydev.jianyu360.cn/BaseService/entManageApplication v0.0.0-20230214091519-89a98c01ab0e h1:h+VEI3o1qC0jeCzkFGTrLI4f27cfa/W/y+0sXokWMgE=

+ 4 - 4
src/jfw/modules/subscribepay/src/entity/dataExportPackStruct.go

@@ -376,7 +376,7 @@ func (this *dataExportPackStruct) DoEntPackRepeatCheck(sess *httpsession.Session
 		exportLock.Unlock()
 		entLock.Lock()
 		//开始去重
-		_, newCount, _ := dataexport.GetEntDataExportCount(util.MQFW, util.Mgo_bidding, config.Config.Mongobidding.DbName, config.Config.Elasticsearch,
+		_, newCount, _ := dataexport.GetEntDataExportCount(util.MQFW, config.Config.Elasticsearch,
 			selectId, entIdInt, entUserId, true, middleGround.JyApiConfig.ApiList.EntDedupUrl, config.ExConf.MsgMaxCount)
 		entLock.Unlock()
 		return newCount, err
@@ -391,10 +391,10 @@ func (this *dataExportPackStruct) DoPerPackRepeatCheck(userId string, isSenior b
 
 // GetExcelFile 数据包生成excel文件
 func GetExcelFile(selectId string, checkCount int, isSenior bool, success func(excelPath string, exportIds []string), fail func(error)) {
-	list, err := dataexport.GetDataExportSearchResultByScdId(util.MQFW, util.Mgo_bidding, config.Config.Mongobidding.DbName, config.Config.Elasticsearch, selectId, qutil.If(isSenior, "2", "1").(string), checkCount)
+	list, err := dataexport.GetDataExportSearchResultByScdId(util.MQFW, config.Config.Elasticsearch, selectId, qutil.If(isSenior, "2", "1").(string), checkCount)
 	url := util.GetExcelFilePath(pay.GetOrderCode(selectId), checkCount)
 	if err == nil && list != nil && len(*list) > 0 {
-		list = dataexport.FormatExportData(util.MQFWENT, list, config.Config.WebDomain, "2")
+		list = dataexport.FormatExportData(list, config.Config.WebDomain, "2")
 		err = util.CreateDataExportExcelFile(list, isSenior, config.ExConf.ExcelPayedPath+url) //创建excel文件
 	}
 	if err == nil {
@@ -444,7 +444,7 @@ func (this *dataExportPackStruct) UseEntPack(sess *httpsession.Session, userId,
 		current := dataexport.GetCurrentCount(util.Mysql, util.Mgo_Qyfw, entIdInt)
 		log.Println("企业总条数", current)
 		//开始去重
-		count, newCount, data = dataexport.GetEntDataExportCount(util.MQFW, util.Mgo_bidding, config.Config.Mongobidding.DbName, config.Config.Elasticsearch,
+		count, newCount, data = dataexport.GetEntDataExportCount(util.MQFW, config.Config.Elasticsearch,
 			selectId, entIdInt, entUserId, false, middleGround.JyApiConfig.ApiList.EntDedupUrl, config.ExConf.MsgMaxCount)
 
 		if newCount > current {

+ 3 - 3
src/jfw/modules/subscribepay/src/entity/order.go

@@ -255,7 +255,7 @@ func dataExportOrder(m map[string]interface{}, userId string) (*OrderInfo, strin
 	} else if data_spec == "senior" {
 		data_spec = "高级字段包"
 	}
-	data_count := dataexport.GetDataExportSearchCountByScdId(util.MQFW, util.Mgo_bidding, config.Config.Mongobidding.DbName, config.Config.Elasticsearch, id)
+	data_count := dataexport.GetDataExportSearchCountByScdId(util.MQFW, config.Config.Elasticsearch, id)
 	if data_count > config.ExConf.MsgMaxCount || data_count == -1 {
 		data_count = config.ExConf.MsgMaxCount
 	}
@@ -314,9 +314,9 @@ func dataExportOrder(m map[string]interface{}, userId string) (*OrderInfo, strin
 	ordercode := pay.GetOrderCode(userId)
 	download_url := util.GetExcelFilePath(ordercode, data_count)
 	go func() {
-		list, err := dataexport.GetDataExportSearchResultByScdId(util.MQFW, util.Mgo_bidding, config.Config.Mongobidding.DbName, config.Config.Elasticsearch, id, qu.If(data_spec == "高级字段包", "2", "1").(string), data_count)
+		list, err := dataexport.GetDataExportSearchResultByScdId(util.MQFW, config.Config.Elasticsearch, id, qu.If(data_spec == "高级字段包", "2", "1").(string), data_count)
 		if err == nil && list != nil && len(*list) > 0 {
-			list = dataexport.FormatExportData(util.MQFWENT, list, config.Config.WebDomain, qu.If(data_spec == "高级字段包", "2", "1").(string))
+			list = dataexport.FormatExportData(list, config.Config.WebDomain, qu.If(data_spec == "高级字段包", "2", "1").(string))
 			err = util.CreateDataExportExcelFile(list, data_spec == "高级字段包", config.ExConf.ExcelReadyPath+download_url)
 		}
 		if err != nil {

+ 1 - 1
src/jfw/modules/subscribepay/src/entity/product.go

@@ -182,7 +182,7 @@ func (d *dataExportSpec) GetSelectPrice() (int, error) {
 		return 0, errors.New("参数异常")
 	}
 	// 2. 获取数量
-	dataCount := dataexport.GetDataExportSearchCountByScdId(util.MQFW, util.Mgo_bidding, config.Config.Mongobidding.DbName, config.Config.Elasticsearch, d.filterId)
+	dataCount := dataexport.GetDataExportSearchCountByScdId(util.MQFW, config.Config.Elasticsearch, d.filterId)
 	if dataCount > config.ExConf.MsgMaxCount || dataCount == -1 {
 		dataCount = config.ExConf.MsgMaxCount
 	}

+ 1 - 1
src/jfw/modules/subscribepay/src/go.mod

@@ -5,7 +5,7 @@ go 1.20
 require (
 	app.yhyue.com/moapp/jybase v0.0.0-20230718012114-37013054344b
 	app.yhyue.com/moapp/jylog v0.0.0-20230522075550-05d7230ca545
-	app.yhyue.com/moapp/jypkg v1.0.7-0.20231114075116-499de5b076d3
+	app.yhyue.com/moapp/jypkg v1.0.7-0.20231116075926-75c4304c7ccc
 	bp.jydev.jianyu360.cn/BaseService/pushpkg v0.0.0-20230225061813-384daf716c9d
 	bp.jydev.jianyu360.cn/BaseService/userCenter v1.2.15-0.20230925060020-8e4db0f1e13e
 	github.com/SKatiyar/qr v0.0.0-20151201054752-25b6bdf44e67

+ 2 - 2
src/jfw/modules/subscribepay/src/go.sum

@@ -9,8 +9,8 @@ app.yhyue.com/moapp/jybase v0.0.0-20230718012114-37013054344b h1:Wtytm2QqQWtBV+s
 app.yhyue.com/moapp/jybase v0.0.0-20230718012114-37013054344b/go.mod h1:D40Ae0rQilH8Hc5o2Vtt04Tjh/DNEFpcS3/WkJMPJb8=
 app.yhyue.com/moapp/jylog v0.0.0-20230522075550-05d7230ca545 h1:+Lak4m1zgsigQloOsvp8AJ+0XeX/+PGp9QP550xlbBQ=
 app.yhyue.com/moapp/jylog v0.0.0-20230522075550-05d7230ca545/go.mod h1:uFrsdUBFbETiJlEmr4PtJWPsZlUpPj2bHQRhryu6ggk=
-app.yhyue.com/moapp/jypkg v1.0.7-0.20231114075116-499de5b076d3 h1:6Jv5DcoGYCsHVMwUjvlZubuTgY/vu4fWP5+rcXIKNj0=
-app.yhyue.com/moapp/jypkg v1.0.7-0.20231114075116-499de5b076d3/go.mod h1:LuxdVd+j3uwm7N5j2hivmpPU0LJytEV7iwAIljdoc4Q=
+app.yhyue.com/moapp/jypkg v1.0.7-0.20231116075926-75c4304c7ccc h1:vTPIpcwxe2SMLEV9KYddcN9REM1qvMXkeLYbYh20Ewg=
+app.yhyue.com/moapp/jypkg v1.0.7-0.20231116075926-75c4304c7ccc/go.mod h1:LuxdVd+j3uwm7N5j2hivmpPU0LJytEV7iwAIljdoc4Q=
 app.yhyue.com/moapp/message v0.0.0-20221223100203-6402e389d9ae h1:6rDDaz6yxvE8viTSzEBwKYOFWq14TMfuBivSazUZMz4=
 app.yhyue.com/moapp/message v0.0.0-20221223100203-6402e389d9ae/go.mod h1:b0zZHev3gmJao1Fo+2Z2KPVjsuLOJVvVxf+kCnu9WkA=
 bp.jydev.jianyu360.cn/BaseService/entManageApplication v0.0.0-20230214091519-89a98c01ab0e h1:h+VEI3o1qC0jeCzkFGTrLI4f27cfa/W/y+0sXokWMgE=

+ 3 - 3
src/jfw/modules/subscribepay/src/service/dataExportPay.go

@@ -74,7 +74,7 @@ func (p *DataExportPay) CreateOrder() {
 		data_spec = "高级字段包"
 	}
 
-	data_count := dataexport.GetDataExportSearchCountByScdId(util.MQFW, util.Mgo_bidding, config.Config.Mongobidding.DbName, config.Config.Elasticsearch, id)
+	data_count := dataexport.GetDataExportSearchCountByScdId(util.MQFW, config.Config.Elasticsearch, id)
 	if data_count > config.ExConf.MsgMaxCount || data_count == -1 {
 		data_count = config.ExConf.MsgMaxCount
 	}
@@ -166,9 +166,9 @@ func (p *DataExportPay) CreateOrder() {
 		ordercode := pay.GetOrderCode(openId)
 		download_url := util.GetExcelFilePath(ordercode, data_count)
 		go func() {
-			list, err := dataexport.GetDataExportSearchResultByScdId(util.MQFW, util.Mgo_bidding, config.Config.Mongobidding.DbName, config.Config.Elasticsearch, id, qutil.If(data_spec == "高级字段包", "2", "1").(string), data_count)
+			list, err := dataexport.GetDataExportSearchResultByScdId(util.MQFW, config.Config.Elasticsearch, id, qutil.If(data_spec == "高级字段包", "2", "1").(string), data_count)
 			if err == nil && list != nil && len(*list) > 0 {
-				list = dataexport.FormatExportData(util.MQFWENT, list, config.Config.WebDomain, qutil.If(data_spec == "高级字段包", "2", "1").(string))
+				list = dataexport.FormatExportData(list, config.Config.WebDomain, qutil.If(data_spec == "高级字段包", "2", "1").(string))
 				err = util.CreateDataExportExcelFile(list, data_spec == "高级字段包", config.ExConf.ExcelReadyPath+download_url)
 			}
 			if err != nil {

+ 2 - 2
src/jfw/modules/subscribepay/src/service/dataexportPack.go

@@ -352,7 +352,7 @@ func (this *DataExportPack) Statistics() {
 		if filterId == "" {
 			return nil, fmt.Errorf("请求参数异常")
 		}
-		selectCount := dataexport.GetDataExportSearchCountByScdId(util.MQFW, util.Mgo_bidding, config.Config.Mongobidding.DbName, config.Config.Elasticsearch, filterId)
+		selectCount := dataexport.GetDataExportSearchCountByScdId(util.MQFW, config.Config.Elasticsearch, filterId)
 		if selectCount > config.ExConf.MsgMaxCount || selectCount == -1 {
 			selectCount = config.ExConf.MsgMaxCount
 		}
@@ -410,7 +410,7 @@ func (this *DataExportPack) PackPay() {
 		if filterId == "" {
 			return nil, fmt.Errorf("请求参数异常")
 		}
-		selectCount := dataexport.GetDataExportSearchCountByScdId(util.MQFW, util.Mgo_bidding, config.Config.Mongobidding.DbName, config.Config.Elasticsearch, filterId)
+		selectCount := dataexport.GetDataExportSearchCountByScdId(util.MQFW, config.Config.Elasticsearch, filterId)
 		if selectCount > config.ExConf.MsgMaxCount || selectCount == -1 {
 			selectCount = config.ExConf.MsgMaxCount
 		}