WH01243 2 rokov pred
rodič
commit
68964da6eb
88 zmenil súbory, kde vykonal 5596 pridanie a 5232 odobranie
  1. 1 1
      src/go.mod
  2. 2 2
      src/go.sum
  3. 1 1
      src/jfw/config/config.go
  4. 32 35
      src/jfw/front/big-member.go
  5. 1 2
      src/jfw/front/dataExport.go
  6. 1 2
      src/jfw/front/shorturl.go
  7. 4 8
      src/jfw/front/supsearch.go
  8. 6 8
      src/jfw/front/swordfish.go
  9. 10 10
      src/jfw/front/vipsubscribe.go
  10. 2 2
      src/jfw/front/ws_dataExport.go
  11. 2 2
      src/jfw/front/wxMyOrder.go
  12. 8 8
      src/jfw/front/wxkeyset.go
  13. 7 8
      src/jfw/modules/app/src/app/front/bigMember.go
  14. 5 5
      src/jfw/modules/app/src/app/front/front.go
  15. 2 2
      src/jfw/modules/app/src/app/front/me.go
  16. 2 2
      src/jfw/modules/app/src/app/front/shorturl.go
  17. 3 3
      src/jfw/modules/app/src/app/front/swordfish.go
  18. 6 6
      src/jfw/modules/app/src/app/front/vipsubscribe.go
  19. 419 421
      src/jfw/modules/app/src/app/front/ws_dataExport.go
  20. 2 2
      src/jfw/modules/app/src/app/front/wxkeyset.go
  21. 1 1
      src/jfw/modules/app/src/go.mod
  22. 2 2
      src/jfw/modules/app/src/go.sum
  23. 0 4
      src/jfw/modules/bigmember/src/config.json
  24. 4 0
      src/jfw/modules/bigmember/src/config.yaml
  25. 79 75
      src/jfw/modules/bigmember/src/config/config.go
  26. 1 1
      src/jfw/modules/bigmember/src/entity/claimCommon.go
  27. 1 1
      src/jfw/modules/bigmember/src/entity/followEnterprise.go
  28. 1 1
      src/jfw/modules/bigmember/src/entity/followProject.go
  29. 3 3
      src/jfw/modules/bigmember/src/entity/portrait.go
  30. 1 1
      src/jfw/modules/bigmember/src/entity/trial.go
  31. 38 38
      src/jfw/modules/bigmember/src/filter/sessionfilter.go
  32. 12 1
      src/jfw/modules/bigmember/src/go.mod
  33. 112 2
      src/jfw/modules/bigmember/src/go.sum
  34. 1 1
      src/jfw/modules/bigmember/src/service/analysis/decision.go
  35. 1 1
      src/jfw/modules/bigmember/src/service/analysis/forecastproject.go
  36. 1 1
      src/jfw/modules/bigmember/src/service/analysis/potential.go
  37. 1 1
      src/jfw/modules/bigmember/src/service/analysis/util.go
  38. 1 1
      src/jfw/modules/bigmember/src/service/bidfile/bidfile.go
  39. 1 1
      src/jfw/modules/bigmember/src/service/follow/projectPdf.go
  40. 2 2
      src/jfw/modules/bigmember/src/service/portrait/subvipPortraitAction.go
  41. 6 6
      src/jfw/modules/bigmember/src/service/push/push.go
  42. 2 2
      src/jfw/modules/bigmember/src/service/report/marketAnalysis.go
  43. 2 2
      src/jfw/modules/bigmember/src/service/report/report.go
  44. 1 1
      src/jfw/modules/bigmember/src/service/subscribe/subscribe.go
  45. 9 9
      src/jfw/modules/bigmember/src/service/use/use.go
  46. 1 1
      src/jfw/modules/bigmember/src/util/power.go
  47. 1 5
      src/jfw/modules/distribution/src/config.json
  48. 4 0
      src/jfw/modules/distribution/src/config.yaml
  49. 12 1
      src/jfw/modules/distribution/src/go.mod
  50. 112 2
      src/jfw/modules/distribution/src/go.sum
  51. 497 498
      src/jfw/modules/distribution/src/service/action/share.go
  52. 126 122
      src/jfw/modules/distribution/src/service/config/config.go
  53. 4 4
      src/jfw/modules/publicapply/src/attachmentdow/service/service.go
  54. 2 2
      src/jfw/modules/publicapply/src/bidcollection/entity/entity.go
  55. 2 2
      src/jfw/modules/publicapply/src/customer/entity/entiy.go
  56. 1 1
      src/jfw/modules/publicapply/src/dataexport/entity/collection.go
  57. 1 1
      src/jfw/modules/publicapply/src/dataexport/service/action.go
  58. 1 1
      src/jfw/modules/publicapply/src/enterpriseSearch/service/search.go
  59. 1 1
      src/jfw/modules/publicapply/src/go.mod
  60. 2 2
      src/jfw/modules/publicapply/src/go.sum
  61. 2 2
      src/jfw/modules/publicapply/src/me/me.go
  62. 2 2
      src/jfw/modules/publicapply/src/subscribePush/entity/historyPush.go
  63. 2 2
      src/jfw/modules/publicapply/src/subscribePush/entity/keyWords.go
  64. 2 2
      src/jfw/modules/publicapply/src/subscribePush/entity/setting.go
  65. 8 8
      src/jfw/modules/publicapply/src/subscribePush/service/pushList.go
  66. 2 2
      src/jfw/modules/publicapply/src/subscribePush/service/subscribe.go
  67. 3 3
      src/jfw/modules/publicapply/src/userbase/entity/entity.go
  68. 54 54
      src/jfw/modules/subscribepay/src/active/active.go
  69. 4 0
      src/jfw/modules/subscribepay/src/config.yaml
  70. 8 4
      src/jfw/modules/subscribepay/src/config/config.go
  71. 1 1
      src/jfw/modules/subscribepay/src/entity/basePack.go
  72. 2 2
      src/jfw/modules/subscribepay/src/entity/dataExportPackStruct.go
  73. 3 3
      src/jfw/modules/subscribepay/src/entity/order.go
  74. 2 2
      src/jfw/modules/subscribepay/src/entity/resourcePackStruct.go
  75. 12 1
      src/jfw/modules/subscribepay/src/go.mod
  76. 112 2
      src/jfw/modules/subscribepay/src/go.sum
  77. 115 115
      src/jfw/modules/subscribepay/src/rpcfollow/share.go
  78. 597 597
      src/jfw/modules/subscribepay/src/service/afterPay.go
  79. 1 1
      src/jfw/modules/subscribepay/src/service/basePack.go
  80. 120 120
      src/jfw/modules/subscribepay/src/service/bigmember.go
  81. 1 1
      src/jfw/modules/subscribepay/src/service/dataexportPack.go
  82. 206 206
      src/jfw/modules/subscribepay/src/service/index_p1.go
  83. 6 6
      src/jfw/modules/subscribepay/src/service/orderDetails.go
  84. 883 883
      src/jfw/modules/subscribepay/src/service/orderListDetails.go
  85. 160 160
      src/jfw/modules/subscribepay/src/service/resourcePack.go
  86. 541 541
      src/jfw/modules/subscribepay/src/service/salesCreateOrder.go
  87. 648 648
      src/jfw/modules/subscribepay/src/service/vipSubscribeChange.go
  88. 533 533
      src/jfw/modules/subscribepay/src/service/vipSubscribePay.go

+ 1 - 1
src/go.mod

@@ -4,7 +4,7 @@ go 1.18
 
 require (
 	app.yhyue.com/moapp/jybase v0.0.0-20230117032034-ad7c00ffe11a
-	app.yhyue.com/moapp/jypkg v0.0.0-20230202083520-858975e007e3
+	app.yhyue.com/moapp/jypkg v0.0.0-20230203012631-e0290a6ef7ff
 	bp.jydev.jianyu360.cn/BaseService/userCenter v0.0.0-20230129060002-f69424aa14ba
 	github.com/SKatiyar/qr v0.0.0-20151201054752-25b6bdf44e67
 	github.com/dchest/captcha v1.0.0

+ 2 - 2
src/go.sum

@@ -13,8 +13,8 @@ app.yhyue.com/moapp/jybase v0.0.0-20220802080941-07f401baab8b/go.mod h1:HelrO6tc
 app.yhyue.com/moapp/jybase v0.0.0-20230109015757-aa3d5e19b196/go.mod h1:zB47XTeJvpcbtBRYgkQuxOICWNexiZfbUO+7aUf6mNs=
 app.yhyue.com/moapp/jybase v0.0.0-20230117032034-ad7c00ffe11a h1:wD4aWPSYdiX1cIP4lzzPD2s7fYhKa3muIf97l9tonJE=
 app.yhyue.com/moapp/jybase v0.0.0-20230117032034-ad7c00ffe11a/go.mod h1:zB47XTeJvpcbtBRYgkQuxOICWNexiZfbUO+7aUf6mNs=
-app.yhyue.com/moapp/jypkg v0.0.0-20230202083520-858975e007e3 h1:8JwEPCjpV+4XysYMfNnRDVR11MGmtWQsHvx1aHfsDN4=
-app.yhyue.com/moapp/jypkg v0.0.0-20230202083520-858975e007e3/go.mod h1:NrRgv24VIpf/xMMvsGC1EgoD+z6z5ea3MqIVxEcSPhE=
+app.yhyue.com/moapp/jypkg v0.0.0-20230203012631-e0290a6ef7ff h1:pXU7MzCyj6XgjP2wi8ivvwtbrD9q8ZuKTJ4wW7G1Ui4=
+app.yhyue.com/moapp/jypkg v0.0.0-20230203012631-e0290a6ef7ff/go.mod h1:NrRgv24VIpf/xMMvsGC1EgoD+z6z5ea3MqIVxEcSPhE=
 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/BP/jynsq v0.0.0-20220222052708-ebc43af90698/go.mod h1:ojo/AUH9Yr1wzarEjOaNMkj1Cet/9r8IgLyba64Z52E=

+ 1 - 1
src/jfw/config/config.go

@@ -66,5 +66,5 @@ func init() {
 	}
 	ResourceApi.HasPowers = resourceCenter + util.ObjToString(resourceCenterUrl["haspowers"])
 	var ctx = gctx.New()
-	Middleground = middleground.NewMiddleground(g.Cfg().MustGet(ctx, "etcd.hosts").Strings()).RegUserCenter(g.Cfg().MustGet(ctx, "userCenterKey").String()).RegPowerCheckCenter(g.Cfg().MustGet(ctx, "powerCheckKey").String())
+	Middleground = middleground.NewMiddleground(g.Cfg().MustGet(ctx, "etcd.hosts").Strings()).RegUserCenter(g.Cfg().MustGet(ctx, "userCenterKey").String())
 }

+ 32 - 35
src/jfw/front/big-member.go

@@ -1,56 +1,53 @@
 package front
 
 import (
-	qutil "app.yhyue.com/moapp/jybase/common"
-	"jy/src/jfw/config"
+    "jy/src/jfw/config"
 
-	"app.yhyue.com/moapp/jypkg/common/src/qfw/util/jy"
+    "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 BigMemberAction struct {
-	*xweb.Action
-	vIPViewPage   xweb.Mapper `xweb:"/big/page/(.*)"`    //大会员
-	pcVIPViewPage xweb.Mapper `xweb:"/big/pc/page/(.*)"` //大会员pc
-	wxVIPViewPage xweb.Mapper `xweb:"/big/wx/page/(.*)"` //大会员wx
+    *xweb.Action
+    vIPViewPage   xweb.Mapper `xweb:"/big/page/(.*)"`    //大会员
+    pcVIPViewPage xweb.Mapper `xweb:"/big/pc/page/(.*)"` //大会员pc
+    wxVIPViewPage xweb.Mapper `xweb:"/big/wx/page/(.*)"` //大会员wx
 }
 
 func init() {
-	xweb.AddAction(&BigMemberAction{})
+    xweb.AddAction(&BigMemberAction{})
 }
 
 func (s *BigMemberAction) VIPViewPage(htmlName string) {
-	s.T["logid"] = config.Seoconfig["bigmember"].(string)
-	etcdMap := config.Sysconfig["etcd"].(map[string]interface{})
-	bigBaseMsg := jy.GetBigVipUserBaseMsg("10000", s.Session(), qutil.InterfaceToStr(etcdMap["hosts"]), qutil.InterfaceToStr(etcdMap["key"]))
-	//大会员介绍页需要使用power字段
-	if bigBaseMsg.Status > 0 && htmlName == "index" {
-		power := []int{}
-		for key := range bigBaseMsg.PowerMap {
-			power = append(power, key)
-		}
-		s.T["power"] = power
-	}
-	s.T["member_status"] = bigBaseMsg.Status
-	s.T["member_trial"] = bigBaseMsg.HasTrial
-	s.Render("/big-member/pc/page_"+htmlName+".html", &s.T)
+    s.T["logid"] = config.Seoconfig["bigmember"].(string)
+    bigBaseMsg := jy.GetBigVipUserBaseMsg(s.Session(), *config.Middleground)
+    //大会员介绍页需要使用power字段
+    if bigBaseMsg.Status > 0 && htmlName == "index" {
+        power := []int{}
+        for key := range bigBaseMsg.PowerMap {
+            power = append(power, key)
+        }
+        s.T["power"] = power
+    }
+    s.T["member_status"] = bigBaseMsg.Status
+    s.T["member_trial"] = bigBaseMsg.HasTrial
+    s.Render("/big-member/pc/page_"+htmlName+".html", &s.T)
 }
 
 func (s *BigMemberAction) PcVIPViewPage(htmlName string) {
-	s.T["logid"] = config.Seoconfig["bigmember"].(string)
-	s.Render("/big-member/pc/page_"+htmlName+".html", &s.T)
+    s.T["logid"] = config.Seoconfig["bigmember"].(string)
+    s.Render("/big-member/pc/page_"+htmlName+".html", &s.T)
 }
 
 func (s *BigMemberAction) WxVIPViewPage(htmlName string) error {
-	s.T["logid"] = config.Seoconfig["bigmember"].(string)
-	etcdMap := config.Sysconfig["etcd"].(map[string]interface{})
-	bigBaseMsg := jy.GetBigVipUserBaseMsg("10000", s.Session(), qutil.InterfaceToStr(etcdMap["hosts"]), qutil.InterfaceToStr(etcdMap["key"]))
-	if bigBaseMsg.Status > 0 && htmlName == "landingPage" {
-		return s.Redirect("/jy_mobile/tabbar/box")
-	}
-	if htmlName == "open_app_active" {
-		return s.Render("/big-member/wx/page_"+htmlName+".html", &s.T)
-	}
-	return s.Render("/big-member/wx/page_"+htmlName+".html", &s.T)
+    s.T["logid"] = config.Seoconfig["bigmember"].(string)
+    bigBaseMsg := jy.GetBigVipUserBaseMsg(s.Session(), *config.Middleground)
+    if bigBaseMsg.Status > 0 && htmlName == "landingPage" {
+        return s.Redirect("/jy_mobile/tabbar/box")
+    }
+    if htmlName == "open_app_active" {
+        return s.Render("/big-member/wx/page_"+htmlName+".html", &s.T)
+    }
+    return s.Render("/big-member/wx/page_"+htmlName+".html", &s.T)
 }

+ 1 - 2
src/jfw/front/dataExport.go

@@ -413,8 +413,7 @@ func (d *DataExport) SuperSearchExport() error {
 		BidField:     d.GetString("bid_field"),                    // 领域数据类型 0101- 医疗行业
 
 	}
-	etcdMap := config.Sysconfig["etcd"].(map[string]interface{})
-	selectType := strings.Join(jy.GetVipState("10000", d.Session(), util.InterfaceToStr(etcdMap["hosts"]), util.InterfaceToStr(etcdMap["key"]), userId).GetQueryItems(d.GetString("selectType"), util.Int64All(config.Sysconfig["bidSearchOldUserLimit"])), ",")
+	selectType := strings.Join(jy.GetVipState( d.Session(), *config.Middleground, userId).GetQueryItems(d.GetString("selectType"), util.Int64All(config.Sysconfig["bidSearchOldUserLimit"])), ",")
 	//数据回显
 	d.SetSession("Echo_timeslot", d.GetString("timeslot"))
 	d.SetSession("Echo_keywords", reqData.Keywords)

+ 1 - 2
src/jfw/front/shorturl.go

@@ -227,8 +227,7 @@ func (s *Short) Article(stype, id string) error {
 		res, ok = public.MQFW.FindById("user", userId, `{"i_vip_status":1,"i_member_status":1,"s_m_phone":1,"s_phone":1,"l_vip_starttime":1}`)
 	}
 	entid := util.Int64All(s.GetSession("entId"))
-	etcdMap := config.Sysconfig["etcd"].(map[string]interface{})
-	userPower := jy.GetBigVipUserBaseMsg("10000", s.Session(), util.InterfaceToStr(etcdMap["hosts"]), util.InterfaceToStr(etcdMap["key"]))
+	userPower := jy.GetBigVipUserBaseMsg( s.Session(), *config.Middleground)
 	var (
 		isEntnicheNew bool = userPower.EntIsNew           //新版超级订阅
 		isOldVip      bool = false                        //新购超级订阅不能查看拟建项目详情页

+ 4 - 8
src/jfw/front/supsearch.go

@@ -250,8 +250,7 @@ func (p *Pcsearch) GetNewBids() error {
 		if domainPageType, ok := DomainPageType[bidField]; ok {
 			pageType = domainPageType
 		}
-		etcdMap := config.Sysconfig["etcd"].(map[string]interface{})
-		vipStatus := jy.GetVipState("10000", p.Session(), util.InterfaceToStr(etcdMap["hosts"]), util.InterfaceToStr(etcdMap["key"]), userId)
+		vipStatus := jy.GetVipState( p.Session(), *config.Middleground, userId)
 		if (vipStatus.BigMember <= 0 && vipStatus.VipState <= 0) || (!jy.HasBidFieldPower(config.ResourceApi.HasPowers, fmt.Sprint(util.Int64All(baseUserId)), MedicalFunctionCode)) {
 			p.ServeJson(map[string]interface{}{
 				"list":      []map[string]interface{}{},
@@ -351,8 +350,7 @@ func (p *Pcsearch) PcSearchIndex(module string) error {
 	if selectType == "" {
 		selectType = "title,content"
 	}
-	etcdMap := config.Sysconfig["etcd"].(map[string]interface{})
-	isPayedUser, publishtime, queryItems, _, _ := bidsearch.PublicSearch(userId, selectType, publishtime, util.Int64All(config.Sysconfig["bidSearchOldUserLimit"]), 0, pageSize, "10000", p.Session(), util.InterfaceToStr(etcdMap["hosts"]), util.InterfaceToStr(etcdMap["key"]))
+	isPayedUser, publishtime, queryItems, _, _ := bidsearch.PublicSearch(userId, selectType, publishtime, util.Int64All(config.Sysconfig["bidSearchOldUserLimit"]), 0, pageSize,  p.Session(), *config.Middleground)
 	if isPayedUser {
 		buyerclass = p.GetString("buyerclass")
 		hasBuyerTel, hasWinnerTel = p.GetString("buyertel"), p.GetString("winnertel")
@@ -377,8 +375,7 @@ func (p *Pcsearch) PcSearchIndex(module string) error {
 		fileExists = util.ObjToString(p.GetSession("Echo_fileExists"))
 		city = util.ObjToString(p.GetSession("Echo_city"))
 		bidField = util.ObjToString(p.GetSession("Echo_bid_field")) // 领域化数据 0101-医疗行业
-		etcdMap := config.Sysconfig["etcd"].(map[string]interface{})
-		_, _, queryItems, _, _ = bidsearch.PublicSearch(userId, selectType, publishtime, util.Int64All(config.Sysconfig["bidSearchOldUserLimit"]), 0, pageSize, "10000", p.Session(), util.InterfaceToStr(etcdMap["hosts"]), util.InterfaceToStr(etcdMap["key"]))
+		_, _, queryItems, _, _ = bidsearch.PublicSearch(userId, selectType, publishtime, util.Int64All(config.Sysconfig["bidSearchOldUserLimit"]), 0, pageSize,  p.Session(), *config.Middleground)
 	}
 	keywordsLimit := util.IntAllDef(config.Sysconfig["keywordsLimit"], 35)
 	searchLimit := public.IsSearchLimit(queryItems)
@@ -404,8 +401,7 @@ func (p *Pcsearch) PcSearchIndex(module string) error {
 	isSearch := true
 	if bidField != "" {
 		isSearch = false
-		etcdMap := config.Sysconfig["etcd"].(map[string]interface{})
-		vipStatus := jy.GetVipState("10000", p.Session(), util.InterfaceToStr(etcdMap["hosts"]), util.InterfaceToStr(etcdMap["key"]), userId)
+		vipStatus := jy.GetVipState( p.Session(), *config.Middleground, userId)
 		if vipStatus.BigMember > 0 || vipStatus.VipState > 0 {
 			if jy.HasBidFieldPower(config.ResourceApi.HasPowers, fmt.Sprint(util.Int64All(baseUserId)), MedicalFunctionCode) {
 				isSearch = true

+ 6 - 8
src/jfw/front/swordfish.go

@@ -96,8 +96,8 @@ func (m *Front) PcAjaxReq() {
 	}
 	reqType := m.GetString("reqType")
 	if bidField != "" { // 如果是领域化数据 判断是否是付费用户 是否有权限
-		etcdMap := config.Sysconfig["etcd"].(map[string]interface{})
-		vipStatus := jy.GetVipState("10000", m.Session(), util.InterfaceToStr(etcdMap["hosts"]), util.InterfaceToStr(etcdMap["key"]), userId)
+
+		vipStatus := jy.GetVipState( m.Session(), *config.Middleground, userId)
 		if (vipStatus.BigMember <= 0 && vipStatus.VipState <= 0) || (!jy.HasBidFieldPower(config.ResourceApi.HasPowers, fmt.Sprint(util.Int64All(baseUserId)), MedicalFunctionCode)) {
 			m.ServeJson(map[string]interface{}{
 				"list": []map[string]interface{}{},
@@ -144,8 +144,7 @@ func (m *Front) PcAjaxReq() {
 		start                     int
 		city                      string //城市
 	)
-	etcdMap := config.Sysconfig["etcd"].(map[string]interface{})
-	isPayedUser, publishtime, queryItems, currentPage, start = bidsearch.PublicSearch(userId, selectType, publishtime, util.Int64All(config.Sysconfig["bidSearchOldUserLimit"]), currentPage, pageSize, "10000", m.Session(), util.InterfaceToStr(etcdMap["hosts"]), util.InterfaceToStr(etcdMap["key"]))
+	isPayedUser, publishtime, queryItems, currentPage, start = bidsearch.PublicSearch(userId, selectType, publishtime, util.Int64All(config.Sysconfig["bidSearchOldUserLimit"]), currentPage, pageSize,  m.Session(), *config.Middleground)
 	if isPayedUser {
 		buyerclass = m.GetString("buyerclass")
 		hasBuyerTel, hasWinnerTel = m.GetString("buyertel"), m.GetString("winnertel")
@@ -401,8 +400,7 @@ func (m *Front) WxsearchlistPaging() {
 			var notkey string = ""                        //排除词
 			var fileExists = m.GetString("fileExists")    //是否有附件--所有用户都可用此功能 0:全部;1:有附件;-1:无附件
 			var city string = ""                          //城市
-			etcdMap := config.Sysconfig["etcd"].(map[string]interface{})
-			vipStatus := jy.GetVipState("10000", m.Session(), util.InterfaceToStr(etcdMap["hosts"]), util.InterfaceToStr(etcdMap["key"]), userId)
+			vipStatus := jy.GetVipState( m.Session(), *config.Middleground, userId)
 			isPayedUser = vipStatus.IsPayedUser()
 			queryItems := vipStatus.GetQueryItems(selectType, util.Int64All(config.Sysconfig["bidSearchOldUserLimit"]))
 			if isPayedUser {
@@ -1868,8 +1866,8 @@ func (f *Front) HistorypushPaging() error {
 func (m *Front) Subscribe() error {
 	isBuyed := false
 	if userId, _ := m.GetSession("userId").(string); userId != "" {
-		etcdMap := config.Sysconfig["etcd"].(map[string]interface{})
-		vStatus := jy.GetVipState("10000", m.Session(), util.InterfaceToStr(etcdMap["hosts"]), util.InterfaceToStr(etcdMap["key"]), userId)
+
+		vStatus := jy.GetVipState( m.Session(), *config.Middleground, userId)
 		isBuyed = vStatus.VipState > 0
 	}
 	m.T["isBuyed"] = isBuyed

+ 10 - 10
src/jfw/front/vipsubscribe.go

@@ -146,8 +146,8 @@ func (s *Subscribepay) ToSetPage() error {
 			s.SetSession(jy.SwitchService.SessionKey, jy.SwitchService.Member)
 		}
 	}
-	etcdMap := config.Sysconfig["etcd"].(map[string]interface{})
-	vipMsg := jy.GetBigVipUserBaseMsg("10000", s.Session(), util.InterfaceToStr(etcdMap["hosts"]), util.InterfaceToStr(etcdMap["key"]))
+
+	vipMsg := jy.GetBigVipUserBaseMsg( s.Session(), *config.Middleground)
 	if vipMsg.VipStatus <= 0 && vipMsg.Status <= 0 && isInTSguide(userid) { //仅免费用户跳转向导页面
 		return s.Redirect("/front/tenderSubscribe/guide?url=" + url.QueryEscape(s.Request.RequestURI))
 	} else if (vSwitch == "" || vSwitch == "v") && vipMsg.VipStatus <= 0 && !vipMsg.IsUpgrade {
@@ -228,8 +228,8 @@ func (s *Subscribepay) Introduce() error {
 		return s.Redirect("/swordfish/about?v=1")
 	}
 	// m, ok := public.MQFW.FindById("user", userId, `{"o_vipjy":1,"i_vip_status":1}`)
-	etcdMap := config.Sysconfig["etcd"].(map[string]interface{})
-	m := jy.GetBigVipUserBaseMsg("10000", s.Session(), util.InterfaceToStr(etcdMap["hosts"]), util.InterfaceToStr(etcdMap["key"]))
+
+	m := jy.GetBigVipUserBaseMsg( s.Session(), *config.Middleground)
 	if m == nil {
 		return s.Redirect("/swordfish/about?v=2")
 	}
@@ -285,8 +285,8 @@ func (s *Subscribepay) ToPurchasePage(flag string) {
 		return
 	}
 	//m, ok := public.MQFW.FindById("user", userId, `{"o_vipjy":1,"i_vip_status":1}`)
-	etcdMap := config.Sysconfig["etcd"].(map[string]interface{})
-	m := jy.GetBigVipUserBaseMsg("10000", s.Session(), util.InterfaceToStr(etcdMap["hosts"]), util.InterfaceToStr(etcdMap["key"]))
+
+	m := jy.GetBigVipUserBaseMsg( s.Session(), *config.Middleground)
 	if m == nil {
 		s.Redirect("/swordfish/about?v=2")
 		return
@@ -433,8 +433,8 @@ func (s *Subscribepay) OpenInvoice(order_code string) {
 func (s *Subscribepay) PreheatPoster() {
 	//myopenid := util.ObjToString(s.GetSession("s_m_openid"))
 	// u, ok := public.MQFW.FindOne("user", `{"s_m_openid":"`+myopenid+`","s_unionid":{"$ne":"`+myopenid+`"}}`)
-	etcdMap := config.Sysconfig["etcd"].(map[string]interface{})
-	u := jy.GetBigVipUserBaseMsg("10000", s.Session(), util.InterfaceToStr(etcdMap["hosts"]), util.InterfaceToStr(etcdMap["key"]))
+
+	u := jy.GetBigVipUserBaseMsg( s.Session(), *config.Middleground)
 	if u != nil {
 		if u.VipStatus == 1 || u.VipStatus == 2 {
 			s.Redirect("/front/vipsubscribe/toSubVipSetPage")
@@ -479,8 +479,8 @@ func (s *Subscribepay) Msgremind() error {
 		return s.Render("_error.html")
 	}
 	//user, ok := public.MQFW.FindById("user", userId, `{"i_vip_status":1,"l_vip_endtime":1,"i_member_status":1,"i_member_endtime":1}`)
-	etcdMap := config.Sysconfig["etcd"].(map[string]interface{})
-	user := jy.GetBigVipUserBaseMsg("10000", s.Session(), util.InterfaceToStr(etcdMap["hosts"]), util.InterfaceToStr(etcdMap["key"]))
+
+	user := jy.GetBigVipUserBaseMsg( s.Session(), *config.Middleground)
 	if user == nil {
 		return s.Render("_error.html")
 	}

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

@@ -375,8 +375,8 @@ func (wd *WsDataExport) SearchExport() error {
 		FileExists:   wd.GetString("fileExists"),                   //有无附件
 	}
 	saveData := reqData.PassBidSearchExport(config.Sysconfig)
-	etcdMap := config.Sysconfig["etcd"].(map[string]interface{})
-	saveData["selectType"] = strings.Join(jy.GetVipState("10000", wd.Session(), util.InterfaceToStr(etcdMap["hosts"]), util.InterfaceToStr(etcdMap["key"]), userId).
+
+	saveData["selectType"] = strings.Join(jy.GetVipState( wd.Session(), *config.Middleground, userId).
 		GetQueryItems(wd.GetString("selectType"), util.Int64All(config.Sysconfig["bidSearchOldUserLimit"])), ",")
 	saveData["s_openid"] = openid
 	saveData["s_userid"] = userId

+ 2 - 2
src/jfw/front/wxMyOrder.go

@@ -188,8 +188,8 @@ func (w *WxMyOrder) Myset() error {
 	isVip := false
 	if userid != "" {
 		//user, ok := mongodb.FindById("user", userid, `{"i_vip_status":1}`)
-		etcdMap := config.Sysconfig["etcd"].(map[string]interface{})
-		user := jy.GetBigVipUserBaseMsg("10000", w.Session(), util.InterfaceToStr(etcdMap["hosts"]), util.InterfaceToStr(etcdMap["key"]))
+
+		user := jy.GetBigVipUserBaseMsg( w.Session(), *config.Middleground)
 		if user != nil {
 			if user.VipStatus == 1 || user.VipStatus == 2 {
 				isVip = true

+ 8 - 8
src/jfw/front/wxkeyset.go

@@ -32,8 +32,8 @@ func (m *Front) WxKeyset(tpl string) error {
 			"type":       "keyset",
 		})
 	}
-	etcdMap := config.Sysconfig["etcd"].(map[string]interface{})
-	vipMsg := jy.GetBigVipUserBaseMsg("10000", m.Session(), util.InterfaceToStr(etcdMap["hosts"]), util.InterfaceToStr(etcdMap["key"]))
+
+	vipMsg := jy.GetBigVipUserBaseMsg( m.Session(), *config.Middleground)
 	if (tpl == "index" || tpl == "filterset") && vipMsg.VipStatus <= 0 && vipMsg.Status <= 0 && isInTSguide(userid) { //仅免费用户跳转向导页面
 		return m.Redirect("/front/tenderSubscribe/guide?url=" + url.QueryEscape(m.Request.RequestURI))
 	}
@@ -43,8 +43,8 @@ func (m *Front) WxKeyset(tpl string) error {
 	}
 	if tpl == "seniorset" {
 		//data, ok := mongodb.FindById("user", userid, `{"o_jy":1}`)
-		etcdMap := config.Sysconfig["etcd"].(map[string]interface{})
-		data := jy.GetBigVipUserBaseMsg("10000", m.Session(), util.InterfaceToStr(etcdMap["hosts"]), util.InterfaceToStr(etcdMap["key"]))
+
+		data := jy.GetBigVipUserBaseMsg( m.Session(), *config.Middleground)
 
 		if data != nil {
 			if data.Data.Free.FreeHasKey {
@@ -99,8 +99,8 @@ func (m *Front) WxKeysetAjaxReq() {
 	if reqType == "getKeyset" { //获取高级设置
 		//data, ok := mongodb.FindById("user", userId, `{"o_jy":1,"l_registedate":1}`)
 		o_jy := jy.GetSubScribeInfo(m.Session(), mongodb, "f", "10000")
-		etcdMap := config.Sysconfig["etcd"].(map[string]interface{})
-		data := jy.GetBigVipUserBaseMsg("10000", m.Session(), util.InterfaceToStr(etcdMap["hosts"]), util.InterfaceToStr(etcdMap["key"]))
+
+		data := jy.GetBigVipUserBaseMsg( m.Session(), *config.Middleground)
 		if o_jy != nil {
 			//o_jy, _ = (*data)["o_jy"].(map[string]interface{})
 			(*o_jy)["i_new"] = NewUserByVIP(o_jy, data.Data.Free.Registedate)
@@ -246,8 +246,8 @@ func (m *Front) WxKeysetAjaxReq() {
 			//if rd, ok := mongodb.FindById("user", userId, `{"o_jy":1,"l_registedate":1}`); rd != nil && ok && len(*rd) > 0 {
 			//获取活动上线时间
 			o_jy := jy.GetSubScribeInfo(m.Session(), mongodb, "f", "10000")
-			etcdMap := config.Sysconfig["etcd"].(map[string]interface{})
-			data := jy.GetBigVipUserBaseMsg("10000", m.Session(), util.InterfaceToStr(etcdMap["hosts"]), util.InterfaceToStr(etcdMap["key"]))
+
+			data := jy.GetBigVipUserBaseMsg( m.Session(), *config.Middleground)
 			optimalTime, _ := config.Sysconfig["optimalTime"].(string)
 			optime, _ = time.ParseInLocation(Date_Full_Layout, optimalTime, time.Local)
 			regtime = data.Data.Free.Registedate

+ 7 - 8
src/jfw/modules/app/src/app/front/bigMember.go

@@ -1,12 +1,11 @@
 package front
 
 import (
-	util "app.yhyue.com/moapp/jybase/common"
-	"app.yhyue.com/moapp/jybase/go-xweb/xweb"
-	"app.yhyue.com/moapp/jypkg/common/src/qfw/util/jy"
-	"app.yhyue.com/moapp/jypkg/public"
-	"jy/src/jfw/modules/app/src/jfw/config"
-	"regexp"
+    "app.yhyue.com/moapp/jybase/go-xweb/xweb"
+    "app.yhyue.com/moapp/jypkg/common/src/qfw/util/jy"
+    "app.yhyue.com/moapp/jypkg/public"
+    "jy/src/jfw/modules/app/src/jfw/config"
+    "regexp"
 )
 
 type NewBigMemberAction struct {
@@ -35,8 +34,8 @@ func (s *NewBigMemberAction) PowerClear() {
 
 func (s *NewBigMemberAction) VipPageManager(htmlName string) error {
 	if !freePageReg.MatchString(htmlName) {
-		etcdMap := config.Sysconfig["etcd"].(map[string]interface{})
-		bigBaseMsg := jy.GetBigVipUserBaseMsg("10000", s.Session(), util.InterfaceToStr(etcdMap["hosts"]), util.InterfaceToStr(etcdMap["key"]))
+
+		bigBaseMsg := jy.GetBigVipUserBaseMsg( s.Session(), *config.Middleground)
 		//大会员页面权限判断
 		if !bigBaseMsg.CheckBigVipFrontPower(htmlName) {
 			//main_root页面大会员主页面 只要是大会员都可以进入

+ 5 - 5
src/jfw/modules/app/src/app/front/front.go

@@ -231,9 +231,9 @@ func isInTSguide(userid string, session *httpsession.Session) bool {
 	if userid == "" {
 		return false
 	}
-	etcdMap := config.Sysconfig["etcd"].(map[string]interface{})
+
 	//data, ok := mongodb.FindById("user", userid, `{"o_jy":1,"i_ts_guide":1,"":1,"i_member_status":1,"i_vip_status":1,"s_phone":1,"s_m_phone":1}`)
-	data := jy.GetBigVipUserBaseMsg("10000", session, util.InterfaceToStr(etcdMap["hosts"]), util.InterfaceToStr(etcdMap["key"]))
+	data := jy.GetBigVipUserBaseMsg( session,  *config.Middleground)
 	//付费用户无免费订阅,不进入订阅向导页面
 	if data.Data.Vip.Status > 0 || data.Data.Vip.Status > 0 {
 		return false
@@ -552,8 +552,8 @@ func (s *Front) ShowRedSpotOnMenu() {
 	if userid != "" {
 		users, ok := mongodb.FindById("user", userid, `{"s_phone":1,"s_m_phone":1,i_member_status":1,"i_apppushunread":1,"i_member_apppushunread":1,"s_member_mainid":1,"i_member_sub_status":1}`)
 
-		etcdMap := config.Sysconfig["etcd"].(map[string]interface{})
-		user := jy.GetBigVipUserBaseMsg("10000", s.Session(), util.InterfaceToStr(etcdMap["hosts"]), util.InterfaceToStr(etcdMap["key"]))
+
+		user := jy.GetBigVipUserBaseMsg( s.Session(),  *config.Middleground)
 		uid := ""
 		isNew := user.Data.Entniche.IsNew > 0
 		/* res := public.Mysql.SelectBySql(`SELECT isNew,i.name,i.phone,i.status,i.auth_status,u.power FROM entniche_user u LEFT JOIN entniche_info i
@@ -572,7 +572,7 @@ func (s *Front) ShowRedSpotOnMenu() {
 		                           }
 		                   }*/
 		if ok && users != nil {
-			if jy.SwitchService.IsMember(s.Session(), "10000", util.InterfaceToStr(etcdMap["hosts"]), util.InterfaceToStr(etcdMap["key"])) {
+			if jy.SwitchService.IsMember(s.Session(),   *config.Middleground) {
 				subscribe = util.IntAll((*users)["i_member_apppushunread"])
 			} else if isNew {
 				subscribe = 0

+ 2 - 2
src/jfw/modules/app/src/app/front/me.go

@@ -70,8 +70,8 @@ func (m *Me) MeIndex() error {
                         }
                         m.T["member_status"] = qutil.If((*res)["i_member_status"] != nil, qutil.Int64All((*res)["i_member_status"]), 0)
                         power := []int{} //GetNewPower(userid)
-                        etcdMap := config.Sysconfig["etcd"].(map[string]interface{})
-                        powerMap := jy.GetBigVipUserBaseMsg("10000", m.Session(), qutil.InterfaceToStr(etcdMap["hosts"]), qutil.InterfaceToStr(etcdMap["key"])).PowerMap
+
+                        powerMap := jy.GetBigVipUserBaseMsg( m.Session(), *config.Middleground).PowerMap
                         for k := range powerMap {
                                 power = append(power, k)
                         }

+ 2 - 2
src/jfw/modules/app/src/app/front/shorturl.go

@@ -51,8 +51,8 @@ func (s *Short) Article(stype, id string) error {
 	if b {
 		return s.Redirect("/jyapp/free/mob/err")
 	}
-	etcdMap := config.Sysconfig["etcd"].(map[string]interface{})
-	userPower := jy.GetBigVipUserBaseMsg("10000", s.Session(), util.InterfaceToStr(etcdMap["hosts"]), util.InterfaceToStr(etcdMap["key"]))
+
+	userPower := jy.GetBigVipUserBaseMsg( s.Session(),  *config.Middleground)
 	var (
 		isEntnicheNew bool   = userPower.EntIsNew           //新版超级订阅
 		isOldVip      bool   = false                        //新购超级订阅不能查看拟建项目详情页

+ 3 - 3
src/jfw/modules/app/src/app/front/swordfish.go

@@ -298,8 +298,8 @@ func (m *Front) WxsearchlistPaging() {
 		buyerclass := ""                              //采购单位类别
 		var notkey string = ""                        //排除词
 		fileExists = m.GetString("fileExists")        //是否有附件--所有用户都可用此功能 0:全部;1:有附件;-1:无附件
-		etcdMap := config.Sysconfig["etcd"].(map[string]interface{})
-		isPayedUser, publishtime, queryItems, pageNum, _ = bidsearch.PublicSearch(userid, selectType, publishtime, util.Int64All(config.Sysconfig["bidSearchOldUserLimit"]), pageNum, 50, "10000", m.Session(), util.InterfaceToStr(etcdMap["hosts"]), util.InterfaceToStr(etcdMap["key"]))
+
+		isPayedUser, publishtime, queryItems, pageNum, _ = bidsearch.PublicSearch(userid, selectType, publishtime, util.Int64All(config.Sysconfig["bidSearchOldUserLimit"]), pageNum, 50,  m.Session(),  *config.Middleground)
 		if isPayedUser {
 			buyerclass = m.GetString("buyerclass")
 			hasBuyerTel, hasWinnerTel = m.GetString("buyertel"), m.GetString("winnertel")
@@ -307,7 +307,7 @@ func (m *Front) WxsearchlistPaging() {
 			city = m.GetString("city")
 		}
 		//校验是否有大会员中标企业查询权限
-		bigBaseMsg := jy.GetBigVipUserBaseMsg("10000", m.Session(), util.InterfaceToStr(etcdMap["hosts"]), util.InterfaceToStr(etcdMap["key"]))
+		bigBaseMsg := jy.GetBigVipUserBaseMsg( m.Session(),  *config.Middleground)
 		if bigBaseMsg.CheckBigVipBackPower("search") {
 			winner = m.GetString("winner")
 		}

+ 6 - 6
src/jfw/modules/app/src/app/front/vipsubscribe.go

@@ -112,9 +112,9 @@ func (s *Subscribepay) ToSetPage() {
 			s.SetSession(jy.SwitchService.SessionKey, jy.SwitchService.Member)
 		}
 	}
-	etcdMap := config.Sysconfig["etcd"].(map[string]interface{})
-	vSwitch = jy.SwitchService.GetEntniche(s.Session(), "10000", util.InterfaceToStr(etcdMap["hosts"]), util.InterfaceToStr(etcdMap["key"])) //v:vip m:member
-	bigBaseMsg := jy.GetBigVipUserBaseMsg("10000", s.Session(), util.InterfaceToStr(etcdMap["hosts"]), util.InterfaceToStr(etcdMap["key"]))
+
+	vSwitch = jy.SwitchService.GetEntniche(s.Session(),   *config.Middleground) //v:vip m:member
+	bigBaseMsg := jy.GetBigVipUserBaseMsg( s.Session(),  *config.Middleground)
 	//bigBaseMsg := jy.GetBigVipUserBaseMsg(userid, public.Mysql, public.MQFW)
 	if (vSwitch == "" || vSwitch == "v") && bigBaseMsg.VipStatus <= 0 && !bigBaseMsg.IsUpgrade {
 		s.Redirect("/jyapp/wxkeyset/keyset/index")
@@ -248,9 +248,9 @@ func (s *Subscribepay) ToSetKeyWordPage() {
 			s.SetSession(jy.SwitchService.SessionKey, jy.SwitchService.Member)
 		}
 	}
-	etcdMap := config.Sysconfig["etcd"].(map[string]interface{})
-	vSwitch = jy.SwitchService.GetEntniche(s.Session(), "10000", util.InterfaceToStr(etcdMap["hosts"]), util.InterfaceToStr(etcdMap["key"])) //v:vip m:member
-	bigBaseMsg := jy.GetBigVipUserBaseMsg("10000", s.Session(), util.InterfaceToStr(etcdMap["hosts"]), util.InterfaceToStr(etcdMap["key"]))
+
+	vSwitch = jy.SwitchService.GetEntniche(s.Session(),   *config.Middleground) //v:vip m:member
+	bigBaseMsg := jy.GetBigVipUserBaseMsg( s.Session(),  *config.Middleground)
 	//bigBaseMsg := jy.GetBigVipUserBaseMsg(userid, public.Mysql, public.MQFW)
 	//如果没有首次使用
 	if vSwitch == "m" && bigBaseMsg.Status > 0 && !bigBaseMsg.Used {

+ 419 - 421
src/jfw/modules/app/src/app/front/ws_dataExport.go

@@ -1,481 +1,479 @@
 package front
 
 import (
-	"encoding/json"
-	"errors"
-	"fmt"
-	"jy/src/jfw/modules/app/src/jfw/config"
-	"log"
-	"regexp"
-	"strconv"
-	"strings"
-	"time"
+    "encoding/json"
+    "errors"
+    "fmt"
+    "jy/src/jfw/modules/app/src/jfw/config"
+    "log"
+    "regexp"
+    "strconv"
+    "strings"
+    "time"
 
-	util "app.yhyue.com/moapp/jybase/common"
-	. "app.yhyue.com/moapp/jybase/date"
-	"app.yhyue.com/moapp/jybase/encrypt"
-	"app.yhyue.com/moapp/jybase/go-xweb/xweb"
-	"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/jypkg/public"
-	"go.mongodb.org/mongo-driver/bson"
+    util "app.yhyue.com/moapp/jybase/common"
+    . "app.yhyue.com/moapp/jybase/date"
+    "app.yhyue.com/moapp/jybase/encrypt"
+    "app.yhyue.com/moapp/jybase/go-xweb/xweb"
+    "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/jypkg/public"
+    "go.mongodb.org/mongo-driver/bson"
 )
 
 type WsDataExport struct {
-	*xweb.Action
-	searchExport      xweb.Mapper `xweb:"/jyapp/front/dataExport/searchExport"`      //app数据导出
-	toCreateOrderPage xweb.Mapper `xweb:"/jyapp/front/dataExport/toCreateOrderPage"` //app数据导出-订单支付
-	sendMailVerify    xweb.Mapper `xweb:"/jyapp/front/dataExport/sendMailVerify"`    //发送邮箱验证码
-	checkMailVerify   xweb.Mapper `xweb:"/jyapp/front/dataExport/checkMailVerify"`   //验证邮箱验证码
-	checkPhoneVerify  xweb.Mapper `xweb:"/jyapp/front/dataExport/checkPhoneVerify"`  //验证手机号
-	previewData       xweb.Mapper `xweb:"/jyapp/front/dataExport/previewData/(.*)"`  //app数据导出-数据预览页面
-	getPreview        xweb.Mapper `xweb:"/jyapp/front/dataExport/getPreview"`        //app数据导出-预览数据
-	toOrderDetail     xweb.Mapper `xweb:"/jyapp/front/dataExport/toOrderDetail"`     //订单详情
+    *xweb.Action
+    searchExport      xweb.Mapper `xweb:"/jyapp/front/dataExport/searchExport"`      //app数据导出
+    toCreateOrderPage xweb.Mapper `xweb:"/jyapp/front/dataExport/toCreateOrderPage"` //app数据导出-订单支付
+    sendMailVerify    xweb.Mapper `xweb:"/jyapp/front/dataExport/sendMailVerify"`    //发送邮箱验证码
+    checkMailVerify   xweb.Mapper `xweb:"/jyapp/front/dataExport/checkMailVerify"`   //验证邮箱验证码
+    checkPhoneVerify  xweb.Mapper `xweb:"/jyapp/front/dataExport/checkPhoneVerify"`  //验证手机号
+    previewData       xweb.Mapper `xweb:"/jyapp/front/dataExport/previewData/(.*)"`  //app数据导出-数据预览页面
+    getPreview        xweb.Mapper `xweb:"/jyapp/front/dataExport/getPreview"`        //app数据导出-预览数据
+    toOrderDetail     xweb.Mapper `xweb:"/jyapp/front/dataExport/toOrderDetail"`     //订单详情
 
 }
 
 func init() {
-	xweb.AddAction(&WsDataExport{})
+    xweb.AddAction(&WsDataExport{})
 }
 
 func (w *WsDataExport) GetPreview() error {
-	userId := util.ObjToString(w.GetSession("userId"))
-	if userId == "" {
-		return errors.New("未登录")
-	}
-	_res := make(map[string]interface{})
-	//数据预览每天限制50次
-	incurKey := fmt.Sprintf("PreviewData_%s_%d", w.GetSession("userId"), time.Now().Day())
-	times := util.IntAll(redis.Get("other", incurKey))
-	if times >= 50 {
-		_res["msg"] = "超出预览次数"
-		w.ServeJson(map[string]interface{}{
-			"res": _res,
-		})
-		return nil
-	}
-	if times == 0 {
-		redis.Put("other", incurKey, 1, 24*60*60)
-	} else {
-		redis.Incr("other", incurKey)
-	}
-	_id := encrypt.SE.Decode4Hex(w.GetString("_id"))
-	dataType := w.GetString("dataType")
-	//从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)
-	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)
-	//格式化字段
-	res_screen := dataexport.ScreenData(res, dataType, 20, kws)
-	var EntArr = []string{}
-	if dataType == "2" {
-		for _, v := range res_screen {
-			//高级字段查询且winner不为空
-			if v["s_winner"] != nil && v["s_winner"] != "" {
-				EntArr = append(EntArr, v["s_winner"].(string))
-			}
-		}
-	}
-	list := dataexport.FormatExportData(public.Mgo_Ent, &res_screen, config.Sysconfig["webdomain"].(string), dataType, true)
-	if msgCount > 20000 {
-		msgCount = 20000
-	}
-	_res["data"] = subUrl(list, dataType)
-	_res["dataType"] = dataType
-	_res["total"] = msgCount
-	w.ServeJson(map[string]interface{}{
-		"res": _res,
-	})
-	return nil
+    userId := util.ObjToString(w.GetSession("userId"))
+    if userId == "" {
+        return errors.New("未登录")
+    }
+    _res := make(map[string]interface{})
+    //数据预览每天限制50次
+    incurKey := fmt.Sprintf("PreviewData_%s_%d", w.GetSession("userId"), time.Now().Day())
+    times := util.IntAll(redis.Get("other", incurKey))
+    if times >= 50 {
+        _res["msg"] = "超出预览次数"
+        w.ServeJson(map[string]interface{}{
+            "res": _res,
+        })
+        return nil
+    }
+    if times == 0 {
+        redis.Put("other", incurKey, 1, 24*60*60)
+    } else {
+        redis.Incr("other", incurKey)
+    }
+    _id := encrypt.SE.Decode4Hex(w.GetString("_id"))
+    dataType := w.GetString("dataType")
+    //从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)
+    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)
+    //格式化字段
+    res_screen := dataexport.ScreenData(res, dataType, 20, kws)
+    var EntArr = []string{}
+    if dataType == "2" {
+        for _, v := range res_screen {
+            //高级字段查询且winner不为空
+            if v["s_winner"] != nil && v["s_winner"] != "" {
+                EntArr = append(EntArr, v["s_winner"].(string))
+            }
+        }
+    }
+    list := dataexport.FormatExportData(public.Mgo_Ent, &res_screen, config.Sysconfig["webdomain"].(string), dataType, true)
+    if msgCount > 20000 {
+        msgCount = 20000
+    }
+    _res["data"] = subUrl(list, dataType)
+    _res["dataType"] = dataType
+    _res["total"] = msgCount
+    w.ServeJson(map[string]interface{}{
+        "res": _res,
+    })
+    return nil
 }
 
 // 发送邮件
 func (w *WsDataExport) SendMailVerify() {
-	email := w.GetString("email")
-	if isEmail(email) {
-		var email_used = true
-		if email != w.GetSession("DataExportVerifyEmail") {
-			w.DelSession("CreatEVerifyTime")
-			//			openid := util.ObjToString(w.GetSession("s_m_openid"))
-			userId := util.ObjToString(w.GetSession("userId"))
-			emails := public.Mysql.FindOne("dataexport_order", map[string]interface{}{
-				"user_mail": email,
-				"user_id":   userId,
-			}, "user_mail", "")
-			if emails != nil && util.ObjToString((*emails)["user_mail"]) != "" {
-				email_used = false
-				w.T["success"] = true
-				w.T["errCode"] = 4
-				w.T["errMsg"] = "此邮箱已被验证"
-				w.SetSession("DataExportVerifyEmail_val", email)
-				w.SetSession("EMVerifySucess", true)
-			}
-		}
-		if email_used {
-			lastSendDEVerify := util.Int64All(w.GetSession("CreatEVerifyTime"))
-			timeSpaceing := lastSendDEVerify - time.Now().Unix() + 60*5
-			incurKey := fmt.Sprintf("SendEmail_%s_%d", w.GetSession("userId"), time.Now().Day())
-			if lastSendDEVerify == 0 || timeSpaceing < 0 {
-				//每日限制10次
-				times := util.IntAll(redis.Get("other", incurKey))
-				if times < 10 {
-					if times == 0 {
-						redis.Put("other", incurKey, 1, 24*60*60)
-					} else {
-						redis.Incr("other", incurKey)
-					}
-					//生成随机数
-					verifyStr := strings.ToUpper(util.GetComplexRandom(6, 3, 3))
-					w.SetSession("EMVerifySucess", false)
-					w.SetSession("DataExportVerifyEmail", email)
-					w.SetSession("DataExportVerify", verifyStr)
-					w.SetSession("CreatEVerifyTime", time.Now().Unix())
-					log.Println("====================", verifyStr, "====================", w.GetSession("DataExportVerify"))
-					//发送邮箱验证码
-					go public.SendMailIdentCode(email, verifyStr, config.GmailAuth)
-					w.T["success"] = true
-				} else {
-					w.T["success"] = false
-					w.T["errCode"] = 3
-					w.T["time"] = timeSpaceing
-					w.T["errMsg"] = "验证码发送次数已达到今日上限"
-				}
+    email := w.GetString("email")
+    if isEmail(email) {
+        var email_used = true
+        if email != w.GetSession("DataExportVerifyEmail") {
+            w.DelSession("CreatEVerifyTime")
+            //			openid := util.ObjToString(w.GetSession("s_m_openid"))
+            userId := util.ObjToString(w.GetSession("userId"))
+            emails := public.Mysql.FindOne("dataexport_order", map[string]interface{}{
+                "user_mail": email,
+                "user_id":   userId,
+            }, "user_mail", "")
+            if emails != nil && util.ObjToString((*emails)["user_mail"]) != "" {
+                email_used = false
+                w.T["success"] = true
+                w.T["errCode"] = 4
+                w.T["errMsg"] = "此邮箱已被验证"
+                w.SetSession("DataExportVerifyEmail_val", email)
+                w.SetSession("EMVerifySucess", true)
+            }
+        }
+        if email_used {
+            lastSendDEVerify := util.Int64All(w.GetSession("CreatEVerifyTime"))
+            timeSpaceing := lastSendDEVerify - time.Now().Unix() + 60*5
+            incurKey := fmt.Sprintf("SendEmail_%s_%d", w.GetSession("userId"), time.Now().Day())
+            if lastSendDEVerify == 0 || timeSpaceing < 0 {
+                //每日限制10次
+                times := util.IntAll(redis.Get("other", incurKey))
+                if times < 10 {
+                    if times == 0 {
+                        redis.Put("other", incurKey, 1, 24*60*60)
+                    } else {
+                        redis.Incr("other", incurKey)
+                    }
+                    //生成随机数
+                    verifyStr := strings.ToUpper(util.GetComplexRandom(6, 3, 3))
+                    w.SetSession("EMVerifySucess", false)
+                    w.SetSession("DataExportVerifyEmail", email)
+                    w.SetSession("DataExportVerify", verifyStr)
+                    w.SetSession("CreatEVerifyTime", time.Now().Unix())
+                    log.Println("====================", verifyStr, "====================", w.GetSession("DataExportVerify"))
+                    //发送邮箱验证码
+                    go public.SendMailIdentCode(email, verifyStr, config.GmailAuth)
+                    w.T["success"] = true
+                } else {
+                    w.T["success"] = false
+                    w.T["errCode"] = 3
+                    w.T["time"] = timeSpaceing
+                    w.T["errMsg"] = "验证码发送次数已达到今日上限"
+                }
 
-			} else {
-				w.T["success"] = false
-				w.T["errCode"] = 2
-				w.T["time"] = timeSpaceing
-				w.T["errMsg"] = "已发送,5分钟后再尝试"
-			}
-		}
-	} else {
-		w.T["success"] = false
-		w.T["errCode"] = 1
-		w.T["errMsg"] = "邮箱格式不正确"
-	}
-	w.ServeJson(&w.T)
+            } else {
+                w.T["success"] = false
+                w.T["errCode"] = 2
+                w.T["time"] = timeSpaceing
+                w.T["errMsg"] = "已发送,5分钟后再尝试"
+            }
+        }
+    } else {
+        w.T["success"] = false
+        w.T["errCode"] = 1
+        w.T["errMsg"] = "邮箱格式不正确"
+    }
+    w.ServeJson(&w.T)
 }
 
 // 验证手机号
 func (w *WsDataExport) CheckPhoneVerify() {
-	phone := w.GetString("phone")
-	verityResult := false
-	if isPhone(phone) {
-		verityResult = true
-		w.SetSession("DataExportVerifyPhone", phone)
-	}
-	w.T["success"] = verityResult
-	w.ServeJson(&w.T)
+    phone := w.GetString("phone")
+    verityResult := false
+    if isPhone(phone) {
+        verityResult = true
+        w.SetSession("DataExportVerifyPhone", phone)
+    }
+    w.T["success"] = verityResult
+    w.ServeJson(&w.T)
 }
 
 // CheckMailVerify 验证邮箱
 func (w *WsDataExport) CheckMailVerify() {
-	email := w.GetString("email")
-	emailVerity := w.GetString("emailVerity")
+    email := w.GetString("email")
+    emailVerity := w.GetString("emailVerity")
 
-	DataExportEmail := w.GetSession("DataExportVerifyEmail")
-	DataExportVerify := w.GetSession("DataExportVerify")
-	log.Println(email, emailVerity, "---", DataExportEmail, DataExportVerify)
-	verityResult := false
-	if emailVerity != "" && emailVerity == DataExportVerify && email != "" && email == DataExportEmail {
-		verityResult = true
-		w.DelSession("DataExportVerify")
-		w.DelSession("CreatEVerifyTime")
-		w.SetSession("EMVerifySucess", true)
-		w.SetSession("DataExportVerifyEmail_val", DataExportEmail)
-	}
-	w.T["success"] = verityResult
-	w.ServeJson(&w.T)
+    DataExportEmail := w.GetSession("DataExportVerifyEmail")
+    DataExportVerify := w.GetSession("DataExportVerify")
+    log.Println(email, emailVerity, "---", DataExportEmail, DataExportVerify)
+    verityResult := false
+    if emailVerity != "" && emailVerity == DataExportVerify && email != "" && email == DataExportEmail {
+        verityResult = true
+        w.DelSession("DataExportVerify")
+        w.DelSession("CreatEVerifyTime")
+        w.SetSession("EMVerifySucess", true)
+        w.SetSession("DataExportVerifyEmail_val", DataExportEmail)
+    }
+    w.T["success"] = verityResult
+    w.ServeJson(&w.T)
 }
 
 func (w *WsDataExport) PreviewData(_id string) error {
-	userId := util.ObjToString(w.GetSession("userId"))
-	if userId == "" {
-		return errors.New("未登录")
-	}
-	w.T["id"] = _id
-	w.T["dataType"] = w.GetString("dataType")
-	w.T["ttf"] = public.GetFontVersion() + "_" + public.PC
-	return w.Render("/dataExport/dataExport_previewData.html", &w.T)
+    userId := util.ObjToString(w.GetSession("userId"))
+    if userId == "" {
+        return errors.New("未登录")
+    }
+    w.T["id"] = _id
+    w.T["dataType"] = w.GetString("dataType")
+    w.T["ttf"] = public.GetFontVersion() + "_" + public.PC
+    return w.Render("/dataExport/dataExport_previewData.html", &w.T)
 }
 
 func subUrl(list *[]map[string]interface{}, dataType string) *[]map[string]interface{} {
-	for _, v := range *list {
-		//加密截取url
-		href := util.ObjToString(v["href"])
-		url := util.ObjToString(v["url"])
-		if len(url) > 40 { //截取剑鱼标讯地址
-			v["url"] = url[:40] + "*****" + url[len(url)-10:]
-		}
-		if len(href) > 40 { //截取原文地址
-			v["href"] = href[:40] + "*****" + href[len(href)-10:]
-		} else if len(href) > 0 {
-			v["href"] = href[:len(href)*8/10] + "*****"
-		}
-	}
-	var result []map[string]interface{}
-	bytes, marshalErr := json.Marshal(list)
-	if marshalErr != nil {
-		log.Println("数据导出字体混淆errMarshal", marshalErr)
-		return list
-	}
-	//字体混淆
-	hxb := public.GetFontConvertStr(public.ExConf.Font.ConvertVersionDefault, string(bytes), "pc")
-	unmarshalErr := json.Unmarshal([]byte(hxb), &result)
-	if unmarshalErr != nil {
-		log.Println("数据导出字体混淆unmarshalErr", unmarshalErr)
-		return list
-	}
-	return &result
+    for _, v := range *list {
+        //加密截取url
+        href := util.ObjToString(v["href"])
+        url := util.ObjToString(v["url"])
+        if len(url) > 40 { //截取剑鱼标讯地址
+            v["url"] = url[:40] + "*****" + url[len(url)-10:]
+        }
+        if len(href) > 40 { //截取原文地址
+            v["href"] = href[:40] + "*****" + href[len(href)-10:]
+        } else if len(href) > 0 {
+            v["href"] = href[:len(href)*8/10] + "*****"
+        }
+    }
+    var result []map[string]interface{}
+    bytes, marshalErr := json.Marshal(list)
+    if marshalErr != nil {
+        log.Println("数据导出字体混淆errMarshal", marshalErr)
+        return list
+    }
+    //字体混淆
+    hxb := public.GetFontConvertStr(public.ExConf.Font.ConvertVersionDefault, string(bytes), "pc")
+    unmarshalErr := json.Unmarshal([]byte(hxb), &result)
+    if unmarshalErr != nil {
+        log.Println("数据导出字体混淆unmarshalErr", unmarshalErr)
+        return list
+    }
+    return &result
 }
 
 func isEmail(value string) bool {
-	var emailPattern = regexp.MustCompile("^([a-zA-Z0-9_\\-\\.]+)@((\\[[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}\\.)|(([a-zA-Z0-9\\-]+\\.)+))([a-zA-Z]{2,4}|[0-9]{1,3})(\\]?)$")
-	return emailPattern.MatchString(value)
+    var emailPattern = regexp.MustCompile("^([a-zA-Z0-9_\\-\\.]+)@((\\[[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}\\.)|(([a-zA-Z0-9\\-]+\\.)+))([a-zA-Z]{2,4}|[0-9]{1,3})(\\]?)$")
+    return emailPattern.MatchString(value)
 }
 
 func (w *WsDataExport) PaySuccessPage() error {
-	defer util.Catch()
-	w.T["email"] = w.GetString("email")
-	w.T["pay_way"] = w.GetString("pay_way")
-	payTime, _ := strconv.ParseInt(w.GetString("payTime"), 10, 64)
-	w.T["payTime"] = FormatDateByInt64(&payTime, Date_Short_Layout)
-	w.T["orderCode"] = w.GetString("code")
-	return w.Render("/dataExport/dataExport_paySuccess.html", &w.T)
+    defer util.Catch()
+    w.T["email"] = w.GetString("email")
+    w.T["pay_way"] = w.GetString("pay_way")
+    payTime, _ := strconv.ParseInt(w.GetString("payTime"), 10, 64)
+    w.T["payTime"] = FormatDateByInt64(&payTime, Date_Short_Layout)
+    w.T["orderCode"] = w.GetString("code")
+    return w.Render("/dataExport/dataExport_paySuccess.html", &w.T)
 }
 
 // 创建订单页面
 func (w *WsDataExport) ToCreateOrderPage() error {
-	defer util.Catch()
-	id := encrypt.SE.Decode4Hex(w.GetString("id"))
-	userId := util.ObjToString(w.GetSession("userId"))
-	if userId == "" {
-		return errors.New("未登录")
-	}
-	msgCount := dataexport.GetDataExportSearchCountByScdId(public.MQFW, public.Mgo_Bidding, public.DbConf.Mongodb.Bidding.DbName, public.DbConf.Elasticsearch.Main.Address, id)
-	if msgCount > public.ExConf.MsgMaxCount || msgCount == -1 {
-		msgCount = public.ExConf.MsgMaxCount
-	}
-	if msgCount < 1 {
-		return w.Render("/dataExport/404.html", &w.T)
-	}
+    defer util.Catch()
+    id := encrypt.SE.Decode4Hex(w.GetString("id"))
+    userId := util.ObjToString(w.GetSession("userId"))
+    if userId == "" {
+        return errors.New("未登录")
+    }
+    msgCount := dataexport.GetDataExportSearchCountByScdId(public.MQFW, public.Mgo_Bidding, public.DbConf.Mongodb.Bidding.DbName, public.DbConf.Elasticsearch.Main.Address, id)
+    if msgCount > public.ExConf.MsgMaxCount || msgCount == -1 {
+        msgCount = public.ExConf.MsgMaxCount
+    }
+    if msgCount < 1 {
+        return w.Render("/dataExport/404.html", &w.T)
+    }
 
-	resEmail, _ := w.GetSession("DataExportVerifyEmail_val").(string)
-	resPhone, _ := w.GetSession("DataExportVerifyPhone_val").(string)
-	if resEmail != "" {
-		lastSendDEVerify := util.Int64All(w.GetSession("CreatEVerifyTime"))
-		timeSpaceing := lastSendDEVerify - time.Now().Unix() + 60*5
-		w.T["email"] = resEmail
-		w.T["timeSpaceing"] = timeSpaceing
-	}
-	if resPhone != "" {
-		w.T["phone"] = resPhone
-	}
+    resEmail, _ := w.GetSession("DataExportVerifyEmail_val").(string)
+    resPhone, _ := w.GetSession("DataExportVerifyPhone_val").(string)
+    if resEmail != "" {
+        lastSendDEVerify := util.Int64All(w.GetSession("CreatEVerifyTime"))
+        timeSpaceing := lastSendDEVerify - time.Now().Unix() + 60*5
+        w.T["email"] = resEmail
+        w.T["timeSpaceing"] = timeSpaceing
+    }
+    if resPhone != "" {
+        w.T["phone"] = resPhone
+    }
 
-	if resEmail == "" || resPhone == "" {
-		lastEmail, lastPhone := "", ""
-		if lastPhone, lastEmail = dataexport.GetLastExportPhoneAndMail(public.Mysql, userId, util.ObjToString(w.GetSession("entUserId"))); lastPhone == "" || lastEmail == "" {
-			userData, _ := mongodb.FindById("user", 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 != "" {
-			w.T["email"] = lastEmail
-			w.SetSession("EMVerifySucess", true)
-			w.SetSession("DataExportVerifyEmail_val", lastEmail)
-		}
+    if resEmail == "" || resPhone == "" {
+        lastEmail, lastPhone := "", ""
+        if lastPhone, lastEmail = dataexport.GetLastExportPhoneAndMail(public.Mysql, userId, util.ObjToString(w.GetSession("entUserId"))); lastPhone == "" || lastEmail == "" {
+            userData, _ := mongodb.FindById("user", 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 != "" {
+            w.T["email"] = lastEmail
+            w.SetSession("EMVerifySucess", true)
+            w.SetSession("DataExportVerifyEmail_val", lastEmail)
+        }
 
-		if resPhone == "" && lastPhone != "" {
-			w.SetSession("DataExportVerifyPhone_val", lastPhone)
-			w.T["phone"] = lastPhone
-		}
-	}
-	//支付方式
-	payway := w.GetString("payway")
-	if payway != "" {
-		w.T["payway"] = payway
-	}
-	//字段包
-	spec := w.GetString("dataspec")
-	if spec != "" {
-		w.T["dataspec"] = spec
-	}
-	w.T["_id"] = w.GetString("id")
-	w.T["msgCount"] = msgCount                                                             //信息总量
-	incurKey := fmt.Sprintf("PreviewData_%s_%d", w.GetSession("userId"), time.Now().Day()) //每日限制预览次数
-	w.T["PreviewData"] = util.IntAll(redis.Get("other", incurKey))
+        if resPhone == "" && lastPhone != "" {
+            w.SetSession("DataExportVerifyPhone_val", lastPhone)
+            w.T["phone"] = lastPhone
+        }
+    }
+    //支付方式
+    payway := w.GetString("payway")
+    if payway != "" {
+        w.T["payway"] = payway
+    }
+    //字段包
+    spec := w.GetString("dataspec")
+    if spec != "" {
+        w.T["dataspec"] = spec
+    }
+    w.T["_id"] = w.GetString("id")
+    w.T["msgCount"] = msgCount                                                             //信息总量
+    incurKey := fmt.Sprintf("PreviewData_%s_%d", w.GetSession("userId"), time.Now().Day()) //每日限制预览次数
+    w.T["PreviewData"] = util.IntAll(redis.Get("other", incurKey))
 
-	w.Render("/dataExport/dataExport_payOrder.html", &w.T)
-	return nil
+    w.Render("/dataExport/dataExport_payOrder.html", &w.T)
+    return nil
 }
 
 func isPhone(value string) bool {
-	var phonePattern = regexp.MustCompile("^[1][3-9][0-9]{9}$")
-	return phonePattern.MatchString(value)
+    var phonePattern = regexp.MustCompile("^[1][3-9][0-9]{9}$")
+    return phonePattern.MatchString(value)
 }
 
 // 微信数据导出
 func (wd *WsDataExport) SearchExport() error {
-	openid := util.ObjToString(wd.GetSession("s_m_openid"))
-	userId := util.ObjToString(wd.GetSession("userId"))
-	if userId == "" {
-		return errors.New("未登录")
-	}
-	//接收超级搜索页面参数
-	reqData := public.BidSearchExport{
-		Keywords:     wd.GetString("searchvalue"),                  //搜索词
-		Publishtime:  wd.GetString("publishtime"),                  //发布时间
-		Area:         wd.GetString("scope"),                        //地区
-		Subtype:      wd.GetString("subtype"),                      //信息类型
-		Minprice:     wd.GetString("minprice"),                     //最低价格
-		Maxprice:     wd.GetString("maxprice"),                     //最高价格
-		Industry:     strings.TrimSpace(wd.GetString("industry")),  //选中的行业
-		SelectType:   wd.GetString("selectType"),                   //标题 or 全文
-		Buyerclass:   wd.GetString("buyerclass"),                   //采购单位行业
-		Winner:       wd.GetString("winner"),                       //中标单位
-		Hasbuyertel:  wd.GetString("buyertel"),                     //是否有采购电话
-		Haswinnertel: wd.GetString("winnertel"),                    //是否有中标电话
-		SelectIds:    strings.TrimSpace(wd.GetString("selectIds")), //选择信息id
-		Notkey:       wd.GetString("notkey"),                       //排除词
-		City:         wd.GetString("city"),                         //城市
-		FileExists:   wd.GetString("fileExists"),                   //有无附件
-	}
+    openid := util.ObjToString(wd.GetSession("s_m_openid"))
+    userId := util.ObjToString(wd.GetSession("userId"))
+    if userId == "" {
+        return errors.New("未登录")
+    }
+    //接收超级搜索页面参数
+    reqData := public.BidSearchExport{
+        Keywords:     wd.GetString("searchvalue"),                  //搜索词
+        Publishtime:  wd.GetString("publishtime"),                  //发布时间
+        Area:         wd.GetString("scope"),                        //地区
+        Subtype:      wd.GetString("subtype"),                      //信息类型
+        Minprice:     wd.GetString("minprice"),                     //最低价格
+        Maxprice:     wd.GetString("maxprice"),                     //最高价格
+        Industry:     strings.TrimSpace(wd.GetString("industry")),  //选中的行业
+        SelectType:   wd.GetString("selectType"),                   //标题 or 全文
+        Buyerclass:   wd.GetString("buyerclass"),                   //采购单位行业
+        Winner:       wd.GetString("winner"),                       //中标单位
+        Hasbuyertel:  wd.GetString("buyertel"),                     //是否有采购电话
+        Haswinnertel: wd.GetString("winnertel"),                    //是否有中标电话
+        SelectIds:    strings.TrimSpace(wd.GetString("selectIds")), //选择信息id
+        Notkey:       wd.GetString("notkey"),                       //排除词
+        City:         wd.GetString("city"),                         //城市
+        FileExists:   wd.GetString("fileExists"),                   //有无附件
+    }
+    saveData := reqData.PassBidSearchExport(config.Sysconfig)
+    saveData["selectType"] = strings.Join(jy.GetVipState(wd.Session(), *config.Middleground, userId).
+        GetQueryItems(wd.GetString("selectType"), util.Int64All(config.Sysconfig["bidSearchOldUserLimit"])), ",")
+    saveData["s_openid"] = openid
+    saveData["s_userid"] = userId
+    saveData["comeinfrom"] = "supersearchPage"
+    region := util.If(reqData.Area == "全国", "", reqData.Area).(string)
+    if region != "" && reqData.City != "" {
+        region += "," + reqData.City
+    } else {
+        region = reqData.City
+    }
+    saveData["region"] = strings.Split(region, ",")
+    //是否开启 正文 标题同时搜索只搜正文的开关
+    saveData["searchTypeSwitch"], _ = config.Sysconfig["searchTypeSwitch"].(bool)
+    //存入数据库
+    _id := mongodb.Save(dataexport.ExportTable, saveData)
 
-	saveData := reqData.PassBidSearchExport(config.Sysconfig)
-	etcdMap := config.Sysconfig["etcd"].(map[string]interface{})
-	saveData["selectType"] = strings.Join(jy.GetVipState("10000", wd.Session(), util.InterfaceToStr(etcdMap["hosts"]), util.InterfaceToStr(etcdMap["key"]), userId).
-		GetQueryItems(wd.GetString("selectType"), util.Int64All(config.Sysconfig["bidSearchOldUserLimit"])), ",")
-	saveData["s_openid"] = openid
-	saveData["s_userid"] = userId
-	saveData["comeinfrom"] = "supersearchPage"
-	region := util.If(reqData.Area == "全国", "", reqData.Area).(string)
-	if region != "" && reqData.City != "" {
-		region += "," + reqData.City
-	} else {
-		region = reqData.City
-	}
-	saveData["region"] = strings.Split(region, ",")
-	//是否开启 正文 标题同时搜索只搜正文的开关
-	saveData["searchTypeSwitch"], _ = config.Sysconfig["searchTypeSwitch"].(bool)
-	//存入数据库
-	_id := mongodb.Save(dataexport.ExportTable, saveData)
-
-	wd.ServeJson(bson.M{"_id": encrypt.SE.Encode2Hex(_id)})
-	return nil
+    wd.ServeJson(bson.M{"_id": encrypt.SE.Encode2Hex(_id)})
+    return nil
 }
 
 func (m *WsDataExport) ToOrderDetail() error {
-	userId := m.Session().Get("userId")
-	if userId == nil || userId == "" {
-		return m.Redirect("/jyapp/free/login")
-	}
-	orderCode := m.GetString("orderCode")
-	orderDetail := map[string]interface{}{}
-	filter := dataexport.SieveCondition{}
-	queryMap := map[string]interface{}{
-		"order_code": orderCode,
-		"user_id":    userId,
-	}
-	if orderCode != "" {
-		orderDetail = *public.Mysql.FindOne(tableName_order, queryMap, "", "")
-	}
-	orderDetail["order_code"] = orderCode
-	if orderDetail["pay_money"] != nil {
-		orderDetail["pay_money"] = float64(orderDetail["pay_money"].(int64)) / 100
-	}
-	if orderDetail["order_money"] != nil {
-		orderDetail["order_money"] = float64(orderDetail["order_money"].(int64)) / 100
-	}
-	if orderDetail["pay_time"] != nil {
-		pay_time := strings.Replace(orderDetail["pay_time"].(string), "-", ".", -1)
-		orderDetail["pay_time"] = pay_time
-	}
-	if orderDetail["create_time"] != nil {
-		create_time := strings.Replace(orderDetail["create_time"].(string), "-", ".", -1)
-		orderDetail["create_time"] = create_time
-	}
-	if orderDetail["filter"] != nil {
-		err := json.Unmarshal([]byte(orderDetail["filter"].(string)), &filter)
-		if err == nil {
-			publishtime := filter.PublishTime
-			if publishtime != "" {
-				timeArr := strings.Split(publishtime, "_")
-				if len(timeArr) == 2 {
-					start, err := strconv.ParseInt(timeArr[0], 10, 64)
-					end, erro := strconv.ParseInt(timeArr[1], 10, 64)
-					//可能出现只选择一个时间
-					if err == nil && erro == nil {
-						filter.PublishTime = FormatDateByInt64(&start, layout_date) + "-" + FormatDateByInt64(&end, layout_date)
-					} else if err != nil && erro == nil {
-						filter.PublishTime = "-" + FormatDateByInt64(&end, layout_date)
-					} else if err == nil && erro != nil {
-						filter.PublishTime = FormatDateByInt64(&start, layout_date) + "-"
-					}
-				}
-			}
-			filter.MinPrice = public.GetPriceDes_SieveCondition(filter.MinPrice, filter.MaxPrice)
-			orderDetail["filter"] = filter
-		} else {
-			log.Println("筛选条件-关键词-结构体反序列化-错误", err)
-		}
-	}
-	if orderDetail["applybill_type"] != nil && orderDetail["applybill_type"].(int64) == 0 {
-		orderDetail["applybill_type"] = "个人"
-	} else if orderDetail["applybill_type"] != nil && orderDetail["applybill_type"].(int64) == 1 {
-		orderDetail["applybill_type"] = "单位"
-	} else {
-		orderDetail["applybill_type"] = "-"
-	}
-	if orderDetail["applybill_status"] != nil && orderDetail["applybill_status"].(int64) == 1 {
-		orderDetail["applybill_status"] = "T" //已申请
-	} else {
-		orderDetail["applybill_status"] = "F" //未申请
-	}
-	//加密
-	if orderDetail["filter_id"] != nil {
-		orderDetail["filter_id"] = encrypt.SE.Encode2Hex(orderDetail["filter_id"].(string))
-	}
-	//卡卷id加密
-	if orderDetail["d_relation_id"] != "" {
-		orderDetail["userLotteryId"] = encrypt.SE.Encode2Hex(util.ObjToString(orderDetail["d_relation_id"]))
-	}
-	delete(orderDetail, "d_relation_id")
-	orderStatus := util.IntAll((orderDetail)["order_status"])
-	orderDetail["order_status"] = orderStatus
-	log.Println((orderDetail)["order_status"], "---", orderStatus, "---", orderDetail["order_status"])
-	if orderStatus == 1 {
-		orderDetail["transaction_id"] = func() string {
-			table := ""
-			// 0微信支付 1支付宝支付
-			if util.ObjToString(orderDetail["pay_way"]) == "wx_pc" || util.ObjToString(orderDetail["pay_way"]) == "wx_js" || util.ObjToString(orderDetail["pay_way"]) == "wx_app" {
-				table = "weixin_pay"
-				orderDetail["pay_way"] = "wx"
-			} else if util.ObjToString(orderDetail["pay_way"]) == "ali_pc" || util.ObjToString(orderDetail["pay_way"]) == "ali_app" {
-				orderDetail["pay_way"] = "ali"
-				table = "ali_pay"
-			} else {
-				return ""
-			}
-			wxPayMap := map[string]interface{}{}
-			wxPayMap["out_trade_no"] = orderDetail["out_trade_no"]
-			wxpay := public.Mysql.FindOne(table, wxPayMap, "", "")
-			if wxpay == nil {
-				return ""
-			}
-			return util.ObjToString((*wxpay)["transaction_id"])
-		}()
-	}
-	m.T["o"] = orderDetail
-	return m.Render("/dataExport/dataExport_toOrderDetail.html", &m.T)
+    userId := m.Session().Get("userId")
+    if userId == nil || userId == "" {
+        return m.Redirect("/jyapp/free/login")
+    }
+    orderCode := m.GetString("orderCode")
+    orderDetail := map[string]interface{}{}
+    filter := dataexport.SieveCondition{}
+    queryMap := map[string]interface{}{
+        "order_code": orderCode,
+        "user_id":    userId,
+    }
+    if orderCode != "" {
+        orderDetail = *public.Mysql.FindOne(tableName_order, queryMap, "", "")
+    }
+    orderDetail["order_code"] = orderCode
+    if orderDetail["pay_money"] != nil {
+        orderDetail["pay_money"] = float64(orderDetail["pay_money"].(int64)) / 100
+    }
+    if orderDetail["order_money"] != nil {
+        orderDetail["order_money"] = float64(orderDetail["order_money"].(int64)) / 100
+    }
+    if orderDetail["pay_time"] != nil {
+        pay_time := strings.Replace(orderDetail["pay_time"].(string), "-", ".", -1)
+        orderDetail["pay_time"] = pay_time
+    }
+    if orderDetail["create_time"] != nil {
+        create_time := strings.Replace(orderDetail["create_time"].(string), "-", ".", -1)
+        orderDetail["create_time"] = create_time
+    }
+    if orderDetail["filter"] != nil {
+        err := json.Unmarshal([]byte(orderDetail["filter"].(string)), &filter)
+        if err == nil {
+            publishtime := filter.PublishTime
+            if publishtime != "" {
+                timeArr := strings.Split(publishtime, "_")
+                if len(timeArr) == 2 {
+                    start, err := strconv.ParseInt(timeArr[0], 10, 64)
+                    end, erro := strconv.ParseInt(timeArr[1], 10, 64)
+                    //可能出现只选择一个时间
+                    if err == nil && erro == nil {
+                        filter.PublishTime = FormatDateByInt64(&start, layout_date) + "-" + FormatDateByInt64(&end, layout_date)
+                    } else if err != nil && erro == nil {
+                        filter.PublishTime = "-" + FormatDateByInt64(&end, layout_date)
+                    } else if err == nil && erro != nil {
+                        filter.PublishTime = FormatDateByInt64(&start, layout_date) + "-"
+                    }
+                }
+            }
+            filter.MinPrice = public.GetPriceDes_SieveCondition(filter.MinPrice, filter.MaxPrice)
+            orderDetail["filter"] = filter
+        } else {
+            log.Println("筛选条件-关键词-结构体反序列化-错误", err)
+        }
+    }
+    if orderDetail["applybill_type"] != nil && orderDetail["applybill_type"].(int64) == 0 {
+        orderDetail["applybill_type"] = "个人"
+    } else if orderDetail["applybill_type"] != nil && orderDetail["applybill_type"].(int64) == 1 {
+        orderDetail["applybill_type"] = "单位"
+    } else {
+        orderDetail["applybill_type"] = "-"
+    }
+    if orderDetail["applybill_status"] != nil && orderDetail["applybill_status"].(int64) == 1 {
+        orderDetail["applybill_status"] = "T" //已申请
+    } else {
+        orderDetail["applybill_status"] = "F" //未申请
+    }
+    //加密
+    if orderDetail["filter_id"] != nil {
+        orderDetail["filter_id"] = encrypt.SE.Encode2Hex(orderDetail["filter_id"].(string))
+    }
+    //卡卷id加密
+    if orderDetail["d_relation_id"] != "" {
+        orderDetail["userLotteryId"] = encrypt.SE.Encode2Hex(util.ObjToString(orderDetail["d_relation_id"]))
+    }
+    delete(orderDetail, "d_relation_id")
+    orderStatus := util.IntAll((orderDetail)["order_status"])
+    orderDetail["order_status"] = orderStatus
+    log.Println((orderDetail)["order_status"], "---", orderStatus, "---", orderDetail["order_status"])
+    if orderStatus == 1 {
+        orderDetail["transaction_id"] = func() string {
+            table := ""
+            // 0微信支付 1支付宝支付
+            if util.ObjToString(orderDetail["pay_way"]) == "wx_pc" || util.ObjToString(orderDetail["pay_way"]) == "wx_js" || util.ObjToString(orderDetail["pay_way"]) == "wx_app" {
+                table = "weixin_pay"
+                orderDetail["pay_way"] = "wx"
+            } else if util.ObjToString(orderDetail["pay_way"]) == "ali_pc" || util.ObjToString(orderDetail["pay_way"]) == "ali_app" {
+                orderDetail["pay_way"] = "ali"
+                table = "ali_pay"
+            } else {
+                return ""
+            }
+            wxPayMap := map[string]interface{}{}
+            wxPayMap["out_trade_no"] = orderDetail["out_trade_no"]
+            wxpay := public.Mysql.FindOne(table, wxPayMap, "", "")
+            if wxpay == nil {
+                return ""
+            }
+            return util.ObjToString((*wxpay)["transaction_id"])
+        }()
+    }
+    m.T["o"] = orderDetail
+    return m.Render("/dataExport/dataExport_toOrderDetail.html", &m.T)
 }

+ 2 - 2
src/jfw/modules/app/src/app/front/wxkeyset.go

@@ -27,8 +27,8 @@ func (m *Front) WxKeyset(tpl string) error {
 		return m.Redirect("/jyapp/tenderSubscribe/guide?url=" + url.QueryEscape(m.Request.RequestURI))
 	}
 	//到新订阅设置
-	etcdMap := config.Sysconfig["etcd"].(map[string]interface{})
-	vipMsg := jy.GetBigVipUserBaseMsg("10000", m.Session(), util.InterfaceToStr(etcdMap["hosts"]), util.InterfaceToStr(etcdMap["key"]))
+
+	vipMsg := jy.GetBigVipUserBaseMsg( m.Session(),  *config.Middleground)
 	//vipMsg := jy.GetBigVipUserBaseMsg(userid, public.Mysql, public.MQFW)
 	if vipMsg.IsUpgrade {
 		return m.Redirect("/jyapp/vipsubscribe/toSubVipSetPage")

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

@@ -4,7 +4,7 @@ go 1.18
 
 require (
 	app.yhyue.com/moapp/jybase v0.0.0-20230117032034-ad7c00ffe11a
-	app.yhyue.com/moapp/jypkg v0.0.0-20230202083520-858975e007e3
+	app.yhyue.com/moapp/jypkg v0.0.0-20230203012631-e0290a6ef7ff
 	bp.jydev.jianyu360.cn/BaseService/userCenter v0.0.0-20230129060002-f69424aa14ba
 	github.com/SKatiyar/qr v0.0.0-20151201054752-25b6bdf44e67
 	github.com/dchest/captcha v1.0.0

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

@@ -13,8 +13,8 @@ app.yhyue.com/moapp/jybase v0.0.0-20220802080941-07f401baab8b/go.mod h1:HelrO6tc
 app.yhyue.com/moapp/jybase v0.0.0-20230109015757-aa3d5e19b196/go.mod h1:zB47XTeJvpcbtBRYgkQuxOICWNexiZfbUO+7aUf6mNs=
 app.yhyue.com/moapp/jybase v0.0.0-20230117032034-ad7c00ffe11a h1:wD4aWPSYdiX1cIP4lzzPD2s7fYhKa3muIf97l9tonJE=
 app.yhyue.com/moapp/jybase v0.0.0-20230117032034-ad7c00ffe11a/go.mod h1:zB47XTeJvpcbtBRYgkQuxOICWNexiZfbUO+7aUf6mNs=
-app.yhyue.com/moapp/jypkg v0.0.0-20230202083520-858975e007e3 h1:8JwEPCjpV+4XysYMfNnRDVR11MGmtWQsHvx1aHfsDN4=
-app.yhyue.com/moapp/jypkg v0.0.0-20230202083520-858975e007e3/go.mod h1:NrRgv24VIpf/xMMvsGC1EgoD+z6z5ea3MqIVxEcSPhE=
+app.yhyue.com/moapp/jypkg v0.0.0-20230203012631-e0290a6ef7ff h1:pXU7MzCyj6XgjP2wi8ivvwtbrD9q8ZuKTJ4wW7G1Ui4=
+app.yhyue.com/moapp/jypkg v0.0.0-20230203012631-e0290a6ef7ff/go.mod h1:NrRgv24VIpf/xMMvsGC1EgoD+z6z5ea3MqIVxEcSPhE=
 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/BP/jynsq v0.0.0-20220222052708-ebc43af90698/go.mod h1:ojo/AUH9Yr1wzarEjOaNMkj1Cet/9r8IgLyba64Z52E=

+ 0 - 4
src/jfw/modules/bigmember/src/config.json

@@ -177,9 +177,5 @@
   "claim": {
     "details": "https://databi-web.jydev.jianyu360.com/nzj/app/nzj.app/nzj_claim_detail.spg",
     "listPage": "https://databi-web.jydev.jianyu360.com/nzj/app/nzj.app/nzj_claim.spg"
-  },
-  "etcd": {
-    "hosts": "192.168.3.206:27080",
-    "key": "powercheck.rpc"
   }
 }

+ 4 - 0
src/jfw/modules/bigmember/src/config.yaml

@@ -0,0 +1,4 @@
+etcd:
+  hosts:
+  - 127.0.0.1:2379
+powerCheckCenterKey: "powercheck.rpc" #权益校验中台

+ 79 - 75
src/jfw/modules/bigmember/src/config/config.go

@@ -1,95 +1,99 @@
 package config
 
 import (
-        qutil "app.yhyue.com/moapp/jybase/common"
-        "app.yhyue.com/moapp/jybase/mail"
-        "app.yhyue.com/moapp/jypkg/common/src/qfw/util/middleGround"
+    qutil "app.yhyue.com/moapp/jybase/common"
+    "app.yhyue.com/moapp/jybase/mail"
+    "app.yhyue.com/moapp/jypkg/common/src/qfw/util/middleGround"
+    "app.yhyue.com/moapp/jypkg/middleground"
+    "github.com/gogf/gf/v2/frame/g"
+    "github.com/gogf/gf/v2/os/gcfg"
+    "github.com/gogf/gf/v2/os/gctx"
 )
 
 type config struct {
-        WebPort string
-        Mail    []struct {
-                Addr string
-                Port int
-                Pwd  string
-                User string
-        }
-        PortraitPool        int
-        PortraitCacheDay    int
-        PortraitScreenPool  int64
-        RdProLimit          int
-        FollowPushRpc       string
-        FollowEnt           followConfig
-        FollowProject       followConfig
-        AttachmentRPC       string
-        AttachmentMail      string
-        AttachmentMailTitle string
-        ReTry               int
-        Industry            map[string]interface{}
-        KeyMaxLength        int
-        WarnMailbox         []string
-        WarnMbTitle         string
-        TimeSpan            int
-        RegWinner           string
-        OldSubscribeMoveTip int64
-        Customers           []CustomerInfo
-        NewFreeUser         int64          //免费用户 -- 订阅升级新用户
-        FileUploadNum       map[string]int //每月附件下载次数
-        CreatePdfServer     string         //生成pdf文件服务地址
-        PdfServerPoor       int            //生成pdf线程数量控制
-        PdfDataApiWhiteList []string       //pdf数据接口白名单
-        MainWebDomain       string         //附件剑鱼地址
-        marketAnalysisPool  int
-        MarketAnalysisPool  struct {
-                Limit           int `json:"limit"`           //查询并发池
-                TimeOut         int `json:"timeOut"`         //并发池等待超时时长,单位秒
-                ProjectNumLimit int `json:"projectNumLimit"` //自定义报告限制项目个数
-        } `json:"marketAnalysisPool"` //市场分析
-        ForecastTime   int //中标预测结果redis 缓存时间
-        IsAddCacheTime int //isadd 接口数据存储时间 + 120 内随机数
-        IsAddUrls      struct {
-                Free      []string `json:"free"`
-                Vip       []string `json:"vip"`
-                BigMember []string `json:"bigMember"`
-                EntNiche  []string `json:"entNiche"`
-        }
-        PotentialSwitch       bool `json:"potentialSwitch"`       //潜在客户 潜在竞争对手 新逻辑开关
-        PortraitEntnicheCount int  `json:"portraitEntnicheCount"` //商机管理 默认画像每月权限次数
+    WebPort string
+    Mail    []struct {
+        Addr string
+        Port int
+        Pwd  string
+        User string
+    }
+    PortraitPool        int
+    PortraitCacheDay    int
+    PortraitScreenPool  int64
+    RdProLimit          int
+    FollowPushRpc       string
+    FollowEnt           followConfig
+    FollowProject       followConfig
+    AttachmentRPC       string
+    AttachmentMail      string
+    AttachmentMailTitle string
+    ReTry               int
+    Industry            map[string]interface{}
+    KeyMaxLength        int
+    WarnMailbox         []string
+    WarnMbTitle         string
+    TimeSpan            int
+    RegWinner           string
+    OldSubscribeMoveTip int64
+    Customers           []CustomerInfo
+    NewFreeUser         int64          //免费用户 -- 订阅升级新用户
+    FileUploadNum       map[string]int //每月附件下载次数
+    CreatePdfServer     string         //生成pdf文件服务地址
+    PdfServerPoor       int            //生成pdf线程数量控制
+    PdfDataApiWhiteList []string       //pdf数据接口白名单
+    MainWebDomain       string         //附件剑鱼地址
+    marketAnalysisPool  int
+    MarketAnalysisPool  struct {
+        Limit           int `json:"limit"`           //查询并发池
+        TimeOut         int `json:"timeOut"`         //并发池等待超时时长,单位秒
+        ProjectNumLimit int `json:"projectNumLimit"` //自定义报告限制项目个数
+    } `json:"marketAnalysisPool"` //市场分析
+    ForecastTime   int //中标预测结果redis 缓存时间
+    IsAddCacheTime int //isadd 接口数据存储时间 + 120 内随机数
+    IsAddUrls      struct {
+        Free      []string `json:"free"`
+        Vip       []string `json:"vip"`
+        BigMember []string `json:"bigMember"`
+        EntNiche  []string `json:"entNiche"`
+    }
+    PotentialSwitch       bool `json:"potentialSwitch"`       //潜在客户 潜在竞争对手 新逻辑开关
+    PortraitEntnicheCount int  `json:"portraitEntnicheCount"` //商机管理 默认画像每月权限次数
 
-        Claim struct {
-                Details  string `json:"details"`
-                ListPage string `json:"listPage"`
-        } `json:"claim"`
-        Etcd struct {
-                Hosts  string `json:"hosts"`
-                Key string `json:"key"`
-        } `json:"etcd"`
+    Claim struct {
+        Details  string `json:"details"`
+        ListPage string `json:"listPage"`
+    } `json:"claim"`
 }
 
 type CustomerInfo struct {
-        Name   string `json:"name"`
-        Wxer   string `json:"wxer"`
-        Remark string `json:"remark"`
+    Name   string `json:"name"`
+    Wxer   string `json:"wxer"`
+    Remark string `json:"remark"`
 }
 type followConfig struct {
-        Normal int
-        BigVip int
+    Normal int
+    BigVip int
 }
 
 var Config *config
 var GmailAuth []*mail.GmailAuth
+var Middleground *middleground.Middleground
 
 func init() {
-        //程序配置文件
-        qutil.ReadConfig(&Config)
-        qutil.ReadConfig("./baseApi.json", &middleGround.JyApiConfig) //初始化中台请求接口
-        for _, v := range Config.Mail {
-                mail := &mail.GmailAuth{
-                        SmtpHost: v.Addr,
-                        SmtpPort: v.Port,
-                        User:     v.User,
-                        Pwd:      v.Pwd,
-                }
-                GmailAuth = append(GmailAuth, mail)
+    //程序配置文件
+    qutil.ReadConfig(&Config)
+    qutil.ReadConfig("./baseApi.json", &middleGround.JyApiConfig) //初始化中台请求接口
+    for _, v := range Config.Mail {
+        mail := &mail.GmailAuth{
+            SmtpHost: v.Addr,
+            SmtpPort: v.Port,
+            User:     v.User,
+            Pwd:      v.Pwd,
         }
+        GmailAuth = append(GmailAuth, mail)
+    }
+    g.Cfg().GetAdapter().(*gcfg.AdapterFile).SetFileName("config.yaml")
+    var ctx = gctx.New()
+    Middleground = middleground.NewMiddleground(g.Cfg().MustGet(ctx, "etcd.hosts").Strings()).RegUserCenter(g.Cfg().MustGet(ctx, "userCenterKey").String()).RegPowerCheckCenter(g.Cfg().MustGet(ctx, "powerCheckKey").String())
 }

+ 1 - 1
src/jfw/modules/bigmember/src/entity/claimCommon.go

@@ -22,7 +22,7 @@ func ClaimPermissions(session *httpsession.Session) (*ProjectClaim, error) {
 	if userid == "" {
 		return nil, errors.New("未登录")
 	}
-	bigMsg := jy.GetBigVipUserBaseMsg("10000", session, config.Config.Etcd.Hosts, config.Config.Etcd.Key)
+	bigMsg := jy.GetBigVipUserBaseMsg( session, *config.Middleground)
 	if bigMsg.Status <= 0 {
 		return nil, errors.New("无权益")
 	} else {

+ 1 - 1
src/jfw/modules/bigmember/src/entity/followEnterprise.go

@@ -33,7 +33,7 @@ func CreateEntFollowManager(session *httpsession.Session, pageFlag ...string) (*
 	if userid == "" {
 		return nil, errors.New("未登录")
 	}
-	bigMsg := jy.GetBigVipUserBaseMsg("10000", session, config.Config.Etcd.Hosts, config.Config.Etcd.Key)
+	bigMsg := jy.GetBigVipUserBaseMsg( session, *config.Middleground)
 	defaultPageFlag := "entFollow"
 	if len(pageFlag) > 0 {
 		defaultPageFlag = pageFlag[0]

+ 1 - 1
src/jfw/modules/bigmember/src/entity/followProject.go

@@ -28,7 +28,7 @@ func CreateProjectFollowManager(session *httpsession.Session, mustBuy ...bool) (
 	if userid == "" {
 		return nil, errors.New("未登录")
 	}
-	bigMsg := jy.GetBigVipUserBaseMsg("10000", session, config.Config.Etcd.Hosts, config.Config.Etcd.Key)
+	bigMsg := jy.GetBigVipUserBaseMsg( session, *config.Middleground)
 
 	isBuy := bigMsg.CheckBigVipBackPower("followProject")
 	if len(mustBuy) > 0 && !isBuy {

+ 3 - 3
src/jfw/modules/bigmember/src/entity/portrait.go

@@ -31,7 +31,7 @@ func CreatePortraitManager(session *httpsession.Session, pageFlag string) (*Port
 	if userid == "" {
 		return nil, false, errors.New("未登录"), true
 	}
-	bigMsg := jy.GetBigVipUserBaseMsg("10000", session, config.Config.Etcd.Hosts, config.Config.Etcd.Key)
+	bigMsg := jy.GetBigVipUserBaseMsg( session, *config.Middleground)
 	if pageFlag == "" {
 		return nil, false, errors.New("未知请求"), true
 	}
@@ -70,7 +70,7 @@ func CreatePortraitManagerForContacts(session *httpsession.Session, entType int6
 	if entName == "" {
 		return nil, errors.New("参数异常")
 	}
-	bigMsg := jy.GetBigVipUserBaseMsg("10000", session, config.Config.Etcd.Hosts, config.Config.Etcd.Key)
+	bigMsg := jy.GetBigVipUserBaseMsg( session, *config.Middleground)
 
 	//0:采购单位;1:中标企业
 	switch entType {
@@ -123,7 +123,7 @@ func CreateSubVipPortraitManager(userid string, pageFlag, searchValue string, is
 		return nil, -1, errors.New("未知请求"), true
 	}
 	if pageFlag != "entDetail" { //需要权限校验的接口
-		bigMsg := jy.GetBigVipUserBaseMsg("10000", session, config.Config.Etcd.Hosts, config.Config.Etcd.Key)
+		bigMsg := jy.GetBigVipUserBaseMsg( session, *config.Middleground)
 
 		if bigMsg.VipStatus <= 0 || bigMsg.Vip_BuySet.Upgrade != 1 { //免费用户留资体验
 			if searchValue != "" && jy.Portraitexperience(userid, searchValue, isWinner) {

+ 1 - 1
src/jfw/modules/bigmember/src/entity/trial.go

@@ -10,7 +10,7 @@ import (
 
 func GetUserTrialInfoById(session *httpsession.Session) map[string]interface{} {
 	var res = map[string]interface{}{}
-	BigMsg := jy.GetBigVipUserBaseMsg("10000", session, config.Config.Etcd.Hosts, config.Config.Etcd.Key)
+	BigMsg := jy.GetBigVipUserBaseMsg( session, *config.Middleground)
 	userId := qutil.ObjToString(session.Get("userId"))
 	if BigMsg != nil {
 		//i_member_status:4 正在试用 ;i_member_trial:1是试用过;同时满足:当前试用阶段

+ 38 - 38
src/jfw/modules/bigmember/src/filter/sessionfilter.go

@@ -1,57 +1,57 @@
 package filter
 
 import (
-	"jy/src/jfw/modules/bigmember/src/config"
-	"jy/src/jfw/modules/bigmember/src/db"
-	"net/http"
-	"regexp"
+    "jy/src/jfw/modules/bigmember/src/config"
+    "jy/src/jfw/modules/bigmember/src/db"
+    "net/http"
+    "regexp"
 
-	. "app.yhyue.com/moapp/jybase/api"
-	util "app.yhyue.com/moapp/jybase/common"
-	"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/jypkg/common/src/qfw/util/jy"
 
-	"app.yhyue.com/moapp/jybase/go-xweb/xweb"
+    "app.yhyue.com/moapp/jybase/go-xweb/xweb"
 )
 
 //登录限制
 type sessionfilter struct {
-	App *xweb.App
+    App *xweb.App
 }
 
 //需要权限判断的地址
 var needReg = regexp.MustCompile("^/bigmember/(potential|forecast|decision|analysis|subscribe)/.+$") //画像接口中判断权限
 
 func init() {
-	jy.InitBigVipService(db.Mysql)
+    jy.InitBigVipService(db.Mysql)
 }
 
 func (l *sessionfilter) Do(w http.ResponseWriter, req *http.Request) bool {
-	session := l.App.SessionManager.Session(req, w)
-	getSession := session.GetMultiple()
-	if getSession["userId"] != nil && getSession["mgoUserId"] == nil && util.Int64All(getSession["positionType"]) == 0 {
-		session.Set("mgoUserId", getSession["userId"])
-	}
-	match := needReg.FindStringSubmatch(req.URL.Path)
-	if len(match) == 0 {
-		return true
-	}
-	//免费用户搜索词订阅接口开放
-	if req.URL.Path == "/bigmember/subscribe/freeUser/searchSubscribe" || req.URL.Path == "/bigmember/subscribe/freeUser/subscribeSearch" {
-		return true
-	}
-	userId, ok := getSession["userId"].(string)
-	if !ok || userId == "" {
-		R.ServeJson(w, req, &Result{Error_code_1004, Error_msg_1004, nil})
-		return false
-	}
-	//投标决策分析前置接口开放
-	if req.URL.Path == "/bigmember/decision/freeDecInfo" || req.URL.Path == "/bigmember/analysis/projectName" || req.URL.Path == "/bigmember/analysis/projectInfo" || req.URL.Path == "/bigmember/project/getPdfDetail" {
-		return true
-	}
-	bigMeg := jy.GetBigVipUserBaseMsg("10000", session, config.Config.Etcd.Key, config.Config.Etcd.Key)
-	if !bigMeg.CheckBigVipBackPower(match[1]) {
-		R.ServeJson(w, req, &Result{Error_code_1004, Error_msg_1004, nil})
-		return false
-	}
-	return true
+    session := l.App.SessionManager.Session(req, w)
+    getSession := session.GetMultiple()
+    if getSession["userId"] != nil && getSession["mgoUserId"] == nil && util.Int64All(getSession["positionType"]) == 0 {
+        session.Set("mgoUserId", getSession["userId"])
+    }
+    match := needReg.FindStringSubmatch(req.URL.Path)
+    if len(match) == 0 {
+        return true
+    }
+    //免费用户搜索词订阅接口开放
+    if req.URL.Path == "/bigmember/subscribe/freeUser/searchSubscribe" || req.URL.Path == "/bigmember/subscribe/freeUser/subscribeSearch" {
+        return true
+    }
+    userId, ok := getSession["userId"].(string)
+    if !ok || userId == "" {
+        R.ServeJson(w, req, &Result{Error_code_1004, Error_msg_1004, nil})
+        return false
+    }
+    //投标决策分析前置接口开放
+    if req.URL.Path == "/bigmember/decision/freeDecInfo" || req.URL.Path == "/bigmember/analysis/projectName" || req.URL.Path == "/bigmember/analysis/projectInfo" || req.URL.Path == "/bigmember/project/getPdfDetail" {
+        return true
+    }
+    bigMeg := jy.GetBigVipUserBaseMsg(session, *config.Middleground)
+    if !bigMeg.CheckBigVipBackPower(match[1]) {
+        R.ServeJson(w, req, &Result{Error_code_1004, Error_msg_1004, nil})
+        return false
+    }
+    return true
 }

+ 12 - 1
src/jfw/modules/bigmember/src/go.mod

@@ -5,17 +5,21 @@ go 1.18
 require (
 	app.yhyue.com/moapp/esv1 v0.0.0-20220414031211-3da4123e648d
 	app.yhyue.com/moapp/jybase v0.0.0-20230117032034-ad7c00ffe11a
-	app.yhyue.com/moapp/jypkg v0.0.0-20230131023215-ca51808c57b8
+	app.yhyue.com/moapp/jypkg v0.0.0-20230202093215-bbde67e76cae
 	github.com/donnie4w/go-logger v0.0.0-20170827050443-4740c51383f4
+	github.com/gogf/gf/v2 v2.0.6
 	go.mongodb.org/mongo-driver v1.11.1
 )
 
 require (
 	app.yhyue.com/moapp/message v0.0.0-20221223100203-6402e389d9ae // indirect
 	bp.jydev.jianyu360.cn/BaseService/powerCheckCenter v0.0.0-20230128033309-a6b26e74a68c // indirect
+	bp.jydev.jianyu360.cn/BaseService/userCenter v0.0.0-20230129060002-f69424aa14ba // indirect
+	github.com/BurntSushi/toml v0.4.1 // indirect
 	github.com/beorn7/perks v1.0.1 // indirect
 	github.com/cenkalti/backoff/v4 v4.1.3 // indirect
 	github.com/cespare/xxhash/v2 v2.1.2 // indirect
+	github.com/clbanning/mxj/v2 v2.5.5 // indirect
 	github.com/coreos/go-semver v0.3.0 // indirect
 	github.com/coreos/go-systemd/v22 v22.3.2 // indirect
 	github.com/davecgh/go-spew v1.1.1 // indirect
@@ -23,6 +27,7 @@ require (
 	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/fsnotify/fsnotify v1.5.1 // indirect
 	github.com/garyburd/redigo v1.6.2 // indirect
 	github.com/go-logr/logr v1.2.3 // indirect
 	github.com/go-logr/stdr v1.2.2 // indirect
@@ -38,19 +43,24 @@ require (
 	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/gorilla/websocket v1.5.0 // indirect
+	github.com/grokify/html-strip-tags-go v0.0.1 // indirect
 	github.com/grpc-ecosystem/grpc-gateway/v2 v2.7.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/json-iterator/go v1.1.12 // indirect
 	github.com/klauspost/compress v1.13.6 // indirect
+	github.com/longbridgeapp/sqlparser v0.3.1 // 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.13 // indirect
 	github.com/matttproud/golang_protobuf_extensions v1.0.2-0.20181231171920-c182affec369 // 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/nsqio/go-nsq v1.1.0 // indirect
+	github.com/olekukonko/tablewriter v0.0.5 // indirect
 	github.com/olivere/elastic v6.2.37+incompatible // indirect
 	github.com/openzipkin/zipkin-go v0.4.0 // indirect
 	github.com/pelletier/go-toml/v2 v2.0.6 // indirect
@@ -59,6 +69,7 @@ require (
 	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/rivo/uniseg v0.2.0 // indirect
 	github.com/robfig/cron v1.2.0 // indirect
 	github.com/spaolacci/murmur3 v1.1.0 // indirect
 	github.com/xdg-go/pbkdf2 v1.0.0 // indirect

+ 112 - 2
src/jfw/modules/bigmember/src/go.sum

@@ -1,15 +1,38 @@
 app.yhyue.com/moapp/esv1 v0.0.0-20220414031211-3da4123e648d h1:WPsYuuptAd3UEgN+jPzpnsDe/OvcshDUUtOTZPYGSJ8=
 app.yhyue.com/moapp/esv1 v0.0.0-20220414031211-3da4123e648d/go.mod h1:91/lSD/hS+ckMVP3WdidRzDhC60lLMdyce9QHy0cSMA=
+app.yhyue.com/moapp/jyInfo v1.0.0/go.mod h1:+RjyGNvk7PT1P8cglkVlaj1lLlBXuPB+f5LipoOtgPs=
 app.yhyue.com/moapp/jyPoints v1.1.1/go.mod h1:SvP8p5L3jGrejHiH2LXfgCg/NPlFiKBC5Yd0gsI12FU=
+app.yhyue.com/moapp/jybase v0.0.0-20220415064050-37ce64b3e2d4/go.mod h1:qNRA0sHuYqcLoYoP8irpaWnW9YsXixe6obBIkwaXpD0=
+app.yhyue.com/moapp/jybase v0.0.0-20220418104200-46c3fff161c7/go.mod h1:qNRA0sHuYqcLoYoP8irpaWnW9YsXixe6obBIkwaXpD0=
+app.yhyue.com/moapp/jybase v0.0.0-20220419023055-f406279ff7e3/go.mod h1:qNRA0sHuYqcLoYoP8irpaWnW9YsXixe6obBIkwaXpD0=
+app.yhyue.com/moapp/jybase v0.0.0-20220420032112-668025915ee4/go.mod h1:qNRA0sHuYqcLoYoP8irpaWnW9YsXixe6obBIkwaXpD0=
+app.yhyue.com/moapp/jybase v0.0.0-20220421060131-a1001013ba46/go.mod h1:qNRA0sHuYqcLoYoP8irpaWnW9YsXixe6obBIkwaXpD0=
 app.yhyue.com/moapp/jybase v0.0.0-20220427020729-974c1a148186/go.mod h1:qNRA0sHuYqcLoYoP8irpaWnW9YsXixe6obBIkwaXpD0=
+app.yhyue.com/moapp/jybase v0.0.0-20220719064915-2fef79005dfa/go.mod h1:FjBF25AYoBrPhVKTXGXWcmEAbBT0ATTK6KJMOA+I80Q=
+app.yhyue.com/moapp/jybase v0.0.0-20220802080941-07f401baab8b/go.mod h1:HelrO6tcD9TcKb/HOP2BLbzppyDz2kpQSFhPMQTUgbQ=
+app.yhyue.com/moapp/jybase v0.0.0-20230109015757-aa3d5e19b196/go.mod h1:zB47XTeJvpcbtBRYgkQuxOICWNexiZfbUO+7aUf6mNs=
 app.yhyue.com/moapp/jybase v0.0.0-20230117032034-ad7c00ffe11a h1:wD4aWPSYdiX1cIP4lzzPD2s7fYhKa3muIf97l9tonJE=
 app.yhyue.com/moapp/jybase v0.0.0-20230117032034-ad7c00ffe11a/go.mod h1:zB47XTeJvpcbtBRYgkQuxOICWNexiZfbUO+7aUf6mNs=
-app.yhyue.com/moapp/jypkg v0.0.0-20230131023215-ca51808c57b8 h1:bpCxm9zroB4vy4IF2PAlD+iIPc+GwC1YMquORPBWuLI=
-app.yhyue.com/moapp/jypkg v0.0.0-20230131023215-ca51808c57b8/go.mod h1:MqJfBFTSfZhrNDEnE4e19BmaLkaMr+lYActLXm6lrpw=
+app.yhyue.com/moapp/jypkg v0.0.0-20230202093215-bbde67e76cae h1:vd5a1L01MVMfHkycc4xONzVnEpHrlvD19VxUWdWkocA=
+app.yhyue.com/moapp/jypkg v0.0.0-20230202093215-bbde67e76cae/go.mod h1:NrRgv24VIpf/xMMvsGC1EgoD+z6z5ea3MqIVxEcSPhE=
 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/BP/jynsq v0.0.0-20220222052708-ebc43af90698/go.mod h1:ojo/AUH9Yr1wzarEjOaNMkj1Cet/9r8IgLyba64Z52E=
+bp.jydev.jianyu360.cn/BaseService/gateway v0.0.0-20220419090715-88ddb32961be/go.mod h1:Yj4oabIGItuMoF0BXYLz2XAnF581kxgXBrvlUtIJrkI=
+bp.jydev.jianyu360.cn/BaseService/gateway v1.3.4/go.mod h1:BMLd/5wb3BIEGhnEgF9y1sJN9P5/Dw9kYsoiE9V8I9g=
 bp.jydev.jianyu360.cn/BaseService/powerCheckCenter v0.0.0-20230128033309-a6b26e74a68c h1:g49jOlhZlBCJ3IgJA0rotfNf2Gh22pISffUtqxB8XtY=
 bp.jydev.jianyu360.cn/BaseService/powerCheckCenter v0.0.0-20230128033309-a6b26e74a68c/go.mod h1:5nimT8GJh46AyfeeDeyRlDQygMlO7TRM8Pwm41Gxemc=
+bp.jydev.jianyu360.cn/BaseService/resourceCenter v0.0.0-20220418005748-8ba5d936dd53/go.mod h1:E5lcDI3k4FESLxiAetCfWQTq8qfpy9cv0yN1oKoEO34=
+bp.jydev.jianyu360.cn/BaseService/resourceCenter v0.0.0-20220419023723-0b32d4a41751/go.mod h1:6KL5LMEku83uRbre0W/bj5kXG2I6pJGBFtktmtp51yM=
+bp.jydev.jianyu360.cn/BaseService/resourceCenter v0.0.0-20220419063004-233fc7ce006c/go.mod h1:6KL5LMEku83uRbre0W/bj5kXG2I6pJGBFtktmtp51yM=
+bp.jydev.jianyu360.cn/BaseService/resourceCenter v0.0.0-20220420075831-0b59892e9982/go.mod h1:wsHNO91h37H+xE4ZNny0yd7mtpODeDJxbVYhIRMR+qw=
+bp.jydev.jianyu360.cn/BaseService/resourceCenter v0.0.3/go.mod h1:Z353aucNO5hH4ZYjeKST3kE1PN3W8/uPc4J8s0Upz40=
+bp.jydev.jianyu360.cn/BaseService/resourceCenter v0.0.4/go.mod h1:rRiGzKG4F/fmkNxXQCxrkxNWc8yf1SmW8qWCKfGIQSM=
+bp.jydev.jianyu360.cn/BaseService/userCenter v0.0.0-20220418072311-2062bed1e700/go.mod h1:KjcrxTzM96tBc6G4B8tlLBn1lrVy5UJYF8+eTdP4xAE=
+bp.jydev.jianyu360.cn/BaseService/userCenter v0.0.0-20220421015128-4a36f3eac5c5/go.mod h1:GT0QC4aaKDuXxAvaU4G02XjCc31TU1ctqBGqxQYOfC4=
+bp.jydev.jianyu360.cn/BaseService/userCenter v0.0.0-20220905055615-8540037e1b06/go.mod h1:LS21iwbgP8i3ZHJ1n4yNpLXQ/nzEudUOk0klC6VM2dQ=
+bp.jydev.jianyu360.cn/BaseService/userCenter v0.0.0-20230129060002-f69424aa14ba h1:WATZdho/2XJ8DP3EuaSo10WiFrXRgxeLpmYoGEcSdMw=
+bp.jydev.jianyu360.cn/BaseService/userCenter v0.0.0-20230129060002-f69424aa14ba/go.mod h1:m7/aZ1r1FapNT2h3gqmCFVb0EV+CaJaNKNPHMzLHx8Y=
 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=
@@ -374,16 +397,23 @@ cloud.google.com/go/workflows v1.8.0/go.mod h1:ysGhmEajwZxGn1OhGOGKsTXc5PyxOc0vf
 cloud.google.com/go/workflows v1.9.0/go.mod h1:ZGkj1aFIOd9c8Gerkjjq7OW7I5+l6cSvT3ujaO/WwSA=
 dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU=
 github.com/Azure/go-autorest v14.2.0+incompatible/go.mod h1:r+4oMnoxhatjLLJ6zxSWATqVooLgysK6ZNox3g/xq24=
+github.com/Azure/go-autorest/autorest v0.11.1/go.mod h1:JFgpikqFJ/MleTTxwepExTKnFUKKszPS8UavbQYUMuw=
 github.com/Azure/go-autorest/autorest v0.11.18/go.mod h1:dSiJPy22c3u0OtOKDNttNgqpNFY/GeWa7GH/Pz56QRA=
+github.com/Azure/go-autorest/autorest/adal v0.9.0/go.mod h1:/c022QCutn2P7uY+/oQWWNcK9YU+MH96NgK+jErpbcg=
+github.com/Azure/go-autorest/autorest/adal v0.9.5/go.mod h1:B7KF7jKIeC9Mct5spmyCB/A8CG/sEz1vwIRGv/bbw7A=
 github.com/Azure/go-autorest/autorest/adal v0.9.13/go.mod h1:W/MM4U6nLxnIskrw4UwWzlHfGjwUS50aOsc/I3yuU8M=
 github.com/Azure/go-autorest/autorest/date v0.3.0/go.mod h1:BI0uouVdmngYNUzGWeSYnokU+TrmwEsOqdt8Y6sso74=
+github.com/Azure/go-autorest/autorest/mocks v0.4.0/go.mod h1:LTp+uSrOhSkaKrUy935gNZuuIPPVsHlr9DSOxSayd+k=
 github.com/Azure/go-autorest/autorest/mocks v0.4.1/go.mod h1:LTp+uSrOhSkaKrUy935gNZuuIPPVsHlr9DSOxSayd+k=
+github.com/Azure/go-autorest/logger v0.2.0/go.mod h1:T9E3cAhj2VqvPOtCYAvby9aBXkZmbF5NWuPV8+WeEW8=
 github.com/Azure/go-autorest/logger v0.2.1/go.mod h1:T9E3cAhj2VqvPOtCYAvby9aBXkZmbF5NWuPV8+WeEW8=
 github.com/Azure/go-autorest/tracing v0.6.0/go.mod h1:+vhtPC754Xsa23ID7GlGsrdKBpUA79WCAKPPZVC2DeU=
 github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU=
+github.com/BurntSushi/toml v0.4.1 h1:GaI7EiDXDRfa8VshkTj7Fym7ha+y8/XxIgD2okUIjLw=
 github.com/BurntSushi/toml v0.4.1/go.mod h1:CxXYINrC8qIiEnFrOxCa7Jy5BFHlXnUU2pbicEuybxQ=
 github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo=
 github.com/ClickHouse/clickhouse-go v1.4.3/go.mod h1:EaI/sW7Azgz9UATzd5ZdZHRUhHgv5+JMS9NSr2smCJI=
+github.com/ClickHouse/clickhouse-go v1.5.1/go.mod h1:EaI/sW7Azgz9UATzd5ZdZHRUhHgv5+JMS9NSr2smCJI=
 github.com/ClickHouse/clickhouse-go v1.5.4/go.mod h1:EaI/sW7Azgz9UATzd5ZdZHRUhHgv5+JMS9NSr2smCJI=
 github.com/ClickHouse/clickhouse-go/v2 v2.0.14/go.mod h1:iq2DUGgpA4BBki2CVwrF8x43zqBjdgHtbexkFkh5a6M=
 github.com/ClickHouse/clickhouse-go/v2 v2.2.0/go.mod h1:8f2XZUi7XoeU+uPIytSi1cvx8fmJxi7vIgqpvYTF1+o=
@@ -391,6 +421,7 @@ github.com/DATA-DOG/go-sqlmock v1.4.1/go.mod h1:f/Ixk793poVmq4qj/V1dPUg2JEAKC73Q
 github.com/DATA-DOG/go-sqlmock v1.5.0/go.mod h1:f/Ixk793poVmq4qj/V1dPUg2JEAKC73Q5eFN3EC/SaM=
 github.com/NYTimes/gziphandler v0.0.0-20170623195520-56545f4a5d46/go.mod h1:3wb06e3pkSAbeQ52E9H9iFoQsEEwGN64994WTCIhntQ=
 github.com/OneOfOne/xxhash v1.2.2/go.mod h1:HSdplMjZKSmBqAxg5vPj2TmRDmfkzw+cTzAElWljhcU=
+github.com/PuerkitoBio/goquery v1.5.1/go.mod h1:GsLWisAFVj4WgDibEWF4pvYnkVQBpKBKeU+7zCJoLcc=
 github.com/PuerkitoBio/purell v1.1.1/go.mod h1:c11w/QuzBsJSee3cPx9rAFu61PvFxuPbtSwDGJws/X0=
 github.com/PuerkitoBio/urlesc v0.0.0-20170810143723-de5bf2ad4578/go.mod h1:uGdkoq3SwY9Y+13GIhn11/XLaGBb4BfwItxLd5jeuXE=
 github.com/Shopify/sarama v1.19.0/go.mod h1:FVkBWblsNy7DGZRfXLU0O9RCGt5g3g3yEuWXgklEdEo=
@@ -406,9 +437,13 @@ github.com/alecthomas/units v0.0.0-20190924025748-f65c72e2690d/go.mod h1:rBZYJk5
 github.com/alicebob/gopher-json v0.0.0-20200520072559-a9ecdc9d1d3a h1:HbKu58rmZpUGpz5+4FfNmIU+FmZg2P3Xaj2v2bfNWmk=
 github.com/alicebob/gopher-json v0.0.0-20200520072559-a9ecdc9d1d3a/go.mod h1:SGnFV6hVsYE877CKEZ6tDNTjaSXYUk6QqoIK6PrAtcc=
 github.com/alicebob/miniredis/v2 v2.14.1/go.mod h1:uS970Sw5Gs9/iK3yBg0l9Uj9s25wXxSpQUE9EaJ/Blg=
+github.com/alicebob/miniredis/v2 v2.17.0/go.mod h1:gquAfGbzn92jvtrSC69+6zZnwSODVXVpYDRaGhWaL6I=
 github.com/alicebob/miniredis/v2 v2.22.0/go.mod h1:XNqvJdQJv5mSuVMc0ynneafpnL/zv52acZ6kqeS0t88=
+github.com/alicebob/miniredis/v2 v2.23.1/go.mod h1:84TWKZlxYkfgMucPBf5SOQBYJceZeQRFIaQgNMiCX6Q=
 github.com/alicebob/miniredis/v2 v2.30.0 h1:uA3uhDbCxfO9+DI/DuGeAMr9qI+noVWwGPNTFuKID5M=
 github.com/alicebob/miniredis/v2 v2.30.0/go.mod h1:84TWKZlxYkfgMucPBf5SOQBYJceZeQRFIaQgNMiCX6Q=
+github.com/aliyun/aliyun-oss-go-sdk v2.2.2+incompatible/go.mod h1:T/Aws4fEfogEE9v+HPhhw+CntffsBHJ8nXQCwKr0/g8=
+github.com/andybalholm/cascadia v1.1.0/go.mod h1:GsXiBklL0woXo1j/WYWtSYYC4ouU9PqHO0sqidkEA4Y=
 github.com/antihax/optional v0.0.0-20180407024304-ca021399b1a6/go.mod h1:V8iCPQYkqmusNa815XgQio277wI47sdRh1dUOLdyC6Q=
 github.com/antihax/optional v1.0.0/go.mod h1:uupD/76wgC+ih3iEmQUL+0Ugr19nfwCT1kdvxnR2qWY=
 github.com/antlr/antlr4 v0.0.0-20210105212045-464bcbc32de2/go.mod h1:T7PbCXFs94rrTttyxjbyT5+/1V8T2TYDejxUfHJjw1Y=
@@ -417,6 +452,7 @@ github.com/apache/thrift v0.12.0/go.mod h1:cp2SuWMxlEZw2r+iP2GNCdIi4C1qmUzdZFSVb
 github.com/asaskevich/govalidator v0.0.0-20190424111038-f61b66f89f4a/go.mod h1:lB+ZfQJz7igIIfQNfa7Ml4HSf2uFQQRzpGGRXenZAgY=
 github.com/aws/aws-sdk-go v1.34.28/go.mod h1:H7NKnBqNVzoTJpGfLrQkkD+ytBA93eiDYi/+8rV9s48=
 github.com/aws/aws-sdk-go v1.35.20/go.mod h1:tlPOdRjfxPBpNIwqDj61rmsnA85v9jc0Ps9+muhnW+k=
+github.com/baiyubin/aliyun-sts-go-sdk v0.0.0-20180326062324-cfa1a18b161f/go.mod h1:AuiFmCCPBSrqvVMvuqFuk0qogytodnVFVSN5CeJB8Gc=
 github.com/benbjohnson/clock v1.1.0 h1:Q92kusRqC1XV2MjkWETPvjJVqKetz1OzxZB7mHJLju8=
 github.com/benbjohnson/clock v1.1.0/go.mod h1:J11/hYXuz8f4ySSvYwY0FKfm+ezbsZBKZxNJlLklBHA=
 github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q=
@@ -435,6 +471,7 @@ github.com/cespare/xxhash/v2 v2.1.2/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XL
 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/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw=
 github.com/cloudflare/golz4 v0.0.0-20150217214814-ef862a3cdc58/go.mod h1:EOBUe0h4xcZ5GoxqC5SDxFQ8gwyZPKQoEzownBlhI80=
@@ -466,9 +503,11 @@ github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSs
 github.com/dchest/captcha v0.0.0-20200903113550-03f5f0333e1f h1:q/DpyjJjZs94bziQ7YkBmIlpqbVP7yw179rnzoNVX1M=
 github.com/dchest/captcha v0.0.0-20200903113550-03f5f0333e1f/go.mod h1:QGrK8vMWWHQYQ3QU9bw9Y9OPNfxccGzfb41qjvVeXtY=
 github.com/denisenkom/go-mssqldb v0.0.0-20190707035753-2be1aa521ff4/go.mod h1:zAg7JM8CkOJ43xKXIj7eRO9kmWm/TW578qo+oDO6tuM=
+github.com/denisenkom/go-mssqldb v0.0.0-20191124224453-732737034ffd/go.mod h1:xbL0rPBG9cCiLr28tMa8zpbdarY27NDyej4t/EjAShU=
 github.com/dgrijalva/jwt-go v3.2.0+incompatible/go.mod h1:E3ru+11k8xSBh+hMPgOLZmtrrCbhqsmaPHjLKYnJCaQ=
 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/docker/spdystream v0.0.0-20160310174837-449fdfce4d96/go.mod h1:Qh8CwZgvJUkLughtfhJv5dyTYa91l1fOUCrgjqmcifM=
 github.com/docopt/docopt-go v0.0.0-20180111231733-ee0de3bc6815/go.mod h1:WwZ+bS3ebgob9U8Nd0kOddGdZWjyMGR8Wziv+TBNwSE=
 github.com/donnie4w/go-logger v0.0.0-20170827050443-4740c51383f4 h1:T9PR91sjTtrA1HmZB4G+M7OLCelch0f6rIEY7Mm1T4U=
 github.com/donnie4w/go-logger v0.0.0-20170827050443-4740c51383f4/go.mod h1:L7S4x0R7vv3xoOhGuyAJyCO2MYzWOpccM4Isn8jIUgY=
@@ -491,9 +530,12 @@ github.com/envoyproxy/go-control-plane v0.9.9-0.20210512163311-63b5d3c536b0/go.m
 github.com/envoyproxy/go-control-plane v0.9.10-0.20210907150352-cf90f659a021/go.mod h1:AFq3mo9L8Lqqiid3OhADV3RfLJnjiw63cSpi+fDTRC0=
 github.com/envoyproxy/go-control-plane v0.10.2-0.20220325020618-49ff273808a1/go.mod h1:KJwIaB5Mv44NWtYuAOFCVOjcI94vtpEz2JU/D2v6IjE=
 github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c=
+github.com/erikstmartin/go-testdb v0.0.0-20160219214506-8d10e4a1bae5/go.mod h1:a2zkGnVExMxdzMo3M0Hi/3sEU+cWnZpSni0O6/Yb/P0=
+github.com/evanphx/json-patch v4.9.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk=
 github.com/evanphx/json-patch v4.11.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk=
 github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4=
 github.com/fatih/color v1.9.0/go.mod h1:eQcE1qtQxscV5RaZvpXrrb8Drkc3/DdQ+uUYCNjL+zU=
+github.com/fatih/color v1.10.0/go.mod h1:ELkj/draVOlAH/xkhN6mQ50Qd0MPOk5AAr3maGEBuJM=
 github.com/fatih/color v1.13.0 h1:8LOYc1KYPPmyKMuN8QV2DNRWNbLo6LZ0iLs8+mlH53w=
 github.com/fatih/color v1.13.0/go.mod h1:kLAiJbzzSOZDVNGyDpeOxJ47H46qBXwg5ILebYFFOfk=
 github.com/fatih/structtag v1.2.0/go.mod h1:mBJUNpUnHmRKrKlQQlmCrh5PuhftFbNv8Ys4/aAZl94=
@@ -508,9 +550,11 @@ github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMo
 github.com/fsnotify/fsnotify v1.4.9/go.mod h1:znqG4EE+3YCdAaPaxE2ZRY/06pZUdp0tY4IgpuI1SZQ=
 github.com/fsnotify/fsnotify v1.5.1 h1:mZcQUHVQUQWoPXXtuf9yuEXKudkV2sx1E06UadKWpgI=
 github.com/fsnotify/fsnotify v1.5.1/go.mod h1:T3375wBYaZdLLcVNkcVbzGHY7f1l/uK5T5Ai1i3InKU=
+github.com/fullstorydev/grpcurl v1.8.6/go.mod h1:WhP7fRQdhxz2TkL97u+TCb505sxfH78W1usyoB3tepw=
 github.com/fullstorydev/grpcurl v1.8.7/go.mod h1:pVtM4qe3CMoLaIzYS8uvTuDj2jVYmXqMUkZeijnXp/E=
 github.com/garyburd/redigo v1.6.2 h1:yE/pwKCrbLpLpQICzYTeZ7JsTA/C53wFTJHaEtRqniM=
 github.com/garyburd/redigo v1.6.2/go.mod h1:NR3MbYisc3/PwhQ00EMzDiPmrwpPxAn5GI05/YaO1SY=
+github.com/ghodss/yaml v0.0.0-20150909031657-73d445a93680/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04=
 github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04=
 github.com/globalsign/mgo v0.0.0-20181015135952-eeefdecb41b8/go.mod h1:xkRDCp4j0OGD1HRkm4kmhM+pmpv3AKq5SU7GMg4oO/Q=
 github.com/go-gl/glfw v0.0.0-20190409004039-e6da0acd62b1/go.mod h1:vR7hzQXu2zJy9AVAgeJqvqgH9Q5CA+iKCZ2gyEVpxRU=
@@ -525,6 +569,7 @@ github.com/go-logfmt/logfmt v0.4.0/go.mod h1:3RMwSq7FuexP4Kalkev3ejPJsZTpXXBr9+V
 github.com/go-logfmt/logfmt v0.5.0/go.mod h1:wCYkCAKZfumFQihp8CzCvQ3paCTfi41vtzG1KdI/P7A=
 github.com/go-logfmt/logfmt v0.5.1/go.mod h1:WYhtIu8zTZfxdn5+rREduYbwxfcBr/Vr6KEVveWlfTs=
 github.com/go-logr/logr v0.1.0/go.mod h1:ixOQHD9gLJUVQQ2ZOR7zLEifBX6tGkNJF4QyIY7sIas=
+github.com/go-logr/logr v0.2.0/go.mod h1:z6/tIYblkpsD+a4lm/fGIIU9mZ+XfAiaFtq7xTgseGU=
 github.com/go-logr/logr v0.4.0/go.mod h1:z6/tIYblkpsD+a4lm/fGIIU9mZ+XfAiaFtq7xTgseGU=
 github.com/go-logr/logr v1.2.0/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A=
 github.com/go-logr/logr v1.2.1/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A=
@@ -536,8 +581,12 @@ github.com/go-logr/stdr v1.2.2 h1:hSWxHoqTgW2S2qGc0LTAI563KZ5YKYRhT3MFKZMbjag=
 github.com/go-logr/stdr v1.2.2/go.mod h1:mMo/vtBO5dYbehREoey6XUKy/eSumjCCveDpRre4VKE=
 github.com/go-ole/go-ole v1.2.4/go.mod h1:XCwSNxSkXRo4vlyPy93sltvi/qJq0jqQhjqQNIwKuxM=
 github.com/go-ole/go-ole v1.2.6/go.mod h1:pprOEPIfldk/42T2oK7lQ4v4JSDwmV0As9GaiUsvbm0=
+github.com/go-openapi/jsonpointer v0.19.2/go.mod h1:3akKfEdA7DF1sugOqz1dVQHBcuDBPKZGEoHC/NkiQRg=
 github.com/go-openapi/jsonpointer v0.19.3/go.mod h1:Pl9vOtqEWErmShwVjC8pYs9cog34VGT37dQOVbmoatg=
+github.com/go-openapi/jsonreference v0.19.2/go.mod h1:jMjeRr2HHw6nAVajTXJ4eiUwohSTlpa0o73RUL1owJc=
 github.com/go-openapi/jsonreference v0.19.3/go.mod h1:rjx6GuL8TTa9VaixXglHmQmIL98+wF9xc8zWvFonSJ8=
+github.com/go-openapi/spec v0.19.3/go.mod h1:FpwSN1ksY1eteniUU7X0N/BgJ7a4WvBFVA8Lj9mJglo=
+github.com/go-openapi/swag v0.19.2/go.mod h1:POnQmlKehdgb5mhVOsnJFsivZCEZ/vjK9gh66Z9tfKk=
 github.com/go-openapi/swag v0.19.5/go.mod h1:POnQmlKehdgb5mhVOsnJFsivZCEZ/vjK9gh66Z9tfKk=
 github.com/go-redis/redis v6.15.7+incompatible/go.mod h1:NAIEuMOZ/fxfXJIrKDQDz8wamY7mA7PouImQ2Jvg6kA=
 github.com/go-redis/redis/v8 v8.11.4/go.mod h1:2Z2wHZXdQpCDXEGzqMockDpNyYvi2l4Pxt6RJr792+w=
@@ -551,6 +600,7 @@ github.com/go-sql-driver/mysql v1.7.0 h1:ueSltNNllEqE3qcWBTD0iQd3IpL/6U+mJxLkazJ
 github.com/go-sql-driver/mysql v1.7.0/go.mod h1:OXbVy3sEdcQ2Doequ6Z5BW6fXNQTmx+9S1MCJN5yJMI=
 github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY=
 github.com/go-task/slim-sprig v0.0.0-20210107165309-348f09dbbbc0/go.mod h1:fyg7847qk6SyHyPtNmDHnmrv/HOrqktSC+C9fM+CJOE=
+github.com/go-test/deep v1.0.7 h1:/VSMRlnY/JSyqxQUzQLKVMAskpY/NZKFA5j2P+0pP2M=
 github.com/go-test/deep v1.0.7/go.mod h1:QV8Hv/iy04NyLBxAdO9njL0iVPN1S4d/A3NVv1V36o8=
 github.com/go-xorm/builder v0.3.4/go.mod h1:KxkQkNN1DpPKTedxXyTQcmH+rXfvk4LZ9SOOBoZBAxw=
 github.com/go-xorm/sqlfiddle v0.0.0-20180821085327-62ce714f951a/go.mod h1:56xuuqnHyryaerycW3BfssRdxQstACi0Epw/yC5E2xM=
@@ -582,6 +632,7 @@ github.com/gobuffalo/syncx v0.0.0-20190224160051-33c29581e754/go.mod h1:HhnNqWY9
 github.com/godbus/dbus/v5 v5.0.3/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5xrFpKfA=
 github.com/godbus/dbus/v5 v5.0.4/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5xrFpKfA=
 github.com/gofrs/uuid v3.2.0+incompatible/go.mod h1:b2aQJv3Z4Fp6yNu3cdSllBxTCLRxnplIgP/c0N/04lM=
+github.com/gogf/gf/v2 v2.0.6 h1:2etb4FMpbQKWIJO+UjtIWrZUp01HUsFb6Po8pgizAWk=
 github.com/gogf/gf/v2 v2.0.6/go.mod h1:8uYzw7qNzuq8vrhVlWke1b1925FFqOJIgmyYW1sr/0M=
 github.com/gogo/protobuf v1.1.1/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ=
 github.com/gogo/protobuf v1.2.0/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ=
@@ -589,9 +640,11 @@ github.com/gogo/protobuf v1.2.1/go.mod h1:hp+jE20tsWTFYpLwKvXlhS1hjn+gTNwPg2I6zV
 github.com/gogo/protobuf v1.3.1/go.mod h1:SlYgWuQ5SjCEi6WLHjHCa1yvBfUnHcTbrrZtXPKa29o=
 github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q=
 github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q=
+github.com/golang-jwt/jwt/v4 v4.2.0/go.mod h1:/xlHOz8bRuivTWchD4jCa+NbatV+wEUSzwAxVc6locg=
 github.com/golang-jwt/jwt/v4 v4.4.2/go.mod h1:m21LjoU+eqJr34lmDMbreY2eSTRJ1cv77w39/MY0Ch0=
 github.com/golang-jwt/jwt/v4 v4.4.3 h1:Hxl6lhQFj4AnOX6MLrsCb/+7tCj7DxP7VA+2rDIq5AU=
 github.com/golang-jwt/jwt/v4 v4.4.3/go.mod h1:m21LjoU+eqJr34lmDMbreY2eSTRJ1cv77w39/MY0Ch0=
+github.com/golang-sql/civil v0.0.0-20190719163853-cb61b32ac6fe/go.mod h1:8vg3r2VgvsThLBIFL93Qb5yWzgyZWhEmBwUJWevAkK0=
 github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q=
 github.com/golang/glog v1.0.0 h1:nfP3RFugxnNRyKgeWd4oI1nYvXpxrx8ck8ZrcizshdQ=
 github.com/golang/glog v1.0.0/go.mod h1:EWib/APOK0SL3dFbYqvxE3UYd8E6s1ouQ7iEp/0LWV4=
@@ -697,10 +750,12 @@ github.com/googleapis/gax-go/v2 v2.3.0/go.mod h1:b8LNqSzNabLiUpXKkY7HAR5jr6bIT99
 github.com/googleapis/gax-go/v2 v2.4.0/go.mod h1:XOTVJ59hdnfJLIP/dh8n5CGryZR2LxK9wbMD5+iXC6c=
 github.com/googleapis/gax-go/v2 v2.5.1/go.mod h1:h6B0KMMFNtI2ddbGJn3T3ZbwkeT6yqEF02fYlzkUCyo=
 github.com/googleapis/gax-go/v2 v2.6.0/go.mod h1:1mjbznJAPHFpesgE5ucqfYEscaz5kMdcIDwU/6+DDoY=
+github.com/googleapis/gnostic v0.4.1/go.mod h1:LRhVm6pbyptWbWbuZ38d1eyptfvIytN3ir6b65WBswg=
 github.com/googleapis/gnostic v0.5.1/go.mod h1:6U4PtQXGIEt/Z3h5MAT7FNofLnw9vXk2cUuW7uA/OeU=
 github.com/googleapis/gnostic v0.5.5 h1:9fHAtK0uDfpveeqqo1hkEZJcFvYXAiCN3UutL8F9xHw=
 github.com/googleapis/gnostic v0.5.5/go.mod h1:7+EbHbldMins07ALC74bsA81Ovc97DwqyJO1AENw9kA=
 github.com/googleapis/go-type-adapters v1.0.0/go.mod h1:zHW75FOG2aur7gAO2B+MLby+cLsWGBF62rFAi7WjWO4=
+github.com/gordonklaus/ineffassign v0.0.0-20200309095847-7953dde2c7bf/go.mod h1:cuNKsD1zp2v6XfE/orVX2QE1LC+i254ceGcVeDT3pTU=
 github.com/gorilla/context v1.1.1/go.mod h1:kBGZzfjB9CEq2AlWe17Uuf7NDRt0dE0s8S51q0aT7Yg=
 github.com/gorilla/handlers v1.4.2/go.mod h1:Qkdc/uu4tH4g6mTK6auzZ766c4CA0Ng8+o/OAirnOIQ=
 github.com/gorilla/mux v1.6.2/go.mod h1:1lud6UwP+6orDFRuTfBEV8e9/aOM/c4fVVCaMa2zaAs=
@@ -710,8 +765,10 @@ github.com/gorilla/sessions v1.2.1/go.mod h1:dk2InVEVJ0sfLlnXv9EAgkf6ecYs/i80K/z
 github.com/gorilla/websocket v0.0.0-20170926233335-4201258b820c/go.mod h1:E7qHFY5m1UJ88s3WnNqhKjPHQ0heANvMoAMk2YaljkQ=
 github.com/gorilla/websocket v1.4.1/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE=
 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/gregjones/httpcache v0.0.0-20180305231024-9cad4c3443a7/go.mod h1:FecbI9+v66THATjSRHfNgh1IVFe/9kFxbXtjV0ctIMA=
+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/grpc-ecosystem/go-grpc-middleware v1.0.1-0.20190118093823-f849b5445de4/go.mod h1:FiyG127CGDf3tlThmgyCl78X/SZQqEOJBCDaAfeWzPs=
 github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0/go.mod h1:8NvIoxWQoOIhqOTXgfV/d3M/q6VIi02HzZEHgUlZvzk=
@@ -746,11 +803,15 @@ github.com/jcmturner/rpc/v2 v2.0.3/go.mod h1:VUJYCIDm3PVOEHw8sgt091/20OJjskO/YJk
 github.com/jhump/gopoet v0.0.0-20190322174617-17282ff210b3/go.mod h1:me9yfT6IJSlOL3FCfrg+L6yzUEZ+5jW6WHt4Sk+UPUI=
 github.com/jhump/gopoet v0.1.0/go.mod h1:me9yfT6IJSlOL3FCfrg+L6yzUEZ+5jW6WHt4Sk+UPUI=
 github.com/jhump/goprotoc v0.5.0/go.mod h1:VrbvcYrQOrTi3i0Vf+m+oqQWk9l72mjkJCYo7UvLHRQ=
+github.com/jhump/protoreflect v1.10.3/go.mod h1:7GcYQDdMU/O/BBrl/cX6PNHpXh6cenjd8pneu5yW7Tg=
 github.com/jhump/protoreflect v1.11.0/go.mod h1:U7aMIjN0NWq9swDP7xDdoMfRHb35uiuTd3Z9nFXJf5E=
 github.com/jhump/protoreflect v1.12.0/go.mod h1:JytZfP5d0r8pVNLZvai7U/MCuTWITgrI4tTg7puQFKI=
+github.com/jhump/protoreflect v1.14.0/go.mod h1:JytZfP5d0r8pVNLZvai7U/MCuTWITgrI4tTg7puQFKI=
 github.com/jhump/protoreflect v1.14.1/go.mod h1:JytZfP5d0r8pVNLZvai7U/MCuTWITgrI4tTg7puQFKI=
+github.com/jinzhu/gorm v1.9.16/go.mod h1:G3LB3wezTOWM2ITLzPxEXgSkOXAntiLHS7UdBefADcs=
 github.com/jinzhu/inflection v1.0.0 h1:K317FqzuhWc8YvSVlFMCCUb36O/S9MCKRDI7QkRKD/E=
 github.com/jinzhu/inflection v1.0.0/go.mod h1:h+uFLlag+Qp1Va5pdKtLDYj+kHp5pxUVkryuEj+Srlc=
+github.com/jinzhu/now v1.0.1/go.mod h1:d3SSVoowX0Lcu0IBviAWJpolVfI5UJVZZ7cO71lE/z8=
 github.com/jinzhu/now v1.1.1 h1:g39TucaRWyV3dwDO++eEc6qf8TVIQ/Da48WmqjZ3i7E=
 github.com/jinzhu/now v1.1.1/go.mod h1:d3SSVoowX0Lcu0IBviAWJpolVfI5UJVZZ7cO71lE/z8=
 github.com/jmespath/go-jmespath v0.4.0/go.mod h1:T8mJZnbsbmF+m6zOOFylbeCJqk5+pHWvzYPziyZiYoo=
@@ -791,14 +852,18 @@ github.com/kr/pretty v0.2.0/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfn
 github.com/kr/pretty v0.2.1 h1:Fmg33tUaq4/8ym9TJN1x7sLJnHVwhP33CNkpYV/7rwI=
 github.com/kr/pretty v0.2.1/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI=
 github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ=
+github.com/kr/pty v1.1.5/go.mod h1:9r2w37qlBe7rQ6e1fg1S/9xpWHSnaqNdHD3WcMdbPDA=
 github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI=
 github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY=
 github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE=
 github.com/lib/pq v1.0.0/go.mod h1:5WUZQaWbwv1U+lTReE5YruASi9Al49XbQIvNi/34Woo=
+github.com/lib/pq v1.1.1/go.mod h1:5WUZQaWbwv1U+lTReE5YruASi9Al49XbQIvNi/34Woo=
 github.com/lib/pq v1.3.0/go.mod h1:5WUZQaWbwv1U+lTReE5YruASi9Al49XbQIvNi/34Woo=
+github.com/lib/pq v1.10.4/go.mod h1:AlVN5x4E4T544tWzH6hKfbfQvm3HdbOxrmggDNAPY9o=
 github.com/lib/pq v1.10.6/go.mod h1:AlVN5x4E4T544tWzH6hKfbfQvm3HdbOxrmggDNAPY9o=
 github.com/lib/pq v1.10.7/go.mod h1:AlVN5x4E4T544tWzH6hKfbfQvm3HdbOxrmggDNAPY9o=
 github.com/logrusorgru/aurora v2.0.3+incompatible/go.mod h1:7rIyQOR62GCctdiQpZ/zOJlFyk6y+94wXzv6RNZgaR4=
+github.com/longbridgeapp/sqlparser v0.3.1 h1:iWOZWGIFgQrJRgobLXUNJdvqGRpbVXkyKUKUA5CNJBE=
 github.com/longbridgeapp/sqlparser v0.3.1/go.mod h1:GIHaUq8zvYyHLCLMJJykx1CdM6LHtkUih/QaJXySSx4=
 github.com/mailru/easyjson v0.0.0-20190614124828-94de47d64c63/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc=
 github.com/mailru/easyjson v0.0.0-20190626092158-b2ccc519800e/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc=
@@ -810,6 +875,7 @@ github.com/markbates/safe v1.0.1/go.mod h1:nAqgmRi7cY2nqMc92/bSEeQA+R4OheNU2T1kN
 github.com/mattn/go-colorable v0.0.9/go.mod h1:9vuHe8Xs5qXnSaW/c/ABM9alt+Vo+STaOChaDxuIBZU=
 github.com/mattn/go-colorable v0.1.4/go.mod h1:U0ppj6V5qS13XJ6of8GYAs25YV2eR4EVcfRqFIhoBtE=
 github.com/mattn/go-colorable v0.1.6/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc=
+github.com/mattn/go-colorable v0.1.8/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc=
 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.4/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4=
@@ -821,9 +887,11 @@ github.com/mattn/go-isatty v0.0.14/go.mod h1:7GGIvUiUoEMVVmxf/4nioHXj79iQHKdU27k
 github.com/mattn/go-runewidth v0.0.2/go.mod h1:LwmH8dsx7+W8Uxz3IHJYH5QSwggIsqBzpuz5H//U1FU=
 github.com/mattn/go-runewidth v0.0.7/go.mod h1:H031xJmbD/WCDINGzjvQ9THkh0rPKHF+m2gUSrubnMI=
 github.com/mattn/go-runewidth v0.0.9/go.mod h1:H031xJmbD/WCDINGzjvQ9THkh0rPKHF+m2gUSrubnMI=
+github.com/mattn/go-runewidth v0.0.13 h1:lTGmDsbAYt5DmK6OnoV7EuIF1wEIFAcxld6ypU4OSgU=
 github.com/mattn/go-runewidth v0.0.13/go.mod h1:Jdepj2loyihRzMpdS35Xk/zdY8IAYHsh153qUoGf23w=
 github.com/mattn/go-sqlite3 v1.9.0/go.mod h1:FPy6KqzDD04eiIsT53CuJW3U88zkxoIYsOqkbpncsNc=
 github.com/mattn/go-sqlite3 v1.10.0/go.mod h1:FPy6KqzDD04eiIsT53CuJW3U88zkxoIYsOqkbpncsNc=
+github.com/mattn/go-sqlite3 v1.14.0/go.mod h1:JIl7NbARA7phWnGvh0LKTyg7S9BA+6gx71ShQilpsus=
 github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0=
 github.com/matttproud/golang_protobuf_extensions v1.0.2-0.20181231171920-c182affec369 h1:I0XW9+e1XWDxdcEniV4rQAIOPUGDq67JSCiRCgGCZLI=
 github.com/matttproud/golang_protobuf_extensions v1.0.2-0.20181231171920-c182affec369/go.mod h1:BSXmuO+STAnVfrANrmjBb36TMTDstsz7MSK+HVaYKv4=
@@ -845,6 +913,7 @@ github.com/mwitkow/go-conntrack v0.0.0-20190716064945-2f068394615f/go.mod h1:qRW
 github.com/mxk/go-flowrate v0.0.0-20140419014527-cca7078d478f/go.mod h1:ZdcZmHo+o7JKHSa8/e818NopupXU1YMK5fe1lsApnBw=
 github.com/nbio/st v0.0.0-20140626010706-e9e8d9816f32/go.mod h1:9wM+0iRr9ahx58uYLpLIr5fm8diHn0JbqRycJi6w0Ms=
 github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e/go.mod h1:zD1mROLANZcx1PVRCS0qkT7pwLkGfwJo4zjcN/Tysno=
+github.com/nishanths/predeclared v0.0.0-20200524104333-86fad755b4d3/go.mod h1:nt3d53pc1VYcphSCIaYAJtnPYnr3Zyn8fMq2wvPGPso=
 github.com/nsqio/go-nsq v1.1.0 h1:PQg+xxiUjA7V+TLdXw7nVrJ5Jbl3sN86EhGCQj4+FYE=
 github.com/nsqio/go-nsq v1.1.0/go.mod h1:vKq36oyeVXgsS5Q8YEO7WghqidAVXQlcFxzQbQTuDEY=
 github.com/nxadm/tail v1.4.4/go.mod h1:kenIhsEOeOJmVchQTgglprH7qJGnHDVpk1VPCcaMI8A=
@@ -852,6 +921,7 @@ 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.0-20170122224234-a0225b3f23b5/go.mod h1:vsDQFd/mU46D+Z4whnwzcISnGGzXWMclvtLoiIKAKIo=
 github.com/olekukonko/tablewriter v0.0.4/go.mod h1:zq6QwlOf5SlnkVbMSr5EoBv3636FWnp+qbPhuoO21uA=
+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/olivere/elastic v6.2.37+incompatible h1:UfSGJem5czY+x/LqxgeCBgjDn6St+z8OnsCuxwD3L0U=
 github.com/olivere/elastic v6.2.37+incompatible/go.mod h1:J+q1zQJTgAz9woqsbVRqGeB5G1iqDKVBWLNSYW8yfJ8=
@@ -859,6 +929,7 @@ github.com/olivere/elastic/v7 v7.0.22/go.mod h1:VDexNy9NjmtAkrjNoI7tImv7FR4tf5zU
 github.com/onsi/ginkgo v0.0.0-20170829012221-11459a886d9c/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE=
 github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE=
 github.com/onsi/ginkgo v1.7.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE=
+github.com/onsi/ginkgo v1.11.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE=
 github.com/onsi/ginkgo v1.12.1/go.mod h1:zj2OWP4+oCPe1qIXoGWkgMRwljMUYCdkwsT2108oapk=
 github.com/onsi/ginkgo v1.14.0/go.mod h1:iSB4RoI2tjJc9BBv4NKIKWKya62Rps+oPG/Lv9klQyY=
 github.com/onsi/ginkgo v1.16.4/go.mod h1:dX+/inL/fNMqNlz0e9LfyB9TswhZpCVdJM/Z6Vvnwo0=
@@ -868,6 +939,7 @@ github.com/onsi/ginkgo/v2 v2.0.0/go.mod h1:vw5CSIxN1JObi/U8gcbwft7ZxR2dgaR70JSE3
 github.com/onsi/gomega v0.0.0-20170829124025-dcabb60a477c/go.mod h1:C1qb7wdrVGGVU+Z6iS04AVkA3Q65CEZX59MT0QO5uiA=
 github.com/onsi/gomega v1.4.3/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY=
 github.com/onsi/gomega v1.5.0/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY=
+github.com/onsi/gomega v1.7.0/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY=
 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=
@@ -876,6 +948,7 @@ github.com/onsi/gomega v1.18.1 h1:M1GfJqGRrBrrGGsbxzV5dqM2U2ApXefZCQpkukxYRLE=
 github.com/onsi/gomega v1.18.1/go.mod h1:0q+aL8jAiMXy9hbwj2mr5GziHiwhAIQpFmmtT5hitRs=
 github.com/opentracing/opentracing-go v1.2.0/go.mod h1:GxEUsuufX4nBwe+T+Wl9TAgYrxe9dPLANfrWvHYVTgc=
 github.com/openzipkin/zipkin-go v0.1.6/go.mod h1:QgAqvLzwWbR/WpD4A3cGpPtJrZXNIiJc5AZX7/PBEpw=
+github.com/openzipkin/zipkin-go v0.3.0/go.mod h1:4c3sLeE8xjNqehmF5RpAFLPLJxXscc0R4l6Zg0P1tTQ=
 github.com/openzipkin/zipkin-go v0.4.0 h1:CtfRrOVZtbDj8rt1WXjklw0kqqJQwICrCKmlfUuBUUw=
 github.com/openzipkin/zipkin-go v0.4.0/go.mod h1:4c3sLeE8xjNqehmF5RpAFLPLJxXscc0R4l6Zg0P1tTQ=
 github.com/paulmach/orb v0.5.0/go.mod h1:FWRlTgl88VI1RBx/MkrwWDRhQ96ctqMCh8boXhmqB/A=
@@ -921,6 +994,7 @@ github.com/prometheus/common v0.4.1/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y8
 github.com/prometheus/common v0.9.1/go.mod h1:yhUN8i9wzaXS3w1O07YhxHEBxD+W35wd8bs7vj7HSQ4=
 github.com/prometheus/common v0.10.0/go.mod h1:Tlit/dnDKsSWFlCLTWaA1cyBgKHSMdTB80sz/V91rCo=
 github.com/prometheus/common v0.26.0/go.mod h1:M7rCNAaPfAosfx8veZJCuw84e35h3Cfd9VFqTh1DIvc=
+github.com/prometheus/common v0.30.0/go.mod h1:vu+V0TpY+O6vW9J44gczi3Ap/oXXR10b+M/gUGO4Hls=
 github.com/prometheus/common v0.32.1/go.mod h1:vu+V0TpY+O6vW9J44gczi3Ap/oXXR10b+M/gUGO4Hls=
 github.com/prometheus/common v0.37.0 h1:ccBbHCgIiT9uSoFY0vX8H3zsNR5eLt17/RQLUvn8pXE=
 github.com/prometheus/common v0.37.0/go.mod h1:phzohg0JFMnBEFGxTDbfu3QyL5GI8gTQJFhYO5B3mfA=
@@ -936,6 +1010,7 @@ github.com/prometheus/procfs v0.8.0/go.mod h1:z7EfXMXOkbkqb9IINtpCn86r/to3BnA0ua
 github.com/rabbitmq/amqp091-go v1.1.0/go.mod h1:ogQDLSOACsLPsIq0NpbtiifNZi2YOz0VTJ0kHRghqbM=
 github.com/rcrowley/go-metrics v0.0.0-20181016184325-3113b8401b8a/go.mod h1:bCqnVzQkZxMG4s8nGwiZ5l3QUCyqpo9Y+/ZMZ9VjZe4=
 github.com/rcrowley/go-metrics v0.0.0-20201227073835-cf1acfcdf475/go.mod h1:bCqnVzQkZxMG4s8nGwiZ5l3QUCyqpo9Y+/ZMZ9VjZe4=
+github.com/rivo/uniseg v0.2.0 h1:S1pD9weZBuJdFmowNwbpi7BJ8TNftyUImj/0WQi72jY=
 github.com/rivo/uniseg v0.2.0/go.mod h1:J6wj4VEh+S6ZtnVlnTBMWIodfgj8LQOQFoIToxlJtxc=
 github.com/robfig/cron v1.2.0 h1:ZjScXvvxeQ63Dbyxy76Fj3AT3Ut0aKsyd2/tl3DTMuQ=
 github.com/robfig/cron v1.2.0/go.mod h1:JGuDeoQd7Z6yL4zQhZ3OPEVHB7fL6Ka6skscFHfmt2k=
@@ -946,6 +1021,7 @@ github.com/rogpeppe/go-internal v1.2.2/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFR
 github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4=
 github.com/russross/blackfriday/v2 v2.0.1/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM=
 github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM=
+github.com/satori/go.uuid v1.2.0/go.mod h1:dA0hQrYB0VpLJoorglMZABFdXlWrHn1NEOzdhQKdks0=
 github.com/shirou/gopsutil v2.19.11+incompatible/go.mod h1:5b4v6he4MtMOwMlS0TUMTu2PcXUg8+E1lC7eC3UO/RA=
 github.com/shirou/gopsutil v3.21.11+incompatible/go.mod h1:5b4v6he4MtMOwMlS0TUMTu2PcXUg8+E1lC7eC3UO/RA=
 github.com/shirou/w32 v0.0.0-20160930032740-bb4de0191aa4/go.mod h1:qsXQc7+bwAM3Q1u/4XEfrquwF8Lw7D7y5cD8CuHnfIc=
@@ -975,6 +1051,7 @@ github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An
 github.com/stoewer/go-strcase v1.2.0/go.mod h1:IBiWB2sKIp3wVVQ3Y035++gc+knqhUQag1KpM8ahLw8=
 github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
 github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
+github.com/stretchr/objx v0.2.0/go.mod h1:qt09Ya8vawLte6SNmTgCsAVtYtaKzEcn8ATUoHMkEqE=
 github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw=
 github.com/stretchr/objx v0.5.0 h1:1zr/of2m5FGMsad5YfcqgdqdWrIhu+EBEJRhR1U7z/c=
 github.com/stretchr/objx v0.5.0/go.mod h1:Yh+to48EsGEfYuaHDzXPcE3xhTkx73EhmCGUpEOglKo=
@@ -1022,27 +1099,35 @@ github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1
 github.com/yuin/goldmark v1.4.0/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k=
 github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY=
 github.com/yuin/gopher-lua v0.0.0-20191220021717-ab39c6098bdb/go.mod h1:gqRgreBUhTSL0GeU64rtZ3Uq3wtjOa/TB2YfrtkCbVQ=
+github.com/yuin/gopher-lua v0.0.0-20200816102855-ee81675732da/go.mod h1:E1AXubJBdNmFERAOucpDIxNzeGfLzg0mYh+UfMWdChA=
 github.com/yuin/gopher-lua v0.0.0-20210529063254-f4c35e4016d9/go.mod h1:E1AXubJBdNmFERAOucpDIxNzeGfLzg0mYh+UfMWdChA=
 github.com/yuin/gopher-lua v0.0.0-20220504180219-658193537a64 h1:5mLPGnFdSsevFRFc9q3yYbBkB6tsm4aCwwQV/j1JQAQ=
 github.com/yuin/gopher-lua v0.0.0-20220504180219-658193537a64/go.mod h1:GBR0iDaNXjAgGg9zfCvksxSRnQx76gclCIb7kdAd1Pw=
 github.com/yusufpapurcu/wmi v1.2.2/go.mod h1:SBZ9tNy3G9/m5Oi98Zks0QjeHVDvuK0qfxQmPyzfmi0=
+github.com/zeromicro/go-zero v1.3.2/go.mod h1:DEj3Fwj1Ui1ltsgf6YqwTL9nD4+tYzIRX0c1pWtQo1E=
 github.com/zeromicro/go-zero v1.3.5/go.mod h1:wh4o794b7Ul3W0k35Pw9nc3iB4O0OpaQTMQz/PJc1bc=
+github.com/zeromicro/go-zero v1.4.0/go.mod h1:1amLn98K7c6FLntb9f8hdmq26ajtolOg4DTFWnRt54o=
+github.com/zeromicro/go-zero v1.4.3/go.mod h1:UmDjuW7LHd9j7+nnnPBcXF0HLNmjJw6OjHPTlSp7X7Y=
 github.com/zeromicro/go-zero v1.4.4 h1:J8M768EVFNtIQJ/GCEsoIQPanxbx2HHT0it7r69U76Y=
 github.com/zeromicro/go-zero v1.4.4/go.mod h1:5WSUwtJm0bYdDZ69GlckigcT6D0EyAPbDaX3unbSY/4=
 github.com/ziutek/mymysql v1.5.4/go.mod h1:LMSpPZ6DbqWFxNCHW77HeMg9I646SAhApZ/wKdgO/C0=
 go.etcd.io/bbolt v1.3.4/go.mod h1:G5EMThwa9y8QZGBClrRx5EY+Yw9kAhnjy3bSjsnlVTQ=
 go.etcd.io/etcd v0.0.0-20200402134248-51bdeb39e698/go.mod h1:YoUyTScD3Vcv2RBm3eGVOq7i1ULiz3OuXoQFWOirmAM=
+go.etcd.io/etcd/api/v3 v3.5.2/go.mod h1:5GB2vv4A4AOn3yk7MftYGHkUfGtDHnEraIjym4dYz5A=
 go.etcd.io/etcd/api/v3 v3.5.4/go.mod h1:5GB2vv4A4AOn3yk7MftYGHkUfGtDHnEraIjym4dYz5A=
 go.etcd.io/etcd/api/v3 v3.5.5 h1:BX4JIbQ7hl7+jL+g+2j5UAr0o1bctCm6/Ct+ArBGkf0=
 go.etcd.io/etcd/api/v3 v3.5.5/go.mod h1:KFtNaxGDw4Yx/BA4iPPwevUTAuqcsPxzyX8PHydchN8=
+go.etcd.io/etcd/client/pkg/v3 v3.5.2/go.mod h1:IJHfcCEKxYu1Os13ZdwCwIUTUVGYTSAM3YSwc9/Ac1g=
 go.etcd.io/etcd/client/pkg/v3 v3.5.4/go.mod h1:IJHfcCEKxYu1Os13ZdwCwIUTUVGYTSAM3YSwc9/Ac1g=
 go.etcd.io/etcd/client/pkg/v3 v3.5.5 h1:9S0JUVvmrVl7wCF39iTQthdaaNIiAaQbmK75ogO6GU8=
 go.etcd.io/etcd/client/pkg/v3 v3.5.5/go.mod h1:ggrwbk069qxpKPq8/FKkQ3Xq9y39kbFR4LnKszpRXeQ=
+go.etcd.io/etcd/client/v3 v3.5.2/go.mod h1:kOOaWFFgHygyT0WlSmL8TJiXmMysO/nNUlEsSsN6W4o=
 go.etcd.io/etcd/client/v3 v3.5.4/go.mod h1:ZaRkVgBZC+L+dLCjTcF1hRXpgZXQPOvnA/Ak/gq3kiY=
 go.etcd.io/etcd/client/v3 v3.5.5 h1:q++2WTJbUgpQu4B6hCuT7VkdwaTP7Qz6Daak3WzbrlI=
 go.etcd.io/etcd/client/v3 v3.5.5/go.mod h1:aApjR4WGlSumpnJ2kloS75h6aHUmAyaPLjHMxpc7E7c=
 go.mongodb.org/mongo-driver v1.5.0/go.mod h1:boiGPFqyBs5R0R5qf2ErokGRekMfwn+MqKaUyHs7wy0=
 go.mongodb.org/mongo-driver v1.9.1/go.mod h1:0sQWfOeY63QTntERDJJ/0SuKK0T1uVSgKCuAROlKEPY=
+go.mongodb.org/mongo-driver v1.10.1/go.mod h1:z4XpeoU6w+9Vht+jAFyLgVrD+jGSQQe0+CBWFHNiHt8=
 go.mongodb.org/mongo-driver v1.11.1 h1:QP0znIRTuL0jf1oBQoAoM0C6ZJfBK4kx0Uumtv1A7w8=
 go.mongodb.org/mongo-driver v1.11.1/go.mod h1:s7p5vEtfbeR1gYi6pnj3c3/urpbLv2T5Sfd6Rp2HBB8=
 go.opencensus.io v0.20.1/go.mod h1:6WKK9ahsWS3RSO+PY9ZHZUfv2irvY6gN279GOPZjmmk=
@@ -1057,10 +1142,13 @@ go.opentelemetry.io/otel v1.0.0/go.mod h1:AjRVh9A5/5DE7S+mZtTR6t8vpKKryam+0lREnf
 go.opentelemetry.io/otel v1.3.0/go.mod h1:PWIKzi6JCp7sM0k9yZ43VX+T345uNbAkDKwHVjb2PTs=
 go.opentelemetry.io/otel v1.7.0/go.mod h1:5BdUoMIz5WEs0vt0CUEMtSSaTSHBBVwrhnz7+nrD5xk=
 go.opentelemetry.io/otel v1.8.0/go.mod h1:2pkj+iMj0o03Y+cW6/m8Y4WkRdYN3AvCXCnzRMp9yvM=
+go.opentelemetry.io/otel v1.9.0/go.mod h1:np4EoPGzoPs3O67xUVNoPPcmSvsfOxNlNA4F4AC+0Eo=
 go.opentelemetry.io/otel v1.10.0/go.mod h1:NbvWjCthWHKBEUMpf0/v8ZRZlni86PpGFEMA9pnQSnQ=
 go.opentelemetry.io/otel v1.11.0 h1:kfToEGMDq6TrVrJ9Vht84Y8y9enykSZzDDZglV0kIEk=
 go.opentelemetry.io/otel v1.11.0/go.mod h1:H2KtuEphyMvlhZ+F7tg9GRhAOe60moNx61Ex+WmiKkk=
+go.opentelemetry.io/otel/exporters/jaeger v1.3.0/go.mod h1:KoYHi1BtkUPncGSRtCe/eh1ijsnePhSkxwzz07vU0Fc=
 go.opentelemetry.io/otel/exporters/jaeger v1.8.0/go.mod h1:GbWg+ng88rDtx+id26C34QLqw2erqJeAjsCx9AFeHfE=
+go.opentelemetry.io/otel/exporters/jaeger v1.9.0/go.mod h1:hquezOLVAybNW6vanIxkdLXTXvzlj2Vn3wevSP15RYs=
 go.opentelemetry.io/otel/exporters/jaeger v1.10.0/go.mod h1:n9IGyx0fgyXXZ/i0foLHNxtET9CzXHzZeKCucvRBFgA=
 go.opentelemetry.io/otel/exporters/jaeger v1.11.0 h1:Sv2valcFfMlfu6g8USSS+ZUN5vwbuGj1aY/CFtMG33w=
 go.opentelemetry.io/otel/exporters/jaeger v1.11.0/go.mod h1:nRgyJbgJ0hmaUdHwyDpTTfBYz61cTTeeGhVzfQc+FsI=
@@ -1075,13 +1163,16 @@ go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.11.0 h1:j2RFV
 go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.11.0/go.mod h1:pILgiTEtrqvZpoiuGdblDgS5dbIaTgDrkIuKfEFkt+A=
 go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.10.0 h1:S8DedULB3gp93Rh+9Z+7NTEv+6Id/KYS7LDyipZ9iCE=
 go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.10.0/go.mod h1:5WV40MLWwvWlGP7Xm8g3pMcg0pKOUY609qxJn8y7LmM=
+go.opentelemetry.io/otel/exporters/zipkin v1.3.0/go.mod h1:LxGGfHIYbvsFnrJtBcazb0yG24xHdDGrT/H6RB9r3+8=
 go.opentelemetry.io/otel/exporters/zipkin v1.8.0/go.mod h1:0uYAyCuGT67MFV9Z/Mmx93wGuugHw0FbxMc74fs3LNo=
+go.opentelemetry.io/otel/exporters/zipkin v1.9.0/go.mod h1:HyIvYIu37wV4Wx5azd7e05x9k/dOz9KB4x0plw2QNvs=
 go.opentelemetry.io/otel/exporters/zipkin v1.10.0/go.mod h1:HdfvgwcOoCB0+zzrTHycW6btjK0zNpkz2oTGO815SCI=
 go.opentelemetry.io/otel/exporters/zipkin v1.11.0 h1:v/Abo5REOWrCj4zcEIUHFZtXpsCVjrwZj28iyX2rHXE=
 go.opentelemetry.io/otel/exporters/zipkin v1.11.0/go.mod h1:unWnsLCMYfINP8ue0aXVrB/GYHoXNn/lbTnupvLekGQ=
 go.opentelemetry.io/otel/sdk v1.0.0/go.mod h1:PCrDHlSy5x1kjezSdL37PhbFUMjrsLRshJ2zCzeXwbM=
 go.opentelemetry.io/otel/sdk v1.3.0/go.mod h1:rIo4suHNhQwBIPg9axF8V9CA72Wz2mKF1teNrup8yzs=
 go.opentelemetry.io/otel/sdk v1.8.0/go.mod h1:uPSfc+yfDH2StDM/Rm35WE8gXSNdvCg023J6HeGNO0c=
+go.opentelemetry.io/otel/sdk v1.9.0/go.mod h1:AEZc8nt5bd2F7BC24J5R0mrjYnpEgYHyTcM/vrSple4=
 go.opentelemetry.io/otel/sdk v1.10.0/go.mod h1:vO06iKzD5baltJz1zarxMCNHFpUlUiOy4s65ECtn6kE=
 go.opentelemetry.io/otel/sdk v1.11.0 h1:ZnKIL9V9Ztaq+ME43IUi/eo22mNsb6a7tGfzaOWB5fo=
 go.opentelemetry.io/otel/sdk v1.11.0/go.mod h1:REusa8RsyKaq0OlyangWXaw97t2VogoO4SSEeKkSTAk=
@@ -1089,6 +1180,7 @@ go.opentelemetry.io/otel/trace v1.0.0/go.mod h1:PXTWqayeFUlJV1YDNhsJYB184+IvAH81
 go.opentelemetry.io/otel/trace v1.3.0/go.mod h1:c/VDhno8888bvQYmbYLqe41/Ldmr/KKunbvWM4/fEjk=
 go.opentelemetry.io/otel/trace v1.7.0/go.mod h1:fzLSB9nqR2eXzxPXb2JW9IKE+ScyXA48yyE4TNvoHqU=
 go.opentelemetry.io/otel/trace v1.8.0/go.mod h1:0Bt3PXY8w+3pheS3hQUt+wow8b1ojPaTBoTCh2zIFI4=
+go.opentelemetry.io/otel/trace v1.9.0/go.mod h1:2737Q0MuG8q1uILYm2YYVkAyLtOofiTNGg6VODnOiPo=
 go.opentelemetry.io/otel/trace v1.10.0/go.mod h1:Sij3YYczqAdz+EhmGhE6TpTxUO5/F/AzrK+kxfGqySM=
 go.opentelemetry.io/otel/trace v1.11.0 h1:20U/Vj42SX+mASlXLmSGBg6jpI1jQtv682lZtTAOVFI=
 go.opentelemetry.io/otel/trace v1.11.0/go.mod h1:nyYjis9jy0gytE9LXGU+/m1sHTKbRY0fX0hulNNDP1U=
@@ -1122,8 +1214,10 @@ golang.org/x/crypto v0.0.0-20190325154230-a5d413f7728c/go.mod h1:djNgcEr1/C05ACk
 golang.org/x/crypto v0.0.0-20190422162423-af44ce270edf/go.mod h1:WFFai1msRO1wXaEeE5yQxYXgSfI8pQAWXbQop6sCtWE=
 golang.org/x/crypto v0.0.0-20190510104115-cbcb75029529/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=
 golang.org/x/crypto v0.0.0-20190605123033-f99c8df09eb5/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=
+golang.org/x/crypto v0.0.0-20190611184440-5c40567a22f8/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=
 golang.org/x/crypto v0.0.0-20191002192127-34f69633bfdc/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=
 golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=
+golang.org/x/crypto v0.0.0-20191205180655-e7c4368fe9dd/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto=
 golang.org/x/crypto v0.0.0-20200302210943-78000ba7a073/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto=
 golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto=
 golang.org/x/crypto v0.0.0-20201002170205-7f63de1d35b0/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto=
@@ -1170,6 +1264,7 @@ golang.org/x/mod v0.4.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
 golang.org/x/mod v0.4.1/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
 golang.org/x/mod v0.4.2/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
 golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4=
+golang.org/x/net v0.0.0-20180218175443-cbe0f9307d01/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
 golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
 golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
 golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
@@ -1295,6 +1390,7 @@ golang.org/x/sys v0.0.0-20190502145724-3ef323f4f1fd/go.mod h1:h1NjWce9XRLGQEsW7w
 golang.org/x/sys v0.0.0-20190507160741-ecd444e8653b/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
 golang.org/x/sys v0.0.0-20190531175056-4c3a928424d2/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
 golang.org/x/sys v0.0.0-20190606165138-5da285871e9c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
+golang.org/x/sys v0.0.0-20190616124812-15dcb6c0061f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
 golang.org/x/sys v0.0.0-20190624142023-c5567b49c5d0/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
 golang.org/x/sys v0.0.0-20190726091711-fc99dfbffb4e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
 golang.org/x/sys v0.0.0-20190904154756-749cb33beabd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
@@ -1327,6 +1423,7 @@ golang.org/x/sys v0.0.0-20200728102440-3e129f6d46b1/go.mod h1:h1NjWce9XRLGQEsW7w
 golang.org/x/sys v0.0.0-20200803210538-64077c9b5642/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
 golang.org/x/sys v0.0.0-20200905004654-be1d3432aa8f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
 golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
+golang.org/x/sys v0.0.0-20201112073958-5cba982894dd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
 golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
 golang.org/x/sys v0.0.0-20201201145000-ef89a241ccb3/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
 golang.org/x/sys v0.0.0-20210104204734-6f8348627aad/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
@@ -1395,7 +1492,9 @@ golang.org/x/time v0.0.0-20180412165947-fbb02b2291d2/go.mod h1:tRJNPiyCQ0inRvYxb
 golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
 golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
 golang.org/x/time v0.0.0-20191024005414-555d28b269f0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
+golang.org/x/time v0.0.0-20200630173020-3af7569d3a1e/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
 golang.org/x/time v0.0.0-20210723032227-1f47c861a9ac/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
+golang.org/x/time v0.0.0-20211116232009-f0f3c7e86c11/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
 golang.org/x/time v0.0.0-20220411224347-583f2d630306/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
 golang.org/x/time v0.3.0 h1:rg5rLMjNzMS1RkNLzCG38eapWhnYLFYXDXj2gOlr8j4=
 golang.org/x/time v0.3.0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
@@ -1416,6 +1515,7 @@ golang.org/x/tools v0.0.0-20190506145303-2d16b83fe98c/go.mod h1:RgjU9mgBXZiqYHBn
 golang.org/x/tools v0.0.0-20190524140312-2c0ae7006135/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q=
 golang.org/x/tools v0.0.0-20190531172133-b3315ee88b7d/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc=
 golang.org/x/tools v0.0.0-20190606124116-d0a3d012864b/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc=
+golang.org/x/tools v0.0.0-20190614205625-5aca471b1d59/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc=
 golang.org/x/tools v0.0.0-20190621195816-6e04913cbbac/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc=
 golang.org/x/tools v0.0.0-20190628153133-6cdbf07be9d0/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc=
 golang.org/x/tools v0.0.0-20190816200558-6889da9d5479/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
@@ -1445,8 +1545,10 @@ golang.org/x/tools v0.0.0-20200410132612-ae9902aceb98/go.mod h1:EkVYQZoAsY45+roY
 golang.org/x/tools v0.0.0-20200501065659-ab2804fb9c9d/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE=
 golang.org/x/tools v0.0.0-20200512131952-2bc93b1c0c88/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE=
 golang.org/x/tools v0.0.0-20200515010526-7d3b6ebf133d/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE=
+golang.org/x/tools v0.0.0-20200522201501-cb1345f3a375/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE=
 golang.org/x/tools v0.0.0-20200618134242-20370b0cb4b2/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE=
 golang.org/x/tools v0.0.0-20200619180055-7c47624df98f/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE=
+golang.org/x/tools v0.0.0-20200717024301-6ddee64345a6/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA=
 golang.org/x/tools v0.0.0-20200729194436-6467de6f59a7/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA=
 golang.org/x/tools v0.0.0-20200804011535-6c149bb5ef0d/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA=
 golang.org/x/tools v0.0.0-20200825202427-b303f430e36d/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA=
@@ -1695,6 +1797,7 @@ google.golang.org/protobuf v1.23.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2
 google.golang.org/protobuf v1.23.1-0.20200526195155-81db48ad09cc/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU=
 google.golang.org/protobuf v1.24.0/go.mod h1:r/3tXBNzIEhYS9I1OUVjXDlt8tc493IdKGjtUeSXeh4=
 google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlbajtzgsN7c=
+google.golang.org/protobuf v1.25.1-0.20200805231151-a709e31e5d12/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlbajtzgsN7c=
 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=
 google.golang.org/protobuf v1.27.1/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc=
@@ -1751,19 +1854,25 @@ honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWh
 honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt0JzvZhAg=
 honnef.co/go/tools v0.0.1-2020.1.3/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k=
 honnef.co/go/tools v0.0.1-2020.1.4/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k=
+k8s.io/api v0.20.12/go.mod h1:A2brwyEkVLM3wQGNnzoAa5JsQRzHK0uoOQ+bsnv7V68=
 k8s.io/api v0.22.9 h1:PidjRtgd0zDa6SvyooBLH/SP62uOhEBY0kx0UYRGr1o=
 k8s.io/api v0.22.9/go.mod h1:rcjO/FPOuvc3x7nQWx29UcDrFJMx82RxDob71ntNH4A=
+k8s.io/apimachinery v0.20.12/go.mod h1:uM7hCI0NyBymUwgshMgZyte475lxhr+QH6h3cvdnzEc=
 k8s.io/apimachinery v0.22.9 h1:5qjnpBk6eC9me0SAzokCUMI0KVF2PENK1PnykF8/Gjo=
 k8s.io/apimachinery v0.22.9/go.mod h1:ZvVLP5iLhwVFg2Yx9Gh5W0um0DUauExbRhe+2Z8I1EU=
+k8s.io/client-go v0.20.12/go.mod h1:NBJj6Evp73Xy/4v/O/RDRaH0+3JoxNfjRxkyRgrdbsA=
 k8s.io/client-go v0.22.9 h1:5p2R2LsoBfaE6QnXfWFmyyvxrFXtfegUGRMZSpTI+Q8=
 k8s.io/client-go v0.22.9/go.mod h1:IoH7exYnoH/zgvHOuVxh2c4yJepcCBt72FzCTisOc4k=
 k8s.io/gengo v0.0.0-20200413195148-3a45101e95ac/go.mod h1:ezvh/TsK7cY6rbqRK0oQQ8IAqLxYwwyPxAX1Pzy0ii0=
 k8s.io/klog/v2 v2.0.0/go.mod h1:PBfzABfn139FHAV07az/IF9Wp1bkk3vpT2XSJ76fSDE=
+k8s.io/klog/v2 v2.4.0/go.mod h1:Od+F08eJP+W3HUb4pSrPpgp9DGU4GzlpG/TmITuYh/Y=
 k8s.io/klog/v2 v2.9.0/go.mod h1:hy9LJ/NvuK+iVyP4Ehqva4HxZG/oXyIS3n3Jmire4Ec=
 k8s.io/klog/v2 v2.40.1/go.mod h1:y1WjHnz7Dj687irZUWR/WLkLc5N1YHtjLdmgWjndZn0=
 k8s.io/klog/v2 v2.80.1 h1:atnLQ121W371wYYFawwYx1aEY2eUfs4l3J72wtgAwV4=
 k8s.io/klog/v2 v2.80.1/go.mod h1:y1WjHnz7Dj687irZUWR/WLkLc5N1YHtjLdmgWjndZn0=
+k8s.io/kube-openapi v0.0.0-20201113171705-d219536bb9fd/go.mod h1:WOJ3KddDSol4tAGcJo0Tvi+dK12EcqSLqcWsryKMpfM=
 k8s.io/kube-openapi v0.0.0-20211109043538-20434351676c/go.mod h1:vHXdDvt9+2spS2Rx9ql3I8tycm3H9FDfdUoIuKCefvw=
+k8s.io/utils v0.0.0-20201110183641-67b214c5f920/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA=
 k8s.io/utils v0.0.0-20211116205334-6203023598ed/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA=
 k8s.io/utils v0.0.0-20220706174534-f6158b442e7c/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA=
 k8s.io/utils v0.0.0-20221108210102-8e77b1f39fe2 h1:GfD9OzL11kvZN5iArC6oTS7RTj7oJOIfnislxYlqTj8=
@@ -1772,6 +1881,7 @@ rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8
 rsc.io/quote/v3 v3.1.0/go.mod h1:yEA65RcK8LyAZtP9Kv3t0HmxON59tX3rD+tICJqUlj0=
 rsc.io/sampler v1.3.0/go.mod h1:T1hPZKmBbMNahiBKFy5HrXp6adAjACjK9JXDnKaTXpA=
 sigs.k8s.io/structured-merge-diff/v4 v4.0.2/go.mod h1:bJZC9H9iH24zzfZ/41RGcq60oK1F7G282QMXDPYydCw=
+sigs.k8s.io/structured-merge-diff/v4 v4.1.2/go.mod h1:j/nl6xW8vLS49O8YvXW1ocPhZawJtm+Yrr7PPRQ0Vg4=
 sigs.k8s.io/structured-merge-diff/v4 v4.2.1 h1:bKCqE9GvQ5tiVHn5rfn1r+yao3aLQEaLzkkmAkf+A6Y=
 sigs.k8s.io/structured-merge-diff/v4 v4.2.1/go.mod h1:j/nl6xW8vLS49O8YvXW1ocPhZawJtm+Yrr7PPRQ0Vg4=
 sigs.k8s.io/yaml v1.1.0/go.mod h1:UJmg0vDUVViEyp3mgSv9WPwZCDxu4rQW1olrI1uml+o=

+ 1 - 1
src/jfw/modules/bigmember/src/service/analysis/decision.go

@@ -79,7 +79,7 @@ func (this *Analysis) TrialInfo() {
 	userId, _ := this.GetSession("userId").(string)
 	rData, errMsg := func() (interface{}, error) {
 		//userInfo, ok := db.Mgo.FindById(C_User, userId, nil)
-		baseMsg := jy.GetBigVipUserBaseMsg("10000", this.Session(), config.Config.Etcd.Key, config.Config.Etcd.Key)
+		baseMsg := jy.GetBigVipUserBaseMsg( this.Session(),*config.Middleground)
 
 		if baseMsg == nil {
 			return -2, nil

+ 1 - 1
src/jfw/modules/bigmember/src/service/analysis/forecastproject.go

@@ -187,7 +187,7 @@ func (this *Analysis) ForPContent() {
 				}
 			}
 			power := []int{}
-			powerMap := jy.GetBigVipUserBaseMsg("10000", this.Session(), config.Config.Etcd.Key, config.Config.Etcd.Key).PowerMap
+			powerMap := jy.GetBigVipUserBaseMsg( this.Session(),*config.Middleground).PowerMap
 			for k, _ := range powerMap {
 				power = append(power, k)
 			}

+ 1 - 1
src/jfw/modules/bigmember/src/service/analysis/potential.go

@@ -168,7 +168,7 @@ func (this *Analysis) CsORRsList() {
 				log.Println("大会员初始化 企业名称有误-", userId, main_userId)
 			}
 			//userInfo, ok := db.Mgo.FindById(C_User, main_userId, nil)
-			userInfo := jy.GetBigVipUserBaseMsg("10000", this.Session(), config.Config.Etcd.Key, config.Config.Etcd.Key)
+			userInfo := jy.GetBigVipUserBaseMsg( this.Session(),*config.Middleground)
 
 			if userInfo != nil {
 				var isTrial = userInfo.Status == 4

+ 1 - 1
src/jfw/modules/bigmember/src/service/analysis/util.go

@@ -46,7 +46,7 @@ func (this *SelectC) UserStatusChecked() bool {
         if this.PCOR == "R" {
                 serviceId = 8
         }
-        userPower := jy.GetBigVipUserBaseMsg("10000", this.Session, config.Config.Etcd.Key, config.Config.Etcd.Key)
+        userPower := jy.GetBigVipUserBaseMsg( this.Session, *config.Middleground)
 
         return userPower.Status > 0 && userPower.PowerMap[serviceId]
 }

+ 1 - 1
src/jfw/modules/bigmember/src/service/bidfile/bidfile.go

@@ -33,7 +33,7 @@ func (b *Bidfile) History() {
                 }
                 //获取用户权限详情
                 power := []int{}
-                bigPower := jy.GetBigVipUserBaseMsg("10000", b.Session(), config.Config.Etcd.Key, config.Config.Etcd.Key)
+                bigPower := jy.GetBigVipUserBaseMsg( b.Session(),*config.Middleground)
                 for k, _ := range bigPower.PowerMap {
                         power = append(power, k)
                 }

+ 1 - 1
src/jfw/modules/bigmember/src/service/follow/projectPdf.go

@@ -123,7 +123,7 @@ func (this *FollowProject) GetPdfDetail() {
 
 //校验是否是付费用户
 func checkPay(session *httpsession.Session) bool {
-	bigPower := jy.GetBigVipUserBaseMsg("10000", session, config.Config.Etcd.Key, config.Config.Etcd.Key)
+	bigPower := jy.GetBigVipUserBaseMsg( session,*config.Middleground)
 	//userId := qutil.InterfaceToStr(session.Get("userId"))
 	if bigPower.Status > 0 || bigPower.VipStatus > 0 {
 		return true

+ 2 - 2
src/jfw/modules/bigmember/src/service/portrait/subvipPortraitAction.go

@@ -218,7 +218,7 @@ func (this *SubVipPortrait) SubVipPortrait() {
 func (this *SubVipPortrait) PortraitUsage() {
         userId := qutil.ObjToString(this.GetSession("userId"))
         rData, errMsg := func() (interface{}, error) {
-                bigMsg := jy.GetBigVipUserBaseMsg("10000", this.Session(), config.Config.Etcd.Key, config.Config.Etcd.Key)
+                bigMsg := jy.GetBigVipUserBaseMsg( this.Session(),*config.Middleground)
 
                 if bigMsg.VipStatus <= 0 && bigMsg.Vip_BuySet.Upgrade != 1 {
                         return nil, fmt.Errorf("非法请求")
@@ -263,7 +263,7 @@ func (this *SubVipPortrait) PortraitRecord() {
                 if pageSize < 1 || pageSize > 50 {
                         pageSize = 50
                 }
-                bigMsg := jy.GetBigVipUserBaseMsg("10000", this.Session(), config.Config.Etcd.Key, config.Config.Etcd.Key)
+                bigMsg := jy.GetBigVipUserBaseMsg( this.Session(),*config.Middleground)
                 if bigMsg.VipStatus <= 0 && bigMsg.Vip_BuySet.Upgrade != 1 {
                         return nil, fmt.Errorf("非法请求")
                 }

+ 6 - 6
src/jfw/modules/bigmember/src/service/push/push.go

@@ -39,7 +39,7 @@ type pushSet struct {
 //4.6.0修改 只把有权益的存入map返给前端, k:权益 v:是否开启
 func (a *Action) Items() {
 	//userId, _ := a.GetSession("userId").(string)
-	bigMsg := jy.GetBigVipUserBaseMsg("10000", a.Session(), config.Config.Etcd.Hosts, config.Config.Etcd.Key)
+	bigMsg := jy.GetBigVipUserBaseMsg( a.Session(), *config.Middleground)
 	subScribeInfo := jy.GetSubScribeInfo(a.Session(), Mgo, "m", "10000")
 	//2222
 	/*user, _ := Mgo.FindById(C_User, userId, `{"i_member_status":1,"i_vip_status":1,"s_phone":1,"s_m_phone":1,"o_member_jy":1}`)
@@ -96,7 +96,7 @@ func (a *Action) Detail() {
 		return
 	}
 	var data M
-	bigMsg := jy.GetBigVipUserBaseMsg("10000", a.Session(), config.Config.Etcd.Hosts, config.Config.Etcd.Key)
+	bigMsg := jy.GetBigVipUserBaseMsg( a.Session(), *config.Middleground)
 	switch a.GetString("item") {
 	case "member_subscribe":
 		o_member_jy := jy.GetSubScribeInfo(a.Session(), Mgo, "m", "10000")
@@ -115,8 +115,8 @@ func (a *Action) Detail() {
 			"wxpush":         util.IntAll((*o_member_jy)["i_wxpush"]),
 		}
 		power := []int{}
-		BigMsg := jy.GetBigVipUserBaseMsg("10000", a.Session(), config.Config.Etcd.Key, config.Config.Etcd.Key)
-		for k, _ := range BigMsg.PowerMap {
+		BigMsg := jy.GetBigVipUserBaseMsg( a.Session(),*config.Middleground)
+		for k,_ := range BigMsg.PowerMap {
 			power = append(power, k)
 		}
 		data["power"] = power
@@ -428,8 +428,8 @@ func OpenStatus(ojy map[string]interface{}, types string, BigMsg *jy.BigVipBaseM
 			"follow_ent":     util.IntAllDef(ojy["i_follow_ent"], 1),
 		}
 		power := []int{}
-		//BigMsg := jy.GetBigVipUserBaseMsg("10000", session, config.Config.Etcd.Key, config.Config.Etcd.Key)
-		for k, _ := range BigMsg.PowerMap {
+		//BigMsg := jy.GetBigVipUserBaseMsg( session,*config.Middleground)
+		for k := range BigMsg.PowerMap {
 			power = append(power, k)
 		}
 		//潜在项目预测

+ 2 - 2
src/jfw/modules/bigmember/src/service/report/marketAnalysis.go

@@ -32,7 +32,7 @@ func checkPower(session *httpsession.Session) (string, error) {
                 return "", fmt.Errorf("未登录")
         }
         //仅购买《周报/月报/定制化市场分析报告》的大会员有权限
-        bigMeg := jy.GetBigVipUserBaseMsg("10000", session, config.Config.Etcd.Key, config.Config.Etcd.Key)
+        bigMeg := jy.GetBigVipUserBaseMsg( session,*config.Middleground)
         return bigMeg.Pid, nil
 }
 
@@ -161,7 +161,7 @@ func (this *MarketAnalysis) AnalysisKeyWord() {
                         i_member_endtime = qutil.IntAll((*data)["i_member_endtime"])
                         registedate = (*data)["l_registedate"].(int64)
                 } else {
-                        bigVipBaseMsg := jy.GetBigVipUserBaseMsg("10000", this.Session(), config.Config.Etcd.Hosts, config.Config.Etcd.Key)
+                        bigVipBaseMsg := jy.GetBigVipUserBaseMsg( this.Session(), *config.Middleground)
                         i_member_status = bigVipBaseMsg.Data.Member.Status
                         i_vip_status = bigVipBaseMsg.Data.Member.Status
                         o_member_jy = jy.GetSubScribeInfo(this.Session(), db.Mgo, "m", "10000")

+ 2 - 2
src/jfw/modules/bigmember/src/service/report/report.go

@@ -109,7 +109,7 @@ func (r *Report) Index() {
 	positionType := qutil.Int64All(r.GetSession("positionType"))
 	o_mb := &map[string]interface{}{}
 	if positionType == 0 {
-		data := jy.GetBigVipUserBaseMsg("10000", r.Session(), config.Config.Etcd.Hosts, config.Config.Etcd.Key)
+		data := jy.GetBigVipUserBaseMsg( r.Session(), *config.Middleground)
 		if data.Data.Member.Pid == "" {
 			//没有父级
 			o_mb := jy.GetSubScribeInfo(r.Session(), Mgo, "m", "10000")
@@ -586,7 +586,7 @@ func getColl(referer, t string) (string, string) {
 	}
 }
 func isFree(userId string, positionType int64, session *httpsession.Session) bool {
-	bigVipBaseMsg := jy.GetBigVipUserBaseMsg("10000", session, config.Config.Etcd.Hosts, config.Config.Etcd.Key)
+	bigVipBaseMsg := jy.GetBigVipUserBaseMsg( session, *config.Middleground)
 	if bigVipBaseMsg == nil {
 		return true
 	} else if bigVipBaseMsg.Data.Vip.Status <= 0 && bigVipBaseMsg.Data.Member.Status <= 0 {

+ 1 - 1
src/jfw/modules/bigmember/src/service/subscribe/subscribe.go

@@ -49,7 +49,7 @@ func (s *Subscribe) FreeUserSubscribe() {
 	}
 	t := time.Now()
 	redisKey := fmt.Sprintf("%d_%s_%d_freeSubscription_%s", t.Year(), t.Month(), t.Day(), userId)
-	bigMsg := jy.GetBigVipUserBaseMsg("10000", s.Session(), config.Config.Etcd.Hosts, config.Config.Etcd.Key)
+	bigMsg := jy.GetBigVipUserBaseMsg( s.Session(), *config.Middleground)
 	/*res, _ := db.Mgo.FindById(C_User, userId, `{"i_vip_status":1,"i_member_status":1,"s_m_phone":1,"s_phone":1,"o_jy":1,""l_search_prompt":1}`)
 	  isVip = qutil.IntAll((*res)["i_vip_status"]) > 0*/
 

+ 9 - 9
src/jfw/modules/bigmember/src/service/use/use.go

@@ -73,7 +73,7 @@ func (u *Use) SubPageMoveTip() {
                         		}
                         	}
                         }*/
-                        bigMsg := jy.GetBigVipUserBaseMsg("10000", u.Session(), config.Config.Etcd.Hosts, config.Config.Etcd.Key)
+                        bigMsg := jy.GetBigVipUserBaseMsg( u.Session(), *config.Middleground)
 
                         //后期需要更改
                         startTime := bigMsg.StartTime
@@ -172,7 +172,7 @@ func (u *Use) Add() {
                                         log.Println("add err:", userid, err)
                                 } else if followEntManager.HasPower {
                                         for k, v := range ids {
-                                                BigMsg := jy.GetBigVipUserBaseMsg("10000", u.Session(), config.Config.Etcd.Key, config.Config.Etcd.Key)
+                                                BigMsg := jy.GetBigVipUserBaseMsg( u.Session(),*config.Middleground)
                                                 if BigMsg.Status != 4 {
                                                         err = followEntManager.AddFollowEnt(v, "", true)
                                                         if err != nil {
@@ -247,7 +247,7 @@ func (u *Use) Info() {
                         i_member_starttime = qu.Int64All((*data)["i_member_starttime"])
                         i_member_endtime = qu.Int64All((*data)["i_member_endtime"])
                 } else {
-                        bigVipBaseMsg := jy.GetBigVipUserBaseMsg("10000", u.Session(), config.Config.Etcd.Hosts, config.Config.Etcd.Key)
+                        bigVipBaseMsg := jy.GetBigVipUserBaseMsg( u.Session(), *config.Middleground)
                         i_member_status = bigVipBaseMsg.Data.Member.Status
                         o_member_jy = jy.GetSubScribeInfo(u.Session(), db.Mgo, "m", "10000")
                         regtime = bigVipBaseMsg.Registedate
@@ -496,7 +496,7 @@ func (u *Use) Attachment() {
                         rep.Rep = []map[string]interface{}{}
                 }
                 m := rep.Rep
-                BaseMsg := jy.GetBigVipUserBaseMsg("10000", u.Session(), config.Config.Etcd.Key, config.Config.Etcd.Key)
+                BaseMsg := jy.GetBigVipUserBaseMsg( u.Session(),*config.Middleground)
                 status := BaseMsg.Status
                 if status <= 0 {
                         for _, v := range m {
@@ -543,7 +543,7 @@ func (u *Use) Equity() {
                 person, ok := db.Mgo.FindOneByField("user", map[string]interface{}{
                         "_id": mongodb.StringTOBsonId(userid),
                 }, `{"s_nickname":1,"s_headimageurl":1,"s_phone":1,"i_member_sub_status":1,"i_bidfileCount":1}`)
-                data := jy.GetBigVipUserBaseMsg("10000", u.Session(), config.Config.Etcd.Hosts, config.Config.Etcd.Key)
+                data := jy.GetBigVipUserBaseMsg( u.Session(), *config.Middleground)
                 isSubCount := false
                 if ok && person != nil && len(*person) > 0 {
                         //有父级id 且 子账号是激活状态
@@ -586,7 +586,7 @@ func (u *Use) Equity() {
                         account := SubAccout(userid)          //子账号
                         surplus, _ := GetSurplusCount(userid) //剩余次数
                         power := []int{}                      //GetNewPower(userid)
-                        powerMap := jy.GetBigVipUserBaseMsg("10000", u.Session(), config.Config.Etcd.Key, config.Config.Etcd.Key).PowerMap
+                        powerMap := jy.GetBigVipUserBaseMsg( u.Session(),*config.Middleground).PowerMap
                         for k, _ := range powerMap {
                                 power = append(power, k)
                         }
@@ -834,8 +834,8 @@ func (u *Use) IsAdd() {
                   }
                   userInfo.CustomerService = config.Config.Customers
                   return Result{Data: userInfo}*/
-                //resp := grpc.PowerCheck.Check("10000", userid, baseUserId, accountId, entId)
-                bigPower := jy.GetBigVipUserBaseMsg("10000", u.Session(), config.Config.Etcd.Key, config.Config.Etcd.Key)
+                //resp := grpc.PowerCheck.Check( userid, baseUserId, accountId, entId)
+                bigPower := jy.GetBigVipUserBaseMsg( u.Session(),*config.Middleground)
                 userInfo = &UserInfo{
                         BigMemberStatus: bigPower.Status,
                         Combo:           level_map[bigPower.Status],
@@ -903,7 +903,7 @@ func (u *Use) Aiused_history() {
                 }
                 //获取用户权限详情
                 power := []int{} //GetNewPower(userid)
-                bigPower := jy.GetBigVipUserBaseMsg("10000", u.Session(), config.Config.Etcd.Key, config.Config.Etcd.Key)
+                bigPower := jy.GetBigVipUserBaseMsg( u.Session(),*config.Middleground)
                 for k, _ := range bigPower.PowerMap {
                         power = append(power, k)
                 }

+ 1 - 1
src/jfw/modules/bigmember/src/util/power.go

@@ -27,7 +27,7 @@ func MainUserId(session *httpsession.Session) (string, string, int) {
           		i_member_status = qutil.IntAll((*data)["i_member_status"])
           	}
           }*/
-        bigMsg := jy.GetBigVipUserBaseMsg("10000", session, config.Config.Etcd.Hosts, config.Config.Etcd.Key)
+        bigMsg := jy.GetBigVipUserBaseMsg( session, *config.Middleground)
         return bigMsg.Data.Member.Pid, "phone", bigMsg.Status
 }
 

+ 1 - 5
src/jfw/modules/distribution/src/config.json

@@ -99,9 +99,5 @@
   "regurl": [
     "^distribution/share/shareLink$"
   ],
-  "smsServiceRpc": "127.0.0.1:932",
-  "etcd": {
-    "hosts": "192.168.3.206:27080",
-    "key": "powercheck.rpc"
-  }
+  "smsServiceRpc": "127.0.0.1:932"
 }

+ 4 - 0
src/jfw/modules/distribution/src/config.yaml

@@ -0,0 +1,4 @@
+etcd:
+  hosts:
+  - 127.0.0.1:2379
+powerCheckCenterKey: "powercheck.rpc" #权益校验中台

+ 12 - 1
src/jfw/modules/distribution/src/go.mod

@@ -4,8 +4,9 @@ go 1.18
 
 require (
 	app.yhyue.com/moapp/jybase v0.0.0-20230117032034-ad7c00ffe11a
-	app.yhyue.com/moapp/jypkg v0.0.0-20230131063426-ccffb86d71ba
+	app.yhyue.com/moapp/jypkg v0.0.0-20230202093215-bbde67e76cae
 	github.com/SKatiyar/qr v0.0.0-20151201054752-25b6bdf44e67
+	github.com/gogf/gf/v2 v2.0.6
 	github.com/tealeg/xlsx v1.0.5
 )
 
@@ -13,9 +14,12 @@ require (
 	app.yhyue.com/moapp/esv1 v0.0.0-20220414031211-3da4123e648d // indirect
 	app.yhyue.com/moapp/message v0.0.0-20221223100203-6402e389d9ae // indirect
 	bp.jydev.jianyu360.cn/BaseService/powerCheckCenter v0.0.0-20230128033309-a6b26e74a68c // indirect
+	bp.jydev.jianyu360.cn/BaseService/userCenter v0.0.0-20230129060002-f69424aa14ba // indirect
+	github.com/BurntSushi/toml v0.4.1 // indirect
 	github.com/beorn7/perks v1.0.1 // indirect
 	github.com/cenkalti/backoff/v4 v4.1.3 // indirect
 	github.com/cespare/xxhash/v2 v2.1.2 // indirect
+	github.com/clbanning/mxj/v2 v2.5.5 // indirect
 	github.com/coreos/go-semver v0.3.0 // indirect
 	github.com/coreos/go-systemd/v22 v22.3.2 // indirect
 	github.com/davecgh/go-spew v1.1.1 // indirect
@@ -23,6 +27,7 @@ require (
 	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/fsnotify/fsnotify v1.5.1 // indirect
 	github.com/garyburd/redigo v1.6.2 // indirect
 	github.com/go-logr/logr v1.2.3 // indirect
 	github.com/go-logr/stdr v1.2.2 // indirect
@@ -38,19 +43,24 @@ require (
 	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/gorilla/websocket v1.5.0 // indirect
+	github.com/grokify/html-strip-tags-go v0.0.1 // indirect
 	github.com/grpc-ecosystem/grpc-gateway/v2 v2.7.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/json-iterator/go v1.1.12 // indirect
 	github.com/klauspost/compress v1.13.6 // indirect
+	github.com/longbridgeapp/sqlparser v0.3.1 // 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.13 // indirect
 	github.com/matttproud/golang_protobuf_extensions v1.0.2-0.20181231171920-c182affec369 // 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/nsqio/go-nsq v1.1.0 // indirect
+	github.com/olekukonko/tablewriter v0.0.5 // indirect
 	github.com/olivere/elastic v6.2.37+incompatible // indirect
 	github.com/openzipkin/zipkin-go v0.4.0 // indirect
 	github.com/pelletier/go-toml/v2 v2.0.6 // indirect
@@ -59,6 +69,7 @@ require (
 	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/rivo/uniseg v0.2.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

+ 112 - 2
src/jfw/modules/distribution/src/go.sum

@@ -1,15 +1,38 @@
 app.yhyue.com/moapp/esv1 v0.0.0-20220414031211-3da4123e648d h1:WPsYuuptAd3UEgN+jPzpnsDe/OvcshDUUtOTZPYGSJ8=
 app.yhyue.com/moapp/esv1 v0.0.0-20220414031211-3da4123e648d/go.mod h1:91/lSD/hS+ckMVP3WdidRzDhC60lLMdyce9QHy0cSMA=
+app.yhyue.com/moapp/jyInfo v1.0.0/go.mod h1:+RjyGNvk7PT1P8cglkVlaj1lLlBXuPB+f5LipoOtgPs=
 app.yhyue.com/moapp/jyPoints v1.1.1/go.mod h1:SvP8p5L3jGrejHiH2LXfgCg/NPlFiKBC5Yd0gsI12FU=
+app.yhyue.com/moapp/jybase v0.0.0-20220415064050-37ce64b3e2d4/go.mod h1:qNRA0sHuYqcLoYoP8irpaWnW9YsXixe6obBIkwaXpD0=
+app.yhyue.com/moapp/jybase v0.0.0-20220418104200-46c3fff161c7/go.mod h1:qNRA0sHuYqcLoYoP8irpaWnW9YsXixe6obBIkwaXpD0=
+app.yhyue.com/moapp/jybase v0.0.0-20220419023055-f406279ff7e3/go.mod h1:qNRA0sHuYqcLoYoP8irpaWnW9YsXixe6obBIkwaXpD0=
+app.yhyue.com/moapp/jybase v0.0.0-20220420032112-668025915ee4/go.mod h1:qNRA0sHuYqcLoYoP8irpaWnW9YsXixe6obBIkwaXpD0=
+app.yhyue.com/moapp/jybase v0.0.0-20220421060131-a1001013ba46/go.mod h1:qNRA0sHuYqcLoYoP8irpaWnW9YsXixe6obBIkwaXpD0=
 app.yhyue.com/moapp/jybase v0.0.0-20220427020729-974c1a148186/go.mod h1:qNRA0sHuYqcLoYoP8irpaWnW9YsXixe6obBIkwaXpD0=
+app.yhyue.com/moapp/jybase v0.0.0-20220719064915-2fef79005dfa/go.mod h1:FjBF25AYoBrPhVKTXGXWcmEAbBT0ATTK6KJMOA+I80Q=
+app.yhyue.com/moapp/jybase v0.0.0-20220802080941-07f401baab8b/go.mod h1:HelrO6tcD9TcKb/HOP2BLbzppyDz2kpQSFhPMQTUgbQ=
+app.yhyue.com/moapp/jybase v0.0.0-20230109015757-aa3d5e19b196/go.mod h1:zB47XTeJvpcbtBRYgkQuxOICWNexiZfbUO+7aUf6mNs=
 app.yhyue.com/moapp/jybase v0.0.0-20230117032034-ad7c00ffe11a h1:wD4aWPSYdiX1cIP4lzzPD2s7fYhKa3muIf97l9tonJE=
 app.yhyue.com/moapp/jybase v0.0.0-20230117032034-ad7c00ffe11a/go.mod h1:zB47XTeJvpcbtBRYgkQuxOICWNexiZfbUO+7aUf6mNs=
-app.yhyue.com/moapp/jypkg v0.0.0-20230131063426-ccffb86d71ba h1:qHooCBLdOZy7+HcnKz91t3sBP7Pj9C1HJrTmoIL5Z7Y=
-app.yhyue.com/moapp/jypkg v0.0.0-20230131063426-ccffb86d71ba/go.mod h1:pP5ndkkN1EsVVEL3A+ji/ll1crBtnOAqb2JNw1aAPvI=
+app.yhyue.com/moapp/jypkg v0.0.0-20230202093215-bbde67e76cae h1:vd5a1L01MVMfHkycc4xONzVnEpHrlvD19VxUWdWkocA=
+app.yhyue.com/moapp/jypkg v0.0.0-20230202093215-bbde67e76cae/go.mod h1:NrRgv24VIpf/xMMvsGC1EgoD+z6z5ea3MqIVxEcSPhE=
 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/BP/jynsq v0.0.0-20220222052708-ebc43af90698/go.mod h1:ojo/AUH9Yr1wzarEjOaNMkj1Cet/9r8IgLyba64Z52E=
+bp.jydev.jianyu360.cn/BaseService/gateway v0.0.0-20220419090715-88ddb32961be/go.mod h1:Yj4oabIGItuMoF0BXYLz2XAnF581kxgXBrvlUtIJrkI=
+bp.jydev.jianyu360.cn/BaseService/gateway v1.3.4/go.mod h1:BMLd/5wb3BIEGhnEgF9y1sJN9P5/Dw9kYsoiE9V8I9g=
 bp.jydev.jianyu360.cn/BaseService/powerCheckCenter v0.0.0-20230128033309-a6b26e74a68c h1:g49jOlhZlBCJ3IgJA0rotfNf2Gh22pISffUtqxB8XtY=
 bp.jydev.jianyu360.cn/BaseService/powerCheckCenter v0.0.0-20230128033309-a6b26e74a68c/go.mod h1:5nimT8GJh46AyfeeDeyRlDQygMlO7TRM8Pwm41Gxemc=
+bp.jydev.jianyu360.cn/BaseService/resourceCenter v0.0.0-20220418005748-8ba5d936dd53/go.mod h1:E5lcDI3k4FESLxiAetCfWQTq8qfpy9cv0yN1oKoEO34=
+bp.jydev.jianyu360.cn/BaseService/resourceCenter v0.0.0-20220419023723-0b32d4a41751/go.mod h1:6KL5LMEku83uRbre0W/bj5kXG2I6pJGBFtktmtp51yM=
+bp.jydev.jianyu360.cn/BaseService/resourceCenter v0.0.0-20220419063004-233fc7ce006c/go.mod h1:6KL5LMEku83uRbre0W/bj5kXG2I6pJGBFtktmtp51yM=
+bp.jydev.jianyu360.cn/BaseService/resourceCenter v0.0.0-20220420075831-0b59892e9982/go.mod h1:wsHNO91h37H+xE4ZNny0yd7mtpODeDJxbVYhIRMR+qw=
+bp.jydev.jianyu360.cn/BaseService/resourceCenter v0.0.3/go.mod h1:Z353aucNO5hH4ZYjeKST3kE1PN3W8/uPc4J8s0Upz40=
+bp.jydev.jianyu360.cn/BaseService/resourceCenter v0.0.4/go.mod h1:rRiGzKG4F/fmkNxXQCxrkxNWc8yf1SmW8qWCKfGIQSM=
+bp.jydev.jianyu360.cn/BaseService/userCenter v0.0.0-20220418072311-2062bed1e700/go.mod h1:KjcrxTzM96tBc6G4B8tlLBn1lrVy5UJYF8+eTdP4xAE=
+bp.jydev.jianyu360.cn/BaseService/userCenter v0.0.0-20220421015128-4a36f3eac5c5/go.mod h1:GT0QC4aaKDuXxAvaU4G02XjCc31TU1ctqBGqxQYOfC4=
+bp.jydev.jianyu360.cn/BaseService/userCenter v0.0.0-20220905055615-8540037e1b06/go.mod h1:LS21iwbgP8i3ZHJ1n4yNpLXQ/nzEudUOk0klC6VM2dQ=
+bp.jydev.jianyu360.cn/BaseService/userCenter v0.0.0-20230129060002-f69424aa14ba h1:WATZdho/2XJ8DP3EuaSo10WiFrXRgxeLpmYoGEcSdMw=
+bp.jydev.jianyu360.cn/BaseService/userCenter v0.0.0-20230129060002-f69424aa14ba/go.mod h1:m7/aZ1r1FapNT2h3gqmCFVb0EV+CaJaNKNPHMzLHx8Y=
 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=
@@ -374,16 +397,23 @@ cloud.google.com/go/workflows v1.8.0/go.mod h1:ysGhmEajwZxGn1OhGOGKsTXc5PyxOc0vf
 cloud.google.com/go/workflows v1.9.0/go.mod h1:ZGkj1aFIOd9c8Gerkjjq7OW7I5+l6cSvT3ujaO/WwSA=
 dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU=
 github.com/Azure/go-autorest v14.2.0+incompatible/go.mod h1:r+4oMnoxhatjLLJ6zxSWATqVooLgysK6ZNox3g/xq24=
+github.com/Azure/go-autorest/autorest v0.11.1/go.mod h1:JFgpikqFJ/MleTTxwepExTKnFUKKszPS8UavbQYUMuw=
 github.com/Azure/go-autorest/autorest v0.11.18/go.mod h1:dSiJPy22c3u0OtOKDNttNgqpNFY/GeWa7GH/Pz56QRA=
+github.com/Azure/go-autorest/autorest/adal v0.9.0/go.mod h1:/c022QCutn2P7uY+/oQWWNcK9YU+MH96NgK+jErpbcg=
+github.com/Azure/go-autorest/autorest/adal v0.9.5/go.mod h1:B7KF7jKIeC9Mct5spmyCB/A8CG/sEz1vwIRGv/bbw7A=
 github.com/Azure/go-autorest/autorest/adal v0.9.13/go.mod h1:W/MM4U6nLxnIskrw4UwWzlHfGjwUS50aOsc/I3yuU8M=
 github.com/Azure/go-autorest/autorest/date v0.3.0/go.mod h1:BI0uouVdmngYNUzGWeSYnokU+TrmwEsOqdt8Y6sso74=
+github.com/Azure/go-autorest/autorest/mocks v0.4.0/go.mod h1:LTp+uSrOhSkaKrUy935gNZuuIPPVsHlr9DSOxSayd+k=
 github.com/Azure/go-autorest/autorest/mocks v0.4.1/go.mod h1:LTp+uSrOhSkaKrUy935gNZuuIPPVsHlr9DSOxSayd+k=
+github.com/Azure/go-autorest/logger v0.2.0/go.mod h1:T9E3cAhj2VqvPOtCYAvby9aBXkZmbF5NWuPV8+WeEW8=
 github.com/Azure/go-autorest/logger v0.2.1/go.mod h1:T9E3cAhj2VqvPOtCYAvby9aBXkZmbF5NWuPV8+WeEW8=
 github.com/Azure/go-autorest/tracing v0.6.0/go.mod h1:+vhtPC754Xsa23ID7GlGsrdKBpUA79WCAKPPZVC2DeU=
 github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU=
+github.com/BurntSushi/toml v0.4.1 h1:GaI7EiDXDRfa8VshkTj7Fym7ha+y8/XxIgD2okUIjLw=
 github.com/BurntSushi/toml v0.4.1/go.mod h1:CxXYINrC8qIiEnFrOxCa7Jy5BFHlXnUU2pbicEuybxQ=
 github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo=
 github.com/ClickHouse/clickhouse-go v1.4.3/go.mod h1:EaI/sW7Azgz9UATzd5ZdZHRUhHgv5+JMS9NSr2smCJI=
+github.com/ClickHouse/clickhouse-go v1.5.1/go.mod h1:EaI/sW7Azgz9UATzd5ZdZHRUhHgv5+JMS9NSr2smCJI=
 github.com/ClickHouse/clickhouse-go v1.5.4/go.mod h1:EaI/sW7Azgz9UATzd5ZdZHRUhHgv5+JMS9NSr2smCJI=
 github.com/ClickHouse/clickhouse-go/v2 v2.0.14/go.mod h1:iq2DUGgpA4BBki2CVwrF8x43zqBjdgHtbexkFkh5a6M=
 github.com/ClickHouse/clickhouse-go/v2 v2.2.0/go.mod h1:8f2XZUi7XoeU+uPIytSi1cvx8fmJxi7vIgqpvYTF1+o=
@@ -391,6 +421,7 @@ github.com/DATA-DOG/go-sqlmock v1.4.1/go.mod h1:f/Ixk793poVmq4qj/V1dPUg2JEAKC73Q
 github.com/DATA-DOG/go-sqlmock v1.5.0/go.mod h1:f/Ixk793poVmq4qj/V1dPUg2JEAKC73Q5eFN3EC/SaM=
 github.com/NYTimes/gziphandler v0.0.0-20170623195520-56545f4a5d46/go.mod h1:3wb06e3pkSAbeQ52E9H9iFoQsEEwGN64994WTCIhntQ=
 github.com/OneOfOne/xxhash v1.2.2/go.mod h1:HSdplMjZKSmBqAxg5vPj2TmRDmfkzw+cTzAElWljhcU=
+github.com/PuerkitoBio/goquery v1.5.1/go.mod h1:GsLWisAFVj4WgDibEWF4pvYnkVQBpKBKeU+7zCJoLcc=
 github.com/PuerkitoBio/purell v1.1.1/go.mod h1:c11w/QuzBsJSee3cPx9rAFu61PvFxuPbtSwDGJws/X0=
 github.com/PuerkitoBio/urlesc v0.0.0-20170810143723-de5bf2ad4578/go.mod h1:uGdkoq3SwY9Y+13GIhn11/XLaGBb4BfwItxLd5jeuXE=
 github.com/SKatiyar/qr v0.0.0-20151201054752-25b6bdf44e67 h1:x98/gnpyNAiuvg/gX3KgdfKxnZj3t9pIl3BCVJg3qwg=
@@ -408,9 +439,13 @@ github.com/alecthomas/units v0.0.0-20190924025748-f65c72e2690d/go.mod h1:rBZYJk5
 github.com/alicebob/gopher-json v0.0.0-20200520072559-a9ecdc9d1d3a h1:HbKu58rmZpUGpz5+4FfNmIU+FmZg2P3Xaj2v2bfNWmk=
 github.com/alicebob/gopher-json v0.0.0-20200520072559-a9ecdc9d1d3a/go.mod h1:SGnFV6hVsYE877CKEZ6tDNTjaSXYUk6QqoIK6PrAtcc=
 github.com/alicebob/miniredis/v2 v2.14.1/go.mod h1:uS970Sw5Gs9/iK3yBg0l9Uj9s25wXxSpQUE9EaJ/Blg=
+github.com/alicebob/miniredis/v2 v2.17.0/go.mod h1:gquAfGbzn92jvtrSC69+6zZnwSODVXVpYDRaGhWaL6I=
 github.com/alicebob/miniredis/v2 v2.22.0/go.mod h1:XNqvJdQJv5mSuVMc0ynneafpnL/zv52acZ6kqeS0t88=
+github.com/alicebob/miniredis/v2 v2.23.1/go.mod h1:84TWKZlxYkfgMucPBf5SOQBYJceZeQRFIaQgNMiCX6Q=
 github.com/alicebob/miniredis/v2 v2.30.0 h1:uA3uhDbCxfO9+DI/DuGeAMr9qI+noVWwGPNTFuKID5M=
 github.com/alicebob/miniredis/v2 v2.30.0/go.mod h1:84TWKZlxYkfgMucPBf5SOQBYJceZeQRFIaQgNMiCX6Q=
+github.com/aliyun/aliyun-oss-go-sdk v2.2.2+incompatible/go.mod h1:T/Aws4fEfogEE9v+HPhhw+CntffsBHJ8nXQCwKr0/g8=
+github.com/andybalholm/cascadia v1.1.0/go.mod h1:GsXiBklL0woXo1j/WYWtSYYC4ouU9PqHO0sqidkEA4Y=
 github.com/antihax/optional v0.0.0-20180407024304-ca021399b1a6/go.mod h1:V8iCPQYkqmusNa815XgQio277wI47sdRh1dUOLdyC6Q=
 github.com/antihax/optional v1.0.0/go.mod h1:uupD/76wgC+ih3iEmQUL+0Ugr19nfwCT1kdvxnR2qWY=
 github.com/antlr/antlr4 v0.0.0-20210105212045-464bcbc32de2/go.mod h1:T7PbCXFs94rrTttyxjbyT5+/1V8T2TYDejxUfHJjw1Y=
@@ -419,6 +454,7 @@ github.com/apache/thrift v0.12.0/go.mod h1:cp2SuWMxlEZw2r+iP2GNCdIi4C1qmUzdZFSVb
 github.com/asaskevich/govalidator v0.0.0-20190424111038-f61b66f89f4a/go.mod h1:lB+ZfQJz7igIIfQNfa7Ml4HSf2uFQQRzpGGRXenZAgY=
 github.com/aws/aws-sdk-go v1.34.28/go.mod h1:H7NKnBqNVzoTJpGfLrQkkD+ytBA93eiDYi/+8rV9s48=
 github.com/aws/aws-sdk-go v1.35.20/go.mod h1:tlPOdRjfxPBpNIwqDj61rmsnA85v9jc0Ps9+muhnW+k=
+github.com/baiyubin/aliyun-sts-go-sdk v0.0.0-20180326062324-cfa1a18b161f/go.mod h1:AuiFmCCPBSrqvVMvuqFuk0qogytodnVFVSN5CeJB8Gc=
 github.com/benbjohnson/clock v1.1.0 h1:Q92kusRqC1XV2MjkWETPvjJVqKetz1OzxZB7mHJLju8=
 github.com/benbjohnson/clock v1.1.0/go.mod h1:J11/hYXuz8f4ySSvYwY0FKfm+ezbsZBKZxNJlLklBHA=
 github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q=
@@ -437,6 +473,7 @@ github.com/cespare/xxhash/v2 v2.1.2/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XL
 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/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw=
 github.com/cloudflare/golz4 v0.0.0-20150217214814-ef862a3cdc58/go.mod h1:EOBUe0h4xcZ5GoxqC5SDxFQ8gwyZPKQoEzownBlhI80=
@@ -468,9 +505,11 @@ github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSs
 github.com/dchest/captcha v0.0.0-20200903113550-03f5f0333e1f h1:q/DpyjJjZs94bziQ7YkBmIlpqbVP7yw179rnzoNVX1M=
 github.com/dchest/captcha v0.0.0-20200903113550-03f5f0333e1f/go.mod h1:QGrK8vMWWHQYQ3QU9bw9Y9OPNfxccGzfb41qjvVeXtY=
 github.com/denisenkom/go-mssqldb v0.0.0-20190707035753-2be1aa521ff4/go.mod h1:zAg7JM8CkOJ43xKXIj7eRO9kmWm/TW578qo+oDO6tuM=
+github.com/denisenkom/go-mssqldb v0.0.0-20191124224453-732737034ffd/go.mod h1:xbL0rPBG9cCiLr28tMa8zpbdarY27NDyej4t/EjAShU=
 github.com/dgrijalva/jwt-go v3.2.0+incompatible/go.mod h1:E3ru+11k8xSBh+hMPgOLZmtrrCbhqsmaPHjLKYnJCaQ=
 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/docker/spdystream v0.0.0-20160310174837-449fdfce4d96/go.mod h1:Qh8CwZgvJUkLughtfhJv5dyTYa91l1fOUCrgjqmcifM=
 github.com/docopt/docopt-go v0.0.0-20180111231733-ee0de3bc6815/go.mod h1:WwZ+bS3ebgob9U8Nd0kOddGdZWjyMGR8Wziv+TBNwSE=
 github.com/donnie4w/go-logger v0.0.0-20170827050443-4740c51383f4/go.mod h1:L7S4x0R7vv3xoOhGuyAJyCO2MYzWOpccM4Isn8jIUgY=
 github.com/dustin/go-humanize v0.0.0-20171111073723-bb3d318650d4/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk=
@@ -492,9 +531,12 @@ github.com/envoyproxy/go-control-plane v0.9.9-0.20210512163311-63b5d3c536b0/go.m
 github.com/envoyproxy/go-control-plane v0.9.10-0.20210907150352-cf90f659a021/go.mod h1:AFq3mo9L8Lqqiid3OhADV3RfLJnjiw63cSpi+fDTRC0=
 github.com/envoyproxy/go-control-plane v0.10.2-0.20220325020618-49ff273808a1/go.mod h1:KJwIaB5Mv44NWtYuAOFCVOjcI94vtpEz2JU/D2v6IjE=
 github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c=
+github.com/erikstmartin/go-testdb v0.0.0-20160219214506-8d10e4a1bae5/go.mod h1:a2zkGnVExMxdzMo3M0Hi/3sEU+cWnZpSni0O6/Yb/P0=
+github.com/evanphx/json-patch v4.9.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk=
 github.com/evanphx/json-patch v4.11.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk=
 github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4=
 github.com/fatih/color v1.9.0/go.mod h1:eQcE1qtQxscV5RaZvpXrrb8Drkc3/DdQ+uUYCNjL+zU=
+github.com/fatih/color v1.10.0/go.mod h1:ELkj/draVOlAH/xkhN6mQ50Qd0MPOk5AAr3maGEBuJM=
 github.com/fatih/color v1.13.0 h1:8LOYc1KYPPmyKMuN8QV2DNRWNbLo6LZ0iLs8+mlH53w=
 github.com/fatih/color v1.13.0/go.mod h1:kLAiJbzzSOZDVNGyDpeOxJ47H46qBXwg5ILebYFFOfk=
 github.com/fatih/structtag v1.2.0/go.mod h1:mBJUNpUnHmRKrKlQQlmCrh5PuhftFbNv8Ys4/aAZl94=
@@ -509,9 +551,11 @@ github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMo
 github.com/fsnotify/fsnotify v1.4.9/go.mod h1:znqG4EE+3YCdAaPaxE2ZRY/06pZUdp0tY4IgpuI1SZQ=
 github.com/fsnotify/fsnotify v1.5.1 h1:mZcQUHVQUQWoPXXtuf9yuEXKudkV2sx1E06UadKWpgI=
 github.com/fsnotify/fsnotify v1.5.1/go.mod h1:T3375wBYaZdLLcVNkcVbzGHY7f1l/uK5T5Ai1i3InKU=
+github.com/fullstorydev/grpcurl v1.8.6/go.mod h1:WhP7fRQdhxz2TkL97u+TCb505sxfH78W1usyoB3tepw=
 github.com/fullstorydev/grpcurl v1.8.7/go.mod h1:pVtM4qe3CMoLaIzYS8uvTuDj2jVYmXqMUkZeijnXp/E=
 github.com/garyburd/redigo v1.6.2 h1:yE/pwKCrbLpLpQICzYTeZ7JsTA/C53wFTJHaEtRqniM=
 github.com/garyburd/redigo v1.6.2/go.mod h1:NR3MbYisc3/PwhQ00EMzDiPmrwpPxAn5GI05/YaO1SY=
+github.com/ghodss/yaml v0.0.0-20150909031657-73d445a93680/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04=
 github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04=
 github.com/globalsign/mgo v0.0.0-20181015135952-eeefdecb41b8/go.mod h1:xkRDCp4j0OGD1HRkm4kmhM+pmpv3AKq5SU7GMg4oO/Q=
 github.com/go-gl/glfw v0.0.0-20190409004039-e6da0acd62b1/go.mod h1:vR7hzQXu2zJy9AVAgeJqvqgH9Q5CA+iKCZ2gyEVpxRU=
@@ -526,6 +570,7 @@ github.com/go-logfmt/logfmt v0.4.0/go.mod h1:3RMwSq7FuexP4Kalkev3ejPJsZTpXXBr9+V
 github.com/go-logfmt/logfmt v0.5.0/go.mod h1:wCYkCAKZfumFQihp8CzCvQ3paCTfi41vtzG1KdI/P7A=
 github.com/go-logfmt/logfmt v0.5.1/go.mod h1:WYhtIu8zTZfxdn5+rREduYbwxfcBr/Vr6KEVveWlfTs=
 github.com/go-logr/logr v0.1.0/go.mod h1:ixOQHD9gLJUVQQ2ZOR7zLEifBX6tGkNJF4QyIY7sIas=
+github.com/go-logr/logr v0.2.0/go.mod h1:z6/tIYblkpsD+a4lm/fGIIU9mZ+XfAiaFtq7xTgseGU=
 github.com/go-logr/logr v0.4.0/go.mod h1:z6/tIYblkpsD+a4lm/fGIIU9mZ+XfAiaFtq7xTgseGU=
 github.com/go-logr/logr v1.2.0/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A=
 github.com/go-logr/logr v1.2.1/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A=
@@ -537,8 +582,12 @@ github.com/go-logr/stdr v1.2.2 h1:hSWxHoqTgW2S2qGc0LTAI563KZ5YKYRhT3MFKZMbjag=
 github.com/go-logr/stdr v1.2.2/go.mod h1:mMo/vtBO5dYbehREoey6XUKy/eSumjCCveDpRre4VKE=
 github.com/go-ole/go-ole v1.2.4/go.mod h1:XCwSNxSkXRo4vlyPy93sltvi/qJq0jqQhjqQNIwKuxM=
 github.com/go-ole/go-ole v1.2.6/go.mod h1:pprOEPIfldk/42T2oK7lQ4v4JSDwmV0As9GaiUsvbm0=
+github.com/go-openapi/jsonpointer v0.19.2/go.mod h1:3akKfEdA7DF1sugOqz1dVQHBcuDBPKZGEoHC/NkiQRg=
 github.com/go-openapi/jsonpointer v0.19.3/go.mod h1:Pl9vOtqEWErmShwVjC8pYs9cog34VGT37dQOVbmoatg=
+github.com/go-openapi/jsonreference v0.19.2/go.mod h1:jMjeRr2HHw6nAVajTXJ4eiUwohSTlpa0o73RUL1owJc=
 github.com/go-openapi/jsonreference v0.19.3/go.mod h1:rjx6GuL8TTa9VaixXglHmQmIL98+wF9xc8zWvFonSJ8=
+github.com/go-openapi/spec v0.19.3/go.mod h1:FpwSN1ksY1eteniUU7X0N/BgJ7a4WvBFVA8Lj9mJglo=
+github.com/go-openapi/swag v0.19.2/go.mod h1:POnQmlKehdgb5mhVOsnJFsivZCEZ/vjK9gh66Z9tfKk=
 github.com/go-openapi/swag v0.19.5/go.mod h1:POnQmlKehdgb5mhVOsnJFsivZCEZ/vjK9gh66Z9tfKk=
 github.com/go-redis/redis v6.15.7+incompatible/go.mod h1:NAIEuMOZ/fxfXJIrKDQDz8wamY7mA7PouImQ2Jvg6kA=
 github.com/go-redis/redis/v8 v8.11.4/go.mod h1:2Z2wHZXdQpCDXEGzqMockDpNyYvi2l4Pxt6RJr792+w=
@@ -552,6 +601,7 @@ github.com/go-sql-driver/mysql v1.7.0 h1:ueSltNNllEqE3qcWBTD0iQd3IpL/6U+mJxLkazJ
 github.com/go-sql-driver/mysql v1.7.0/go.mod h1:OXbVy3sEdcQ2Doequ6Z5BW6fXNQTmx+9S1MCJN5yJMI=
 github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY=
 github.com/go-task/slim-sprig v0.0.0-20210107165309-348f09dbbbc0/go.mod h1:fyg7847qk6SyHyPtNmDHnmrv/HOrqktSC+C9fM+CJOE=
+github.com/go-test/deep v1.0.7 h1:/VSMRlnY/JSyqxQUzQLKVMAskpY/NZKFA5j2P+0pP2M=
 github.com/go-test/deep v1.0.7/go.mod h1:QV8Hv/iy04NyLBxAdO9njL0iVPN1S4d/A3NVv1V36o8=
 github.com/go-xorm/builder v0.3.4/go.mod h1:KxkQkNN1DpPKTedxXyTQcmH+rXfvk4LZ9SOOBoZBAxw=
 github.com/go-xorm/sqlfiddle v0.0.0-20180821085327-62ce714f951a/go.mod h1:56xuuqnHyryaerycW3BfssRdxQstACi0Epw/yC5E2xM=
@@ -583,6 +633,7 @@ github.com/gobuffalo/syncx v0.0.0-20190224160051-33c29581e754/go.mod h1:HhnNqWY9
 github.com/godbus/dbus/v5 v5.0.3/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5xrFpKfA=
 github.com/godbus/dbus/v5 v5.0.4/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5xrFpKfA=
 github.com/gofrs/uuid v3.2.0+incompatible/go.mod h1:b2aQJv3Z4Fp6yNu3cdSllBxTCLRxnplIgP/c0N/04lM=
+github.com/gogf/gf/v2 v2.0.6 h1:2etb4FMpbQKWIJO+UjtIWrZUp01HUsFb6Po8pgizAWk=
 github.com/gogf/gf/v2 v2.0.6/go.mod h1:8uYzw7qNzuq8vrhVlWke1b1925FFqOJIgmyYW1sr/0M=
 github.com/gogo/protobuf v1.1.1/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ=
 github.com/gogo/protobuf v1.2.0/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ=
@@ -590,9 +641,11 @@ github.com/gogo/protobuf v1.2.1/go.mod h1:hp+jE20tsWTFYpLwKvXlhS1hjn+gTNwPg2I6zV
 github.com/gogo/protobuf v1.3.1/go.mod h1:SlYgWuQ5SjCEi6WLHjHCa1yvBfUnHcTbrrZtXPKa29o=
 github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q=
 github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q=
+github.com/golang-jwt/jwt/v4 v4.2.0/go.mod h1:/xlHOz8bRuivTWchD4jCa+NbatV+wEUSzwAxVc6locg=
 github.com/golang-jwt/jwt/v4 v4.4.2/go.mod h1:m21LjoU+eqJr34lmDMbreY2eSTRJ1cv77w39/MY0Ch0=
 github.com/golang-jwt/jwt/v4 v4.4.3 h1:Hxl6lhQFj4AnOX6MLrsCb/+7tCj7DxP7VA+2rDIq5AU=
 github.com/golang-jwt/jwt/v4 v4.4.3/go.mod h1:m21LjoU+eqJr34lmDMbreY2eSTRJ1cv77w39/MY0Ch0=
+github.com/golang-sql/civil v0.0.0-20190719163853-cb61b32ac6fe/go.mod h1:8vg3r2VgvsThLBIFL93Qb5yWzgyZWhEmBwUJWevAkK0=
 github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q=
 github.com/golang/glog v1.0.0 h1:nfP3RFugxnNRyKgeWd4oI1nYvXpxrx8ck8ZrcizshdQ=
 github.com/golang/glog v1.0.0/go.mod h1:EWib/APOK0SL3dFbYqvxE3UYd8E6s1ouQ7iEp/0LWV4=
@@ -698,10 +751,12 @@ github.com/googleapis/gax-go/v2 v2.3.0/go.mod h1:b8LNqSzNabLiUpXKkY7HAR5jr6bIT99
 github.com/googleapis/gax-go/v2 v2.4.0/go.mod h1:XOTVJ59hdnfJLIP/dh8n5CGryZR2LxK9wbMD5+iXC6c=
 github.com/googleapis/gax-go/v2 v2.5.1/go.mod h1:h6B0KMMFNtI2ddbGJn3T3ZbwkeT6yqEF02fYlzkUCyo=
 github.com/googleapis/gax-go/v2 v2.6.0/go.mod h1:1mjbznJAPHFpesgE5ucqfYEscaz5kMdcIDwU/6+DDoY=
+github.com/googleapis/gnostic v0.4.1/go.mod h1:LRhVm6pbyptWbWbuZ38d1eyptfvIytN3ir6b65WBswg=
 github.com/googleapis/gnostic v0.5.1/go.mod h1:6U4PtQXGIEt/Z3h5MAT7FNofLnw9vXk2cUuW7uA/OeU=
 github.com/googleapis/gnostic v0.5.5 h1:9fHAtK0uDfpveeqqo1hkEZJcFvYXAiCN3UutL8F9xHw=
 github.com/googleapis/gnostic v0.5.5/go.mod h1:7+EbHbldMins07ALC74bsA81Ovc97DwqyJO1AENw9kA=
 github.com/googleapis/go-type-adapters v1.0.0/go.mod h1:zHW75FOG2aur7gAO2B+MLby+cLsWGBF62rFAi7WjWO4=
+github.com/gordonklaus/ineffassign v0.0.0-20200309095847-7953dde2c7bf/go.mod h1:cuNKsD1zp2v6XfE/orVX2QE1LC+i254ceGcVeDT3pTU=
 github.com/gorilla/context v1.1.1/go.mod h1:kBGZzfjB9CEq2AlWe17Uuf7NDRt0dE0s8S51q0aT7Yg=
 github.com/gorilla/handlers v1.4.2/go.mod h1:Qkdc/uu4tH4g6mTK6auzZ766c4CA0Ng8+o/OAirnOIQ=
 github.com/gorilla/mux v1.6.2/go.mod h1:1lud6UwP+6orDFRuTfBEV8e9/aOM/c4fVVCaMa2zaAs=
@@ -711,8 +766,10 @@ github.com/gorilla/sessions v1.2.1/go.mod h1:dk2InVEVJ0sfLlnXv9EAgkf6ecYs/i80K/z
 github.com/gorilla/websocket v0.0.0-20170926233335-4201258b820c/go.mod h1:E7qHFY5m1UJ88s3WnNqhKjPHQ0heANvMoAMk2YaljkQ=
 github.com/gorilla/websocket v1.4.1/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE=
 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/gregjones/httpcache v0.0.0-20180305231024-9cad4c3443a7/go.mod h1:FecbI9+v66THATjSRHfNgh1IVFe/9kFxbXtjV0ctIMA=
+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/grpc-ecosystem/go-grpc-middleware v1.0.1-0.20190118093823-f849b5445de4/go.mod h1:FiyG127CGDf3tlThmgyCl78X/SZQqEOJBCDaAfeWzPs=
 github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0/go.mod h1:8NvIoxWQoOIhqOTXgfV/d3M/q6VIi02HzZEHgUlZvzk=
@@ -747,11 +804,15 @@ github.com/jcmturner/rpc/v2 v2.0.3/go.mod h1:VUJYCIDm3PVOEHw8sgt091/20OJjskO/YJk
 github.com/jhump/gopoet v0.0.0-20190322174617-17282ff210b3/go.mod h1:me9yfT6IJSlOL3FCfrg+L6yzUEZ+5jW6WHt4Sk+UPUI=
 github.com/jhump/gopoet v0.1.0/go.mod h1:me9yfT6IJSlOL3FCfrg+L6yzUEZ+5jW6WHt4Sk+UPUI=
 github.com/jhump/goprotoc v0.5.0/go.mod h1:VrbvcYrQOrTi3i0Vf+m+oqQWk9l72mjkJCYo7UvLHRQ=
+github.com/jhump/protoreflect v1.10.3/go.mod h1:7GcYQDdMU/O/BBrl/cX6PNHpXh6cenjd8pneu5yW7Tg=
 github.com/jhump/protoreflect v1.11.0/go.mod h1:U7aMIjN0NWq9swDP7xDdoMfRHb35uiuTd3Z9nFXJf5E=
 github.com/jhump/protoreflect v1.12.0/go.mod h1:JytZfP5d0r8pVNLZvai7U/MCuTWITgrI4tTg7puQFKI=
+github.com/jhump/protoreflect v1.14.0/go.mod h1:JytZfP5d0r8pVNLZvai7U/MCuTWITgrI4tTg7puQFKI=
 github.com/jhump/protoreflect v1.14.1/go.mod h1:JytZfP5d0r8pVNLZvai7U/MCuTWITgrI4tTg7puQFKI=
+github.com/jinzhu/gorm v1.9.16/go.mod h1:G3LB3wezTOWM2ITLzPxEXgSkOXAntiLHS7UdBefADcs=
 github.com/jinzhu/inflection v1.0.0 h1:K317FqzuhWc8YvSVlFMCCUb36O/S9MCKRDI7QkRKD/E=
 github.com/jinzhu/inflection v1.0.0/go.mod h1:h+uFLlag+Qp1Va5pdKtLDYj+kHp5pxUVkryuEj+Srlc=
+github.com/jinzhu/now v1.0.1/go.mod h1:d3SSVoowX0Lcu0IBviAWJpolVfI5UJVZZ7cO71lE/z8=
 github.com/jinzhu/now v1.1.1 h1:g39TucaRWyV3dwDO++eEc6qf8TVIQ/Da48WmqjZ3i7E=
 github.com/jinzhu/now v1.1.1/go.mod h1:d3SSVoowX0Lcu0IBviAWJpolVfI5UJVZZ7cO71lE/z8=
 github.com/jmespath/go-jmespath v0.4.0/go.mod h1:T8mJZnbsbmF+m6zOOFylbeCJqk5+pHWvzYPziyZiYoo=
@@ -792,14 +853,18 @@ github.com/kr/pretty v0.2.0/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfn
 github.com/kr/pretty v0.2.1 h1:Fmg33tUaq4/8ym9TJN1x7sLJnHVwhP33CNkpYV/7rwI=
 github.com/kr/pretty v0.2.1/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI=
 github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ=
+github.com/kr/pty v1.1.5/go.mod h1:9r2w37qlBe7rQ6e1fg1S/9xpWHSnaqNdHD3WcMdbPDA=
 github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI=
 github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY=
 github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE=
 github.com/lib/pq v1.0.0/go.mod h1:5WUZQaWbwv1U+lTReE5YruASi9Al49XbQIvNi/34Woo=
+github.com/lib/pq v1.1.1/go.mod h1:5WUZQaWbwv1U+lTReE5YruASi9Al49XbQIvNi/34Woo=
 github.com/lib/pq v1.3.0/go.mod h1:5WUZQaWbwv1U+lTReE5YruASi9Al49XbQIvNi/34Woo=
+github.com/lib/pq v1.10.4/go.mod h1:AlVN5x4E4T544tWzH6hKfbfQvm3HdbOxrmggDNAPY9o=
 github.com/lib/pq v1.10.6/go.mod h1:AlVN5x4E4T544tWzH6hKfbfQvm3HdbOxrmggDNAPY9o=
 github.com/lib/pq v1.10.7/go.mod h1:AlVN5x4E4T544tWzH6hKfbfQvm3HdbOxrmggDNAPY9o=
 github.com/logrusorgru/aurora v2.0.3+incompatible/go.mod h1:7rIyQOR62GCctdiQpZ/zOJlFyk6y+94wXzv6RNZgaR4=
+github.com/longbridgeapp/sqlparser v0.3.1 h1:iWOZWGIFgQrJRgobLXUNJdvqGRpbVXkyKUKUA5CNJBE=
 github.com/longbridgeapp/sqlparser v0.3.1/go.mod h1:GIHaUq8zvYyHLCLMJJykx1CdM6LHtkUih/QaJXySSx4=
 github.com/mailru/easyjson v0.0.0-20190614124828-94de47d64c63/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc=
 github.com/mailru/easyjson v0.0.0-20190626092158-b2ccc519800e/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc=
@@ -811,6 +876,7 @@ github.com/markbates/safe v1.0.1/go.mod h1:nAqgmRi7cY2nqMc92/bSEeQA+R4OheNU2T1kN
 github.com/mattn/go-colorable v0.0.9/go.mod h1:9vuHe8Xs5qXnSaW/c/ABM9alt+Vo+STaOChaDxuIBZU=
 github.com/mattn/go-colorable v0.1.4/go.mod h1:U0ppj6V5qS13XJ6of8GYAs25YV2eR4EVcfRqFIhoBtE=
 github.com/mattn/go-colorable v0.1.6/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc=
+github.com/mattn/go-colorable v0.1.8/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc=
 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.4/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4=
@@ -822,9 +888,11 @@ github.com/mattn/go-isatty v0.0.14/go.mod h1:7GGIvUiUoEMVVmxf/4nioHXj79iQHKdU27k
 github.com/mattn/go-runewidth v0.0.2/go.mod h1:LwmH8dsx7+W8Uxz3IHJYH5QSwggIsqBzpuz5H//U1FU=
 github.com/mattn/go-runewidth v0.0.7/go.mod h1:H031xJmbD/WCDINGzjvQ9THkh0rPKHF+m2gUSrubnMI=
 github.com/mattn/go-runewidth v0.0.9/go.mod h1:H031xJmbD/WCDINGzjvQ9THkh0rPKHF+m2gUSrubnMI=
+github.com/mattn/go-runewidth v0.0.13 h1:lTGmDsbAYt5DmK6OnoV7EuIF1wEIFAcxld6ypU4OSgU=
 github.com/mattn/go-runewidth v0.0.13/go.mod h1:Jdepj2loyihRzMpdS35Xk/zdY8IAYHsh153qUoGf23w=
 github.com/mattn/go-sqlite3 v1.9.0/go.mod h1:FPy6KqzDD04eiIsT53CuJW3U88zkxoIYsOqkbpncsNc=
 github.com/mattn/go-sqlite3 v1.10.0/go.mod h1:FPy6KqzDD04eiIsT53CuJW3U88zkxoIYsOqkbpncsNc=
+github.com/mattn/go-sqlite3 v1.14.0/go.mod h1:JIl7NbARA7phWnGvh0LKTyg7S9BA+6gx71ShQilpsus=
 github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0=
 github.com/matttproud/golang_protobuf_extensions v1.0.2-0.20181231171920-c182affec369 h1:I0XW9+e1XWDxdcEniV4rQAIOPUGDq67JSCiRCgGCZLI=
 github.com/matttproud/golang_protobuf_extensions v1.0.2-0.20181231171920-c182affec369/go.mod h1:BSXmuO+STAnVfrANrmjBb36TMTDstsz7MSK+HVaYKv4=
@@ -846,6 +914,7 @@ github.com/mwitkow/go-conntrack v0.0.0-20190716064945-2f068394615f/go.mod h1:qRW
 github.com/mxk/go-flowrate v0.0.0-20140419014527-cca7078d478f/go.mod h1:ZdcZmHo+o7JKHSa8/e818NopupXU1YMK5fe1lsApnBw=
 github.com/nbio/st v0.0.0-20140626010706-e9e8d9816f32/go.mod h1:9wM+0iRr9ahx58uYLpLIr5fm8diHn0JbqRycJi6w0Ms=
 github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e/go.mod h1:zD1mROLANZcx1PVRCS0qkT7pwLkGfwJo4zjcN/Tysno=
+github.com/nishanths/predeclared v0.0.0-20200524104333-86fad755b4d3/go.mod h1:nt3d53pc1VYcphSCIaYAJtnPYnr3Zyn8fMq2wvPGPso=
 github.com/nsqio/go-nsq v1.1.0 h1:PQg+xxiUjA7V+TLdXw7nVrJ5Jbl3sN86EhGCQj4+FYE=
 github.com/nsqio/go-nsq v1.1.0/go.mod h1:vKq36oyeVXgsS5Q8YEO7WghqidAVXQlcFxzQbQTuDEY=
 github.com/nxadm/tail v1.4.4/go.mod h1:kenIhsEOeOJmVchQTgglprH7qJGnHDVpk1VPCcaMI8A=
@@ -853,6 +922,7 @@ 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.0-20170122224234-a0225b3f23b5/go.mod h1:vsDQFd/mU46D+Z4whnwzcISnGGzXWMclvtLoiIKAKIo=
 github.com/olekukonko/tablewriter v0.0.4/go.mod h1:zq6QwlOf5SlnkVbMSr5EoBv3636FWnp+qbPhuoO21uA=
+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/olivere/elastic v6.2.37+incompatible h1:UfSGJem5czY+x/LqxgeCBgjDn6St+z8OnsCuxwD3L0U=
 github.com/olivere/elastic v6.2.37+incompatible/go.mod h1:J+q1zQJTgAz9woqsbVRqGeB5G1iqDKVBWLNSYW8yfJ8=
@@ -860,6 +930,7 @@ github.com/olivere/elastic/v7 v7.0.22/go.mod h1:VDexNy9NjmtAkrjNoI7tImv7FR4tf5zU
 github.com/onsi/ginkgo v0.0.0-20170829012221-11459a886d9c/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE=
 github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE=
 github.com/onsi/ginkgo v1.7.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE=
+github.com/onsi/ginkgo v1.11.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE=
 github.com/onsi/ginkgo v1.12.1/go.mod h1:zj2OWP4+oCPe1qIXoGWkgMRwljMUYCdkwsT2108oapk=
 github.com/onsi/ginkgo v1.14.0/go.mod h1:iSB4RoI2tjJc9BBv4NKIKWKya62Rps+oPG/Lv9klQyY=
 github.com/onsi/ginkgo v1.16.4/go.mod h1:dX+/inL/fNMqNlz0e9LfyB9TswhZpCVdJM/Z6Vvnwo0=
@@ -869,6 +940,7 @@ github.com/onsi/ginkgo/v2 v2.0.0/go.mod h1:vw5CSIxN1JObi/U8gcbwft7ZxR2dgaR70JSE3
 github.com/onsi/gomega v0.0.0-20170829124025-dcabb60a477c/go.mod h1:C1qb7wdrVGGVU+Z6iS04AVkA3Q65CEZX59MT0QO5uiA=
 github.com/onsi/gomega v1.4.3/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY=
 github.com/onsi/gomega v1.5.0/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY=
+github.com/onsi/gomega v1.7.0/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY=
 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=
@@ -877,6 +949,7 @@ github.com/onsi/gomega v1.18.1 h1:M1GfJqGRrBrrGGsbxzV5dqM2U2ApXefZCQpkukxYRLE=
 github.com/onsi/gomega v1.18.1/go.mod h1:0q+aL8jAiMXy9hbwj2mr5GziHiwhAIQpFmmtT5hitRs=
 github.com/opentracing/opentracing-go v1.2.0/go.mod h1:GxEUsuufX4nBwe+T+Wl9TAgYrxe9dPLANfrWvHYVTgc=
 github.com/openzipkin/zipkin-go v0.1.6/go.mod h1:QgAqvLzwWbR/WpD4A3cGpPtJrZXNIiJc5AZX7/PBEpw=
+github.com/openzipkin/zipkin-go v0.3.0/go.mod h1:4c3sLeE8xjNqehmF5RpAFLPLJxXscc0R4l6Zg0P1tTQ=
 github.com/openzipkin/zipkin-go v0.4.0 h1:CtfRrOVZtbDj8rt1WXjklw0kqqJQwICrCKmlfUuBUUw=
 github.com/openzipkin/zipkin-go v0.4.0/go.mod h1:4c3sLeE8xjNqehmF5RpAFLPLJxXscc0R4l6Zg0P1tTQ=
 github.com/paulmach/orb v0.5.0/go.mod h1:FWRlTgl88VI1RBx/MkrwWDRhQ96ctqMCh8boXhmqB/A=
@@ -922,6 +995,7 @@ github.com/prometheus/common v0.4.1/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y8
 github.com/prometheus/common v0.9.1/go.mod h1:yhUN8i9wzaXS3w1O07YhxHEBxD+W35wd8bs7vj7HSQ4=
 github.com/prometheus/common v0.10.0/go.mod h1:Tlit/dnDKsSWFlCLTWaA1cyBgKHSMdTB80sz/V91rCo=
 github.com/prometheus/common v0.26.0/go.mod h1:M7rCNAaPfAosfx8veZJCuw84e35h3Cfd9VFqTh1DIvc=
+github.com/prometheus/common v0.30.0/go.mod h1:vu+V0TpY+O6vW9J44gczi3Ap/oXXR10b+M/gUGO4Hls=
 github.com/prometheus/common v0.32.1/go.mod h1:vu+V0TpY+O6vW9J44gczi3Ap/oXXR10b+M/gUGO4Hls=
 github.com/prometheus/common v0.37.0 h1:ccBbHCgIiT9uSoFY0vX8H3zsNR5eLt17/RQLUvn8pXE=
 github.com/prometheus/common v0.37.0/go.mod h1:phzohg0JFMnBEFGxTDbfu3QyL5GI8gTQJFhYO5B3mfA=
@@ -937,6 +1011,7 @@ github.com/prometheus/procfs v0.8.0/go.mod h1:z7EfXMXOkbkqb9IINtpCn86r/to3BnA0ua
 github.com/rabbitmq/amqp091-go v1.1.0/go.mod h1:ogQDLSOACsLPsIq0NpbtiifNZi2YOz0VTJ0kHRghqbM=
 github.com/rcrowley/go-metrics v0.0.0-20181016184325-3113b8401b8a/go.mod h1:bCqnVzQkZxMG4s8nGwiZ5l3QUCyqpo9Y+/ZMZ9VjZe4=
 github.com/rcrowley/go-metrics v0.0.0-20201227073835-cf1acfcdf475/go.mod h1:bCqnVzQkZxMG4s8nGwiZ5l3QUCyqpo9Y+/ZMZ9VjZe4=
+github.com/rivo/uniseg v0.2.0 h1:S1pD9weZBuJdFmowNwbpi7BJ8TNftyUImj/0WQi72jY=
 github.com/rivo/uniseg v0.2.0/go.mod h1:J6wj4VEh+S6ZtnVlnTBMWIodfgj8LQOQFoIToxlJtxc=
 github.com/robfig/cron v1.2.0/go.mod h1:JGuDeoQd7Z6yL4zQhZ3OPEVHB7fL6Ka6skscFHfmt2k=
 github.com/rogpeppe/fastuuid v0.0.0-20150106093220-6724a57986af/go.mod h1:XWv6SoW27p1b0cqNHllgS5HIMJraePCO15w5zCzIWYg=
@@ -946,6 +1021,7 @@ github.com/rogpeppe/go-internal v1.2.2/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFR
 github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4=
 github.com/russross/blackfriday/v2 v2.0.1/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM=
 github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM=
+github.com/satori/go.uuid v1.2.0/go.mod h1:dA0hQrYB0VpLJoorglMZABFdXlWrHn1NEOzdhQKdks0=
 github.com/shirou/gopsutil v2.19.11+incompatible/go.mod h1:5b4v6he4MtMOwMlS0TUMTu2PcXUg8+E1lC7eC3UO/RA=
 github.com/shirou/gopsutil v3.21.11+incompatible/go.mod h1:5b4v6he4MtMOwMlS0TUMTu2PcXUg8+E1lC7eC3UO/RA=
 github.com/shirou/w32 v0.0.0-20160930032740-bb4de0191aa4/go.mod h1:qsXQc7+bwAM3Q1u/4XEfrquwF8Lw7D7y5cD8CuHnfIc=
@@ -975,6 +1051,7 @@ github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An
 github.com/stoewer/go-strcase v1.2.0/go.mod h1:IBiWB2sKIp3wVVQ3Y035++gc+knqhUQag1KpM8ahLw8=
 github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
 github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
+github.com/stretchr/objx v0.2.0/go.mod h1:qt09Ya8vawLte6SNmTgCsAVtYtaKzEcn8ATUoHMkEqE=
 github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw=
 github.com/stretchr/objx v0.5.0 h1:1zr/of2m5FGMsad5YfcqgdqdWrIhu+EBEJRhR1U7z/c=
 github.com/stretchr/objx v0.5.0/go.mod h1:Yh+to48EsGEfYuaHDzXPcE3xhTkx73EhmCGUpEOglKo=
@@ -1024,27 +1101,35 @@ github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1
 github.com/yuin/goldmark v1.4.0/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k=
 github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY=
 github.com/yuin/gopher-lua v0.0.0-20191220021717-ab39c6098bdb/go.mod h1:gqRgreBUhTSL0GeU64rtZ3Uq3wtjOa/TB2YfrtkCbVQ=
+github.com/yuin/gopher-lua v0.0.0-20200816102855-ee81675732da/go.mod h1:E1AXubJBdNmFERAOucpDIxNzeGfLzg0mYh+UfMWdChA=
 github.com/yuin/gopher-lua v0.0.0-20210529063254-f4c35e4016d9/go.mod h1:E1AXubJBdNmFERAOucpDIxNzeGfLzg0mYh+UfMWdChA=
 github.com/yuin/gopher-lua v0.0.0-20220504180219-658193537a64 h1:5mLPGnFdSsevFRFc9q3yYbBkB6tsm4aCwwQV/j1JQAQ=
 github.com/yuin/gopher-lua v0.0.0-20220504180219-658193537a64/go.mod h1:GBR0iDaNXjAgGg9zfCvksxSRnQx76gclCIb7kdAd1Pw=
 github.com/yusufpapurcu/wmi v1.2.2/go.mod h1:SBZ9tNy3G9/m5Oi98Zks0QjeHVDvuK0qfxQmPyzfmi0=
+github.com/zeromicro/go-zero v1.3.2/go.mod h1:DEj3Fwj1Ui1ltsgf6YqwTL9nD4+tYzIRX0c1pWtQo1E=
 github.com/zeromicro/go-zero v1.3.5/go.mod h1:wh4o794b7Ul3W0k35Pw9nc3iB4O0OpaQTMQz/PJc1bc=
+github.com/zeromicro/go-zero v1.4.0/go.mod h1:1amLn98K7c6FLntb9f8hdmq26ajtolOg4DTFWnRt54o=
+github.com/zeromicro/go-zero v1.4.3/go.mod h1:UmDjuW7LHd9j7+nnnPBcXF0HLNmjJw6OjHPTlSp7X7Y=
 github.com/zeromicro/go-zero v1.4.4 h1:J8M768EVFNtIQJ/GCEsoIQPanxbx2HHT0it7r69U76Y=
 github.com/zeromicro/go-zero v1.4.4/go.mod h1:5WSUwtJm0bYdDZ69GlckigcT6D0EyAPbDaX3unbSY/4=
 github.com/ziutek/mymysql v1.5.4/go.mod h1:LMSpPZ6DbqWFxNCHW77HeMg9I646SAhApZ/wKdgO/C0=
 go.etcd.io/bbolt v1.3.4/go.mod h1:G5EMThwa9y8QZGBClrRx5EY+Yw9kAhnjy3bSjsnlVTQ=
 go.etcd.io/etcd v0.0.0-20200402134248-51bdeb39e698/go.mod h1:YoUyTScD3Vcv2RBm3eGVOq7i1ULiz3OuXoQFWOirmAM=
+go.etcd.io/etcd/api/v3 v3.5.2/go.mod h1:5GB2vv4A4AOn3yk7MftYGHkUfGtDHnEraIjym4dYz5A=
 go.etcd.io/etcd/api/v3 v3.5.4/go.mod h1:5GB2vv4A4AOn3yk7MftYGHkUfGtDHnEraIjym4dYz5A=
 go.etcd.io/etcd/api/v3 v3.5.5 h1:BX4JIbQ7hl7+jL+g+2j5UAr0o1bctCm6/Ct+ArBGkf0=
 go.etcd.io/etcd/api/v3 v3.5.5/go.mod h1:KFtNaxGDw4Yx/BA4iPPwevUTAuqcsPxzyX8PHydchN8=
+go.etcd.io/etcd/client/pkg/v3 v3.5.2/go.mod h1:IJHfcCEKxYu1Os13ZdwCwIUTUVGYTSAM3YSwc9/Ac1g=
 go.etcd.io/etcd/client/pkg/v3 v3.5.4/go.mod h1:IJHfcCEKxYu1Os13ZdwCwIUTUVGYTSAM3YSwc9/Ac1g=
 go.etcd.io/etcd/client/pkg/v3 v3.5.5 h1:9S0JUVvmrVl7wCF39iTQthdaaNIiAaQbmK75ogO6GU8=
 go.etcd.io/etcd/client/pkg/v3 v3.5.5/go.mod h1:ggrwbk069qxpKPq8/FKkQ3Xq9y39kbFR4LnKszpRXeQ=
+go.etcd.io/etcd/client/v3 v3.5.2/go.mod h1:kOOaWFFgHygyT0WlSmL8TJiXmMysO/nNUlEsSsN6W4o=
 go.etcd.io/etcd/client/v3 v3.5.4/go.mod h1:ZaRkVgBZC+L+dLCjTcF1hRXpgZXQPOvnA/Ak/gq3kiY=
 go.etcd.io/etcd/client/v3 v3.5.5 h1:q++2WTJbUgpQu4B6hCuT7VkdwaTP7Qz6Daak3WzbrlI=
 go.etcd.io/etcd/client/v3 v3.5.5/go.mod h1:aApjR4WGlSumpnJ2kloS75h6aHUmAyaPLjHMxpc7E7c=
 go.mongodb.org/mongo-driver v1.5.0/go.mod h1:boiGPFqyBs5R0R5qf2ErokGRekMfwn+MqKaUyHs7wy0=
 go.mongodb.org/mongo-driver v1.9.1/go.mod h1:0sQWfOeY63QTntERDJJ/0SuKK0T1uVSgKCuAROlKEPY=
+go.mongodb.org/mongo-driver v1.10.1/go.mod h1:z4XpeoU6w+9Vht+jAFyLgVrD+jGSQQe0+CBWFHNiHt8=
 go.mongodb.org/mongo-driver v1.11.1 h1:QP0znIRTuL0jf1oBQoAoM0C6ZJfBK4kx0Uumtv1A7w8=
 go.mongodb.org/mongo-driver v1.11.1/go.mod h1:s7p5vEtfbeR1gYi6pnj3c3/urpbLv2T5Sfd6Rp2HBB8=
 go.opencensus.io v0.20.1/go.mod h1:6WKK9ahsWS3RSO+PY9ZHZUfv2irvY6gN279GOPZjmmk=
@@ -1059,10 +1144,13 @@ go.opentelemetry.io/otel v1.0.0/go.mod h1:AjRVh9A5/5DE7S+mZtTR6t8vpKKryam+0lREnf
 go.opentelemetry.io/otel v1.3.0/go.mod h1:PWIKzi6JCp7sM0k9yZ43VX+T345uNbAkDKwHVjb2PTs=
 go.opentelemetry.io/otel v1.7.0/go.mod h1:5BdUoMIz5WEs0vt0CUEMtSSaTSHBBVwrhnz7+nrD5xk=
 go.opentelemetry.io/otel v1.8.0/go.mod h1:2pkj+iMj0o03Y+cW6/m8Y4WkRdYN3AvCXCnzRMp9yvM=
+go.opentelemetry.io/otel v1.9.0/go.mod h1:np4EoPGzoPs3O67xUVNoPPcmSvsfOxNlNA4F4AC+0Eo=
 go.opentelemetry.io/otel v1.10.0/go.mod h1:NbvWjCthWHKBEUMpf0/v8ZRZlni86PpGFEMA9pnQSnQ=
 go.opentelemetry.io/otel v1.11.0 h1:kfToEGMDq6TrVrJ9Vht84Y8y9enykSZzDDZglV0kIEk=
 go.opentelemetry.io/otel v1.11.0/go.mod h1:H2KtuEphyMvlhZ+F7tg9GRhAOe60moNx61Ex+WmiKkk=
+go.opentelemetry.io/otel/exporters/jaeger v1.3.0/go.mod h1:KoYHi1BtkUPncGSRtCe/eh1ijsnePhSkxwzz07vU0Fc=
 go.opentelemetry.io/otel/exporters/jaeger v1.8.0/go.mod h1:GbWg+ng88rDtx+id26C34QLqw2erqJeAjsCx9AFeHfE=
+go.opentelemetry.io/otel/exporters/jaeger v1.9.0/go.mod h1:hquezOLVAybNW6vanIxkdLXTXvzlj2Vn3wevSP15RYs=
 go.opentelemetry.io/otel/exporters/jaeger v1.10.0/go.mod h1:n9IGyx0fgyXXZ/i0foLHNxtET9CzXHzZeKCucvRBFgA=
 go.opentelemetry.io/otel/exporters/jaeger v1.11.0 h1:Sv2valcFfMlfu6g8USSS+ZUN5vwbuGj1aY/CFtMG33w=
 go.opentelemetry.io/otel/exporters/jaeger v1.11.0/go.mod h1:nRgyJbgJ0hmaUdHwyDpTTfBYz61cTTeeGhVzfQc+FsI=
@@ -1077,13 +1165,16 @@ go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.11.0 h1:j2RFV
 go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.11.0/go.mod h1:pILgiTEtrqvZpoiuGdblDgS5dbIaTgDrkIuKfEFkt+A=
 go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.10.0 h1:S8DedULB3gp93Rh+9Z+7NTEv+6Id/KYS7LDyipZ9iCE=
 go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.10.0/go.mod h1:5WV40MLWwvWlGP7Xm8g3pMcg0pKOUY609qxJn8y7LmM=
+go.opentelemetry.io/otel/exporters/zipkin v1.3.0/go.mod h1:LxGGfHIYbvsFnrJtBcazb0yG24xHdDGrT/H6RB9r3+8=
 go.opentelemetry.io/otel/exporters/zipkin v1.8.0/go.mod h1:0uYAyCuGT67MFV9Z/Mmx93wGuugHw0FbxMc74fs3LNo=
+go.opentelemetry.io/otel/exporters/zipkin v1.9.0/go.mod h1:HyIvYIu37wV4Wx5azd7e05x9k/dOz9KB4x0plw2QNvs=
 go.opentelemetry.io/otel/exporters/zipkin v1.10.0/go.mod h1:HdfvgwcOoCB0+zzrTHycW6btjK0zNpkz2oTGO815SCI=
 go.opentelemetry.io/otel/exporters/zipkin v1.11.0 h1:v/Abo5REOWrCj4zcEIUHFZtXpsCVjrwZj28iyX2rHXE=
 go.opentelemetry.io/otel/exporters/zipkin v1.11.0/go.mod h1:unWnsLCMYfINP8ue0aXVrB/GYHoXNn/lbTnupvLekGQ=
 go.opentelemetry.io/otel/sdk v1.0.0/go.mod h1:PCrDHlSy5x1kjezSdL37PhbFUMjrsLRshJ2zCzeXwbM=
 go.opentelemetry.io/otel/sdk v1.3.0/go.mod h1:rIo4suHNhQwBIPg9axF8V9CA72Wz2mKF1teNrup8yzs=
 go.opentelemetry.io/otel/sdk v1.8.0/go.mod h1:uPSfc+yfDH2StDM/Rm35WE8gXSNdvCg023J6HeGNO0c=
+go.opentelemetry.io/otel/sdk v1.9.0/go.mod h1:AEZc8nt5bd2F7BC24J5R0mrjYnpEgYHyTcM/vrSple4=
 go.opentelemetry.io/otel/sdk v1.10.0/go.mod h1:vO06iKzD5baltJz1zarxMCNHFpUlUiOy4s65ECtn6kE=
 go.opentelemetry.io/otel/sdk v1.11.0 h1:ZnKIL9V9Ztaq+ME43IUi/eo22mNsb6a7tGfzaOWB5fo=
 go.opentelemetry.io/otel/sdk v1.11.0/go.mod h1:REusa8RsyKaq0OlyangWXaw97t2VogoO4SSEeKkSTAk=
@@ -1091,6 +1182,7 @@ go.opentelemetry.io/otel/trace v1.0.0/go.mod h1:PXTWqayeFUlJV1YDNhsJYB184+IvAH81
 go.opentelemetry.io/otel/trace v1.3.0/go.mod h1:c/VDhno8888bvQYmbYLqe41/Ldmr/KKunbvWM4/fEjk=
 go.opentelemetry.io/otel/trace v1.7.0/go.mod h1:fzLSB9nqR2eXzxPXb2JW9IKE+ScyXA48yyE4TNvoHqU=
 go.opentelemetry.io/otel/trace v1.8.0/go.mod h1:0Bt3PXY8w+3pheS3hQUt+wow8b1ojPaTBoTCh2zIFI4=
+go.opentelemetry.io/otel/trace v1.9.0/go.mod h1:2737Q0MuG8q1uILYm2YYVkAyLtOofiTNGg6VODnOiPo=
 go.opentelemetry.io/otel/trace v1.10.0/go.mod h1:Sij3YYczqAdz+EhmGhE6TpTxUO5/F/AzrK+kxfGqySM=
 go.opentelemetry.io/otel/trace v1.11.0 h1:20U/Vj42SX+mASlXLmSGBg6jpI1jQtv682lZtTAOVFI=
 go.opentelemetry.io/otel/trace v1.11.0/go.mod h1:nyYjis9jy0gytE9LXGU+/m1sHTKbRY0fX0hulNNDP1U=
@@ -1124,8 +1216,10 @@ golang.org/x/crypto v0.0.0-20190325154230-a5d413f7728c/go.mod h1:djNgcEr1/C05ACk
 golang.org/x/crypto v0.0.0-20190422162423-af44ce270edf/go.mod h1:WFFai1msRO1wXaEeE5yQxYXgSfI8pQAWXbQop6sCtWE=
 golang.org/x/crypto v0.0.0-20190510104115-cbcb75029529/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=
 golang.org/x/crypto v0.0.0-20190605123033-f99c8df09eb5/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=
+golang.org/x/crypto v0.0.0-20190611184440-5c40567a22f8/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=
 golang.org/x/crypto v0.0.0-20191002192127-34f69633bfdc/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=
 golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=
+golang.org/x/crypto v0.0.0-20191205180655-e7c4368fe9dd/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto=
 golang.org/x/crypto v0.0.0-20200302210943-78000ba7a073/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto=
 golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto=
 golang.org/x/crypto v0.0.0-20201002170205-7f63de1d35b0/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto=
@@ -1172,6 +1266,7 @@ golang.org/x/mod v0.4.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
 golang.org/x/mod v0.4.1/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
 golang.org/x/mod v0.4.2/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
 golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4=
+golang.org/x/net v0.0.0-20180218175443-cbe0f9307d01/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
 golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
 golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
 golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
@@ -1297,6 +1392,7 @@ golang.org/x/sys v0.0.0-20190502145724-3ef323f4f1fd/go.mod h1:h1NjWce9XRLGQEsW7w
 golang.org/x/sys v0.0.0-20190507160741-ecd444e8653b/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
 golang.org/x/sys v0.0.0-20190531175056-4c3a928424d2/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
 golang.org/x/sys v0.0.0-20190606165138-5da285871e9c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
+golang.org/x/sys v0.0.0-20190616124812-15dcb6c0061f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
 golang.org/x/sys v0.0.0-20190624142023-c5567b49c5d0/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
 golang.org/x/sys v0.0.0-20190726091711-fc99dfbffb4e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
 golang.org/x/sys v0.0.0-20190904154756-749cb33beabd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
@@ -1329,6 +1425,7 @@ golang.org/x/sys v0.0.0-20200728102440-3e129f6d46b1/go.mod h1:h1NjWce9XRLGQEsW7w
 golang.org/x/sys v0.0.0-20200803210538-64077c9b5642/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
 golang.org/x/sys v0.0.0-20200905004654-be1d3432aa8f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
 golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
+golang.org/x/sys v0.0.0-20201112073958-5cba982894dd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
 golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
 golang.org/x/sys v0.0.0-20201201145000-ef89a241ccb3/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
 golang.org/x/sys v0.0.0-20210104204734-6f8348627aad/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
@@ -1397,7 +1494,9 @@ golang.org/x/time v0.0.0-20180412165947-fbb02b2291d2/go.mod h1:tRJNPiyCQ0inRvYxb
 golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
 golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
 golang.org/x/time v0.0.0-20191024005414-555d28b269f0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
+golang.org/x/time v0.0.0-20200630173020-3af7569d3a1e/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
 golang.org/x/time v0.0.0-20210723032227-1f47c861a9ac/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
+golang.org/x/time v0.0.0-20211116232009-f0f3c7e86c11/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
 golang.org/x/time v0.0.0-20220411224347-583f2d630306/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
 golang.org/x/time v0.3.0 h1:rg5rLMjNzMS1RkNLzCG38eapWhnYLFYXDXj2gOlr8j4=
 golang.org/x/time v0.3.0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
@@ -1418,6 +1517,7 @@ golang.org/x/tools v0.0.0-20190506145303-2d16b83fe98c/go.mod h1:RgjU9mgBXZiqYHBn
 golang.org/x/tools v0.0.0-20190524140312-2c0ae7006135/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q=
 golang.org/x/tools v0.0.0-20190531172133-b3315ee88b7d/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc=
 golang.org/x/tools v0.0.0-20190606124116-d0a3d012864b/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc=
+golang.org/x/tools v0.0.0-20190614205625-5aca471b1d59/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc=
 golang.org/x/tools v0.0.0-20190621195816-6e04913cbbac/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc=
 golang.org/x/tools v0.0.0-20190628153133-6cdbf07be9d0/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc=
 golang.org/x/tools v0.0.0-20190816200558-6889da9d5479/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
@@ -1447,8 +1547,10 @@ golang.org/x/tools v0.0.0-20200410132612-ae9902aceb98/go.mod h1:EkVYQZoAsY45+roY
 golang.org/x/tools v0.0.0-20200501065659-ab2804fb9c9d/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE=
 golang.org/x/tools v0.0.0-20200512131952-2bc93b1c0c88/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE=
 golang.org/x/tools v0.0.0-20200515010526-7d3b6ebf133d/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE=
+golang.org/x/tools v0.0.0-20200522201501-cb1345f3a375/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE=
 golang.org/x/tools v0.0.0-20200618134242-20370b0cb4b2/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE=
 golang.org/x/tools v0.0.0-20200619180055-7c47624df98f/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE=
+golang.org/x/tools v0.0.0-20200717024301-6ddee64345a6/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA=
 golang.org/x/tools v0.0.0-20200729194436-6467de6f59a7/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA=
 golang.org/x/tools v0.0.0-20200804011535-6c149bb5ef0d/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA=
 golang.org/x/tools v0.0.0-20200825202427-b303f430e36d/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA=
@@ -1697,6 +1799,7 @@ google.golang.org/protobuf v1.23.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2
 google.golang.org/protobuf v1.23.1-0.20200526195155-81db48ad09cc/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU=
 google.golang.org/protobuf v1.24.0/go.mod h1:r/3tXBNzIEhYS9I1OUVjXDlt8tc493IdKGjtUeSXeh4=
 google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlbajtzgsN7c=
+google.golang.org/protobuf v1.25.1-0.20200805231151-a709e31e5d12/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlbajtzgsN7c=
 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=
 google.golang.org/protobuf v1.27.1/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc=
@@ -1753,19 +1856,25 @@ honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWh
 honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt0JzvZhAg=
 honnef.co/go/tools v0.0.1-2020.1.3/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k=
 honnef.co/go/tools v0.0.1-2020.1.4/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k=
+k8s.io/api v0.20.12/go.mod h1:A2brwyEkVLM3wQGNnzoAa5JsQRzHK0uoOQ+bsnv7V68=
 k8s.io/api v0.22.9 h1:PidjRtgd0zDa6SvyooBLH/SP62uOhEBY0kx0UYRGr1o=
 k8s.io/api v0.22.9/go.mod h1:rcjO/FPOuvc3x7nQWx29UcDrFJMx82RxDob71ntNH4A=
+k8s.io/apimachinery v0.20.12/go.mod h1:uM7hCI0NyBymUwgshMgZyte475lxhr+QH6h3cvdnzEc=
 k8s.io/apimachinery v0.22.9 h1:5qjnpBk6eC9me0SAzokCUMI0KVF2PENK1PnykF8/Gjo=
 k8s.io/apimachinery v0.22.9/go.mod h1:ZvVLP5iLhwVFg2Yx9Gh5W0um0DUauExbRhe+2Z8I1EU=
+k8s.io/client-go v0.20.12/go.mod h1:NBJj6Evp73Xy/4v/O/RDRaH0+3JoxNfjRxkyRgrdbsA=
 k8s.io/client-go v0.22.9 h1:5p2R2LsoBfaE6QnXfWFmyyvxrFXtfegUGRMZSpTI+Q8=
 k8s.io/client-go v0.22.9/go.mod h1:IoH7exYnoH/zgvHOuVxh2c4yJepcCBt72FzCTisOc4k=
 k8s.io/gengo v0.0.0-20200413195148-3a45101e95ac/go.mod h1:ezvh/TsK7cY6rbqRK0oQQ8IAqLxYwwyPxAX1Pzy0ii0=
 k8s.io/klog/v2 v2.0.0/go.mod h1:PBfzABfn139FHAV07az/IF9Wp1bkk3vpT2XSJ76fSDE=
+k8s.io/klog/v2 v2.4.0/go.mod h1:Od+F08eJP+W3HUb4pSrPpgp9DGU4GzlpG/TmITuYh/Y=
 k8s.io/klog/v2 v2.9.0/go.mod h1:hy9LJ/NvuK+iVyP4Ehqva4HxZG/oXyIS3n3Jmire4Ec=
 k8s.io/klog/v2 v2.40.1/go.mod h1:y1WjHnz7Dj687irZUWR/WLkLc5N1YHtjLdmgWjndZn0=
 k8s.io/klog/v2 v2.80.1 h1:atnLQ121W371wYYFawwYx1aEY2eUfs4l3J72wtgAwV4=
 k8s.io/klog/v2 v2.80.1/go.mod h1:y1WjHnz7Dj687irZUWR/WLkLc5N1YHtjLdmgWjndZn0=
+k8s.io/kube-openapi v0.0.0-20201113171705-d219536bb9fd/go.mod h1:WOJ3KddDSol4tAGcJo0Tvi+dK12EcqSLqcWsryKMpfM=
 k8s.io/kube-openapi v0.0.0-20211109043538-20434351676c/go.mod h1:vHXdDvt9+2spS2Rx9ql3I8tycm3H9FDfdUoIuKCefvw=
+k8s.io/utils v0.0.0-20201110183641-67b214c5f920/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA=
 k8s.io/utils v0.0.0-20211116205334-6203023598ed/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA=
 k8s.io/utils v0.0.0-20220706174534-f6158b442e7c/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA=
 k8s.io/utils v0.0.0-20221108210102-8e77b1f39fe2 h1:GfD9OzL11kvZN5iArC6oTS7RTj7oJOIfnislxYlqTj8=
@@ -1774,6 +1883,7 @@ rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8
 rsc.io/quote/v3 v3.1.0/go.mod h1:yEA65RcK8LyAZtP9Kv3t0HmxON59tX3rD+tICJqUlj0=
 rsc.io/sampler v1.3.0/go.mod h1:T1hPZKmBbMNahiBKFy5HrXp6adAjACjK9JXDnKaTXpA=
 sigs.k8s.io/structured-merge-diff/v4 v4.0.2/go.mod h1:bJZC9H9iH24zzfZ/41RGcq60oK1F7G282QMXDPYydCw=
+sigs.k8s.io/structured-merge-diff/v4 v4.1.2/go.mod h1:j/nl6xW8vLS49O8YvXW1ocPhZawJtm+Yrr7PPRQ0Vg4=
 sigs.k8s.io/structured-merge-diff/v4 v4.2.1 h1:bKCqE9GvQ5tiVHn5rfn1r+yao3aLQEaLzkkmAkf+A6Y=
 sigs.k8s.io/structured-merge-diff/v4 v4.2.1/go.mod h1:j/nl6xW8vLS49O8YvXW1ocPhZawJtm+Yrr7PPRQ0Vg4=
 sigs.k8s.io/yaml v1.1.0/go.mod h1:UJmg0vDUVViEyp3mgSv9WPwZCDxu4rQW1olrI1uml+o=

+ 497 - 498
src/jfw/modules/distribution/src/service/action/share.go

@@ -1,36 +1,36 @@
 package action
 
 import (
-	"app.yhyue.com/moapp/jypkg/common/src/qfw/util/jy"
-	"database/sql"
-	"encoding/base64"
-	"fmt"
-	. "jy/src/jfw/modules/distribution/src/service/config"
-	. "jy/src/jfw/modules/distribution/src/service/public"
-	"log"
-	"strconv"
-	"strings"
-	"sync"
-	"time"
+    "app.yhyue.com/moapp/jypkg/common/src/qfw/util/jy"
+    "database/sql"
+    "encoding/base64"
+    "fmt"
+    . "jy/src/jfw/modules/distribution/src/service/config"
+    . "jy/src/jfw/modules/distribution/src/service/public"
+    "log"
+    "strconv"
+    "strings"
+    "sync"
+    "time"
 
-	util "app.yhyue.com/moapp/jybase/common"
-	. "app.yhyue.com/moapp/jybase/date"
-	"app.yhyue.com/moapp/jybase/redis"
-	"github.com/SKatiyar/qr"
+    util "app.yhyue.com/moapp/jybase/common"
+    . "app.yhyue.com/moapp/jybase/date"
+    "app.yhyue.com/moapp/jybase/redis"
+    "github.com/SKatiyar/qr"
 
-	"app.yhyue.com/moapp/jybase/go-xweb/xweb"
+    "app.yhyue.com/moapp/jybase/go-xweb/xweb"
 )
 
 //分享接口
 type Share struct {
-	*xweb.Action
-	getWordShare      xweb.Mapper `xweb:"/share/getWordShare"`      //获取口令分享的口令
-	getOtherWordShare xweb.Mapper `xweb:"/share/getOtherWordShare"` //第三方获取口令分享的口令
-	getWordInfo       xweb.Mapper `xweb:"/share/getWordInfo"`       //根据口令获取口令信息
-	linkShare         xweb.Mapper `xweb:"/share/(.*)"`              //链接分享获取用户信息
-	productInfo       xweb.Mapper `xweb:"/share/productInfo"`       //产品信息
-	shareLogs         xweb.Mapper `xweb:"/share/shareLogs"`         //分享记录日志
-	shareLink         xweb.Mapper `xweb:"/share/shareLink"`         //分享链接获取
+    *xweb.Action
+    getWordShare      xweb.Mapper `xweb:"/share/getWordShare"`      //获取口令分享的口令
+    getOtherWordShare xweb.Mapper `xweb:"/share/getOtherWordShare"` //第三方获取口令分享的口令
+    getWordInfo       xweb.Mapper `xweb:"/share/getWordInfo"`       //根据口令获取口令信息
+    linkShare         xweb.Mapper `xweb:"/share/(.*)"`              //链接分享获取用户信息
+    productInfo       xweb.Mapper `xweb:"/share/productInfo"`       //产品信息
+    shareLogs         xweb.Mapper `xweb:"/share/shareLogs"`         //分享记录日志
+    shareLink         xweb.Mapper `xweb:"/share/shareLink"`         //分享链接获取
 }
 
 //1000:请求方式有误;1001:需要登录;1002:缺失参数;1003:无效参数;1004:没有权限
@@ -40,533 +40,532 @@ var suffix_msgt = "_SX"
 
 //
 func init() {
-	xweb.AddAction(&Share{})
+    xweb.AddAction(&Share{})
 }
 
 var METHOD = "POST"
 
 //所有产品信息 和 所属产品得个人分销统计
 func (this *Share) ProductInfo() error {
-	defer util.Catch()
-	res := map[string]interface{}{
-		"error_code": error_code[0],
-		"error_msg":  error_msg[0],
-	}
-	if this.Method() == METHOD {
-		res["error_msg"] = error_msg[1]
-		res["error_code"] = error_code[1]
-		userId, _ := this.Session().Get("userId").(string)
-		//userId = "5fdac5cea3246ebb79d1e24e"
-		if userId != "" {
-			partner := Mysql.SelectBySql("SELECT type from dis_partner  WHERE uid = ? ", userId)
-			p_data, ok := MQFW.Find("dis_product", `{"s_status":1,"model":1}`, `{"l_createdate":1}`, nil, false, -1, -1)
-			if (fmt.Sprint((*partner)[0]["type"])) == "2" {
-				p_data, ok = MQFW.Find("dis_product", `{"s_status":1,"model":2}`, `{"l_createdate":1}`, nil, false, -1, -1)
-			}
-			if ok && p_data != nil {
-				//个人累计数据
-				dis_res := *Mysql.SelectBySql("SELECT DISTINCT a.product_name,SUM(a.sale_money) AS t_sale,SUM(a.commission) AS t_com,COUNT(a.product_name) AS t_count FROM dis_sale a  WHERE a.uid = '" + userId + "'  GROUP BY a.product_name")
-				for key, v := range *p_data {
-					delete(v, "_id")
-					if v["s_name"] == "超级订阅企业版" {
-						v["s_name"] = "超级订阅"
-						(*p_data)[key]["s_name"] = "超级订阅"
-					}
-					for _, dv := range dis_res {
-						if dv["product_name"] == v["s_name"].(string) {
-							v["t_sale"] = util.IntAll(dv["t_sale"])   //销售金额
-							v["t_com"] = util.IntAll(dv["t_com"])     //佣金金额
-							v["t_count"] = util.IntAll(dv["t_count"]) //销售单数
-							if util.IntAll(dv["t_count"]) > 0 {
-								v["average"] = util.IntAll(dv["t_com"]) / util.IntAll(dv["t_count"]) //平均佣金
-							}
-							break
-						}
-					}
-				}
-				res["data"] = *p_data
-			} else {
-				log.Println("查询产品信息报错")
-			}
-			res["error_msg"] = ""
-			res["error_code"] = 0
-		}
-	}
-	this.ServeJson(res)
-	return nil
+    defer util.Catch()
+    res := map[string]interface{}{
+        "error_code": error_code[0],
+        "error_msg":  error_msg[0],
+    }
+    if this.Method() == METHOD {
+        res["error_msg"] = error_msg[1]
+        res["error_code"] = error_code[1]
+        userId, _ := this.Session().Get("userId").(string)
+        if userId != "" {
+            partner := Mysql.SelectBySql("SELECT type from dis_partner  WHERE uid = ? ", userId)
+            p_data, ok := MQFW.Find("dis_product", `{"s_status":1,"model":1}`, `{"l_createdate":1}`, nil, false, -1, -1)
+            if (fmt.Sprint((*partner)[0]["type"])) == "2" {
+                p_data, ok = MQFW.Find("dis_product", `{"s_status":1,"model":2}`, `{"l_createdate":1}`, nil, false, -1, -1)
+            }
+            if ok && p_data != nil {
+                //个人累计数据
+                dis_res := *Mysql.SelectBySql("SELECT DISTINCT a.product_name,SUM(a.sale_money) AS t_sale,SUM(a.commission) AS t_com,COUNT(a.product_name) AS t_count FROM dis_sale a  WHERE a.uid = '" + userId + "'  GROUP BY a.product_name")
+                for key, v := range *p_data {
+                    delete(v, "_id")
+                    if v["s_name"] == "超级订阅企业版" {
+                        v["s_name"] = "超级订阅"
+                        (*p_data)[key]["s_name"] = "超级订阅"
+                    }
+                    for _, dv := range dis_res {
+                        if dv["product_name"] == v["s_name"].(string) {
+                            v["t_sale"] = util.IntAll(dv["t_sale"])   //销售金额
+                            v["t_com"] = util.IntAll(dv["t_com"])     //佣金金额
+                            v["t_count"] = util.IntAll(dv["t_count"]) //销售单数
+                            if util.IntAll(dv["t_count"]) > 0 {
+                                v["average"] = util.IntAll(dv["t_com"]) / util.IntAll(dv["t_count"]) //平均佣金
+                            }
+                            break
+                        }
+                    }
+                }
+                res["data"] = *p_data
+            } else {
+                log.Println("查询产品信息报错")
+            }
+            res["error_msg"] = ""
+            res["error_code"] = 0
+        }
+    }
+    this.ServeJson(res)
+    return nil
 }
 
 //微信自动回复 或者访问复制链接
 func (this *Share) LinkShare(discored string) error {
-	defer util.Catch()
-	openid, _ := this.Session().Get("s_m_openid").(string)
-	//openid = "ocXeA0v5hueaCCGu_3Iva0br857s"
-	//log.Println("微信自动回复 或者访问复制链接discored:", discored)
-	disType := discored[:1]
-	if openid == "" || discored == "" {
-		/*if disType == "E" { //数据流量包
-		  	return this.Redirect("/frontPage/flowpacket/free/data")
-		  } else if disType == "F" { //中标必听课
-		  	return this.Redirect("/frontPage/coursepage/free/data")
-		  } else {
-		  	//提示关注页面
-		  	return this.Redirect("/")
-		  }*/
-		//提示关注页面
-		return this.Redirect("/")
-	}
-	userId, _ := this.Session().Get("userId").(string)
-	url := ""
-	fmt.Println(userId, openid, "user", `{"s_m_openid":"`+openid+`}`, `{"o_jy":1:"o_vipjy":1,"i_vip_status":1}`)
-	if discored[len(discored)-4:len(discored)-2] == "GX" {
-		if disType == "A" {
-			//user, ok := MQFW.FindOneByField("user", `{"s_m_openid":"`+openid+`"}`, `{"o_jy":1:"o_vipjy":1,"i_vip_status":1}`)
-			user := jy.GetBigVipUserBaseMsg("10000", this.Session(), Sysconfig.Etcd.Hosts, Sysconfig.Etcd.Key)
-			log.Println(user)
-			if user != nil {
-				i_vip_status := user.VipStatus
-				if i_vip_status > 0 {
-					modular := util.ObjToMap(Sysconfig.Modular[discored[:1]])
-					url = (*modular)["upgradeUrl"].(string)
-				} else {
-					modular := util.ObjToMap(Sysconfig.Modular[discored[:1]])
-					url = (*modular)["url"].(string) + "?disWord=" + discored
-				}
-			}
-		} else if disType == "E" {
-			//判断用户是否否买过数据流量包
-			/*req, _ := http.NewRequest("GET", Sysconfig.SourceCenter+"/resources/findBalance?accountId="+userId, nil)
-			  fmt.Println(Sysconfig.SourceCenter + "/resources/findBalance?accountId=" + userId)
-			  res, _ := http.DefaultClient.Do(req)
-			  defer res.Body.Close()
-			  body, _ := ioutil.ReadAll(res.Body)
-			  dat := BalanceRes{}
-			  _ = json.Unmarshal([]byte(body), &dat)
-			  if dat.Data != nil && len(dat.Data) > 0 {
-			  	//页面跳转至数据包筛选页面
-			  	modular := util.ObjToMap(Sysconfig.Modular[disType])
-			  	url = (*modular)["packetFilterUrl"].(string) + "?disWord=" + discored
-			  } else {
-			  	//没有购买流量包,跳转至购买页面
-			  	modular := util.ObjToMap(Sysconfig.Modular[disType])
-			  	url = (*modular)["buyUrl"].(string) + "?disWord=" + discored
-			  }*/
-			//新老用户打开链接跳转至购买界面
-			modular := util.ObjToMap(Sysconfig.Modular[disType])
-			url = (*modular)["buyUrl"].(string) + "?disWord=" + discored
-		} else if disType == "F" {
-			modular := util.ObjToMap(Sysconfig.Modular[disType])
-			url = (*modular)["courselistUrl"].(string) + "?disWord=" + discored
-		}
+    defer util.Catch()
+    openid, _ := this.Session().Get("s_m_openid").(string)
+    //openid = "ocXeA0v5hueaCCGu_3Iva0br857s"
+    //log.Println("微信自动回复 或者访问复制链接discored:", discored)
+    disType := discored[:1]
+    if openid == "" || discored == "" {
+        /*if disType == "E" { //数据流量包
+          	return this.Redirect("/frontPage/flowpacket/free/data")
+          } else if disType == "F" { //中标必听课
+          	return this.Redirect("/frontPage/coursepage/free/data")
+          } else {
+          	//提示关注页面
+          	return this.Redirect("/")
+          }*/
+        //提示关注页面
+        return this.Redirect("/")
+    }
+    userId, _ := this.Session().Get("userId").(string)
+    url := ""
+    fmt.Println(userId, openid, "user", `{"s_m_openid":"`+openid+`}`, `{"o_jy":1:"o_vipjy":1,"i_vip_status":1}`)
+    if discored[len(discored)-4:len(discored)-2] == "GX" {
+        if disType == "A" {
+            //user, ok := MQFW.FindOneByField("user", `{"s_m_openid":"`+openid+`"}`, `{"o_jy":1:"o_vipjy":1,"i_vip_status":1}`)
+            user := jy.GetBigVipUserBaseMsg(this.Session(), *Middleground)
+            log.Println(user)
+            if user != nil {
+                i_vip_status := user.VipStatus
+                if i_vip_status > 0 {
+                    modular := util.ObjToMap(Sysconfig.Modular[discored[:1]])
+                    url = (*modular)["upgradeUrl"].(string)
+                } else {
+                    modular := util.ObjToMap(Sysconfig.Modular[discored[:1]])
+                    url = (*modular)["url"].(string) + "?disWord=" + discored
+                }
+            }
+        } else if disType == "E" {
+            //判断用户是否否买过数据流量包
+            /*req, _ := http.NewRequest("GET", Sysconfig.SourceCenter+"/resources/findBalance?accountId="+userId, nil)
+              fmt.Println(Sysconfig.SourceCenter + "/resources/findBalance?accountId=" + userId)
+              res, _ := http.DefaultClient.Do(req)
+              defer res.Body.Close()
+              body, _ := ioutil.ReadAll(res.Body)
+              dat := BalanceRes{}
+              _ = json.Unmarshal([]byte(body), &dat)
+              if dat.Data != nil && len(dat.Data) > 0 {
+              	//页面跳转至数据包筛选页面
+              	modular := util.ObjToMap(Sysconfig.Modular[disType])
+              	url = (*modular)["packetFilterUrl"].(string) + "?disWord=" + discored
+              } else {
+              	//没有购买流量包,跳转至购买页面
+              	modular := util.ObjToMap(Sysconfig.Modular[disType])
+              	url = (*modular)["buyUrl"].(string) + "?disWord=" + discored
+              }*/
+            //新老用户打开链接跳转至购买界面
+            modular := util.ObjToMap(Sysconfig.Modular[disType])
+            url = (*modular)["buyUrl"].(string) + "?disWord=" + discored
+        } else if disType == "F" {
+            modular := util.ObjToMap(Sysconfig.Modular[disType])
+            url = (*modular)["courselistUrl"].(string) + "?disWord=" + discored
+        }
 
-	} else {
-		_, url, _, _ = analyseWord(discored, userId, true)
-	}
-	log.Println("获取三级页面地址:", url)
-	return this.Redirect(url)
+    } else {
+        _, url, _, _ = analyseWord(discored, userId, true)
+    }
+    log.Println("获取三级页面地址:", url)
+    return this.Redirect(url)
 }
 
 //分析口令
 func analyseWord(discored, userId string, isBuy bool) (name, url, appUrl, shareNickname string) {
-	log.Println("分析口令传入参数", discored)
-	//指令第一个字母
-	encry := discored[:1]
-	//模块  A:超级订阅  B:数据导出  C:数据报告等  D公告信息 _SX三天有效 E 数据流量包 F 中标必听课
-	modular := util.ObjToMap(Sysconfig.Modular[encry])
-	if modular != nil && (*modular)["name"] != nil {
-		redisDis := redis.GetStr("other", "DIS_"+discored[1:])
-		log.Println("redis:", redisDis)
-		if redisDis == "" {
-			name = (*modular)["name"].(string)
-			url = (*modular)["url"].(string) + "?disWord=" + discored                                             //指令传输
-			appUrl = "/jyapp/distrib/redirectTo?appUrl=" + (*modular)["appUrl"].(string) + "?disWord=" + discored //日志中转页
-		} else {
-			shareNickname = strings.Split(redisDis, "##")[0]
-			suffix := discored[len(discored)-3 : len(discored)]
-			name = (*modular)["name"].(string)
-			//公告三级页处理
-			if suffix == suffix_msgt {
-				effectiveTimeStr := strings.Split(redisDis, "##")[3]
-				effectiveTime, _ := strconv.ParseInt(effectiveTimeStr, 10, 64)
-				//是否计算佣金
-				if time.Now().Unix() <= effectiveTime {
-					url = strings.Split(redisDis, "##")[2] + "?disWord=" + discored    //指令传输
-					appUrl = strings.Split(redisDis, "##")[2] + "?disWord=" + discored //日志中转页
-				} else {
-					url = strings.Split(redisDis, "##")[2]    //指令传输
-					appUrl = strings.Split(redisDis, "##")[2] //日志中转页
-				}
+    log.Println("分析口令传入参数", discored)
+    //指令第一个字母
+    encry := discored[:1]
+    //模块  A:超级订阅  B:数据导出  C:数据报告等  D公告信息 _SX三天有效 E 数据流量包 F 中标必听课
+    modular := util.ObjToMap(Sysconfig.Modular[encry])
+    if modular != nil && (*modular)["name"] != nil {
+        redisDis := redis.GetStr("other", "DIS_"+discored[1:])
+        log.Println("redis:", redisDis)
+        if redisDis == "" {
+            name = (*modular)["name"].(string)
+            url = (*modular)["url"].(string) + "?disWord=" + discored                                             //指令传输
+            appUrl = "/jyapp/distrib/redirectTo?appUrl=" + (*modular)["appUrl"].(string) + "?disWord=" + discored //日志中转页
+        } else {
+            shareNickname = strings.Split(redisDis, "##")[0]
+            suffix := discored[len(discored)-3 : len(discored)]
+            name = (*modular)["name"].(string)
+            //公告三级页处理
+            if suffix == suffix_msgt {
+                effectiveTimeStr := strings.Split(redisDis, "##")[3]
+                effectiveTime, _ := strconv.ParseInt(effectiveTimeStr, 10, 64)
+                //是否计算佣金
+                if time.Now().Unix() <= effectiveTime {
+                    url = strings.Split(redisDis, "##")[2] + "?disWord=" + discored    //指令传输
+                    appUrl = strings.Split(redisDis, "##")[2] + "?disWord=" + discored //日志中转页
+                } else {
+                    url = strings.Split(redisDis, "##")[2]    //指令传输
+                    appUrl = strings.Split(redisDis, "##")[2] //日志中转页
+                }
 
-			} else {
-				if encry == "A" {
-					name = (*modular)["name"].(string)
-					url = (*modular)["url"].(string) + "?disWord=" + discored                                             //指令传输
-					appUrl = "/jyapp/distrib/redirectTo?appUrl=" + (*modular)["appUrl"].(string) + "?disWord=" + discored //日志中转页
-				} else if encry == "E" {
-					if isBuy {
-						name = (*modular)["name"].(string)
-						url = (*modular)["url"].(string) + "?disWord=" + discored                                                         //指令传输
-						appUrl = "/jyapp/distrib/redirectTo?appUrl=" + (*modular)["appPacketFilterUrl"].(string) + "?disWord=" + discored //日志中转页
-					} else {
-						name = (*modular)["name"].(string)
-						url = (*modular)["url"].(string) + "?disWord=" + discored                                                //指令传输
-						appUrl = "/jyapp/distrib/redirectTo?appUrl=" + (*modular)["appBuyUrl"].(string) + "?disWord=" + discored //日志中转页
-					}
-				} else if encry == "F" {
-					if isBuy {
-						name = (*modular)["name"].(string)
-						url = (*modular)["url"].(string) + "?disWord=" + discored                                                    //指令传输
-						appUrl = "/jyapp/distrib/redirectTo?appUrl=" + (*modular)["courselistUrl"].(string) + "?disWord=" + discored //日志中转页
-					} else {
-						name = (*modular)["name"].(string)
-						url = (*modular)["url"].(string) + "?disWord=" + discored                                             //指令传输
-						appUrl = "/jyapp/distrib/redirectTo?appUrl=" + (*modular)["appUrl"].(string) + "?disWord=" + discored //日志中转页
-					}
-				}
-			}
-		}
-	}
-	/*//redis 获取分销者信息
-	  redisDis := redis.GetStr("other", "DIS_"+discored[1:])
-	  if redisDis != "" {
-	  	//分销者昵称
-	  	shareNickname = strings.Split(redisDis, "##")[0]
-	  }*/
-	return name, url, appUrl, shareNickname
+            } else {
+                if encry == "A" {
+                    name = (*modular)["name"].(string)
+                    url = (*modular)["url"].(string) + "?disWord=" + discored                                             //指令传输
+                    appUrl = "/jyapp/distrib/redirectTo?appUrl=" + (*modular)["appUrl"].(string) + "?disWord=" + discored //日志中转页
+                } else if encry == "E" {
+                    if isBuy {
+                        name = (*modular)["name"].(string)
+                        url = (*modular)["url"].(string) + "?disWord=" + discored                                                         //指令传输
+                        appUrl = "/jyapp/distrib/redirectTo?appUrl=" + (*modular)["appPacketFilterUrl"].(string) + "?disWord=" + discored //日志中转页
+                    } else {
+                        name = (*modular)["name"].(string)
+                        url = (*modular)["url"].(string) + "?disWord=" + discored                                                //指令传输
+                        appUrl = "/jyapp/distrib/redirectTo?appUrl=" + (*modular)["appBuyUrl"].(string) + "?disWord=" + discored //日志中转页
+                    }
+                } else if encry == "F" {
+                    if isBuy {
+                        name = (*modular)["name"].(string)
+                        url = (*modular)["url"].(string) + "?disWord=" + discored                                                    //指令传输
+                        appUrl = "/jyapp/distrib/redirectTo?appUrl=" + (*modular)["courselistUrl"].(string) + "?disWord=" + discored //日志中转页
+                    } else {
+                        name = (*modular)["name"].(string)
+                        url = (*modular)["url"].(string) + "?disWord=" + discored                                             //指令传输
+                        appUrl = "/jyapp/distrib/redirectTo?appUrl=" + (*modular)["appUrl"].(string) + "?disWord=" + discored //日志中转页
+                    }
+                }
+            }
+        }
+    }
+    /*//redis 获取分销者信息
+      redisDis := redis.GetStr("other", "DIS_"+discored[1:])
+      if redisDis != "" {
+      	//分销者昵称
+      	shareNickname = strings.Split(redisDis, "##")[0]
+      }*/
+    return name, url, appUrl, shareNickname
 
 }
 
 type Duration int64
 
 func TimeProcessing(hour interface{}, duration int) time.Time {
-	todayZero, _ := time.ParseInLocation(Date_Full_Layout, fmt.Sprint(hour), time.Local)
-	mm, _ := time.ParseDuration(fmt.Sprint(duration) + "m")
-	t := todayZero.Add(mm)
-	//t := todayZero.Add(time.Second * 89)
-	return t
+    todayZero, _ := time.ParseInLocation(Date_Full_Layout, fmt.Sprint(hour), time.Local)
+    mm, _ := time.ParseDuration(fmt.Sprint(duration) + "m")
+    t := todayZero.Add(mm)
+    //t := todayZero.Add(time.Second * 89)
+    return t
 }
 
 //根据app客户端复制信息  返回对应信息
 func (this *Share) GetWordInfo() {
-	defer util.Catch()
-	res := map[string]interface{}{
-		"error_code": error_msg[0],
-		"error_msg":  error_msg[0],
-		"data":       map[string]interface{}{},
-	}
-	userId, _ := this.Session().Get("userId").(string)
-	//userId := "5f5b174923d21d0624334fca"
-	if this.Method() == METHOD {
-		copyTxt := this.GetString("copyTxt")
-		if strings.Contains(copyTxt, "复制") && strings.Contains(copyTxt, "剑鱼标讯APP") {
-			ct_one := strings.Split(copyTxt, ":")[1]
-			discored := strings.Split(ct_one, ",")[0]
-			log.Println("口令:", discored)
-			log.Println("分析", CopyInfo(discored, userId))
-			if discored != "" {
-				res["data"] = CopyInfo(discored, userId)
-				res["error_code"] = 0
-				res["error_msg"] = ""
-			} else {
-				res["error_msg"] = error_msg[2]
-			}
-		} else {
-			res["error_msg"] = error_msg[2]
-		}
-	}
-	this.ServeJson(res)
+    defer util.Catch()
+    res := map[string]interface{}{
+        "error_code": error_msg[0],
+        "error_msg":  error_msg[0],
+        "data":       map[string]interface{}{},
+    }
+    userId, _ := this.Session().Get("userId").(string)
+    //userId := "5f5b174923d21d0624334fca"
+    if this.Method() == METHOD {
+        copyTxt := this.GetString("copyTxt")
+        if strings.Contains(copyTxt, "复制") && strings.Contains(copyTxt, "剑鱼标讯APP") {
+            ct_one := strings.Split(copyTxt, ":")[1]
+            discored := strings.Split(ct_one, ",")[0]
+            log.Println("口令:", discored)
+            log.Println("分析", CopyInfo(discored, userId))
+            if discored != "" {
+                res["data"] = CopyInfo(discored, userId)
+                res["error_code"] = 0
+                res["error_msg"] = ""
+            } else {
+                res["error_msg"] = error_msg[2]
+            }
+        } else {
+            res["error_msg"] = error_msg[2]
+        }
+    }
+    this.ServeJson(res)
 }
 
 //app 分析指令
 func CopyInfo(discored, userId string) (res map[string]interface{}) {
-	if discored != "" {
-		log.Println(analyseWord(discored, userId, true))
-		name, _, appUrl, shareNickname := analyseWord(discored, userId, true)
-		imgUrl := Sysconfig.Modular["imgUrl"].(string)
-		if p_data, ok := MQFW.Find("dis_product", nil, `{"l_createdate":1}`, nil, false, -1, -1); ok && p_data != nil {
-			for _, v := range *p_data {
-				if v["s_name"].(string) == name && v["s_img"].(string) != "" {
-					imgUrl = v["s_img"].(string) //产品头像
-					break
-				}
-			}
-		}
-		suffix := discored[len(discored)-3 : len(discored)]
-		if suffix == suffix_msgt {
-			appUrl = "/jyapp" + appUrl
-		}
-		log.Println("需要打开页面地址:" + appUrl)
-		res = map[string]interface{}{
-			"title":     fmt.Sprintf(Sysconfig.Modular["title"].(string), shareNickname), //标题
-			"subTitle":  fmt.Sprintf(Sysconfig.Modular["subTitle"].(string), name),       //副标题
-			"butTxt":    Sysconfig.Modular["butTxt"].(string),                            //按钮文案
-			"bottomTxt": Sysconfig.Modular["bottomTxt"].(string),                         //底部文案
-			"appUrl":    appUrl,                                                          //跳转链接
-			"imgUrl":    imgUrl + "?v=" + strconv.FormatInt(time.Now().Unix(), 10),       //产品图片
-		}
-	}
-	return
+    if discored != "" {
+        log.Println(analyseWord(discored, userId, true))
+        name, _, appUrl, shareNickname := analyseWord(discored, userId, true)
+        imgUrl := Sysconfig.Modular["imgUrl"].(string)
+        if p_data, ok := MQFW.Find("dis_product", nil, `{"l_createdate":1}`, nil, false, -1, -1); ok && p_data != nil {
+            for _, v := range *p_data {
+                if v["s_name"].(string) == name && v["s_img"].(string) != "" {
+                    imgUrl = v["s_img"].(string) //产品头像
+                    break
+                }
+            }
+        }
+        suffix := discored[len(discored)-3 : len(discored)]
+        if suffix == suffix_msgt {
+            appUrl = "/jyapp" + appUrl
+        }
+        log.Println("需要打开页面地址:" + appUrl)
+        res = map[string]interface{}{
+            "title":     fmt.Sprintf(Sysconfig.Modular["title"].(string), shareNickname), //标题
+            "subTitle":  fmt.Sprintf(Sysconfig.Modular["subTitle"].(string), name),       //副标题
+            "butTxt":    Sysconfig.Modular["butTxt"].(string),                            //按钮文案
+            "bottomTxt": Sysconfig.Modular["bottomTxt"].(string),                         //底部文案
+            "appUrl":    appUrl,                                                          //跳转链接
+            "imgUrl":    imgUrl + "?v=" + strconv.FormatInt(time.Now().Unix(), 10),       //产品图片
+        }
+    }
+    return
 }
 
 //数据流量包、中标必听课分销  分析口令
 func appAnalyseWord(discored, userId string, isBuy bool) (name, url, appUrl, shareNickname string) {
-	log.Println("分析口令传入参数", discored)
-	//指令第一个字母
-	encry := discored[:1]
-	//模块  A:超级订阅  B:数据导出  C:数据报告等  D公告信息 _SX三天有效 E 数据流量包 F 中标必听课
-	modular := util.ObjToMap(Sysconfig.Modular[encry])
-	if modular != nil && (*modular)["name"] != nil {
-		redisDis := redis.GetStr("other", "DIS_"+discored[1:])
-		log.Println("redis:", redisDis)
-		if redisDis == "" {
-			name = (*modular)["name"].(string)
-			url = (*modular)["url"].(string) + "?disWord=" + discored                                             //指令传输
-			appUrl = "/jyapp/distrib/redirectTo?appUrl=" + (*modular)["appUrl"].(string) + "?disWord=" + discored //日志中转页
-		} else {
-			shareNickname = strings.Split(redisDis, "##")[0]
-			suffix := discored[len(discored)-3 : len(discored)]
-			name = (*modular)["name"].(string)
-			//公告三级页处理
-			if suffix == suffix_msgt {
-				effectiveTimeStr := strings.Split(redisDis, "##")[3]
-				effectiveTime, _ := strconv.ParseInt(effectiveTimeStr, 10, 64)
-				//是否计算佣金
-				if time.Now().Unix() <= effectiveTime {
-					url = strings.Split(redisDis, "##")[2] + "?disWord=" + discored    //指令传输
-					appUrl = strings.Split(redisDis, "##")[2] + "?disWord=" + discored //日志中转页
-				} else {
-					url = strings.Split(redisDis, "##")[2]    //指令传输
-					appUrl = strings.Split(redisDis, "##")[2] //日志中转页
-				}
+    log.Println("分析口令传入参数", discored)
+    //指令第一个字母
+    encry := discored[:1]
+    //模块  A:超级订阅  B:数据导出  C:数据报告等  D公告信息 _SX三天有效 E 数据流量包 F 中标必听课
+    modular := util.ObjToMap(Sysconfig.Modular[encry])
+    if modular != nil && (*modular)["name"] != nil {
+        redisDis := redis.GetStr("other", "DIS_"+discored[1:])
+        log.Println("redis:", redisDis)
+        if redisDis == "" {
+            name = (*modular)["name"].(string)
+            url = (*modular)["url"].(string) + "?disWord=" + discored                                             //指令传输
+            appUrl = "/jyapp/distrib/redirectTo?appUrl=" + (*modular)["appUrl"].(string) + "?disWord=" + discored //日志中转页
+        } else {
+            shareNickname = strings.Split(redisDis, "##")[0]
+            suffix := discored[len(discored)-3 : len(discored)]
+            name = (*modular)["name"].(string)
+            //公告三级页处理
+            if suffix == suffix_msgt {
+                effectiveTimeStr := strings.Split(redisDis, "##")[3]
+                effectiveTime, _ := strconv.ParseInt(effectiveTimeStr, 10, 64)
+                //是否计算佣金
+                if time.Now().Unix() <= effectiveTime {
+                    url = strings.Split(redisDis, "##")[2] + "?disWord=" + discored    //指令传输
+                    appUrl = strings.Split(redisDis, "##")[2] + "?disWord=" + discored //日志中转页
+                } else {
+                    url = strings.Split(redisDis, "##")[2]    //指令传输
+                    appUrl = strings.Split(redisDis, "##")[2] //日志中转页
+                }
 
-			} else {
-				name = (*modular)["name"].(string)
-				url = (*modular)["url"].(string) + "?disWord=" + discored                                             //指令传输
-				appUrl = "/jyapp/distrib/redirectTo?appUrl=" + (*modular)["appUrl"].(string) + "?disWord=" + discored //日志中转页
-			}
-		}
+            } else {
+                name = (*modular)["name"].(string)
+                url = (*modular)["url"].(string) + "?disWord=" + discored                                             //指令传输
+                appUrl = "/jyapp/distrib/redirectTo?appUrl=" + (*modular)["appUrl"].(string) + "?disWord=" + discored //日志中转页
+            }
+        }
 
-	}
-	/*//redis 获取分销者信息
-	  redisDis := redis.GetStr("other", "DIS_"+discored[1:])
-	  if redisDis != "" {
-	  	//分销者昵称
-	  	shareNickname = strings.Split(redisDis, "##")[0]
-	  }*/
-	return name, url, appUrl, shareNickname
+    }
+    /*//redis 获取分销者信息
+      redisDis := redis.GetStr("other", "DIS_"+discored[1:])
+      if redisDis != "" {
+      	//分销者昵称
+      	shareNickname = strings.Split(redisDis, "##")[0]
+      }*/
+    return name, url, appUrl, shareNickname
 
 }
 
 //第三方获取口令分享的口令信息
 func (this *Share) GetOtherWordShare() {
-	defer util.Catch()
-	res := map[string]interface{}{
-		"error_code": error_code[0],
-		"error_msg":  error_msg[0],
-	}
-	if this.Method() == METHOD {
-		//模块 A:超级订阅  B:数据导出  C:数据报告 X公告三级页等
-		modular := this.GetString("modular")
-		url := this.GetString("url")
-		if modular != "" {
-			userId, _ := this.GetSession("userId").(string)
-			//userId := "123"
-			partner_user := false
-			if userId != "" {
-				s_nickname, _ := this.GetSession("s_nickname").(string)
-				//s_nickname := "232"
-				if s_nickname == "" {
-					s_nickname, _ = this.GetSession("app_name").(string)
-				}
-				//判断是否参与伙伴计划
-				var insert_1, insert_3 int64
-				partner_user = Mysql.CountBySql(`select count(*) from dis_partner where uid=?`, userId) > 0
-				if Mysql.ExecTx("加入伙伴", func(tx *sql.Tx) bool {
-					if !partner_user {
-						insert := map[string]interface{}{
-							"type":          3,
-							"phone":         0,
-							"email":         0,
-							"channel":       "微信",
-							"uid":           userId,
-							"is_adopt":      1,
-							"auth_status":   0, //认证状态
-							"createtime":    time.Now().Format(Date_Full_Layout),
-							"lastlogintime": time.Now().Format(Date_Full_Layout),
-						}
-						insert_1 = Mysql.InsertByTx(tx, "dis_partner", insert) //伙伴表
-						log.Println("插入伙伴计划", insert_1)
-						partner_user = Mysql.CountBySql(`select count(*) from account where uid=?`, userId) > 0
-						if !partner_user {
-							insert_3 = Mysql.InsertByTx(tx, "account", map[string]interface{}{ //个人账户表
-								"uid":            userId,
-								"money":          0,
-								"dis_sales":      0,
-								"dis_commission": 0,
-								"dis_order":      0,
-							})
-							log.Println("插入账号表", insert_3)
-						}
+    defer util.Catch()
+    res := map[string]interface{}{
+        "error_code": error_code[0],
+        "error_msg":  error_msg[0],
+    }
+    if this.Method() == METHOD {
+        //模块 A:超级订阅  B:数据导出  C:数据报告 X公告三级页等
+        modular := this.GetString("modular")
+        url := this.GetString("url")
+        if modular != "" {
+            userId, _ := this.GetSession("userId").(string)
+            //userId := "123"
+            partner_user := false
+            if userId != "" {
+                s_nickname, _ := this.GetSession("s_nickname").(string)
+                //s_nickname := "232"
+                if s_nickname == "" {
+                    s_nickname, _ = this.GetSession("app_name").(string)
+                }
+                //判断是否参与伙伴计划
+                var insert_1, insert_3 int64
+                partner_user = Mysql.CountBySql(`select count(*) from dis_partner where uid=?`, userId) > 0
+                if Mysql.ExecTx("加入伙伴", func(tx *sql.Tx) bool {
+                    if !partner_user {
+                        insert := map[string]interface{}{
+                            "type":          3,
+                            "phone":         0,
+                            "email":         0,
+                            "channel":       "微信",
+                            "uid":           userId,
+                            "is_adopt":      1,
+                            "auth_status":   0, //认证状态
+                            "createtime":    time.Now().Format(Date_Full_Layout),
+                            "lastlogintime": time.Now().Format(Date_Full_Layout),
+                        }
+                        insert_1 = Mysql.InsertByTx(tx, "dis_partner", insert) //伙伴表
+                        log.Println("插入伙伴计划", insert_1)
+                        partner_user = Mysql.CountBySql(`select count(*) from account where uid=?`, userId) > 0
+                        if !partner_user {
+                            insert_3 = Mysql.InsertByTx(tx, "account", map[string]interface{}{ //个人账户表
+                                "uid":            userId,
+                                "money":          0,
+                                "dis_sales":      0,
+                                "dis_commission": 0,
+                                "dis_order":      0,
+                            })
+                            log.Println("插入账号表", insert_3)
+                        }
 
-					}
-					word := VarLSCPool.GetJob()
-					word += suffix_msgt
-					//用户昵称存redis   app粘贴时备用
-					effectiveTime := time.Now().Unix() + int64(Sysconfig.TermValidity*60)
-					url = strings.Replace(url, "/jyapp", "", 1)
-					redis.Put("other", "DIS_"+word, s_nickname+"##"+userId+"##"+url+"##"+fmt.Sprint(effectiveTime), -1)
-					log.Println("生成口号命令", userId)
-					res["data"] = map[string]interface{}{
-						"disWord":   modular + word,                               //口令
-						"shareLink": Sysconfig.Webdomain + "/X/" + modular + word, //微信分享链接
-						"erUrl":     "/jyapp/front/downloadJyApp/qrOther?discored=" + modular + word + "&title=公告信息",
-					}
-					res["error_code"] = 0
-					res["error_msg"] = ""
-					return insert_1 > 0 && insert_3 > -1
-				}) {
+                    }
+                    word := VarLSCPool.GetJob()
+                    word += suffix_msgt
+                    //用户昵称存redis   app粘贴时备用
+                    effectiveTime := time.Now().Unix() + int64(Sysconfig.TermValidity*60)
+                    url = strings.Replace(url, "/jyapp", "", 1)
+                    redis.Put("other", "DIS_"+word, s_nickname+"##"+userId+"##"+url+"##"+fmt.Sprint(effectiveTime), -1)
+                    log.Println("生成口号命令", userId)
+                    res["data"] = map[string]interface{}{
+                        "disWord":   modular + word,                               //口令
+                        "shareLink": Sysconfig.Webdomain + "/X/" + modular + word, //微信分享链接
+                        "erUrl":     "/jyapp/front/downloadJyApp/qrOther?discored=" + modular + word + "&title=公告信息",
+                    }
+                    res["error_code"] = 0
+                    res["error_msg"] = ""
+                    return insert_1 > 0 && insert_3 > -1
+                }) {
 
-				}
-			}
-		} else {
-			res["error_msg"] = error_msg[2]
-			res["error_code"] = error_code[2]
-		}
-	}
-	this.ServeJson(res)
+                }
+            }
+        } else {
+            res["error_msg"] = error_msg[2]
+            res["error_code"] = error_code[2]
+        }
+    }
+    this.ServeJson(res)
 }
 
 //获取口令分享的口令信息
 func (this *Share) GetWordShare() {
-	defer util.Catch()
-	res := map[string]interface{}{
-		"error_code": error_code[0],
-		"error_msg":  error_msg[0],
-	}
-	if this.Method() == METHOD {
-		//模块  A:超级订阅  B:数据导出  C:数据报告等
-		modular := this.GetString("modular")
-		if modular != "" {
-			userId, _ := this.GetSession("userId").(string)
-			//userId := "5c89fead1c298a4d75fef39e"
-			if userId != "" {
-				s_nickname, _ := this.GetSession("s_nickname").(string)
-				if s_nickname == "" {
-					s_nickname, _ = this.GetSession("app_name").(string)
-				}
-				word := redis.GetStr("other", "DIS_"+userId)
-				if word == "" {
-					userData, ok := MQFW.FindById("user", userId, `{"s_disword":1}`)
-					if ok && (*userData)["s_disword"] != nil && util.ObjToString((*userData)["s_disword"]) != "" {
-						word = util.ObjToString((*userData)["s_disword"])
-					} else {
-						word = VarLSCPool.GetJob()
-						//用户昵称存redis   app粘贴时备用
-						redis.Put("other", "DIS_"+word, s_nickname+"##"+userId, -1)
-						//用户信息绑定分享口令
-						redis.Put("other", "DIS_"+userId, word, -1)
-						ok := MQFW.UpdateById("user", userId, map[string]interface{}{
-							"$set": map[string]interface{}{
-								"s_disword": word,
-							},
-						})
-						if !ok {
-							log.Println("保存 口令到user失败-", userId)
-						}
-					}
-				}
-				res["data"] = map[string]interface{}{
-					"disWord":   modular + word,                               //口令
-					"shareLink": Sysconfig.Webdomain + "/F/" + modular + word, //微信分享链接
-					"erUrl":     "/jyapp/getERCode/DIS_" + modular + word,     //二维码地址
-				}
-				res["error_code"] = 0
-				res["error_msg"] = ""
-			} else {
-				res["error_msg"] = error_msg[1]
-				res["error_code"] = error_code[1]
-			}
-		} else {
-			res["error_msg"] = error_msg[2]
-			res["error_code"] = error_code[2]
-		}
-	}
-	this.ServeJson(res)
+    defer util.Catch()
+    res := map[string]interface{}{
+        "error_code": error_code[0],
+        "error_msg":  error_msg[0],
+    }
+    if this.Method() == METHOD {
+        //模块  A:超级订阅  B:数据导出  C:数据报告等
+        modular := this.GetString("modular")
+        if modular != "" {
+            userId, _ := this.GetSession("userId").(string)
+            //userId := "5c89fead1c298a4d75fef39e"
+            if userId != "" {
+                s_nickname, _ := this.GetSession("s_nickname").(string)
+                if s_nickname == "" {
+                    s_nickname, _ = this.GetSession("app_name").(string)
+                }
+                word := redis.GetStr("other", "DIS_"+userId)
+                if word == "" {
+                    userData, ok := MQFW.FindById("user", userId, `{"s_disword":1}`)
+                    if ok && (*userData)["s_disword"] != nil && util.ObjToString((*userData)["s_disword"]) != "" {
+                        word = util.ObjToString((*userData)["s_disword"])
+                    } else {
+                        word = VarLSCPool.GetJob()
+                        //用户昵称存redis   app粘贴时备用
+                        redis.Put("other", "DIS_"+word, s_nickname+"##"+userId, -1)
+                        //用户信息绑定分享口令
+                        redis.Put("other", "DIS_"+userId, word, -1)
+                        ok := MQFW.UpdateById("user", userId, map[string]interface{}{
+                            "$set": map[string]interface{}{
+                                "s_disword": word,
+                            },
+                        })
+                        if !ok {
+                            log.Println("保存 口令到user失败-", userId)
+                        }
+                    }
+                }
+                res["data"] = map[string]interface{}{
+                    "disWord":   modular + word,                               //口令
+                    "shareLink": Sysconfig.Webdomain + "/F/" + modular + word, //微信分享链接
+                    "erUrl":     "/jyapp/getERCode/DIS_" + modular + word,     //二维码地址
+                }
+                res["error_code"] = 0
+                res["error_msg"] = ""
+            } else {
+                res["error_msg"] = error_msg[1]
+                res["error_code"] = error_code[1]
+            }
+        } else {
+            res["error_msg"] = error_msg[2]
+            res["error_code"] = error_code[2]
+        }
+    }
+    this.ServeJson(res)
 }
 
 //type 1:超级订阅 2:数据导出 3:数据报告 4:中标必听课 5三级页
 func (this *Share) ShareLogs() {
-	userId, _ := this.GetSession("userId").(string)
-	//userId := "5c89fead1c298a4d75fef39e"
-	status, msg := func() (int, string) {
-		typ, _ := this.GetInteger("product_type")
-		product_type := ""
-		if typ == 1 {
-			product_type = "超级订阅"
-		} else if typ == 2 {
-			product_type = "数据导出"
-		} else if typ == 3 {
-			product_type = "数据报告"
-		} else if typ == 4 {
-			product_type = "中标必听课"
-		} else {
-			return -1, "product_type参数错误"
-		}
-		lock := &sync.Mutex{}
-		lock.Lock()
-		//count++
-		MQFW.Update("dis_product", map[string]interface{}{
-			"s_name": product_type,
-		}, map[string]interface{}{
-			"$set": map[string]interface{}{
-				"l_timetamp": time.Now().Unix(),
-			},
-			"$inc": map[string]interface{}{
-				"i_shareCount": 1,
-			},
-		}, false, false)
-		lock.Unlock()
-		//保存日志
-		userid := util.If(userId == "", "", userId)
-		logid := MQFW.Save("distribution_sharelog", map[string]interface{}{
-			"userid":       userid,
-			"createtime":   time.Now().Unix(),
-			"url":          this.Request.Referer(),
-			"client":       this.Header("User-Agent"),
-			"product_type": typ,
-			"action":       this.GetString("act"),
-			"password":     this.GetString("password"),
-		})
-		if logid == "" {
-			return -1, "保存分享日志出错"
-		}
-		return 1, ""
-	}()
-	if status != 1 {
-		log.Println(this.GetSession("userId"), msg)
-	}
+    userId, _ := this.GetSession("userId").(string)
+    //userId := "5c89fead1c298a4d75fef39e"
+    status, msg := func() (int, string) {
+        typ, _ := this.GetInteger("product_type")
+        product_type := ""
+        if typ == 1 {
+            product_type = "超级订阅"
+        } else if typ == 2 {
+            product_type = "数据导出"
+        } else if typ == 3 {
+            product_type = "数据报告"
+        } else if typ == 4 {
+            product_type = "中标必听课"
+        } else {
+            return -1, "product_type参数错误"
+        }
+        lock := &sync.Mutex{}
+        lock.Lock()
+        //count++
+        MQFW.Update("dis_product", map[string]interface{}{
+            "s_name": product_type,
+        }, map[string]interface{}{
+            "$set": map[string]interface{}{
+                "l_timetamp": time.Now().Unix(),
+            },
+            "$inc": map[string]interface{}{
+                "i_shareCount": 1,
+            },
+        }, false, false)
+        lock.Unlock()
+        //保存日志
+        userid := util.If(userId == "", "", userId)
+        logid := MQFW.Save("distribution_sharelog", map[string]interface{}{
+            "userid":       userid,
+            "createtime":   time.Now().Unix(),
+            "url":          this.Request.Referer(),
+            "client":       this.Header("User-Agent"),
+            "product_type": typ,
+            "action":       this.GetString("act"),
+            "password":     this.GetString("password"),
+        })
+        if logid == "" {
+            return -1, "保存分享日志出错"
+        }
+        return 1, ""
+    }()
+    if status != 1 {
+        log.Println(this.GetSession("userId"), msg)
+    }
 }
 
 func (this *Share) ShareLink() {
-	res := map[string]interface{}{
-		"error_code": error_code[0],
-		"error_msg":  error_msg[0],
-		"data":       "",
-	}
-	disWord := this.GetString("disWord")
-	dis := disWord[:1]
-	url := Sysconfig.Webdomain + "/G/" + disWord
-	if dis == "E" {
-		url = Sysconfig.Webdomain + "/E/" + disWord
-	} else if dis == "F" {
-		url = Sysconfig.Webdomain + "/F/" + disWord
-	}
+    res := map[string]interface{}{
+        "error_code": error_code[0],
+        "error_msg":  error_msg[0],
+        "data":       "",
+    }
+    disWord := this.GetString("disWord")
+    dis := disWord[:1]
+    url := Sysconfig.Webdomain + "/G/" + disWord
+    if dis == "E" {
+        url = Sysconfig.Webdomain + "/E/" + disWord
+    } else if dis == "F" {
+        url = Sysconfig.Webdomain + "/F/" + disWord
+    }
 
-	log.Println(url)
-	r, _ := qr.Encode(url, qr.M)
-	pngdat := r.PNG()
-	res["error_code"] = 0
-	res["error_msg"] = "二维码获取"
-	res["data"] = base64.StdEncoding.EncodeToString(pngdat)
-	this.ServeJson(res)
+    log.Println(url)
+    r, _ := qr.Encode(url, qr.M)
+    pngdat := r.PNG()
+    res["error_code"] = 0
+    res["error_msg"] = "二维码获取"
+    res["data"] = base64.StdEncoding.EncodeToString(pngdat)
+    this.ServeJson(res)
 }

+ 126 - 122
src/jfw/modules/distribution/src/service/config/config.go

@@ -1,150 +1,154 @@
 package config
 
 import (
-	util "app.yhyue.com/moapp/jybase/common"
-	"app.yhyue.com/moapp/jybase/mail"
-	m "app.yhyue.com/moapp/jybase/mongodb"
-	"app.yhyue.com/moapp/jybase/mysql"
-	"app.yhyue.com/moapp/jybase/redis"
-	"log"
+    util "app.yhyue.com/moapp/jybase/common"
+    "app.yhyue.com/moapp/jybase/mail"
+    m "app.yhyue.com/moapp/jybase/mongodb"
+    "app.yhyue.com/moapp/jybase/mysql"
+    "app.yhyue.com/moapp/jybase/redis"
+    "app.yhyue.com/moapp/jypkg/middleground"
+    "github.com/gogf/gf/v2/frame/g"
+    "github.com/gogf/gf/v2/os/gcfg"
+    "github.com/gogf/gf/v2/os/gctx"
+    "log"
 )
 
 type config struct {
-	Webport   string
-	Webdomain string
-	Mail      *[]mailConf
-	Mongodb   struct {
-		Main *mgoConf
-		Log  *mgoConf
-		Ent  *mgoConf
-	}
-	Elasticsearch struct {
-		Main *esConf
-	}
-	Redis struct {
-		Main  *redisConf
-		Login *redisConf
-	}
-	Mysql struct {
-		Main *mysqlConf
-		Push *mysqlConf
-	}
-	WorkerNum          int
-	JobNum             int
-	Modular            map[string]interface{}
-	UploadPath         string
-	CatchoutTimesMonth int64
-	AuthCost           float64
-	TermValidity       int
-	SourceCenter       string
-	PhoneFilterFlag    bool
-	AccountMergeOnline string
-	Regurl             []string
-	SmsServiceRpc      string
-	Etcd               struct {
-		Hosts string `json:"hosts"`
-		Key   string `json:"key"`
-	} `json:"etcd"`
+    Webport   string
+    Webdomain string
+    Mail      *[]mailConf
+    Mongodb   struct {
+        Main *mgoConf
+        Log  *mgoConf
+        Ent  *mgoConf
+    }
+    Elasticsearch struct {
+        Main *esConf
+    }
+    Redis struct {
+        Main  *redisConf
+        Login *redisConf
+    }
+    Mysql struct {
+        Main *mysqlConf
+        Push *mysqlConf
+    }
+    WorkerNum          int
+    JobNum             int
+    Modular            map[string]interface{}
+    UploadPath         string
+    CatchoutTimesMonth int64
+    AuthCost           float64
+    TermValidity       int
+    SourceCenter       string
+    PhoneFilterFlag    bool
+    AccountMergeOnline string
+    Regurl             []string
+    SmsServiceRpc      string
 }
 
 type BalanceRes struct {
-	Code    int64                    `json:"code"`
-	Message string                   `json:"message"`
-	Data    []map[string]interface{} `json:"data"`
+    Code    int64                    `json:"code"`
+    Message string                   `json:"message"`
+    Data    []map[string]interface{} `json:"data"`
 }
 
 type mgoConf struct {
-	Address  string
-	Size     int
-	DbName   string
-	UserName string
-	Password string
+    Address  string
+    Size     int
+    DbName   string
+    UserName string
+    Password string
 }
 
 type esConf struct {
-	Address string
-	Size    int
+    Address string
+    Size    int
 }
 type redisConf struct {
-	Address string
+    Address string
 }
 type mysqlConf struct {
-	DbName       string
-	Address      string
-	UserName     string
-	PassWord     string
-	MaxOpenConns int
-	MaxIdleConns int
+    DbName       string
+    Address      string
+    UserName     string
+    PassWord     string
+    MaxOpenConns int
+    MaxIdleConns int
 }
 type mailConf struct {
-	Addr string
-	Port int
-	Pwd  string
-	User string
+    Addr string
+    Port int
+    Pwd  string
+    User string
 }
 
 var (
-	Sysconfig *config
-	Mysql     *mysql.Mysql
-	MQFW      m.MongodbSim
-	Mgo_Log   m.MongodbSim
-	GmailAuth []*mail.GmailAuth
+    Sysconfig    *config
+    Mysql        *mysql.Mysql
+    MQFW         m.MongodbSim
+    Mgo_Log      m.MongodbSim
+    GmailAuth    []*mail.GmailAuth
+    Middleground *middleground.Middleground
 )
 
 func init() {
-	util.ReadConfig(&Sysconfig)
-	if Sysconfig != nil {
-		//初始化redis
-		if Sysconfig.Redis.Main != nil {
-			log.Println("初始化 redis")
-			redis.InitRedisBySize(Sysconfig.Redis.Main.Address, 100, 30, 300)
-		}
-		//
-		if Sysconfig.Mongodb.Main != nil {
-			log.Println("初始化 mongodb main")
-			MQFW = m.MongodbSim{
-				MongodbAddr: Sysconfig.Mongodb.Main.Address,
-				Size:        Sysconfig.Mongodb.Main.Size,
-				DbName:      Sysconfig.Mongodb.Main.DbName,
-			}
-			MQFW.InitPool()
-		}
-		if Sysconfig.Mongodb.Log != nil {
-			log.Println("初始化 mongodb log")
-			Mgo_Log = m.MongodbSim{
-				MongodbAddr: Sysconfig.Mongodb.Log.Address,
-				Size:        Sysconfig.Mongodb.Log.Size,
-				DbName:      Sysconfig.Mongodb.Log.DbName,
-				UserName:    Sysconfig.Mongodb.Log.UserName,
-				Password:    Sysconfig.Mongodb.Log.Password,
-			}
-			Mgo_Log.InitPool()
-		}
-		if Sysconfig.Mysql.Main != nil {
-			log.Println("初始化 mysql")
-			Mysql = &mysql.Mysql{
-				Address:      Sysconfig.Mysql.Main.Address,
-				UserName:     Sysconfig.Mysql.Main.UserName,
-				PassWord:     Sysconfig.Mysql.Main.PassWord,
-				DBName:       Sysconfig.Mysql.Main.DbName,
-				MaxOpenConns: Sysconfig.Mysql.Main.MaxOpenConns,
-				MaxIdleConns: Sysconfig.Mysql.Main.MaxIdleConns,
-			}
-			Mysql.Init()
-		}
-		//
-		if Sysconfig.Mail != nil {
-			log.Println("初始化 Mail")
-			mailConfigArrMap := Sysconfig.Mail
-			for _, v := range *mailConfigArrMap {
-				mail := &mail.GmailAuth{
-					SmtpHost: v.Addr,
-					SmtpPort: v.Port,
-					User:     v.User,
-					Pwd:      v.Pwd,
-				}
-				GmailAuth = append(GmailAuth, mail)
-			}
-		}
-	}
+    util.ReadConfig(&Sysconfig)
+    if Sysconfig != nil {
+        //初始化redis
+        if Sysconfig.Redis.Main != nil {
+            log.Println("初始化 redis")
+            redis.InitRedisBySize(Sysconfig.Redis.Main.Address, 100, 30, 300)
+        }
+        //
+        if Sysconfig.Mongodb.Main != nil {
+            log.Println("初始化 mongodb main")
+            MQFW = m.MongodbSim{
+                MongodbAddr: Sysconfig.Mongodb.Main.Address,
+                Size:        Sysconfig.Mongodb.Main.Size,
+                DbName:      Sysconfig.Mongodb.Main.DbName,
+            }
+            MQFW.InitPool()
+        }
+        if Sysconfig.Mongodb.Log != nil {
+            log.Println("初始化 mongodb log")
+            Mgo_Log = m.MongodbSim{
+                MongodbAddr: Sysconfig.Mongodb.Log.Address,
+                Size:        Sysconfig.Mongodb.Log.Size,
+                DbName:      Sysconfig.Mongodb.Log.DbName,
+                UserName:    Sysconfig.Mongodb.Log.UserName,
+                Password:    Sysconfig.Mongodb.Log.Password,
+            }
+            Mgo_Log.InitPool()
+        }
+        if Sysconfig.Mysql.Main != nil {
+            log.Println("初始化 mysql")
+            Mysql = &mysql.Mysql{
+                Address:      Sysconfig.Mysql.Main.Address,
+                UserName:     Sysconfig.Mysql.Main.UserName,
+                PassWord:     Sysconfig.Mysql.Main.PassWord,
+                DBName:       Sysconfig.Mysql.Main.DbName,
+                MaxOpenConns: Sysconfig.Mysql.Main.MaxOpenConns,
+                MaxIdleConns: Sysconfig.Mysql.Main.MaxIdleConns,
+            }
+            Mysql.Init()
+        }
+        //
+        if Sysconfig.Mail != nil {
+            log.Println("初始化 Mail")
+            mailConfigArrMap := Sysconfig.Mail
+            for _, v := range *mailConfigArrMap {
+                mail := &mail.GmailAuth{
+                    SmtpHost: v.Addr,
+                    SmtpPort: v.Port,
+                    User:     v.User,
+                    Pwd:      v.Pwd,
+                }
+                GmailAuth = append(GmailAuth, mail)
+            }
+        }
+        g.Cfg().GetAdapter().(*gcfg.AdapterFile).SetFileName("config.yaml")
+        var ctx = gctx.New()
+        Middleground = middleground.NewMiddleground(g.Cfg().MustGet(ctx, "etcd.hosts").Strings()).RegUserCenter(g.Cfg().MustGet(ctx, "userCenterKey").String()).RegPowerCheckCenter(g.Cfg().MustGet(ctx, "powerCheckKey").String())
+    }
 }

+ 4 - 4
src/jfw/modules/publicapply/src/attachmentdow/service/service.go

@@ -35,8 +35,8 @@ func (u *Dow) SupplyInfoFileDownload() {
 			return Result{Data: nil, Error_msg: "未登录"}
 		}
 
-		BaseMsg := jy.GetBigVipUserBaseMsg("10000", u.Session(), config.Config.Etcd.Hosts, config.Config.Etcd.Key)
-		vipStatus := jy.GetVipState("10000", u.Session(), config.Config.Etcd.Hosts, config.Config.Etcd.Key, userid)
+		BaseMsg := jy.GetBigVipUserBaseMsg( u.Session(),*config.Middleground)
+		vipStatus := jy.GetVipState( u.Session(),*config.Middleground, userid)
 		isPower := false
 		//大会员下载权限判断
 		if BaseMsg.Status > 0 && BaseMsg.PowerMap[3] {
@@ -120,8 +120,8 @@ func (u *Dow) Subdow() {
 			return Result{Data: nil, Error_msg: "未登录"}
 		}
 
-		BaseMsg := jy.GetBigVipUserBaseMsg("10000", u.Session(), config.Config.Etcd.Hosts, config.Config.Etcd.Key)
-		vipStatus := jy.GetVipState("10000", u.Session(), config.Config.Etcd.Hosts, config.Config.Etcd.Key, userid)
+		BaseMsg := jy.GetBigVipUserBaseMsg( u.Session(),*config.Middleground)
+		vipStatus := jy.GetVipState( u.Session(),*config.Middleground, userid)
 
 		var (
 			mon string

+ 2 - 2
src/jfw/modules/publicapply/src/bidcollection/entity/entity.go

@@ -439,8 +439,8 @@ func Power(session *httpsession.Session) (bool, map[string]interface{}) {
 	isVip, isMember, isEnt, privatedata := false, false, false, false
 	vipstatus := 0
 	//isVip, isMember, isEnt, privatedata
-	//resp := grpc.PowerCheck.Check("10000", userid, baseUserId, accountId, entId)
-	resp := jy.GetBigVipUserBaseMsg("10000", session, config.Config.Etcd.Key, config.Config.Etcd.Key)
+	//resp := grpc.PowerCheck.Check( userid, baseUserId, accountId, entId)
+	resp := jy.GetBigVipUserBaseMsg( session, *config.Middleground)
 	if resp != nil {
 		if resp.VipStatus > 1 {
 			vipstatus = 1

+ 2 - 2
src/jfw/modules/publicapply/src/customer/entity/entiy.go

@@ -96,7 +96,7 @@ func (this *CustomerOperation) CList(pageSize, pageNo, entUserId int, keyword, i
 	}
 
 	//大会员客户关注上限
-	BigMsg := jy.GetBigVipUserBaseMsg("10000", this.Session, config.Config.Etcd.Hosts, config.Config.Etcd.Key)
+	BigMsg := jy.GetBigVipUserBaseMsg( this.Session,*config.Middleground)
 	entVip := jy.GetEntnicheState(this.UserId, db.Mysql, db.Mgo)
 	customerMap := map[string]interface{}{}
 	if entVip.EntnicheStatus > 0 {
@@ -177,7 +177,7 @@ func (this *CustomerOperation) CheckPower() string {
 		msg = "登录异常"
 	} else {
 		//查询是否是大会员
-		if userPower := jy.GetBigVipUserBaseMsg("10000", this.Session, config.Config.Etcd.Hosts, config.Config.Etcd.Key); userPower.Status > 0 {
+		if userPower := jy.GetBigVipUserBaseMsg( this.Session,*config.Middleground); userPower.Status > 0 {
 			count := redis.GetInt(redisName, fmt.Sprintf(redisCountKey, this.UserId))
 			if count < 1 {
 				query := map[string]interface{}{

+ 1 - 1
src/jfw/modules/publicapply/src/dataexport/entity/collection.go

@@ -34,7 +34,7 @@ func IsPay(session *httpsession.Session) bool {
         		}
         	}
         }*/
-        data := jy.GetBigVipUserBaseMsg("10000", session, config.Config.Etcd.Hosts, config.Config.Etcd.Key)
+        data := jy.GetBigVipUserBaseMsg( session, *config.Middleground)
         isVip = data.Data.Vip.Status > 0
         isEnt = data.Data.Entniche.Status > 0
         isMember = data.Data.Member.Status > 0

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

@@ -196,7 +196,7 @@ func (des *DataExportStruct) ByPushHistory() {
 		defer util.Catch()
 		vipType := des.GetString("vt")
 		if vipType == "" { //默认取已切换的企业
-			vipType = jy.SwitchService.GetEntniche(des.Session(), "10000", config.Config.Etcd.Hosts, config.Config.Etcd.Key)
+			vipType = jy.SwitchService.GetEntniche(des.Session(), *config.Middleground)
 		}
 		if vipType == jy.SwitchService.Entniche {
 			userId = fmt.Sprint(util.IntAll(des.GetSession("entUserId")))

+ 1 - 1
src/jfw/modules/publicapply/src/enterpriseSearch/service/search.go

@@ -39,7 +39,7 @@ func (esa *EnterpriseSearchAction) DoEntSearch() {
 			return nil, err
 		}
 		//查询是否是会员
-		if vipData := jy.GetBigVipUserBaseMsg("10000", esa.Session(), config.Config.Etcd.Hosts, config.Config.Etcd.Key); vipData.Status > 0 || vipData.VipStatus > 0 {
+		if vipData := jy.GetBigVipUserBaseMsg( esa.Session(),*config.Middleground); vipData.Status > 0 || vipData.VipStatus > 0 {
 			entSearch.IsVip = true
 		}
 		//查询

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

@@ -4,7 +4,7 @@ go 1.18
 
 require (
 	app.yhyue.com/moapp/jybase v0.0.0-20230117032034-ad7c00ffe11a
-	app.yhyue.com/moapp/jypkg v0.0.0-20230202083520-858975e007e3
+	app.yhyue.com/moapp/jypkg v0.0.0-20230202093215-bbde67e76cae
 	bp.jydev.jianyu360.cn/BaseService/userCenter v0.0.0-20230129060002-f69424aa14ba
 	github.com/SKatiyar/qr v0.0.0-20151201054752-25b6bdf44e67
 	github.com/gogf/gf/v2 v2.0.6

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

@@ -13,8 +13,8 @@ app.yhyue.com/moapp/jybase v0.0.0-20220802080941-07f401baab8b/go.mod h1:HelrO6tc
 app.yhyue.com/moapp/jybase v0.0.0-20230109015757-aa3d5e19b196/go.mod h1:zB47XTeJvpcbtBRYgkQuxOICWNexiZfbUO+7aUf6mNs=
 app.yhyue.com/moapp/jybase v0.0.0-20230117032034-ad7c00ffe11a h1:wD4aWPSYdiX1cIP4lzzPD2s7fYhKa3muIf97l9tonJE=
 app.yhyue.com/moapp/jybase v0.0.0-20230117032034-ad7c00ffe11a/go.mod h1:zB47XTeJvpcbtBRYgkQuxOICWNexiZfbUO+7aUf6mNs=
-app.yhyue.com/moapp/jypkg v0.0.0-20230202083520-858975e007e3 h1:8JwEPCjpV+4XysYMfNnRDVR11MGmtWQsHvx1aHfsDN4=
-app.yhyue.com/moapp/jypkg v0.0.0-20230202083520-858975e007e3/go.mod h1:NrRgv24VIpf/xMMvsGC1EgoD+z6z5ea3MqIVxEcSPhE=
+app.yhyue.com/moapp/jypkg v0.0.0-20230202093215-bbde67e76cae h1:vd5a1L01MVMfHkycc4xONzVnEpHrlvD19VxUWdWkocA=
+app.yhyue.com/moapp/jypkg v0.0.0-20230202093215-bbde67e76cae/go.mod h1:NrRgv24VIpf/xMMvsGC1EgoD+z6z5ea3MqIVxEcSPhE=
 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/BP/jynsq v0.0.0-20220222052708-ebc43af90698/go.mod h1:ojo/AUH9Yr1wzarEjOaNMkj1Cet/9r8IgLyba64Z52E=

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

@@ -35,7 +35,7 @@ func (m *Me) MyInfo() {
 	}
 	userId, _ := m.GetSession("userId").(string)
 	//user, ok := db.Mgo.FindById("user", userId, `{"s_phone":1,"s_m_phone":1,"o_jy":1,"i_vip_status":1,"l_vip_endtime":1,"o_vipjy":1,"o_member_jy":1}`)
-	user := jy.GetBigVipUserBaseMsg("10000", m.Session(), config.Config.Etcd.Hosts, config.Config.Etcd.Key)
+	user := jy.GetBigVipUserBaseMsg( m.Session(),*config.Middleground)
 	if user != nil {
 		isExpire := -1
 		isPassCount := false
@@ -94,7 +94,7 @@ func (m *Me) MyInfo() {
 		r["isExpire"] = isExpire
 		r["vipStatus"] = user.Data.Vip.Status
 		r["isPassCount"] = isPassCount
-		r["haskey"], _ = GetKeySet(jy.SwitchService.GetEntniche(m.Session(), "10000", config.Config.Etcd.Hosts, config.Config.Etcd.Key), m.Session())
+		r["haskey"], _ = GetKeySet(jy.SwitchService.GetEntniche(m.Session(), *config.Middleground), m.Session())
 	}
 	m.ServeJson(r)
 }

+ 2 - 2
src/jfw/modules/publicapply/src/subscribePush/entity/historyPush.go

@@ -47,7 +47,7 @@ func (hp *historyPush) IsInTsGuide(session *httpsession.Session) bool {
           		return true
           	}
           }*/
-        data := jy.GetBigVipUserBaseMsg("10000", session, config.Config.Etcd.Hosts, config.Config.Etcd.Key)
+        data := jy.GetBigVipUserBaseMsg( session,*config.Middleground)
         if data.Data.Member.Status > 0 || data.Data.Vip.Status > 0 {
                 return false
         }
@@ -136,7 +136,7 @@ func (d *defaultPush) getUserInfo() (vc *ViewCondition, deptId int) {
                 Area       map[string]interface{}
                 SelectType string
         }{}
-        data := jy.GetBigVipUserBaseMsg("10000", d.Session, config.Config.Etcd.Hosts, config.Config.Etcd.Key)
+        data := jy.GetBigVipUserBaseMsg( d.Session,*config.Middleground)
         switch d.ModuleFlag {
         case "m":
                 //大会员

+ 2 - 2
src/jfw/modules/publicapply/src/subscribePush/entity/keyWords.go

@@ -35,7 +35,7 @@ type KeyWordsSet struct {
 }
 
 func (this *KeyWordsSet) UpdateKeyWords() map[string]interface{} {
-	power := jy.GetBigVipUserBaseMsg("10000", this.Session, config.Config.Etcd.Hosts, config.Config.Etcd.Key)
+	power := jy.GetBigVipUserBaseMsg( this.Session,*config.Middleground)
 	if this.Type == "m" && power.Status < 0 {
 		return map[string]interface{}{"flag": false, "msg": "暂无权限"}
 	}
@@ -804,7 +804,7 @@ type UpdateOther struct {
 }
 
 func (this *UpdateOther) UpdateOther() map[string]interface{} {
-	power := jy.GetBigVipUserBaseMsg("10000", this.Session, config.Config.Etcd.Hosts, config.Config.Etcd.Key)
+	power := jy.GetBigVipUserBaseMsg( this.Session,*config.Middleground)
 	positionType := qutil.Int64All(this.Session.Get("positionType"))
 	if this.Type == "m" && power.Status < 0 {
 		return map[string]interface{}{"flag": false, "msg": "暂无权限"}

+ 2 - 2
src/jfw/modules/publicapply/src/subscribePush/entity/setting.go

@@ -206,7 +206,7 @@ func vipSet(area map[string]interface{}, industry []string, userId string, sessi
 
 //大会员订阅设置
 func memberSet(area map[string]interface{}, industry []string, userId string, session *httpsession.Session) *FuncResult {
-        if data := jy.GetBigVipUserBaseMsg("10000", session, config.Config.Etcd.Key, config.Config.Etcd.Key); data.Status <= 0 {
+        if data := jy.GetBigVipUserBaseMsg( session, *config.Middleground); data.Status <= 0 {
                 return &FuncResult{false, errors.New("请求异常,非大会员状态"), nil}
         }
         if len(industry) == 1 && industry[0] == "" {
@@ -237,7 +237,7 @@ func GetVipDetail(session *httpsession.Session) (*map[string]interface{}, *Subvi
            if !ok || len(*mData) == 0 || mData == nil {
                    return nil, nil, false
            }*/
-        data := jy.GetBigVipUserBaseMsg("10000", session, config.Config.Etcd.Hosts, config.Config.Etcd.Key)
+        data := jy.GetBigVipUserBaseMsg( session,*config.Middleground)
         //是否处于vip状态
         vipStatus := data.Data.Vip.Status
         o_jy := jy.GetSubScribeInfo(session, db.Mgo, "v", "10000")

+ 8 - 8
src/jfw/modules/publicapply/src/subscribePush/service/pushList.go

@@ -41,16 +41,16 @@ func (sp *SubscribePush) VipSwitch() {
 		switchOk := false
 		vt := sp.GetString("vt")
 		if vt == "" {
-			vt = jy.SwitchService.GetEntniche(sp.Session(), "10000", config.Config.Etcd.Hosts, config.Config.Etcd.Key)
+			vt = jy.SwitchService.GetEntniche(sp.Session(), *config.Middleground)
 		} else if vt == jy.SubVipFlag {
-			vipMsg := jy.GetBigVipUserBaseMsg("10000", sp.Session(), config.Config.Etcd.Hosts, config.Config.Etcd.Key)
+			vipMsg := jy.GetBigVipUserBaseMsg( sp.Session(),*config.Middleground)
 			if vipMsg.VipStatus <= 0 {
 				return nil, fmt.Errorf("未购买超级订阅")
 			}
 			sp.SetSession(jy.SwitchService.SessionKey, jy.SwitchService.Vip)
 			switchOk = true
 		} else if vt == jy.MemberFlag {
-			vipMsg := jy.GetBigVipUserBaseMsg("10000", sp.Session(), config.Config.Etcd.Hosts, config.Config.Etcd.Key)
+			vipMsg := jy.GetBigVipUserBaseMsg( sp.Session(),*config.Middleground)
 			if vipMsg.Status <= 0 {
 				return nil, fmt.Errorf("未购买大会员")
 			}
@@ -86,7 +86,7 @@ func (sp *SubscribePush) HasPushHistory() {
 	_userId := userId
 	vipType := sp.GetString("vt")
 	if vipType == "" { //默认取已切换的企业
-		vipType = jy.SwitchService.GetEntniche(sp.Session(), "10000", config.Config.Etcd.Hosts, config.Config.Etcd.Key)
+		vipType = jy.SwitchService.GetEntniche(sp.Session(), *config.Middleground)
 	}
 	if vipType == jy.SwitchService.Entniche {
 		userId = fmt.Sprint(util.IntAll(sp.GetSession("entUserId")))
@@ -210,7 +210,7 @@ func (sp *SubscribePush) HistoryPaging() {
 	}
 	vipType := sp.GetString("vt")
 	if vipType == "" { //默认取已切换的企业
-		vipType = jy.SwitchService.GetEntniche(sp.Session(), "10000", config.Config.Etcd.Hosts, config.Config.Etcd.Key)
+		vipType = jy.SwitchService.GetEntniche(sp.Session(), *config.Middleground)
 	}
 	if vipType == jy.SwitchService.Entniche {
 		userId = fmt.Sprint(util.IntAll(sp.GetSession("entUserId")))
@@ -290,7 +290,7 @@ func (sp *SubscribePush) SetRead() error {
 	}
 	vipType := sp.GetString("vt")
 	if vipType == "" { //默认取已切换的企业
-		vipType = jy.SwitchService.GetEntniche(sp.Session(), "10000", config.Config.Etcd.Hosts, config.Config.Etcd.Key)
+		vipType = jy.SwitchService.GetEntniche(sp.Session(), *config.Middleground)
 	}
 	if userId := util.ObjToString(sp.GetSession("userId")); userId != "" {
 		if vipType == jy.SwitchService.Member {
@@ -321,7 +321,7 @@ func (sp *SubscribePush) GetPushCount() error {
 	if userId != "" {
 		vipType := sp.GetString("vt")
 		if vipType == "" { //默认取已切换的企业
-			vipType = jy.SwitchService.GetEntniche(sp.Session(), "10000", config.Config.Etcd.Hosts, config.Config.Etcd.Key)
+			vipType = jy.SwitchService.GetEntniche(sp.Session(), *config.Middleground)
 
 		}
 		matchway, _ := sp.GetInteger("matchway")
@@ -340,7 +340,7 @@ func (sp *SubscribePush) GetPushAllCount() error {
 		index, _ := sp.GetInteger("index")
 		vipType := sp.GetString("vt")
 		if vipType == "" { //默认取已切换的企业
-			vipType = jy.SwitchService.GetEntniche(sp.Session(), "10000", config.Config.Etcd.Hosts, config.Config.Etcd.Key)
+			vipType = jy.SwitchService.GetEntniche(sp.Session(), *config.Middleground)
 		}
 		sp.ServeJson(map[string]interface{}{
 			"count": entity.SubViewDatasCount(userId, vipType, sp.GetString("item"), index, sp.Session()),

+ 2 - 2
src/jfw/modules/publicapply/src/subscribePush/service/subscribe.go

@@ -26,7 +26,7 @@ func (s *Subscribe) Update() {
 	entUserId := qutil.IntAll(s.GetSession("entUserId"))
 	vSwitch := s.GetString("vSwitch")
 	if vSwitch == "" {
-		vSwitch = jy.SwitchService.Get(s.Session(), "10000", config.Config.Etcd.Hosts, config.Config.Etcd.Key) //v:vip m:member
+		vSwitch = jy.SwitchService.Get(s.Session(), *config.Middleground) //v:vip m:member
 	}
 	sub := &entity.SubscribeSet{
 		Area:      *qutil.ObjToMap(s.GetString("area")),
@@ -52,7 +52,7 @@ func (s *Subscribe) SetUserInfo() {
 	entUserId := qutil.IntAll(s.GetSession("entUserId"))
 	vSwitch := s.GetString("vSwitch")
 	if vSwitch == "" {
-		vSwitch = jy.SwitchService.Get(s.Session(), "10000", config.Config.Etcd.Hosts, config.Config.Etcd.Key) //v:vip m:member "":free
+		vSwitch = jy.SwitchService.Get(s.Session(), *config.Middleground) //v:vip m:member "":free
 	}
 	//判断是否有权限
 	power := 0

+ 3 - 3
src/jfw/modules/publicapply/src/userbase/entity/entity.go

@@ -158,7 +158,7 @@ func thisByPlat(platform, name string, bcv *initjson.BaseFunc) (res string) {
 
 //查看是否有使用此功能的权限
 func IsPower(name string, session *httpsession.Session) (b bool) {
-	BigPower := jy.GetBigVipUserBaseMsg("10000", session, config.Config.Etcd.Hosts, config.Config.Etcd.Key)
+	BigPower := jy.GetBigVipUserBaseMsg( session,*config.Middleground)
 	if BigPower.Status > 0 {
 		switch name {
 		case "企业情报监控":
@@ -193,7 +193,7 @@ func HasIndustryTag(session *httpsession.Session, userId string) bool {
 		return res.(bool)
 	}
 	var hasTag bool
-	vipStatus := jy.GetVipState("10000", session, config.Config.Etcd.Hosts, config.Config.Etcd.Key, userId)
+	vipStatus := jy.GetVipState( session,*config.Middleground, userId)
 	if vipStatus.VipState > 0 || vipStatus.BigMember > 0 || vipStatus.EntMember > 0 { // 仅免费用户查询
 		redis.Put("newother", cacheKey, hasTag, cacheTimeout)
 		return hasTag
@@ -303,7 +303,7 @@ func (this *TipInfoStruct) GetTipInfo() (flag int) {
 	} else { //查询是否提示弹框
 		//判断是否严重用户注册时间
 		if config.Config.TipInfo[this.TipName] > 0 {
-			userBase := jy.GetBigVipUserBaseMsg("10000", this.Session, config.Config.Etcd.Hosts, config.Config.Etcd.Key)
+			userBase := jy.GetBigVipUserBaseMsg( this.Session,*config.Middleground)
 			//此时间点后注册的新用户
 			if userBase.Registedate > config.Config.TipInfo[this.TipName] {
 				return 999

+ 54 - 54
src/jfw/modules/subscribepay/src/active/active.go

@@ -1,74 +1,74 @@
 package active
 
 import (
-        . "app.yhyue.com/moapp/jybase/api"
-        qutil "app.yhyue.com/moapp/jybase/common"
-        "app.yhyue.com/moapp/jypkg/common/src/qfw/util/jy"
-        "errors"
-        "jy/src/jfw/modules/subscribepay/src/config"
-        "jy/src/jfw/modules/subscribepay/src/util"
-        "log"
-        "time"
+	. "app.yhyue.com/moapp/jybase/api"
+	qutil "app.yhyue.com/moapp/jybase/common"
+	"app.yhyue.com/moapp/jypkg/common/src/qfw/util/jy"
+	"errors"
+	"jy/src/jfw/modules/subscribepay/src/config"
+	"jy/src/jfw/modules/subscribepay/src/util"
+	"log"
+	"time"
 
-        "app.yhyue.com/moapp/jybase/go-xweb/xweb"
+	"app.yhyue.com/moapp/jybase/go-xweb/xweb"
 )
 
 type Active struct {
-        *xweb.Action
-        isActiving xweb.Mapper `xweb:"/(.*)/isActiving"` //活动时间
+	*xweb.Action
+	isActiving xweb.Mapper `xweb:"/(.*)/isActiving"` //活动时间
 }
 
 type activeConfig struct {
-        DoubleEleven struct {
-                Active_Start int64 `json:"active_Start"` //活动开始时间
-                Active_End   int64 `json:"active_End"`   //活动开始时间
-        }
+	DoubleEleven struct {
+		Active_Start int64 `json:"active_Start"` //活动开始时间
+		Active_End   int64 `json:"active_End"`   //活动开始时间
+	}
 }
 
 var ActiveConfig activeConfig
 
 func init() {
-        qutil.ReadConfig("./active.json", &ActiveConfig)
+	qutil.ReadConfig("./active.json", &ActiveConfig)
 }
 
 //
 func (this *Active) IsActiving(activeName string) {
-        defer qutil.Catch()
-        userId, _ := this.GetSession("userId").(string)
-        rData, errMsg := func() (interface{}, error) {
-                now := time.Now()
-                res := map[string]interface{}{}
-                if activeName == "doubleEleven" {
-                        res = map[string]interface{}{
-                                "isActiving": false,
-                                "isWritten":  0,
-                        }
-                        if ActiveConfig.DoubleEleven.Active_Start < now.Unix() && ActiveConfig.DoubleEleven.Active_End > now.Unix() {
-                                res["isActiving"] = true
-                                if userId != "" {
-                                        data, ok := util.MQFW.FindById("user", userId, nil)
-                                        if ok && data != nil && *data != nil {
-                                                //已录入信息 已激活大会员赠送
-                                                if (*data)["i_member_give"] != nil {
-                                                        res["isWritten"] = qutil.IntAll((*data)["i_member_give"])
-                                                }
-                                                //是否是大会员用户
-                                                vipUser := jy.GetBigVipUserBaseMsg("10000", this.Session(), config.Config.Etcd.Hosts, config.Config.Etcd.Key)
-                                                if vipUser.Status > 0 {
-                                                        res["isWritten"] = 2
-                                                }
-                                        }
-                                }
-                        }
-                        return res, nil
-                }
-                if res == nil || len(res) == 0 {
-                        return nil, errors.New("暂无活动")
-                }
-                return "", nil
-        }()
-        if errMsg != nil {
-                log.Printf("%s   获取活动信息出错-%s", userId, errMsg)
-        }
-        this.ServeJson(NewResult(rData, errMsg))
+	defer qutil.Catch()
+	userId, _ := this.GetSession("userId").(string)
+	rData, errMsg := func() (interface{}, error) {
+		now := time.Now()
+		res := map[string]interface{}{}
+		if activeName == "doubleEleven" {
+			res = map[string]interface{}{
+				"isActiving": false,
+				"isWritten":  0,
+			}
+			if ActiveConfig.DoubleEleven.Active_Start < now.Unix() && ActiveConfig.DoubleEleven.Active_End > now.Unix() {
+				res["isActiving"] = true
+				if userId != "" {
+					data, ok := util.MQFW.FindById("user", userId, nil)
+					if ok && data != nil && *data != nil {
+						//已录入信息 已激活大会员赠送
+						if (*data)["i_member_give"] != nil {
+							res["isWritten"] = qutil.IntAll((*data)["i_member_give"])
+						}
+						//是否是大会员用户
+						vipUser := jy.GetBigVipUserBaseMsg(this.Session(), *config.Middleground)
+						if vipUser.Status > 0 {
+							res["isWritten"] = 2
+						}
+					}
+				}
+			}
+			return res, nil
+		}
+		if res == nil || len(res) == 0 {
+			return nil, errors.New("暂无活动")
+		}
+		return "", nil
+	}()
+	if errMsg != nil {
+		log.Printf("%s   获取活动信息出错-%s", userId, errMsg)
+	}
+	this.ServeJson(NewResult(rData, errMsg))
 }

+ 4 - 0
src/jfw/modules/subscribepay/src/config.yaml

@@ -0,0 +1,4 @@
+etcd:
+  hosts:
+  - 127.0.0.1:2379
+powerCheckCenterKey: "powercheck.rpc" #权益校验中台

+ 8 - 4
src/jfw/modules/subscribepay/src/config/config.go

@@ -1,6 +1,10 @@
 package config
 
 import (
+	"app.yhyue.com/moapp/jypkg/middleground"
+	"github.com/gogf/gf/v2/frame/g"
+	"github.com/gogf/gf/v2/os/gcfg"
+	"github.com/gogf/gf/v2/os/gctx"
 	"time"
 
 	qutil "app.yhyue.com/moapp/jybase/common"
@@ -92,10 +96,6 @@ type config struct {
 	}
 	KeywordsLimit     int
 	BreakRenewTipTime string
-	Etcd              struct {
-		Hosts string
-		Key   string
-	} `json:"etcd"`
 }
 type mgoConf struct {
 	Address           string
@@ -317,6 +317,7 @@ var WxPayConf map[string]interface{}
 
 var Wxoauth, Wxoauthinfo string
 var AutoMergeTimeStamp int64
+var Middleground *middleground.Middleground
 
 func init() {
 	//程序配置文件
@@ -332,6 +333,9 @@ func init() {
 	qutil.ReadConfig("./coupon.json", &CouponConfig)
 	qutil.ReadConfig("./resourcePack.json", &ResConf)
 	qutil.ReadConfig("./baseApi.json", &middleGround.JyApiConfig) //初始化中台请求接口
+	g.Cfg().GetAdapter().(*gcfg.AdapterFile).SetFileName("config.yaml")
+	var ctx = gctx.New()
+	Middleground = middleground.NewMiddleground(g.Cfg().MustGet(ctx, "etcd.hosts").Strings()).RegUserCenter(g.Cfg().MustGet(ctx, "userCenterKey").String()).RegPowerCheckCenter(g.Cfg().MustGet(ctx, "powerCheckKey").String())
 
 	for _, v := range Config.Mail {
 		mail := &mail.GmailAuth{

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

@@ -31,7 +31,7 @@ func (this *UseBalanceStruct) fileConsume() (r map[string]interface{}, m string,
 	_fileName := this.Remarks["fileName"].(string)
 	_id := this.Remarks["id"].(string)
 	log.Println("附件下载包。。。。。")
-	BaseMsg := jy.GetBigVipUserBaseMsg("10000", this.Session, config.Config.Etcd.Hosts, config.Config.Etcd.Key)
+	BaseMsg := jy.GetBigVipUserBaseMsg(this.Session, *config.Middleground)
 	log.Println("---:", this.Remarks)
 	if BaseMsg.Status > 0 && BaseMsg.PowerMap[3] {
 		if this.Remarks["infoType"] != nil && this.Remarks["infoType"].(string) == "S" {

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

@@ -159,7 +159,7 @@ func (this *dataExportPackStruct) GetPackDetailById(packId string) (*PackDetail,
 func (this *dataExportPackStruct) GetAccountMsg(sess *httpsession.Session, userId string) (map[string]interface{}, error) {
 	//每日限量包
 	packDetail := map[string]interface{}{}
-	vipStatus := jy.GetBigVipUserBaseMsg("10000", sess, config.Config.Etcd.Hosts, config.Config.Etcd.Key)
+	vipStatus := jy.GetBigVipUserBaseMsg(sess, *config.Middleground)
 	if vipStatus.Status > 0 && vipStatus.DailyNum > 0 {
 		packetMsg := dataexport.GetDataPacketMsg(vipStatus.GetUseId(), vipStatus.DailyNum)
 		packDetail["dailyPack"] = map[string]interface{}{
@@ -526,7 +526,7 @@ func cacheResult(err error, filePath, key string) {
 
 // UseDailyPack 每日限量包
 func (this *dataExportPackStruct) UseDailyPack(userId, selectId, phone, email string, selectCount int, session *httpsession.Session) error {
-	vipStatus := jy.GetBigVipUserBaseMsg("10000", session, config.Config.Etcd.Hosts, config.Config.Etcd.Key)
+	vipStatus := jy.GetBigVipUserBaseMsg(session, *config.Middleground)
 	if vipStatus.Status <= 0 || vipStatus.DailyNum == 0 {
 		return fmt.Errorf("非法请求")
 	}

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

@@ -905,7 +905,7 @@ func memberOrder(m map[string]interface{}, userId string, session *httpsession.S
 		return nil, "手机号格式异常"
 	}
 	//校验是否是大会员
-	vipStatus := jy.GetBigVipUserBaseMsg("10000", session, config.Config.Etcd.Hosts, config.Config.Etcd.Key)
+	vipStatus := jy.GetBigVipUserBaseMsg(session, *config.Middleground)
 	if vipStatus.Status > 0 && vipStatus.Status != 4 { //已经是大会员
 		return nil, "您已经是大会员用户"
 	}
@@ -1117,7 +1117,7 @@ func areaPackOrder(m map[string]interface{}, userId string, session *httpsession
 
 //附件下载包
 func filePackOrder(m map[string]interface{}, userId string, session *httpsession.Session) (*OrderInfo, string) {
-	if jy.GetBigVipUserBaseMsg("10000", session, config.Config.Etcd.Hosts, config.Config.Etcd.Key).VipStatus <= 0 {
+	if jy.GetBigVipUserBaseMsg(session, *config.Middleground).VipStatus <= 0 {
 		return nil, "非超级订阅用户,暂无权益"
 	}
 	num := qu.IntAll(m["num"])
@@ -1191,7 +1191,7 @@ func GiveInfo(userid string, useProduct, useProductType, discountId int) []map[s
 
 //采购单位画像包 -超级订阅升级版用户可以购买使用
 func buyerPortraitPackOrder(m map[string]interface{}, userId string, session *httpsession.Session) (*OrderInfo, string) {
-	uData := jy.GetBigVipUserBaseMsg("10000", session, config.Config.Etcd.Hosts, config.Config.Etcd.Key)
+	uData := jy.GetBigVipUserBaseMsg(session, *config.Middleground)
 	if uData.VipStatus <= 0 || uData.Vip_BuySet.Upgrade <= 0 {
 		return nil, "非新版超级订阅用户,暂无权益"
 	}

+ 2 - 2
src/jfw/modules/subscribepay/src/entity/resourcePackStruct.go

@@ -125,7 +125,7 @@ func (this *resoucePackStruct) Filter(product, userid, lotteryId, discountId str
 	case "dataExportPack":
 	//TODO
 	case "attachmentDownPack": //超级订阅用户可以购买
-		if jy.GetBigVipUserBaseMsg("10000", session, config.Config.Etcd.Hosts, config.Config.Etcd.Key).VipStatus <= 0 {
+		if jy.GetBigVipUserBaseMsg(session, *config.Middleground).VipStatus <= 0 {
 			msg = "非超级订阅用户,暂无权益"
 		}
 		num := qu.IntAll(m["num"])
@@ -150,7 +150,7 @@ func (this *resoucePackStruct) Filter(product, userid, lotteryId, discountId str
 		filter["validTime"] = validTime.Format("2006-01-02")
 		rs = ReturnStruct{Filter: filter, Price: price, OrderMoney: price, Product: products}
 	case "buyerPortraitPack": //超级订阅升级版用户可以购买使用
-		uData := jy.GetBigVipUserBaseMsg("10000", session, config.Config.Etcd.Hosts, config.Config.Etcd.Key)
+		uData := jy.GetBigVipUserBaseMsg(session, *config.Middleground)
 		if uData.VipStatus <= 0 || uData.Vip_BuySet.Upgrade <= 0 {
 			msg = "非新版超级订阅用户,暂无权益"
 		}

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

@@ -4,10 +4,11 @@ go 1.18
 
 require (
 	app.yhyue.com/moapp/jybase v0.0.0-20230117032034-ad7c00ffe11a
-	app.yhyue.com/moapp/jypkg v0.0.0-20230128092104-d8ae3867d2ab
+	app.yhyue.com/moapp/jypkg v0.0.0-20230202093215-bbde67e76cae
 	bp.jydev.jianyu360.cn/BaseService/pushpkg v0.0.0-20221230024250-38ee6578aff5
 	github.com/SKatiyar/qr v0.0.0-20151201054752-25b6bdf44e67
 	github.com/dchest/captcha v1.0.0
+	github.com/gogf/gf/v2 v2.0.6
 	github.com/shopspring/decimal v1.3.1
 	github.com/tealeg/xlsx v1.0.5
 	go.mongodb.org/mongo-driver v1.11.1
@@ -20,9 +21,12 @@ require (
 	app.yhyue.com/moapp/esv1 v0.0.0-20220414031211-3da4123e648d // indirect
 	app.yhyue.com/moapp/message v0.0.0-20221223100203-6402e389d9ae // indirect
 	bp.jydev.jianyu360.cn/BaseService/powerCheckCenter v0.0.0-20230128033309-a6b26e74a68c // indirect
+	bp.jydev.jianyu360.cn/BaseService/userCenter v0.0.0-20230129060002-f69424aa14ba // indirect
+	github.com/BurntSushi/toml v0.4.1 // indirect
 	github.com/beorn7/perks v1.0.1 // indirect
 	github.com/cenkalti/backoff/v4 v4.1.3 // indirect
 	github.com/cespare/xxhash/v2 v2.1.2 // indirect
+	github.com/clbanning/mxj/v2 v2.5.5 // indirect
 	github.com/coreos/go-semver v0.3.0 // indirect
 	github.com/coreos/go-systemd/v22 v22.3.2 // indirect
 	github.com/davecgh/go-spew v1.1.1 // indirect
@@ -30,6 +34,7 @@ require (
 	github.com/donnie4w/go-logger v0.0.0-20170827050443-4740c51383f4 // indirect
 	github.com/fatih/color v1.13.0 // indirect
 	github.com/felixge/fgprof v0.9.3 // indirect
+	github.com/fsnotify/fsnotify v1.5.1 // indirect
 	github.com/garyburd/redigo v1.6.2 // indirect
 	github.com/go-logr/logr v1.2.3 // indirect
 	github.com/go-logr/stdr v1.2.2 // indirect
@@ -45,19 +50,24 @@ require (
 	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/gorilla/websocket v1.5.0 // indirect
+	github.com/grokify/html-strip-tags-go v0.0.1 // indirect
 	github.com/grpc-ecosystem/grpc-gateway/v2 v2.7.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/json-iterator/go v1.1.12 // indirect
 	github.com/klauspost/compress v1.13.6 // indirect
+	github.com/longbridgeapp/sqlparser v0.3.1 // 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.13 // indirect
 	github.com/matttproud/golang_protobuf_extensions v1.0.2-0.20181231171920-c182affec369 // 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/nsqio/go-nsq v1.1.0 // indirect
+	github.com/olekukonko/tablewriter v0.0.5 // indirect
 	github.com/olivere/elastic v6.2.37+incompatible // indirect
 	github.com/openzipkin/zipkin-go v0.4.0 // indirect
 	github.com/pelletier/go-toml/v2 v2.0.6 // indirect
@@ -66,6 +76,7 @@ require (
 	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/rivo/uniseg v0.2.0 // indirect
 	github.com/robfig/cron v1.2.0 // indirect
 	github.com/spaolacci/murmur3 v1.1.0 // indirect
 	github.com/xdg-go/pbkdf2 v1.0.0 // indirect

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

@@ -1,17 +1,40 @@
 app.yhyue.com/moapp/esv1 v0.0.0-20220414031211-3da4123e648d h1:WPsYuuptAd3UEgN+jPzpnsDe/OvcshDUUtOTZPYGSJ8=
 app.yhyue.com/moapp/esv1 v0.0.0-20220414031211-3da4123e648d/go.mod h1:91/lSD/hS+ckMVP3WdidRzDhC60lLMdyce9QHy0cSMA=
+app.yhyue.com/moapp/jyInfo v1.0.0/go.mod h1:+RjyGNvk7PT1P8cglkVlaj1lLlBXuPB+f5LipoOtgPs=
 app.yhyue.com/moapp/jyPoints v1.1.1/go.mod h1:SvP8p5L3jGrejHiH2LXfgCg/NPlFiKBC5Yd0gsI12FU=
+app.yhyue.com/moapp/jybase v0.0.0-20220415064050-37ce64b3e2d4/go.mod h1:qNRA0sHuYqcLoYoP8irpaWnW9YsXixe6obBIkwaXpD0=
+app.yhyue.com/moapp/jybase v0.0.0-20220418104200-46c3fff161c7/go.mod h1:qNRA0sHuYqcLoYoP8irpaWnW9YsXixe6obBIkwaXpD0=
+app.yhyue.com/moapp/jybase v0.0.0-20220419023055-f406279ff7e3/go.mod h1:qNRA0sHuYqcLoYoP8irpaWnW9YsXixe6obBIkwaXpD0=
+app.yhyue.com/moapp/jybase v0.0.0-20220420032112-668025915ee4/go.mod h1:qNRA0sHuYqcLoYoP8irpaWnW9YsXixe6obBIkwaXpD0=
+app.yhyue.com/moapp/jybase v0.0.0-20220421060131-a1001013ba46/go.mod h1:qNRA0sHuYqcLoYoP8irpaWnW9YsXixe6obBIkwaXpD0=
 app.yhyue.com/moapp/jybase v0.0.0-20220427020729-974c1a148186/go.mod h1:qNRA0sHuYqcLoYoP8irpaWnW9YsXixe6obBIkwaXpD0=
+app.yhyue.com/moapp/jybase v0.0.0-20220719064915-2fef79005dfa/go.mod h1:FjBF25AYoBrPhVKTXGXWcmEAbBT0ATTK6KJMOA+I80Q=
+app.yhyue.com/moapp/jybase v0.0.0-20220802080941-07f401baab8b/go.mod h1:HelrO6tcD9TcKb/HOP2BLbzppyDz2kpQSFhPMQTUgbQ=
+app.yhyue.com/moapp/jybase v0.0.0-20230109015757-aa3d5e19b196/go.mod h1:zB47XTeJvpcbtBRYgkQuxOICWNexiZfbUO+7aUf6mNs=
 app.yhyue.com/moapp/jybase v0.0.0-20230117032034-ad7c00ffe11a h1:wD4aWPSYdiX1cIP4lzzPD2s7fYhKa3muIf97l9tonJE=
 app.yhyue.com/moapp/jybase v0.0.0-20230117032034-ad7c00ffe11a/go.mod h1:zB47XTeJvpcbtBRYgkQuxOICWNexiZfbUO+7aUf6mNs=
-app.yhyue.com/moapp/jypkg v0.0.0-20230128092104-d8ae3867d2ab h1:a9XvegdF3aM0y9v5SHtX03LIGMS3+8J1ofoNeyw5J0Y=
-app.yhyue.com/moapp/jypkg v0.0.0-20230128092104-d8ae3867d2ab/go.mod h1:MqJfBFTSfZhrNDEnE4e19BmaLkaMr+lYActLXm6lrpw=
+app.yhyue.com/moapp/jypkg v0.0.0-20230202093215-bbde67e76cae h1:vd5a1L01MVMfHkycc4xONzVnEpHrlvD19VxUWdWkocA=
+app.yhyue.com/moapp/jypkg v0.0.0-20230202093215-bbde67e76cae/go.mod h1:NrRgv24VIpf/xMMvsGC1EgoD+z6z5ea3MqIVxEcSPhE=
 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/BP/jynsq v0.0.0-20220222052708-ebc43af90698/go.mod h1:ojo/AUH9Yr1wzarEjOaNMkj1Cet/9r8IgLyba64Z52E=
+bp.jydev.jianyu360.cn/BaseService/gateway v0.0.0-20220419090715-88ddb32961be/go.mod h1:Yj4oabIGItuMoF0BXYLz2XAnF581kxgXBrvlUtIJrkI=
+bp.jydev.jianyu360.cn/BaseService/gateway v1.3.4/go.mod h1:BMLd/5wb3BIEGhnEgF9y1sJN9P5/Dw9kYsoiE9V8I9g=
 bp.jydev.jianyu360.cn/BaseService/powerCheckCenter v0.0.0-20230128033309-a6b26e74a68c h1:g49jOlhZlBCJ3IgJA0rotfNf2Gh22pISffUtqxB8XtY=
 bp.jydev.jianyu360.cn/BaseService/powerCheckCenter v0.0.0-20230128033309-a6b26e74a68c/go.mod h1:5nimT8GJh46AyfeeDeyRlDQygMlO7TRM8Pwm41Gxemc=
 bp.jydev.jianyu360.cn/BaseService/pushpkg v0.0.0-20221230024250-38ee6578aff5 h1:XIx7gUaO2Wl7iPMHMrZj5QVqv1fpk5CR/Y9y+d3vNNI=
 bp.jydev.jianyu360.cn/BaseService/pushpkg v0.0.0-20221230024250-38ee6578aff5/go.mod h1:UKLwPLx9be595yaiIwqqdKSloKK/Kdf/wTLr4XUClV0=
+bp.jydev.jianyu360.cn/BaseService/resourceCenter v0.0.0-20220418005748-8ba5d936dd53/go.mod h1:E5lcDI3k4FESLxiAetCfWQTq8qfpy9cv0yN1oKoEO34=
+bp.jydev.jianyu360.cn/BaseService/resourceCenter v0.0.0-20220419023723-0b32d4a41751/go.mod h1:6KL5LMEku83uRbre0W/bj5kXG2I6pJGBFtktmtp51yM=
+bp.jydev.jianyu360.cn/BaseService/resourceCenter v0.0.0-20220419063004-233fc7ce006c/go.mod h1:6KL5LMEku83uRbre0W/bj5kXG2I6pJGBFtktmtp51yM=
+bp.jydev.jianyu360.cn/BaseService/resourceCenter v0.0.0-20220420075831-0b59892e9982/go.mod h1:wsHNO91h37H+xE4ZNny0yd7mtpODeDJxbVYhIRMR+qw=
+bp.jydev.jianyu360.cn/BaseService/resourceCenter v0.0.3/go.mod h1:Z353aucNO5hH4ZYjeKST3kE1PN3W8/uPc4J8s0Upz40=
+bp.jydev.jianyu360.cn/BaseService/resourceCenter v0.0.4/go.mod h1:rRiGzKG4F/fmkNxXQCxrkxNWc8yf1SmW8qWCKfGIQSM=
+bp.jydev.jianyu360.cn/BaseService/userCenter v0.0.0-20220418072311-2062bed1e700/go.mod h1:KjcrxTzM96tBc6G4B8tlLBn1lrVy5UJYF8+eTdP4xAE=
+bp.jydev.jianyu360.cn/BaseService/userCenter v0.0.0-20220421015128-4a36f3eac5c5/go.mod h1:GT0QC4aaKDuXxAvaU4G02XjCc31TU1ctqBGqxQYOfC4=
+bp.jydev.jianyu360.cn/BaseService/userCenter v0.0.0-20220905055615-8540037e1b06/go.mod h1:LS21iwbgP8i3ZHJ1n4yNpLXQ/nzEudUOk0klC6VM2dQ=
+bp.jydev.jianyu360.cn/BaseService/userCenter v0.0.0-20230129060002-f69424aa14ba h1:WATZdho/2XJ8DP3EuaSo10WiFrXRgxeLpmYoGEcSdMw=
+bp.jydev.jianyu360.cn/BaseService/userCenter v0.0.0-20230129060002-f69424aa14ba/go.mod h1:m7/aZ1r1FapNT2h3gqmCFVb0EV+CaJaNKNPHMzLHx8Y=
 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=
@@ -376,16 +399,23 @@ cloud.google.com/go/workflows v1.8.0/go.mod h1:ysGhmEajwZxGn1OhGOGKsTXc5PyxOc0vf
 cloud.google.com/go/workflows v1.9.0/go.mod h1:ZGkj1aFIOd9c8Gerkjjq7OW7I5+l6cSvT3ujaO/WwSA=
 dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU=
 github.com/Azure/go-autorest v14.2.0+incompatible/go.mod h1:r+4oMnoxhatjLLJ6zxSWATqVooLgysK6ZNox3g/xq24=
+github.com/Azure/go-autorest/autorest v0.11.1/go.mod h1:JFgpikqFJ/MleTTxwepExTKnFUKKszPS8UavbQYUMuw=
 github.com/Azure/go-autorest/autorest v0.11.18/go.mod h1:dSiJPy22c3u0OtOKDNttNgqpNFY/GeWa7GH/Pz56QRA=
+github.com/Azure/go-autorest/autorest/adal v0.9.0/go.mod h1:/c022QCutn2P7uY+/oQWWNcK9YU+MH96NgK+jErpbcg=
+github.com/Azure/go-autorest/autorest/adal v0.9.5/go.mod h1:B7KF7jKIeC9Mct5spmyCB/A8CG/sEz1vwIRGv/bbw7A=
 github.com/Azure/go-autorest/autorest/adal v0.9.13/go.mod h1:W/MM4U6nLxnIskrw4UwWzlHfGjwUS50aOsc/I3yuU8M=
 github.com/Azure/go-autorest/autorest/date v0.3.0/go.mod h1:BI0uouVdmngYNUzGWeSYnokU+TrmwEsOqdt8Y6sso74=
+github.com/Azure/go-autorest/autorest/mocks v0.4.0/go.mod h1:LTp+uSrOhSkaKrUy935gNZuuIPPVsHlr9DSOxSayd+k=
 github.com/Azure/go-autorest/autorest/mocks v0.4.1/go.mod h1:LTp+uSrOhSkaKrUy935gNZuuIPPVsHlr9DSOxSayd+k=
+github.com/Azure/go-autorest/logger v0.2.0/go.mod h1:T9E3cAhj2VqvPOtCYAvby9aBXkZmbF5NWuPV8+WeEW8=
 github.com/Azure/go-autorest/logger v0.2.1/go.mod h1:T9E3cAhj2VqvPOtCYAvby9aBXkZmbF5NWuPV8+WeEW8=
 github.com/Azure/go-autorest/tracing v0.6.0/go.mod h1:+vhtPC754Xsa23ID7GlGsrdKBpUA79WCAKPPZVC2DeU=
 github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU=
+github.com/BurntSushi/toml v0.4.1 h1:GaI7EiDXDRfa8VshkTj7Fym7ha+y8/XxIgD2okUIjLw=
 github.com/BurntSushi/toml v0.4.1/go.mod h1:CxXYINrC8qIiEnFrOxCa7Jy5BFHlXnUU2pbicEuybxQ=
 github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo=
 github.com/ClickHouse/clickhouse-go v1.4.3/go.mod h1:EaI/sW7Azgz9UATzd5ZdZHRUhHgv5+JMS9NSr2smCJI=
+github.com/ClickHouse/clickhouse-go v1.5.1/go.mod h1:EaI/sW7Azgz9UATzd5ZdZHRUhHgv5+JMS9NSr2smCJI=
 github.com/ClickHouse/clickhouse-go v1.5.4/go.mod h1:EaI/sW7Azgz9UATzd5ZdZHRUhHgv5+JMS9NSr2smCJI=
 github.com/ClickHouse/clickhouse-go/v2 v2.0.14/go.mod h1:iq2DUGgpA4BBki2CVwrF8x43zqBjdgHtbexkFkh5a6M=
 github.com/ClickHouse/clickhouse-go/v2 v2.2.0/go.mod h1:8f2XZUi7XoeU+uPIytSi1cvx8fmJxi7vIgqpvYTF1+o=
@@ -393,6 +423,7 @@ github.com/DATA-DOG/go-sqlmock v1.4.1/go.mod h1:f/Ixk793poVmq4qj/V1dPUg2JEAKC73Q
 github.com/DATA-DOG/go-sqlmock v1.5.0/go.mod h1:f/Ixk793poVmq4qj/V1dPUg2JEAKC73Q5eFN3EC/SaM=
 github.com/NYTimes/gziphandler v0.0.0-20170623195520-56545f4a5d46/go.mod h1:3wb06e3pkSAbeQ52E9H9iFoQsEEwGN64994WTCIhntQ=
 github.com/OneOfOne/xxhash v1.2.2/go.mod h1:HSdplMjZKSmBqAxg5vPj2TmRDmfkzw+cTzAElWljhcU=
+github.com/PuerkitoBio/goquery v1.5.1/go.mod h1:GsLWisAFVj4WgDibEWF4pvYnkVQBpKBKeU+7zCJoLcc=
 github.com/PuerkitoBio/purell v1.1.1/go.mod h1:c11w/QuzBsJSee3cPx9rAFu61PvFxuPbtSwDGJws/X0=
 github.com/PuerkitoBio/urlesc v0.0.0-20170810143723-de5bf2ad4578/go.mod h1:uGdkoq3SwY9Y+13GIhn11/XLaGBb4BfwItxLd5jeuXE=
 github.com/SKatiyar/qr v0.0.0-20151201054752-25b6bdf44e67 h1:x98/gnpyNAiuvg/gX3KgdfKxnZj3t9pIl3BCVJg3qwg=
@@ -410,9 +441,13 @@ github.com/alecthomas/units v0.0.0-20190924025748-f65c72e2690d/go.mod h1:rBZYJk5
 github.com/alicebob/gopher-json v0.0.0-20200520072559-a9ecdc9d1d3a h1:HbKu58rmZpUGpz5+4FfNmIU+FmZg2P3Xaj2v2bfNWmk=
 github.com/alicebob/gopher-json v0.0.0-20200520072559-a9ecdc9d1d3a/go.mod h1:SGnFV6hVsYE877CKEZ6tDNTjaSXYUk6QqoIK6PrAtcc=
 github.com/alicebob/miniredis/v2 v2.14.1/go.mod h1:uS970Sw5Gs9/iK3yBg0l9Uj9s25wXxSpQUE9EaJ/Blg=
+github.com/alicebob/miniredis/v2 v2.17.0/go.mod h1:gquAfGbzn92jvtrSC69+6zZnwSODVXVpYDRaGhWaL6I=
 github.com/alicebob/miniredis/v2 v2.22.0/go.mod h1:XNqvJdQJv5mSuVMc0ynneafpnL/zv52acZ6kqeS0t88=
+github.com/alicebob/miniredis/v2 v2.23.1/go.mod h1:84TWKZlxYkfgMucPBf5SOQBYJceZeQRFIaQgNMiCX6Q=
 github.com/alicebob/miniredis/v2 v2.30.0 h1:uA3uhDbCxfO9+DI/DuGeAMr9qI+noVWwGPNTFuKID5M=
 github.com/alicebob/miniredis/v2 v2.30.0/go.mod h1:84TWKZlxYkfgMucPBf5SOQBYJceZeQRFIaQgNMiCX6Q=
+github.com/aliyun/aliyun-oss-go-sdk v2.2.2+incompatible/go.mod h1:T/Aws4fEfogEE9v+HPhhw+CntffsBHJ8nXQCwKr0/g8=
+github.com/andybalholm/cascadia v1.1.0/go.mod h1:GsXiBklL0woXo1j/WYWtSYYC4ouU9PqHO0sqidkEA4Y=
 github.com/antihax/optional v0.0.0-20180407024304-ca021399b1a6/go.mod h1:V8iCPQYkqmusNa815XgQio277wI47sdRh1dUOLdyC6Q=
 github.com/antihax/optional v1.0.0/go.mod h1:uupD/76wgC+ih3iEmQUL+0Ugr19nfwCT1kdvxnR2qWY=
 github.com/antlr/antlr4 v0.0.0-20210105212045-464bcbc32de2/go.mod h1:T7PbCXFs94rrTttyxjbyT5+/1V8T2TYDejxUfHJjw1Y=
@@ -421,6 +456,7 @@ github.com/apache/thrift v0.12.0/go.mod h1:cp2SuWMxlEZw2r+iP2GNCdIi4C1qmUzdZFSVb
 github.com/asaskevich/govalidator v0.0.0-20190424111038-f61b66f89f4a/go.mod h1:lB+ZfQJz7igIIfQNfa7Ml4HSf2uFQQRzpGGRXenZAgY=
 github.com/aws/aws-sdk-go v1.34.28/go.mod h1:H7NKnBqNVzoTJpGfLrQkkD+ytBA93eiDYi/+8rV9s48=
 github.com/aws/aws-sdk-go v1.35.20/go.mod h1:tlPOdRjfxPBpNIwqDj61rmsnA85v9jc0Ps9+muhnW+k=
+github.com/baiyubin/aliyun-sts-go-sdk v0.0.0-20180326062324-cfa1a18b161f/go.mod h1:AuiFmCCPBSrqvVMvuqFuk0qogytodnVFVSN5CeJB8Gc=
 github.com/benbjohnson/clock v1.1.0 h1:Q92kusRqC1XV2MjkWETPvjJVqKetz1OzxZB7mHJLju8=
 github.com/benbjohnson/clock v1.1.0/go.mod h1:J11/hYXuz8f4ySSvYwY0FKfm+ezbsZBKZxNJlLklBHA=
 github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q=
@@ -439,6 +475,7 @@ github.com/cespare/xxhash/v2 v2.1.2/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XL
 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/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw=
 github.com/cloudflare/golz4 v0.0.0-20150217214814-ef862a3cdc58/go.mod h1:EOBUe0h4xcZ5GoxqC5SDxFQ8gwyZPKQoEzownBlhI80=
@@ -471,9 +508,11 @@ github.com/dchest/captcha v0.0.0-20200903113550-03f5f0333e1f/go.mod h1:QGrK8vMWW
 github.com/dchest/captcha v1.0.0 h1:vw+bm/qMFvTgcjQlYVTuQBJkarm5R0YSsDKhm1HZI2o=
 github.com/dchest/captcha v1.0.0/go.mod h1:7zoElIawLp7GUMLcj54K9kbw+jEyvz2K0FDdRRYhvWo=
 github.com/denisenkom/go-mssqldb v0.0.0-20190707035753-2be1aa521ff4/go.mod h1:zAg7JM8CkOJ43xKXIj7eRO9kmWm/TW578qo+oDO6tuM=
+github.com/denisenkom/go-mssqldb v0.0.0-20191124224453-732737034ffd/go.mod h1:xbL0rPBG9cCiLr28tMa8zpbdarY27NDyej4t/EjAShU=
 github.com/dgrijalva/jwt-go v3.2.0+incompatible/go.mod h1:E3ru+11k8xSBh+hMPgOLZmtrrCbhqsmaPHjLKYnJCaQ=
 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/docker/spdystream v0.0.0-20160310174837-449fdfce4d96/go.mod h1:Qh8CwZgvJUkLughtfhJv5dyTYa91l1fOUCrgjqmcifM=
 github.com/docopt/docopt-go v0.0.0-20180111231733-ee0de3bc6815/go.mod h1:WwZ+bS3ebgob9U8Nd0kOddGdZWjyMGR8Wziv+TBNwSE=
 github.com/donnie4w/go-logger v0.0.0-20170827050443-4740c51383f4 h1:T9PR91sjTtrA1HmZB4G+M7OLCelch0f6rIEY7Mm1T4U=
 github.com/donnie4w/go-logger v0.0.0-20170827050443-4740c51383f4/go.mod h1:L7S4x0R7vv3xoOhGuyAJyCO2MYzWOpccM4Isn8jIUgY=
@@ -496,9 +535,12 @@ github.com/envoyproxy/go-control-plane v0.9.9-0.20210512163311-63b5d3c536b0/go.m
 github.com/envoyproxy/go-control-plane v0.9.10-0.20210907150352-cf90f659a021/go.mod h1:AFq3mo9L8Lqqiid3OhADV3RfLJnjiw63cSpi+fDTRC0=
 github.com/envoyproxy/go-control-plane v0.10.2-0.20220325020618-49ff273808a1/go.mod h1:KJwIaB5Mv44NWtYuAOFCVOjcI94vtpEz2JU/D2v6IjE=
 github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c=
+github.com/erikstmartin/go-testdb v0.0.0-20160219214506-8d10e4a1bae5/go.mod h1:a2zkGnVExMxdzMo3M0Hi/3sEU+cWnZpSni0O6/Yb/P0=
+github.com/evanphx/json-patch v4.9.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk=
 github.com/evanphx/json-patch v4.11.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk=
 github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4=
 github.com/fatih/color v1.9.0/go.mod h1:eQcE1qtQxscV5RaZvpXrrb8Drkc3/DdQ+uUYCNjL+zU=
+github.com/fatih/color v1.10.0/go.mod h1:ELkj/draVOlAH/xkhN6mQ50Qd0MPOk5AAr3maGEBuJM=
 github.com/fatih/color v1.13.0 h1:8LOYc1KYPPmyKMuN8QV2DNRWNbLo6LZ0iLs8+mlH53w=
 github.com/fatih/color v1.13.0/go.mod h1:kLAiJbzzSOZDVNGyDpeOxJ47H46qBXwg5ILebYFFOfk=
 github.com/fatih/structtag v1.2.0/go.mod h1:mBJUNpUnHmRKrKlQQlmCrh5PuhftFbNv8Ys4/aAZl94=
@@ -513,9 +555,11 @@ github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMo
 github.com/fsnotify/fsnotify v1.4.9/go.mod h1:znqG4EE+3YCdAaPaxE2ZRY/06pZUdp0tY4IgpuI1SZQ=
 github.com/fsnotify/fsnotify v1.5.1 h1:mZcQUHVQUQWoPXXtuf9yuEXKudkV2sx1E06UadKWpgI=
 github.com/fsnotify/fsnotify v1.5.1/go.mod h1:T3375wBYaZdLLcVNkcVbzGHY7f1l/uK5T5Ai1i3InKU=
+github.com/fullstorydev/grpcurl v1.8.6/go.mod h1:WhP7fRQdhxz2TkL97u+TCb505sxfH78W1usyoB3tepw=
 github.com/fullstorydev/grpcurl v1.8.7/go.mod h1:pVtM4qe3CMoLaIzYS8uvTuDj2jVYmXqMUkZeijnXp/E=
 github.com/garyburd/redigo v1.6.2 h1:yE/pwKCrbLpLpQICzYTeZ7JsTA/C53wFTJHaEtRqniM=
 github.com/garyburd/redigo v1.6.2/go.mod h1:NR3MbYisc3/PwhQ00EMzDiPmrwpPxAn5GI05/YaO1SY=
+github.com/ghodss/yaml v0.0.0-20150909031657-73d445a93680/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04=
 github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04=
 github.com/globalsign/mgo v0.0.0-20181015135952-eeefdecb41b8/go.mod h1:xkRDCp4j0OGD1HRkm4kmhM+pmpv3AKq5SU7GMg4oO/Q=
 github.com/go-gl/glfw v0.0.0-20190409004039-e6da0acd62b1/go.mod h1:vR7hzQXu2zJy9AVAgeJqvqgH9Q5CA+iKCZ2gyEVpxRU=
@@ -530,6 +574,7 @@ github.com/go-logfmt/logfmt v0.4.0/go.mod h1:3RMwSq7FuexP4Kalkev3ejPJsZTpXXBr9+V
 github.com/go-logfmt/logfmt v0.5.0/go.mod h1:wCYkCAKZfumFQihp8CzCvQ3paCTfi41vtzG1KdI/P7A=
 github.com/go-logfmt/logfmt v0.5.1/go.mod h1:WYhtIu8zTZfxdn5+rREduYbwxfcBr/Vr6KEVveWlfTs=
 github.com/go-logr/logr v0.1.0/go.mod h1:ixOQHD9gLJUVQQ2ZOR7zLEifBX6tGkNJF4QyIY7sIas=
+github.com/go-logr/logr v0.2.0/go.mod h1:z6/tIYblkpsD+a4lm/fGIIU9mZ+XfAiaFtq7xTgseGU=
 github.com/go-logr/logr v0.4.0/go.mod h1:z6/tIYblkpsD+a4lm/fGIIU9mZ+XfAiaFtq7xTgseGU=
 github.com/go-logr/logr v1.2.0/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A=
 github.com/go-logr/logr v1.2.1/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A=
@@ -541,8 +586,12 @@ github.com/go-logr/stdr v1.2.2 h1:hSWxHoqTgW2S2qGc0LTAI563KZ5YKYRhT3MFKZMbjag=
 github.com/go-logr/stdr v1.2.2/go.mod h1:mMo/vtBO5dYbehREoey6XUKy/eSumjCCveDpRre4VKE=
 github.com/go-ole/go-ole v1.2.4/go.mod h1:XCwSNxSkXRo4vlyPy93sltvi/qJq0jqQhjqQNIwKuxM=
 github.com/go-ole/go-ole v1.2.6/go.mod h1:pprOEPIfldk/42T2oK7lQ4v4JSDwmV0As9GaiUsvbm0=
+github.com/go-openapi/jsonpointer v0.19.2/go.mod h1:3akKfEdA7DF1sugOqz1dVQHBcuDBPKZGEoHC/NkiQRg=
 github.com/go-openapi/jsonpointer v0.19.3/go.mod h1:Pl9vOtqEWErmShwVjC8pYs9cog34VGT37dQOVbmoatg=
+github.com/go-openapi/jsonreference v0.19.2/go.mod h1:jMjeRr2HHw6nAVajTXJ4eiUwohSTlpa0o73RUL1owJc=
 github.com/go-openapi/jsonreference v0.19.3/go.mod h1:rjx6GuL8TTa9VaixXglHmQmIL98+wF9xc8zWvFonSJ8=
+github.com/go-openapi/spec v0.19.3/go.mod h1:FpwSN1ksY1eteniUU7X0N/BgJ7a4WvBFVA8Lj9mJglo=
+github.com/go-openapi/swag v0.19.2/go.mod h1:POnQmlKehdgb5mhVOsnJFsivZCEZ/vjK9gh66Z9tfKk=
 github.com/go-openapi/swag v0.19.5/go.mod h1:POnQmlKehdgb5mhVOsnJFsivZCEZ/vjK9gh66Z9tfKk=
 github.com/go-redis/redis v6.15.7+incompatible/go.mod h1:NAIEuMOZ/fxfXJIrKDQDz8wamY7mA7PouImQ2Jvg6kA=
 github.com/go-redis/redis/v8 v8.11.4/go.mod h1:2Z2wHZXdQpCDXEGzqMockDpNyYvi2l4Pxt6RJr792+w=
@@ -556,6 +605,7 @@ github.com/go-sql-driver/mysql v1.7.0 h1:ueSltNNllEqE3qcWBTD0iQd3IpL/6U+mJxLkazJ
 github.com/go-sql-driver/mysql v1.7.0/go.mod h1:OXbVy3sEdcQ2Doequ6Z5BW6fXNQTmx+9S1MCJN5yJMI=
 github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY=
 github.com/go-task/slim-sprig v0.0.0-20210107165309-348f09dbbbc0/go.mod h1:fyg7847qk6SyHyPtNmDHnmrv/HOrqktSC+C9fM+CJOE=
+github.com/go-test/deep v1.0.7 h1:/VSMRlnY/JSyqxQUzQLKVMAskpY/NZKFA5j2P+0pP2M=
 github.com/go-test/deep v1.0.7/go.mod h1:QV8Hv/iy04NyLBxAdO9njL0iVPN1S4d/A3NVv1V36o8=
 github.com/go-xorm/builder v0.3.4/go.mod h1:KxkQkNN1DpPKTedxXyTQcmH+rXfvk4LZ9SOOBoZBAxw=
 github.com/go-xorm/sqlfiddle v0.0.0-20180821085327-62ce714f951a/go.mod h1:56xuuqnHyryaerycW3BfssRdxQstACi0Epw/yC5E2xM=
@@ -587,6 +637,7 @@ github.com/gobuffalo/syncx v0.0.0-20190224160051-33c29581e754/go.mod h1:HhnNqWY9
 github.com/godbus/dbus/v5 v5.0.3/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5xrFpKfA=
 github.com/godbus/dbus/v5 v5.0.4/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5xrFpKfA=
 github.com/gofrs/uuid v3.2.0+incompatible/go.mod h1:b2aQJv3Z4Fp6yNu3cdSllBxTCLRxnplIgP/c0N/04lM=
+github.com/gogf/gf/v2 v2.0.6 h1:2etb4FMpbQKWIJO+UjtIWrZUp01HUsFb6Po8pgizAWk=
 github.com/gogf/gf/v2 v2.0.6/go.mod h1:8uYzw7qNzuq8vrhVlWke1b1925FFqOJIgmyYW1sr/0M=
 github.com/gogo/protobuf v1.1.1/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ=
 github.com/gogo/protobuf v1.2.0/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ=
@@ -594,9 +645,11 @@ github.com/gogo/protobuf v1.2.1/go.mod h1:hp+jE20tsWTFYpLwKvXlhS1hjn+gTNwPg2I6zV
 github.com/gogo/protobuf v1.3.1/go.mod h1:SlYgWuQ5SjCEi6WLHjHCa1yvBfUnHcTbrrZtXPKa29o=
 github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q=
 github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q=
+github.com/golang-jwt/jwt/v4 v4.2.0/go.mod h1:/xlHOz8bRuivTWchD4jCa+NbatV+wEUSzwAxVc6locg=
 github.com/golang-jwt/jwt/v4 v4.4.2/go.mod h1:m21LjoU+eqJr34lmDMbreY2eSTRJ1cv77w39/MY0Ch0=
 github.com/golang-jwt/jwt/v4 v4.4.3 h1:Hxl6lhQFj4AnOX6MLrsCb/+7tCj7DxP7VA+2rDIq5AU=
 github.com/golang-jwt/jwt/v4 v4.4.3/go.mod h1:m21LjoU+eqJr34lmDMbreY2eSTRJ1cv77w39/MY0Ch0=
+github.com/golang-sql/civil v0.0.0-20190719163853-cb61b32ac6fe/go.mod h1:8vg3r2VgvsThLBIFL93Qb5yWzgyZWhEmBwUJWevAkK0=
 github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q=
 github.com/golang/glog v1.0.0 h1:nfP3RFugxnNRyKgeWd4oI1nYvXpxrx8ck8ZrcizshdQ=
 github.com/golang/glog v1.0.0/go.mod h1:EWib/APOK0SL3dFbYqvxE3UYd8E6s1ouQ7iEp/0LWV4=
@@ -702,10 +755,12 @@ github.com/googleapis/gax-go/v2 v2.3.0/go.mod h1:b8LNqSzNabLiUpXKkY7HAR5jr6bIT99
 github.com/googleapis/gax-go/v2 v2.4.0/go.mod h1:XOTVJ59hdnfJLIP/dh8n5CGryZR2LxK9wbMD5+iXC6c=
 github.com/googleapis/gax-go/v2 v2.5.1/go.mod h1:h6B0KMMFNtI2ddbGJn3T3ZbwkeT6yqEF02fYlzkUCyo=
 github.com/googleapis/gax-go/v2 v2.6.0/go.mod h1:1mjbznJAPHFpesgE5ucqfYEscaz5kMdcIDwU/6+DDoY=
+github.com/googleapis/gnostic v0.4.1/go.mod h1:LRhVm6pbyptWbWbuZ38d1eyptfvIytN3ir6b65WBswg=
 github.com/googleapis/gnostic v0.5.1/go.mod h1:6U4PtQXGIEt/Z3h5MAT7FNofLnw9vXk2cUuW7uA/OeU=
 github.com/googleapis/gnostic v0.5.5 h1:9fHAtK0uDfpveeqqo1hkEZJcFvYXAiCN3UutL8F9xHw=
 github.com/googleapis/gnostic v0.5.5/go.mod h1:7+EbHbldMins07ALC74bsA81Ovc97DwqyJO1AENw9kA=
 github.com/googleapis/go-type-adapters v1.0.0/go.mod h1:zHW75FOG2aur7gAO2B+MLby+cLsWGBF62rFAi7WjWO4=
+github.com/gordonklaus/ineffassign v0.0.0-20200309095847-7953dde2c7bf/go.mod h1:cuNKsD1zp2v6XfE/orVX2QE1LC+i254ceGcVeDT3pTU=
 github.com/gorilla/context v1.1.1/go.mod h1:kBGZzfjB9CEq2AlWe17Uuf7NDRt0dE0s8S51q0aT7Yg=
 github.com/gorilla/handlers v1.4.2/go.mod h1:Qkdc/uu4tH4g6mTK6auzZ766c4CA0Ng8+o/OAirnOIQ=
 github.com/gorilla/mux v1.6.2/go.mod h1:1lud6UwP+6orDFRuTfBEV8e9/aOM/c4fVVCaMa2zaAs=
@@ -715,8 +770,10 @@ github.com/gorilla/sessions v1.2.1/go.mod h1:dk2InVEVJ0sfLlnXv9EAgkf6ecYs/i80K/z
 github.com/gorilla/websocket v0.0.0-20170926233335-4201258b820c/go.mod h1:E7qHFY5m1UJ88s3WnNqhKjPHQ0heANvMoAMk2YaljkQ=
 github.com/gorilla/websocket v1.4.1/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE=
 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/gregjones/httpcache v0.0.0-20180305231024-9cad4c3443a7/go.mod h1:FecbI9+v66THATjSRHfNgh1IVFe/9kFxbXtjV0ctIMA=
+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/grpc-ecosystem/go-grpc-middleware v1.0.1-0.20190118093823-f849b5445de4/go.mod h1:FiyG127CGDf3tlThmgyCl78X/SZQqEOJBCDaAfeWzPs=
 github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0/go.mod h1:8NvIoxWQoOIhqOTXgfV/d3M/q6VIi02HzZEHgUlZvzk=
@@ -751,11 +808,15 @@ github.com/jcmturner/rpc/v2 v2.0.3/go.mod h1:VUJYCIDm3PVOEHw8sgt091/20OJjskO/YJk
 github.com/jhump/gopoet v0.0.0-20190322174617-17282ff210b3/go.mod h1:me9yfT6IJSlOL3FCfrg+L6yzUEZ+5jW6WHt4Sk+UPUI=
 github.com/jhump/gopoet v0.1.0/go.mod h1:me9yfT6IJSlOL3FCfrg+L6yzUEZ+5jW6WHt4Sk+UPUI=
 github.com/jhump/goprotoc v0.5.0/go.mod h1:VrbvcYrQOrTi3i0Vf+m+oqQWk9l72mjkJCYo7UvLHRQ=
+github.com/jhump/protoreflect v1.10.3/go.mod h1:7GcYQDdMU/O/BBrl/cX6PNHpXh6cenjd8pneu5yW7Tg=
 github.com/jhump/protoreflect v1.11.0/go.mod h1:U7aMIjN0NWq9swDP7xDdoMfRHb35uiuTd3Z9nFXJf5E=
 github.com/jhump/protoreflect v1.12.0/go.mod h1:JytZfP5d0r8pVNLZvai7U/MCuTWITgrI4tTg7puQFKI=
+github.com/jhump/protoreflect v1.14.0/go.mod h1:JytZfP5d0r8pVNLZvai7U/MCuTWITgrI4tTg7puQFKI=
 github.com/jhump/protoreflect v1.14.1/go.mod h1:JytZfP5d0r8pVNLZvai7U/MCuTWITgrI4tTg7puQFKI=
+github.com/jinzhu/gorm v1.9.16/go.mod h1:G3LB3wezTOWM2ITLzPxEXgSkOXAntiLHS7UdBefADcs=
 github.com/jinzhu/inflection v1.0.0 h1:K317FqzuhWc8YvSVlFMCCUb36O/S9MCKRDI7QkRKD/E=
 github.com/jinzhu/inflection v1.0.0/go.mod h1:h+uFLlag+Qp1Va5pdKtLDYj+kHp5pxUVkryuEj+Srlc=
+github.com/jinzhu/now v1.0.1/go.mod h1:d3SSVoowX0Lcu0IBviAWJpolVfI5UJVZZ7cO71lE/z8=
 github.com/jinzhu/now v1.1.1 h1:g39TucaRWyV3dwDO++eEc6qf8TVIQ/Da48WmqjZ3i7E=
 github.com/jinzhu/now v1.1.1/go.mod h1:d3SSVoowX0Lcu0IBviAWJpolVfI5UJVZZ7cO71lE/z8=
 github.com/jmespath/go-jmespath v0.4.0/go.mod h1:T8mJZnbsbmF+m6zOOFylbeCJqk5+pHWvzYPziyZiYoo=
@@ -796,14 +857,18 @@ github.com/kr/pretty v0.2.0/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfn
 github.com/kr/pretty v0.2.1 h1:Fmg33tUaq4/8ym9TJN1x7sLJnHVwhP33CNkpYV/7rwI=
 github.com/kr/pretty v0.2.1/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI=
 github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ=
+github.com/kr/pty v1.1.5/go.mod h1:9r2w37qlBe7rQ6e1fg1S/9xpWHSnaqNdHD3WcMdbPDA=
 github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI=
 github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY=
 github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE=
 github.com/lib/pq v1.0.0/go.mod h1:5WUZQaWbwv1U+lTReE5YruASi9Al49XbQIvNi/34Woo=
+github.com/lib/pq v1.1.1/go.mod h1:5WUZQaWbwv1U+lTReE5YruASi9Al49XbQIvNi/34Woo=
 github.com/lib/pq v1.3.0/go.mod h1:5WUZQaWbwv1U+lTReE5YruASi9Al49XbQIvNi/34Woo=
+github.com/lib/pq v1.10.4/go.mod h1:AlVN5x4E4T544tWzH6hKfbfQvm3HdbOxrmggDNAPY9o=
 github.com/lib/pq v1.10.6/go.mod h1:AlVN5x4E4T544tWzH6hKfbfQvm3HdbOxrmggDNAPY9o=
 github.com/lib/pq v1.10.7/go.mod h1:AlVN5x4E4T544tWzH6hKfbfQvm3HdbOxrmggDNAPY9o=
 github.com/logrusorgru/aurora v2.0.3+incompatible/go.mod h1:7rIyQOR62GCctdiQpZ/zOJlFyk6y+94wXzv6RNZgaR4=
+github.com/longbridgeapp/sqlparser v0.3.1 h1:iWOZWGIFgQrJRgobLXUNJdvqGRpbVXkyKUKUA5CNJBE=
 github.com/longbridgeapp/sqlparser v0.3.1/go.mod h1:GIHaUq8zvYyHLCLMJJykx1CdM6LHtkUih/QaJXySSx4=
 github.com/mailru/easyjson v0.0.0-20190614124828-94de47d64c63/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc=
 github.com/mailru/easyjson v0.0.0-20190626092158-b2ccc519800e/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc=
@@ -815,6 +880,7 @@ github.com/markbates/safe v1.0.1/go.mod h1:nAqgmRi7cY2nqMc92/bSEeQA+R4OheNU2T1kN
 github.com/mattn/go-colorable v0.0.9/go.mod h1:9vuHe8Xs5qXnSaW/c/ABM9alt+Vo+STaOChaDxuIBZU=
 github.com/mattn/go-colorable v0.1.4/go.mod h1:U0ppj6V5qS13XJ6of8GYAs25YV2eR4EVcfRqFIhoBtE=
 github.com/mattn/go-colorable v0.1.6/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc=
+github.com/mattn/go-colorable v0.1.8/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc=
 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.4/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4=
@@ -826,9 +892,11 @@ github.com/mattn/go-isatty v0.0.14/go.mod h1:7GGIvUiUoEMVVmxf/4nioHXj79iQHKdU27k
 github.com/mattn/go-runewidth v0.0.2/go.mod h1:LwmH8dsx7+W8Uxz3IHJYH5QSwggIsqBzpuz5H//U1FU=
 github.com/mattn/go-runewidth v0.0.7/go.mod h1:H031xJmbD/WCDINGzjvQ9THkh0rPKHF+m2gUSrubnMI=
 github.com/mattn/go-runewidth v0.0.9/go.mod h1:H031xJmbD/WCDINGzjvQ9THkh0rPKHF+m2gUSrubnMI=
+github.com/mattn/go-runewidth v0.0.13 h1:lTGmDsbAYt5DmK6OnoV7EuIF1wEIFAcxld6ypU4OSgU=
 github.com/mattn/go-runewidth v0.0.13/go.mod h1:Jdepj2loyihRzMpdS35Xk/zdY8IAYHsh153qUoGf23w=
 github.com/mattn/go-sqlite3 v1.9.0/go.mod h1:FPy6KqzDD04eiIsT53CuJW3U88zkxoIYsOqkbpncsNc=
 github.com/mattn/go-sqlite3 v1.10.0/go.mod h1:FPy6KqzDD04eiIsT53CuJW3U88zkxoIYsOqkbpncsNc=
+github.com/mattn/go-sqlite3 v1.14.0/go.mod h1:JIl7NbARA7phWnGvh0LKTyg7S9BA+6gx71ShQilpsus=
 github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0=
 github.com/matttproud/golang_protobuf_extensions v1.0.2-0.20181231171920-c182affec369 h1:I0XW9+e1XWDxdcEniV4rQAIOPUGDq67JSCiRCgGCZLI=
 github.com/matttproud/golang_protobuf_extensions v1.0.2-0.20181231171920-c182affec369/go.mod h1:BSXmuO+STAnVfrANrmjBb36TMTDstsz7MSK+HVaYKv4=
@@ -850,6 +918,7 @@ github.com/mwitkow/go-conntrack v0.0.0-20190716064945-2f068394615f/go.mod h1:qRW
 github.com/mxk/go-flowrate v0.0.0-20140419014527-cca7078d478f/go.mod h1:ZdcZmHo+o7JKHSa8/e818NopupXU1YMK5fe1lsApnBw=
 github.com/nbio/st v0.0.0-20140626010706-e9e8d9816f32/go.mod h1:9wM+0iRr9ahx58uYLpLIr5fm8diHn0JbqRycJi6w0Ms=
 github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e/go.mod h1:zD1mROLANZcx1PVRCS0qkT7pwLkGfwJo4zjcN/Tysno=
+github.com/nishanths/predeclared v0.0.0-20200524104333-86fad755b4d3/go.mod h1:nt3d53pc1VYcphSCIaYAJtnPYnr3Zyn8fMq2wvPGPso=
 github.com/nsqio/go-nsq v1.1.0 h1:PQg+xxiUjA7V+TLdXw7nVrJ5Jbl3sN86EhGCQj4+FYE=
 github.com/nsqio/go-nsq v1.1.0/go.mod h1:vKq36oyeVXgsS5Q8YEO7WghqidAVXQlcFxzQbQTuDEY=
 github.com/nxadm/tail v1.4.4/go.mod h1:kenIhsEOeOJmVchQTgglprH7qJGnHDVpk1VPCcaMI8A=
@@ -857,6 +926,7 @@ 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.0-20170122224234-a0225b3f23b5/go.mod h1:vsDQFd/mU46D+Z4whnwzcISnGGzXWMclvtLoiIKAKIo=
 github.com/olekukonko/tablewriter v0.0.4/go.mod h1:zq6QwlOf5SlnkVbMSr5EoBv3636FWnp+qbPhuoO21uA=
+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/olivere/elastic v6.2.37+incompatible h1:UfSGJem5czY+x/LqxgeCBgjDn6St+z8OnsCuxwD3L0U=
 github.com/olivere/elastic v6.2.37+incompatible/go.mod h1:J+q1zQJTgAz9woqsbVRqGeB5G1iqDKVBWLNSYW8yfJ8=
@@ -864,6 +934,7 @@ github.com/olivere/elastic/v7 v7.0.22/go.mod h1:VDexNy9NjmtAkrjNoI7tImv7FR4tf5zU
 github.com/onsi/ginkgo v0.0.0-20170829012221-11459a886d9c/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE=
 github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE=
 github.com/onsi/ginkgo v1.7.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE=
+github.com/onsi/ginkgo v1.11.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE=
 github.com/onsi/ginkgo v1.12.1/go.mod h1:zj2OWP4+oCPe1qIXoGWkgMRwljMUYCdkwsT2108oapk=
 github.com/onsi/ginkgo v1.14.0/go.mod h1:iSB4RoI2tjJc9BBv4NKIKWKya62Rps+oPG/Lv9klQyY=
 github.com/onsi/ginkgo v1.16.4/go.mod h1:dX+/inL/fNMqNlz0e9LfyB9TswhZpCVdJM/Z6Vvnwo0=
@@ -873,6 +944,7 @@ github.com/onsi/ginkgo/v2 v2.0.0/go.mod h1:vw5CSIxN1JObi/U8gcbwft7ZxR2dgaR70JSE3
 github.com/onsi/gomega v0.0.0-20170829124025-dcabb60a477c/go.mod h1:C1qb7wdrVGGVU+Z6iS04AVkA3Q65CEZX59MT0QO5uiA=
 github.com/onsi/gomega v1.4.3/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY=
 github.com/onsi/gomega v1.5.0/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY=
+github.com/onsi/gomega v1.7.0/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY=
 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=
@@ -881,6 +953,7 @@ github.com/onsi/gomega v1.18.1 h1:M1GfJqGRrBrrGGsbxzV5dqM2U2ApXefZCQpkukxYRLE=
 github.com/onsi/gomega v1.18.1/go.mod h1:0q+aL8jAiMXy9hbwj2mr5GziHiwhAIQpFmmtT5hitRs=
 github.com/opentracing/opentracing-go v1.2.0/go.mod h1:GxEUsuufX4nBwe+T+Wl9TAgYrxe9dPLANfrWvHYVTgc=
 github.com/openzipkin/zipkin-go v0.1.6/go.mod h1:QgAqvLzwWbR/WpD4A3cGpPtJrZXNIiJc5AZX7/PBEpw=
+github.com/openzipkin/zipkin-go v0.3.0/go.mod h1:4c3sLeE8xjNqehmF5RpAFLPLJxXscc0R4l6Zg0P1tTQ=
 github.com/openzipkin/zipkin-go v0.4.0 h1:CtfRrOVZtbDj8rt1WXjklw0kqqJQwICrCKmlfUuBUUw=
 github.com/openzipkin/zipkin-go v0.4.0/go.mod h1:4c3sLeE8xjNqehmF5RpAFLPLJxXscc0R4l6Zg0P1tTQ=
 github.com/paulmach/orb v0.5.0/go.mod h1:FWRlTgl88VI1RBx/MkrwWDRhQ96ctqMCh8boXhmqB/A=
@@ -926,6 +999,7 @@ github.com/prometheus/common v0.4.1/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y8
 github.com/prometheus/common v0.9.1/go.mod h1:yhUN8i9wzaXS3w1O07YhxHEBxD+W35wd8bs7vj7HSQ4=
 github.com/prometheus/common v0.10.0/go.mod h1:Tlit/dnDKsSWFlCLTWaA1cyBgKHSMdTB80sz/V91rCo=
 github.com/prometheus/common v0.26.0/go.mod h1:M7rCNAaPfAosfx8veZJCuw84e35h3Cfd9VFqTh1DIvc=
+github.com/prometheus/common v0.30.0/go.mod h1:vu+V0TpY+O6vW9J44gczi3Ap/oXXR10b+M/gUGO4Hls=
 github.com/prometheus/common v0.32.1/go.mod h1:vu+V0TpY+O6vW9J44gczi3Ap/oXXR10b+M/gUGO4Hls=
 github.com/prometheus/common v0.37.0 h1:ccBbHCgIiT9uSoFY0vX8H3zsNR5eLt17/RQLUvn8pXE=
 github.com/prometheus/common v0.37.0/go.mod h1:phzohg0JFMnBEFGxTDbfu3QyL5GI8gTQJFhYO5B3mfA=
@@ -941,6 +1015,7 @@ github.com/prometheus/procfs v0.8.0/go.mod h1:z7EfXMXOkbkqb9IINtpCn86r/to3BnA0ua
 github.com/rabbitmq/amqp091-go v1.1.0/go.mod h1:ogQDLSOACsLPsIq0NpbtiifNZi2YOz0VTJ0kHRghqbM=
 github.com/rcrowley/go-metrics v0.0.0-20181016184325-3113b8401b8a/go.mod h1:bCqnVzQkZxMG4s8nGwiZ5l3QUCyqpo9Y+/ZMZ9VjZe4=
 github.com/rcrowley/go-metrics v0.0.0-20201227073835-cf1acfcdf475/go.mod h1:bCqnVzQkZxMG4s8nGwiZ5l3QUCyqpo9Y+/ZMZ9VjZe4=
+github.com/rivo/uniseg v0.2.0 h1:S1pD9weZBuJdFmowNwbpi7BJ8TNftyUImj/0WQi72jY=
 github.com/rivo/uniseg v0.2.0/go.mod h1:J6wj4VEh+S6ZtnVlnTBMWIodfgj8LQOQFoIToxlJtxc=
 github.com/robfig/cron v1.2.0 h1:ZjScXvvxeQ63Dbyxy76Fj3AT3Ut0aKsyd2/tl3DTMuQ=
 github.com/robfig/cron v1.2.0/go.mod h1:JGuDeoQd7Z6yL4zQhZ3OPEVHB7fL6Ka6skscFHfmt2k=
@@ -951,6 +1026,7 @@ github.com/rogpeppe/go-internal v1.2.2/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFR
 github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4=
 github.com/russross/blackfriday/v2 v2.0.1/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM=
 github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM=
+github.com/satori/go.uuid v1.2.0/go.mod h1:dA0hQrYB0VpLJoorglMZABFdXlWrHn1NEOzdhQKdks0=
 github.com/shirou/gopsutil v2.19.11+incompatible/go.mod h1:5b4v6he4MtMOwMlS0TUMTu2PcXUg8+E1lC7eC3UO/RA=
 github.com/shirou/gopsutil v3.21.11+incompatible/go.mod h1:5b4v6he4MtMOwMlS0TUMTu2PcXUg8+E1lC7eC3UO/RA=
 github.com/shirou/w32 v0.0.0-20160930032740-bb4de0191aa4/go.mod h1:qsXQc7+bwAM3Q1u/4XEfrquwF8Lw7D7y5cD8CuHnfIc=
@@ -981,6 +1057,7 @@ github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An
 github.com/stoewer/go-strcase v1.2.0/go.mod h1:IBiWB2sKIp3wVVQ3Y035++gc+knqhUQag1KpM8ahLw8=
 github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
 github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
+github.com/stretchr/objx v0.2.0/go.mod h1:qt09Ya8vawLte6SNmTgCsAVtYtaKzEcn8ATUoHMkEqE=
 github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw=
 github.com/stretchr/objx v0.5.0 h1:1zr/of2m5FGMsad5YfcqgdqdWrIhu+EBEJRhR1U7z/c=
 github.com/stretchr/objx v0.5.0/go.mod h1:Yh+to48EsGEfYuaHDzXPcE3xhTkx73EhmCGUpEOglKo=
@@ -1030,27 +1107,35 @@ github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1
 github.com/yuin/goldmark v1.4.0/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k=
 github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY=
 github.com/yuin/gopher-lua v0.0.0-20191220021717-ab39c6098bdb/go.mod h1:gqRgreBUhTSL0GeU64rtZ3Uq3wtjOa/TB2YfrtkCbVQ=
+github.com/yuin/gopher-lua v0.0.0-20200816102855-ee81675732da/go.mod h1:E1AXubJBdNmFERAOucpDIxNzeGfLzg0mYh+UfMWdChA=
 github.com/yuin/gopher-lua v0.0.0-20210529063254-f4c35e4016d9/go.mod h1:E1AXubJBdNmFERAOucpDIxNzeGfLzg0mYh+UfMWdChA=
 github.com/yuin/gopher-lua v0.0.0-20220504180219-658193537a64 h1:5mLPGnFdSsevFRFc9q3yYbBkB6tsm4aCwwQV/j1JQAQ=
 github.com/yuin/gopher-lua v0.0.0-20220504180219-658193537a64/go.mod h1:GBR0iDaNXjAgGg9zfCvksxSRnQx76gclCIb7kdAd1Pw=
 github.com/yusufpapurcu/wmi v1.2.2/go.mod h1:SBZ9tNy3G9/m5Oi98Zks0QjeHVDvuK0qfxQmPyzfmi0=
+github.com/zeromicro/go-zero v1.3.2/go.mod h1:DEj3Fwj1Ui1ltsgf6YqwTL9nD4+tYzIRX0c1pWtQo1E=
 github.com/zeromicro/go-zero v1.3.5/go.mod h1:wh4o794b7Ul3W0k35Pw9nc3iB4O0OpaQTMQz/PJc1bc=
+github.com/zeromicro/go-zero v1.4.0/go.mod h1:1amLn98K7c6FLntb9f8hdmq26ajtolOg4DTFWnRt54o=
+github.com/zeromicro/go-zero v1.4.3/go.mod h1:UmDjuW7LHd9j7+nnnPBcXF0HLNmjJw6OjHPTlSp7X7Y=
 github.com/zeromicro/go-zero v1.4.4 h1:J8M768EVFNtIQJ/GCEsoIQPanxbx2HHT0it7r69U76Y=
 github.com/zeromicro/go-zero v1.4.4/go.mod h1:5WSUwtJm0bYdDZ69GlckigcT6D0EyAPbDaX3unbSY/4=
 github.com/ziutek/mymysql v1.5.4/go.mod h1:LMSpPZ6DbqWFxNCHW77HeMg9I646SAhApZ/wKdgO/C0=
 go.etcd.io/bbolt v1.3.4/go.mod h1:G5EMThwa9y8QZGBClrRx5EY+Yw9kAhnjy3bSjsnlVTQ=
 go.etcd.io/etcd v0.0.0-20200402134248-51bdeb39e698/go.mod h1:YoUyTScD3Vcv2RBm3eGVOq7i1ULiz3OuXoQFWOirmAM=
+go.etcd.io/etcd/api/v3 v3.5.2/go.mod h1:5GB2vv4A4AOn3yk7MftYGHkUfGtDHnEraIjym4dYz5A=
 go.etcd.io/etcd/api/v3 v3.5.4/go.mod h1:5GB2vv4A4AOn3yk7MftYGHkUfGtDHnEraIjym4dYz5A=
 go.etcd.io/etcd/api/v3 v3.5.5 h1:BX4JIbQ7hl7+jL+g+2j5UAr0o1bctCm6/Ct+ArBGkf0=
 go.etcd.io/etcd/api/v3 v3.5.5/go.mod h1:KFtNaxGDw4Yx/BA4iPPwevUTAuqcsPxzyX8PHydchN8=
+go.etcd.io/etcd/client/pkg/v3 v3.5.2/go.mod h1:IJHfcCEKxYu1Os13ZdwCwIUTUVGYTSAM3YSwc9/Ac1g=
 go.etcd.io/etcd/client/pkg/v3 v3.5.4/go.mod h1:IJHfcCEKxYu1Os13ZdwCwIUTUVGYTSAM3YSwc9/Ac1g=
 go.etcd.io/etcd/client/pkg/v3 v3.5.5 h1:9S0JUVvmrVl7wCF39iTQthdaaNIiAaQbmK75ogO6GU8=
 go.etcd.io/etcd/client/pkg/v3 v3.5.5/go.mod h1:ggrwbk069qxpKPq8/FKkQ3Xq9y39kbFR4LnKszpRXeQ=
+go.etcd.io/etcd/client/v3 v3.5.2/go.mod h1:kOOaWFFgHygyT0WlSmL8TJiXmMysO/nNUlEsSsN6W4o=
 go.etcd.io/etcd/client/v3 v3.5.4/go.mod h1:ZaRkVgBZC+L+dLCjTcF1hRXpgZXQPOvnA/Ak/gq3kiY=
 go.etcd.io/etcd/client/v3 v3.5.5 h1:q++2WTJbUgpQu4B6hCuT7VkdwaTP7Qz6Daak3WzbrlI=
 go.etcd.io/etcd/client/v3 v3.5.5/go.mod h1:aApjR4WGlSumpnJ2kloS75h6aHUmAyaPLjHMxpc7E7c=
 go.mongodb.org/mongo-driver v1.5.0/go.mod h1:boiGPFqyBs5R0R5qf2ErokGRekMfwn+MqKaUyHs7wy0=
 go.mongodb.org/mongo-driver v1.9.1/go.mod h1:0sQWfOeY63QTntERDJJ/0SuKK0T1uVSgKCuAROlKEPY=
+go.mongodb.org/mongo-driver v1.10.1/go.mod h1:z4XpeoU6w+9Vht+jAFyLgVrD+jGSQQe0+CBWFHNiHt8=
 go.mongodb.org/mongo-driver v1.11.1 h1:QP0znIRTuL0jf1oBQoAoM0C6ZJfBK4kx0Uumtv1A7w8=
 go.mongodb.org/mongo-driver v1.11.1/go.mod h1:s7p5vEtfbeR1gYi6pnj3c3/urpbLv2T5Sfd6Rp2HBB8=
 go.opencensus.io v0.20.1/go.mod h1:6WKK9ahsWS3RSO+PY9ZHZUfv2irvY6gN279GOPZjmmk=
@@ -1065,10 +1150,13 @@ go.opentelemetry.io/otel v1.0.0/go.mod h1:AjRVh9A5/5DE7S+mZtTR6t8vpKKryam+0lREnf
 go.opentelemetry.io/otel v1.3.0/go.mod h1:PWIKzi6JCp7sM0k9yZ43VX+T345uNbAkDKwHVjb2PTs=
 go.opentelemetry.io/otel v1.7.0/go.mod h1:5BdUoMIz5WEs0vt0CUEMtSSaTSHBBVwrhnz7+nrD5xk=
 go.opentelemetry.io/otel v1.8.0/go.mod h1:2pkj+iMj0o03Y+cW6/m8Y4WkRdYN3AvCXCnzRMp9yvM=
+go.opentelemetry.io/otel v1.9.0/go.mod h1:np4EoPGzoPs3O67xUVNoPPcmSvsfOxNlNA4F4AC+0Eo=
 go.opentelemetry.io/otel v1.10.0/go.mod h1:NbvWjCthWHKBEUMpf0/v8ZRZlni86PpGFEMA9pnQSnQ=
 go.opentelemetry.io/otel v1.11.0 h1:kfToEGMDq6TrVrJ9Vht84Y8y9enykSZzDDZglV0kIEk=
 go.opentelemetry.io/otel v1.11.0/go.mod h1:H2KtuEphyMvlhZ+F7tg9GRhAOe60moNx61Ex+WmiKkk=
+go.opentelemetry.io/otel/exporters/jaeger v1.3.0/go.mod h1:KoYHi1BtkUPncGSRtCe/eh1ijsnePhSkxwzz07vU0Fc=
 go.opentelemetry.io/otel/exporters/jaeger v1.8.0/go.mod h1:GbWg+ng88rDtx+id26C34QLqw2erqJeAjsCx9AFeHfE=
+go.opentelemetry.io/otel/exporters/jaeger v1.9.0/go.mod h1:hquezOLVAybNW6vanIxkdLXTXvzlj2Vn3wevSP15RYs=
 go.opentelemetry.io/otel/exporters/jaeger v1.10.0/go.mod h1:n9IGyx0fgyXXZ/i0foLHNxtET9CzXHzZeKCucvRBFgA=
 go.opentelemetry.io/otel/exporters/jaeger v1.11.0 h1:Sv2valcFfMlfu6g8USSS+ZUN5vwbuGj1aY/CFtMG33w=
 go.opentelemetry.io/otel/exporters/jaeger v1.11.0/go.mod h1:nRgyJbgJ0hmaUdHwyDpTTfBYz61cTTeeGhVzfQc+FsI=
@@ -1083,13 +1171,16 @@ go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.11.0 h1:j2RFV
 go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.11.0/go.mod h1:pILgiTEtrqvZpoiuGdblDgS5dbIaTgDrkIuKfEFkt+A=
 go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.10.0 h1:S8DedULB3gp93Rh+9Z+7NTEv+6Id/KYS7LDyipZ9iCE=
 go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.10.0/go.mod h1:5WV40MLWwvWlGP7Xm8g3pMcg0pKOUY609qxJn8y7LmM=
+go.opentelemetry.io/otel/exporters/zipkin v1.3.0/go.mod h1:LxGGfHIYbvsFnrJtBcazb0yG24xHdDGrT/H6RB9r3+8=
 go.opentelemetry.io/otel/exporters/zipkin v1.8.0/go.mod h1:0uYAyCuGT67MFV9Z/Mmx93wGuugHw0FbxMc74fs3LNo=
+go.opentelemetry.io/otel/exporters/zipkin v1.9.0/go.mod h1:HyIvYIu37wV4Wx5azd7e05x9k/dOz9KB4x0plw2QNvs=
 go.opentelemetry.io/otel/exporters/zipkin v1.10.0/go.mod h1:HdfvgwcOoCB0+zzrTHycW6btjK0zNpkz2oTGO815SCI=
 go.opentelemetry.io/otel/exporters/zipkin v1.11.0 h1:v/Abo5REOWrCj4zcEIUHFZtXpsCVjrwZj28iyX2rHXE=
 go.opentelemetry.io/otel/exporters/zipkin v1.11.0/go.mod h1:unWnsLCMYfINP8ue0aXVrB/GYHoXNn/lbTnupvLekGQ=
 go.opentelemetry.io/otel/sdk v1.0.0/go.mod h1:PCrDHlSy5x1kjezSdL37PhbFUMjrsLRshJ2zCzeXwbM=
 go.opentelemetry.io/otel/sdk v1.3.0/go.mod h1:rIo4suHNhQwBIPg9axF8V9CA72Wz2mKF1teNrup8yzs=
 go.opentelemetry.io/otel/sdk v1.8.0/go.mod h1:uPSfc+yfDH2StDM/Rm35WE8gXSNdvCg023J6HeGNO0c=
+go.opentelemetry.io/otel/sdk v1.9.0/go.mod h1:AEZc8nt5bd2F7BC24J5R0mrjYnpEgYHyTcM/vrSple4=
 go.opentelemetry.io/otel/sdk v1.10.0/go.mod h1:vO06iKzD5baltJz1zarxMCNHFpUlUiOy4s65ECtn6kE=
 go.opentelemetry.io/otel/sdk v1.11.0 h1:ZnKIL9V9Ztaq+ME43IUi/eo22mNsb6a7tGfzaOWB5fo=
 go.opentelemetry.io/otel/sdk v1.11.0/go.mod h1:REusa8RsyKaq0OlyangWXaw97t2VogoO4SSEeKkSTAk=
@@ -1097,6 +1188,7 @@ go.opentelemetry.io/otel/trace v1.0.0/go.mod h1:PXTWqayeFUlJV1YDNhsJYB184+IvAH81
 go.opentelemetry.io/otel/trace v1.3.0/go.mod h1:c/VDhno8888bvQYmbYLqe41/Ldmr/KKunbvWM4/fEjk=
 go.opentelemetry.io/otel/trace v1.7.0/go.mod h1:fzLSB9nqR2eXzxPXb2JW9IKE+ScyXA48yyE4TNvoHqU=
 go.opentelemetry.io/otel/trace v1.8.0/go.mod h1:0Bt3PXY8w+3pheS3hQUt+wow8b1ojPaTBoTCh2zIFI4=
+go.opentelemetry.io/otel/trace v1.9.0/go.mod h1:2737Q0MuG8q1uILYm2YYVkAyLtOofiTNGg6VODnOiPo=
 go.opentelemetry.io/otel/trace v1.10.0/go.mod h1:Sij3YYczqAdz+EhmGhE6TpTxUO5/F/AzrK+kxfGqySM=
 go.opentelemetry.io/otel/trace v1.11.0 h1:20U/Vj42SX+mASlXLmSGBg6jpI1jQtv682lZtTAOVFI=
 go.opentelemetry.io/otel/trace v1.11.0/go.mod h1:nyYjis9jy0gytE9LXGU+/m1sHTKbRY0fX0hulNNDP1U=
@@ -1130,8 +1222,10 @@ golang.org/x/crypto v0.0.0-20190325154230-a5d413f7728c/go.mod h1:djNgcEr1/C05ACk
 golang.org/x/crypto v0.0.0-20190422162423-af44ce270edf/go.mod h1:WFFai1msRO1wXaEeE5yQxYXgSfI8pQAWXbQop6sCtWE=
 golang.org/x/crypto v0.0.0-20190510104115-cbcb75029529/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=
 golang.org/x/crypto v0.0.0-20190605123033-f99c8df09eb5/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=
+golang.org/x/crypto v0.0.0-20190611184440-5c40567a22f8/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=
 golang.org/x/crypto v0.0.0-20191002192127-34f69633bfdc/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=
 golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=
+golang.org/x/crypto v0.0.0-20191205180655-e7c4368fe9dd/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto=
 golang.org/x/crypto v0.0.0-20200302210943-78000ba7a073/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto=
 golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto=
 golang.org/x/crypto v0.0.0-20201002170205-7f63de1d35b0/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto=
@@ -1178,6 +1272,7 @@ golang.org/x/mod v0.4.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
 golang.org/x/mod v0.4.1/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
 golang.org/x/mod v0.4.2/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
 golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4=
+golang.org/x/net v0.0.0-20180218175443-cbe0f9307d01/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
 golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
 golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
 golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
@@ -1303,6 +1398,7 @@ golang.org/x/sys v0.0.0-20190502145724-3ef323f4f1fd/go.mod h1:h1NjWce9XRLGQEsW7w
 golang.org/x/sys v0.0.0-20190507160741-ecd444e8653b/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
 golang.org/x/sys v0.0.0-20190531175056-4c3a928424d2/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
 golang.org/x/sys v0.0.0-20190606165138-5da285871e9c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
+golang.org/x/sys v0.0.0-20190616124812-15dcb6c0061f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
 golang.org/x/sys v0.0.0-20190624142023-c5567b49c5d0/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
 golang.org/x/sys v0.0.0-20190726091711-fc99dfbffb4e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
 golang.org/x/sys v0.0.0-20190904154756-749cb33beabd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
@@ -1335,6 +1431,7 @@ golang.org/x/sys v0.0.0-20200728102440-3e129f6d46b1/go.mod h1:h1NjWce9XRLGQEsW7w
 golang.org/x/sys v0.0.0-20200803210538-64077c9b5642/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
 golang.org/x/sys v0.0.0-20200905004654-be1d3432aa8f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
 golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
+golang.org/x/sys v0.0.0-20201112073958-5cba982894dd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
 golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
 golang.org/x/sys v0.0.0-20201201145000-ef89a241ccb3/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
 golang.org/x/sys v0.0.0-20210104204734-6f8348627aad/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
@@ -1403,7 +1500,9 @@ golang.org/x/time v0.0.0-20180412165947-fbb02b2291d2/go.mod h1:tRJNPiyCQ0inRvYxb
 golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
 golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
 golang.org/x/time v0.0.0-20191024005414-555d28b269f0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
+golang.org/x/time v0.0.0-20200630173020-3af7569d3a1e/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
 golang.org/x/time v0.0.0-20210723032227-1f47c861a9ac/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
+golang.org/x/time v0.0.0-20211116232009-f0f3c7e86c11/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
 golang.org/x/time v0.0.0-20220411224347-583f2d630306/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
 golang.org/x/time v0.3.0 h1:rg5rLMjNzMS1RkNLzCG38eapWhnYLFYXDXj2gOlr8j4=
 golang.org/x/time v0.3.0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
@@ -1424,6 +1523,7 @@ golang.org/x/tools v0.0.0-20190506145303-2d16b83fe98c/go.mod h1:RgjU9mgBXZiqYHBn
 golang.org/x/tools v0.0.0-20190524140312-2c0ae7006135/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q=
 golang.org/x/tools v0.0.0-20190531172133-b3315ee88b7d/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc=
 golang.org/x/tools v0.0.0-20190606124116-d0a3d012864b/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc=
+golang.org/x/tools v0.0.0-20190614205625-5aca471b1d59/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc=
 golang.org/x/tools v0.0.0-20190621195816-6e04913cbbac/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc=
 golang.org/x/tools v0.0.0-20190628153133-6cdbf07be9d0/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc=
 golang.org/x/tools v0.0.0-20190816200558-6889da9d5479/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
@@ -1453,8 +1553,10 @@ golang.org/x/tools v0.0.0-20200410132612-ae9902aceb98/go.mod h1:EkVYQZoAsY45+roY
 golang.org/x/tools v0.0.0-20200501065659-ab2804fb9c9d/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE=
 golang.org/x/tools v0.0.0-20200512131952-2bc93b1c0c88/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE=
 golang.org/x/tools v0.0.0-20200515010526-7d3b6ebf133d/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE=
+golang.org/x/tools v0.0.0-20200522201501-cb1345f3a375/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE=
 golang.org/x/tools v0.0.0-20200618134242-20370b0cb4b2/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE=
 golang.org/x/tools v0.0.0-20200619180055-7c47624df98f/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE=
+golang.org/x/tools v0.0.0-20200717024301-6ddee64345a6/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA=
 golang.org/x/tools v0.0.0-20200729194436-6467de6f59a7/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA=
 golang.org/x/tools v0.0.0-20200804011535-6c149bb5ef0d/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA=
 golang.org/x/tools v0.0.0-20200825202427-b303f430e36d/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA=
@@ -1703,6 +1805,7 @@ google.golang.org/protobuf v1.23.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2
 google.golang.org/protobuf v1.23.1-0.20200526195155-81db48ad09cc/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU=
 google.golang.org/protobuf v1.24.0/go.mod h1:r/3tXBNzIEhYS9I1OUVjXDlt8tc493IdKGjtUeSXeh4=
 google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlbajtzgsN7c=
+google.golang.org/protobuf v1.25.1-0.20200805231151-a709e31e5d12/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlbajtzgsN7c=
 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=
 google.golang.org/protobuf v1.27.1/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc=
@@ -1761,19 +1864,25 @@ honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWh
 honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt0JzvZhAg=
 honnef.co/go/tools v0.0.1-2020.1.3/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k=
 honnef.co/go/tools v0.0.1-2020.1.4/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k=
+k8s.io/api v0.20.12/go.mod h1:A2brwyEkVLM3wQGNnzoAa5JsQRzHK0uoOQ+bsnv7V68=
 k8s.io/api v0.22.9 h1:PidjRtgd0zDa6SvyooBLH/SP62uOhEBY0kx0UYRGr1o=
 k8s.io/api v0.22.9/go.mod h1:rcjO/FPOuvc3x7nQWx29UcDrFJMx82RxDob71ntNH4A=
+k8s.io/apimachinery v0.20.12/go.mod h1:uM7hCI0NyBymUwgshMgZyte475lxhr+QH6h3cvdnzEc=
 k8s.io/apimachinery v0.22.9 h1:5qjnpBk6eC9me0SAzokCUMI0KVF2PENK1PnykF8/Gjo=
 k8s.io/apimachinery v0.22.9/go.mod h1:ZvVLP5iLhwVFg2Yx9Gh5W0um0DUauExbRhe+2Z8I1EU=
+k8s.io/client-go v0.20.12/go.mod h1:NBJj6Evp73Xy/4v/O/RDRaH0+3JoxNfjRxkyRgrdbsA=
 k8s.io/client-go v0.22.9 h1:5p2R2LsoBfaE6QnXfWFmyyvxrFXtfegUGRMZSpTI+Q8=
 k8s.io/client-go v0.22.9/go.mod h1:IoH7exYnoH/zgvHOuVxh2c4yJepcCBt72FzCTisOc4k=
 k8s.io/gengo v0.0.0-20200413195148-3a45101e95ac/go.mod h1:ezvh/TsK7cY6rbqRK0oQQ8IAqLxYwwyPxAX1Pzy0ii0=
 k8s.io/klog/v2 v2.0.0/go.mod h1:PBfzABfn139FHAV07az/IF9Wp1bkk3vpT2XSJ76fSDE=
+k8s.io/klog/v2 v2.4.0/go.mod h1:Od+F08eJP+W3HUb4pSrPpgp9DGU4GzlpG/TmITuYh/Y=
 k8s.io/klog/v2 v2.9.0/go.mod h1:hy9LJ/NvuK+iVyP4Ehqva4HxZG/oXyIS3n3Jmire4Ec=
 k8s.io/klog/v2 v2.40.1/go.mod h1:y1WjHnz7Dj687irZUWR/WLkLc5N1YHtjLdmgWjndZn0=
 k8s.io/klog/v2 v2.80.1 h1:atnLQ121W371wYYFawwYx1aEY2eUfs4l3J72wtgAwV4=
 k8s.io/klog/v2 v2.80.1/go.mod h1:y1WjHnz7Dj687irZUWR/WLkLc5N1YHtjLdmgWjndZn0=
+k8s.io/kube-openapi v0.0.0-20201113171705-d219536bb9fd/go.mod h1:WOJ3KddDSol4tAGcJo0Tvi+dK12EcqSLqcWsryKMpfM=
 k8s.io/kube-openapi v0.0.0-20211109043538-20434351676c/go.mod h1:vHXdDvt9+2spS2Rx9ql3I8tycm3H9FDfdUoIuKCefvw=
+k8s.io/utils v0.0.0-20201110183641-67b214c5f920/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA=
 k8s.io/utils v0.0.0-20211116205334-6203023598ed/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA=
 k8s.io/utils v0.0.0-20220706174534-f6158b442e7c/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA=
 k8s.io/utils v0.0.0-20221108210102-8e77b1f39fe2 h1:GfD9OzL11kvZN5iArC6oTS7RTj7oJOIfnislxYlqTj8=
@@ -1782,6 +1891,7 @@ rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8
 rsc.io/quote/v3 v3.1.0/go.mod h1:yEA65RcK8LyAZtP9Kv3t0HmxON59tX3rD+tICJqUlj0=
 rsc.io/sampler v1.3.0/go.mod h1:T1hPZKmBbMNahiBKFy5HrXp6adAjACjK9JXDnKaTXpA=
 sigs.k8s.io/structured-merge-diff/v4 v4.0.2/go.mod h1:bJZC9H9iH24zzfZ/41RGcq60oK1F7G282QMXDPYydCw=
+sigs.k8s.io/structured-merge-diff/v4 v4.1.2/go.mod h1:j/nl6xW8vLS49O8YvXW1ocPhZawJtm+Yrr7PPRQ0Vg4=
 sigs.k8s.io/structured-merge-diff/v4 v4.2.1 h1:bKCqE9GvQ5tiVHn5rfn1r+yao3aLQEaLzkkmAkf+A6Y=
 sigs.k8s.io/structured-merge-diff/v4 v4.2.1/go.mod h1:j/nl6xW8vLS49O8YvXW1ocPhZawJtm+Yrr7PPRQ0Vg4=
 sigs.k8s.io/yaml v1.1.0/go.mod h1:UJmg0vDUVViEyp3mgSv9WPwZCDxu4rQW1olrI1uml+o=

+ 115 - 115
src/jfw/modules/subscribepay/src/rpcfollow/share.go

@@ -1,128 +1,128 @@
 package rpcfollow
 
 import (
-        "app.yhyue.com/moapp/jybase/go-xweb/httpsession"
-        "encoding/json"
-        "go.mongodb.org/mongo-driver/bson/primitive"
-        "jy/src/jfw/modules/subscribepay/src/config"
-        "jy/src/jfw/modules/subscribepay/src/entity"
-        "jy/src/jfw/modules/subscribepay/src/util"
-        "time"
+	"app.yhyue.com/moapp/jybase/go-xweb/httpsession"
+	"encoding/json"
+	"go.mongodb.org/mongo-driver/bson/primitive"
+	"jy/src/jfw/modules/subscribepay/src/config"
+	"jy/src/jfw/modules/subscribepay/src/entity"
+	"jy/src/jfw/modules/subscribepay/src/util"
+	"time"
 
-        qu "app.yhyue.com/moapp/jybase/common"
-        . "app.yhyue.com/moapp/jybase/date"
-        frpc "app.yhyue.com/moapp/jybase/rpc"
-        "app.yhyue.com/moapp/jypkg/common/src/qfw/util/jy"
+	qu "app.yhyue.com/moapp/jybase/common"
+	. "app.yhyue.com/moapp/jybase/date"
+	frpc "app.yhyue.com/moapp/jybase/rpc"
+	"app.yhyue.com/moapp/jypkg/common/src/qfw/util/jy"
 )
 
 //用户分享完成后,分享者和被分享者订单处理
 func (s *JyPayRpc) ShareFissionNew(p *frpc.JYShareUserIdsRes, r *frpc.JYShareResp) error {
-        if len(p.ShareUserInfo) > 0 {
-                errArr := []interface{}{}
-                for _, ps := range p.ShareUserInfo {
-                        userId := ps.UserId
-                        _, err := primitive.ObjectIDFromHex(userId)
-                        if err!=nil{
-                                continue
-                        }
-                        data, ok := util.MQFW.FindById("user", userId, `{"i_vip_status":1,"l_vip_starttime":1,"l_vip_endtime":1,"o_vipjy":1,"i_shareCount":1,"s_m_openid":1}`)
-                        if ok && data != nil && len(*data) > 0 {
-                                now := time.Now()
-                                vip_status := qu.IntAll((*data)["i_vip_status"])
-                                nowDay := time.Date(now.Year(), now.Month(), now.Day(), 23, 59, 59, 59, now.Location()).Unix() //当前晚上23:59:59
-                                endtime := qu.Int64All(qu.If(qu.Int64All((*data)["l_vip_endtime"]) < nowDay, nowDay, qu.Int64All((*data)["l_vip_endtime"])))
-                                //更新user表
-                                setMap := map[string]interface{}{}
-                                var updateMap = map[string]interface{}{}
-                                endT := time.Unix(endtime, 0).AddDate(0, 0, ps.TimeExpand)
-                                types := 2 //默认开通权益
-                                if vip_status == 2 {
-                                        types = 1 //仅延长周期
-                                        //超级订阅用户
-                                        updateMap = map[string]interface{}{
-                                                "l_vip_endtime": endT.Unix(),
-                                        }
-                                } else if vip_status <= 0 {
-                                        var (
-                                                area      = map[string]interface{}{"北京": []string{}}
-                                                areaCount = 1
-                                        )
-                                        //22年双十一预热福利---2021年至今的免费用户
-                                        if ps.Remark == "22年双十一预热福利" {
-                                                //活动赠送7天  全国  超级订阅
-                                                area = map[string]interface{}{}
-                                                areaCount = -1
-                                        }
-                                        //非超级订阅用户
-                                        updateMap = map[string]interface{}{
-                                                "i_vip_status":                     2,
-                                                "l_vip_starttime":                  now.Unix(),
-                                                "l_vip_endtime":                    endT.Unix(),
-                                                "o_vipjy.o_area":                   area,
-                                                "o_vipjy.o_buyset.areacount":       areaCount,
-                                                "o_vipjy.o_buyset.buyerclasscount": -1,
-                                                "o_vipjy.o_buyset.upgrade":         1,
-                                                "o_vipjy.o_buyset.newcitys":        []string{},
-                                        }
-                                        if vip_status == 0 {
-                                                updateMap["o_vipjy.i_trial"] = -1
-                                                updateMap["o_vipjy.a_buyerclass"] = []string{}
-                                        }
-                                }
-                                setMap["$set"] = updateMap
-                                if !util.MQFW.UpdateById("user", userId, setMap) {
-                                        errArr = append(errArr, map[string]interface{}{
-                                                "code":   -3,
-                                                "msg":    "更新用户超级订阅状态失败",
-                                                "userId": userId,
-                                        })
-                                }
-                                jy.ClearBigVipUserPower(userId)
-                                st, et := "", ""
-                                st = time.Unix(endtime, 0).Format(Date_Full_Layout)
-                                et = endT.Format(Date_Full_Layout)
-                                if !entity.Order(userId, st, et, types, ps.TimeExpand, ps.Remark) {
-                                        r.Error_code = -2
-                                        errArr = append(errArr, map[string]interface{}{
-                                                "code":   -2,
-                                                "msg":    "保存记录失败",
-                                                "userId": userId,
-                                        })
-                                }
-                        } else {
-                                r.Error_code = -1
-                                errArr = append(errArr, map[string]interface{}{
-                                        "code":   -1,
-                                        "msg":    "mgo获取用户信息失败",
-                                        "userId": userId,
-                                })
-                        }
-                }
-                if len(errArr) > 0 {
-                        b, _ := json.Marshal(errArr)
-                        r.Data = b
-                }
-        }
-        return nil
+	if len(p.ShareUserInfo) > 0 {
+		errArr := []interface{}{}
+		for _, ps := range p.ShareUserInfo {
+			userId := ps.UserId
+			_, err := primitive.ObjectIDFromHex(userId)
+			if err != nil {
+				continue
+			}
+			data, ok := util.MQFW.FindById("user", userId, `{"i_vip_status":1,"l_vip_starttime":1,"l_vip_endtime":1,"o_vipjy":1,"i_shareCount":1,"s_m_openid":1}`)
+			if ok && data != nil && len(*data) > 0 {
+				now := time.Now()
+				vip_status := qu.IntAll((*data)["i_vip_status"])
+				nowDay := time.Date(now.Year(), now.Month(), now.Day(), 23, 59, 59, 59, now.Location()).Unix() //当前晚上23:59:59
+				endtime := qu.Int64All(qu.If(qu.Int64All((*data)["l_vip_endtime"]) < nowDay, nowDay, qu.Int64All((*data)["l_vip_endtime"])))
+				//更新user表
+				setMap := map[string]interface{}{}
+				var updateMap = map[string]interface{}{}
+				endT := time.Unix(endtime, 0).AddDate(0, 0, ps.TimeExpand)
+				types := 2 //默认开通权益
+				if vip_status == 2 {
+					types = 1 //仅延长周期
+					//超级订阅用户
+					updateMap = map[string]interface{}{
+						"l_vip_endtime": endT.Unix(),
+					}
+				} else if vip_status <= 0 {
+					var (
+						area      = map[string]interface{}{"北京": []string{}}
+						areaCount = 1
+					)
+					//22年双十一预热福利---2021年至今的免费用户
+					if ps.Remark == "22年双十一预热福利" {
+						//活动赠送7天  全国  超级订阅
+						area = map[string]interface{}{}
+						areaCount = -1
+					}
+					//非超级订阅用户
+					updateMap = map[string]interface{}{
+						"i_vip_status":                     2,
+						"l_vip_starttime":                  now.Unix(),
+						"l_vip_endtime":                    endT.Unix(),
+						"o_vipjy.o_area":                   area,
+						"o_vipjy.o_buyset.areacount":       areaCount,
+						"o_vipjy.o_buyset.buyerclasscount": -1,
+						"o_vipjy.o_buyset.upgrade":         1,
+						"o_vipjy.o_buyset.newcitys":        []string{},
+					}
+					if vip_status == 0 {
+						updateMap["o_vipjy.i_trial"] = -1
+						updateMap["o_vipjy.a_buyerclass"] = []string{}
+					}
+				}
+				setMap["$set"] = updateMap
+				if !util.MQFW.UpdateById("user", userId, setMap) {
+					errArr = append(errArr, map[string]interface{}{
+						"code":   -3,
+						"msg":    "更新用户超级订阅状态失败",
+						"userId": userId,
+					})
+				}
+				jy.ClearBigVipUserPower(userId)
+				st, et := "", ""
+				st = time.Unix(endtime, 0).Format(Date_Full_Layout)
+				et = endT.Format(Date_Full_Layout)
+				if !entity.Order(userId, st, et, types, ps.TimeExpand, ps.Remark) {
+					r.Error_code = -2
+					errArr = append(errArr, map[string]interface{}{
+						"code":   -2,
+						"msg":    "保存记录失败",
+						"userId": userId,
+					})
+				}
+			} else {
+				r.Error_code = -1
+				errArr = append(errArr, map[string]interface{}{
+					"code":   -1,
+					"msg":    "mgo获取用户信息失败",
+					"userId": userId,
+				})
+			}
+		}
+		if len(errArr) > 0 {
+			b, _ := json.Marshal(errArr)
+			r.Data = b
+		}
+	}
+	return nil
 }
 
 //获取用户权益信息
 func (s *JyPayRpc) GetUserPowerInfo(p *frpc.JYShareUserIdsRes, r *frpc.JYShareResp, session *httpsession.Session) error {
-        if len(p.ShareUserInfo) > 0 {
-                ps := p.ShareUserInfo[0]
-                bigBaseMsg := jy.GetBigVipUserBaseMsg("10000", session, config.Config.Etcd.Hosts, config.Config.Etcd.Key)
-                if bigBaseMsg == nil {
-                        r.Error_code = -1
-                        r.Error_msg = ps.UserId
-                        r.Data = map[string]interface{}{
-                                "code":   -1,
-                                "msg":    "获取用户权益详情失败",
-                                "userId": ps.UserId,
-                        }
-                } else {
-                        data, _ := json.Marshal(*bigBaseMsg)
-                        r.Data = data
-                }
-        }
-        return nil
+	if len(p.ShareUserInfo) > 0 {
+		ps := p.ShareUserInfo[0]
+		bigBaseMsg := jy.GetBigVipUserBaseMsg(session, *config.Middleground)
+		if bigBaseMsg == nil {
+			r.Error_code = -1
+			r.Error_msg = ps.UserId
+			r.Data = map[string]interface{}{
+				"code":   -1,
+				"msg":    "获取用户权益详情失败",
+				"userId": ps.UserId,
+			}
+		} else {
+			data, _ := json.Marshal(*bigBaseMsg)
+			r.Data = data
+		}
+	}
+	return nil
 }

Rozdielové dáta súboru neboli zobrazené, pretože súbor je príliš veľký
+ 597 - 597
src/jfw/modules/subscribepay/src/service/afterPay.go


+ 1 - 1
src/jfw/modules/subscribepay/src/service/basePack.go

@@ -66,7 +66,7 @@ func (this *ResourcePack) RecordList() {
 		if productName == "" || platform == "" {
 			return "参数有误", nil
 		}
-		vipMsg := jy.GetBigVipUserBaseMsg("10000", this.Session(), config.Config.Etcd.Hosts, config.Config.Etcd.Key)
+		vipMsg := jy.GetBigVipUserBaseMsg(this.Session(), *config.Middleground)
 		if vipMsg.VipStatus <= 0 {
 			return "无权限,请联系管理员", nil
 		}

+ 120 - 120
src/jfw/modules/subscribepay/src/service/bigmember.go

@@ -1,140 +1,140 @@
 package service
 
 import (
-        "encoding/json"
-        "errors"
-        "jy/src/jfw/modules/subscribepay/src/config"
-        "jy/src/jfw/modules/subscribepay/src/entity"
-        "jy/src/jfw/modules/subscribepay/src/pay"
-        "jy/src/jfw/modules/subscribepay/src/util"
+	"encoding/json"
+	"errors"
+	"jy/src/jfw/modules/subscribepay/src/config"
+	"jy/src/jfw/modules/subscribepay/src/entity"
+	"jy/src/jfw/modules/subscribepay/src/pay"
+	"jy/src/jfw/modules/subscribepay/src/util"
 
-        . "app.yhyue.com/moapp/jybase/api"
-        qutil "app.yhyue.com/moapp/jybase/common"
-        . "app.yhyue.com/moapp/jybase/date"
-        "app.yhyue.com/moapp/jybase/go-xweb/xweb"
-        "app.yhyue.com/moapp/jypkg/common/src/qfw/util/jy"
+	. "app.yhyue.com/moapp/jybase/api"
+	qutil "app.yhyue.com/moapp/jybase/common"
+	. "app.yhyue.com/moapp/jybase/date"
+	"app.yhyue.com/moapp/jybase/go-xweb/xweb"
+	"app.yhyue.com/moapp/jypkg/common/src/qfw/util/jy"
 )
 
 type Bigmember struct {
-        *xweb.Action
-        createOrderCheck xweb.Mapper `xweb:"/bigmember/createOrderCheck"` //是否可以支付
-        createOrder      xweb.Mapper `xweb:"/bigmember/createOrder"`      //创建订单
-        price            xweb.Mapper `xweb:"/bigmember/price"`            //价格计算
+	*xweb.Action
+	createOrderCheck xweb.Mapper `xweb:"/bigmember/createOrderCheck"` //是否可以支付
+	createOrder      xweb.Mapper `xweb:"/bigmember/createOrder"`      //创建订单
+	price            xweb.Mapper `xweb:"/bigmember/price"`            //价格计算
 }
 
 func (this *Bigmember) CreateOrderCheck() {
-        rData, errMsg := func() (interface{}, error) {
-                userId := qutil.ObjToString(this.GetSession("userId"))
-                if userId == "" {
-                        return nil, errors.New("未登录")
-                }
-                //校验是否有转账待审核订单
-                num := util.Mysql.Count("dataexport_order", map[string]interface{}{
-                        "user_id":       userId,
-                        "product_type":  "大会员",
-                        "order_status":  0,
-                        "course_status": 2,
-                })
-                //校验是否是大会员
-                vipStatus := jy.GetBigVipUserBaseMsg("10000", this.Session(), config.Config.Etcd.Hosts, config.Config.Etcd.Key)
-                return map[string]interface{}{
-                        "vipStatus":        vipStatus.Status,
-                        "hasPid":           vipStatus.Pid != "",
-                        "hasAccountsOrder": num > 0,
-                }, nil
-        }()
-        this.ServeJson(NewResult(rData, errMsg))
+	rData, errMsg := func() (interface{}, error) {
+		userId := qutil.ObjToString(this.GetSession("userId"))
+		if userId == "" {
+			return nil, errors.New("未登录")
+		}
+		//校验是否有转账待审核订单
+		num := util.Mysql.Count("dataexport_order", map[string]interface{}{
+			"user_id":       userId,
+			"product_type":  "大会员",
+			"order_status":  0,
+			"course_status": 2,
+		})
+		//校验是否是大会员
+		vipStatus := jy.GetBigVipUserBaseMsg(this.Session(), *config.Middleground)
+		return map[string]interface{}{
+			"vipStatus":        vipStatus.Status,
+			"hasPid":           vipStatus.Pid != "",
+			"hasAccountsOrder": num > 0,
+		}, nil
+	}()
+	this.ServeJson(NewResult(rData, errMsg))
 }
 
 //创建订单
 func (b *Bigmember) CreateOrder() {
-        if !R.CheckReqParam(b.ResponseWriter, b.Request, "level", "cycle") {
-                return
-        }
-        r := func() Result {
-                defer qutil.Catch()
-                userId := qutil.ObjToString(b.GetSession("userId"))
-                if userId == "" {
-                        return Result{-1, "未登录", nil}
-                }
-                //校验是否有转账待审核订单
-                num := util.Mysql.Count("dataexport_order", map[string]interface{}{
-                        "user_id":       userId,
-                        "product_type":  "大会员",
-                        "order_status":  0,
-                        "course_status": 2,
-                })
-                if num > 0 {
-                        return Result{-1, "有待审核订单", nil}
-                }
+	if !R.CheckReqParam(b.ResponseWriter, b.Request, "level", "cycle") {
+		return
+	}
+	r := func() Result {
+		defer qutil.Catch()
+		userId := qutil.ObjToString(b.GetSession("userId"))
+		if userId == "" {
+			return Result{-1, "未登录", nil}
+		}
+		//校验是否有转账待审核订单
+		num := util.Mysql.Count("dataexport_order", map[string]interface{}{
+			"user_id":       userId,
+			"product_type":  "大会员",
+			"order_status":  0,
+			"course_status": 2,
+		})
+		if num > 0 {
+			return Result{-1, "有待审核订单", nil}
+		}
 
-                level, _ := b.GetInteger("level") //1:专业版;2:智慧版;3:商机版;4:试用版 5:试用版 6:商机版2.0 7:专家版2.0
-                cycle, _ := b.GetInteger("cycle")
-                //校验是否是大会员
-                vipStatus := jy.GetBigVipUserBaseMsg("10000", b.Session(), config.Config.Etcd.Hosts, config.Config.Etcd.Key)
-                if vipStatus.Status > 0 && vipStatus.Status != 4 { //已经是大会员
-                        return Result{-1, "您已经是大会员用户", nil}
-                }
-                if vipStatus.Status > 0 && vipStatus.Status == 4 && level == 4 {
-                        return Result{-1, "您已经是大会员用户-试用版", nil}
-                }
-                order_money := entity.MemberStruct.GetMoney(userId, level, cycle)
-                if order_money == -1 {
-                        return Result{-1, "大会员生成订单价格计算错误", nil}
-                }
-                code := pay.GetOrderCode(userId)
-                filter_map := map[string]interface{}{
-                        "cycle": cycle,
-                        "level": level,
-                }
-                filter, _ := json.Marshal(filter_map)
-                distributionChannel, orderChannel := util.GetJyOrderChannel("", b.Header("User-Agent"))
-                entId := qutil.Int64All(b.GetSession("entId"))
-                buy_subject := 1
-                if entId > 0 {
-                        buy_subject = 2
-                }
-                insertObj := map[string]interface{}{
-                        "order_money":          order_money,
-                        "order_status":         0,
-                        "filter":               string(filter),
-                        "order_code":           code,
-                        "product_type":         "大会员",
-                        "create_time":          NowFormat(Date_Full_Layout),
-                        "prepay_time":          NowFormat(Date_Full_Layout),
-                        "user_id":              userId,
-                        "pay_way":              "",
-                        "original_price":       order_money,
-                        "distribution_channel": distributionChannel, //销售渠道
-                        "order_channel":        orderChannel,        //下单渠道
-                        "audit_status":         3,                   //默认审核通过
-                        "buy_subject":          buy_subject,
-                        "ent_id":               entId,
-                }
-                order_phone := b.GetString("order_phone") //p19.3用户信息采集 手机号
-                if order_phone != "" {
-                        if !jy.PhoneReg.MatchString(order_phone) {
-                                return Result{-1, "手机号格式异常", nil}
-                        }
-                        insertObj["user_phone"] = order_phone
-                }
-                order_id := util.Mysql.Insert("dataexport_order", insertObj)
-                if order_id > 0 {
-                        return Result{0, "", M{"order_code": code}}
-                }
-                return Result{-1, "大会员生成订单失败", nil}
-        }()
-        b.ServeJson(r)
+		level, _ := b.GetInteger("level") //1:专业版;2:智慧版;3:商机版;4:试用版 5:试用版 6:商机版2.0 7:专家版2.0
+		cycle, _ := b.GetInteger("cycle")
+		//校验是否是大会员
+		vipStatus := jy.GetBigVipUserBaseMsg(b.Session(), *config.Middleground)
+		if vipStatus.Status > 0 && vipStatus.Status != 4 { //已经是大会员
+			return Result{-1, "您已经是大会员用户", nil}
+		}
+		if vipStatus.Status > 0 && vipStatus.Status == 4 && level == 4 {
+			return Result{-1, "您已经是大会员用户-试用版", nil}
+		}
+		order_money := entity.MemberStruct.GetMoney(userId, level, cycle)
+		if order_money == -1 {
+			return Result{-1, "大会员生成订单价格计算错误", nil}
+		}
+		code := pay.GetOrderCode(userId)
+		filter_map := map[string]interface{}{
+			"cycle": cycle,
+			"level": level,
+		}
+		filter, _ := json.Marshal(filter_map)
+		distributionChannel, orderChannel := util.GetJyOrderChannel("", b.Header("User-Agent"))
+		entId := qutil.Int64All(b.GetSession("entId"))
+		buy_subject := 1
+		if entId > 0 {
+			buy_subject = 2
+		}
+		insertObj := map[string]interface{}{
+			"order_money":          order_money,
+			"order_status":         0,
+			"filter":               string(filter),
+			"order_code":           code,
+			"product_type":         "大会员",
+			"create_time":          NowFormat(Date_Full_Layout),
+			"prepay_time":          NowFormat(Date_Full_Layout),
+			"user_id":              userId,
+			"pay_way":              "",
+			"original_price":       order_money,
+			"distribution_channel": distributionChannel, //销售渠道
+			"order_channel":        orderChannel,        //下单渠道
+			"audit_status":         3,                   //默认审核通过
+			"buy_subject":          buy_subject,
+			"ent_id":               entId,
+		}
+		order_phone := b.GetString("order_phone") //p19.3用户信息采集 手机号
+		if order_phone != "" {
+			if !jy.PhoneReg.MatchString(order_phone) {
+				return Result{-1, "手机号格式异常", nil}
+			}
+			insertObj["user_phone"] = order_phone
+		}
+		order_id := util.Mysql.Insert("dataexport_order", insertObj)
+		if order_id > 0 {
+			return Result{0, "", M{"order_code": code}}
+		}
+		return Result{-1, "大会员生成订单失败", nil}
+	}()
+	b.ServeJson(r)
 }
 
 //价格计算
 func (this *Bigmember) Price() {
-        level, _ := this.GetInteger("level") //1:专业版;2:智慧版;3:商机版;4:试用版
-        cycle, _ := this.GetInteger("cycle")
-        price := entity.MemberStruct.GetMoney("", level, cycle)
-        this.ServeJson(Result{0, "", M{
-                "money":         config.MemberConfig.Price,
-                "price":         price,
-                "originalPrice": config.MemberConfig.OriginalPrice,
-        }})
+	level, _ := this.GetInteger("level") //1:专业版;2:智慧版;3:商机版;4:试用版
+	cycle, _ := this.GetInteger("cycle")
+	price := entity.MemberStruct.GetMoney("", level, cycle)
+	this.ServeJson(Result{0, "", M{
+		"money":         config.MemberConfig.Price,
+		"price":         price,
+		"originalPrice": config.MemberConfig.OriginalPrice,
+	}})
 }

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

@@ -443,7 +443,7 @@ func (this *DataExportPack) RecordList() {
 		pageSize, _ := this.GetInteger("pageSize")
 		pageNum, _ := this.GetInteger("pageNum")
 
-		vipMsg := jy.GetBigVipUserBaseMsg("10000", this.Session(), config.Config.Etcd.Hosts, config.Config.Etcd.Key)
+		vipMsg := jy.GetBigVipUserBaseMsg(this.Session(), *config.Middleground)
 		entId := qutil.IntAll(this.GetSession("entId"))
 		entUserId := qutil.IntAll(this.GetSession("entUserId"))
 

+ 206 - 206
src/jfw/modules/subscribepay/src/service/index_p1.go

@@ -1,230 +1,230 @@
 package service
 
 import (
-        "fmt"
-        "jy/src/jfw/modules/subscribepay/src/config"
-        "jy/src/jfw/modules/subscribepay/src/entity"
-        "jy/src/jfw/modules/subscribepay/src/util"
-        "log"
-        "strings"
-        "time"
+	"fmt"
+	"jy/src/jfw/modules/subscribepay/src/config"
+	"jy/src/jfw/modules/subscribepay/src/entity"
+	"jy/src/jfw/modules/subscribepay/src/util"
+	"log"
+	"strings"
+	"time"
 
-        qutil "app.yhyue.com/moapp/jybase/common"
-        "app.yhyue.com/moapp/jybase/encrypt"
-        elastic "app.yhyue.com/moapp/jybase/esv1"
-        "app.yhyue.com/moapp/jybase/go-xweb/xweb"
-        "app.yhyue.com/moapp/jybase/redis"
-        "app.yhyue.com/moapp/jypkg/common/src/qfw/util/jy"
+	qutil "app.yhyue.com/moapp/jybase/common"
+	"app.yhyue.com/moapp/jybase/encrypt"
+	elastic "app.yhyue.com/moapp/jybase/esv1"
+	"app.yhyue.com/moapp/jybase/go-xweb/xweb"
+	"app.yhyue.com/moapp/jybase/redis"
+	"app.yhyue.com/moapp/jypkg/common/src/qfw/util/jy"
 )
 
 type IndexSearch struct {
-        *xweb.Action
-        getIndexMessage xweb.Mapper `xweb:"/index/getIndexMessage"` //首页p1数据
+	*xweb.Action
+	getIndexMessage xweb.Mapper `xweb:"/index/getIndexMessage"` //首页p1数据
 }
 
 const (
-        search_index = "bidding"
-        search_type  = "bidding"
-        search_field = `"_id","title","publishtime","toptype","subtype","type","area","city","s_subscopeclass","budget","spidercode","site"`
+	search_index = "bidding"
+	search_type  = "bidding"
+	search_field = `"_id","title","publishtime","toptype","subtype","type","area","city","s_subscopeclass","budget","spidercode","site"`
 
-        query               = `{"query":{"bool":{"must":[%s],"should":[%s],"minimum_should_match": 1}},"highlight": {"pre_tags": ["<a>"],"post_tags": ["</a>"],"fields": {"title": {"fragment_size": 0,"number_of_fragments": 1}}},"_source":[` + search_field + `],"sort":[{"publishtime":"desc"},{"budget":"desc"}],"from":0,"size":20}`
-        multi_match         = `{"multi_match": {"query": %s,"type": "phrase", "fields": ["title"]}}`
-        query_bool_must     = `{"terms":{"%s":[%s]}}`
-        query_bool_must_and = `{"bool":{"must":[%s],"must_not":[%s]}}`
+	query               = `{"query":{"bool":{"must":[%s],"should":[%s],"minimum_should_match": 1}},"highlight": {"pre_tags": ["<a>"],"post_tags": ["</a>"],"fields": {"title": {"fragment_size": 0,"number_of_fragments": 1}}},"_source":[` + search_field + `],"sort":[{"publishtime":"desc"},{"budget":"desc"}],"from":0,"size":20}`
+	multi_match         = `{"multi_match": {"query": %s,"type": "phrase", "fields": ["title"]}}`
+	query_bool_must     = `{"terms":{"%s":[%s]}}`
+	query_bool_must_and = `{"bool":{"must":[%s],"must_not":[%s]}}`
 )
 
 func (this *IndexSearch) GetIndexMessage() {
-        areaCity := this.GetString("city")
-        nReq, _ := this.GetInteger("nReq")
-        userId := qutil.ObjToString(this.GetSession("userId"))
-        if userId != "" {
-                redisData := redis.Get("other", "p1_indexMessage_"+userId)
-                if redisData != nil {
-                        result_, ok := redisData.(map[string]interface{})
-                        if ok {
-                                this.ServeJson(map[string]interface{}{
-                                        "success": true,
-                                        "errMsg":  "",
-                                        "data":    result_,
-                                })
-                                return
-                        }
-                }
-                r := func() *entity.FuncResult {
-                        //获取订阅信息
-                        /*userMap, ok := util.MQFW.FindById("user", userId, `{"o_jy":1,"o_vipjy":1,"i_vip_status":1}`)
-                          if !ok || userMap == nil || len(*userMap) == 0 {
-                          	//查询出错
-                          	return &entity.FuncResult{false, errors.New("未查询到用户信息"), nil}
-                          }*/
-                        //根据订阅词获取查询语句
-                        userMap := jy.GetBigVipUserBaseMsg("10000", this.Session(), config.Config.Etcd.Hosts, config.Config.Etcd.Key)
-                        vipStatus := userMap.Data.Vip.Status
-                        //vip用户
-                        if vipStatus > 0 {
-                                o_msgset := jy.GetSubScribeInfo(this.Session(), util.MQFW, "v", "10000")
-                                vip_items, ok := (*o_msgset)["a_items"].([]interface{})
-                                //vip查询推送历史
-                                result := getPushHistory(userId)
-                                return &entity.FuncResult{true, nil, map[string]interface{}{
-                                        "isVip":        true,                     //是否是vip用户
-                                        "hasSubscribe": ok && len(vip_items) > 0, //是否有订阅词
-                                        "listLength":   len(result),              //数据长度
-                                        "list":         result,                   //数据
-                                }}
-                        }
-                        //普通用户用户
-                        o_msgset := jy.GetSubScribeInfo(this.Session(), util.MQFW, "f", "10000")
-                        items, ok := (*o_msgset)["a_key"].([]interface{})
-                        if ok && len(items) > 0 {
-                                //普通用户查询推送历史
-                                result := getPushHistory(userId)
-                                return &entity.FuncResult{true, nil, map[string]interface{}{
-                                        "isVip":        false,                //是否是vip用户
-                                        "hasSubscribe": ok && len(items) > 0, //是否有订阅词
-                                        "listLength":   len(result),          //数据长度
-                                        "list":         result,               //数据
-                                }}
-                        }
-                        //普通用户无订阅词
-                        var history []string
-                        var _history []string
-                        h := redis.GetStr("other", "s_"+userId) //用户所有的搜索历史
-                        if h != "" {
-                                history = strings.Split(h, ",")
-                                _history = strings.Split(h, ",")
-                                for k, v := range _history {
-                                        //默认关键词不超过35个字符
-                                        b_word, _, _ := jy.InterceptSearchKW(v, qutil.IntAllDef(config.Config.KeywordsLimit, 35), true)
-                                        if b_word == "" {
-                                                _history = append(_history[:k], _history[k+1:]...)
-                                        }
-                                }
-                        }
-                        var list *[]map[string]interface{}
-                        if nReq == 2 || len(_history) > 0 { //根据定位请求数据
-                                doSearchStr := getSimpleSql(areaCity, _history)
-                                list = elastic.Get(search_index, search_type, doSearchStr)
-                                util.BidListConvert("", list)
-                        }
-                        listLength := 0
-                        if list != nil {
-                                for _, v := range *list {
-                                        v["_id"] = encrypt.EncodeArticleId2ByCheck(v["_id"].(string))
-                                        delete(v, "s_subscopeclass")
-                                }
-                                listLength = len(*list)
-                        }
-                        return &entity.FuncResult{true, nil, map[string]interface{}{
-                                "isVip":        false,            //是否是vip用户
-                                "hasSubscribe": false,            //是否有订阅词
-                                "hasHistory":   len(history) > 0, //是否有搜索历史
-                                "listLength":   listLength,       //数据长度
-                                "list":         list,             //数据
-                                "history":      history,          //历史数据
-                        }}
-                }()
-                result := r.Format()
-                if r.Err != nil {
-                        log.Printf("%s CreateOrder err:%v\n", userId, r.Err.Error())
-                }
-                //如果有数据,则缓存redis
-                if r.Success && qutil.IntAll(r.Data["listLength"]) > 0 {
-                        redis.Put("other", "p1_indexMessage_"+userId, r.Data, 24*60*60)
-                }
-                this.ServeJson(result)
-                return
-        } else {
-                redisData := redis.Get("other", "p1_indexMessage_"+areaCity)
-                if redisData != nil {
-                        result_, ok := redisData.(map[string]interface{})
-                        if ok {
-                                this.ServeJson(map[string]interface{}{
-                                        "success": true,
-                                        "errMsg":  "",
-                                        "data":    result_,
-                                })
-                                return
-                        }
-                }
-                r := func() *entity.FuncResult {
-                        var list *[]map[string]interface{}
-                        if nReq == 2 { //根据定位请求数据
-                                doSearchStr := getSimpleSql(areaCity, nil)
-                                list = elastic.Get(search_index, search_type, doSearchStr)
-                                util.BidListConvert("", list)
-                        }
-                        listLength := 0
-                        if list != nil {
-                                for _, v := range *list {
-                                        v["_id"] = encrypt.EncodeArticleId2ByCheck(v["_id"].(string))
-                                        delete(v, "s_subscopeclass")
-                                }
-                                listLength = len(*list)
-                        }
-                        return &entity.FuncResult{true, nil, map[string]interface{}{
-                                "isVip":        false,      //是否是vip用户
-                                "hasSubscribe": false,      //是否有订阅词
-                                "hasHistory":   false,      //是否有搜索历史
-                                "listLength":   listLength, //数据长度
-                                "list":         list,       //数据
-                                "history":      nil,        //历史数据
-                        }}
-                }()
-                if r.Err != nil {
-                        log.Printf("%s CreateOrder err:%v\n", userId, r.Err.Error())
-                }
-                //如果有数据,则缓存redis
-                if r.Success && qutil.IntAll(r.Data["listLength"]) > 0 {
-                        redis.Put("other", "p1_indexMessage_"+areaCity, r.Data, 24*60*60)
-                }
-                result := r.Format()
-                this.ServeJson(result)
-                return
-        }
+	areaCity := this.GetString("city")
+	nReq, _ := this.GetInteger("nReq")
+	userId := qutil.ObjToString(this.GetSession("userId"))
+	if userId != "" {
+		redisData := redis.Get("other", "p1_indexMessage_"+userId)
+		if redisData != nil {
+			result_, ok := redisData.(map[string]interface{})
+			if ok {
+				this.ServeJson(map[string]interface{}{
+					"success": true,
+					"errMsg":  "",
+					"data":    result_,
+				})
+				return
+			}
+		}
+		r := func() *entity.FuncResult {
+			//获取订阅信息
+			/*userMap, ok := util.MQFW.FindById("user", userId, `{"o_jy":1,"o_vipjy":1,"i_vip_status":1}`)
+			  if !ok || userMap == nil || len(*userMap) == 0 {
+			  	//查询出错
+			  	return &entity.FuncResult{false, errors.New("未查询到用户信息"), nil}
+			  }*/
+			//根据订阅词获取查询语句
+			userMap := jy.GetBigVipUserBaseMsg(this.Session(), *config.Middleground)
+			vipStatus := userMap.Data.Vip.Status
+			//vip用户
+			if vipStatus > 0 {
+				o_msgset := jy.GetSubScribeInfo(this.Session(), util.MQFW, "v", "10000")
+				vip_items, ok := (*o_msgset)["a_items"].([]interface{})
+				//vip查询推送历史
+				result := getPushHistory(userId)
+				return &entity.FuncResult{true, nil, map[string]interface{}{
+					"isVip":        true,                     //是否是vip用户
+					"hasSubscribe": ok && len(vip_items) > 0, //是否有订阅词
+					"listLength":   len(result),              //数据长度
+					"list":         result,                   //数据
+				}}
+			}
+			//普通用户用户
+			o_msgset := jy.GetSubScribeInfo(this.Session(), util.MQFW, "f", "10000")
+			items, ok := (*o_msgset)["a_key"].([]interface{})
+			if ok && len(items) > 0 {
+				//普通用户查询推送历史
+				result := getPushHistory(userId)
+				return &entity.FuncResult{true, nil, map[string]interface{}{
+					"isVip":        false,                //是否是vip用户
+					"hasSubscribe": ok && len(items) > 0, //是否有订阅词
+					"listLength":   len(result),          //数据长度
+					"list":         result,               //数据
+				}}
+			}
+			//普通用户无订阅词
+			var history []string
+			var _history []string
+			h := redis.GetStr("other", "s_"+userId) //用户所有的搜索历史
+			if h != "" {
+				history = strings.Split(h, ",")
+				_history = strings.Split(h, ",")
+				for k, v := range _history {
+					//默认关键词不超过35个字符
+					b_word, _, _ := jy.InterceptSearchKW(v, qutil.IntAllDef(config.Config.KeywordsLimit, 35), true)
+					if b_word == "" {
+						_history = append(_history[:k], _history[k+1:]...)
+					}
+				}
+			}
+			var list *[]map[string]interface{}
+			if nReq == 2 || len(_history) > 0 { //根据定位请求数据
+				doSearchStr := getSimpleSql(areaCity, _history)
+				list = elastic.Get(search_index, search_type, doSearchStr)
+				util.BidListConvert("", list)
+			}
+			listLength := 0
+			if list != nil {
+				for _, v := range *list {
+					v["_id"] = encrypt.EncodeArticleId2ByCheck(v["_id"].(string))
+					delete(v, "s_subscopeclass")
+				}
+				listLength = len(*list)
+			}
+			return &entity.FuncResult{true, nil, map[string]interface{}{
+				"isVip":        false,            //是否是vip用户
+				"hasSubscribe": false,            //是否有订阅词
+				"hasHistory":   len(history) > 0, //是否有搜索历史
+				"listLength":   listLength,       //数据长度
+				"list":         list,             //数据
+				"history":      history,          //历史数据
+			}}
+		}()
+		result := r.Format()
+		if r.Err != nil {
+			log.Printf("%s CreateOrder err:%v\n", userId, r.Err.Error())
+		}
+		//如果有数据,则缓存redis
+		if r.Success && qutil.IntAll(r.Data["listLength"]) > 0 {
+			redis.Put("other", "p1_indexMessage_"+userId, r.Data, 24*60*60)
+		}
+		this.ServeJson(result)
+		return
+	} else {
+		redisData := redis.Get("other", "p1_indexMessage_"+areaCity)
+		if redisData != nil {
+			result_, ok := redisData.(map[string]interface{})
+			if ok {
+				this.ServeJson(map[string]interface{}{
+					"success": true,
+					"errMsg":  "",
+					"data":    result_,
+				})
+				return
+			}
+		}
+		r := func() *entity.FuncResult {
+			var list *[]map[string]interface{}
+			if nReq == 2 { //根据定位请求数据
+				doSearchStr := getSimpleSql(areaCity, nil)
+				list = elastic.Get(search_index, search_type, doSearchStr)
+				util.BidListConvert("", list)
+			}
+			listLength := 0
+			if list != nil {
+				for _, v := range *list {
+					v["_id"] = encrypt.EncodeArticleId2ByCheck(v["_id"].(string))
+					delete(v, "s_subscopeclass")
+				}
+				listLength = len(*list)
+			}
+			return &entity.FuncResult{true, nil, map[string]interface{}{
+				"isVip":        false,      //是否是vip用户
+				"hasSubscribe": false,      //是否有订阅词
+				"hasHistory":   false,      //是否有搜索历史
+				"listLength":   listLength, //数据长度
+				"list":         list,       //数据
+				"history":      nil,        //历史数据
+			}}
+		}()
+		if r.Err != nil {
+			log.Printf("%s CreateOrder err:%v\n", userId, r.Err.Error())
+		}
+		//如果有数据,则缓存redis
+		if r.Success && qutil.IntAll(r.Data["listLength"]) > 0 {
+			redis.Put("other", "p1_indexMessage_"+areaCity, r.Data, 24*60*60)
+		}
+		result := r.Format()
+		this.ServeJson(result)
+		return
+	}
 }
 
 //根据历史记录获取查询语句
 func getSimpleSql(city string, history []string) string {
-        var musts, bools []string
-        if len(history) > 0 {
-                for _, v := range history {
-                        keys := strings.Split(v, " ") //历史搜索 空格划分
-                        must_tmp := []string{}
-                        for _, key := range keys {
-                                must_tmp = append(must_tmp, fmt.Sprintf(multi_match, "\""+key+"\""))
-                        }
-                        bools = append(bools, fmt.Sprintf(query_bool_must_and, strings.Join(must_tmp, ","), ""))
-                }
+	var musts, bools []string
+	if len(history) > 0 {
+		for _, v := range history {
+			keys := strings.Split(v, " ") //历史搜索 空格划分
+			must_tmp := []string{}
+			for _, key := range keys {
+				must_tmp = append(must_tmp, fmt.Sprintf(multi_match, "\""+key+"\""))
+			}
+			bools = append(bools, fmt.Sprintf(query_bool_must_and, strings.Join(must_tmp, ","), ""))
+		}
 
-        }
-        if city != "" {
-                musts = append(musts, fmt.Sprintf(query_bool_must, "city", `"`+city+`"`))
-        }
-        return fmt.Sprintf(query, strings.Join(musts, ","), strings.Join(bools, ","))
+	}
+	if city != "" {
+		musts = append(musts, fmt.Sprintf(query_bool_must, "city", `"`+city+`"`))
+	}
+	return fmt.Sprintf(query, strings.Join(musts, ","), strings.Join(bools, ","))
 }
 
 //查询查询推送记录
 func getPushHistory(userId string) (result []*jy.SubPushList) {
-        if userId == "" {
-                return
-        }
-        subPush, err := jy.NewSubscribePush().GetSevenDayCache(userId)
-        if err != nil {
-                log.Println(userId, "GetSevenDayCache Error", err)
-        }
-        if err == nil && subPush != nil && len(subPush) > 0 {
-                result = subPush
-        } else {
-                findSQL := "select * from pushsubscribe where userid = '" + userId + "'  and date >= %d order by id desc limit 50"
-                list := util.PushMysql.SelectBySql(fmt.Sprintf(findSQL, time.Now().AddDate(0, 0, -7).Unix()))
-                if len(*list) > 0 {
-                        pushCas := jy.NewSubscribePush().GetJyPushs(*list)
-                        result = jy.NewSubscribePush().GetInfoByIds(util.Mgo_bidding, config.Config.Mongobidding.Collection, config.Config.Mongobidding.Collection_change, pushCas)
-                } else {
-                        result = []*jy.SubPushList{}
-                }
-                jy.NewSubscribePush().PutSevenDayCache(userId, result)
-        }
-        return
+	if userId == "" {
+		return
+	}
+	subPush, err := jy.NewSubscribePush().GetSevenDayCache(userId)
+	if err != nil {
+		log.Println(userId, "GetSevenDayCache Error", err)
+	}
+	if err == nil && subPush != nil && len(subPush) > 0 {
+		result = subPush
+	} else {
+		findSQL := "select * from pushsubscribe where userid = '" + userId + "'  and date >= %d order by id desc limit 50"
+		list := util.PushMysql.SelectBySql(fmt.Sprintf(findSQL, time.Now().AddDate(0, 0, -7).Unix()))
+		if len(*list) > 0 {
+			pushCas := jy.NewSubscribePush().GetJyPushs(*list)
+			result = jy.NewSubscribePush().GetInfoByIds(util.Mgo_bidding, config.Config.Mongobidding.Collection, config.Config.Mongobidding.Collection_change, pushCas)
+		} else {
+			result = []*jy.SubPushList{}
+		}
+		jy.NewSubscribePush().PutSevenDayCache(userId, result)
+	}
+	return
 }

+ 6 - 6
src/jfw/modules/subscribepay/src/service/orderDetails.go

@@ -1,8 +1,8 @@
 package service
 
 import (
-        "app.yhyue.com/moapp/jypkg/common/src/qfw/util/jy"
-        "encoding/json"
+	"app.yhyue.com/moapp/jypkg/common/src/qfw/util/jy"
+	"encoding/json"
 	"jy/src/jfw/modules/subscribepay/src/config"
 	"jy/src/jfw/modules/subscribepay/src/util"
 	"log"
@@ -125,10 +125,10 @@ func (o *OrderDetail) CommonDetail(bigm int, fields string) (data map[string]int
 							ojy := qutil.ObjToMap((*datas)["o_jy"])
 							data["i_pp_status"] = qutil.IntAllDef((*ojy)["i_ppstatus"], 0) //i_pp_status : -1 到期  0未购买 1已购买
 						}*/
-                                                          datas:=jy.GetBigVipUserBaseMsg("10000",o.Session(),config.Config.Etcd.Hosts,config.Config.Etcd.Key)
-                                                          data["i_vip_status"] =datas.Data.Vip.Status
-                                                          ojy := jy.GetSubScribeInfo(o.Session(),util.MQFW,"f","10000")
-                                                          data["i_pp_status"] = qutil.IntAllDef((*ojy)["i_ppstatus"], 0) //i_pp_status : -1 到期  0未购买 1已购买
+						datas := jy.GetBigVipUserBaseMsg(o.Session(), *config.Middleground)
+						data["i_vip_status"] = datas.Data.Vip.Status
+						ojy := jy.GetSubScribeInfo(o.Session(), util.MQFW, "f", "10000")
+						data["i_pp_status"] = qutil.IntAllDef((*ojy)["i_ppstatus"], 0) //i_pp_status : -1 到期  0未购买 1已购买
 					}
 				}
 				delete(data, "_id")

Rozdielové dáta súboru neboli zobrazené, pretože súbor je príliš veľký
+ 883 - 883
src/jfw/modules/subscribepay/src/service/orderListDetails.go


+ 160 - 160
src/jfw/modules/subscribepay/src/service/resourcePack.go

@@ -1,42 +1,42 @@
 package service
 
 import (
-        "encoding/json"
-        "fmt"
-        "jy/src/jfw/modules/subscribepay/src/config"
-        "jy/src/jfw/modules/subscribepay/src/entity"
-        "jy/src/jfw/modules/subscribepay/src/pay"
-        "jy/src/jfw/modules/subscribepay/src/util"
-        "log"
-        "strconv"
-        "time"
+	"encoding/json"
+	"fmt"
+	"jy/src/jfw/modules/subscribepay/src/config"
+	"jy/src/jfw/modules/subscribepay/src/entity"
+	"jy/src/jfw/modules/subscribepay/src/pay"
+	"jy/src/jfw/modules/subscribepay/src/util"
+	"log"
+	"strconv"
+	"time"
 
-        . "app.yhyue.com/moapp/jybase/api"
-        qu "app.yhyue.com/moapp/jybase/common"
-        . "app.yhyue.com/moapp/jybase/date"
-        "app.yhyue.com/moapp/jybase/go-xweb/xweb"
-        "app.yhyue.com/moapp/jypkg/common/src/qfw/util/jy"
+	. "app.yhyue.com/moapp/jybase/api"
+	qu "app.yhyue.com/moapp/jybase/common"
+	. "app.yhyue.com/moapp/jybase/date"
+	"app.yhyue.com/moapp/jybase/go-xweb/xweb"
+	"app.yhyue.com/moapp/jypkg/common/src/qfw/util/jy"
 )
 
 //资源包相关(数据流量包,附件下载包,采购单位流量包...)
 
 type ResourcePack struct {
-        *xweb.Action
-        price       xweb.Mapper `xweb:"/resourcePack/price"`       //价格
-        createOrder xweb.Mapper `xweb:"/resourcePack/createOrder"` //线上自助数据包充值-创建订单
-        account     xweb.Mapper `xweb:"/resourcePack/account"`     //个人账户
-        recordList  xweb.Mapper `xweb:"/resourcePack/recordList"`  //“资源包”使用记录
-        consumePack xweb.Mapper `xweb:"/resourcePack/consumePack"` //“资源包”消费
+	*xweb.Action
+	price       xweb.Mapper `xweb:"/resourcePack/price"`       //价格
+	createOrder xweb.Mapper `xweb:"/resourcePack/createOrder"` //线上自助数据包充值-创建订单
+	account     xweb.Mapper `xweb:"/resourcePack/account"`     //个人账户
+	recordList  xweb.Mapper `xweb:"/resourcePack/recordList"`  //“资源包”使用记录
+	consumePack xweb.Mapper `xweb:"/resourcePack/consumePack"` //“资源包”消费
 }
 
 const (
-        METHOD = "POST"
+	METHOD = "POST"
 )
 
 type OrderResult struct {
-        Status    int    `json:"status"`     //返回状态 0失败 1成功
-        OrderCode string `json:"order_code"` //订单编号
-        Msg       string `json:"msg"`        //消息
+	Status    int    `json:"status"`     //返回状态 0失败 1成功
+	OrderCode string `json:"order_code"` //订单编号
+	Msg       string `json:"msg"`        //消息
 }
 
 // CreateOrder 资源中心流量包创建订单接口
@@ -45,103 +45,103 @@ type OrderResult struct {
 // @Success"{"status":1,"order_code":123456789,"msg":"创建成功"}"
 // @Router /jypay/ResourcePack/createOrder [post]
 func (this *ResourcePack) CreateOrder() {
-        defer qu.Catch()
-        if this.Method() != METHOD {
-                this.ServeJson(OrderResult{Msg: "请求方式有误"})
-                return
-        }
-        openId, _ := this.GetSession("s_m_openid").(string)
-        nickname, _ := this.GetSession("s_nickname").(string)
-        userId, _ := this.GetSession("userId").(string)
-        if userId == "" {
-                this.ServeJson(OrderResult{Msg: "未登录"})
-                return
-        }
-        infoMap := map[string]interface{}{}
-        if string(this.Body()) == "" {
-                this.ServeJson(OrderResult{Msg: "参数错误"})
-                return
-        }
-        body := xweb.FilterXSS(string(this.Body()))
-        //接收参数
-        json.Unmarshal([]byte(body), &infoMap)
-        if len(infoMap) == 0 {
-                this.ServeJson(OrderResult{Msg: "参数错误"})
-                return
-        }
-        //产品类型
-        product, _ := infoMap["product"].(string)
-        if config.ResConf.Product[product] == "" {
-                this.ServeJson(OrderResult{Msg: "请求产品类型有误"})
-                return
-        }
-        //
-        data, _ := infoMap["data"].(map[string]interface{})
-        if len(data) <= 0 {
-                this.ServeJson(OrderResult{Msg: "参数错误"})
-                return
-        }
-        lotteryId := qu.ObjToString(infoMap["lotteryId"])
-        discountId := qu.ObjToString(infoMap["discountId"])
-        i_discountId, _ := strconv.Atoi(discountId)
-        filter, msg := entity.JyresoucePack.Filter(product, userId, lotteryId, discountId, data, this.Session())
-        //错误信息
-        if msg != "" {
-                this.ServeJson(OrderResult{Msg: msg})
-                return
-        }
-        //生成订单号
-        orderCode := pay.GetOrderCode(userId)
-        order_phone := qu.ObjToString(infoMap["order_phone"])
-        now := time.Now()
-        filterStr, _ := json.Marshal(filter.Filter)
-        distributionChannel, orderChannel := util.GetJyOrderChannel("", this.Header("User-Agent"))
-        entId := qu.Int64All(this.GetSession("entId"))
-        buy_subject := 1
-        if entId > 0 {
-                buy_subject = 2
-        }
-        orderid := util.Mysql.Insert("dataexport_order", map[string]interface{}{
-                "order_money":          filter.OrderMoney,
-                "order_status":         0,
-                "service_status":       0,
-                "user_nickname":        nickname,
-                "user_openid":          openId,
-                "user_phone":           order_phone,
-                "order_code":           orderCode,
-                "product_type":         config.ResConf.Product[product],
-                "create_time":          FormatDate(&now, Date_Full_Layout),
-                "original_price":       filter.Price,
-                "filter":               string(filterStr),
-                "user_id":              userId, //20190719 移动端数据导出 生订单添加用户id
-                "discount_price":       filter.DiscountPrice,
-                "d_relation_id":        filter.UserLotteryId,
-                "distribution_channel": distributionChannel, //销售渠道
-                "order_channel":        orderChannel,        //下单渠道
-                "audit_status":         3,                   //默认审核通过
-                "buy_subject":          buy_subject,
-                "ent_id":               entId,
-        })
-        if orderid <= 0 {
-                this.ServeJson(OrderResult{Msg: "创建订单异常"})
-                return
-        }
-        //绑定核销卡券
-        if filter.UserLotteryId != "" && lotteryId != "" {
-                go func(userId, userLotteryId, orderCode string, i_discountId int) {
-                        phone, nickname := util.GetMyPhoneAndName(userId)
-                        if !util.UpdateCouponState(userId, userLotteryId, nickname, phone, orderCode, config.ResConf.Product[product], strconv.Itoa(i_discountId), 3, 0) {
-                                log.Println(fmt.Sprintf("单号%s-绑定失败-卡卷%s", orderCode, userLotteryId))
-                        }
-                        if i_discountId > 0 {
-                                if ulid := util.FindUserLotteryId(userId, orderid, i_discountId); ulid != 0 {
-                                        userLotteryId = strconv.Itoa(ulid)
-                                }
-                        }
-                }(userId, filter.UserLotteryId, orderCode, i_discountId)
-        }
-        this.ServeJson(OrderResult{OrderCode: orderCode, Status: 1})
-        return
+	defer qu.Catch()
+	if this.Method() != METHOD {
+		this.ServeJson(OrderResult{Msg: "请求方式有误"})
+		return
+	}
+	openId, _ := this.GetSession("s_m_openid").(string)
+	nickname, _ := this.GetSession("s_nickname").(string)
+	userId, _ := this.GetSession("userId").(string)
+	if userId == "" {
+		this.ServeJson(OrderResult{Msg: "未登录"})
+		return
+	}
+	infoMap := map[string]interface{}{}
+	if string(this.Body()) == "" {
+		this.ServeJson(OrderResult{Msg: "参数错误"})
+		return
+	}
+	body := xweb.FilterXSS(string(this.Body()))
+	//接收参数
+	json.Unmarshal([]byte(body), &infoMap)
+	if len(infoMap) == 0 {
+		this.ServeJson(OrderResult{Msg: "参数错误"})
+		return
+	}
+	//产品类型
+	product, _ := infoMap["product"].(string)
+	if config.ResConf.Product[product] == "" {
+		this.ServeJson(OrderResult{Msg: "请求产品类型有误"})
+		return
+	}
+	//
+	data, _ := infoMap["data"].(map[string]interface{})
+	if len(data) <= 0 {
+		this.ServeJson(OrderResult{Msg: "参数错误"})
+		return
+	}
+	lotteryId := qu.ObjToString(infoMap["lotteryId"])
+	discountId := qu.ObjToString(infoMap["discountId"])
+	i_discountId, _ := strconv.Atoi(discountId)
+	filter, msg := entity.JyresoucePack.Filter(product, userId, lotteryId, discountId, data, this.Session())
+	//错误信息
+	if msg != "" {
+		this.ServeJson(OrderResult{Msg: msg})
+		return
+	}
+	//生成订单号
+	orderCode := pay.GetOrderCode(userId)
+	order_phone := qu.ObjToString(infoMap["order_phone"])
+	now := time.Now()
+	filterStr, _ := json.Marshal(filter.Filter)
+	distributionChannel, orderChannel := util.GetJyOrderChannel("", this.Header("User-Agent"))
+	entId := qu.Int64All(this.GetSession("entId"))
+	buy_subject := 1
+	if entId > 0 {
+		buy_subject = 2
+	}
+	orderid := util.Mysql.Insert("dataexport_order", map[string]interface{}{
+		"order_money":          filter.OrderMoney,
+		"order_status":         0,
+		"service_status":       0,
+		"user_nickname":        nickname,
+		"user_openid":          openId,
+		"user_phone":           order_phone,
+		"order_code":           orderCode,
+		"product_type":         config.ResConf.Product[product],
+		"create_time":          FormatDate(&now, Date_Full_Layout),
+		"original_price":       filter.Price,
+		"filter":               string(filterStr),
+		"user_id":              userId, //20190719 移动端数据导出 生订单添加用户id
+		"discount_price":       filter.DiscountPrice,
+		"d_relation_id":        filter.UserLotteryId,
+		"distribution_channel": distributionChannel, //销售渠道
+		"order_channel":        orderChannel,        //下单渠道
+		"audit_status":         3,                   //默认审核通过
+		"buy_subject":          buy_subject,
+		"ent_id":               entId,
+	})
+	if orderid <= 0 {
+		this.ServeJson(OrderResult{Msg: "创建订单异常"})
+		return
+	}
+	//绑定核销卡券
+	if filter.UserLotteryId != "" && lotteryId != "" {
+		go func(userId, userLotteryId, orderCode string, i_discountId int) {
+			phone, nickname := util.GetMyPhoneAndName(userId)
+			if !util.UpdateCouponState(userId, userLotteryId, nickname, phone, orderCode, config.ResConf.Product[product], strconv.Itoa(i_discountId), 3, 0) {
+				log.Println(fmt.Sprintf("单号%s-绑定失败-卡卷%s", orderCode, userLotteryId))
+			}
+			if i_discountId > 0 {
+				if ulid := util.FindUserLotteryId(userId, orderid, i_discountId); ulid != 0 {
+					userLotteryId = strconv.Itoa(ulid)
+				}
+			}
+		}(userId, filter.UserLotteryId, orderCode, i_discountId)
+	}
+	this.ServeJson(OrderResult{OrderCode: orderCode, Status: 1})
+	return
 
 }
 
@@ -151,46 +151,46 @@ func (this *ResourcePack) CreateOrder() {
 // @Success"{"status":1,"order_code":123456789,"msg":"创建成功"}"
 // @Router /jypay/resourcePack/account [post]
 func (this *ResourcePack) Account() {
-        defer qu.Catch()
-        if this.Method() != METHOD {
-                this.ServeJson(Result{Error_msg: "请求方式有误"})
-                return
-        }
-        userId, _ := this.GetSession("userId").(string)
-        if userId == "" {
-                this.ServeJson(Result{Error_msg: "未登录"})
-                return
-        }
-        product := this.GetString("product")
-        if config.ResConf.Product[product] == "" {
-                this.ServeJson(Result{Error_msg: "参数错误"})
-                return
-        }
-        vipMsg := jy.GetBigVipUserBaseMsg("10000", this.Session(), config.Config.Etcd.Hosts, config.Config.Etcd.Key)
-        if vipMsg.VipStatus <= 0 {
-                this.ServeJson(Result{Error_msg: "无权限,请联系管理员"})
-                return
-        }
-        dbs := &entity.FindBalanceStruct{
-                AccountId:    userId,
-                ResourceType: config.ResConf.Product[product],
-        }
-        data, err := dbs.FindBalance()
-        if err != nil {
-                this.ServeJson(Result{Error_msg: "获取失败"})
-                return
-        }
-        this.ServeJson(Result{Data: data})
+	defer qu.Catch()
+	if this.Method() != METHOD {
+		this.ServeJson(Result{Error_msg: "请求方式有误"})
+		return
+	}
+	userId, _ := this.GetSession("userId").(string)
+	if userId == "" {
+		this.ServeJson(Result{Error_msg: "未登录"})
+		return
+	}
+	product := this.GetString("product")
+	if config.ResConf.Product[product] == "" {
+		this.ServeJson(Result{Error_msg: "参数错误"})
+		return
+	}
+	vipMsg := jy.GetBigVipUserBaseMsg(this.Session(), *config.Middleground)
+	if vipMsg.VipStatus <= 0 {
+		this.ServeJson(Result{Error_msg: "无权限,请联系管理员"})
+		return
+	}
+	dbs := &entity.FindBalanceStruct{
+		AccountId:    userId,
+		ResourceType: config.ResConf.Product[product],
+	}
+	data, err := dbs.FindBalance()
+	if err != nil {
+		this.ServeJson(Result{Error_msg: "获取失败"})
+		return
+	}
+	this.ServeJson(Result{Data: data})
 }
 
 func (this *ResourcePack) Price() {
-        product := this.GetString("product")
-        switch product {
-        case "attachmentDownPack":
-                this.ServeJson(Result{Data: config.ResConf.AttachmentDownPackPrice})
-        case "buyerPortraitPack":
-                this.ServeJson(Result{Data: config.ResConf.BuyerPortraitPackPrice})
-                return
-        }
-        this.ServeJson(Result{Error_msg: "参数错误"})
+	product := this.GetString("product")
+	switch product {
+	case "attachmentDownPack":
+		this.ServeJson(Result{Data: config.ResConf.AttachmentDownPackPrice})
+	case "buyerPortraitPack":
+		this.ServeJson(Result{Data: config.ResConf.BuyerPortraitPackPrice})
+		return
+	}
+	this.ServeJson(Result{Error_msg: "参数错误"})
 }

+ 541 - 541
src/jfw/modules/subscribepay/src/service/salesCreateOrder.go

@@ -1,606 +1,606 @@
 package service
 
 import (
-        . "app.yhyue.com/moapp/jybase/api"
-        qutil "app.yhyue.com/moapp/jybase/common"
-        . "app.yhyue.com/moapp/jybase/date"
-        "app.yhyue.com/moapp/jybase/go-xweb/xweb"
-        "app.yhyue.com/moapp/jybase/redis"
-        "app.yhyue.com/moapp/jypkg/common/src/qfw/util/jy"
-        "encoding/base64"
-        "encoding/json"
-        "errors"
-        "fmt"
-        "github.com/SKatiyar/qr"
-        "go.mongodb.org/mongo-driver/bson"
-        "go.mongodb.org/mongo-driver/bson/primitive"
-        "jy/src/jfw/modules/subscribepay/src/config"
-        "jy/src/jfw/modules/subscribepay/src/entity"
-        "jy/src/jfw/modules/subscribepay/src/pay"
-        "jy/src/jfw/modules/subscribepay/src/util"
-        "log"
-        "net/url"
-        "strconv"
-        "time"
+	. "app.yhyue.com/moapp/jybase/api"
+	qutil "app.yhyue.com/moapp/jybase/common"
+	. "app.yhyue.com/moapp/jybase/date"
+	"app.yhyue.com/moapp/jybase/go-xweb/xweb"
+	"app.yhyue.com/moapp/jybase/redis"
+	"app.yhyue.com/moapp/jypkg/common/src/qfw/util/jy"
+	"encoding/base64"
+	"encoding/json"
+	"errors"
+	"fmt"
+	"github.com/SKatiyar/qr"
+	"go.mongodb.org/mongo-driver/bson"
+	"go.mongodb.org/mongo-driver/bson/primitive"
+	"jy/src/jfw/modules/subscribepay/src/config"
+	"jy/src/jfw/modules/subscribepay/src/entity"
+	"jy/src/jfw/modules/subscribepay/src/pay"
+	"jy/src/jfw/modules/subscribepay/src/util"
+	"log"
+	"net/url"
+	"strconv"
+	"time"
 )
 
 type SalesCreateOrder struct {
-        *xweb.Action
-        createBySeller    xweb.Mapper `xweb:"/free/seller/createOrder"`           //销售代用户下单-创建订单
-        wxPaymentPage     xweb.Mapper `xweb:"/free/seller/wxPaymentPage"`         //销售代用户下单-无身份微信订单页面
-        getOrderPayAllMsg xweb.Mapper `xweb:"/free/seller/getOrderPayAllMsg"`     //销售代用户下单-获取订单详情
-        getCommonPayParam xweb.Mapper `xweb:"/free/seller/getCommonPayParam"`     //销售代用户下单-获取支付参数
-        isPaySuccess      xweb.Mapper `xweb:"/free/seller/isPaySuccess"`          //销售代用户下单-是否支付成功
-        getSubBuyMsg      xweb.Mapper `xweb:"/free/seller/svip/getSubBuyMsg"`     //超级订阅-获取已购买信息
-        getPrice          xweb.Mapper `xweb:"/free/seller/svip/getPrice"`         //超级订阅-获取超级订阅价格
-        getSelectPrice    xweb.Mapper `xweb:"/free/seller/svip/getSelectPrice"`   //超级订阅-获取选择价格
-        getValuationList  xweb.Mapper `xweb:"/free/seller/svip/getValuationList"` //超级订阅-计价清单
+	*xweb.Action
+	createBySeller    xweb.Mapper `xweb:"/free/seller/createOrder"`           //销售代用户下单-创建订单
+	wxPaymentPage     xweb.Mapper `xweb:"/free/seller/wxPaymentPage"`         //销售代用户下单-无身份微信订单页面
+	getOrderPayAllMsg xweb.Mapper `xweb:"/free/seller/getOrderPayAllMsg"`     //销售代用户下单-获取订单详情
+	getCommonPayParam xweb.Mapper `xweb:"/free/seller/getCommonPayParam"`     //销售代用户下单-获取支付参数
+	isPaySuccess      xweb.Mapper `xweb:"/free/seller/isPaySuccess"`          //销售代用户下单-是否支付成功
+	getSubBuyMsg      xweb.Mapper `xweb:"/free/seller/svip/getSubBuyMsg"`     //超级订阅-获取已购买信息
+	getPrice          xweb.Mapper `xweb:"/free/seller/svip/getPrice"`         //超级订阅-获取超级订阅价格
+	getSelectPrice    xweb.Mapper `xweb:"/free/seller/svip/getSelectPrice"`   //超级订阅-获取选择价格
+	getValuationList  xweb.Mapper `xweb:"/free/seller/svip/getValuationList"` //超级订阅-计价清单
 
-        //tokenShow xweb.Mapper `xweb:"/free/seller/tokenShow"` //超级订阅-获取选择价格
+	//tokenShow xweb.Mapper `xweb:"/free/seller/tokenShow"` //超级订阅-获取选择价格
 }
 
 func (this *SalesCreateOrder) TokenShow() {
-        vmap := map[string]interface{}{}
-        for key := range this.Request.Form {
-                value := this.Request.Form.Get(key)
-                if key != "token" {
-                        vmap[key] = value
-                } else {
-                        userid, sellPName, sellPid, sellData, err := util.SellerTokenDecrypt(value)
-                        if err != nil {
-                                vmap[key] = err.Error()
-                                continue
-                        }
-                        vmap[key] = map[string]interface{}{
-                                "userid":    userid,
-                                "sellPName": sellPName,
-                                "sellPid":   sellPid,
-                                "sellData":  sellData,
-                        }
-                }
-        }
-        this.ServeJson(vmap)
+	vmap := map[string]interface{}{}
+	for key := range this.Request.Form {
+		value := this.Request.Form.Get(key)
+		if key != "token" {
+			vmap[key] = value
+		} else {
+			userid, sellPName, sellPid, sellData, err := util.SellerTokenDecrypt(value)
+			if err != nil {
+				vmap[key] = err.Error()
+				continue
+			}
+			vmap[key] = map[string]interface{}{
+				"userid":    userid,
+				"sellPName": sellPName,
+				"sellPid":   sellPid,
+				"sellData":  sellData,
+			}
+		}
+	}
+	this.ServeJson(vmap)
 }
 
 // CreateBySeller 销售为用户创建订单
 // 逻辑和Createorder 一致
 // 无用户身份,额外赠送
 func (this *SalesCreateOrder) CreateBySeller() {
-        var userid string
-        rData, errMsg := func() (interface{}, error) {
-                //参数接收
-                infoMap := map[string]interface{}{}
-                body := xweb.FilterXSS(string(this.Body()))
-                //接收参数
-                _ = json.Unmarshal([]byte(body), &infoMap)
-                if len(infoMap) == 0 {
-                        return nil, fmt.Errorf("无效参数")
-                }
-                //解密请求参数
-                userid, sellPName, sellPid, sellData, err := util.SellerTokenDecrypt(qutil.ObjToString(infoMap["token"]))
-                if err != nil {
-                        return nil, err
-                }
-                //产品类型
-                product, _ := infoMap["product"].(string)
-                if product != "VIP订阅" { //目前仅超级订阅
-                        return nil, fmt.Errorf("请求产品类型有误")
-                }
-                productId := strconv.Itoa(qutil.IntAll(infoMap["productId"]))
+	var userid string
+	rData, errMsg := func() (interface{}, error) {
+		//参数接收
+		infoMap := map[string]interface{}{}
+		body := xweb.FilterXSS(string(this.Body()))
+		//接收参数
+		_ = json.Unmarshal([]byte(body), &infoMap)
+		if len(infoMap) == 0 {
+			return nil, fmt.Errorf("无效参数")
+		}
+		//解密请求参数
+		userid, sellPName, sellPid, sellData, err := util.SellerTokenDecrypt(qutil.ObjToString(infoMap["token"]))
+		if err != nil {
+			return nil, err
+		}
+		//产品类型
+		product, _ := infoMap["product"].(string)
+		if product != "VIP订阅" { //目前仅超级订阅
+			return nil, fmt.Errorf("请求产品类型有误")
+		}
+		productId := strconv.Itoa(qutil.IntAll(infoMap["productId"]))
 
-                //
-                data, _ := infoMap["data"].(map[string]interface{})
-                if len(data) <= 0 {
-                        return nil, fmt.Errorf("无效参数")
-                }
+		//
+		data, _ := infoMap["data"].(map[string]interface{})
+		if len(data) <= 0 {
+			return nil, fmt.Errorf("无效参数")
+		}
 
-                //获取卡券相关
-                lotteryId := qutil.ObjToString(data["lotteryId"]) //卡卷信息的id
-                i_discountId := qutil.IntAll(data["discountId"])  //赠品相关
-                discountId := strconv.Itoa(i_discountId)
-                inserMap, msg := entity.JyCommonOrderStruct.InserMap(product, productId, userid, lotteryId, discountId, data, this.Session())
-                //错误信息
-                if msg != "" {
-                        return nil, fmt.Errorf(msg)
-                }
-                //销售额外赠送
-                if product == "VIP订阅" && len(sellData) > 0 {
-                        tt := qutil.IntAll(sellData["tt"])
-                        tn := qutil.IntAll(sellData["tn"])
-                        if inserMap.VipEndTime != "" {
-                                endTime, _ := time.ParseInLocation(Date_Full_Layout, inserMap.VipEndTime, time.Local)
-                                if tt == 1 {
-                                        endTime = endTime.AddDate(0, 0, tn)
-                                } else if tt == 2 {
-                                        endTime = endTime.AddDate(0, tn, 0)
-                                }
-                                inserMap.VipEndTime = endTime.Format(Date_Full_Layout)
-                        }
+		//获取卡券相关
+		lotteryId := qutil.ObjToString(data["lotteryId"]) //卡卷信息的id
+		i_discountId := qutil.IntAll(data["discountId"])  //赠品相关
+		discountId := strconv.Itoa(i_discountId)
+		inserMap, msg := entity.JyCommonOrderStruct.InserMap(product, productId, userid, lotteryId, discountId, data, this.Session())
+		//错误信息
+		if msg != "" {
+			return nil, fmt.Errorf(msg)
+		}
+		//销售额外赠送
+		if product == "VIP订阅" && len(sellData) > 0 {
+			tt := qutil.IntAll(sellData["tt"])
+			tn := qutil.IntAll(sellData["tn"])
+			if inserMap.VipEndTime != "" {
+				endTime, _ := time.ParseInLocation(Date_Full_Layout, inserMap.VipEndTime, time.Local)
+				if tt == 1 {
+					endTime = endTime.AddDate(0, 0, tn)
+				} else if tt == 2 {
+					endTime = endTime.AddDate(0, tn, 0)
+				}
+				inserMap.VipEndTime = endTime.Format(Date_Full_Layout)
+			}
 
-                        filterMap := map[string]interface{}{}
-                        if err := json.Unmarshal([]byte(inserMap.Filter), &filterMap); err != nil {
-                                return nil, fmt.Errorf("创建订单异常Unmarshal")
-                        }
+			filterMap := map[string]interface{}{}
+			if err := json.Unmarshal([]byte(inserMap.Filter), &filterMap); err != nil {
+				return nil, fmt.Errorf("创建订单异常Unmarshal")
+			}
 
-                        if inserMap.VipType != 2 {
-                                filterMap["seller_give_type"] = tt
-                                filterMap["seller_give_cycle"] = tn
-                        }
+			if inserMap.VipType != 2 {
+				filterMap["seller_give_type"] = tt
+				filterMap["seller_give_cycle"] = tn
+			}
 
-                        bb, err := json.Marshal(filterMap)
-                        if err != nil {
-                                return nil, fmt.Errorf("创建订单异常-Marshal")
-                        }
-                        inserMap.Filter = string(bb)
-                }
-                now := time.Now()
-                _, userErr := primitive.ObjectIDFromHex(userid)
-                buy_subject := 1
-                entId := 0
-                if userErr != nil {
-                        //雇员标识
-                        positionData := util.InfoMysql.FindOne("base_position", map[string]interface{}{"id": userid}, "ent_id", "")
-                        if positionData != nil {
-                                entId = qutil.IntAll((*positionData)["ent_id"])
-                        }
-                }
-                insertM := map[string]interface{}{
-                        "order_money":          inserMap.OrderMoney,
-                        "order_status":         inserMap.OrderStatus,
-                        "service_status":       inserMap.ServiceStatus,
-                        "user_phone":           inserMap.UserPhone,
-                        "order_code":           inserMap.OrderCode,
-                        "product_type":         product,
-                        "create_time":          FormatDate(&now, Date_Full_Layout),
-                        "original_price":       inserMap.OriginalPrice,
-                        "user_id":              userid,
-                        "filter":               inserMap.Filter,
-                        "discount_price":       inserMap.DiscountPrice,
-                        "d_relation_id":        inserMap.DrelationId,
-                        "data_spec":            inserMap.DataSpec,
-                        "user_mail":            inserMap.UserMail,
-                        "data_count":           inserMap.DataCount,
-                        "filter_publishtime":   inserMap.FilterPublishtime,
-                        "is_backstage_order":   0,
-                        "filter_keys":          inserMap.FilterKeys,
-                        "download_url":         inserMap.DownloadUrl,
-                        "dis_word":             inserMap.DisWord,
-                        "distribution_channel": "x020",
-                        "order_channel":        "xdqd04",  //下单渠道-启明星后台销售创建
-                        "salesperson":          sellPName, //销售人员
-                        "salesperson_id":       sellPid,   //销售人员id
-                        "audit_status":         3,         //默认审核通过
-                        "buy_subject":          buy_subject,
-                        "ent_id":               entId,
-                }
+			bb, err := json.Marshal(filterMap)
+			if err != nil {
+				return nil, fmt.Errorf("创建订单异常-Marshal")
+			}
+			inserMap.Filter = string(bb)
+		}
+		now := time.Now()
+		_, userErr := primitive.ObjectIDFromHex(userid)
+		buy_subject := 1
+		entId := 0
+		if userErr != nil {
+			//雇员标识
+			positionData := util.InfoMysql.FindOne("base_position", map[string]interface{}{"id": userid}, "ent_id", "")
+			if positionData != nil {
+				entId = qutil.IntAll((*positionData)["ent_id"])
+			}
+		}
+		insertM := map[string]interface{}{
+			"order_money":          inserMap.OrderMoney,
+			"order_status":         inserMap.OrderStatus,
+			"service_status":       inserMap.ServiceStatus,
+			"user_phone":           inserMap.UserPhone,
+			"order_code":           inserMap.OrderCode,
+			"product_type":         product,
+			"create_time":          FormatDate(&now, Date_Full_Layout),
+			"original_price":       inserMap.OriginalPrice,
+			"user_id":              userid,
+			"filter":               inserMap.Filter,
+			"discount_price":       inserMap.DiscountPrice,
+			"d_relation_id":        inserMap.DrelationId,
+			"data_spec":            inserMap.DataSpec,
+			"user_mail":            inserMap.UserMail,
+			"data_count":           inserMap.DataCount,
+			"filter_publishtime":   inserMap.FilterPublishtime,
+			"is_backstage_order":   0,
+			"filter_keys":          inserMap.FilterKeys,
+			"download_url":         inserMap.DownloadUrl,
+			"dis_word":             inserMap.DisWord,
+			"distribution_channel": "x020",
+			"order_channel":        "xdqd04",  //下单渠道-启明星后台销售创建
+			"salesperson":          sellPName, //销售人员
+			"salesperson_id":       sellPid,   //销售人员id
+			"audit_status":         3,         //默认审核通过
+			"buy_subject":          buy_subject,
+			"ent_id":               entId,
+		}
 
-                if inserMap.VipStartTime != "" && inserMap.VipEndTime != "" {
-                        insertM["vip_starttime"] = inserMap.VipStartTime
-                        insertM["vip_endtime"] = inserMap.VipEndTime
-                }
-                if inserMap.PrepayTime != "" {
-                        insertM["prepay_time"] = inserMap.PrepayTime
-                }
-                if inserMap.PayWay != "" {
-                        insertM["pay_way"] = inserMap.PayWay
-                }
-                if inserMap.PrepayId != "" {
-                        insertM["prepay_id"] = inserMap.PrepayId
-                }
-                if inserMap.FilterId != "" {
-                        insertM["filter_id"] = inserMap.FilterId
-                }
-                if inserMap.VipType != 0 {
-                        insertM["vip_type"] = inserMap.VipType
-                }
+		if inserMap.VipStartTime != "" && inserMap.VipEndTime != "" {
+			insertM["vip_starttime"] = inserMap.VipStartTime
+			insertM["vip_endtime"] = inserMap.VipEndTime
+		}
+		if inserMap.PrepayTime != "" {
+			insertM["prepay_time"] = inserMap.PrepayTime
+		}
+		if inserMap.PayWay != "" {
+			insertM["pay_way"] = inserMap.PayWay
+		}
+		if inserMap.PrepayId != "" {
+			insertM["prepay_id"] = inserMap.PrepayId
+		}
+		if inserMap.FilterId != "" {
+			insertM["filter_id"] = inserMap.FilterId
+		}
+		if inserMap.VipType != 0 {
+			insertM["vip_type"] = inserMap.VipType
+		}
 
-                orderid := util.Mysql.Insert("dataexport_order", insertM)
-                if orderid <= 0 {
-                        return nil, fmt.Errorf("创建订单异常")
-                }
-                //发送站内信
-                pcUrl := fmt.Sprintf(config.Config.WebSiteParameter.Link, inserMap.OrderCode)
-                appUrl := fmt.Sprintf(config.Config.WebSiteParameter.AndroidUrl, inserMap.OrderCode)
-                wxUrl := fmt.Sprintf(config.Config.WebSiteParameter.WeChatUrl, inserMap.OrderCode)
-                go util.SendStationMessages(config.Config.WebSiteParameter.Addr, userid, config.Config.WebSiteParameter.Action,
-                        "1", config.Config.WebSiteParameter.Title, config.Config.WebSiteParameter.Content,
-                        pcUrl, appUrl, appUrl, wxUrl, qutil.InterfaceToStr(orderid))
+		orderid := util.Mysql.Insert("dataexport_order", insertM)
+		if orderid <= 0 {
+			return nil, fmt.Errorf("创建订单异常")
+		}
+		//发送站内信
+		pcUrl := fmt.Sprintf(config.Config.WebSiteParameter.Link, inserMap.OrderCode)
+		appUrl := fmt.Sprintf(config.Config.WebSiteParameter.AndroidUrl, inserMap.OrderCode)
+		wxUrl := fmt.Sprintf(config.Config.WebSiteParameter.WeChatUrl, inserMap.OrderCode)
+		go util.SendStationMessages(config.Config.WebSiteParameter.Addr, userid, config.Config.WebSiteParameter.Action,
+			"1", config.Config.WebSiteParameter.Title, config.Config.WebSiteParameter.Content,
+			pcUrl, appUrl, appUrl, wxUrl, qutil.InterfaceToStr(orderid))
 
-                if i_discountId > 0 {
-                        go util.FindUserLotteryId(userid, orderid, i_discountId)
-                }
-                rdata := map[string]interface{}{"order_code": inserMap.OrderCode, "needPay": !inserMap.UnNeedPay}
-                return rdata, nil
-        }()
-        if errMsg != nil {
-                log.Printf("%s CreateBySeller 异常:%s\n", userid, errMsg.Error())
-        }
-        //创建完订单后更新卡券信息
-        this.ServeJson(NewResult(rData, errMsg))
+		if i_discountId > 0 {
+			go util.FindUserLotteryId(userid, orderid, i_discountId)
+		}
+		rdata := map[string]interface{}{"order_code": inserMap.OrderCode, "needPay": !inserMap.UnNeedPay}
+		return rdata, nil
+	}()
+	if errMsg != nil {
+		log.Printf("%s CreateBySeller 异常:%s\n", userid, errMsg.Error())
+	}
+	//创建完订单后更新卡券信息
+	this.ServeJson(NewResult(rData, errMsg))
 }
 
 // WxPaymentPage
 // 微信支付将openid添加至token
 // 并重定向至指定url
 func (this *SalesCreateOrder) WxPaymentPage() error {
-        stateKey := this.GetString("state")
-        if (this.GetString("href") == "" || this.GetString("token") == "") &&
-                stateKey == "" {
-                return this.WriteBytes([]byte("请求异常"))
-        }
-        param := this.Request.Form
-        if stateKey == "" { //公众号回调
-                stateKey = func() string {
-                        return fmt.Sprintf("%s_%s", time.Now().Format("20060102150405"), qutil.GetLetterRandom(5))
-                }()
-                redis.Put("other", stateKey, param, 60*5) //存储信息
-                return this.Redirect(fmt.Sprintf(config.Wxoauth, url.QueryEscape(this.Site()+this.Url()), stateKey), 302)
-        }
-        //获取wx跳转前参数
-        if redisValue := redis.Get("other", stateKey); redisValue != nil {
-                if t, ok := redisValue.(url.Values); ok {
-                        param = t
-                }
-        }
-        //获取用户openid
-        openid := util.Getopenid(this.GetString("code"))
-        if openid == "" {
-                return this.WriteBytes([]byte("获取用户身份异常"))
-        }
-        userid, sellPName, sellPid, sellData, err := util.SellerTokenDecrypt(param.Get("token"))
-        if err != nil {
-                return this.WriteBytes([]byte(err.Error()))
-        }
-        sellData["openid"] = openid
-        toHref := param.Get("href")
-        param.Set("token", util.GetSellerToken(userid, sellPName, sellPid, sellData)) //更新token
-        for _, key := range []string{"state", "code", "href"} {
-                param.Del(key)
-        }
-        return this.Redirect(toHref+"?"+param.Encode(), 302)
+	stateKey := this.GetString("state")
+	if (this.GetString("href") == "" || this.GetString("token") == "") &&
+		stateKey == "" {
+		return this.WriteBytes([]byte("请求异常"))
+	}
+	param := this.Request.Form
+	if stateKey == "" { //公众号回调
+		stateKey = func() string {
+			return fmt.Sprintf("%s_%s", time.Now().Format("20060102150405"), qutil.GetLetterRandom(5))
+		}()
+		redis.Put("other", stateKey, param, 60*5) //存储信息
+		return this.Redirect(fmt.Sprintf(config.Wxoauth, url.QueryEscape(this.Site()+this.Url()), stateKey), 302)
+	}
+	//获取wx跳转前参数
+	if redisValue := redis.Get("other", stateKey); redisValue != nil {
+		if t, ok := redisValue.(url.Values); ok {
+			param = t
+		}
+	}
+	//获取用户openid
+	openid := util.Getopenid(this.GetString("code"))
+	if openid == "" {
+		return this.WriteBytes([]byte("获取用户身份异常"))
+	}
+	userid, sellPName, sellPid, sellData, err := util.SellerTokenDecrypt(param.Get("token"))
+	if err != nil {
+		return this.WriteBytes([]byte(err.Error()))
+	}
+	sellData["openid"] = openid
+	toHref := param.Get("href")
+	param.Set("token", util.GetSellerToken(userid, sellPName, sellPid, sellData)) //更新token
+	for _, key := range []string{"state", "code", "href"} {
+		param.Del(key)
+	}
+	return this.Redirect(toHref+"?"+param.Encode(), 302)
 }
 
 // GetCommonPayParam 销售为用户创建订单
 // 逻辑和commonAction.go GetCommonPayParam 一致
 func (this *SalesCreateOrder) GetCommonPayParam() {
-        orderCode := this.GetString("orderCode")
-        //userId := qutil.ObjToString(this.GetSession("userId"))
-        payway_req := this.GetString("payway")
-        var userId string
-        r := func() *entity.FuncResult {
-                //解密请求参数
-                userId, _, _, desc, err := util.SellerTokenDecrypt(this.GetString("token"))
-                if err != nil {
-                        return &entity.FuncResult{false, err, nil}
-                }
-                query := map[string]interface{}{
-                        "user_id":       userId,
-                        "order_code":    orderCode,
-                        "order_channel": "xdqd04", //仅查询销售创建订单
-                        "order_status":  0,
-                }
-                oData := util.Mysql.FindOne("dataexport_order", query, "id,code_url,prepay_time,pay_way,order_money,product_type,out_trade_no,course_status", "")
-                if oData == nil || len(*oData) == 0 {
-                        return &entity.FuncResult{false, errors.New("未知订单"), nil}
-                }
-                //对公转账审核中
-                if qutil.IntAll((*oData)["course_status"]) == 2 || qutil.IntAll((*oData)["course_status"]) == 4 {
-                        return &entity.FuncResult{false, errors.New("转账审核中,请勿重复支付"), nil}
-                }
-                payParam := qutil.ObjToString((*oData)["code_url"])
-                payway := qutil.ObjToString((*oData)["pay_way"])
-                totalfee := qutil.IntAll((*oData)["order_money"])
-                //上次订单支付串是否可用
-                if prepayTime, err := time.ParseInLocation(Date_Full_Layout, qutil.ObjToString((*oData)["prepay_time"]), time.Local); err == nil && payParam != "" && payway != "wx_js" { //微信公众号支付需要openid,不通账户支付不能通用
-                        if time.Now().Before(prepayTime.Add(time.Hour * 2)) { //支付串未过期
-                                if payway == payway_req {
-                                        if payParam != "" {
-                                                return &entity.FuncResult{true, nil, map[string]interface{}{
-                                                        "orderCode": orderCode,
-                                                        "res":       payParam,
-                                                        "price":     totalfee,
-                                                        "timeout":   prepayTime.Unix() + 2*60*60 - time.Now().Unix(),
-                                                        "payWay":    payway}}
-                                        }
-                                } else {
-                                        //关闭之前支付串(防止重复支付)
-                                        if !pay.CloseOrder(qutil.ObjToString((*oData)["out_trade_no"]), payway) {
-                                                log.Printf("SalesCreateOrder GetCommonPayParam 关闭订单%s出错\n", orderCode)
-                                                return &entity.FuncResult{false, errors.New("支付方式切换异常"), nil}
-                                        }
-                                }
-                        }
-                }
-                openid := ""
-                if payway_req == "wx_js" {
-                        if openid, _ = desc["openid"].(string); openid == "" {
-                                return &entity.FuncResult{false, fmt.Errorf("微信支付缺少参数"), nil}
-                        }
-                } //重新生成支付串
-                productFlag, ok := pay.PayWayAndSign[qutil.ObjToString((*oData)["product_type"])][payway_req]
-                if !ok {
-                        return &entity.FuncResult{false, errors.New("未知支付类型:" + payway_req), nil}
-                }
-                tradeno, prepayid, payParam, err := pay.CreateOrderPay(totalfee, productFlag, this.IP(), openid, payway_req, orderCode)
-                if err != nil {
-                        return &entity.FuncResult{false, errors.New(fmt.Sprintf("创建支付失败[%v]", err)), nil}
-                }
-                //更新订单表
-                now := time.Now()
-                ok = util.Mysql.Update("dataexport_order", query, map[string]interface{}{
-                        "code_url":     payParam,
-                        "prepay_time":  FormatDate(&now, Date_Full_Layout),
-                        "out_trade_no": tradeno,
-                        "prepay_id":    prepayid,
-                        "pay_way":      payway_req,
-                })
-                if !ok {
-                        return &entity.FuncResult{false, errors.New("数据库操作异常"), nil}
-                }
-                return &entity.FuncResult{true, nil, map[string]interface{}{
-                        "orderCode": orderCode,
-                        "res":       payParam,
-                        "price":     totalfee,
-                        "timeout":   2 * 60 * 60,
-                        "payWay":    payway_req}}
-        }()
-        if r.Err != nil {
-                log.Printf("%s SalesCreateOrder GetCommonPayParam err:%v\n", userId, r.Err.Error())
-        }
-        if payway_req == "wx_pc" && r.Data["res"] != nil {
-                rEncode, _ := qr.Encode(qutil.ObjToString(r.Data["res"]), qr.M)
-                pngdat := rEncode.PNG()
-                r.Data["res"] = base64.StdEncoding.EncodeToString(pngdat)
-        }
-        this.ServeJson(r.Format())
+	orderCode := this.GetString("orderCode")
+	//userId := qutil.ObjToString(this.GetSession("userId"))
+	payway_req := this.GetString("payway")
+	var userId string
+	r := func() *entity.FuncResult {
+		//解密请求参数
+		userId, _, _, desc, err := util.SellerTokenDecrypt(this.GetString("token"))
+		if err != nil {
+			return &entity.FuncResult{false, err, nil}
+		}
+		query := map[string]interface{}{
+			"user_id":       userId,
+			"order_code":    orderCode,
+			"order_channel": "xdqd04", //仅查询销售创建订单
+			"order_status":  0,
+		}
+		oData := util.Mysql.FindOne("dataexport_order", query, "id,code_url,prepay_time,pay_way,order_money,product_type,out_trade_no,course_status", "")
+		if oData == nil || len(*oData) == 0 {
+			return &entity.FuncResult{false, errors.New("未知订单"), nil}
+		}
+		//对公转账审核中
+		if qutil.IntAll((*oData)["course_status"]) == 2 || qutil.IntAll((*oData)["course_status"]) == 4 {
+			return &entity.FuncResult{false, errors.New("转账审核中,请勿重复支付"), nil}
+		}
+		payParam := qutil.ObjToString((*oData)["code_url"])
+		payway := qutil.ObjToString((*oData)["pay_way"])
+		totalfee := qutil.IntAll((*oData)["order_money"])
+		//上次订单支付串是否可用
+		if prepayTime, err := time.ParseInLocation(Date_Full_Layout, qutil.ObjToString((*oData)["prepay_time"]), time.Local); err == nil && payParam != "" && payway != "wx_js" { //微信公众号支付需要openid,不通账户支付不能通用
+			if time.Now().Before(prepayTime.Add(time.Hour * 2)) { //支付串未过期
+				if payway == payway_req {
+					if payParam != "" {
+						return &entity.FuncResult{true, nil, map[string]interface{}{
+							"orderCode": orderCode,
+							"res":       payParam,
+							"price":     totalfee,
+							"timeout":   prepayTime.Unix() + 2*60*60 - time.Now().Unix(),
+							"payWay":    payway}}
+					}
+				} else {
+					//关闭之前支付串(防止重复支付)
+					if !pay.CloseOrder(qutil.ObjToString((*oData)["out_trade_no"]), payway) {
+						log.Printf("SalesCreateOrder GetCommonPayParam 关闭订单%s出错\n", orderCode)
+						return &entity.FuncResult{false, errors.New("支付方式切换异常"), nil}
+					}
+				}
+			}
+		}
+		openid := ""
+		if payway_req == "wx_js" {
+			if openid, _ = desc["openid"].(string); openid == "" {
+				return &entity.FuncResult{false, fmt.Errorf("微信支付缺少参数"), nil}
+			}
+		} //重新生成支付串
+		productFlag, ok := pay.PayWayAndSign[qutil.ObjToString((*oData)["product_type"])][payway_req]
+		if !ok {
+			return &entity.FuncResult{false, errors.New("未知支付类型:" + payway_req), nil}
+		}
+		tradeno, prepayid, payParam, err := pay.CreateOrderPay(totalfee, productFlag, this.IP(), openid, payway_req, orderCode)
+		if err != nil {
+			return &entity.FuncResult{false, errors.New(fmt.Sprintf("创建支付失败[%v]", err)), nil}
+		}
+		//更新订单表
+		now := time.Now()
+		ok = util.Mysql.Update("dataexport_order", query, map[string]interface{}{
+			"code_url":     payParam,
+			"prepay_time":  FormatDate(&now, Date_Full_Layout),
+			"out_trade_no": tradeno,
+			"prepay_id":    prepayid,
+			"pay_way":      payway_req,
+		})
+		if !ok {
+			return &entity.FuncResult{false, errors.New("数据库操作异常"), nil}
+		}
+		return &entity.FuncResult{true, nil, map[string]interface{}{
+			"orderCode": orderCode,
+			"res":       payParam,
+			"price":     totalfee,
+			"timeout":   2 * 60 * 60,
+			"payWay":    payway_req}}
+	}()
+	if r.Err != nil {
+		log.Printf("%s SalesCreateOrder GetCommonPayParam err:%v\n", userId, r.Err.Error())
+	}
+	if payway_req == "wx_pc" && r.Data["res"] != nil {
+		rEncode, _ := qr.Encode(qutil.ObjToString(r.Data["res"]), qr.M)
+		pngdat := rEncode.PNG()
+		r.Data["res"] = base64.StdEncoding.EncodeToString(pngdat)
+	}
+	this.ServeJson(r.Format())
 }
 
 func (this *SalesCreateOrder) IsPaySuccess() {
-        defer qutil.Catch()
-        var userId string
-        rMap, err := func() (rData map[string]interface{}, err error) {
-                code := this.GetString("code")
-                userId, _, _, _, err = util.SellerTokenDecrypt(this.GetString("token"))
-                if err != nil {
-                        return nil, err
-                }
-                if code != "" && userId != "" {
-                        data := util.Mysql.FindOne("dataexport_order", map[string]interface{}{
-                                "order_code":    code,
-                                "user_id":       userId,
-                                "order_channel": "xdqd04",
-                        }, "order_status,pay_time,user_mail,pay_way,pay_money,filter", "")
-                        if data != nil && qutil.IntAll((*data)["order_status"]) == 1 {
-                                t, _ := time.ParseInLocation(Date_Full_Layout, qutil.ObjToString((*data)["pay_time"]), time.Local)
-                                return map[string]interface{}{
-                                        "success":   true,
-                                        "email":     qutil.ObjToString((*data)["user_mail"]),
-                                        "payTime":   t.Unix(),
-                                        "pay_way":   (*data)["pay_way"],
-                                        "price":     (*data)["pay_money"],
-                                        "filter":    (*data)["filter"],
-                                        "orderCode": code,
-                                }, nil
-                        }
-                }
-                rData["success"] = false
-                return
-        }()
-        if err != nil {
-                log.Printf("%s SalesCreateOrder IsPaySuccess err:%v\n", userId, err.Error())
-        }
-        this.ServeJson(rMap)
+	defer qutil.Catch()
+	var userId string
+	rMap, err := func() (rData map[string]interface{}, err error) {
+		code := this.GetString("code")
+		userId, _, _, _, err = util.SellerTokenDecrypt(this.GetString("token"))
+		if err != nil {
+			return nil, err
+		}
+		if code != "" && userId != "" {
+			data := util.Mysql.FindOne("dataexport_order", map[string]interface{}{
+				"order_code":    code,
+				"user_id":       userId,
+				"order_channel": "xdqd04",
+			}, "order_status,pay_time,user_mail,pay_way,pay_money,filter", "")
+			if data != nil && qutil.IntAll((*data)["order_status"]) == 1 {
+				t, _ := time.ParseInLocation(Date_Full_Layout, qutil.ObjToString((*data)["pay_time"]), time.Local)
+				return map[string]interface{}{
+					"success":   true,
+					"email":     qutil.ObjToString((*data)["user_mail"]),
+					"payTime":   t.Unix(),
+					"pay_way":   (*data)["pay_way"],
+					"price":     (*data)["pay_money"],
+					"filter":    (*data)["filter"],
+					"orderCode": code,
+				}, nil
+			}
+		}
+		rData["success"] = false
+		return
+	}()
+	if err != nil {
+		log.Printf("%s SalesCreateOrder IsPaySuccess err:%v\n", userId, err.Error())
+	}
+	this.ServeJson(rMap)
 }
 
 // GetSubBuyMsg 获取购买订阅相关信息
 // 逻辑和vipSubscribeChange.go getSubBuyMsg 一致
 func (this *SalesCreateOrder) GetSubBuyMsg() {
-        var userId string
-        r := func() *entity.FuncResult {
-                userId, _, _, _, err := util.SellerTokenDecrypt(this.GetString("token"))
-                ent_id := qutil.IntAll(this.GetSession("entId"))
-                entUserId := qutil.IntAll(this.GetSession("entUserId"))
-                if err != nil {
-                        return &entity.FuncResult{false, err, nil}
-                }
-                rData, buyset, vip := entity.JyVipSubStruct.GetVipDetail(userId)
-                if rData == nil || len(*rData) == 0 {
-                        return &entity.FuncResult{false, errors.New("获取信息失败"), nil}
-                }
-                var isread = false
-                if (*rData)["isread"] != nil {
-                        isread = (*rData)["isread"].(bool)
-                }
-                o_vipjy := &map[string]interface{}{}
-                //判断版本是企业的还是个人的
-                infoCount := util.Mysql.CountBySql("select  count(id) from  entniche_wait_empower where  ent_id=? and  end_time>NOW() and  product_type like '%VIP订阅%' ", ent_id)
-                if infoCount > 0 {
-                        query := map[string]interface{}{
-                                "i_userid": entUserId,
-                                "i_entid":  ent_id,
-                                "i_type":   1,
-                        }
-                        res, _ := util.MQFW.FindOne("entniche_rule", query)
-                        if res != nil && len(*res) > 0 {
-                                o_vipjy = qutil.ObjToMap((*res)["o_entniche"])
-                        }
-                } else {
-                        o_vipjy = qutil.ObjToMap((*rData)["o_vipjy"])
-                }
-                vipStatus := qutil.IntAll((*rData)["i_vip_status"])
-                var renewList *[]map[string]interface{}
-                if vipStatus == 2 { //查询是否有未执行的续费订单
-                        renewList, _ = util.MQFW.Find("vip_upgrade", &bson.M{"s_userid": userId, "i_isvalid": 0}, `{"l_validtime":1}`, `{"o_buyset":1,"l_validtime":1}`, false, -1, -1)
-                        for i := 0; i < len(*renewList); i++ {
-                                delete((*renewList)[i], "_id")
-                        }
-                }
-                bigPower := jy.GetBigVipUserBaseMsg("10000", this.Session(), config.Config.Etcd.Hosts, config.Config.Etcd.Key)
-                return &entity.FuncResult{true, nil, map[string]interface{}{
-                        "isTrial":         vipStatus == 1,
-                        "area":            (*o_vipjy)["o_area"],
-                        "industry":        (*o_vipjy)["a_buyerclass"],
-                        "buyset":          buyset,
-                        "renewList":       renewList,
-                        "infotype":        (*o_vipjy)["a_infotype"],
-                        "items":           (*o_vipjy)["a_items"],
-                        "projectmatch":    (*o_vipjy)["i_projectmatch"],
-                        "ratemode":        (*o_vipjy)["i_ratemode"],
-                        "matchway":        (*o_vipjy)["i_matchway"],
-                        "startTime":       (*rData)["l_vip_starttime"],
-                        "endTime":         (*rData)["l_vip_endtime"],
-                        "otherbuyerclass": (*o_vipjy)["i_matchbuyerclass_other"],
-                        "isread":          isread,
-                        "isvip":           vip,
-                        "isnew":           NewUserByVIP(userId, this.Session()), //免费订阅区分新老用户
-                        "isUpgrade":       bigPower.IsUpgrade,
-                }}
-        }()
-        if r.Err != nil {
-                log.Printf("%s SalesCreateOrder  GetSubBuyMsg err:%v\n", userId, r.Err.Error())
-        }
-        this.ServeJson(r.Format())
+	var userId string
+	r := func() *entity.FuncResult {
+		userId, _, _, _, err := util.SellerTokenDecrypt(this.GetString("token"))
+		ent_id := qutil.IntAll(this.GetSession("entId"))
+		entUserId := qutil.IntAll(this.GetSession("entUserId"))
+		if err != nil {
+			return &entity.FuncResult{false, err, nil}
+		}
+		rData, buyset, vip := entity.JyVipSubStruct.GetVipDetail(userId)
+		if rData == nil || len(*rData) == 0 {
+			return &entity.FuncResult{false, errors.New("获取信息失败"), nil}
+		}
+		var isread = false
+		if (*rData)["isread"] != nil {
+			isread = (*rData)["isread"].(bool)
+		}
+		o_vipjy := &map[string]interface{}{}
+		//判断版本是企业的还是个人的
+		infoCount := util.Mysql.CountBySql("select  count(id) from  entniche_wait_empower where  ent_id=? and  end_time>NOW() and  product_type like '%VIP订阅%' ", ent_id)
+		if infoCount > 0 {
+			query := map[string]interface{}{
+				"i_userid": entUserId,
+				"i_entid":  ent_id,
+				"i_type":   1,
+			}
+			res, _ := util.MQFW.FindOne("entniche_rule", query)
+			if res != nil && len(*res) > 0 {
+				o_vipjy = qutil.ObjToMap((*res)["o_entniche"])
+			}
+		} else {
+			o_vipjy = qutil.ObjToMap((*rData)["o_vipjy"])
+		}
+		vipStatus := qutil.IntAll((*rData)["i_vip_status"])
+		var renewList *[]map[string]interface{}
+		if vipStatus == 2 { //查询是否有未执行的续费订单
+			renewList, _ = util.MQFW.Find("vip_upgrade", &bson.M{"s_userid": userId, "i_isvalid": 0}, `{"l_validtime":1}`, `{"o_buyset":1,"l_validtime":1}`, false, -1, -1)
+			for i := 0; i < len(*renewList); i++ {
+				delete((*renewList)[i], "_id")
+			}
+		}
+		bigPower := jy.GetBigVipUserBaseMsg(this.Session(), *config.Middleground)
+		return &entity.FuncResult{true, nil, map[string]interface{}{
+			"isTrial":         vipStatus == 1,
+			"area":            (*o_vipjy)["o_area"],
+			"industry":        (*o_vipjy)["a_buyerclass"],
+			"buyset":          buyset,
+			"renewList":       renewList,
+			"infotype":        (*o_vipjy)["a_infotype"],
+			"items":           (*o_vipjy)["a_items"],
+			"projectmatch":    (*o_vipjy)["i_projectmatch"],
+			"ratemode":        (*o_vipjy)["i_ratemode"],
+			"matchway":        (*o_vipjy)["i_matchway"],
+			"startTime":       (*rData)["l_vip_starttime"],
+			"endTime":         (*rData)["l_vip_endtime"],
+			"otherbuyerclass": (*o_vipjy)["i_matchbuyerclass_other"],
+			"isread":          isread,
+			"isvip":           vip,
+			"isnew":           NewUserByVIP(userId, this.Session()), //免费订阅区分新老用户
+			"isUpgrade":       bigPower.IsUpgrade,
+		}}
+	}()
+	if r.Err != nil {
+		log.Printf("%s SalesCreateOrder  GetSubBuyMsg err:%v\n", userId, r.Err.Error())
+	}
+	this.ServeJson(r.Format())
 }
 
 // GetSelectPrice 计算价格
 // 复制 vipSubscribePay.go getSelectPrice
 func (this *SalesCreateOrder) GetSelectPrice() {
-        var userId string
-        r := func() *entity.FuncResult {
-                userId, _, _, _, err := util.SellerTokenDecrypt(this.GetString("token"))
-                if err != nil {
-                        return &entity.FuncResult{false, err, nil}
-                }
-                area := qutil.ObjToMap(this.GetString("area")) //地区
-                timeRenew := this.GetString("time")            //周期
-                orderType, _ := this.GetInteger("orderType")   //1 购买;2 续费;3 升级
-                //卡卷信息的id
-                lotteryId := this.GetString("lotteryId")
-                useProduct, _ := this.GetInteger("useProduct")
-                return CommonBilling(area, timeRenew, userId, lotteryId, orderType, useProduct, this.Session())
-        }()
-        if r.Err != nil {
-                log.Printf("%s 价格计算 err:%v\n", userId, r.Err.Error())
-        }
-        this.ServeJson(r.Format())
+	var userId string
+	r := func() *entity.FuncResult {
+		userId, _, _, _, err := util.SellerTokenDecrypt(this.GetString("token"))
+		if err != nil {
+			return &entity.FuncResult{false, err, nil}
+		}
+		area := qutil.ObjToMap(this.GetString("area")) //地区
+		timeRenew := this.GetString("time")            //周期
+		orderType, _ := this.GetInteger("orderType")   //1 购买;2 续费;3 升级
+		//卡卷信息的id
+		lotteryId := this.GetString("lotteryId")
+		useProduct, _ := this.GetInteger("useProduct")
+		return CommonBilling(area, timeRenew, userId, lotteryId, orderType, useProduct, this.Session())
+	}()
+	if r.Err != nil {
+		log.Printf("%s 价格计算 err:%v\n", userId, r.Err.Error())
+	}
+	this.ServeJson(r.Format())
 }
 
 // GetValuationList 订单详情-计价清单
 // 逻辑与 orderListDetails.go GetValuationList保持一致
 func (this *SalesCreateOrder) GetValuationList() {
-        var userId string
-        r, err := func() (map[string]interface{}, error) {
-                userId, _, _, _, err := util.SellerTokenDecrypt(this.GetString("token"))
-                if err != nil {
-                        return nil, err
-                }
-                order_code := this.GetString("order_code")
-                upgradeSubtotail := []map[string]interface{}{}
-                queryMap := map[string]interface{}{
-                        "order_code": order_code,
-                        "user_Id":    userId,
-                }
-                filter := util.Mysql.FindOne(tableName_order, queryMap, "filter,order_money", "")
-                if filter == nil {
-                        return nil, fmt.Errorf("未知订单")
-                }
-                res := qutil.ObjToMap((*filter)["filter"])
-                upgradeSubtotail = qutil.ObjArrToMapArr((*res)["upgradeSubtotail"].([]interface{}))
-                if len(upgradeSubtotail) > 0 {
-                        for _, v := range upgradeSubtotail {
-                                //续费 没有oldBuyset
-                                if v["oldBuyset"] == nil {
-                                        v["oldBuyset"] = (*res)["newBuyset"]
-                                }
-                        }
-                }
-                return map[string]interface{}{
-                        "list":        upgradeSubtotail,
-                        "order_money": (*filter)["order_money"],
-                }, nil
-        }()
-        if err != nil {
-                log.Printf("%s 价格计算 err:%v\n", userId, r)
-        }
-        this.ServeJson(r)
+	var userId string
+	r, err := func() (map[string]interface{}, error) {
+		userId, _, _, _, err := util.SellerTokenDecrypt(this.GetString("token"))
+		if err != nil {
+			return nil, err
+		}
+		order_code := this.GetString("order_code")
+		upgradeSubtotail := []map[string]interface{}{}
+		queryMap := map[string]interface{}{
+			"order_code": order_code,
+			"user_Id":    userId,
+		}
+		filter := util.Mysql.FindOne(tableName_order, queryMap, "filter,order_money", "")
+		if filter == nil {
+			return nil, fmt.Errorf("未知订单")
+		}
+		res := qutil.ObjToMap((*filter)["filter"])
+		upgradeSubtotail = qutil.ObjArrToMapArr((*res)["upgradeSubtotail"].([]interface{}))
+		if len(upgradeSubtotail) > 0 {
+			for _, v := range upgradeSubtotail {
+				//续费 没有oldBuyset
+				if v["oldBuyset"] == nil {
+					v["oldBuyset"] = (*res)["newBuyset"]
+				}
+			}
+		}
+		return map[string]interface{}{
+			"list":        upgradeSubtotail,
+			"order_money": (*filter)["order_money"],
+		}, nil
+	}()
+	if err != nil {
+		log.Printf("%s 价格计算 err:%v\n", userId, r)
+	}
+	this.ServeJson(r)
 }
 
 // GetPrice 销售代下单 支付价格
 // 逻辑和vipSubscribeChange.go GetPrice 一致
 func (this *SalesCreateOrder) GetPrice() {
-        res := map[string]interface{}{
-                "isActiving": true,
-                "isWritten":  0,
-        }
-        j, _ := json.Marshal(&entity.SubVipPrice)
-        _ = json.Unmarshal(j, &res)
-        userId, _, _, _, _ := util.SellerTokenDecrypt(this.GetString("token"))
-        if userId != "" {
-                data, ok := util.MQFW.FindById("user", userId, nil)
-                if ok && data != nil && *data != nil {
-                        //已录入信息 已激活大会员赠送
-                        if (*data)["i_member_give"] != nil {
-                                res["isWritten"] = qutil.IntAll((*data)["i_member_give"])
-                        }
-                }
-        }
-        this.ServeJson(res)
+	res := map[string]interface{}{
+		"isActiving": true,
+		"isWritten":  0,
+	}
+	j, _ := json.Marshal(&entity.SubVipPrice)
+	_ = json.Unmarshal(j, &res)
+	userId, _, _, _, _ := util.SellerTokenDecrypt(this.GetString("token"))
+	if userId != "" {
+		data, ok := util.MQFW.FindById("user", userId, nil)
+		if ok && data != nil && *data != nil {
+			//已录入信息 已激活大会员赠送
+			if (*data)["i_member_give"] != nil {
+				res["isWritten"] = qutil.IntAll((*data)["i_member_give"])
+			}
+		}
+	}
+	this.ServeJson(res)
 }
 
 // GetOrderPayAllMsg 代付订单详情页
 func (o *SalesCreateOrder) GetOrderPayAllMsg() {
-        order_code := o.GetString("orderCode")
-        token := o.GetString("token")
+	order_code := o.GetString("orderCode")
+	token := o.GetString("token")
 
-        data := map[string]interface{}{}
-        var (
-                r             entity.FuncResult
-                transactionId string
-        )
-        t := make(map[string]interface{})
-        if order_code != "" && token != "" {
-                fields := "order_code,user_id"
-                info := map[string]interface{}{}
-                userId, _, _, _, err := util.SellerTokenDecrypt(token)
-                if err != nil {
-                        r.Err = errors.New("获取订单信息失败")
-                        goto env
-                }
-                info["order_code"] = order_code
-                info["user_id"] = userId
-                info["order_channel"] = "xdqd04"
-                dataMap := util.Mysql.FindOne(tableName_order, info, fields, "")
-                if dataMap != nil && len(*dataMap) > 0 {
-                        data = *dataMap
-                        //查询userid
-                        //userId := qutil.InterfaceToStr(data["user_id"])
-                        //if userId == "" {
-                        //	r.Err = errors.New("获取订单信息失败")
-                        //	goto env
-                        //}
-                        field := "id,order_code,del_status,prepay_time,create_time,pay_time,pay_way,user_phone,original_price,order_money,pay_money,applybill_status,out_trade_no,filter,product_type,order_status,applybill_type,applybill_taxnum,applybill_company,vip_starttime,vip_endtime,vip_type,discount_price,d_relation_id,billingMode,return_status,is_backstage_order,vip_starttime,vip_endtime"
-                        data, t, transactionId = CommonDetail(4, field, userId, order_code, o.Session())
-                        //如果手机号号为空查找通过userid查找手机号
-                        //if qutil.InterfaceToStr(data["user_phone"]) == "" {
-                        dataPhone, _ := util.MQFW.FindById("user", userId, "s_phone,s_m_phone")
-                        sPhone := qutil.InterfaceToStr((*dataPhone)["s_phone"])
-                        data["user_phone"] = qutil.If(sPhone == "", qutil.InterfaceToStr((*dataPhone)["s_m_phone"]), sPhone)
-                        dataMapSta := make(map[string]interface{})
-                        if qutil.IntAll(data["del_status"]) == 1 || qutil.IntAll(data["order_status"]) == -1 {
-                                dataMapSta["del_status"] = qutil.IntAll(data["del_status"])
-                                dataMapSta["order_status"] = qutil.IntAll(data["order_status"])
-                        } else {
-                                dataMapSta = data
-                        }
-                        //}
-                        r.Success = true
-                        r.Data = map[string]interface{}{
-                                "order":          dataMapSta,
-                                "time":           t,
-                                "transaction_id": transactionId,
-                        }
-                }
-        }
+	data := map[string]interface{}{}
+	var (
+		r             entity.FuncResult
+		transactionId string
+	)
+	t := make(map[string]interface{})
+	if order_code != "" && token != "" {
+		fields := "order_code,user_id"
+		info := map[string]interface{}{}
+		userId, _, _, _, err := util.SellerTokenDecrypt(token)
+		if err != nil {
+			r.Err = errors.New("获取订单信息失败")
+			goto env
+		}
+		info["order_code"] = order_code
+		info["user_id"] = userId
+		info["order_channel"] = "xdqd04"
+		dataMap := util.Mysql.FindOne(tableName_order, info, fields, "")
+		if dataMap != nil && len(*dataMap) > 0 {
+			data = *dataMap
+			//查询userid
+			//userId := qutil.InterfaceToStr(data["user_id"])
+			//if userId == "" {
+			//	r.Err = errors.New("获取订单信息失败")
+			//	goto env
+			//}
+			field := "id,order_code,del_status,prepay_time,create_time,pay_time,pay_way,user_phone,original_price,order_money,pay_money,applybill_status,out_trade_no,filter,product_type,order_status,applybill_type,applybill_taxnum,applybill_company,vip_starttime,vip_endtime,vip_type,discount_price,d_relation_id,billingMode,return_status,is_backstage_order,vip_starttime,vip_endtime"
+			data, t, transactionId = CommonDetail(4, field, userId, order_code, o.Session())
+			//如果手机号号为空查找通过userid查找手机号
+			//if qutil.InterfaceToStr(data["user_phone"]) == "" {
+			dataPhone, _ := util.MQFW.FindById("user", userId, "s_phone,s_m_phone")
+			sPhone := qutil.InterfaceToStr((*dataPhone)["s_phone"])
+			data["user_phone"] = qutil.If(sPhone == "", qutil.InterfaceToStr((*dataPhone)["s_m_phone"]), sPhone)
+			dataMapSta := make(map[string]interface{})
+			if qutil.IntAll(data["del_status"]) == 1 || qutil.IntAll(data["order_status"]) == -1 {
+				dataMapSta["del_status"] = qutil.IntAll(data["del_status"])
+				dataMapSta["order_status"] = qutil.IntAll(data["order_status"])
+			} else {
+				dataMapSta = data
+			}
+			//}
+			r.Success = true
+			r.Data = map[string]interface{}{
+				"order":          dataMapSta,
+				"time":           t,
+				"transaction_id": transactionId,
+			}
+		}
+	}
 env:
-        o.ServeJson(r.Format())
+	o.ServeJson(r.Format())
 }

+ 648 - 648
src/jfw/modules/subscribepay/src/service/vipSubscribeChange.go

@@ -1,690 +1,690 @@
 package service
 
 import (
-        qutil "app.yhyue.com/moapp/jybase/common"
-        . "app.yhyue.com/moapp/jybase/date"
-        "app.yhyue.com/moapp/jybase/go-xweb/httpsession"
-        "app.yhyue.com/moapp/jybase/go-xweb/xweb"
-        "app.yhyue.com/moapp/jypkg/common/src/qfw/util/jy"
-        "encoding/json"
-        "errors"
-        "fmt"
-        "go.mongodb.org/mongo-driver/bson"
-        "jy/src/jfw/modules/subscribepay/src/config"
-        "jy/src/jfw/modules/subscribepay/src/entity"
-        "jy/src/jfw/modules/subscribepay/src/pay"
-        "jy/src/jfw/modules/subscribepay/src/util"
-        "log"
-        "math"
-        "strings"
-        "time"
+	qutil "app.yhyue.com/moapp/jybase/common"
+	. "app.yhyue.com/moapp/jybase/date"
+	"app.yhyue.com/moapp/jybase/go-xweb/httpsession"
+	"app.yhyue.com/moapp/jybase/go-xweb/xweb"
+	"app.yhyue.com/moapp/jypkg/common/src/qfw/util/jy"
+	"encoding/json"
+	"errors"
+	"fmt"
+	"go.mongodb.org/mongo-driver/bson"
+	"jy/src/jfw/modules/subscribepay/src/config"
+	"jy/src/jfw/modules/subscribepay/src/entity"
+	"jy/src/jfw/modules/subscribepay/src/pay"
+	"jy/src/jfw/modules/subscribepay/src/util"
+	"log"
+	"math"
+	"strings"
+	"time"
 )
 
 //订阅修改 or 升级
 type SubscribeChange struct {
-        *xweb.Action
-        getSubBuyMsg   xweb.Mapper `xweb:"/vipsubscribe/getSubBuyMsg"`   //获取vip订阅详情
-        saveChange     xweb.Mapper `xweb:"/vipsubscribe/saveChange"`     //订阅修改
-        mergeIndustry  xweb.Mapper `xweb:"/vipsubscribe/mergeIndustry"`  //行业合并
-        upgrade        xweb.Mapper `xweb:"/vipsubscribe/upgrade"`        //升级超级订阅
-        freeSaveChange xweb.Mapper `xweb:"/vipsubscribe/freeSaveChange"` //免费用户试用超级订阅
+	*xweb.Action
+	getSubBuyMsg   xweb.Mapper `xweb:"/vipsubscribe/getSubBuyMsg"`   //获取vip订阅详情
+	saveChange     xweb.Mapper `xweb:"/vipsubscribe/saveChange"`     //订阅修改
+	mergeIndustry  xweb.Mapper `xweb:"/vipsubscribe/mergeIndustry"`  //行业合并
+	upgrade        xweb.Mapper `xweb:"/vipsubscribe/upgrade"`        //升级超级订阅
+	freeSaveChange xweb.Mapper `xweb:"/vipsubscribe/freeSaveChange"` //免费用户试用超级订阅
 }
 
 func init() {
-        xweb.AddAction(&SubscribeChange{})
+	xweb.AddAction(&SubscribeChange{})
 }
 
 //获取购买订阅相关信息
 func (this *SubscribeChange) GetSubBuyMsg() {
-        userId := qutil.ObjToString(this.GetSession("userId"))
-        r := func() *entity.FuncResult {
-                ent_id := qutil.IntAll(this.GetSession("entId"))
-                entUserId := qutil.IntAll(this.GetSession("entUserId"))
-                rData, buyset, vip := entity.JyVipSubStruct.GetVipDetail(userId)
-                if rData == nil || len(*rData) == 0 {
-                        return &entity.FuncResult{false, errors.New("获取信息失败"), nil}
-                }
-                var isread = false
-                if (*rData)["isread"] != nil {
-                        isread = (*rData)["isread"].(bool)
-                }
-                o_vipjy := &map[string]interface{}{}
-                //判断版本是企业的还是个人的
-                infoCount := util.Mysql.CountBySql("select  count(id) from  entniche_wait_empower where  ent_id=? and  end_time>NOW() and  product_type like '%VIP订阅%' ", ent_id)
-                if infoCount > 0 {
-                        query := map[string]interface{}{
-                                "i_userid": entUserId,
-                                "i_entid":  ent_id,
-                                "i_type":   1,
-                        }
-                        res, _ := util.MQFW.FindOne("entniche_rule", query)
-                        if res != nil && len(*res) > 0 {
-                                o_vipjy = qutil.ObjToMap((*res)["o_entniche"])
-                        }
-                } else {
-                        o_vipjy = qutil.ObjToMap((*rData)["o_vipjy"])
-                }
-
-                vipStatus := qutil.IntAll((*rData)["i_vip_status"])
-                var renewList *[]map[string]interface{}
-                if vipStatus == 2 { //查询是否有未执行的续费订单
-                        renewList, _ = util.MQFW.Find("vip_upgrade", &bson.M{"s_userid": userId, "i_isvalid": 0}, `{"l_validtime":1}`, `{"o_buyset":1,"l_validtime":1}`, false, -1, -1)
-                        for i := 0; i < len(*renewList); i++ {
-                                delete((*renewList)[i], "_id")
-                        }
-                }
-                bigPower := jy.GetBigVipUserBaseMsg("10000", this.Session(), config.Config.Etcd.Hosts, config.Config.Etcd.Key)
-                return &entity.FuncResult{true, nil, map[string]interface{}{
-                        "isTrial":         vipStatus == 1,
-                        "area":            (*o_vipjy)["o_area"],
-                        "industry":        (*o_vipjy)["a_buyerclass"],
-                        "buyset":          buyset,
-                        "renewList":       renewList,
-                        "infotype":        (*o_vipjy)["a_infotype"],
-                        "items":           (*o_vipjy)["a_items"],
-                        "projectmatch":    (*o_vipjy)["i_projectmatch"],
-                        "ratemode":        (*o_vipjy)["i_ratemode"],
-                        "matchway":        (*o_vipjy)["i_matchway"],
-                        "startTime":       (*rData)["l_vip_starttime"],
-                        "endTime":         (*rData)["l_vip_endtime"],
-                        "otherbuyerclass": (*o_vipjy)["i_matchbuyerclass_other"],
-                        "isread":          isread,
-                        "isvip":           vip,
-                        "isnew":           NewUserByVIP(userId, this.Session()), //免费订阅区分新老用户
-                        "key_max_length":  qutil.If(vip, config.Config.VipKeyMaxLength, 10),
-                        "isUpgrade":       bigPower.IsUpgrade,
-                }}
-        }()
-        if r.Err != nil {
-                log.Printf("%s GetSubBuyMsg err:%v\n", userId, r.Err.Error())
-        }
-        this.ServeJson(r.Format())
+	userId := qutil.ObjToString(this.GetSession("userId"))
+	r := func() *entity.FuncResult {
+		ent_id := qutil.IntAll(this.GetSession("entId"))
+		entUserId := qutil.IntAll(this.GetSession("entUserId"))
+		rData, buyset, vip := entity.JyVipSubStruct.GetVipDetail(userId)
+		if rData == nil || len(*rData) == 0 {
+			return &entity.FuncResult{false, errors.New("获取信息失败"), nil}
+		}
+		var isread = false
+		if (*rData)["isread"] != nil {
+			isread = (*rData)["isread"].(bool)
+		}
+		o_vipjy := &map[string]interface{}{}
+		//判断版本是企业的还是个人的
+		infoCount := util.Mysql.CountBySql("select  count(id) from  entniche_wait_empower where  ent_id=? and  end_time>NOW() and  product_type like '%VIP订阅%' ", ent_id)
+		if infoCount > 0 {
+			query := map[string]interface{}{
+				"i_userid": entUserId,
+				"i_entid":  ent_id,
+				"i_type":   1,
+			}
+			res, _ := util.MQFW.FindOne("entniche_rule", query)
+			if res != nil && len(*res) > 0 {
+				o_vipjy = qutil.ObjToMap((*res)["o_entniche"])
+			}
+		} else {
+			o_vipjy = qutil.ObjToMap((*rData)["o_vipjy"])
+		}
+
+		vipStatus := qutil.IntAll((*rData)["i_vip_status"])
+		var renewList *[]map[string]interface{}
+		if vipStatus == 2 { //查询是否有未执行的续费订单
+			renewList, _ = util.MQFW.Find("vip_upgrade", &bson.M{"s_userid": userId, "i_isvalid": 0}, `{"l_validtime":1}`, `{"o_buyset":1,"l_validtime":1}`, false, -1, -1)
+			for i := 0; i < len(*renewList); i++ {
+				delete((*renewList)[i], "_id")
+			}
+		}
+		bigPower := jy.GetBigVipUserBaseMsg(this.Session(), *config.Middleground)
+		return &entity.FuncResult{true, nil, map[string]interface{}{
+			"isTrial":         vipStatus == 1,
+			"area":            (*o_vipjy)["o_area"],
+			"industry":        (*o_vipjy)["a_buyerclass"],
+			"buyset":          buyset,
+			"renewList":       renewList,
+			"infotype":        (*o_vipjy)["a_infotype"],
+			"items":           (*o_vipjy)["a_items"],
+			"projectmatch":    (*o_vipjy)["i_projectmatch"],
+			"ratemode":        (*o_vipjy)["i_ratemode"],
+			"matchway":        (*o_vipjy)["i_matchway"],
+			"startTime":       (*rData)["l_vip_starttime"],
+			"endTime":         (*rData)["l_vip_endtime"],
+			"otherbuyerclass": (*o_vipjy)["i_matchbuyerclass_other"],
+			"isread":          isread,
+			"isvip":           vip,
+			"isnew":           NewUserByVIP(userId, this.Session()), //免费订阅区分新老用户
+			"key_max_length":  qutil.If(vip, config.Config.VipKeyMaxLength, 10),
+			"isUpgrade":       bigPower.IsUpgrade,
+		}}
+	}()
+	if r.Err != nil {
+		log.Printf("%s GetSubBuyMsg err:%v\n", userId, r.Err.Error())
+	}
+	this.ServeJson(r.Format())
 }
 
 //订阅修改
 func (this *SubscribeChange) SaveChange() {
-        area := qutil.ObjToMap(this.GetString("area"))
-        industry := strings.Split(this.GetString("industry"), ",")
-        userId := qutil.ObjToString(this.GetSession("userId"))
-
-        r := func() *entity.FuncResult {
-                if len(industry) == 1 && industry[0] == "" {
-                        industry = []string{}
-                }
-                rData, oldBuyset, isVip := entity.JyVipSubStruct.GetVipDetail(userId)
-                if !isVip {
-                        return &entity.FuncResult{false, errors.New("请求异常,非vip状态"), nil}
-                }
-                if rData == nil || len(*rData) == 0 {
-                        return &entity.FuncResult{false, errors.New("获取信息失败"), nil}
-                }
-                newBuyset := entity.JyVipSubStruct.NewBuySet(area, industry, oldBuyset.Upgrade == 1)
-
-                if needUpgrade := needUpgrade(newBuyset, oldBuyset); needUpgrade {
-                        log.Printf("%s 订阅内容超出套餐 %+v area:%s industry:%s", userId, oldBuyset, this.GetString("area"), this.GetString("industry"))
-                        return &entity.FuncResult{false, errors.New("订阅内容超出套餐"), nil}
-                }
-                if !entity.JyVipSubStruct.SubChange(userId, qutil.ObjToMap((*rData)["o_vipjy"]), area, industry) {
-                        return &entity.FuncResult{false, errors.New("保存修改出错"), nil}
-                }
-                return &entity.FuncResult{true, nil, map[string]interface{}{
-                        "doSuccess": true,
-                }}
-        }()
-        if r.Err != nil {
-                log.Printf("%s SaveChange err:%v\n", userId, r.Err.Error())
-        }
-        this.ServeJson(r.Format())
+	area := qutil.ObjToMap(this.GetString("area"))
+	industry := strings.Split(this.GetString("industry"), ",")
+	userId := qutil.ObjToString(this.GetSession("userId"))
+
+	r := func() *entity.FuncResult {
+		if len(industry) == 1 && industry[0] == "" {
+			industry = []string{}
+		}
+		rData, oldBuyset, isVip := entity.JyVipSubStruct.GetVipDetail(userId)
+		if !isVip {
+			return &entity.FuncResult{false, errors.New("请求异常,非vip状态"), nil}
+		}
+		if rData == nil || len(*rData) == 0 {
+			return &entity.FuncResult{false, errors.New("获取信息失败"), nil}
+		}
+		newBuyset := entity.JyVipSubStruct.NewBuySet(area, industry, oldBuyset.Upgrade == 1)
+
+		if needUpgrade := needUpgrade(newBuyset, oldBuyset); needUpgrade {
+			log.Printf("%s 订阅内容超出套餐 %+v area:%s industry:%s", userId, oldBuyset, this.GetString("area"), this.GetString("industry"))
+			return &entity.FuncResult{false, errors.New("订阅内容超出套餐"), nil}
+		}
+		if !entity.JyVipSubStruct.SubChange(userId, qutil.ObjToMap((*rData)["o_vipjy"]), area, industry) {
+			return &entity.FuncResult{false, errors.New("保存修改出错"), nil}
+		}
+		return &entity.FuncResult{true, nil, map[string]interface{}{
+			"doSuccess": true,
+		}}
+	}()
+	if r.Err != nil {
+		log.Printf("%s SaveChange err:%v\n", userId, r.Err.Error())
+	}
+	this.ServeJson(r.Format())
 }
 
 //免费用户设置超级订阅(体验)
 func (this *SubscribeChange) FreeSaveChange() {
-        area := qutil.ObjToMap(this.GetString("area"))
-        industry := strings.Split(this.GetString("industry"), ",")
-        userId := qutil.ObjToString(this.GetSession("userId"))
-        r := func() *entity.FuncResult {
-                if len(industry) == 1 && industry[0] == "" {
-                        industry = []string{}
-                }
-                positionType := qutil.Int64All(this.GetSession("positionType"))
-                vipType := "o_vipjy"
-                if positionType == 1 {
-                        vipType = "o_entniche"
-                }
-                saveData := bson.M{"$set": bson.M{
-                        vipType + ".o_area":       area,     //设置地区
-                        vipType + ".a_buyerclass": industry, //设置行业
-                }}
-                updateOk := false
-                if positionType == 0 {
-                        updateOk = util.MQFW.UpdateById("user", userId,
-                                bson.M{"$set": saveData})
-                } else {
-                        query := map[string]interface{}{
-                                "i_userid": qutil.Int64All(this.GetSession("entUserId")),
-                                "i_entid":  qutil.Int64All(this.GetSession("entId")),
-                                "i_type":   1,
-                        }
-                        updateOk = util.MQFW.Update("entniche_rule", query,
-                                bson.M{"$set": saveData}, true, false)
-                }
-                return &entity.FuncResult{true, nil, map[string]interface{}{
-                        "doSuccess": updateOk,
-                }}
-        }()
-        if r.Err != nil {
-                log.Printf("%s SaveChange err:%v\n", userId, r.Err.Error())
-        }
-        this.ServeJson(r.Format())
+	area := qutil.ObjToMap(this.GetString("area"))
+	industry := strings.Split(this.GetString("industry"), ",")
+	userId := qutil.ObjToString(this.GetSession("userId"))
+	r := func() *entity.FuncResult {
+		if len(industry) == 1 && industry[0] == "" {
+			industry = []string{}
+		}
+		positionType := qutil.Int64All(this.GetSession("positionType"))
+		vipType := "o_vipjy"
+		if positionType == 1 {
+			vipType = "o_entniche"
+		}
+		saveData := bson.M{"$set": bson.M{
+			vipType + ".o_area":       area,     //设置地区
+			vipType + ".a_buyerclass": industry, //设置行业
+		}}
+		updateOk := false
+		if positionType == 0 {
+			updateOk = util.MQFW.UpdateById("user", userId,
+				bson.M{"$set": saveData})
+		} else {
+			query := map[string]interface{}{
+				"i_userid": qutil.Int64All(this.GetSession("entUserId")),
+				"i_entid":  qutil.Int64All(this.GetSession("entId")),
+				"i_type":   1,
+			}
+			updateOk = util.MQFW.Update("entniche_rule", query,
+				bson.M{"$set": saveData}, true, false)
+		}
+		return &entity.FuncResult{true, nil, map[string]interface{}{
+			"doSuccess": updateOk,
+		}}
+	}()
+	if r.Err != nil {
+		log.Printf("%s SaveChange err:%v\n", userId, r.Err.Error())
+	}
+	this.ServeJson(r.Format())
 }
 
 //升级订阅
 func (this *SubscribeChange) Upgrade() {
-        userId := qutil.ObjToString(this.GetSession("userId"))
-        r := func() *entity.FuncResult {
-                area_count, _ := this.GetInteger("area_count") //地区
-                area := qutil.ObjToMap(this.GetString("area")) //地区
-
-                timeRenew := this.GetString("time")      //周期
-                req_price, _ := this.GetInteger("price") //前端展示金额
-                openId := qutil.ObjToString(this.GetSession("s_m_openid"))
-                order_phone := this.GetString("order_phone") //p19.3用户信息采集 手机号
-
-                rData, oldBuyset, isVip := entity.JyVipSubStruct.GetVipDetail(userId)
-                if !isVip {
-                        return &entity.FuncResult{false, errors.New("请求异常,非vip状态"), nil}
-                }
-
-                now := time.Now()
-                date_count, date_unit, needRenew := 0, 0, false
-                endUnix := qutil.Int64All((*rData)["l_vip_endtime"])
-                startUnix := qutil.Int64All((*rData)["l_vip_starttime"])
-                if timeRenew != "" {
-                        var err error
-                        date_count, date_unit, err = entity.JyVipSubStruct.CheckReqDate(timeRenew)
-                        if err != nil {
-                                return &entity.FuncResult{false, errors.New("格式化日期出错"), nil}
-                        }
-                        isTrail := qutil.IntAll((*rData)["i_vip_status"]) == 1
-                        //校验是否超过三年
-                        if time.Date(now.Year(), now.Month(), now.Day(), 23, 59, 59, 59, now.Location()).
-                                AddDate(3, 0, 0).Before(util.GetDATE(date_unit, date_count, endUnix)) && !isTrail {
-                                return &entity.FuncResult{false, errors.New("订阅周期超过三年"), nil}
-                        }
-                        needRenew = true
-                }
-                area_select := true                     //是否回显城市选择
-                if len(*area) == 0 && area_count != 0 { //升级时为传入选择省份
-                        (*area)["areacount"] = area_count
-                        area_select = false
-                }
-                newBuyset := entity.JyVipSubStruct.NewBuySet(area, nil, true) //改版后只能购买升级版超级订阅
-
-                //升级校验
-                totalPrice, subtotail := getNewUpgradeDetail(userId, newBuyset, oldBuyset, endUnix, date_count, date_unit)
-                if totalPrice < 0 {
-                        if totalPrice == -1 {
-                                return &entity.FuncResult{false, errors.New("不能升级此状态"), nil}
-                        } else {
-                                return &entity.FuncResult{false, errors.New("查询续费订单出错"), nil}
-                        }
-                }
-
-                filter := entity.VipSimpleMsg{
-                        Industry:         []string{}, //行业保存默认选择
-                        Cyclecount:       date_count,
-                        Cycleunit:        date_unit,
-                        OldBuyset:        oldBuyset,
-                        NewBuyset:        newBuyset,
-                        UpgradeSubtotail: subtotail,
-                        OrderType:        3,
-                        DisWord:          "",
-                }
-                if area_select {
-                        filter.Area = area
-                }
-
-                var startTime, endTime time.Time = time.Unix(startUnix, 0), time.Unix(endUnix, 0)
-                if needRenew {
-                        startTime = now
-                        if needRenew {
-                                endTime = util.GetDATE(filter.Cycleunit, filter.Cyclecount, endUnix)
-                        } else {
-                                endTime = time.Unix(endUnix, 0)
-                        }
-                }
-
-                final_price, discount_price := totalPrice, 0
-                if req_price != final_price {
-                        return &entity.FuncResult{false, errors.New(fmt.Sprintf("金额校验异常[%d,%d]", final_price, req_price)), nil}
-                }
-                order_status := 0
-                //老用户 0元升级
-                if req_price == 0 && 0 == final_price {
-                        if oldBuyset.Upgrade == 0 {
-                                order_status = 1
-                        } else {
-                                return &entity.FuncResult{false, errors.New("超级订阅升级异常"), nil}
-                        }
-                }
-                //卡卷使用
-                userLotteryId, lotteryId := "", this.GetString("lotteryId")
-                full_price, reduce_price := 0, 0
-                var discount float64
-                if lotteryId != "" {
-                        full_price, reduce_price, discount, userLotteryId = util.GetCouponInfo(userId, lotteryId, config.CouponConfig.Products["超级订阅"])
-                        if reduce_price > 0 && full_price <= final_price {
-                                if discount == 100 {
-                                        final_price = final_price - reduce_price
-                                        discount_price = reduce_price
-                                } else {
-                                        //折扣
-                                        disCount_int := int(math.Ceil(discount * 100))
-                                        discount_price = final_price - final_price*disCount_int/1000
-                                        final_price = final_price * disCount_int / 1000
-                                }
-                        } else {
-                                userLotteryId = ""
-                        }
-                }
-                //测试打折
-                if entity.SubVipPrice.Discount < 1 {
-                        tmp := float64(final_price) * entity.SubVipPrice.Discount
-                        if tmp < 1 {
-                                if tmp != 0 {
-                                        final_price = 1
-                                }
-                        } else {
-                                final_price = int(tmp)
-                        }
-                }
-
-                //创建订单
-                filterStr, err := json.Marshal(filter)
-                if err != nil {
-                        return &entity.FuncResult{false, errors.New("订单数据生成异常"), nil}
-                }
-                disWord := ""
-                //查询用户是否有分销链接
-                disWordStr := ""
-                userfilter, ok := util.MQFW.FindById("user", userId, "")
-                if ok && userfilter != nil {
-                        startTime := qutil.Int64All((*userfilter)["startTime"])
-                        endTime := qutil.Int64All((*userfilter)["endTime"])
-                        if startTime != 0 {
-                                if startTime <= time.Now().Unix() && endTime >= time.Now().Unix() {
-                                        disWordStr = qutil.ObjToString((*userfilter)["disWords"])
-                                }
-                        }
-                }
-                if disWordStr != "" {
-                        disWord = disWordStr
-                }
-                ordercode := pay.GetOrderCode(userId)
-                /*if disWord == "" {
-                	start_time := TimeProcessing(time.Now().Format(DateFullLayout), -config.Config.TermValidity).Format(DateFullLayout)
-                	stop_time := TimeProcessing(time.Now().Format(DateFullLayout), config.Config.TermValidity).Format(DateFullLayout)
-                	infoList := util.Mysql.SelectBySql("select  * from  dis_word where userId=?  and  ?<=start_time  and stop_time<? ORDER BY id ", userId, start_time, stop_time)
-                	if len(*infoList) != 0 {
-                		disWord = fmt.Sprint((*infoList)[0]["password"])
-                	}
-                }*/
-                distributionChannel, orderChannel := util.GetJyOrderChannel(disWord, this.Header("User-Agent"))
-                entId := qutil.Int64All(this.GetSession("entId"))
-                buy_subject := 1
-                if entId > 0 {
-                        buy_subject = 2
-                }
-                insertMap := map[string]interface{}{
-                        "order_money":          final_price,
-                        "order_status":         order_status,
-                        "user_openid":          openId,
-                        "order_code":           ordercode,
-                        "product_type":         "VIP订阅",
-                        "create_time":          FormatDate(&now, Date_Full_Layout),
-                        "original_price":       final_price + discount_price, //原价
-                        "filter_id":            "",
-                        "user_id":              userId,
-                        "filter":               string(filterStr), //筛选
-                        "vip_endtime":          FormatDate(&endTime, Date_Full_Layout),
-                        "vip_starttime":        FormatDate(&startTime, Date_Full_Layout),
-                        "discount_price":       discount_price,
-                        "d_relation_id":        userLotteryId,
-                        "vip_type":             2, //立即升级
-                        "user_phone":           order_phone,
-                        "dis_word":             disWord,
-                        "distribution_channel": distributionChannel, //销售渠道
-                        "order_channel":        orderChannel,        //下单渠道
-                        "audit_status":         3,                   //默认审核通过
-                        "buy_subject":          buy_subject,
-                        "ent_id":               entId,
-                }
-                if order_phone != "" {
-                        if !jy.PhoneReg.MatchString(order_phone) {
-                                return &entity.FuncResult{false, errors.New("手机号格式异常"), nil}
-                        }
-                } else if userfilter == nil || len(*userfilter) > 0 {
-                        order_phone, _ = qutil.If((*userfilter)["s_phone"] != nil, (*userfilter)["s_phone"], (*userfilter)["s_m_phone"]).(string)
-
-                }
-                insertMap["user_phone"] = order_phone
-                orderid := util.Mysql.Insert("dataexport_order", insertMap)
-                if orderid == -1 {
-                        return &entity.FuncResult{false, errors.New("数据库操作异常"), nil}
-                }
-                //老用户升级 一个省 全行业 时间不变 会出现零元升级得情况 0元升级直接到支付成功页面 开通超级订阅
-                if req_price == 0 && 0 == final_price && oldBuyset.Upgrade == 0 {
-                        //后期
-                        if !entity.JyVipSubStruct.StartSubVip(userId, filter, time.Unix(startUnix, 0), time.Unix(endUnix, 0), false, 0, 0, 0) {
-                                return &entity.FuncResult{false, errors.New("老用户升级超级订阅高版本异常"), nil}
-                        }
-                        return &entity.FuncResult{true, nil, map[string]interface{}{"code": ordercode, "needPay": false}}
-                }
-                //绑定卡卷
-                if userLotteryId != "" && lotteryId != "" {
-                        go func(userId, userLotteryId, order_code string) {
-                                nickname, _ := this.Session().Get("s_nickname").(string)
-                                if !util.UpdateCouponState(userId, userLotteryId, nickname, order_phone, order_code, "VIP订阅", "", 3, 0) {
-                                        log.Println(fmt.Sprintf("单号%s-绑定失败-卡卷%s", order_code, userLotteryId))
-                                }
-                        }(userId, userLotteryId, ordercode)
-                }
-                return &entity.FuncResult{true, nil, map[string]interface{}{"code": ordercode, "needPay": true}}
-        }()
-        if r.Err != nil {
-                log.Printf("%s Upgrade err:%v\n", userId, r.Err.Error())
-        }
-        this.ServeJson(r.Format())
+	userId := qutil.ObjToString(this.GetSession("userId"))
+	r := func() *entity.FuncResult {
+		area_count, _ := this.GetInteger("area_count") //地区
+		area := qutil.ObjToMap(this.GetString("area")) //地区
+
+		timeRenew := this.GetString("time")      //周期
+		req_price, _ := this.GetInteger("price") //前端展示金额
+		openId := qutil.ObjToString(this.GetSession("s_m_openid"))
+		order_phone := this.GetString("order_phone") //p19.3用户信息采集 手机号
+
+		rData, oldBuyset, isVip := entity.JyVipSubStruct.GetVipDetail(userId)
+		if !isVip {
+			return &entity.FuncResult{false, errors.New("请求异常,非vip状态"), nil}
+		}
+
+		now := time.Now()
+		date_count, date_unit, needRenew := 0, 0, false
+		endUnix := qutil.Int64All((*rData)["l_vip_endtime"])
+		startUnix := qutil.Int64All((*rData)["l_vip_starttime"])
+		if timeRenew != "" {
+			var err error
+			date_count, date_unit, err = entity.JyVipSubStruct.CheckReqDate(timeRenew)
+			if err != nil {
+				return &entity.FuncResult{false, errors.New("格式化日期出错"), nil}
+			}
+			isTrail := qutil.IntAll((*rData)["i_vip_status"]) == 1
+			//校验是否超过三年
+			if time.Date(now.Year(), now.Month(), now.Day(), 23, 59, 59, 59, now.Location()).
+				AddDate(3, 0, 0).Before(util.GetDATE(date_unit, date_count, endUnix)) && !isTrail {
+				return &entity.FuncResult{false, errors.New("订阅周期超过三年"), nil}
+			}
+			needRenew = true
+		}
+		area_select := true                     //是否回显城市选择
+		if len(*area) == 0 && area_count != 0 { //升级时为传入选择省份
+			(*area)["areacount"] = area_count
+			area_select = false
+		}
+		newBuyset := entity.JyVipSubStruct.NewBuySet(area, nil, true) //改版后只能购买升级版超级订阅
+
+		//升级校验
+		totalPrice, subtotail := getNewUpgradeDetail(userId, newBuyset, oldBuyset, endUnix, date_count, date_unit)
+		if totalPrice < 0 {
+			if totalPrice == -1 {
+				return &entity.FuncResult{false, errors.New("不能升级此状态"), nil}
+			} else {
+				return &entity.FuncResult{false, errors.New("查询续费订单出错"), nil}
+			}
+		}
+
+		filter := entity.VipSimpleMsg{
+			Industry:         []string{}, //行业保存默认选择
+			Cyclecount:       date_count,
+			Cycleunit:        date_unit,
+			OldBuyset:        oldBuyset,
+			NewBuyset:        newBuyset,
+			UpgradeSubtotail: subtotail,
+			OrderType:        3,
+			DisWord:          "",
+		}
+		if area_select {
+			filter.Area = area
+		}
+
+		var startTime, endTime time.Time = time.Unix(startUnix, 0), time.Unix(endUnix, 0)
+		if needRenew {
+			startTime = now
+			if needRenew {
+				endTime = util.GetDATE(filter.Cycleunit, filter.Cyclecount, endUnix)
+			} else {
+				endTime = time.Unix(endUnix, 0)
+			}
+		}
+
+		final_price, discount_price := totalPrice, 0
+		if req_price != final_price {
+			return &entity.FuncResult{false, errors.New(fmt.Sprintf("金额校验异常[%d,%d]", final_price, req_price)), nil}
+		}
+		order_status := 0
+		//老用户 0元升级
+		if req_price == 0 && 0 == final_price {
+			if oldBuyset.Upgrade == 0 {
+				order_status = 1
+			} else {
+				return &entity.FuncResult{false, errors.New("超级订阅升级异常"), nil}
+			}
+		}
+		//卡卷使用
+		userLotteryId, lotteryId := "", this.GetString("lotteryId")
+		full_price, reduce_price := 0, 0
+		var discount float64
+		if lotteryId != "" {
+			full_price, reduce_price, discount, userLotteryId = util.GetCouponInfo(userId, lotteryId, config.CouponConfig.Products["超级订阅"])
+			if reduce_price > 0 && full_price <= final_price {
+				if discount == 100 {
+					final_price = final_price - reduce_price
+					discount_price = reduce_price
+				} else {
+					//折扣
+					disCount_int := int(math.Ceil(discount * 100))
+					discount_price = final_price - final_price*disCount_int/1000
+					final_price = final_price * disCount_int / 1000
+				}
+			} else {
+				userLotteryId = ""
+			}
+		}
+		//测试打折
+		if entity.SubVipPrice.Discount < 1 {
+			tmp := float64(final_price) * entity.SubVipPrice.Discount
+			if tmp < 1 {
+				if tmp != 0 {
+					final_price = 1
+				}
+			} else {
+				final_price = int(tmp)
+			}
+		}
+
+		//创建订单
+		filterStr, err := json.Marshal(filter)
+		if err != nil {
+			return &entity.FuncResult{false, errors.New("订单数据生成异常"), nil}
+		}
+		disWord := ""
+		//查询用户是否有分销链接
+		disWordStr := ""
+		userfilter, ok := util.MQFW.FindById("user", userId, "")
+		if ok && userfilter != nil {
+			startTime := qutil.Int64All((*userfilter)["startTime"])
+			endTime := qutil.Int64All((*userfilter)["endTime"])
+			if startTime != 0 {
+				if startTime <= time.Now().Unix() && endTime >= time.Now().Unix() {
+					disWordStr = qutil.ObjToString((*userfilter)["disWords"])
+				}
+			}
+		}
+		if disWordStr != "" {
+			disWord = disWordStr
+		}
+		ordercode := pay.GetOrderCode(userId)
+		/*if disWord == "" {
+			start_time := TimeProcessing(time.Now().Format(DateFullLayout), -config.Config.TermValidity).Format(DateFullLayout)
+			stop_time := TimeProcessing(time.Now().Format(DateFullLayout), config.Config.TermValidity).Format(DateFullLayout)
+			infoList := util.Mysql.SelectBySql("select  * from  dis_word where userId=?  and  ?<=start_time  and stop_time<? ORDER BY id ", userId, start_time, stop_time)
+			if len(*infoList) != 0 {
+				disWord = fmt.Sprint((*infoList)[0]["password"])
+			}
+		}*/
+		distributionChannel, orderChannel := util.GetJyOrderChannel(disWord, this.Header("User-Agent"))
+		entId := qutil.Int64All(this.GetSession("entId"))
+		buy_subject := 1
+		if entId > 0 {
+			buy_subject = 2
+		}
+		insertMap := map[string]interface{}{
+			"order_money":          final_price,
+			"order_status":         order_status,
+			"user_openid":          openId,
+			"order_code":           ordercode,
+			"product_type":         "VIP订阅",
+			"create_time":          FormatDate(&now, Date_Full_Layout),
+			"original_price":       final_price + discount_price, //原价
+			"filter_id":            "",
+			"user_id":              userId,
+			"filter":               string(filterStr), //筛选
+			"vip_endtime":          FormatDate(&endTime, Date_Full_Layout),
+			"vip_starttime":        FormatDate(&startTime, Date_Full_Layout),
+			"discount_price":       discount_price,
+			"d_relation_id":        userLotteryId,
+			"vip_type":             2, //立即升级
+			"user_phone":           order_phone,
+			"dis_word":             disWord,
+			"distribution_channel": distributionChannel, //销售渠道
+			"order_channel":        orderChannel,        //下单渠道
+			"audit_status":         3,                   //默认审核通过
+			"buy_subject":          buy_subject,
+			"ent_id":               entId,
+		}
+		if order_phone != "" {
+			if !jy.PhoneReg.MatchString(order_phone) {
+				return &entity.FuncResult{false, errors.New("手机号格式异常"), nil}
+			}
+		} else if userfilter == nil || len(*userfilter) > 0 {
+			order_phone, _ = qutil.If((*userfilter)["s_phone"] != nil, (*userfilter)["s_phone"], (*userfilter)["s_m_phone"]).(string)
+
+		}
+		insertMap["user_phone"] = order_phone
+		orderid := util.Mysql.Insert("dataexport_order", insertMap)
+		if orderid == -1 {
+			return &entity.FuncResult{false, errors.New("数据库操作异常"), nil}
+		}
+		//老用户升级 一个省 全行业 时间不变 会出现零元升级得情况 0元升级直接到支付成功页面 开通超级订阅
+		if req_price == 0 && 0 == final_price && oldBuyset.Upgrade == 0 {
+			//后期
+			if !entity.JyVipSubStruct.StartSubVip(userId, filter, time.Unix(startUnix, 0), time.Unix(endUnix, 0), false, 0, 0, 0) {
+				return &entity.FuncResult{false, errors.New("老用户升级超级订阅高版本异常"), nil}
+			}
+			return &entity.FuncResult{true, nil, map[string]interface{}{"code": ordercode, "needPay": false}}
+		}
+		//绑定卡卷
+		if userLotteryId != "" && lotteryId != "" {
+			go func(userId, userLotteryId, order_code string) {
+				nickname, _ := this.Session().Get("s_nickname").(string)
+				if !util.UpdateCouponState(userId, userLotteryId, nickname, order_phone, order_code, "VIP订阅", "", 3, 0) {
+					log.Println(fmt.Sprintf("单号%s-绑定失败-卡卷%s", order_code, userLotteryId))
+				}
+			}(userId, userLotteryId, ordercode)
+		}
+		return &entity.FuncResult{true, nil, map[string]interface{}{"code": ordercode, "needPay": true}}
+	}()
+	if r.Err != nil {
+		log.Printf("%s Upgrade err:%v\n", userId, r.Err.Error())
+	}
+	this.ServeJson(r.Format())
 }
 
 //获取新版超级订阅升级价格、清单
 func getNewUpgradeDetail(userId string, newBuySet, oldBuySet *entity.SubvipBuySet, oldEndtime int64, count, unit int) (totalPrice int, subtotals []map[string]interface{}) {
-        rResult, ok := util.MQFW.Find("vip_upgrade", &bson.M{"s_userid": userId, "i_isvalid": 0}, `{"l_validtime":1}`, `{"o_buyset":1,"l_validtime":1}`, false, -1, -1)
-        if !ok {
-                return -2, nil
-        }
-        nowEndTime := oldEndtime
-        if len(*rResult) != 0 {
-                for i := len(*rResult) - 1; i >= 0; i-- {
-                        thisObj := qutil.ObjToMap((*rResult)[i])
-                        thisStartTime := qutil.Int64All((*thisObj)["l_validtime"])
-                        buySetMap := qutil.ObjToMap((*thisObj)["o_buyset"])
-                        thisBuyset := entity.JyVipSubStruct.GetMergeNewBuyset(*buySetMap)
-
-                        this_price := entity.JyVipSubStruct.GetSubtotalPrice(thisBuyset, newBuySet, qutil.Int64All((*thisObj)["l_validtime"]), nowEndTime)
-                        if this_price < 0 {
-                                return -1, nil
-                        }
-                        totalPrice += this_price
-                        subtotals = append(subtotals, map[string]interface{}{
-                                "type":      1,
-                                "startTime": thisStartTime,
-                                "endTime":   nowEndTime,
-                                "price":     this_price,
-                                "oldBuyset": thisBuyset,
-                        })
-                        nowEndTime = thisStartTime
-                }
-        }
-        //当前升级
-        now := time.Now()
-        price_now := entity.JyVipSubStruct.GetSubtotalPrice(oldBuySet, newBuySet, now.Unix(), nowEndTime)
-        if price_now < 0 {
-                return -1, nil
-        }
-        totalPrice += price_now
-        subtotals = append(subtotals, map[string]interface{}{
-                "type":      0,
-                "startTime": now.Unix(),
-                "endTime":   nowEndTime,
-                "price":     price_now,
-                "oldBuyset": oldBuySet,
-        })
-        //此次新增续费价格计算
-        if count > 0 {
-                renew_price := entity.JyVipSubStruct.GetSubVipPriceByBuySet(newBuySet, count, unit, false)
-                if renew_price < 0 {
-                        return -1, nil
-                }
-                totalPrice += renew_price
-                subtotals = append(subtotals, map[string]interface{}{
-                        "type":      2,
-                        "startTime": oldEndtime,
-                        "endTime":   util.GetDATE(unit, count, oldEndtime).Unix(),
-                        "price":     renew_price,
-                })
-        }
-        log.Printf("%s升级所需费用%d 计价清单%v\n", userId, totalPrice, subtotals)
-        return totalPrice, subtotals
+	rResult, ok := util.MQFW.Find("vip_upgrade", &bson.M{"s_userid": userId, "i_isvalid": 0}, `{"l_validtime":1}`, `{"o_buyset":1,"l_validtime":1}`, false, -1, -1)
+	if !ok {
+		return -2, nil
+	}
+	nowEndTime := oldEndtime
+	if len(*rResult) != 0 {
+		for i := len(*rResult) - 1; i >= 0; i-- {
+			thisObj := qutil.ObjToMap((*rResult)[i])
+			thisStartTime := qutil.Int64All((*thisObj)["l_validtime"])
+			buySetMap := qutil.ObjToMap((*thisObj)["o_buyset"])
+			thisBuyset := entity.JyVipSubStruct.GetMergeNewBuyset(*buySetMap)
+
+			this_price := entity.JyVipSubStruct.GetSubtotalPrice(thisBuyset, newBuySet, qutil.Int64All((*thisObj)["l_validtime"]), nowEndTime)
+			if this_price < 0 {
+				return -1, nil
+			}
+			totalPrice += this_price
+			subtotals = append(subtotals, map[string]interface{}{
+				"type":      1,
+				"startTime": thisStartTime,
+				"endTime":   nowEndTime,
+				"price":     this_price,
+				"oldBuyset": thisBuyset,
+			})
+			nowEndTime = thisStartTime
+		}
+	}
+	//当前升级
+	now := time.Now()
+	price_now := entity.JyVipSubStruct.GetSubtotalPrice(oldBuySet, newBuySet, now.Unix(), nowEndTime)
+	if price_now < 0 {
+		return -1, nil
+	}
+	totalPrice += price_now
+	subtotals = append(subtotals, map[string]interface{}{
+		"type":      0,
+		"startTime": now.Unix(),
+		"endTime":   nowEndTime,
+		"price":     price_now,
+		"oldBuyset": oldBuySet,
+	})
+	//此次新增续费价格计算
+	if count > 0 {
+		renew_price := entity.JyVipSubStruct.GetSubVipPriceByBuySet(newBuySet, count, unit, false)
+		if renew_price < 0 {
+			return -1, nil
+		}
+		totalPrice += renew_price
+		subtotals = append(subtotals, map[string]interface{}{
+			"type":      2,
+			"startTime": oldEndtime,
+			"endTime":   util.GetDATE(unit, count, oldEndtime).Unix(),
+			"price":     renew_price,
+		})
+	}
+	log.Printf("%s升级所需费用%d 计价清单%v\n", userId, totalPrice, subtotals)
+	return totalPrice, subtotals
 }
 
 //是否需要升级
 func needUpgrade(newBuySet, oldBuySet *entity.SubvipBuySet) bool {
-        if newBuySet.Upgrade != 1 { //旧版本订阅是否需要升级校验
-                BuyerclassUpgrade, AreaNeedUpgrade := false, false
-                UpgradeBuyset := &entity.SubvipBuySet{
-                        oldBuySet.Upgrade,
-                        oldBuySet.AreaCount,
-                        oldBuySet.NewCitys,
-                        oldBuySet.BuyerclassCount,
-                }
-                //比较行业
-                if oldBuySet.BuyerclassCount != -1 {
-                        //若当前买的不是全行业,并且当前行业数量小于新行业数量时
-                        if oldBuySet.BuyerclassCount < newBuySet.BuyerclassCount || newBuySet.BuyerclassCount == -1 {
-                                BuyerclassUpgrade = true
-                                //计算升级后的buySet
-                                UpgradeBuyset.BuyerclassCount = newBuySet.BuyerclassCount
-                        }
-                }
-                //比较地区
-                if oldBuySet.AreaCount != -1 {
-                        if newBuySet.AreaCount == -1 { //升级为全国
-                                UpgradeBuyset.AreaCount = newBuySet.AreaCount
-                                UpgradeBuyset.NewCitys = newBuySet.NewCitys
-                                AreaNeedUpgrade = true
-                        } else {
-                                oldCitysBuyOne, oldCitysBuyTwo := 0, 0
-                                newCitysBuyOne, newCitysBuyTwo := 0, 0
-                                oldCopy := []int{} //复制(防止影响原数组)
-                                for _, v := range oldBuySet.NewCitys {
-                                        if v == 1 {
-                                                oldCitysBuyOne++
-                                        } else {
-                                                oldCitysBuyTwo++
-                                        }
-                                        oldCopy = append(oldCopy, v)
-                                }
-                                UpgradeBuyset.NewCitys = oldCopy
-                                for _, v := range newBuySet.NewCitys {
-                                        if v == 1 {
-                                                newCitysBuyOne++
-                                        } else {
-                                                newCitysBuyTwo++
-                                        }
-                                }
-
-                                p_Diff := newBuySet.AreaCount - oldBuySet.AreaCount
-                                c_1_diff := newCitysBuyOne - oldCitysBuyOne
-                                c_2_diff := newCitysBuyTwo - oldCitysBuyTwo
-
-                                if p_Diff > 0 {
-                                        UpgradeBuyset.AreaCount = newBuySet.AreaCount
-                                }
-
-                                if p_Diff > 0 || p_Diff+c_2_diff > 0 || p_Diff+c_2_diff+c_1_diff > 0 {
-                                        //有多余未使用名额保留
-                                        if p_Diff+c_2_diff+c_1_diff < 0 {
-                                                if c_1_diff < 0 && p_Diff+c_2_diff >= 0 {
-                                                        c_1_diff = -(p_Diff + c_2_diff)
-                                                }
-                                                if c_2_diff < 0 && p_Diff+c_1_diff >= 0 {
-                                                        c_2_diff = -(p_Diff + c_1_diff)
-                                                }
-                                        }
-
-                                        //需要升级
-                                        AreaNeedUpgrade = true
-                                        //计算升级后的buySet
-                                        if p_Diff < 0 { //有剩余省份未使用
-                                                if c_2_diff > 0 {
-                                                        c_2_diff += p_Diff //转移给两个市使用
-                                                } else {
-                                                        c_1_diff += p_Diff //转移给一个市使用
-                                                }
-                                        } else { //省份数量增加
-                                                UpgradeBuyset.AreaCount = newBuySet.AreaCount
-                                        }
-                                        del_2_flag, del_1_flag := 0, 0 //被占用
-                                        if c_2_diff < 0 {              //有两个城市的名额未使用完
-                                                if p_Diff > 0 {
-                                                        //转移给一个省使用
-                                                        if c_2_diff+p_Diff > 0 {
-                                                                del_2_flag += -c_2_diff
-                                                                c_2_diff = 0
-                                                                //p_Diff -= -c_2_diff;
-                                                        } else {
-                                                                c_2_diff += p_Diff
-                                                                del_2_flag += p_Diff
-                                                                //p_Diff = 0
-                                                        }
-                                                }
-                                                if c_1_diff > 0 && c_2_diff < 0 { //转移给一个市使用
-                                                        c_1_diff += c_2_diff
-                                                }
-                                        }
-                                        if c_1_diff < 0 { //有一个城市的名额未使用完
-                                                if p_Diff > 0 {
-                                                        if c_1_diff+p_Diff > 0 {
-                                                                del_1_flag += -c_1_diff
-                                                                c_1_diff = 0
-                                                                //p_Diff -= -c_1_diff
-                                                        } else {
-                                                                c_1_diff += p_Diff
-                                                                del_1_flag += p_Diff
-                                                                //p_Diff = 0
-                                                        }
-                                                }
-                                                if c_2_diff > 0 && c_1_diff < 0 {
-                                                        if c_1_diff+c_2_diff > 0 {
-                                                                del_1_flag += -c_1_diff
-                                                                c_1_diff = 0
-                                                                //c_2_diff -= -c_1_diff;
-                                                        } else {
-                                                                c_1_diff += c_2_diff
-                                                                del_1_flag += c_2_diff
-                                                                //c_2_diff = 0
-                                                        }
-                                                }
-                                        }
-                                        //删除顶替
-                                        index_flag := 0
-                                        for del_2_flag > 0 || del_1_flag > 0 {
-                                                valueFlag := UpgradeBuyset.NewCitys[index_flag]
-                                                if del_2_flag > 0 && valueFlag == 2 {
-                                                        UpgradeBuyset.NewCitys = append(UpgradeBuyset.NewCitys[:index_flag], UpgradeBuyset.NewCitys[index_flag+1:]...)
-                                                        del_2_flag--
-                                                        continue
-                                                } else if del_1_flag > 0 && valueFlag == 1 {
-                                                        UpgradeBuyset.NewCitys = append(UpgradeBuyset.NewCitys[:index_flag], UpgradeBuyset.NewCitys[index_flag+1:]...)
-                                                        del_1_flag--
-                                                        continue
-                                                }
-                                                index_flag++
-                                        }
-                                        //增加新增
-                                        for i := c_2_diff; i > 0; i-- { //添加购买两个市数量
-                                                UpgradeBuyset.NewCitys = append(UpgradeBuyset.NewCitys, 2)
-                                        }
-
-                                        for i := c_1_diff; i > 0; i-- { //添加购买一个市数量
-                                                UpgradeBuyset.NewCitys = append(UpgradeBuyset.NewCitys, 1)
-                                        }
-                                } else {
-                                        //不需要升级
-                                        AreaNeedUpgrade = false
-                                }
-                        }
-                }
-                if BuyerclassUpgrade || AreaNeedUpgrade {
-                        return true
-                } else {
-                        return false
-                }
-        } else {
-                //return newBuySet.AreaCount == -1 || newBuySet.AreaCount > oldBuySet.AreaCount
-                if oldBuySet.AreaCount != -1 {
-                        return newBuySet.AreaCount == -1 || newBuySet.AreaCount > oldBuySet.AreaCount
-                } else {
-                        return false
-                }
-        }
+	if newBuySet.Upgrade != 1 { //旧版本订阅是否需要升级校验
+		BuyerclassUpgrade, AreaNeedUpgrade := false, false
+		UpgradeBuyset := &entity.SubvipBuySet{
+			oldBuySet.Upgrade,
+			oldBuySet.AreaCount,
+			oldBuySet.NewCitys,
+			oldBuySet.BuyerclassCount,
+		}
+		//比较行业
+		if oldBuySet.BuyerclassCount != -1 {
+			//若当前买的不是全行业,并且当前行业数量小于新行业数量时
+			if oldBuySet.BuyerclassCount < newBuySet.BuyerclassCount || newBuySet.BuyerclassCount == -1 {
+				BuyerclassUpgrade = true
+				//计算升级后的buySet
+				UpgradeBuyset.BuyerclassCount = newBuySet.BuyerclassCount
+			}
+		}
+		//比较地区
+		if oldBuySet.AreaCount != -1 {
+			if newBuySet.AreaCount == -1 { //升级为全国
+				UpgradeBuyset.AreaCount = newBuySet.AreaCount
+				UpgradeBuyset.NewCitys = newBuySet.NewCitys
+				AreaNeedUpgrade = true
+			} else {
+				oldCitysBuyOne, oldCitysBuyTwo := 0, 0
+				newCitysBuyOne, newCitysBuyTwo := 0, 0
+				oldCopy := []int{} //复制(防止影响原数组)
+				for _, v := range oldBuySet.NewCitys {
+					if v == 1 {
+						oldCitysBuyOne++
+					} else {
+						oldCitysBuyTwo++
+					}
+					oldCopy = append(oldCopy, v)
+				}
+				UpgradeBuyset.NewCitys = oldCopy
+				for _, v := range newBuySet.NewCitys {
+					if v == 1 {
+						newCitysBuyOne++
+					} else {
+						newCitysBuyTwo++
+					}
+				}
+
+				p_Diff := newBuySet.AreaCount - oldBuySet.AreaCount
+				c_1_diff := newCitysBuyOne - oldCitysBuyOne
+				c_2_diff := newCitysBuyTwo - oldCitysBuyTwo
+
+				if p_Diff > 0 {
+					UpgradeBuyset.AreaCount = newBuySet.AreaCount
+				}
+
+				if p_Diff > 0 || p_Diff+c_2_diff > 0 || p_Diff+c_2_diff+c_1_diff > 0 {
+					//有多余未使用名额保留
+					if p_Diff+c_2_diff+c_1_diff < 0 {
+						if c_1_diff < 0 && p_Diff+c_2_diff >= 0 {
+							c_1_diff = -(p_Diff + c_2_diff)
+						}
+						if c_2_diff < 0 && p_Diff+c_1_diff >= 0 {
+							c_2_diff = -(p_Diff + c_1_diff)
+						}
+					}
+
+					//需要升级
+					AreaNeedUpgrade = true
+					//计算升级后的buySet
+					if p_Diff < 0 { //有剩余省份未使用
+						if c_2_diff > 0 {
+							c_2_diff += p_Diff //转移给两个市使用
+						} else {
+							c_1_diff += p_Diff //转移给一个市使用
+						}
+					} else { //省份数量增加
+						UpgradeBuyset.AreaCount = newBuySet.AreaCount
+					}
+					del_2_flag, del_1_flag := 0, 0 //被占用
+					if c_2_diff < 0 {              //有两个城市的名额未使用完
+						if p_Diff > 0 {
+							//转移给一个省使用
+							if c_2_diff+p_Diff > 0 {
+								del_2_flag += -c_2_diff
+								c_2_diff = 0
+								//p_Diff -= -c_2_diff;
+							} else {
+								c_2_diff += p_Diff
+								del_2_flag += p_Diff
+								//p_Diff = 0
+							}
+						}
+						if c_1_diff > 0 && c_2_diff < 0 { //转移给一个市使用
+							c_1_diff += c_2_diff
+						}
+					}
+					if c_1_diff < 0 { //有一个城市的名额未使用完
+						if p_Diff > 0 {
+							if c_1_diff+p_Diff > 0 {
+								del_1_flag += -c_1_diff
+								c_1_diff = 0
+								//p_Diff -= -c_1_diff
+							} else {
+								c_1_diff += p_Diff
+								del_1_flag += p_Diff
+								//p_Diff = 0
+							}
+						}
+						if c_2_diff > 0 && c_1_diff < 0 {
+							if c_1_diff+c_2_diff > 0 {
+								del_1_flag += -c_1_diff
+								c_1_diff = 0
+								//c_2_diff -= -c_1_diff;
+							} else {
+								c_1_diff += c_2_diff
+								del_1_flag += c_2_diff
+								//c_2_diff = 0
+							}
+						}
+					}
+					//删除顶替
+					index_flag := 0
+					for del_2_flag > 0 || del_1_flag > 0 {
+						valueFlag := UpgradeBuyset.NewCitys[index_flag]
+						if del_2_flag > 0 && valueFlag == 2 {
+							UpgradeBuyset.NewCitys = append(UpgradeBuyset.NewCitys[:index_flag], UpgradeBuyset.NewCitys[index_flag+1:]...)
+							del_2_flag--
+							continue
+						} else if del_1_flag > 0 && valueFlag == 1 {
+							UpgradeBuyset.NewCitys = append(UpgradeBuyset.NewCitys[:index_flag], UpgradeBuyset.NewCitys[index_flag+1:]...)
+							del_1_flag--
+							continue
+						}
+						index_flag++
+					}
+					//增加新增
+					for i := c_2_diff; i > 0; i-- { //添加购买两个市数量
+						UpgradeBuyset.NewCitys = append(UpgradeBuyset.NewCitys, 2)
+					}
+
+					for i := c_1_diff; i > 0; i-- { //添加购买一个市数量
+						UpgradeBuyset.NewCitys = append(UpgradeBuyset.NewCitys, 1)
+					}
+				} else {
+					//不需要升级
+					AreaNeedUpgrade = false
+				}
+			}
+		}
+		if BuyerclassUpgrade || AreaNeedUpgrade {
+			return true
+		} else {
+			return false
+		}
+	} else {
+		//return newBuySet.AreaCount == -1 || newBuySet.AreaCount > oldBuySet.AreaCount
+		if oldBuySet.AreaCount != -1 {
+			return newBuySet.AreaCount == -1 || newBuySet.AreaCount > oldBuySet.AreaCount
+		} else {
+			return false
+		}
+	}
 }
 
 func (this *SubscribeChange) MergeIndustry() {
-        industry := strings.Split(this.GetString("industry"), ",")
-        userId := qutil.ObjToString(this.GetSession("userId"))
-        isread, _ := this.GetBool("isread")
-        r := func() *entity.FuncResult {
-                if userId != "" {
-                        positionType := qutil.Int64All(this.GetSession("positionType"))
-                        updateOk := false
-                        if positionType == 0 {
-                                updateOk = util.MQFW.UpdateById("user", userId,
-                                        bson.M{"$set": bson.M{
-                                                "o_vipjy.a_buyerclass": industry, //设置行业
-                                                "isread":               isread,
-                                        }})
-                        } else {
-                                query := map[string]interface{}{
-                                        "i_userid": qutil.Int64All(this.GetSession("entUserId")),
-                                        "i_entid":  qutil.Int64All(this.GetSession("entId")),
-                                        "i_type":   1,
-                                }
-                                util.MQFW.UpdateById("user", userId,
-                                        bson.M{"$set": bson.M{
-                                                "isread": isread,
-                                        }})
-                                updateOk = util.MQFW.Update("entniche_rule", query,
-                                        bson.M{"$set": bson.M{
-                                                "o_entniche.a_buyerclass": industry, //设置行业
-                                        }}, true, false)
-                        }
-
-                        if updateOk {
-                                return &entity.FuncResult{true, nil, nil}
-                        } else {
-
-                                return &entity.FuncResult{false, nil, nil}
-                        }
-                } else {
-                        return &entity.FuncResult{false, nil, nil}
-                }
-
-        }()
-
-        this.ServeJson(r.Format())
+	industry := strings.Split(this.GetString("industry"), ",")
+	userId := qutil.ObjToString(this.GetSession("userId"))
+	isread, _ := this.GetBool("isread")
+	r := func() *entity.FuncResult {
+		if userId != "" {
+			positionType := qutil.Int64All(this.GetSession("positionType"))
+			updateOk := false
+			if positionType == 0 {
+				updateOk = util.MQFW.UpdateById("user", userId,
+					bson.M{"$set": bson.M{
+						"o_vipjy.a_buyerclass": industry, //设置行业
+						"isread":               isread,
+					}})
+			} else {
+				query := map[string]interface{}{
+					"i_userid": qutil.Int64All(this.GetSession("entUserId")),
+					"i_entid":  qutil.Int64All(this.GetSession("entId")),
+					"i_type":   1,
+				}
+				util.MQFW.UpdateById("user", userId,
+					bson.M{"$set": bson.M{
+						"isread": isread,
+					}})
+				updateOk = util.MQFW.Update("entniche_rule", query,
+					bson.M{"$set": bson.M{
+						"o_entniche.a_buyerclass": industry, //设置行业
+					}}, true, false)
+			}
+
+			if updateOk {
+				return &entity.FuncResult{true, nil, nil}
+			} else {
+
+				return &entity.FuncResult{false, nil, nil}
+			}
+		} else {
+			return &entity.FuncResult{false, nil, nil}
+		}
+
+	}()
+
+	this.ServeJson(r.Format())
 }
 
 //超级订阅优化,免费订阅判断新老用户  1:新用户 0:老用户
 func NewUserByVIP(userId string, session *httpsession.Session) int {
-        /*mData, ok := util.MQFW.FindById("user", userId, `{"o_jy":1,"l_registedate":1}`)
-          if !ok || len(*mData) == 0 || mData == nil {
-          	return 1
-          }
-          ojy, _ := (*mData)["o_jy"].(map[string]interface{})*/
-        mData := jy.GetBigVipUserBaseMsg("10000", session, config.Config.Etcd.Hosts, config.Config.Etcd.Key)
-        ojy := jy.GetSubScribeInfo(session, util.MQFW, "f", "10000")
-        if len(*ojy) > 0 {
-                if (*ojy)["i_new"] != nil {
-                        return qutil.IntAllDef((*ojy)["i_new"], 1)
-                }
-                optime, _ := time.ParseInLocation(Date_Full_Layout, config.Config.OptimalTime, time.Local)
-                regtime := mData.Data.Free.Registedate
-                //如果a_key 存在 即为老用户
-                if ((*ojy)["a_key"] == nil && time.Unix(regtime, 0).Before(optime)) || (time.Unix(regtime, 0).After(optime)) {
-                        return 1
-                }
-        }
-        return 0
+	/*mData, ok := util.MQFW.FindById("user", userId, `{"o_jy":1,"l_registedate":1}`)
+	  if !ok || len(*mData) == 0 || mData == nil {
+	  	return 1
+	  }
+	  ojy, _ := (*mData)["o_jy"].(map[string]interface{})*/
+	mData := jy.GetBigVipUserBaseMsg(session, *config.Middleground)
+	ojy := jy.GetSubScribeInfo(session, util.MQFW, "f", "10000")
+	if len(*ojy) > 0 {
+		if (*ojy)["i_new"] != nil {
+			return qutil.IntAllDef((*ojy)["i_new"], 1)
+		}
+		optime, _ := time.ParseInLocation(Date_Full_Layout, config.Config.OptimalTime, time.Local)
+		regtime := mData.Data.Free.Registedate
+		//如果a_key 存在 即为老用户
+		if ((*ojy)["a_key"] == nil && time.Unix(regtime, 0).Before(optime)) || (time.Unix(regtime, 0).After(optime)) {
+			return 1
+		}
+	}
+	return 0
 }

+ 533 - 533
src/jfw/modules/subscribepay/src/service/vipSubscribePay.go

@@ -1,577 +1,577 @@
 package service
 
 import (
-        "app.yhyue.com/moapp/jybase/go-xweb/httpsession"
-        "encoding/json"
-        "errors"
-        "fmt"
-        "jy/src/jfw/modules/subscribepay/src/active"
-        "jy/src/jfw/modules/subscribepay/src/config"
-        "jy/src/jfw/modules/subscribepay/src/entity"
-        "jy/src/jfw/modules/subscribepay/src/pay"
-        "jy/src/jfw/modules/subscribepay/src/util"
-        "log"
-        "math"
-        "strconv"
-        "strings"
-        "time"
+	"app.yhyue.com/moapp/jybase/go-xweb/httpsession"
+	"encoding/json"
+	"errors"
+	"fmt"
+	"jy/src/jfw/modules/subscribepay/src/active"
+	"jy/src/jfw/modules/subscribepay/src/config"
+	"jy/src/jfw/modules/subscribepay/src/entity"
+	"jy/src/jfw/modules/subscribepay/src/pay"
+	"jy/src/jfw/modules/subscribepay/src/util"
+	"log"
+	"math"
+	"strconv"
+	"strings"
+	"time"
 
-        qutil "app.yhyue.com/moapp/jybase/common"
-        . "app.yhyue.com/moapp/jybase/date"
-        "app.yhyue.com/moapp/jybase/go-xweb/xweb"
-        "app.yhyue.com/moapp/jypkg/common/src/qfw/util/jy"
+	qutil "app.yhyue.com/moapp/jybase/common"
+	. "app.yhyue.com/moapp/jybase/date"
+	"app.yhyue.com/moapp/jybase/go-xweb/xweb"
+	"app.yhyue.com/moapp/jypkg/common/src/qfw/util/jy"
 )
 
 //vip订阅付费
 type SubVipPayOrder struct {
-        *xweb.Action
-        getPrice       xweb.Mapper `xweb:"/vipsubscribe/getPrice"`       //获取价格
-        createOrder    xweb.Mapper `xweb:"/vipsubscribe/createOrder"`    //创建订单并支付
-        renew          xweb.Mapper `xweb:"/vipsubscribe/renew"`          //续费超级订阅
-        getSelectPrice xweb.Mapper `xweb:"/vipsubscribe/getSelectPrice"` //获取当前选择内容的价格
+	*xweb.Action
+	getPrice       xweb.Mapper `xweb:"/vipsubscribe/getPrice"`       //获取价格
+	createOrder    xweb.Mapper `xweb:"/vipsubscribe/createOrder"`    //创建订单并支付
+	renew          xweb.Mapper `xweb:"/vipsubscribe/renew"`          //续费超级订阅
+	getSelectPrice xweb.Mapper `xweb:"/vipsubscribe/getSelectPrice"` //获取当前选择内容的价格
 }
 
 func init() {
-        xweb.AddAction(&SubVipPayOrder{})
+	xweb.AddAction(&SubVipPayOrder{})
 }
 
 // 获取当前选择内容的价格
 func (this *SubVipPayOrder) GetSelectPrice() {
-        userId := qutil.ObjToString(this.GetSession("userId"))
-        r := func() *entity.FuncResult {
-                area := qutil.ObjToMap(this.GetString("area")) //地区
-                timeRenew := this.GetString("time")            //周期
-                orderType, _ := this.GetInteger("orderType")   //1 购买;2 续费;3 升级
-                //卡卷信息的id
-                lotteryId := this.GetString("lotteryId")
-                useProduct, _ := this.GetInteger("useProduct")
-                return CommonBilling(area, timeRenew, userId, lotteryId, orderType, useProduct, this.Session())
-        }()
-        if r.Err != nil {
-                log.Printf("%s 价格计算 err:%v\n", userId, r.Err.Error())
-        }
-        this.ServeJson(r.Format())
+	userId := qutil.ObjToString(this.GetSession("userId"))
+	r := func() *entity.FuncResult {
+		area := qutil.ObjToMap(this.GetString("area")) //地区
+		timeRenew := this.GetString("time")            //周期
+		orderType, _ := this.GetInteger("orderType")   //1 购买;2 续费;3 升级
+		//卡卷信息的id
+		lotteryId := this.GetString("lotteryId")
+		useProduct, _ := this.GetInteger("useProduct")
+		return CommonBilling(area, timeRenew, userId, lotteryId, orderType, useProduct, this.Session())
+	}()
+	if r.Err != nil {
+		log.Printf("%s 价格计算 err:%v\n", userId, r.Err.Error())
+	}
+	this.ServeJson(r.Format())
 }
 func CommonBilling(area *map[string]interface{}, timeRenew, userId, lotteryId string, orderType, useProduct int, session *httpsession.Session) *entity.FuncResult {
-        //area := qutil.ObjToMap(this.GetString("area")) //地区
-        //timeRenew := this.GetString("time")            //周期
-        //orderType, _ := this.GetInteger("orderType")   //1 购买;2 续费;3 升级
-        // 原价;订单价
-        original_price, order_price := 0, 0
-        userMsg := jy.GetBigVipUserBaseMsg("10000", session, config.Config.Etcd.Hosts, config.Config.Etcd.Key)
-        if (userMsg.VipStatus > 0 && orderType == 1) || (userMsg.VipStatus <= 0 && (orderType == 3 || orderType == 2)) {
-                return &entity.FuncResult{false, errors.New("参数异常"), nil}
-        } else if userMsg.VipStatus <= 0 && orderType == 1 { //购买价格
-                date_count, date_unit, err := entity.JyVipSubStruct.CheckReqDate(timeRenew)
-                if err != nil {
-                        return &entity.FuncResult{false, err, nil}
-                }
-                buyset := entity.JyVipSubStruct.NewBuySet(area, nil, true) //改版后只能购买升级版超级订阅
-                //计算价格
-                original_price = entity.JyVipSubStruct.GetSubVipPrice(buyset, date_count, date_unit)
-        } else if userMsg.VipStatus > 0 { //2:续费价格(只延长时间);3:升级价格(升级只升级地区)
-                rData, oldBuyset, _ := entity.JyVipSubStruct.GetVipDetail(userId)
-                switch orderType {
-                case 2:
-                        now := time.Now()
-                        date_count, date_unit, err := entity.JyVipSubStruct.CheckReqDate(timeRenew)
-                        if err != nil {
-                                return &entity.FuncResult{false, err, nil}
-                        }
-                        endUnix := qutil.Int64All((*rData)["l_vip_endtime"])
-                        isTrail := qutil.IntAll((*rData)["i_vip_status"]) == 1
-                        if time.Date(now.Year(), now.Month(), now.Day(), 23, 59, 59, 59, now.Location()).
-                                AddDate(3, 0, 0).Before(util.GetDATE(date_unit, date_count, endUnix)) && !isTrail {
-                                return &entity.FuncResult{false, errors.New("订阅周期超过三年"), nil}
-                        }
-                        original_price = entity.JyVipSubStruct.GetSubVipPriceByBuySet(oldBuyset, date_count, date_unit, false)
-                case 3:
-                        endUnix := qutil.Int64All((*rData)["l_vip_endtime"])
-                        newBuyset := entity.JyVipSubStruct.NewBuySet(area, nil, true) //改版后只能购买升级版超级订阅
-                        //升级校验
-                        original_price, _ = getNewUpgradeDetail(userId, newBuyset, oldBuyset, endUnix, 0, 0)
-                        if original_price < 0 {
-                                if original_price == -1 {
-                                        return &entity.FuncResult{false, errors.New("不能升级此状态"), nil}
-                                } else {
-                                        return &entity.FuncResult{false, errors.New("查询续费订单出错"), nil}
-                                }
-                        }
-                }
-        }
-        order_price = original_price
-        //卡卷信息的id
-        if lotteryId != "" {
-                products := config.CouponConfig.Products["超级订阅"]
-                if useProduct > 0 {
-                        products = strconv.Itoa(useProduct)
-                }
-                full_price, reduce_price := 0, 0
-                var discount float64
-                full_price, reduce_price, discount, _ = util.GetCouponInfo(userId, lotteryId, products)
-                if full_price <= original_price {
-                        if discount == 100 { //满减
-                                order_price = original_price - reduce_price
-                        } else { //满折
-                                disCount_int := int(math.Ceil(discount * 100))
-                                order_price = original_price * disCount_int / 1000
-                        }
-                }
-        }
-        return &entity.FuncResult{true, nil, map[string]interface{}{
-                "original_price": original_price,
-                "order_price":    order_price,
-        },
-        }
+	//area := qutil.ObjToMap(this.GetString("area")) //地区
+	//timeRenew := this.GetString("time")            //周期
+	//orderType, _ := this.GetInteger("orderType")   //1 购买;2 续费;3 升级
+	// 原价;订单价
+	original_price, order_price := 0, 0
+	userMsg := jy.GetBigVipUserBaseMsg(session, *config.Middleground)
+	if (userMsg.VipStatus > 0 && orderType == 1) || (userMsg.VipStatus <= 0 && (orderType == 3 || orderType == 2)) {
+		return &entity.FuncResult{false, errors.New("参数异常"), nil}
+	} else if userMsg.VipStatus <= 0 && orderType == 1 { //购买价格
+		date_count, date_unit, err := entity.JyVipSubStruct.CheckReqDate(timeRenew)
+		if err != nil {
+			return &entity.FuncResult{false, err, nil}
+		}
+		buyset := entity.JyVipSubStruct.NewBuySet(area, nil, true) //改版后只能购买升级版超级订阅
+		//计算价格
+		original_price = entity.JyVipSubStruct.GetSubVipPrice(buyset, date_count, date_unit)
+	} else if userMsg.VipStatus > 0 { //2:续费价格(只延长时间);3:升级价格(升级只升级地区)
+		rData, oldBuyset, _ := entity.JyVipSubStruct.GetVipDetail(userId)
+		switch orderType {
+		case 2:
+			now := time.Now()
+			date_count, date_unit, err := entity.JyVipSubStruct.CheckReqDate(timeRenew)
+			if err != nil {
+				return &entity.FuncResult{false, err, nil}
+			}
+			endUnix := qutil.Int64All((*rData)["l_vip_endtime"])
+			isTrail := qutil.IntAll((*rData)["i_vip_status"]) == 1
+			if time.Date(now.Year(), now.Month(), now.Day(), 23, 59, 59, 59, now.Location()).
+				AddDate(3, 0, 0).Before(util.GetDATE(date_unit, date_count, endUnix)) && !isTrail {
+				return &entity.FuncResult{false, errors.New("订阅周期超过三年"), nil}
+			}
+			original_price = entity.JyVipSubStruct.GetSubVipPriceByBuySet(oldBuyset, date_count, date_unit, false)
+		case 3:
+			endUnix := qutil.Int64All((*rData)["l_vip_endtime"])
+			newBuyset := entity.JyVipSubStruct.NewBuySet(area, nil, true) //改版后只能购买升级版超级订阅
+			//升级校验
+			original_price, _ = getNewUpgradeDetail(userId, newBuyset, oldBuyset, endUnix, 0, 0)
+			if original_price < 0 {
+				if original_price == -1 {
+					return &entity.FuncResult{false, errors.New("不能升级此状态"), nil}
+				} else {
+					return &entity.FuncResult{false, errors.New("查询续费订单出错"), nil}
+				}
+			}
+		}
+	}
+	order_price = original_price
+	//卡卷信息的id
+	if lotteryId != "" {
+		products := config.CouponConfig.Products["超级订阅"]
+		if useProduct > 0 {
+			products = strconv.Itoa(useProduct)
+		}
+		full_price, reduce_price := 0, 0
+		var discount float64
+		full_price, reduce_price, discount, _ = util.GetCouponInfo(userId, lotteryId, products)
+		if full_price <= original_price {
+			if discount == 100 { //满减
+				order_price = original_price - reduce_price
+			} else { //满折
+				disCount_int := int(math.Ceil(discount * 100))
+				order_price = original_price * disCount_int / 1000
+			}
+		}
+	}
+	return &entity.FuncResult{true, nil, map[string]interface{}{
+		"original_price": original_price,
+		"order_price":    order_price,
+	},
+	}
 
 }
 
 //支付价格
 func (this *SubVipPayOrder) GetPrice() {
-        if active.ActiveConfig.DoubleEleven.Active_Start < time.Now().Unix() && active.ActiveConfig.DoubleEleven.Active_End > time.Now().Unix() {
-                res := map[string]interface{}{
-                        "isActiving": true,
-                        "isWritten":  0,
-                }
-                j, _ := json.Marshal(&entity.SubVipPrice)
-                json.Unmarshal(j, &res)
-                userId, _ := this.GetSession("userId").(string)
-                if userId != "" {
-                        data, ok := util.MQFW.FindById("user", userId, nil)
-                        if ok && data != nil && *data != nil {
-                                //已录入信息 已激活大会员赠送
-                                if (*data)["i_member_give"] != nil {
-                                        res["isWritten"] = qutil.IntAll((*data)["i_member_give"])
-                                }
-                        }
-                }
-                this.ServeJson(res)
-        } else {
-                this.ServeJson(entity.SubVipPrice)
-        }
+	if active.ActiveConfig.DoubleEleven.Active_Start < time.Now().Unix() && active.ActiveConfig.DoubleEleven.Active_End > time.Now().Unix() {
+		res := map[string]interface{}{
+			"isActiving": true,
+			"isWritten":  0,
+		}
+		j, _ := json.Marshal(&entity.SubVipPrice)
+		json.Unmarshal(j, &res)
+		userId, _ := this.GetSession("userId").(string)
+		if userId != "" {
+			data, ok := util.MQFW.FindById("user", userId, nil)
+			if ok && data != nil && *data != nil {
+				//已录入信息 已激活大会员赠送
+				if (*data)["i_member_give"] != nil {
+					res["isWritten"] = qutil.IntAll((*data)["i_member_give"])
+				}
+			}
+		}
+		this.ServeJson(res)
+	} else {
+		this.ServeJson(entity.SubVipPrice)
+	}
 }
 
 //新订单 或 即将到期续费
 //4.4 超级订阅升级 只能选择购买省份和全行业
 func (this *SubVipPayOrder) CreateOrder() {
-        userId := qutil.ObjToString(this.GetSession("userId"))
-        r := func() *entity.FuncResult {
-                area := qutil.ObjToMap(this.GetString("area"))
-                date := this.GetString("time")
-                orderType, _ := this.GetInteger("orderType") //1 简单付费,5 升降级续费
-                openId := qutil.ObjToString(this.GetSession("s_m_openid"))
-                disWord := this.GetString("disWord")
-                if disWord != "" {
-                        if len(strings.Split(disWord, "_")) > 1 {
-                                if fmt.Sprint(strings.Split(disWord, "_")[1]) == "GX" {
-                                        userfilter, ok := util.MQFW.FindById("user", userId, "")
-                                        if ok && userfilter != nil {
-                                                dis := qutil.ObjToString((*userfilter)["disWords"])
-                                                if dis != disWord {
-                                                        disWord = ""
-                                                }
-                                        }
-                                }
-                        }
-                }
-                //查询用户是否有分销链接
-                disWordStr := ""
-                userfilter, ok := util.MQFW.FindById("user", userId, "")
-                if ok && userfilter != nil {
-                        startTime := qutil.Int64All((*userfilter)["startTime"])
-                        endTime := qutil.Int64All((*userfilter)["endTime"])
-                        if startTime != 0 {
-                                if startTime <= time.Now().Unix() && endTime >= time.Now().Unix() {
-                                        disWordStr = qutil.ObjToString((*userfilter)["disWords"])
-                                }
-                        }
-                }
-                if disWordStr != "" {
-                        disWord = disWordStr
-                }
-                req_price, _ := this.GetInteger("price")     //前端展示金额
-                order_phone := this.GetString("order_phone") //p19.3用户信息采集 手机号
-                /*if disWord == "" {
-                	start_time := TimeProcessing(time.Now().Format(DateFullLayout), -config.Config.TermValidity).Format(DateFullLayout)
-                	stop_time := TimeProcessing(time.Now().Format(DateFullLayout), config.Config.TermValidity).Format(DateFullLayout)
-                	infoList := util.Mysql.SelectBySql("select  * from  dis_word where userId=? and  ?<=start_time  and stop_time<? ORDER BY id ", userId, start_time, stop_time)
-                	if len(*infoList) != 0 {
-                		disWord = fmt.Sprint((*infoList)[0]["password"])
-                	}
-                }*/
-                now := time.Now()
-                userData, oldBuyset, _ := entity.JyVipSubStruct.GetVipDetail(userId)
-                isgive := false
-                pass := func() bool { //校验订单是否合法
-                        if orderType == 1 {
-                                vipStatus := qutil.IntAll((*userData)["i_vip_status"])
-                                if vipStatus > 1 { //仅非VIP用户购买
-                                        return false
-                                }
-                        } else if orderType == 5 { //仅即将到期用户购买
-                                endTime := qutil.Int64All((*userData)["l_vip_endtime"])
-                                if endTime > now.Unix()+60*60*24*7 {
-                                        return false
-                                }
-                        } else {
-                                return false
-                        }
-                        return true
-                }()
-                if !pass {
-                        return &entity.FuncResult{false, fmt.Errorf("非法请求"), nil}
-                }
+	userId := qutil.ObjToString(this.GetSession("userId"))
+	r := func() *entity.FuncResult {
+		area := qutil.ObjToMap(this.GetString("area"))
+		date := this.GetString("time")
+		orderType, _ := this.GetInteger("orderType") //1 简单付费,5 升降级续费
+		openId := qutil.ObjToString(this.GetSession("s_m_openid"))
+		disWord := this.GetString("disWord")
+		if disWord != "" {
+			if len(strings.Split(disWord, "_")) > 1 {
+				if fmt.Sprint(strings.Split(disWord, "_")[1]) == "GX" {
+					userfilter, ok := util.MQFW.FindById("user", userId, "")
+					if ok && userfilter != nil {
+						dis := qutil.ObjToString((*userfilter)["disWords"])
+						if dis != disWord {
+							disWord = ""
+						}
+					}
+				}
+			}
+		}
+		//查询用户是否有分销链接
+		disWordStr := ""
+		userfilter, ok := util.MQFW.FindById("user", userId, "")
+		if ok && userfilter != nil {
+			startTime := qutil.Int64All((*userfilter)["startTime"])
+			endTime := qutil.Int64All((*userfilter)["endTime"])
+			if startTime != 0 {
+				if startTime <= time.Now().Unix() && endTime >= time.Now().Unix() {
+					disWordStr = qutil.ObjToString((*userfilter)["disWords"])
+				}
+			}
+		}
+		if disWordStr != "" {
+			disWord = disWordStr
+		}
+		req_price, _ := this.GetInteger("price")     //前端展示金额
+		order_phone := this.GetString("order_phone") //p19.3用户信息采集 手机号
+		/*if disWord == "" {
+			start_time := TimeProcessing(time.Now().Format(DateFullLayout), -config.Config.TermValidity).Format(DateFullLayout)
+			stop_time := TimeProcessing(time.Now().Format(DateFullLayout), config.Config.TermValidity).Format(DateFullLayout)
+			infoList := util.Mysql.SelectBySql("select  * from  dis_word where userId=? and  ?<=start_time  and stop_time<? ORDER BY id ", userId, start_time, stop_time)
+			if len(*infoList) != 0 {
+				disWord = fmt.Sprint((*infoList)[0]["password"])
+			}
+		}*/
+		now := time.Now()
+		userData, oldBuyset, _ := entity.JyVipSubStruct.GetVipDetail(userId)
+		isgive := false
+		pass := func() bool { //校验订单是否合法
+			if orderType == 1 {
+				vipStatus := qutil.IntAll((*userData)["i_vip_status"])
+				if vipStatus > 1 { //仅非VIP用户购买
+					return false
+				}
+			} else if orderType == 5 { //仅即将到期用户购买
+				endTime := qutil.Int64All((*userData)["l_vip_endtime"])
+				if endTime > now.Unix()+60*60*24*7 {
+					return false
+				}
+			} else {
+				return false
+			}
+			return true
+		}()
+		if !pass {
+			return &entity.FuncResult{false, fmt.Errorf("非法请求"), nil}
+		}
 
-                date_count, date_unit, err := entity.JyVipSubStruct.CheckReqDate(date)
-                if err != nil {
-                        return &entity.FuncResult{false, err, nil}
-                }
-                buyset := entity.JyVipSubStruct.NewBuySet(area, nil, true) //改版后只能购买升级版超级订阅
-                filter := entity.VipSimpleMsg{
-                        Area:       area,
-                        Industry:   []string{},
-                        Cyclecount: date_count,
-                        Cycleunit:  date_unit,
-                        NewBuyset:  buyset,
-                        OrderType:  orderType,
-                        DisWord:    disWord,
-                }
-                //即将到期
-                if orderType == 5 {
-                        o_vipjy := qutil.ObjToMap((*userData)["o_vipjy"])
-                        thisBuySet := qutil.ObjToMap((*o_vipjy)["o_buyset"])
-                        if len(*thisBuySet) == 0 {
-                                return &entity.FuncResult{false, errors.New("创建续费订单出错"), nil}
-                        }
-                        filter.OldBuyset = oldBuyset
-                }
-                //插入订单表
-                mog_id := entity.JyVipSubStruct.SaveSelectLog(userId, openId, &filter)
-                if mog_id == "" {
-                        return &entity.FuncResult{false, errors.New("创建订单出错"), nil}
-                }
-                //计算价格
-                totalfee := entity.JyVipSubStruct.GetSubVipPrice(buyset, date_count, date_unit)
-                if req_price != totalfee {
-                        return &entity.FuncResult{false, errors.New(fmt.Sprintf("金额校验异常[%d,%d]", totalfee, req_price)), nil}
-                }
-                //原价
-                original_price := totalfee
-                ordercode := pay.GetOrderCode(userId)
-                //卡卷信息的id
-                lotteryId := this.GetString("lotteryId")
-                discount_price, userLotteryId := 0, ""
-                useProduct, _ := this.GetInteger("useProduct")
-                if lotteryId != "" {
-                        products := config.CouponConfig.Products["超级订阅"]
-                        if useProduct > 0 {
-                                products = strconv.Itoa(useProduct)
-                        }
-                        full_price, reduce_price := 0, 0
-                        var discount float64
-                        full_price, reduce_price, discount, userLotteryId = util.GetCouponInfo(userId, lotteryId, products)
-                        if full_price <= totalfee {
-                                if discount == 100 { //满减
-                                        totalfee = totalfee - reduce_price
-                                        discount_price = reduce_price
+		date_count, date_unit, err := entity.JyVipSubStruct.CheckReqDate(date)
+		if err != nil {
+			return &entity.FuncResult{false, err, nil}
+		}
+		buyset := entity.JyVipSubStruct.NewBuySet(area, nil, true) //改版后只能购买升级版超级订阅
+		filter := entity.VipSimpleMsg{
+			Area:       area,
+			Industry:   []string{},
+			Cyclecount: date_count,
+			Cycleunit:  date_unit,
+			NewBuyset:  buyset,
+			OrderType:  orderType,
+			DisWord:    disWord,
+		}
+		//即将到期
+		if orderType == 5 {
+			o_vipjy := qutil.ObjToMap((*userData)["o_vipjy"])
+			thisBuySet := qutil.ObjToMap((*o_vipjy)["o_buyset"])
+			if len(*thisBuySet) == 0 {
+				return &entity.FuncResult{false, errors.New("创建续费订单出错"), nil}
+			}
+			filter.OldBuyset = oldBuyset
+		}
+		//插入订单表
+		mog_id := entity.JyVipSubStruct.SaveSelectLog(userId, openId, &filter)
+		if mog_id == "" {
+			return &entity.FuncResult{false, errors.New("创建订单出错"), nil}
+		}
+		//计算价格
+		totalfee := entity.JyVipSubStruct.GetSubVipPrice(buyset, date_count, date_unit)
+		if req_price != totalfee {
+			return &entity.FuncResult{false, errors.New(fmt.Sprintf("金额校验异常[%d,%d]", totalfee, req_price)), nil}
+		}
+		//原价
+		original_price := totalfee
+		ordercode := pay.GetOrderCode(userId)
+		//卡卷信息的id
+		lotteryId := this.GetString("lotteryId")
+		discount_price, userLotteryId := 0, ""
+		useProduct, _ := this.GetInteger("useProduct")
+		if lotteryId != "" {
+			products := config.CouponConfig.Products["超级订阅"]
+			if useProduct > 0 {
+				products = strconv.Itoa(useProduct)
+			}
+			full_price, reduce_price := 0, 0
+			var discount float64
+			full_price, reduce_price, discount, userLotteryId = util.GetCouponInfo(userId, lotteryId, products)
+			if full_price <= totalfee {
+				if discount == 100 { //满减
+					totalfee = totalfee - reduce_price
+					discount_price = reduce_price
 
-                                } else { //满折
-                                        disCount_int := int(math.Ceil(discount * 100))
-                                        discount_price = totalfee - totalfee*disCount_int/1000
-                                        totalfee = totalfee * disCount_int / 1000
-                                }
-                        } else {
-                                userLotteryId = ""
-                        }
-                }
-                //赠品相关
-                discountId, _ := this.GetInteger("discountId")
-                if discountId > 0 {
-                        isgive = true
-                        _, timeNum, timeType, _, _, _, activityName, _ := util.GiveInfo(userId, useProduct, 0, discountId) //获取满赠时长
-                        filter.GiveCycle = timeNum
-                        filter.GiveType = timeType
-                        filter.DisCountId = discountId
-                        if strings.Contains(activityName, config.Config.ActivityName) {
-                                filter.Badge = "202111" //双十一角标展示
-                        }
-                }
-                filterStr, _ := json.Marshal(filter)
-                distributionChannel, orderChannel := util.GetJyOrderChannel(disWord, this.Header("User-Agent"))
-                entId := qutil.Int64All(this.GetSession("entId"))
-                buy_subject := 1
-                if entId > 0 {
-                        buy_subject = 2
-                }
-                insertMap := map[string]interface{}{
-                        "order_money":          totalfee,
-                        "order_status":         0,
-                        "user_nickname":        qutil.ObjToString(this.GetSession("s_nickname")),
-                        "user_openid":          openId,
-                        "order_code":           ordercode,
-                        "product_type":         "VIP订阅",
-                        "create_time":          FormatDate(&now, Date_Full_Layout),
-                        "original_price":       original_price,
-                        "filter_id":            mog_id,
-                        "user_id":              userId,
-                        "filter":               string(filterStr), //筛选
-                        "discount_price":       discount_price,
-                        "d_relation_id":        userLotteryId,
-                        "dis_word":             disWord,             //分销口令
-                        "distribution_channel": distributionChannel, //销售渠道
-                        "order_channel":        orderChannel,        //下单渠道
-                        "audit_status":         3,                   //默认审核通过
-                        "buy_subject":          buy_subject,
-                        "ent_id":               entId,
-                }
-                if orderType != 5 && order_phone != "" { //p19.3用户信息采集(仅付费可填写手机号)
-                        if !jy.PhoneReg.MatchString(order_phone) {
-                                return &entity.FuncResult{false, errors.New("手机号格式异常"), nil}
-                        }
+				} else { //满折
+					disCount_int := int(math.Ceil(discount * 100))
+					discount_price = totalfee - totalfee*disCount_int/1000
+					totalfee = totalfee * disCount_int / 1000
+				}
+			} else {
+				userLotteryId = ""
+			}
+		}
+		//赠品相关
+		discountId, _ := this.GetInteger("discountId")
+		if discountId > 0 {
+			isgive = true
+			_, timeNum, timeType, _, _, _, activityName, _ := util.GiveInfo(userId, useProduct, 0, discountId) //获取满赠时长
+			filter.GiveCycle = timeNum
+			filter.GiveType = timeType
+			filter.DisCountId = discountId
+			if strings.Contains(activityName, config.Config.ActivityName) {
+				filter.Badge = "202111" //双十一角标展示
+			}
+		}
+		filterStr, _ := json.Marshal(filter)
+		distributionChannel, orderChannel := util.GetJyOrderChannel(disWord, this.Header("User-Agent"))
+		entId := qutil.Int64All(this.GetSession("entId"))
+		buy_subject := 1
+		if entId > 0 {
+			buy_subject = 2
+		}
+		insertMap := map[string]interface{}{
+			"order_money":          totalfee,
+			"order_status":         0,
+			"user_nickname":        qutil.ObjToString(this.GetSession("s_nickname")),
+			"user_openid":          openId,
+			"order_code":           ordercode,
+			"product_type":         "VIP订阅",
+			"create_time":          FormatDate(&now, Date_Full_Layout),
+			"original_price":       original_price,
+			"filter_id":            mog_id,
+			"user_id":              userId,
+			"filter":               string(filterStr), //筛选
+			"discount_price":       discount_price,
+			"d_relation_id":        userLotteryId,
+			"dis_word":             disWord,             //分销口令
+			"distribution_channel": distributionChannel, //销售渠道
+			"order_channel":        orderChannel,        //下单渠道
+			"audit_status":         3,                   //默认审核通过
+			"buy_subject":          buy_subject,
+			"ent_id":               entId,
+		}
+		if orderType != 5 && order_phone != "" { //p19.3用户信息采集(仅付费可填写手机号)
+			if !jy.PhoneReg.MatchString(order_phone) {
+				return &entity.FuncResult{false, errors.New("手机号格式异常"), nil}
+			}
 
-                }
-                if order_phone == "" && userfilter != nil && len(*userfilter) > 0 {
-                        order_phone, _ = qutil.If((*userfilter)["s_phone"] != nil, (*userfilter)["s_phone"], (*userfilter)["s_m_phone"]).(string)
-                }
-                if orderType == 5 { //插入生效时间和结束时间
-                        timeStamp := qutil.Int64All((*userData)["l_vip_endtime"])
-                        startTime := time.Unix(timeStamp, 0)
-                        endTime := util.GetDATE(filter.Cycleunit, filter.Cyclecount, timeStamp)
-                        if isgive { //满赠
-                                if filter.GiveType == 1 {
-                                        endTime = endTime.AddDate(0, 0, filter.GiveCycle)
-                                } else if filter.GiveType == 2 {
-                                        endTime = endTime.AddDate(0, filter.GiveCycle, 0)
-                                }
-                        }
-                        //校验是否超过三年
-                        if time.Date(now.Year(), now.Month(), now.Day(), 23, 59, 59, 59, now.Location()).
-                                AddDate(3, 0, 0).Before(endTime) && !entity.JyVipSubStruct.IsActiving() && !isgive {
-                                return &entity.FuncResult{false, errors.New("订阅周期超过三年"), nil}
-                        }
-                        insertMap["vip_type"] = 1
-                        insertMap["vip_starttime"] = FormatDate(&startTime, Date_Full_Layout)
-                        insertMap["vip_endtime"] = FormatDate(&endTime, Date_Full_Layout)
-                }
-                insertMap["user_phone"] = order_phone
-                orderid := util.Mysql.Insert("dataexport_order", insertMap)
-                if orderid == -1 {
-                        return &entity.FuncResult{false, errors.New("数据库操作异常"), nil}
-                } else {
-                        //绑定卡卷
-                        if (userLotteryId != "" && lotteryId != "") || (discountId > 0) {
-                                go func(userId, userLotteryId, order_code string) {
-                                        phone, nickname := util.GetMyPhoneAndName(userId)
-                                        if !util.UpdateCouponState(userId, userLotteryId, nickname, phone, order_code, "超级订阅", strconv.Itoa(discountId), 3, 0) {
-                                                log.Println(fmt.Sprintf("单号%s-绑定失败-卡卷%s", order_code, userLotteryId))
-                                        }
-                                        if discountId > 0 {
-                                                if ulid := util.FindUserLotteryId(userId, orderid, discountId); ulid != 0 {
-                                                        userLotteryId = strconv.Itoa(ulid)
-                                                }
-                                        }
-                                }(userId, userLotteryId, ordercode)
-                        }
-                }
-                //支付提醒
-                //util.MsgRemind.Add(qutil.IntAll(orderid), totalfee, qutil.If(orderType == 5, 1, -1).(int), 0, ordercode, userId, now.Unix())
-                return &entity.FuncResult{true, nil, map[string]interface{}{"code": ordercode}}
-        }()
-        if r.Err != nil {
-                log.Printf("%s CreateOrder err:%v\n", userId, r.Err.Error())
-        }
-        this.ServeJson(r.Format())
+		}
+		if order_phone == "" && userfilter != nil && len(*userfilter) > 0 {
+			order_phone, _ = qutil.If((*userfilter)["s_phone"] != nil, (*userfilter)["s_phone"], (*userfilter)["s_m_phone"]).(string)
+		}
+		if orderType == 5 { //插入生效时间和结束时间
+			timeStamp := qutil.Int64All((*userData)["l_vip_endtime"])
+			startTime := time.Unix(timeStamp, 0)
+			endTime := util.GetDATE(filter.Cycleunit, filter.Cyclecount, timeStamp)
+			if isgive { //满赠
+				if filter.GiveType == 1 {
+					endTime = endTime.AddDate(0, 0, filter.GiveCycle)
+				} else if filter.GiveType == 2 {
+					endTime = endTime.AddDate(0, filter.GiveCycle, 0)
+				}
+			}
+			//校验是否超过三年
+			if time.Date(now.Year(), now.Month(), now.Day(), 23, 59, 59, 59, now.Location()).
+				AddDate(3, 0, 0).Before(endTime) && !entity.JyVipSubStruct.IsActiving() && !isgive {
+				return &entity.FuncResult{false, errors.New("订阅周期超过三年"), nil}
+			}
+			insertMap["vip_type"] = 1
+			insertMap["vip_starttime"] = FormatDate(&startTime, Date_Full_Layout)
+			insertMap["vip_endtime"] = FormatDate(&endTime, Date_Full_Layout)
+		}
+		insertMap["user_phone"] = order_phone
+		orderid := util.Mysql.Insert("dataexport_order", insertMap)
+		if orderid == -1 {
+			return &entity.FuncResult{false, errors.New("数据库操作异常"), nil}
+		} else {
+			//绑定卡卷
+			if (userLotteryId != "" && lotteryId != "") || (discountId > 0) {
+				go func(userId, userLotteryId, order_code string) {
+					phone, nickname := util.GetMyPhoneAndName(userId)
+					if !util.UpdateCouponState(userId, userLotteryId, nickname, phone, order_code, "超级订阅", strconv.Itoa(discountId), 3, 0) {
+						log.Println(fmt.Sprintf("单号%s-绑定失败-卡卷%s", order_code, userLotteryId))
+					}
+					if discountId > 0 {
+						if ulid := util.FindUserLotteryId(userId, orderid, discountId); ulid != 0 {
+							userLotteryId = strconv.Itoa(ulid)
+						}
+					}
+				}(userId, userLotteryId, ordercode)
+			}
+		}
+		//支付提醒
+		//util.MsgRemind.Add(qutil.IntAll(orderid), totalfee, qutil.If(orderType == 5, 1, -1).(int), 0, ordercode, userId, now.Unix())
+		return &entity.FuncResult{true, nil, map[string]interface{}{"code": ordercode}}
+	}()
+	if r.Err != nil {
+		log.Printf("%s CreateOrder err:%v\n", userId, r.Err.Error())
+	}
+	this.ServeJson(r.Format())
 }
 
 //续费
 func (this *SubVipPayOrder) Renew() {
-        userId := qutil.ObjToString(this.GetSession("userId"))
-        r := func() *entity.FuncResult {
-                disWord := this.GetString("disWord")
-                openId := qutil.ObjToString(this.GetSession("s_m_openid"))
-                req_price, _ := this.GetInteger("price") //前端展示金额
-                if disWord != "" {
-                        if len(strings.Split(disWord, "_")) > 1 {
-                                if fmt.Sprint(strings.Split(disWord, "_")[1]) == "GX" {
-                                        userfilter, ok := util.MQFW.FindById("user", userId, "")
-                                        if ok && userfilter != nil {
-                                                dis := qutil.ObjToString((*userfilter)["disWords"])
-                                                if dis != disWord {
-                                                        disWord = ""
-                                                }
-                                        }
-                                }
-                        }
-                }
-                //查询用户是否有分销链接、
-                disWordStr := ""
-                userfilter, ok := util.MQFW.FindById("user", userId, "")
-                if ok && userfilter != nil {
-                        startTime := qutil.Int64All((*userfilter)["startTime"])
-                        endTime := qutil.Int64All((*userfilter)["endTime"])
-                        if startTime != 0 {
-                                if startTime <= time.Now().Unix() && endTime >= time.Now().Unix() {
-                                        disWordStr = qutil.ObjToString((*userfilter)["disWords"])
-                                }
-                        }
-                }
-                if disWordStr != "" {
-                        disWord = disWordStr
-                }
-                now := time.Now()
-                date_count, date_unit, err := entity.JyVipSubStruct.CheckReqDate(this.GetString("time"))
-                if err != nil {
-                        return &entity.FuncResult{false, err, nil}
-                }
+	userId := qutil.ObjToString(this.GetSession("userId"))
+	r := func() *entity.FuncResult {
+		disWord := this.GetString("disWord")
+		openId := qutil.ObjToString(this.GetSession("s_m_openid"))
+		req_price, _ := this.GetInteger("price") //前端展示金额
+		if disWord != "" {
+			if len(strings.Split(disWord, "_")) > 1 {
+				if fmt.Sprint(strings.Split(disWord, "_")[1]) == "GX" {
+					userfilter, ok := util.MQFW.FindById("user", userId, "")
+					if ok && userfilter != nil {
+						dis := qutil.ObjToString((*userfilter)["disWords"])
+						if dis != disWord {
+							disWord = ""
+						}
+					}
+				}
+			}
+		}
+		//查询用户是否有分销链接、
+		disWordStr := ""
+		userfilter, ok := util.MQFW.FindById("user", userId, "")
+		if ok && userfilter != nil {
+			startTime := qutil.Int64All((*userfilter)["startTime"])
+			endTime := qutil.Int64All((*userfilter)["endTime"])
+			if startTime != 0 {
+				if startTime <= time.Now().Unix() && endTime >= time.Now().Unix() {
+					disWordStr = qutil.ObjToString((*userfilter)["disWords"])
+				}
+			}
+		}
+		if disWordStr != "" {
+			disWord = disWordStr
+		}
+		now := time.Now()
+		date_count, date_unit, err := entity.JyVipSubStruct.CheckReqDate(this.GetString("time"))
+		if err != nil {
+			return &entity.FuncResult{false, err, nil}
+		}
 
-                rData, buyset, isVip := entity.JyVipSubStruct.GetVipDetail(userId)
-                if !isVip {
-                        return &entity.FuncResult{false, errors.New("请求异常,非vip状态"), nil}
-                }
-                endUnix := qutil.Int64All((*rData)["l_vip_endtime"])
-                isTrail := qutil.IntAll((*rData)["i_vip_status"]) == 1
-                if time.Date(now.Year(), now.Month(), now.Day(), 23, 59, 59, 59, now.Location()).
-                        AddDate(3, 0, 0).Before(util.GetDATE(date_unit, date_count, endUnix)) && !isTrail {
-                        return &entity.FuncResult{false, errors.New("订阅周期超过三年"), nil}
-                }
+		rData, buyset, isVip := entity.JyVipSubStruct.GetVipDetail(userId)
+		if !isVip {
+			return &entity.FuncResult{false, errors.New("请求异常,非vip状态"), nil}
+		}
+		endUnix := qutil.Int64All((*rData)["l_vip_endtime"])
+		isTrail := qutil.IntAll((*rData)["i_vip_status"]) == 1
+		if time.Date(now.Year(), now.Month(), now.Day(), 23, 59, 59, 59, now.Location()).
+			AddDate(3, 0, 0).Before(util.GetDATE(date_unit, date_count, endUnix)) && !isTrail {
+			return &entity.FuncResult{false, errors.New("订阅周期超过三年"), nil}
+		}
 
-                totalfee := entity.JyVipSubStruct.GetSubVipPriceByBuySet(buyset, date_count, date_unit, false)
-                if req_price != totalfee {
-                        return &entity.FuncResult{false, errors.New(fmt.Sprintf("金额校验异常[%d,%d]", totalfee, req_price)), nil}
-                }
-                filter := entity.VipSimpleMsg{
-                        Area:       nil,
-                        Industry:   nil,
-                        Cyclecount: date_count,
-                        Cycleunit:  date_unit,
-                        NewBuyset:  buyset,
-                        OrderType:  2,
-                        DisWord:    disWord,
-                }
-                //满赠的id
-                discountId, _ := this.GetInteger("discountId")
-                useProduct, _ := this.GetInteger("useProduct")
-                if discountId > 0 && useProduct > 0 {
-                        _, timeNum, timeType, _, _, _, activityName, _ := util.GiveInfo(userId, useProduct, 0, discountId) //获取满赠时长
-                        filter.GiveCycle = timeNum
-                        filter.GiveType = timeType
-                        filter.DisCountId = discountId
-                        if strings.Contains(activityName, config.Config.ActivityName) {
-                                filter.Badge = "202111" //双十一角标展示
-                        }
-                }
-                mog_id := entity.JyVipSubStruct.SaveSelectLog(userId, openId, &filter)
-                if mog_id == "" {
-                        return &entity.FuncResult{false, errors.New("创建订单出错"), nil}
-                }
+		totalfee := entity.JyVipSubStruct.GetSubVipPriceByBuySet(buyset, date_count, date_unit, false)
+		if req_price != totalfee {
+			return &entity.FuncResult{false, errors.New(fmt.Sprintf("金额校验异常[%d,%d]", totalfee, req_price)), nil}
+		}
+		filter := entity.VipSimpleMsg{
+			Area:       nil,
+			Industry:   nil,
+			Cyclecount: date_count,
+			Cycleunit:  date_unit,
+			NewBuyset:  buyset,
+			OrderType:  2,
+			DisWord:    disWord,
+		}
+		//满赠的id
+		discountId, _ := this.GetInteger("discountId")
+		useProduct, _ := this.GetInteger("useProduct")
+		if discountId > 0 && useProduct > 0 {
+			_, timeNum, timeType, _, _, _, activityName, _ := util.GiveInfo(userId, useProduct, 0, discountId) //获取满赠时长
+			filter.GiveCycle = timeNum
+			filter.GiveType = timeType
+			filter.DisCountId = discountId
+			if strings.Contains(activityName, config.Config.ActivityName) {
+				filter.Badge = "202111" //双十一角标展示
+			}
+		}
+		mog_id := entity.JyVipSubStruct.SaveSelectLog(userId, openId, &filter)
+		if mog_id == "" {
+			return &entity.FuncResult{false, errors.New("创建订单出错"), nil}
+		}
 
-                //计算开始价格和结束价格
-                startTime := time.Unix(endUnix, 0)
-                endTime := util.GetDATE(filter.Cycleunit, filter.Cyclecount, endUnix)
-                if filter.GiveCycle > 0 && filter.GiveType > 0 {
-                        if filter.GiveType == 1 {
-                                endTime = endTime.AddDate(0, 0, filter.GiveCycle)
-                        } else if filter.GiveType == 2 {
-                                endTime = endTime.AddDate(0, filter.GiveCycle, 0)
-                        }
-                }
-                //原价
-                original_price := totalfee
+		//计算开始价格和结束价格
+		startTime := time.Unix(endUnix, 0)
+		endTime := util.GetDATE(filter.Cycleunit, filter.Cyclecount, endUnix)
+		if filter.GiveCycle > 0 && filter.GiveType > 0 {
+			if filter.GiveType == 1 {
+				endTime = endTime.AddDate(0, 0, filter.GiveCycle)
+			} else if filter.GiveType == 2 {
+				endTime = endTime.AddDate(0, filter.GiveCycle, 0)
+			}
+		}
+		//原价
+		original_price := totalfee
 
-                //卡卷信息的id
-                lotteryId := this.GetString("lotteryId")
-                userLotteryId, discount_price := "", 0
-                if lotteryId != "" {
-                        //用户当前使用卡卷
-                        full_price, reduce_price := 0, 0
-                        var discount float64
-                        products := config.CouponConfig.Products["超级订阅"]
-                        if useProduct > 0 {
-                                products = strconv.Itoa(useProduct)
-                        }
-                        full_price, reduce_price, discount, userLotteryId = util.GetCouponInfo(userId, lotteryId, products)
-                        if full_price <= totalfee {
-                                if discount == 100 { //满减
-                                        totalfee = totalfee - reduce_price
-                                        discount_price = reduce_price
-                                } else { //满折
-                                        disCount_int := int(math.Ceil(discount * 100))
-                                        discount_price = totalfee - totalfee*disCount_int/1000
-                                        totalfee = totalfee * disCount_int / 1000
-                                }
-                        } else {
-                                userLotteryId = ""
-                        }
-                }
-                filterStr, _ := json.Marshal(filter)
-                ordercode := pay.GetOrderCode(userId)
-                distributionChannel, orderChannel := util.GetJyOrderChannel(disWord, this.Header("User-Agent"))
-                entId := qutil.Int64All(this.GetSession("entId"))
-                buy_subject := 1
-                if entId > 0 {
-                        buy_subject = 2
-                }
-                insertMap := map[string]interface{}{
-                        "order_money":          totalfee,
-                        "order_status":         0,
-                        "user_nickname":        qutil.ObjToString(this.GetSession("s_nickname")),
-                        "user_openid":          openId,
-                        "order_code":           ordercode,
-                        "product_type":         "VIP订阅",
-                        "create_time":          FormatDate(&now, Date_Full_Layout),
-                        "original_price":       original_price,
-                        "filter_id":            mog_id,
-                        "user_id":              userId,
-                        "filter":               string(filterStr),   //筛选
-                        "dis_word":             disWord,             //分销口令
-                        "distribution_channel": distributionChannel, //销售渠道
-                        "order_channel":        orderChannel,        //下单渠道
-                        "discount_price":       discount_price,
-                        "d_relation_id":        userLotteryId,
-                        "vip_starttime":        FormatDate(&startTime, Date_Full_Layout),
-                        "vip_endtime":          FormatDate(&endTime, Date_Full_Layout),
-                        "vip_type":             1,
-                        "audit_status":         3, //默认审核通过
-                        "buy_subject":          buy_subject,
-                        "ent_id":               entId,
-                }
+		//卡卷信息的id
+		lotteryId := this.GetString("lotteryId")
+		userLotteryId, discount_price := "", 0
+		if lotteryId != "" {
+			//用户当前使用卡卷
+			full_price, reduce_price := 0, 0
+			var discount float64
+			products := config.CouponConfig.Products["超级订阅"]
+			if useProduct > 0 {
+				products = strconv.Itoa(useProduct)
+			}
+			full_price, reduce_price, discount, userLotteryId = util.GetCouponInfo(userId, lotteryId, products)
+			if full_price <= totalfee {
+				if discount == 100 { //满减
+					totalfee = totalfee - reduce_price
+					discount_price = reduce_price
+				} else { //满折
+					disCount_int := int(math.Ceil(discount * 100))
+					discount_price = totalfee - totalfee*disCount_int/1000
+					totalfee = totalfee * disCount_int / 1000
+				}
+			} else {
+				userLotteryId = ""
+			}
+		}
+		filterStr, _ := json.Marshal(filter)
+		ordercode := pay.GetOrderCode(userId)
+		distributionChannel, orderChannel := util.GetJyOrderChannel(disWord, this.Header("User-Agent"))
+		entId := qutil.Int64All(this.GetSession("entId"))
+		buy_subject := 1
+		if entId > 0 {
+			buy_subject = 2
+		}
+		insertMap := map[string]interface{}{
+			"order_money":          totalfee,
+			"order_status":         0,
+			"user_nickname":        qutil.ObjToString(this.GetSession("s_nickname")),
+			"user_openid":          openId,
+			"order_code":           ordercode,
+			"product_type":         "VIP订阅",
+			"create_time":          FormatDate(&now, Date_Full_Layout),
+			"original_price":       original_price,
+			"filter_id":            mog_id,
+			"user_id":              userId,
+			"filter":               string(filterStr),   //筛选
+			"dis_word":             disWord,             //分销口令
+			"distribution_channel": distributionChannel, //销售渠道
+			"order_channel":        orderChannel,        //下单渠道
+			"discount_price":       discount_price,
+			"d_relation_id":        userLotteryId,
+			"vip_starttime":        FormatDate(&startTime, Date_Full_Layout),
+			"vip_endtime":          FormatDate(&endTime, Date_Full_Layout),
+			"vip_type":             1,
+			"audit_status":         3, //默认审核通过
+			"buy_subject":          buy_subject,
+			"ent_id":               entId,
+		}
 
-                if userfilter != nil && len(*userfilter) > 0 {
-                        insertMap["user_phone"], _ = qutil.If((*userfilter)["s_phone"] != nil, (*userfilter)["s_phone"], (*userfilter)["s_m_phone"]).(string)
-                }
+		if userfilter != nil && len(*userfilter) > 0 {
+			insertMap["user_phone"], _ = qutil.If((*userfilter)["s_phone"] != nil, (*userfilter)["s_phone"], (*userfilter)["s_m_phone"]).(string)
+		}
 
-                orderid := util.Mysql.Insert("dataexport_order", insertMap)
-                if orderid == -1 {
-                        return &entity.FuncResult{false, errors.New("数据库操作异常"), nil}
-                } else {
-                        //绑定卡卷
-                        if (userLotteryId != "" && lotteryId != "") || discountId > 0 {
-                                go func(userId, userLotteryId, order_code string) {
-                                        phone, nickname := util.GetMyPhoneAndName(userId)
-                                        if !util.UpdateCouponState(userId, userLotteryId, nickname, phone, order_code, "超级订阅", strconv.Itoa(discountId), 3, 0) {
-                                                log.Println(fmt.Sprintf("单号%s-绑定失败-卡卷%s", order_code, userLotteryId))
-                                        }
-                                        if discountId > 0 {
-                                                if ulid := util.FindUserLotteryId(userId, orderid, discountId); ulid != 0 {
-                                                        userLotteryId = strconv.Itoa(ulid)
-                                                }
-                                        }
-                                }(userId, userLotteryId, ordercode)
-                        }
-                }
-                //支付提醒
-                //util.MsgRemind.Add(qutil.IntAll(orderid), totalfee, -1, 0, ordercode, userId, now.Unix())
-                return &entity.FuncResult{true, nil, map[string]interface{}{"code": ordercode}}
-        }()
-        if r.Err != nil {
-                log.Printf("%s CreateOrder err:%v\n", userId, r.Err.Error())
-        }
-        this.ServeJson(r.Format())
+		orderid := util.Mysql.Insert("dataexport_order", insertMap)
+		if orderid == -1 {
+			return &entity.FuncResult{false, errors.New("数据库操作异常"), nil}
+		} else {
+			//绑定卡卷
+			if (userLotteryId != "" && lotteryId != "") || discountId > 0 {
+				go func(userId, userLotteryId, order_code string) {
+					phone, nickname := util.GetMyPhoneAndName(userId)
+					if !util.UpdateCouponState(userId, userLotteryId, nickname, phone, order_code, "超级订阅", strconv.Itoa(discountId), 3, 0) {
+						log.Println(fmt.Sprintf("单号%s-绑定失败-卡卷%s", order_code, userLotteryId))
+					}
+					if discountId > 0 {
+						if ulid := util.FindUserLotteryId(userId, orderid, discountId); ulid != 0 {
+							userLotteryId = strconv.Itoa(ulid)
+						}
+					}
+				}(userId, userLotteryId, ordercode)
+			}
+		}
+		//支付提醒
+		//util.MsgRemind.Add(qutil.IntAll(orderid), totalfee, -1, 0, ordercode, userId, now.Unix())
+		return &entity.FuncResult{true, nil, map[string]interface{}{"code": ordercode}}
+	}()
+	if r.Err != nil {
+		log.Printf("%s CreateOrder err:%v\n", userId, r.Err.Error())
+	}
+	this.ServeJson(r.Format())
 }
 
 func TimeProcessing(hour interface{}, duration int) time.Time {
-        todayZero, _ := time.ParseInLocation(DateFullLayout, fmt.Sprint(hour), time.Local)
-        mm, _ := time.ParseDuration(fmt.Sprint(duration) + "m")
-        t := todayZero.Add(mm)
-        return t
+	todayZero, _ := time.ParseInLocation(DateFullLayout, fmt.Sprint(hour), time.Local)
+	mm, _ := time.ParseDuration(fmt.Sprint(duration) + "m")
+	t := todayZero.Add(mm)
+	return t
 }

Niektoré súbory nie sú zobrazené, pretože je v týchto rozdielových dátach zmenené mnoho súborov