ソースを参照

权限校验添加

WH01243 2 年 前
コミット
17d168863e
78 ファイル変更3700 行追加2580 行削除
  1. 384 377
      src/config.json
  2. 4 4
      src/go.mod
  3. 25 13
      src/go.sum
  4. 7 7
      src/jfw/active/21yearEndReport.go
  5. 5 6
      src/jfw/front/big-member.go
  6. 0 2
      src/jfw/front/front.go
  7. 4 3
      src/jfw/front/shorturl.go
  8. 2 1
      src/jfw/front/vipsubscribe.go
  9. 2 3
      src/jfw/front/wxkeyset.go
  10. 5 3
      src/jfw/modules/app/src/app/front/bigMember.go
  11. 3 1
      src/jfw/modules/app/src/app/front/front.go
  12. 2 1
      src/jfw/modules/app/src/app/front/me.go
  13. 2 2
      src/jfw/modules/app/src/app/front/shorturl.go
  14. 3 1
      src/jfw/modules/app/src/app/front/swordfish.go
  15. 7 3
      src/jfw/modules/app/src/app/front/vipsubscribe.go
  16. 3 3
      src/jfw/modules/app/src/app/front/wxkeyset.go
  17. 161 157
      src/jfw/modules/app/src/config.json
  18. 75 6
      src/jfw/modules/app/src/go.mod
  19. 557 9
      src/jfw/modules/app/src/go.sum
  20. 14 14
      src/jfw/modules/bigmember/src/entity/claimCommon.go
  21. 4 3
      src/jfw/modules/bigmember/src/entity/followEnterprise.go
  22. 4 2
      src/jfw/modules/bigmember/src/entity/followProject.go
  23. 9 7
      src/jfw/modules/bigmember/src/entity/portrait.go
  24. 5 3
      src/jfw/modules/bigmember/src/entity/trial.go
  25. 1 5
      src/jfw/modules/bigmember/src/filter/sessionfilter.go
  26. 3 14
      src/jfw/modules/bigmember/src/go.mod
  27. 2 12
      src/jfw/modules/bigmember/src/go.sum
  28. 1 4
      src/jfw/modules/bigmember/src/service/analysis/decision.go
  29. 1 4
      src/jfw/modules/bigmember/src/service/analysis/forecastproject.go
  30. 2 10
      src/jfw/modules/bigmember/src/service/analysis/potential.go
  31. 3 4
      src/jfw/modules/bigmember/src/service/analysis/util.go
  32. 1 4
      src/jfw/modules/bigmember/src/service/bidfile/bidfile.go
  33. 3 3
      src/jfw/modules/bigmember/src/service/claim/claimProject.go
  34. 8 32
      src/jfw/modules/bigmember/src/service/follow/enterprise.go
  35. 10 40
      src/jfw/modules/bigmember/src/service/follow/project.go
  36. 5 7
      src/jfw/modules/bigmember/src/service/follow/projectPdf.go
  37. 14 56
      src/jfw/modules/bigmember/src/service/portrait/memberPortraitAction.go
  38. 12 48
      src/jfw/modules/bigmember/src/service/portrait/subvipPortraitAction.go
  39. 6 11
      src/jfw/modules/bigmember/src/service/push/push.go
  40. 7 17
      src/jfw/modules/bigmember/src/service/report/marketAnalysis.go
  41. 1 4
      src/jfw/modules/bigmember/src/service/trial/trial.go
  42. 19 25
      src/jfw/modules/bigmember/src/service/use/use.go
  43. 2 8
      src/jfw/modules/publicapply/src/attachmentdow/service/service.go
  44. 12 8
      src/jfw/modules/publicapply/src/bidcollection/entity/entity.go
  45. 109 124
      src/jfw/modules/publicapply/src/bidcollection/service/service.go
  46. 10 10
      src/jfw/modules/publicapply/src/customer/entity/entiy.go
  47. 2 8
      src/jfw/modules/publicapply/src/customer/service/service.go
  48. 1 4
      src/jfw/modules/publicapply/src/enterpriseSearch/service/search.go
  49. 14 13
      src/jfw/modules/publicapply/src/go.mod
  50. 121 15
      src/jfw/modules/publicapply/src/go.sum
  51. 48 47
      src/jfw/modules/publicapply/src/subscribePush/entity/keyWords.go
  52. 29 29
      src/jfw/modules/publicapply/src/subscribePush/entity/setting.go
  53. 2 5
      src/jfw/modules/publicapply/src/subscribePush/service/pushList.go
  54. 11 16
      src/jfw/modules/publicapply/src/subscribePush/service/subscribe.go
  55. 17 20
      src/jfw/modules/publicapply/src/userbase/entity/entity.go
  56. 6 7
      src/jfw/modules/publicapply/src/userbase/entity/menu.go
  57. 9 26
      src/jfw/modules/publicapply/src/userbase/service/service.go
  58. 123 119
      src/jfw/modules/subscribepay/src/config.json
  59. 4 0
      src/jfw/modules/subscribepay/src/config/config.go
  60. 4 3
      src/jfw/modules/subscribepay/src/entity/basePack.go
  61. 4 1
      src/jfw/modules/subscribepay/src/entity/commonApi.go
  62. 3 3
      src/jfw/modules/subscribepay/src/entity/dataExportPackStruct.go
  63. 10 10
      src/jfw/modules/subscribepay/src/entity/order.go
  64. 4 3
      src/jfw/modules/subscribepay/src/entity/resourcePackStruct.go
  65. 4 4
      src/jfw/modules/subscribepay/src/filter/mergefilter.go
  66. 80 5
      src/jfw/modules/subscribepay/src/go.mod
  67. 531 6
      src/jfw/modules/subscribepay/src/go.sum
  68. 4 2
      src/jfw/modules/subscribepay/src/rpcfollow/share.go
  69. 3 3
      src/jfw/modules/subscribepay/src/service/basePack.go
  70. 2 2
      src/jfw/modules/subscribepay/src/service/bigmember.go
  71. 1 1
      src/jfw/modules/subscribepay/src/service/commonAction.go
  72. 2 2
      src/jfw/modules/subscribepay/src/service/dataexportPack.go
  73. 7 7
      src/jfw/modules/subscribepay/src/service/exceptionVerification.go
  74. 0 4
      src/jfw/modules/subscribepay/src/service/phoneCollent.go
  75. 2 2
      src/jfw/modules/subscribepay/src/service/resourcePack.go
  76. 528 528
      src/jfw/modules/subscribepay/src/service/salesCreateOrder.go
  77. 601 601
      src/jfw/modules/subscribepay/src/service/vipSubscribeChange.go
  78. 4 3
      src/jfw/modules/subscribepay/src/service/vipSubscribePay.go

+ 384 - 377
src/config.json

@@ -1,384 +1,391 @@
 {
-    "nodeName":"node1",
-    "qrModelID": "2",
-    "numTimeNumber": 15,
-    "strTimeNumber": 30,
-    "webport": "83",
-    "webrpcport": "8084",
-    "weixinrpc": "127.0.0.1:8083",
-    "cacheflag": false,
-    "agreement": "http",
-    "webdomain": "https://web-wky.jydev.jianyu360.com",
-    "redirect": {
-        "searchinfo": "/jylab/mainSearch?msg=0",
-        "rssset": "/swordfish/newhistorypush?msg=1",
-        "viewdemo": "/front/viewdemo",
-        "wxpushlist": "/wxpush/bidinfo/%s",
-        "share": "/swordfish/guide/share",
-        "myfollow": "/follow/list",
-        "newInfoFollow": "/jylab/followent/newInfo/%s",
-        "entListFollow": "/jylab/followent/entList",
-        "pcmyfollow": "/follow/set/list/%s",
-        "feedback": "/swordfish/feedback",
-        "wxpushfollowlist": "/follow/notice/%s/%s?advertcode=%s",
-        "community": "http://www.myfans.cc/30a78e9b78",
-        "quickly": "http://mp.weixin.qq.com/s?__biz=MzIyNTM1NDUyNw==&mid=100000001&idx=1&sn=58e6008f0577d529a56c9ed78724decf&scene=0#wechat_redirect",
-        "useskill": "http://mp.weixin.qq.com/mp/homepage?__biz=MzIyNTM1NDUyNw==&hid=1&sn=f9e98da1975f85011ee138a4ee5cfbe8#wechat_redirect",
-        "about": "/swordfish/about?flag=1",
-        "followset": "/follow/set/%s/%s?advertcode=%s",
-        "myfeedbacks": "/swordfish/myFeedbacks",
-        "zqluckdraw": "/active/zqLuckdraw",
-        "followent": "/jylab/followent/entList",
-        "labindex": "/jylab/index",
-        "qrToLab": "/jylab/qrToLab/%s",
-        "searchKeyword": "/jylab/searchKeyword/%s",
-        "sealRep": "/active/sealfriends/%s",
-        "sealIndex": "/active/seal/index",
-        "sealSend": "/active/seal/sealMsg",
-        "futureIndex": "/active/future/index",
-        "keysetIndex": "/wxkeyset/keyset/index?tiptext=%s",
-        "followEntDetail": "/jylab/followent/detail/%s?advertcode=%s",
-        "mymenu": "/front/wxMyOrder/myMenu?msg=4",
-		"historypush": "/swordfish/newhistorypush?times=%s&advertcode=%s&msg=1",
-		"msgremind": "/front/vipsubscribe/msgremind?%s",
-		"treasurebox":"/jyTreasureBox/treasureBox?msg=3",
-		"vipreport":"/subscribepay/report/wxtplmsg?start=%s&end=%s&pushcount=%s&advertcode=%s",
-		"viphomepage":"/front/vipsubscribe/introducePage?advertcode=%s",
-		"viphomepage_new":"/jy_mobile/common/order/create/svip?type=buy",
-		"liveAcitve":"/active/livePage/index",
-		"bigMember":"/big/wx/page/landingPage",
-		"structed":"/front/structed/index?p=wx",
-		"digitalExpo":"/active/digital/index",
-		"docsMobile":"/page_docs_mobile/home",
-		"pointsMobile":"/page_points_mobile/home",
-		"bidedoc":"/weixin/frontPage/bidedoc/sess/index",
-		"memberreport_experience":"/bigmember/report/openpushmsg?t=wx_experience&start=%s&end=%s&pushcount=%s&advertcode=%s",
-		"chanpartner":"/weixin/frontPage/partner/sess/partner?p=wxmeun",
-		"datareport":"/datareport/page/order/detail/%s?advertcode=%s",
-		"vipFree7":"/weixin/frontPage/share/sess/index?p=wxmeun",
-		"toSubVipSetPage":"/front/vipsubscribe/toSubVipSetPage?advertcode=%s",
-		"followProjectList":"/big/wx/page/pro_follow_list?advertcode=%s",
-		"followProjectSet": "/big/wx/page/pro_follow_detail?fid=%s&sid=%s&advertcode=%s"
+  "nodeName": "node1",
+  "qrModelID": "2",
+  "numTimeNumber": 15,
+  "strTimeNumber": 30,
+  "webport": "84",
+  "webrpcport": "8084",
+  "weixinrpc": "127.0.0.1:8083",
+  "cacheflag": false,
+  "agreement": "http",
+  "webdomain": "https://web-wky.jydev.jianyu360.com",
+  "redirect": {
+    "searchinfo": "/jylab/mainSearch?msg=0",
+    "rssset": "/swordfish/newhistorypush?msg=1",
+    "viewdemo": "/front/viewdemo",
+    "wxpushlist": "/wxpush/bidinfo/%s",
+    "share": "/swordfish/guide/share",
+    "myfollow": "/follow/list",
+    "newInfoFollow": "/jylab/followent/newInfo/%s",
+    "entListFollow": "/jylab/followent/entList",
+    "pcmyfollow": "/follow/set/list/%s",
+    "feedback": "/swordfish/feedback",
+    "wxpushfollowlist": "/follow/notice/%s/%s?advertcode=%s",
+    "community": "http://www.myfans.cc/30a78e9b78",
+    "quickly": "http://mp.weixin.qq.com/s?__biz=MzIyNTM1NDUyNw==&mid=100000001&idx=1&sn=58e6008f0577d529a56c9ed78724decf&scene=0#wechat_redirect",
+    "useskill": "http://mp.weixin.qq.com/mp/homepage?__biz=MzIyNTM1NDUyNw==&hid=1&sn=f9e98da1975f85011ee138a4ee5cfbe8#wechat_redirect",
+    "about": "/swordfish/about?flag=1",
+    "followset": "/follow/set/%s/%s?advertcode=%s",
+    "myfeedbacks": "/swordfish/myFeedbacks",
+    "zqluckdraw": "/active/zqLuckdraw",
+    "followent": "/jylab/followent/entList",
+    "labindex": "/jylab/index",
+    "qrToLab": "/jylab/qrToLab/%s",
+    "searchKeyword": "/jylab/searchKeyword/%s",
+    "sealRep": "/active/sealfriends/%s",
+    "sealIndex": "/active/seal/index",
+    "sealSend": "/active/seal/sealMsg",
+    "futureIndex": "/active/future/index",
+    "keysetIndex": "/wxkeyset/keyset/index?tiptext=%s",
+    "followEntDetail": "/jylab/followent/detail/%s?advertcode=%s",
+    "mymenu": "/front/wxMyOrder/myMenu?msg=4",
+    "historypush": "/swordfish/newhistorypush?times=%s&advertcode=%s&msg=1",
+    "msgremind": "/front/vipsubscribe/msgremind?%s",
+    "treasurebox": "/jyTreasureBox/treasureBox?msg=3",
+    "vipreport": "/subscribepay/report/wxtplmsg?start=%s&end=%s&pushcount=%s&advertcode=%s",
+    "viphomepage": "/front/vipsubscribe/introducePage?advertcode=%s",
+    "viphomepage_new": "/jy_mobile/common/order/create/svip?type=buy",
+    "liveAcitve": "/active/livePage/index",
+    "bigMember": "/big/wx/page/landingPage",
+    "structed": "/front/structed/index?p=wx",
+    "digitalExpo": "/active/digital/index",
+    "docsMobile": "/page_docs_mobile/home",
+    "pointsMobile": "/page_points_mobile/home",
+    "bidedoc": "/weixin/frontPage/bidedoc/sess/index",
+    "memberreport_experience": "/bigmember/report/openpushmsg?t=wx_experience&start=%s&end=%s&pushcount=%s&advertcode=%s",
+    "chanpartner": "/weixin/frontPage/partner/sess/partner?p=wxmeun",
+    "datareport": "/datareport/page/order/detail/%s?advertcode=%s",
+    "vipFree7": "/weixin/frontPage/share/sess/index?p=wxmeun",
+    "toSubVipSetPage": "/front/vipsubscribe/toSubVipSetPage?advertcode=%s",
+    "followProjectList": "/big/wx/page/pro_follow_list?advertcode=%s",
+    "followProjectSet": "/big/wx/page/pro_follow_detail?fid=%s&sid=%s&advertcode=%s"
+  },
+  "jy_activeset": {
+    "activitystartcode": "3201000000",
+    "activityendcode": "3201999999",
+    "code": "promation",
+    "jy_extend": {
+      "activitystartcode": "3202100000",
+      "activityendcode": "3202199999"
     },
-    "jy_activeset": {
-        "activitystartcode": "3201000000",
-        "activityendcode": "3201999999",
-        "code": "promation",
-        "jy_extend": {
-            "activitystartcode": "3202100000",
-            "activityendcode": "3202199999"
-        },
-        "jy_leaflets": {
-            "activitystartcode": "3202200000",
-            "activityendcode": "3202299999"
-        },
-        "jy_zqluckdraw": {
-            "activitystartcode": "3202300000",
-            "activityendcode": "3202399999"
-        }
+    "jy_leaflets": {
+      "activitystartcode": "3202200000",
+      "activityendcode": "3202299999"
     },
-    "followProject": 10,
-    "pushRpc": "127.0.0.1:8766",
-    "followPushRpc": "127.0.0.1:8759",
-    "userPoolSize": 1000,
-    "recommendThreshold": 0.5,
-    "msg_server": "123.56.236.148:7070",
-    "rewardText": [
-        "憋说话!赏我!",
-        "“赏”就一个字 我只说一次",
-        "厉害了word鱼!",
-        "看官赏点银子偶会更卖力噢!",
-        "各位客官,快来赏点吧!",
-        "夸我还是含蓄点的好,赏一个吧~",
-        "爱,就供养;喜欢,就打赏!",
-        "请简单粗暴地爱我!",
-        "最喜欢你一言不合就打赏的样子了~~~么么!"
+    "jy_zqluckdraw": {
+      "activitystartcode": "3202300000",
+      "activityendcode": "3202399999"
+    }
+  },
+  "followProject": 10,
+  "pushRpc": "127.0.0.1:8766",
+  "followPushRpc": "127.0.0.1:8759",
+  "userPoolSize": 1000,
+  "recommendThreshold": 0.5,
+  "msg_server": "123.56.236.148:7070",
+  "rewardText": [
+    "憋说话!赏我!",
+    "“赏”就一个字 我只说一次",
+    "厉害了word鱼!",
+    "看官赏点银子偶会更卖力噢!",
+    "各位客官,快来赏点吧!",
+    "夸我还是含蓄点的好,赏一个吧~",
+    "爱,就供养;喜欢,就打赏!",
+    "请简单粗暴地爱我!",
+    "最喜欢你一言不合就打赏的样子了~~~么么!"
+  ],
+  "advertText": [
+    "与其一个人孤单  不如一群人狂欢   赶快加入剑鱼标讯社区",
+    "加入剑鱼标讯社区  和投标大神做朋友",
+    "来剑鱼标讯社区  找最合拍的伙伴",
+    "剑鱼标讯社区,让沟通连接你我。",
+    "剑鱼标讯社区,分享你的知识、解决问题、行业资源交换",
+    "勇敢发声,和老司机一起畅聊招投标。",
+    "春风十里,不如来剑鱼标讯社区!",
+    "只要心相通,相隔千里也能畅快交流。",
+    "弹指一挥间,剑鱼标讯因你而不同!",
+    "携手同行,认真对待每一次招投标"
+  ],
+  "recoveryText": [
+    "火眼金睛的你,已超越99%的同行!",
+    "感谢你及时纠正了我的胡说八道!",
+    "剑鱼标讯已收到指示,并给你手动点赞。",
+    "感谢纠错,剑鱼标讯正在火速补救。",
+    "听说帮剑鱼标讯纠错的人最后都中了标!",
+    "你帮助了众多投标人,很棒棒哟!",
+    "不嫌千辛万苦来纠错,剑鱼标讯给你小心心!",
+    "感谢你的火眼金睛,剑鱼标讯光速更新中...",
+    "老铁,我已收到,欢迎将纠错进行到底。"
+  ],
+  "recoveryRight": [
+    "火眼金睛的你,已超越99%的同行!",
+    "剑鱼标讯已收到指示,并给你手动点赞。",
+    "你帮助了众多投标人,很棒棒哟!"
+  ],
+  "recoveryField": {
+    "招标": [
+      {
+        "proportion": 15,
+        "field": "projectname"
+      },
+      {
+        "proportion": 5,
+        "field": "budget"
+      },
+      {
+        "proportion": 15,
+        "field": "buyer"
+      },
+      {
+        "proportion": 5,
+        "field": "agency"
+      },
+      {
+        "proportion": 15,
+        "field": "winner"
+      },
+      {
+        "proportion": 15,
+        "field": "bidopentime"
+      },
+      {
+        "proportion": 15,
+        "field": "buyerperson"
+      },
+      {
+        "proportion": 15,
+        "field": "buyertel"
+      }
     ],
-    "advertText": [
-        "与其一个人孤单  不如一群人狂欢   赶快加入剑鱼标讯社区",
-        "加入剑鱼标讯社区  和投标大神做朋友",
-        "来剑鱼标讯社区  找最合拍的伙伴",
-        "剑鱼标讯社区,让沟通连接你我。",
-        "剑鱼标讯社区,分享你的知识、解决问题、行业资源交换",
-        "勇敢发声,和老司机一起畅聊招投标。",
-        "春风十里,不如来剑鱼标讯社区!",
-        "只要心相通,相隔千里也能畅快交流。",
-        "弹指一挥间,剑鱼标讯因你而不同!",
-        "携手同行,认真对待每一次招投标"
+    "其他": [
+      {
+        "proportion": 8,
+        "field": "projectname"
+      },
+      {
+        "proportion": 12,
+        "field": "budget"
+      },
+      {
+        "proportion": 8,
+        "field": "buyer"
+      },
+      {
+        "proportion": 12,
+        "field": "agency"
+      },
+      {
+        "proportion": 12,
+        "field": "winner"
+      },
+      {
+        "proportion": 12,
+        "field": "bidamount"
+      },
+      {
+        "proportion": 12,
+        "field": "bidopentime"
+      },
+      {
+        "proportion": 12,
+        "field": "buyerperson"
+      },
+      {
+        "proportion": 12,
+        "field": "buyertel"
+      }
+    ]
+  },
+  "advertImg": "/images/advert.png",
+  "advertName": "广告",
+  "advertUrl": "/swordfish/about",
+  "wxJianyu": {
+    "appid": "wxdedd73f450993685",
+    "appsecret": "d55898fde0b7887e5fe4660bd2494700"
+  },
+  "industry": "行业分类",
+  "recommendEntLimit": "50",
+  "jyapp": {
+    "domain": "https://web-jydev-wcj.jianyu360.cn",
+    "apkurl": "/jyinstallpkg/mobile/%s/jianyu360.apk",
+    "appstoreurl": "https://itunes.apple.com/cn/app/id1354897149",
+    "channelDir": {
+      "s001": "baiduSem",
+      "s003": "shenmaSem",
+      "huawei": "huawei",
+      "xiaomi": "xiaomi",
+      "yingyongbao": "yingyongbao",
+      "douyin": "douyin",
+      "wx01": "jywx",
+      "topnet": "topnet",
+      "duanxin": "duanxin",
+      "active_pullnew": "active_pullnew",
+      "default": "topnet"
+    }
+  },
+  "limitSearchText": {
+    "flag": true,
+    "count": 40,
+    "timeout": 60,
+    "totalPage": 10,
+    "percentage": 80,
+    "userIds": [
     ],
-    "recoveryText": [
-        "火眼金睛的你,已超越99%的同行!",
-        "感谢你及时纠正了我的胡说八道!",
-        "剑鱼标讯已收到指示,并给你手动点赞。",
-        "感谢纠错,剑鱼标讯正在火速补救。",
-        "听说帮剑鱼标讯纠错的人最后都中了标!",
-        "你帮助了众多投标人,很棒棒哟!",
-        "不嫌千辛万苦来纠错,剑鱼标讯给你小心心!",
-        "感谢你的火眼金睛,剑鱼标讯光速更新中...",
-        "老铁,我已收到,欢迎将纠错进行到底。"
-    ],
-    "recoveryRight": [
-        "火眼金睛的你,已超越99%的同行!",
-        "剑鱼标讯已收到指示,并给你手动点赞。",
-        "你帮助了众多投标人,很棒棒哟!"
-    ],
-    "recoveryField": {
-        "招标": [
-            {
-                "proportion": 15,
-                "field": "projectname"
-            },
-            {
-                "proportion": 5,
-                "field": "budget"
-            },
-            {
-                "proportion": 15,
-                "field": "buyer"
-            },
-            {
-                "proportion": 5,
-                "field": "agency"
-            },
-            {
-                "proportion": 15,
-                "field": "winner"
-            },
-            {
-                "proportion": 15,
-                "field": "bidopentime"
-            },
-            {
-                "proportion": 15,
-                "field": "buyerperson"
-            },
-            {
-                "proportion": 15,
-                "field": "buyertel"
-            }
-        ],
-        "其他": [
-            {
-                "proportion": 8,
-                "field": "projectname"
-            },
-            {
-                "proportion": 12,
-                "field": "budget"
-            },
-            {
-                "proportion": 8,
-                "field": "buyer"
-            },
-            {
-                "proportion": 12,
-                "field": "agency"
-            },
-            {
-                "proportion": 12,
-                "field": "winner"
-            },
-            {
-                "proportion": 12,
-                "field": "bidamount"
-            },
-            {
-                "proportion": 12,
-                "field": "bidopentime"
-            },
-            {
-                "proportion": 12,
-                "field": "buyerperson"
-            },
-            {
-                "proportion": 12,
-                "field": "buyertel"
-            }
-        ]
-    },
-    "advertImg": "/images/advert.png",
-    "advertName": "广告",
-    "advertUrl": "/swordfish/about",
-    "wxJianyu": {
-        "appid": "wxdedd73f450993685",
-        "appsecret": "d55898fde0b7887e5fe4660bd2494700"
-    },
-    "industry": "行业分类",
-    "recommendEntLimit": "50",
-    "jyapp": {
-        "domain": "https://web-jydev-wcj.jianyu360.cn",
-        "apkurl": "/jyinstallpkg/mobile/%s/jianyu360.apk",
-        "appstoreurl": "https://itunes.apple.com/cn/app/id1354897149",
-        "channelDir": {
-            "s001": "baiduSem",
-            "s003": "shenmaSem",
-            "huawei": "huawei",
-            "xiaomi": "xiaomi",
-            "yingyongbao": "yingyongbao",
-            "douyin": "douyin",
-            "wx01": "jywx",
-            "topnet": "topnet",
-            "duanxin": "duanxin",
-			"active_pullnew": "active_pullnew",
-            "default": "topnet"
-        }
-    },
-    "limitSearchText": {
-        "flag": true,
-        "count": 40,
-        "timeout": 60,
-        "totalPage": 10,
-        "percentage":80,
-        "userIds": [
-        ],
-        "msg": "f 开关状态:%s //-2 从配置文件重置,-1 关闭,1 打开<br><br>c 并发数:%d //-2 不限制并发数,-1 无条件直接限制,>0 限制并发数<br><br>t 个人查询限制时间:%ds //-1 不限制<br><br>p 限制页数:%d",
-        "limitKey":"pc_limit_%s",
-        "noLogin":300
-    },
-    "share": {
-        "forceShareEnabled": false,
-        "onlineDate": "2018-08-20 00:00:00",
-        "regDaysForNewUser": 5,
-        "shareIntervalDays": 7,
-        "startHour": 8,
-        "endHour": 17,
-        "shareTimesUpperLimitR": 4000,
-        "shareTimesUpperLimitIrr": 1000
-    },
-    "cookiedomain": ".jydev.jianyu360.com",
-    "pcHelper": {
-        "subscribeTokenTimeout": 15,
-        "version": "V2.5.1"
-    },
-    "mail": [
-        {
-            "addr": "smtp.exmail.qq.com",
-            "port": 465,
-            "pwd": "ue9Rg9Sf4CVtdm5a",
-            "user": "public03@topnet.net.cn"
-        },
-        {
-            "addr": "smtp.exmail.qq.com",
-            "port": 465,
-            "pwd": "ue9Rg9Sf4CVtdm5a",
-            "user": "public03@topnet.net.cn"
-        }
-    ],
-    "sealAmount": {
-        "销冠王": "30000",
-        "全才": "30000",
-        "社交红人": "30000",
-        "灵魂人物": "30000",
-        "有态度": "20000",
-        "钢铁意志": "20000",
-        "机敏过人": "20000",
-        "行动派": "20000",
-        "细节控": "20000",
-        "神队友": "20000",
-        "业务666": "20000",
-        "靠谱": "20000",
-        "情商贼高": "10000",
-        "嘴皮子溜": "10000",
-        "脑洞倍儿大": "10000",
-        "靠实力说话": "10000"
-    },
-    "makepicurl": "http://39.105.183.186:11120",
-    "intranetip": {
-        "jy": "http://webxzh.qmx.top"
-    },
-    "getpicurl": "https://res.jianyu360.com/",
-    "sealSendTime": 14400,
-    "appPushServiceRpc": "192.168.20.139:5566",
-    "openPlatformUrl": "https://open-jytest.jianyu360.cn/",
-    "sessionEnctryFlushCorn": "0 0 0 1 * ?",
-    "PCS_time":24,
-    "detail_element":["table","div"],
-	  "termValidity":3600,
-    "uploadPath": "./web/staticres/upload/res/",
-    "redisSessionLockSize":20,
-    "accountMergeOnline":"2015-03-30 00:00:00",
-    "bidSearchOldUserLimit": 1626105600,
-    "contextOldVipLimit": 1664553600,
-    "firstBindPop":3,
-    "maxBindPop":111111111111115,
-    "nsq":"192.168.3.240:4260",
-    "nsq_topic": "jy_event",
-    "bindPopRedis":"merge",
-    "phoneFilterFlag":true,
-    "pcindexCacheTime":7200,
-    "pcIndexHotCacheTime":129600,
-    "pcindexCacheKey":"jypcindex3",
-    "dedupUrl":  "http://127.0.0.1:8888/data/deduplication",
-    "bmwxrcoll":"drainage_wxreply_log",
-    "optimalTime":"2021-08-03 12:00:00",
-    "pcFilterFlag":true,
-    "pcSessionFlag":true,
-    "sessionTimeout":168,
-    "pcSessionTimeout":168,
-    "shareRedisName":"other",
-    "wxWebdomain": "https://web-wky.jydev.jianyu360.com",
-    "wxOrgUrl": "/page_entbase_mobile/page/invite/inviting.html",
-    "pcOrgUrl":"/orgpc/inviting",
-    "criticality":2,
-    "indexcontentTimeOut":86400,
-    "seoBeforeTimeHour":12160,
-    "canReadNotice": 3,
-    "smsServiceRpc":"127.0.0.1:932",
-    "searchTypeSwitch": true,
-    "fileSignBool":true,
-    "baseUserFilterFlag":false,
-    "userCenterApi":"https://web-zxl.jydev.jianyu360.com",
-    "resourceCenter": "https://web-zxl.jydev.jianyu360.com",
-    "resourceCenterUrl": {
-	    "haspowers": "/resourceCenter/haspowers"
-	},
-	"keywordsLimit":35,
-	"detailMosaicTxt":"略",
-    "needMosaic":{
- 		"projectname":true,
-        "projectcode":true,
-        "budget":true,
-        "bidamount":true,
-        "buyer":true,
-        "buyerperson":true,
-        "buyertel":true,
-        "buyeraddr":true,
-        "agency":true,
-        "agencyperson":true,
-        "agencytel":true,
-        "agencyaddr":true,
-        "winner":true,
-        "s_winner":true,
-        "winnerperson":true,
-        "winnertel":true,
-        "winneraddr":true,
-        "docstarttime":true,
-        "docendtime":true,
-        "bidendtime":true,
-        "bidstarttime":true,
-        "bidopentime":true,
-        "bidopenaddress":true,
-        "contractcode":true,
-        "signaturedate":true,
-        "purchasinglist":true,
-        "item":true,
-        "purchasing":true,
-        "itemname":true,
-        "brandname":true,
-        "specs":true,
-        "model":true,
-        "unitname":true,
-        "dimensions":true,
-        "number":true,
-        "unitprice":true,
-        "totalprice":true,
-        "guaranteetime":true,
-        "orderno":true,
-        "procurementlist":true,
-        "projectscope":true,
-        "reserved_amount":true,
-        "expurasingtime":true,
-        "winnerMap":true
+    "msg": "f 开关状态:%s //-2 从配置文件重置,-1 关闭,1 打开<br><br>c 并发数:%d //-2 不限制并发数,-1 无条件直接限制,>0 限制并发数<br><br>t 个人查询限制时间:%ds //-1 不限制<br><br>p 限制页数:%d",
+    "limitKey": "pc_limit_%s",
+    "noLogin": 300
+  },
+  "share": {
+    "forceShareEnabled": false,
+    "onlineDate": "2018-08-20 00:00:00",
+    "regDaysForNewUser": 5,
+    "shareIntervalDays": 7,
+    "startHour": 8,
+    "endHour": 17,
+    "shareTimesUpperLimitR": 4000,
+    "shareTimesUpperLimitIrr": 1000
+  },
+  "cookiedomain": ".jydev.jianyu360.com",
+  "pcHelper": {
+    "subscribeTokenTimeout": 15,
+    "version": "V2.5.1"
+  },
+  "mail": [
+    {
+      "addr": "smtp.exmail.qq.com",
+      "port": 465,
+      "pwd": "ue9Rg9Sf4CVtdm5a",
+      "user": "public03@topnet.net.cn"
     },
-    "keywordsLimitNologin":25
+    {
+      "addr": "smtp.exmail.qq.com",
+      "port": 465,
+      "pwd": "ue9Rg9Sf4CVtdm5a",
+      "user": "public03@topnet.net.cn"
+    }
+  ],
+  "sealAmount": {
+    "销冠王": "30000",
+    "全才": "30000",
+    "社交红人": "30000",
+    "灵魂人物": "30000",
+    "有态度": "20000",
+    "钢铁意志": "20000",
+    "机敏过人": "20000",
+    "行动派": "20000",
+    "细节控": "20000",
+    "神队友": "20000",
+    "业务666": "20000",
+    "靠谱": "20000",
+    "情商贼高": "10000",
+    "嘴皮子溜": "10000",
+    "脑洞倍儿大": "10000",
+    "靠实力说话": "10000"
+  },
+  "makepicurl": "http://39.105.183.186:11120",
+  "intranetip": {
+    "jy": "http://webxzh.qmx.top"
+  },
+  "getpicurl": "https://res.jianyu360.com/",
+  "sealSendTime": 14400,
+  "appPushServiceRpc": "192.168.20.139:5566",
+  "openPlatformUrl": "https://open-jytest.jianyu360.cn/",
+  "sessionEnctryFlushCorn": "0 0 0 1 * ?",
+  "PCS_time": 24,
+  "detail_element": [
+    "table",
+    "div"
+  ],
+  "termValidity": 3600,
+  "uploadPath": "./web/staticres/upload/res/",
+  "redisSessionLockSize": 20,
+  "accountMergeOnline": "2015-03-30 00:00:00",
+  "bidSearchOldUserLimit": 1626105600,
+  "contextOldVipLimit": 1664553600,
+  "firstBindPop": 3,
+  "maxBindPop": 111111111111115,
+  "nsq": "192.168.3.240:4260",
+  "nsq_topic": "jy_event",
+  "bindPopRedis": "merge",
+  "phoneFilterFlag": true,
+  "pcindexCacheTime": 7200,
+  "pcIndexHotCacheTime": 129600,
+  "pcindexCacheKey": "jypcindex3",
+  "dedupUrl": "http://127.0.0.1:8888/data/deduplication",
+  "bmwxrcoll": "drainage_wxreply_log",
+  "optimalTime": "2021-08-03 12:00:00",
+  "pcFilterFlag": true,
+  "pcSessionFlag": true,
+  "sessionTimeout": 168,
+  "pcSessionTimeout": 168,
+  "shareRedisName": "other",
+  "wxWebdomain": "https://web-wky.jydev.jianyu360.com",
+  "wxOrgUrl": "/page_entbase_mobile/page/invite/inviting.html",
+  "pcOrgUrl": "/orgpc/inviting",
+  "criticality": 2,
+  "indexcontentTimeOut": 86400,
+  "seoBeforeTimeHour": 12160,
+  "canReadNotice": 3,
+  "smsServiceRpc": "127.0.0.1:932",
+  "searchTypeSwitch": true,
+  "fileSignBool": true,
+  "baseUserFilterFlag": false,
+  "userCenterApi": "https://web-zxl.jydev.jianyu360.com",
+  "resourceCenter": "https://web-zxl.jydev.jianyu360.com",
+  "resourceCenterUrl": {
+    "haspowers": "/resourceCenter/haspowers"
+  },
+  "keywordsLimit": 35,
+  "detailMosaicTxt": "略",
+  "needMosaic": {
+    "projectname": true,
+    "projectcode": true,
+    "budget": true,
+    "bidamount": true,
+    "buyer": true,
+    "buyerperson": true,
+    "buyertel": true,
+    "buyeraddr": true,
+    "agency": true,
+    "agencyperson": true,
+    "agencytel": true,
+    "agencyaddr": true,
+    "winner": true,
+    "s_winner": true,
+    "winnerperson": true,
+    "winnertel": true,
+    "winneraddr": true,
+    "docstarttime": true,
+    "docendtime": true,
+    "bidendtime": true,
+    "bidstarttime": true,
+    "bidopentime": true,
+    "bidopenaddress": true,
+    "contractcode": true,
+    "signaturedate": true,
+    "purchasinglist": true,
+    "item": true,
+    "purchasing": true,
+    "itemname": true,
+    "brandname": true,
+    "specs": true,
+    "model": true,
+    "unitname": true,
+    "dimensions": true,
+    "number": true,
+    "unitprice": true,
+    "totalprice": true,
+    "guaranteetime": true,
+    "orderno": true,
+    "procurementlist": true,
+    "projectscope": true,
+    "reserved_amount": true,
+    "expurasingtime": true,
+    "winnerMap": true
+  },
+  "keywordsLimitNologin": 25,
+  "etcd": {
+    "hosts": "192.168.3.206:27080",
+    "key": "powercheck.rpc"
+  }
 }

+ 4 - 4
src/go.mod

@@ -3,9 +3,9 @@ module jy/src
 go 1.18
 
 require (
-	app.yhyue.com/moapp/jybase v0.0.0-20230109053435-fe962d69e751
-	app.yhyue.com/moapp/jypkg v0.0.0-20230109081446-6622f5a8b068
-	bp.jydev.jianyu360.cn/BaseService/userCenter v0.0.0-20230106095456-724d78f8d9c4
+	app.yhyue.com/moapp/jybase v0.0.0-20230110071808-0c8ff7f798c6
+	app.yhyue.com/moapp/jypkg v0.0.0-20230110072459-b8e28d30c98d
+	bp.jydev.jianyu360.cn/BaseService/userCenter v0.0.0-20230109023014-2cd2a0b9b979
 	github.com/SKatiyar/qr v0.0.0-20151201054752-25b6bdf44e67
 	github.com/dchest/captcha v1.0.0
 	github.com/fsnotify/fsnotify v1.6.0
@@ -15,6 +15,7 @@ require (
 	go.mongodb.org/mongo-driver v1.11.1
 )
 
+
 require (
 	app.yhyue.com/moapp/esv1 v0.0.0-20220414031211-3da4123e648d // indirect
 	app.yhyue.com/moapp/message v0.0.0-20221223100203-6402e389d9ae // indirect
@@ -122,4 +123,3 @@ require (
 	sigs.k8s.io/structured-merge-diff/v4 v4.2.1 // indirect
 	sigs.k8s.io/yaml v1.2.0 // indirect
 )
-

+ 25 - 13
src/go.sum

@@ -9,11 +9,12 @@ app.yhyue.com/moapp/jybase v0.0.0-20220420032112-668025915ee4/go.mod h1:qNRA0sHu
 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-20221010080805-39dc6a853eff/go.mod h1:HelrO6tcD9TcKb/HOP2BLbzppyDz2kpQSFhPMQTUgbQ=
-app.yhyue.com/moapp/jybase v0.0.0-20230109053435-fe962d69e751 h1:Z3Ye/xauzer3FymqIElv9/iEIfDOUkQBfnQPcKthoSc=
-app.yhyue.com/moapp/jybase v0.0.0-20230109053435-fe962d69e751/go.mod h1:zB47XTeJvpcbtBRYgkQuxOICWNexiZfbUO+7aUf6mNs=
-app.yhyue.com/moapp/jypkg v0.0.0-20230109081446-6622f5a8b068 h1:+sZ9yGrMPsetT8DTdRiHTkK+wnFgNClvPzNdkPewdBw=
-app.yhyue.com/moapp/jypkg v0.0.0-20230109081446-6622f5a8b068/go.mod h1:n2XBXZGvxUuc4AZMeMYUZuK7ayrwDQ7UdrZd6AJkUVM=
+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-20230110071808-0c8ff7f798c6 h1:Szt9G37MxAN5xJXGGS87EtMdIKoucilK5inP3zRLUIE=
+app.yhyue.com/moapp/jybase v0.0.0-20230110071808-0c8ff7f798c6/go.mod h1:zB47XTeJvpcbtBRYgkQuxOICWNexiZfbUO+7aUf6mNs=
+app.yhyue.com/moapp/jypkg v0.0.0-20230110072459-b8e28d30c98d h1:N/71mg7rkJnKNtxVGji0xID2PdRt4BnAj7uKpjA3ZO0=
+app.yhyue.com/moapp/jypkg v0.0.0-20230110072459-b8e28d30c98d/go.mod h1:Arq5I8RsXJvV6i8K7f0ZG6MBt26MLhzuQswoU3SSqjc=
 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=
@@ -26,10 +27,12 @@ bp.jydev.jianyu360.cn/BaseService/resourceCenter v0.0.0-20220419023723-0b32d4a41
 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-20230106095456-724d78f8d9c4 h1:lQ0PY9fTaLg/VnYx3l7J0w5/iPc7U5eL0RuBwpo3l4I=
-bp.jydev.jianyu360.cn/BaseService/userCenter v0.0.0-20230106095456-724d78f8d9c4/go.mod h1:lVknJRBUdEf+eGmaKjVLnaa4yVoDjnv5/SqbUm8a6Sk=
+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-20230109023014-2cd2a0b9b979 h1:hC97JNmBonTAsnDH4XMWLXVqWdo85tCo0ge04cy0e4E=
+bp.jydev.jianyu360.cn/BaseService/userCenter v0.0.0-20230109023014-2cd2a0b9b979/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=
@@ -439,7 +442,6 @@ github.com/alicebob/gopher-json v0.0.0-20200520072559-a9ecdc9d1d3a/go.mod h1:SGn
 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.0/go.mod h1:XNqvJdQJv5mSuVMc0ynneafpnL/zv52acZ6kqeS0t88=
 github.com/alicebob/miniredis/v2 v2.23.1 h1:jR6wZggBxwWygeXcdNyguCOCIjPsZyNUNlAkTx2fu0U=
 github.com/alicebob/miniredis/v2 v2.23.1/go.mod h1:84TWKZlxYkfgMucPBf5SOQBYJceZeQRFIaQgNMiCX6Q=
 github.com/aliyun/aliyun-oss-go-sdk v2.2.2+incompatible/go.mod h1:T/Aws4fEfogEE9v+HPhhw+CntffsBHJ8nXQCwKr0/g8=
@@ -552,6 +554,7 @@ github.com/fsnotify/fsnotify v1.5.1/go.mod h1:T3375wBYaZdLLcVNkcVbzGHY7f1l/uK5T5
 github.com/fsnotify/fsnotify v1.5.4/go.mod h1:OVB6XrOHzAwXMpEM7uPOzcehqUV2UqJxmVXmkdnm1bU=
 github.com/fsnotify/fsnotify v1.6.0 h1:n+5WquG0fcWoWp6xPWfHdbskMCQaFnG6PfBrh1Ky4HY=
 github.com/fsnotify/fsnotify v1.6.0/go.mod h1:sl3t1tCWJFWoRz9R8WJCbQihKKwmorjAbSClcnxKAGw=
+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=
@@ -756,6 +759,7 @@ github.com/googleapis/gnostic v0.5.1/go.mod h1:6U4PtQXGIEt/Z3h5MAT7FNofLnw9vXk2c
 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=
@@ -803,9 +807,9 @@ 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.13.0/go.mod h1:JytZfP5d0r8pVNLZvai7U/MCuTWITgrI4tTg7puQFKI=
 github.com/jhump/protoreflect v1.14.0/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=
@@ -913,6 +917,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=
@@ -955,7 +960,6 @@ github.com/paulmach/orb v0.7.1/go.mod h1:FWRlTgl88VI1RBx/MkrwWDRhQ96ctqMCh8boXhm
 github.com/paulmach/protoscan v0.2.1/go.mod h1:SpcSwydNLrxUGSDvXvO0P7g7AuhJ7lcKfDlhJCDw2gY=
 github.com/pelletier/go-toml v1.7.0/go.mod h1:vwGMzjaWMwyfHwgIBhI2YUM4fB6nL6lVAvS1LBMMhTE=
 github.com/pelletier/go-toml/v2 v2.0.2/go.mod h1:MovirKjgVRESsAvNZlAjtFwV867yGuwRkXbG66OzopI=
-github.com/pelletier/go-toml/v2 v2.0.5/go.mod h1:OMHamSCAODeSsVrwwvcJOaoN0LIUIaFVNZzmWyNfXas=
 github.com/pelletier/go-toml/v2 v2.0.6 h1:nrzqCb7j9cDFj2coyLNLaZuJTLjWjlaz6nvTvIwycIU=
 github.com/pelletier/go-toml/v2 v2.0.6/go.mod h1:eumQOmlWiOPt5WriQQqoM5y18pDHwha2N+QD+EUNTek=
 github.com/peterbourgon/diskv v2.0.1+incompatible/go.mod h1:uqqh8zWWbv1HBMNONnaR/tNboyR3/BZd58JJSHlUSCU=
@@ -1110,7 +1114,7 @@ github.com/yuin/gopher-lua v0.0.0-20220504180219-658193537a64/go.mod h1:GBR0iDaN
 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.2/go.mod h1:OK8ilGkhRzhi1NRRC76h5qTNFm6NbsYrUqld38i4NF4=
+github.com/zeromicro/go-zero v1.4.0/go.mod h1:1amLn98K7c6FLntb9f8hdmq26ajtolOg4DTFWnRt54o=
 github.com/zeromicro/go-zero v1.4.3 h1:sTQ++6fxQHJnpGCN7h2CUrhWmbvhBqEgE75cJl635SM=
 github.com/zeromicro/go-zero v1.4.3/go.mod h1:UmDjuW7LHd9j7+nnnPBcXF0HLNmjJw6OjHPTlSp7X7Y=
 github.com/ziutek/blas v0.0.0-20190227122918-da4ca23e90bb h1:uWiILQloLUVdtPYr1ZZo2zqtlpzo4G8vUpglo/Fs2H8=
@@ -1132,7 +1136,7 @@ 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.3/go.mod h1:z4XpeoU6w+9Vht+jAFyLgVrD+jGSQQe0+CBWFHNiHt8=
+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=
@@ -1147,11 +1151,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=
@@ -1166,6 +1172,7 @@ 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/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=
@@ -1173,6 +1180,7 @@ go.opentelemetry.io/otel/sdk v1.0.0/go.mod h1:PCrDHlSy5x1kjezSdL37PhbFUMjrsLRshJ
 go.opentelemetry.io/otel/sdk v1.3.0/go.mod h1:rIo4suHNhQwBIPg9axF8V9CA72Wz2mKF1teNrup8yzs=
 go.opentelemetry.io/otel/sdk v1.7.0/go.mod h1:uTEOTwaqIVuTGiJN7ii13Ibp75wJmYUDe374q6cZwUU=
 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=
@@ -1180,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=
@@ -1545,8 +1554,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=
@@ -1795,6 +1806,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=
@@ -1885,4 +1897,4 @@ sigs.k8s.io/yaml v1.1.0/go.mod h1:UJmg0vDUVViEyp3mgSv9WPwZCDxu4rQW1olrI1uml+o=
 sigs.k8s.io/yaml v1.2.0 h1:kr/MCeFWJWTwyaHoR9c8EjH9OumOmoF9YGiZd7lFm/Q=
 sigs.k8s.io/yaml v1.2.0/go.mod h1:yfXDCHCao9+ENCvLSE62v9VSji2MKu5jeNfTrofGhJc=
 xorm.io/builder v0.3.6/go.mod h1:LEFAPISnRzG+zxaxj2vPicRwz67BdhFreKg8yv8/TgU=
-xorm.io/core v0.7.2-0.20190928055935-90aeac8d08eb/go.mod h1:jJfd0UAEzZ4t87nbQYtVjmqpIODugN6PD2D9E+dJvdM=
+xorm.io/core v0.7.2-0.20190928055935-90aeac8d08eb/go.mod h1:jJfd0UAEzZ4t87nbQYtVjmqpIODugN6PD2D9E+dJvdM=

+ 7 - 7
src/jfw/active/21yearEndReport.go

@@ -1,18 +1,18 @@
 package active
 
 import (
-	"fmt"
-	"jy/src/jfw/config"
-	"net/url"
-	"time"
-	"jy/src/jfw/jyutil"
-	"app.yhyue.com/moapp/jypkg/public"
 	qutil "app.yhyue.com/moapp/jybase/common"
-	"app.yhyue.com/moapp/jybase/redis"
 	"app.yhyue.com/moapp/jybase/go-xweb/httpsession"
 	"app.yhyue.com/moapp/jybase/go-xweb/xweb"
+	"app.yhyue.com/moapp/jybase/redis"
+	"app.yhyue.com/moapp/jypkg/public"
+	"fmt"
 	"go.mongodb.org/mongo-driver/bson"
 	"go.mongodb.org/mongo-driver/bson/primitive"
+	"jy/src/jfw/config"
+	"jy/src/jfw/jyutil"
+	"net/url"
+	"time"
 )
 
 const (

+ 5 - 6
src/jfw/front/big-member.go

@@ -1,12 +1,11 @@
 package front
 
 import (
+	qutil "app.yhyue.com/moapp/jybase/common"
 	"jy/src/jfw/config"
 
 	"app.yhyue.com/moapp/jypkg/common/src/qfw/util/jy"
 
-	"app.yhyue.com/moapp/jypkg/public"
-
 	"app.yhyue.com/moapp/jybase/go-xweb/xweb"
 )
 
@@ -23,8 +22,8 @@ func init() {
 
 func (s *BigMemberAction) VIPViewPage(htmlName string) {
 	s.T["logid"] = config.Seoconfig["bigmember"].(string)
-	userid, _ := s.GetSession("userId").(string)
-	bigBaseMsg := jy.GetBigVipUserBaseMsg(userid, public.Mysql, public.MQFW)
+	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{}
@@ -45,8 +44,8 @@ func (s *BigMemberAction) PcVIPViewPage(htmlName string) {
 
 func (s *BigMemberAction) WxVIPViewPage(htmlName string) error {
 	s.T["logid"] = config.Seoconfig["bigmember"].(string)
-	userid, _ := s.GetSession("userId").(string)
-	bigBaseMsg := jy.GetBigVipUserBaseMsg(userid, public.Mysql, public.MQFW)
+	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")
 	}

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

@@ -22,8 +22,6 @@ import (
 	"app.yhyue.com/moapp/jypkg/common/src/qfw/util/jy"
 	"app.yhyue.com/moapp/jypkg/public"
 
-	. "jy/src/jfw/grpc"
-
 	elastic "app.yhyue.com/moapp/jybase/esv1"
 	"app.yhyue.com/moapp/jybase/redis"
 

+ 4 - 3
src/jfw/front/shorturl.go

@@ -226,8 +226,9 @@ func (s *Short) Article(stype, id string) error {
 		//判断用户是否是vip
 		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}`)
 	}
-
-	userPower := jy.GetBigVipUserBaseMsg(userId, public.Mysql, public.MQFW)
+	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"]))
 	var (
 		isEntnicheNew bool = userPower.EntIsNew           //新版超级订阅
 		isOldVip      bool = false                        //新购超级订阅不能查看拟建项目详情页
@@ -242,7 +243,7 @@ func (s *Short) Article(stype, id string) error {
 			isOldVip = true
 		}
 	}
-	entId := util.IntAll(s.GetSession("entId"))
+	entId := util.IntAll(entid)
 	if entId > 0 && userPower.EntInfo[entId] != nil {
 		isEntniche = userPower.EntInfo[entId].Status == 1 && userPower.EntInfo[entId].IsPower
 		isEntnicheNew = userPower.EntInfo[entId].IsNew && isEntniche

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

@@ -146,7 +146,8 @@ func (s *Subscribepay) ToSetPage() error {
 			s.SetSession(jy.SwitchService.SessionKey, jy.SwitchService.Member)
 		}
 	}
-	vipMsg := jy.GetBigVipUserBaseMsg(userid, public.Mysql, public.MQFW)
+	etcdMap := config.Sysconfig["etcd"].(map[string]interface{})
+	vipMsg := jy.GetBigVipUserBaseMsg("10000", s.Session(), util.InterfaceToStr(etcdMap["hosts"]), util.InterfaceToStr(etcdMap["key"]))
 	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 {

+ 2 - 3
src/jfw/front/wxkeyset.go

@@ -12,8 +12,6 @@ import (
 	util "app.yhyue.com/moapp/jybase/common"
 	. "app.yhyue.com/moapp/jybase/date"
 	"app.yhyue.com/moapp/jypkg/common/src/qfw/util/jy"
-	"app.yhyue.com/moapp/jypkg/public"
-
 	//	"sync"
 	"time"
 )
@@ -34,7 +32,8 @@ func (m *Front) WxKeyset(tpl string) error {
 			"type":       "keyset",
 		})
 	}
-	vipMsg := jy.GetBigVipUserBaseMsg(userid, public.Mysql, public.MQFW)
+	etcdMap := config.Sysconfig["etcd"].(map[string]interface{})
+	vipMsg := jy.GetBigVipUserBaseMsg("10000", m.Session(), util.InterfaceToStr(etcdMap["hosts"]), util.InterfaceToStr(etcdMap["key"]))
 	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))
 	}

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

@@ -1,9 +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/public"
 	"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"
 )
 
@@ -33,8 +35,8 @@ func (s *NewBigMemberAction) PowerClear() {
 
 func (s *NewBigMemberAction) VipPageManager(htmlName string) error {
 	if !freePageReg.MatchString(htmlName) {
-		userid, _ := s.GetSession("userId").(string)
-		bigBaseMsg := jy.GetBigVipUserBaseMsg(userid, public.Mysql, public.MQFW)
+		etcdMap := config.Sysconfig["etcd"].(map[string]interface{})
+		bigBaseMsg := jy.GetBigVipUserBaseMsg("10000", s.Session(), util.InterfaceToStr(etcdMap["hosts"]), util.InterfaceToStr(etcdMap["key"]))
 		//大会员页面权限判断
 		if !bigBaseMsg.CheckBigVipFrontPower(htmlName) {
 			//main_root页面大会员主页面 只要是大会员都可以进入

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

@@ -578,7 +578,9 @@ func (s *Front) ShowRedSpotOnMenu() {
 			} else {
 				uid = userid
 			}
-			powerMap := jy.GetBigVipUserBaseMsg(userid, public.Mysql, public.MQFW).PowerMap
+			etcdMap := config.Sysconfig["etcd"].(map[string]interface{})
+			powerMap := jy.GetBigVipUserBaseMsg("10000", s.Session(), util.InterfaceToStr(etcdMap["hosts"]), util.InterfaceToStr(etcdMap["key"])).PowerMap
+			//powerMap := jy.GetBigVipUserBaseMsg(userid, public.Mysql, public.MQFW).PowerMap
 			if memberStatus > 0 && (powerMap[13] || powerMap[16]) {
 				ent = util.IntAll(public.BaseMysql.Count("follow_ent_monitor", map[string]interface{}{
 					"i_apppushunread": 1,

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

@@ -70,7 +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)
-			powerMap := jy.GetBigVipUserBaseMsg(userid, public.Mysql, public.MQFW).PowerMap
+			etcdMap := config.Sysconfig["etcd"].(map[string]interface{})
+			powerMap := jy.GetBigVipUserBaseMsg("10000", m.Session(), qutil.InterfaceToStr(etcdMap["hosts"]), qutil.InterfaceToStr(etcdMap["key"])).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")
 	}
-
-	userPower := jy.GetBigVipUserBaseMsg(userId, public.Mysql, public.MQFW)
+	etcdMap := config.Sysconfig["etcd"].(map[string]interface{})
+	userPower := jy.GetBigVipUserBaseMsg("10000", s.Session(), util.InterfaceToStr(etcdMap["hosts"]), util.InterfaceToStr(etcdMap["key"]))
 	var (
 		isEntnicheNew bool   = userPower.EntIsNew           //新版超级订阅
 		isOldVip      bool   = false                        //新购超级订阅不能查看拟建项目详情页

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

@@ -277,7 +277,9 @@ func (m *Front) WxsearchlistPaging() {
 			city = m.GetString("city")
 		}
 		//校验是否有大会员中标企业查询权限
-		if jy.GetBigVipUserBaseMsg(userid, public.Mysql, public.MQFW).CheckBigVipBackPower("search") {
+		etcdMap := config.Sysconfig["etcd"].(map[string]interface{})
+		bigBaseMsg := jy.GetBigVipUserBaseMsg("10000", m.Session(), util.InterfaceToStr(etcdMap["hosts"]), util.InterfaceToStr(etcdMap["key"]))
+		if bigBaseMsg.CheckBigVipBackPower("search") {
 			winner = m.GetString("winner")
 		}
 		//全文检索限制

+ 7 - 3
src/jfw/modules/app/src/app/front/vipsubscribe.go

@@ -3,6 +3,7 @@ package front
 import (
 	"encoding/hex"
 	"jy/src/jfw/modules/app/src/app/jyutil"
+	"jy/src/jfw/modules/app/src/jfw/config"
 	"net/url"
 	"strings"
 	"time"
@@ -112,7 +113,9 @@ func (s *Subscribepay) ToSetPage() {
 		}
 	}
 	vSwitch = jy.SwitchService.GetEntniche(s.Session(), public.MQFW, public.Mysql) //v:vip m:member
-	bigBaseMsg := jy.GetBigVipUserBaseMsg(userid, public.Mysql, public.MQFW)
+	etcdMap := config.Sysconfig["etcd"].(map[string]interface{})
+	bigBaseMsg := jy.GetBigVipUserBaseMsg("10000", s.Session(), util.InterfaceToStr(etcdMap["hosts"]), util.InterfaceToStr(etcdMap["key"]))
+	//bigBaseMsg := jy.GetBigVipUserBaseMsg(userid, public.Mysql, public.MQFW)
 	if (vSwitch == "" || vSwitch == "v") && bigBaseMsg.VipStatus <= 0 && !bigBaseMsg.IsUpgrade {
 		s.Redirect("/jyapp/wxkeyset/keyset/index")
 	}
@@ -234,7 +237,6 @@ func (s *Subscribepay) ToOrderDetailPage() {
 
 //订阅收费设置关键词
 func (s *Subscribepay) ToSetKeyWordPage() {
-	userid, _ := s.GetSession("userId").(string)
 	vSwitch := s.GetString("vSwitch")
 	if strings.Contains(s.Refer(), "/jyapp/jylab/index") {
 		vSwitch = jy.SwitchService.Vip
@@ -247,7 +249,9 @@ func (s *Subscribepay) ToSetKeyWordPage() {
 		}
 	}
 	vSwitch = jy.SwitchService.GetEntniche(s.Session(), public.MQFW, public.Mysql) //v:vip m:member
-	bigBaseMsg := jy.GetBigVipUserBaseMsg(userid, public.Mysql, public.MQFW)
+	etcdMap := config.Sysconfig["etcd"].(map[string]interface{})
+	bigBaseMsg := jy.GetBigVipUserBaseMsg("10000", s.Session(), util.InterfaceToStr(etcdMap["hosts"]), util.InterfaceToStr(etcdMap["key"]))
+	//bigBaseMsg := jy.GetBigVipUserBaseMsg(userid, public.Mysql, public.MQFW)
 	//如果没有首次使用
 	if vSwitch == "m" && bigBaseMsg.Status > 0 && !bigBaseMsg.Used {
 		s.Redirect("/jyapp/big/page/init") //跳转至首次初始化页面

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

@@ -14,8 +14,6 @@ import (
 	util "app.yhyue.com/moapp/jybase/common"
 	. "app.yhyue.com/moapp/jybase/date"
 	"app.yhyue.com/moapp/jypkg/common/src/qfw/util/jy"
-	"app.yhyue.com/moapp/jypkg/public"
-
 	//	"sync"
 	"time"
 )
@@ -29,7 +27,9 @@ func (m *Front) WxKeyset(tpl string) error {
 		return m.Redirect("/jyapp/tenderSubscribe/guide?url=" + url.QueryEscape(m.Request.RequestURI))
 	}
 	//到新订阅设置
-	vipMsg := jy.GetBigVipUserBaseMsg(userid, public.Mysql, public.MQFW)
+	etcdMap := config.Sysconfig["etcd"].(map[string]interface{})
+	vipMsg := jy.GetBigVipUserBaseMsg("10000", m.Session(), util.InterfaceToStr(etcdMap["hosts"]), util.InterfaceToStr(etcdMap["key"]))
+	//vipMsg := jy.GetBigVipUserBaseMsg(userid, public.Mysql, public.MQFW)
 	if vipMsg.IsUpgrade {
 		return m.Redirect("/jyapp/vipsubscribe/toSubVipSetPage")
 	}

+ 161 - 157
src/jfw/modules/app/src/config.json

@@ -1,119 +1,119 @@
 {
-	"cookiedomain": ".jianyu360.com",
-	"webport": "89",
-	"weixinrpc": "127.0.0.1:8083",
-	"cacheflag": false,
-	"agreement": "http",
-	"webdomain": "https://web-zxl.jydev.jianyu360.com",
-	"redirect": {
-		"wxpushlist": "/jyapp/wxpush/bidinfo/%s",
-		"newInfoFollow": "/jyapp/followent/newInfo/%s",
-		"wxpushfollowlist": "/jyapp/follow/notice/%s/%s",
-		"followset": "/jyapp/follow/set/%s/%s",
-		"myfeedbacks": "/jyapp/swordfish/myFeedbacks",
-		"historypush": "/jyapp/swordfish/historypush?f=push&t=%s&pushtime=%s",
-		"followEntDetail": "/jyapp/followent/detail/%s",
-		"msgremind": "/jyapp/vipsubscribe/msgremind?%s",
-		"vipreport": "/subscribepay/report/wxtplmsg?start=%s&end=%s&pushcount=%s",
-		"entnichehistorypush": "/jyapp/entniche/pushlist?selectTime=%s&pi=%s&pn=%s&type=%s",
-		"trackReport": "/page_entniche/business/t-report/detail/%s_%s/%s",
-		"viphomepage": "/jyapp/vipsubscribe/toSubVipSetPage?vSwitch=%s",
-		"pushFollowEnt": "/jyapp/big/page/ent_follow",
-		"pushFollowProject": "/jyapp/big/page/pro_follow_list",
-		"pushMember": "/jyapp/big/page/big_subscribe?pushtime=%s",
-		"pushProjectForecast": "/jyapp/big/page/forecast_list",
-		"pushEntChange": "/jyapp/big/page/ent_follow",
-		"followProjectSet": "/jyapp/big/page/pro_follow_detail?fid=%s&sid=%s",
-		"memberreport":"/bigmember/report/openpushmsg?start=%s&end=%s&pushcount=%s",
-		"memberreport_experience":"/bigmember/report/openpushmsg?t=app_experience&start=%s&end=%s&pushcount=%s",
-		"entnichepush": "/jyapp/entniche/push?time=%s&pi=%s&pn=%s&type=%s"
-	},
-	"followProject": 10,
-	"followentlimit": "10",
-	"followLimitDay": 30,
-	"followTipMsg": {
-		"title": "您关注的项目《%s》将于%s开标!",
-		"remark": "您收到这条信息是因为您之前设置了项目开标提醒,如果您不再需要此类提醒,可点击下方“详情”修改提醒设置。"
-	},
-	"followPushRpc": "127.0.0.1:8759",
-	"rewardText": [
-		"憋说话!赏我!",
-		"“赏”就一个字 我只说一次",
-		"厉害了word鱼!",
-		"看官赏点银子偶会更卖力噢!",
-		"各位客官,快来赏点吧!",
-		"夸我还是含蓄点的好,赏一个吧~",
-		"爱,就供养;喜欢,就打赏!",
-		"请简单粗暴地爱我!",
-		"最喜欢你一言不合就打赏的样子了~~~么么!"
-	],
-	"advertText": [
-		"与其一个人孤单  不如一群人狂欢   赶快加入剑鱼标讯社区",
-		"加入剑鱼标讯社区  和投标大神做朋友",
-		"来剑鱼标讯社区  找最合拍的伙伴",
-		"剑鱼标讯社区,让沟通连接你我。",
-		"剑鱼标讯社区,分享你的知识、解决问题、行业资源交换",
-		"勇敢发声,和老司机一起畅聊招投标。",
-		"春风十里,不如来剑鱼标讯社区!",
-		"只要心相通,相隔千里也能畅快交流。",
-		"弹指一挥间,剑鱼标讯因你而不同!",
-		"携手同行,认真对待每一次招投标"
-	],
-	"advertImg": "/jyapp/images/advert.png",
-	"advertName": "广告",
-	"advertUrl": "/jyapp/free/swordfish/about",
-	"industry": "分类综合测试",
-	"recommendEntLimit": "50",
-	"update": {
-		"isBrowserUpdate":1,
-		"grayupdate":false,
-		"version": "3.0.5",
-		"mustupdate": false,
-		"tipspace": 86400,
-		"ios_version": "2.7.3",
-		"ios_mustupdate": false,
-		"ios_openUpdate": false,
-		"ios_grayupdate":false,
-		"apkurl": "https://web2-jytest.jydev.jianyu360.com/jyinstallpkg/mobile/%s/jianyu360.apk",
-		"channelDir": {
-			"baidu": "baiduSem",
-			"shenma": "shenmaSem",
-			"huawei": "huawei",
-			"xiaomi": "xiaomi",
-			"yingyongbao": "yingyongbao",
-			"douyin": "douyin",
-			"weixin": "jywx",
-			"topnet": "topnet",
-			"duanxin": "duanxin",
-			"active_pullnew": "active_pullnew",
-			"default": "topnet"
-		}
-	},
-	"limitSearchText": {
-		"flag": false,
-		"count": 3,
-		"timeout": 60,
-		"totalPage": 3,
-		"userIds": [
-			"ocXeA0jceF8KRunDkwf9egT4bKI8",
-			"ocXeA0nBnaRZhKEZYhMBGvd4NvH0",
-			"ocXeA0rBxfsr_4GzysQFzF3Cf81U"
-		],
-		"msg": "f 开关状态:%s //-2 从配置文件重置,-1 关闭,1 打开<br><br>c 并发数:%d //-2 不限制并发数,-1 无条件直接限制,>0 限制并发数<br><br>t 个人查询限制时间:%ds //-1 不限制<br><br>p 限制页数:%d"
-	},
-	"share": {
-		"forceShareEnabled": false,
-		"onlineDate": "2018-08-20 00:00:00",
-		"regDaysForNewUser": 5,
-		"shareIntervalDays": 7,
-		"startHour": 8,
-		"endHour": 17,
-		"shareTimesUpperLimitR": 4000,
-		"shareTimesUpperLimitIrr": 1000
-	},
-	"appPushServiceRpc": "192.168.20.114:5566",
-	"afterSavePushId": 60,
-	"mail": [
+  "cookiedomain": ".jianyu360.com",
+  "webport": "89",
+  "weixinrpc": "127.0.0.1:8083",
+  "cacheflag": false,
+  "agreement": "http",
+  "webdomain": "https://web-zxl.jydev.jianyu360.com",
+  "redirect": {
+    "wxpushlist": "/jyapp/wxpush/bidinfo/%s",
+    "newInfoFollow": "/jyapp/followent/newInfo/%s",
+    "wxpushfollowlist": "/jyapp/follow/notice/%s/%s",
+    "followset": "/jyapp/follow/set/%s/%s",
+    "myfeedbacks": "/jyapp/swordfish/myFeedbacks",
+    "historypush": "/jyapp/swordfish/historypush?f=push&t=%s&pushtime=%s",
+    "followEntDetail": "/jyapp/followent/detail/%s",
+    "msgremind": "/jyapp/vipsubscribe/msgremind?%s",
+    "vipreport": "/subscribepay/report/wxtplmsg?start=%s&end=%s&pushcount=%s",
+    "entnichehistorypush": "/jyapp/entniche/pushlist?selectTime=%s&pi=%s&pn=%s&type=%s",
+    "trackReport": "/page_entniche/business/t-report/detail/%s_%s/%s",
+    "viphomepage": "/jyapp/vipsubscribe/toSubVipSetPage?vSwitch=%s",
+    "pushFollowEnt": "/jyapp/big/page/ent_follow",
+    "pushFollowProject": "/jyapp/big/page/pro_follow_list",
+    "pushMember": "/jyapp/big/page/big_subscribe?pushtime=%s",
+    "pushProjectForecast": "/jyapp/big/page/forecast_list",
+    "pushEntChange": "/jyapp/big/page/ent_follow",
+    "followProjectSet": "/jyapp/big/page/pro_follow_detail?fid=%s&sid=%s",
+    "memberreport": "/bigmember/report/openpushmsg?start=%s&end=%s&pushcount=%s",
+    "memberreport_experience": "/bigmember/report/openpushmsg?t=app_experience&start=%s&end=%s&pushcount=%s",
+    "entnichepush": "/jyapp/entniche/push?time=%s&pi=%s&pn=%s&type=%s"
+  },
+  "followProject": 10,
+  "followentlimit": "10",
+  "followLimitDay": 30,
+  "followTipMsg": {
+    "title": "您关注的项目《%s》将于%s开标!",
+    "remark": "您收到这条信息是因为您之前设置了项目开标提醒,如果您不再需要此类提醒,可点击下方“详情”修改提醒设置。"
+  },
+  "followPushRpc": "127.0.0.1:8759",
+  "rewardText": [
+    "憋说话!赏我!",
+    "“赏”就一个字 我只说一次",
+    "厉害了word鱼!",
+    "看官赏点银子偶会更卖力噢!",
+    "各位客官,快来赏点吧!",
+    "夸我还是含蓄点的好,赏一个吧~",
+    "爱,就供养;喜欢,就打赏!",
+    "请简单粗暴地爱我!",
+    "最喜欢你一言不合就打赏的样子了~~~么么!"
+  ],
+  "advertText": [
+    "与其一个人孤单  不如一群人狂欢   赶快加入剑鱼标讯社区",
+    "加入剑鱼标讯社区  和投标大神做朋友",
+    "来剑鱼标讯社区  找最合拍的伙伴",
+    "剑鱼标讯社区,让沟通连接你我。",
+    "剑鱼标讯社区,分享你的知识、解决问题、行业资源交换",
+    "勇敢发声,和老司机一起畅聊招投标。",
+    "春风十里,不如来剑鱼标讯社区!",
+    "只要心相通,相隔千里也能畅快交流。",
+    "弹指一挥间,剑鱼标讯因你而不同!",
+    "携手同行,认真对待每一次招投标"
+  ],
+  "advertImg": "/jyapp/images/advert.png",
+  "advertName": "广告",
+  "advertUrl": "/jyapp/free/swordfish/about",
+  "industry": "分类综合测试",
+  "recommendEntLimit": "50",
+  "update": {
+    "isBrowserUpdate": 1,
+    "grayupdate": false,
+    "version": "3.0.5",
+    "mustupdate": false,
+    "tipspace": 86400,
+    "ios_version": "2.7.3",
+    "ios_mustupdate": false,
+    "ios_openUpdate": false,
+    "ios_grayupdate": false,
+    "apkurl": "https://web2-jytest.jydev.jianyu360.com/jyinstallpkg/mobile/%s/jianyu360.apk",
+    "channelDir": {
+      "baidu": "baiduSem",
+      "shenma": "shenmaSem",
+      "huawei": "huawei",
+      "xiaomi": "xiaomi",
+      "yingyongbao": "yingyongbao",
+      "douyin": "douyin",
+      "weixin": "jywx",
+      "topnet": "topnet",
+      "duanxin": "duanxin",
+      "active_pullnew": "active_pullnew",
+      "default": "topnet"
+    }
+  },
+  "limitSearchText": {
+    "flag": false,
+    "count": 3,
+    "timeout": 60,
+    "totalPage": 3,
+    "userIds": [
+      "ocXeA0jceF8KRunDkwf9egT4bKI8",
+      "ocXeA0nBnaRZhKEZYhMBGvd4NvH0",
+      "ocXeA0rBxfsr_4GzysQFzF3Cf81U"
+    ],
+    "msg": "f 开关状态:%s //-2 从配置文件重置,-1 关闭,1 打开<br><br>c 并发数:%d //-2 不限制并发数,-1 无条件直接限制,>0 限制并发数<br><br>t 个人查询限制时间:%ds //-1 不限制<br><br>p 限制页数:%d"
+  },
+  "share": {
+    "forceShareEnabled": false,
+    "onlineDate": "2018-08-20 00:00:00",
+    "regDaysForNewUser": 5,
+    "shareIntervalDays": 7,
+    "startHour": 8,
+    "endHour": 17,
+    "shareTimesUpperLimitR": 4000,
+    "shareTimesUpperLimitIrr": 1000
+  },
+  "appPushServiceRpc": "192.168.20.114:5566",
+  "afterSavePushId": 60,
+  "mail": [
     {
       "addr": "smtp.exmail.qq.com",
       "port": 465,
@@ -127,46 +127,50 @@
       "user": "public03@topnet.net.cn"
     }
   ],
-	"policy": {
-		"title": "使用许可协议和隐私政策",
-		"content": "欢迎使用剑鱼标讯!\n我们依据最新法规及监管政策要求,更新了《剑鱼标讯用户使用许可协议》和《剑鱼标讯隐私政策》,在您使用剑鱼标讯前,请仔细阅读并充分了解。\n如你同意《剑鱼标讯用户使用许可协议》和《剑鱼标讯隐私政策》,请点击“同意”并开始使用我们的产品和服务,我们会全力保护你的个人信息安全。",
-		"href": [
-			"jyapp/free/staticPage/privacy_rules_client.html",
-			"jyapp/free/staticPage/permission_rules_client.html"
-		],
-		"name": [
-			"《剑鱼标讯隐私政策》",
-			"《剑鱼标讯用户使用许可协议》"
-		]
-	},
-	"tencentcloud": {
-		"appid": "TIDAXUV9",
-		"secretKey": "c7KJhtLMF805EeImBcOsoygu8KkdOrAfIaSU9SqAh8a2aiCgc69EfsaLM5EQcadF",
-		"version": "1.0.0"
-	},
-	"termValidity": 3600,
-	"uploadPath": "./web/staticres/jyapp/res/",
-	"appConfig":{
-		"pushGrpcServer":"192.168.20.114:5565",
-		"pushGrpcHeartBeat":3
-	},
-    "redisSessionLockSize":20,
-    "nsq":"192.168.3.240:4260",
-    "nsq_topic": "jy_event",
-    "accountMergeOnline":"3333-03-30 00:00:00",
-    "bidSearchOldUserLimit": 1626105600,
-    "contextOldVipLimit": 1664553600,
-    "firstBindPop":3,
-    "maxBindPop":8,
-    "bindPopRedis":"merge",
-    "phoneFilterFlag":true,
-    "optimalTime":"2021-08-03 12:00:00",
-    "criticality":2,
-    "canReadNotice": 3,
-    "namePrefix":"JY_%s",
-    "smsServiceRpc":"127.0.0.1:932",
-    "searchTypeSwitch": true,
-    "baseUserFilterFlag":true,
-    "userCenterApi":"https://web-zxl.jydev.jianyu360.com",
-    "freeProjectFocus": 10
+  "policy": {
+    "title": "使用许可协议和隐私政策",
+    "content": "欢迎使用剑鱼标讯!\n我们依据最新法规及监管政策要求,更新了《剑鱼标讯用户使用许可协议》和《剑鱼标讯隐私政策》,在您使用剑鱼标讯前,请仔细阅读并充分了解。\n如你同意《剑鱼标讯用户使用许可协议》和《剑鱼标讯隐私政策》,请点击“同意”并开始使用我们的产品和服务,我们会全力保护你的个人信息安全。",
+    "href": [
+      "jyapp/free/staticPage/privacy_rules_client.html",
+      "jyapp/free/staticPage/permission_rules_client.html"
+    ],
+    "name": [
+      "《剑鱼标讯隐私政策》",
+      "《剑鱼标讯用户使用许可协议》"
+    ]
+  },
+  "tencentcloud": {
+    "appid": "TIDAXUV9",
+    "secretKey": "c7KJhtLMF805EeImBcOsoygu8KkdOrAfIaSU9SqAh8a2aiCgc69EfsaLM5EQcadF",
+    "version": "1.0.0"
+  },
+  "termValidity": 3600,
+  "uploadPath": "./web/staticres/jyapp/res/",
+  "appConfig": {
+    "pushGrpcServer": "192.168.20.114:5565",
+    "pushGrpcHeartBeat": 3
+  },
+  "redisSessionLockSize": 20,
+  "nsq": "192.168.3.240:4260",
+  "nsq_topic": "jy_event",
+  "accountMergeOnline": "3333-03-30 00:00:00",
+  "bidSearchOldUserLimit": 1626105600,
+  "contextOldVipLimit": 1664553600,
+  "firstBindPop": 3,
+  "maxBindPop": 8,
+  "bindPopRedis": "merge",
+  "phoneFilterFlag": true,
+  "optimalTime": "2021-08-03 12:00:00",
+  "criticality": 2,
+  "canReadNotice": 3,
+  "namePrefix": "JY_%s",
+  "smsServiceRpc": "127.0.0.1:932",
+  "searchTypeSwitch": true,
+  "baseUserFilterFlag": true,
+  "userCenterApi": "https://web-zxl.jydev.jianyu360.com",
+  "freeProjectFocus": 10,
+  "etcd": {
+    "hosts": "192.168.3.206:27080",
+    "key": "powercheck.rpc"
+  }
 }

+ 75 - 6
src/jfw/modules/app/src/go.mod

@@ -4,7 +4,7 @@ go 1.18
 
 require (
 	app.yhyue.com/moapp/jybase v0.0.0-20221230025810-b88f2a62c467
-	app.yhyue.com/moapp/jypkg v0.0.0-20221230080706-5ea76d175cfb
+	app.yhyue.com/moapp/jypkg v0.0.0-20230110033535-d6c3e4b755cf
 	github.com/SKatiyar/qr v0.0.0-20151201054752-25b6bdf44e67
 	github.com/dchest/captcha v1.0.0
 	github.com/pkg/errors v0.9.1
@@ -14,32 +14,101 @@ require (
 require (
 	app.yhyue.com/moapp/esv1 v0.0.0-20220414031211-3da4123e648d // indirect
 	app.yhyue.com/moapp/message v0.0.0-20221202072401-d825fc65512c // indirect
+	bp.jydev.jianyu360.cn/BaseService/powerCheckCenter v0.0.0-20230106052936-bd3ab7edf7a4 // 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/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
+	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-sql-driver/mysql v1.6.0 // indirect
-	github.com/golang-jwt/jwt/v4 v4.4.2 // indirect
+	github.com/go-logr/logr v1.2.3 // indirect
+	github.com/go-logr/stdr v1.2.2 // indirect
+	github.com/go-redis/redis/v8 v8.11.5 // indirect
+	github.com/go-sql-driver/mysql v1.7.0 // indirect
+	github.com/gogo/protobuf v1.3.2 // indirect
+	github.com/golang-jwt/jwt/v4 v4.4.3 // indirect
+	github.com/golang/mock v1.6.0 // indirect
+	github.com/golang/protobuf v1.5.2 // indirect
 	github.com/golang/snappy v0.0.4 // indirect
 	github.com/gomodule/redigo v1.8.9 // indirect
+	github.com/google/go-cmp v0.5.9 // indirect
+	github.com/google/gofuzz v1.2.0 // indirect
+	github.com/google/pprof v0.0.0-20211214055906-6f57359322fd // indirect
+	github.com/googleapis/gnostic v0.5.5 // indirect
+	github.com/grpc-ecosystem/grpc-gateway/v2 v2.7.0 // indirect
 	github.com/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/mattn/go-colorable v0.1.9 // indirect
+	github.com/mattn/go-isatty v0.0.14 // indirect
+	github.com/matttproud/golang_protobuf_extensions v1.0.2-0.20181231171920-c182affec369 // indirect
+	github.com/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/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
+	github.com/prometheus/client_golang v1.13.0 // indirect
+	github.com/prometheus/client_model v0.2.0 // indirect
+	github.com/prometheus/common v0.37.0 // indirect
+	github.com/prometheus/procfs v0.8.0 // indirect
 	github.com/robfig/cron v1.2.0 // indirect
+	github.com/spaolacci/murmur3 v1.1.0 // indirect
 	github.com/tealeg/xlsx v1.0.5 // indirect
 	github.com/thinxer/go-word2vec v0.0.0-20150917053916-5c19ec7379ed // indirect
 	github.com/xdg-go/pbkdf2 v1.0.0 // indirect
 	github.com/xdg-go/scram v1.1.1 // indirect
 	github.com/xdg-go/stringprep v1.0.3 // indirect
 	github.com/youmark/pkcs8 v0.0.0-20181117223130-1be2e3e5546d // indirect
+	github.com/zeromicro/go-zero v1.4.3 // indirect
 	github.com/ziutek/blas v0.0.0-20190227122918-da4ca23e90bb // indirect
+	go.etcd.io/etcd/api/v3 v3.5.5 // indirect
+	go.etcd.io/etcd/client/pkg/v3 v3.5.5 // indirect
+	go.etcd.io/etcd/client/v3 v3.5.5 // indirect
+	go.opentelemetry.io/otel v1.10.0 // indirect
+	go.opentelemetry.io/otel/exporters/jaeger v1.10.0 // indirect
+	go.opentelemetry.io/otel/exporters/otlp/internal/retry v1.10.0 // indirect
+	go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.10.0 // indirect
+	go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.10.0 // indirect
+	go.opentelemetry.io/otel/exporters/zipkin v1.10.0 // indirect
+	go.opentelemetry.io/otel/sdk v1.10.0 // indirect
+	go.opentelemetry.io/otel/trace v1.10.0 // indirect
+	go.opentelemetry.io/proto/otlp v0.19.0 // indirect
+	go.uber.org/atomic v1.9.0 // indirect
+	go.uber.org/automaxprocs v1.5.1 // indirect
+	go.uber.org/multierr v1.8.0 // indirect
+	go.uber.org/zap v1.21.0 // indirect
 	golang.org/x/crypto v0.0.0-20220622213112-05595931fe9d // indirect
-	golang.org/x/sync v0.0.0-20210220032951-036812b2e83c // indirect
-	golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a // indirect
-	golang.org/x/text v0.3.8-0.20211105212822-18b340fc7af2 // indirect
+	golang.org/x/net v0.0.0-20221014081412-f15817d10f9b // indirect
+	golang.org/x/oauth2 v0.0.0-20221014153046-6fdb5e3db783 // indirect
+	golang.org/x/sync v0.1.0 // indirect
+	golang.org/x/sys v0.0.0-20220728004956-3c1f35247d10 // indirect
+	golang.org/x/term v0.0.0-20210927222741-03fcf44c2211 // indirect
+	golang.org/x/text v0.4.0 // indirect
+	golang.org/x/time v0.3.0 // indirect
+	google.golang.org/appengine v1.6.7 // indirect
+	google.golang.org/genproto v0.0.0-20221111202108-142d8a6fa32e // indirect
+	google.golang.org/grpc v1.51.0 // indirect
+	google.golang.org/protobuf v1.28.1 // indirect
 	gopkg.in/alexcesaro/quotedprintable.v3 v3.0.0-20150716171945-2caba252f4dc // indirect
+	gopkg.in/inf.v0 v0.9.1 // indirect
+	gopkg.in/yaml.v2 v2.4.0 // indirect
+	gopkg.in/yaml.v3 v3.0.1 // indirect
 	gorm.io/driver/mysql v1.0.5 // indirect
 	gorm.io/gorm v1.21.3 // indirect
+	k8s.io/api v0.22.9 // indirect
+	k8s.io/apimachinery v0.22.9 // indirect
+	k8s.io/client-go v0.22.9 // indirect
+	k8s.io/klog/v2 v2.80.1 // indirect
+	k8s.io/utils v0.0.0-20221108210102-8e77b1f39fe2 // indirect
+	sigs.k8s.io/structured-merge-diff/v4 v4.2.1 // indirect
+	sigs.k8s.io/yaml v1.2.0 // indirect
 )

ファイルの差分が大きいため隠しています
+ 557 - 9
src/jfw/modules/app/src/go.sum


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

@@ -1,10 +1,12 @@
 package entity
 
 import (
+	util "app.yhyue.com/moapp/jybase/common"
+	"app.yhyue.com/moapp/jybase/go-xweb/httpsession"
+	"app.yhyue.com/moapp/jypkg/common/src/qfw/util/jy"
+	"errors"
 	"jy/src/jfw/modules/bigmember/src/config"
 	"jy/src/jfw/modules/bigmember/src/db"
-	"errors"
-	util "app.yhyue.com/moapp/jybase/common"
 )
 
 type ProjectClaim struct {
@@ -14,22 +16,20 @@ type ProjectClaim struct {
 }
 
 // ClaimPermissions 项目认领相关方法 Status 1: "专家版", 3: "商机版", 6: "商机版2.0",7: "专家版2.0",
-func ClaimPermissions(userid string) (*ProjectClaim, error) {
+func ClaimPermissions(session *httpsession.Session) (*ProjectClaim, error) {
+	userid := util.ObjToString(session.Get("userId"))
+
 	if userid == "" {
 		return nil, errors.New("未登录")
 	}
-	data, ok := db.Mgo.FindById("user", userid, `{"i_member_status":1,"base_user_id":1}`)
-	if ok && data != nil && len(*data) > 0 {
-		status := util.IntAll((*data)["i_member_status"])
-		if status <= 0 {
-			return nil, errors.New("无权益")
-		}
-		if util.IntAll((*data)["base_user_id"]) <= 0 {
-			return nil, errors.New("用户baseUserId获取失败")
-		}
-		return &ProjectClaim{true, userid, util.IntAll((*data)["base_user_id"])}, nil
+	bigMsg := jy.GetBigVipUserBaseMsg("10000", session, config.Config.Etcd.Hosts, config.Config.Etcd.Key)
+	if bigMsg.Status <= 0 {
+		return nil, errors.New("无权益")
+	} else {
+		baseUserId := util.Int64All(session.Get("base_user_id"))
+		return &ProjectClaim{true, userid, util.IntAll(baseUserId)}, nil
 	}
-	return nil, errors.New("用户查询失败")
+
 }
 
 func (l *ProjectClaim) ClaimLists() map[string]interface{} {

+ 4 - 3
src/jfw/modules/bigmember/src/entity/followEnterprise.go

@@ -1,6 +1,7 @@
 package entity
 
 import (
+	"app.yhyue.com/moapp/jybase/go-xweb/httpsession"
 	"errors"
 	"fmt"
 	"jy/src/jfw/modules/bigmember/src/config"
@@ -27,12 +28,12 @@ type EntFollow struct {
 }
 
 // CreateEntFollowManager 企业关注相关方法
-func CreateEntFollowManager(userid string, baseUserId, accountId, entId int64, pageFlag ...string) (*EntFollow, error) {
+func CreateEntFollowManager(session *httpsession.Session, pageFlag ...string) (*EntFollow, error) {
+	userid := qutil.ObjToString(session.Get("userId"))
 	if userid == "" {
 		return nil, errors.New("未登录")
 	}
-	bigMsg := jy.GetBigVipUserBaseMsg("10000", userid, baseUserId, accountId, entId, config.Config.Etcd.Hosts, config.Config.Etcd.Key)
-
+	bigMsg := jy.GetBigVipUserBaseMsg("10000", session, config.Config.Etcd.Hosts, config.Config.Etcd.Key)
 	defaultPageFlag := "entFollow"
 	if len(pageFlag) > 0 {
 		defaultPageFlag = pageFlag[0]

+ 4 - 2
src/jfw/modules/bigmember/src/entity/followProject.go

@@ -1,6 +1,7 @@
 package entity
 
 import (
+	"app.yhyue.com/moapp/jybase/go-xweb/httpsession"
 	"encoding/json"
 	"errors"
 	"fmt"
@@ -22,11 +23,12 @@ import (
 )
 
 // CreateProjectFollowManager 项目关注相关方法
-func CreateProjectFollowManager(userid string, baseUserId, accountId, entId int64, mustBuy ...bool) (*ProjectFollow, error) {
+func CreateProjectFollowManager(session *httpsession.Session, mustBuy ...bool) (*ProjectFollow, error) {
+	userid := qutil.ObjToString(session.Get("userId"))
 	if userid == "" {
 		return nil, errors.New("未登录")
 	}
-	bigMsg := jy.GetBigVipUserBaseMsg("10000", userid, baseUserId, accountId, entId, config.Config.Etcd.Hosts, config.Config.Etcd.Key)
+	bigMsg := jy.GetBigVipUserBaseMsg("10000", session, config.Config.Etcd.Hosts, config.Config.Etcd.Key)
 
 	isBuy := bigMsg.CheckBigVipBackPower("followProject")
 	if len(mustBuy) > 0 && !isBuy {

+ 9 - 7
src/jfw/modules/bigmember/src/entity/portrait.go

@@ -1,6 +1,7 @@
 package entity
 
 import (
+	"app.yhyue.com/moapp/jybase/go-xweb/httpsession"
 	"errors"
 	"fmt"
 	"jy/src/jfw/modules/bigmember/src/config"
@@ -24,12 +25,12 @@ const (
 )
 
 // CreatePortraitManager 大会员
-func CreatePortraitManager(userid string, baseUserId, accountId, entId int64, pageFlag string) (*Portrait, bool, error, bool) {
+func CreatePortraitManager(session *httpsession.Session, pageFlag string) (*Portrait, bool, error, bool) {
+	userid := qutil.InterfaceToStr(session.Get("base_user_id"))
 	if userid == "" {
 		return nil, false, errors.New("未登录"), true
 	}
-	bigMsg := jy.GetBigVipUserBaseMsg("10000", userid, baseUserId, accountId, entId, config.Config.Etcd.Hosts, config.Config.Etcd.Key)
-
+	bigMsg := jy.GetBigVipUserBaseMsg("10000", session, config.Config.Etcd.Hosts, config.Config.Etcd.Key)
 	if pageFlag == "" {
 		return nil, false, errors.New("未知请求"), true
 	}
@@ -60,14 +61,15 @@ func CreatePortraitManager(userid string, baseUserId, accountId, entId int64, pa
  * 3.免费用户(如免费用户、老版商机管理、老版超级订阅)通过一次留资可以解锁画像权限,查看画像的所有内容。
  */
 // CreatePortraitManagerForContacts 画像通讯里权限验证
-func CreatePortraitManagerForContacts(userid string, baseUserId, accountId, entId int64, entType int64, entName string) (*Portrait, error) {
+func CreatePortraitManagerForContacts(session *httpsession.Session, entType int64, entName string) (*Portrait, error) {
+	userid := qutil.InterfaceToStr(session.Get("base_user_id"))
 	if userid == "" {
 		return nil, errors.New("未登录")
 	}
 	if entName == "" {
 		return nil, errors.New("参数异常")
 	}
-	bigMsg := jy.GetBigVipUserBaseMsg("10000", userid, baseUserId, accountId, entId, config.Config.Etcd.Hosts, config.Config.Etcd.Key)
+	bigMsg := jy.GetBigVipUserBaseMsg("10000", session, config.Config.Etcd.Hosts, config.Config.Etcd.Key)
 
 	//0:采购单位;1:中标企业
 	switch entType {
@@ -112,7 +114,7 @@ func CreatePortraitManagerForContacts(userid string, baseUserId, accountId, entI
 
 //CreateSubVipPortraitManager 超级订阅权限校验
 //int -1无权限 1免费权限 2超级订阅次数&采购单位流量包 3使用体验
-func CreateSubVipPortraitManager(userid string, pageFlag, searchValue string, isWinner bool, baseUserId, accountId, entId int64) (*Portrait, int, error, bool) {
+func CreateSubVipPortraitManager(userid string, pageFlag, searchValue string, isWinner bool, session *httpsession.Session) (*Portrait, int, error, bool) {
 	if userid == "" {
 		return nil, -1, errors.New("未登录"), true
 	}
@@ -120,7 +122,7 @@ func CreateSubVipPortraitManager(userid string, pageFlag, searchValue string, is
 		return nil, -1, errors.New("未知请求"), true
 	}
 	if pageFlag != "entDetail" { //需要权限校验的接口
-		bigMsg := jy.GetBigVipUserBaseMsg("10000", userid, baseUserId, accountId, entId, config.Config.Etcd.Hosts, config.Config.Etcd.Key)
+		bigMsg := jy.GetBigVipUserBaseMsg("10000", session, config.Config.Etcd.Hosts, config.Config.Etcd.Key)
 
 		if bigMsg.VipStatus <= 0 || bigMsg.Vip_BuySet.Upgrade != 1 { //免费用户留资体验
 			if searchValue != "" && jy.Portraitexperience(userid, searchValue, isWinner) {

+ 5 - 3
src/jfw/modules/bigmember/src/entity/trial.go

@@ -1,15 +1,17 @@
 package entity
 
 import (
+	qutil "app.yhyue.com/moapp/jybase/common"
+	"app.yhyue.com/moapp/jybase/go-xweb/httpsession"
 	"app.yhyue.com/moapp/jypkg/common/src/qfw/util/jy"
 	"jy/src/jfw/modules/bigmember/src/config"
 	"jy/src/jfw/modules/bigmember/src/db"
 )
 
-func GetUserTrialInfoById(userId string, baseUserId, accountId, entId int64) map[string]interface{} {
+func GetUserTrialInfoById(session *httpsession.Session) map[string]interface{} {
 	var res = map[string]interface{}{}
-	BigMsg := jy.GetBigVipUserBaseMsg("10000", userId, baseUserId, accountId, entId, config.Config.Etcd.Hosts, config.Config.Etcd.Key)
-
+	BigMsg := jy.GetBigVipUserBaseMsg("10000", session, config.Config.Etcd.Hosts, config.Config.Etcd.Key)
+	userId := qutil.ObjToString(session.Get("userId"))
 	if BigMsg != nil {
 		//i_member_status:4 正在试用 ;i_member_trial:1是试用过;同时满足:当前试用阶段
 		//member_trial:0:未试用过;1:正在试用;-1:已试用过;

+ 1 - 5
src/jfw/modules/bigmember/src/filter/sessionfilter.go

@@ -2,7 +2,6 @@ package filter
 
 import (
 	. "app.yhyue.com/moapp/jybase/api"
-	qu "app.yhyue.com/moapp/jybase/common"
 	"app.yhyue.com/moapp/jypkg/common/src/qfw/util/jy"
 	"jy/src/jfw/modules/bigmember/src/config"
 	"jy/src/jfw/modules/bigmember/src/db"
@@ -35,9 +34,6 @@ func (l *sessionfilter) Do(w http.ResponseWriter, req *http.Request) bool {
 		return true
 	}
 	userId, ok := session.Get("userId").(string)
-	baseUserId := qu.Int64All(session.Get("base_user_id"))
-	entId := qu.Int64All(session.Get("entId"))
-	accountId := qu.Int64All(session.Get("accountId"))
 	if !ok || userId == "" {
 		R.ServeJson(w, req, &Result{Error_code_1004, Error_msg_1004, nil})
 		return false
@@ -46,7 +42,7 @@ func (l *sessionfilter) Do(w http.ResponseWriter, req *http.Request) bool {
 	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", userId, baseUserId, accountId, entId, config.Config.Etcd.Key, config.Config.Etcd.Key)
+	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

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

@@ -5,21 +5,17 @@ go 1.18
 require (
 	app.yhyue.com/moapp/esv1 v0.0.0-20220414031211-3da4123e648d
 	app.yhyue.com/moapp/jybase v0.0.0-20221229074840-790b25997170
-	app.yhyue.com/moapp/jypkg v0.0.0-20230106055658-e5f85a4ffd9c
-	bp.jydev.jianyu360.cn/BaseService/powerCheckCenter v0.0.0-20230106052936-bd3ab7edf7a4
+	app.yhyue.com/moapp/jypkg v0.0.0-20230110033535-d6c3e4b755cf
 	github.com/donnie4w/go-logger v0.0.0-20170827050443-4740c51383f4
-	github.com/gogf/gf/v2 v2.0.6
-	github.com/zeromicro/go-zero v1.4.3
 	go.mongodb.org/mongo-driver v1.11.1
 )
 
 require (
 	app.yhyue.com/moapp/message v0.0.0-20221202072401-d825fc65512c // indirect
-	github.com/BurntSushi/toml v0.4.1 // indirect
+	bp.jydev.jianyu360.cn/BaseService/powerCheckCenter v0.0.0-20230106052936-bd3ab7edf7a4 // 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
@@ -27,7 +23,6 @@ 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
@@ -42,26 +37,20 @@ require (
 	github.com/google/go-cmp v0.5.9 // indirect
 	github.com/google/gofuzz v1.2.0 // indirect
 	github.com/google/pprof v0.0.0-20211214055906-6f57359322fd // indirect
-	github.com/google/uuid v1.3.0 // 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
@@ -70,13 +59,13 @@ 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
 	github.com/xdg-go/scram v1.1.1 // indirect
 	github.com/xdg-go/stringprep v1.0.3 // indirect
 	github.com/youmark/pkcs8 v0.0.0-20181117223130-1be2e3e5546d // indirect
+	github.com/zeromicro/go-zero v1.4.3 // indirect
 	go.etcd.io/etcd/api/v3 v3.5.5 // indirect
 	go.etcd.io/etcd/client/pkg/v3 v3.5.5 // indirect
 	go.etcd.io/etcd/client/v3 v3.5.5 // indirect

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

@@ -4,8 +4,8 @@ app.yhyue.com/moapp/jyPoints v1.1.1/go.mod h1:SvP8p5L3jGrejHiH2LXfgCg/NPlFiKBC5Y
 app.yhyue.com/moapp/jybase v0.0.0-20220427020729-974c1a148186/go.mod h1:qNRA0sHuYqcLoYoP8irpaWnW9YsXixe6obBIkwaXpD0=
 app.yhyue.com/moapp/jybase v0.0.0-20221229074840-790b25997170 h1:gjx6+x7P1Vp/++OyfuEdR3Bcjj4/HrgIaRnE1cMTP3k=
 app.yhyue.com/moapp/jybase v0.0.0-20221229074840-790b25997170/go.mod h1:efAeRPDpJ13JuNODuqtfLlKQSQgCbnUcwGPzhFU5krY=
-app.yhyue.com/moapp/jypkg v0.0.0-20230106055658-e5f85a4ffd9c h1:3tmWsZPTkhmkPJ1fbDLqrklgnooC1DRNwsjxEoMYbwg=
-app.yhyue.com/moapp/jypkg v0.0.0-20230106055658-e5f85a4ffd9c/go.mod h1:7D6zNxrg+Tma3VC43TLu7XPczubl4uJavua89kaFS1Q=
+app.yhyue.com/moapp/jypkg v0.0.0-20230110033535-d6c3e4b755cf h1:NMVZDXa4yZtL2BTM8gJLpRU4fSN9a1cj7mTVYa1RUZY=
+app.yhyue.com/moapp/jypkg v0.0.0-20230110033535-d6c3e4b755cf/go.mod h1:7D6zNxrg+Tma3VC43TLu7XPczubl4uJavua89kaFS1Q=
 app.yhyue.com/moapp/message v0.0.0-20221202072401-d825fc65512c h1:CrcvbsXZ4aQkNikBi7FUUQZNnY8hKsNo2LLe/SqeXs8=
 app.yhyue.com/moapp/message v0.0.0-20221202072401-d825fc65512c/go.mod h1:b0zZHev3gmJao1Fo+2Z2KPVjsuLOJVvVxf+kCnu9WkA=
 bp.jydev.jianyu360.cn/BaseService/powerCheckCenter v0.0.0-20230106052936-bd3ab7edf7a4 h1:Xv1D9avDKeaM5kQTisF/pIt8y7B7yQ/hAxuWEg75LMs=
@@ -381,7 +381,6 @@ github.com/Azure/go-autorest/autorest/mocks v0.4.1/go.mod h1:LTp+uSrOhSkaKrUy935
 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=
@@ -436,7 +435,6 @@ 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=
@@ -553,7 +551,6 @@ 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=
@@ -585,7 +582,6 @@ 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=
@@ -714,10 +710,8 @@ 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=
@@ -805,7 +799,6 @@ github.com/lib/pq v1.3.0/go.mod h1:5WUZQaWbwv1U+lTReE5YruASi9Al49XbQIvNi/34Woo=
 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=
@@ -828,7 +821,6 @@ 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=
@@ -860,7 +852,6 @@ 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=
@@ -945,7 +936,6 @@ 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=

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

@@ -78,12 +78,9 @@ func (this *Analysis) ProjectInfoByBW() {
 func (this *Analysis) TrialInfo() {
 	defer qutil.Catch()
 	userId, _ := this.GetSession("userId").(string)
-	baseUserId := qutil.Int64All(this.GetSession("base_user_id"))
-	entId := qutil.Int64All(this.GetSession("entId"))
-	accountId := qutil.Int64All(this.GetSession("accountId"))
 	rData, errMsg := func() (interface{}, error) {
 		//userInfo, ok := db.Mgo.FindById("user", userId, nil)
-		baseMsg := jy.GetBigVipUserBaseMsg("10000", userId, baseUserId, accountId, entId, config.Config.Etcd.Key, config.Config.Etcd.Key)
+		baseMsg := jy.GetBigVipUserBaseMsg("10000", this.Session(), config.Config.Etcd.Key, config.Config.Etcd.Key)
 
 		if baseMsg == nil {
 			return -2, nil

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

@@ -129,9 +129,6 @@ func getForecastProjectSql(scd *util.ViewCondition) string {
 func (this *Analysis) ForPContent() {
 	defer qutil.Catch()
 	userId, _ := this.GetSession("userId").(string)
-	baseUserId := qutil.Int64All(this.GetSession("base_user_id"))
-	entId := qutil.Int64All(this.GetSession("entId"))
-	accountId := qutil.Int64All(this.GetSession("accountId"))
 	rData, errMsg := func() (interface{}, error) {
 		id := this.GetString("id")     //项目预测id
 		keys := this.GetString("keys") //关键词
@@ -190,7 +187,7 @@ func (this *Analysis) ForPContent() {
 				}
 			}
 			power := []int{}
-			powerMap := jy.GetBigVipUserBaseMsg("10000", userId, baseUserId, accountId, entId, config.Config.Etcd.Key, config.Config.Etcd.Key).PowerMap
+			powerMap := jy.GetBigVipUserBaseMsg("10000", this.Session(), config.Config.Etcd.Key, config.Config.Etcd.Key).PowerMap
 			for k, _ := range powerMap {
 				power = append(power, k)
 			}

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

@@ -25,9 +25,6 @@ import (
 // 大会员首页
 func (this *Analysis) PotIndex() {
 	userId, _ := this.GetSession("userId").(string)
-	baseUserId := qutil.Int64All(this.GetSession("base_user_id"))
-	entId := qutil.Int64All(this.GetSession("entId"))
-	accountId := qutil.Int64All(this.GetSession("accountId"))
 	defer qutil.Catch()
 	r := func() Result {
 		if this.Method() != "POST" {
@@ -40,9 +37,7 @@ func (this *Analysis) PotIndex() {
 			json.Unmarshal(this.Body(), &ptst)
 		}
 		ptst.UserId = userId
-		ptst.BaseUserId = baseUserId
-		ptst.AccountId = accountId
-		ptst.EntId = entId
+		ptst.Session = this.Session()
 		if !ptst.UserStatusChecked() {
 			return Result{Data: nil, Error_msg: Error_msg_1004}
 		}
@@ -132,9 +127,6 @@ func (this *Analysis) CsORRsList() {
 	}
 	if this.Method() == METHOD {
 		userId, _ := this.GetSession("userId").(string)
-		baseUserId := qutil.Int64All(this.GetSession("base_user_id"))
-		entId := qutil.Int64All(this.GetSession("entId"))
-		accountId := qutil.Int64All(this.GetSession("accountId"))
 		var entName = "" //企业名称
 		//接受前端参数
 		getRes := new(SelectC)
@@ -175,7 +167,7 @@ func (this *Analysis) CsORRsList() {
 				log.Println("大会员初始化 企业名称有误-", userId, main_userId)
 			}
 			//userInfo, ok := db.Mgo.FindById("user", main_userId, nil)
-			userInfo := jy.GetBigVipUserBaseMsg("10000", userId, baseUserId, accountId, entId, config.Config.Etcd.Key, config.Config.Etcd.Key)
+			userInfo := jy.GetBigVipUserBaseMsg("10000", this.Session(), config.Config.Etcd.Key, config.Config.Etcd.Key)
 
 			if userInfo != nil {
 				var isTrial = userInfo.Status == 4

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

@@ -1,6 +1,7 @@
 package analysis
 
 import (
+	"app.yhyue.com/moapp/jybase/go-xweb/httpsession"
 	"app.yhyue.com/moapp/jypkg/common/src/qfw/util/jy"
 	"bytes"
 	"crypto/hmac"
@@ -36,9 +37,7 @@ type SelectC struct {
 	IsIndex        bool                   //是否首页查询
 	EntName        string                 //我的企业
 	UserId         string
-	BaseUserId     int64
-	EntId          int64
-	AccountId      int64
+	Session        *httpsession.Session
 }
 
 // UserStatusChecked 查看权限
@@ -47,7 +46,7 @@ func (this *SelectC) UserStatusChecked() bool {
 	if this.PCOR == "R" {
 		serviceId = 8
 	}
-	userPower := jy.GetBigVipUserBaseMsg("10000", this.UserId, this.BaseUserId, this.AccountId, this.EntId, config.Config.Etcd.Key, config.Config.Etcd.Key)
+	userPower := jy.GetBigVipUserBaseMsg("10000", this.Session, config.Config.Etcd.Key, config.Config.Etcd.Key)
 
 	return userPower.Status > 0 && userPower.PowerMap[serviceId]
 }

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

@@ -23,9 +23,6 @@ type Bidfile struct {
 func (b *Bidfile) History() {
 	r := func() Result {
 		userid := qu.ObjToString(b.GetSession("userId"))
-		baseUserId := qu.Int64All(b.GetSession("base_user_id"))
-		entId := qu.Int64All(b.GetSession("entId"))
-		accountId := qu.Int64All(b.GetSession("accountId"))
 		if userid == "" {
 			return Result{Data: nil, Error_msg: "未登录"}
 		}
@@ -37,7 +34,7 @@ func (b *Bidfile) History() {
 		}
 		//获取用户权限详情
 		power := []int{}
-		bigPower := jy.GetBigVipUserBaseMsg("10000", userid, baseUserId, accountId, entId, config.Config.Etcd.Key, config.Config.Etcd.Key)
+		bigPower := jy.GetBigVipUserBaseMsg("10000", b.Session(), config.Config.Etcd.Key, config.Config.Etcd.Key)
 		for k, _ := range bigPower.PowerMap {
 			power = append(power, k)
 		}

+ 3 - 3
src/jfw/modules/bigmember/src/service/claim/claimProject.go

@@ -2,10 +2,10 @@ package claim
 
 import (
 	. "app.yhyue.com/moapp/jybase/api"
-	"jy/src/jfw/modules/bigmember/src/entity"
+	qutil "app.yhyue.com/moapp/jybase/common"
 	"app.yhyue.com/moapp/jybase/go-xweb/xweb"
+	"jy/src/jfw/modules/bigmember/src/entity"
 	"log"
-	qutil "app.yhyue.com/moapp/jybase/common"
 )
 
 type ClaimProject struct {
@@ -17,7 +17,7 @@ func (l *ClaimProject) ClaimList() {
 	defer qutil.Catch()
 	userId := qutil.ObjToString(l.GetSession("userId"))
 	rData, errMsg := func() (interface{}, error) {
-		p, err := entity.ClaimPermissions(userId)
+		p, err := entity.ClaimPermissions(l.Session())
 		if !p.Permissions || err != nil {
 			return nil, err
 		}

+ 8 - 32
src/jfw/modules/bigmember/src/service/follow/enterprise.go

@@ -28,16 +28,13 @@ type FollowEnt struct {
 // Association 中标企业联想
 func (this *FollowEnt) Association() {
 	userId := qutil.ObjToString(this.GetSession("userId"))
-	baseUserId := qutil.Int64All(this.GetSession("base_user_id"))
-	entId := qutil.Int64All(this.GetSession("entId"))
-	accountId := qutil.Int64All(this.GetSession("accountId"))
 	rData, errMsg := func() (interface{}, error) {
 		entName := this.GetString("entName")
 		returnData := []map[string]interface{}{}
 		if entName == "" {
 			return returnData, nil
 		}
-		followEntManager, err := entity.CreateEntFollowManager(userId, baseUserId, accountId, entId)
+		followEntManager, err := entity.CreateEntFollowManager(this.Session())
 		if err != nil {
 			return nil, err
 		}
@@ -56,11 +53,8 @@ func (this *FollowEnt) Association() {
 // FollowCheck 企业是否关注
 func (this *FollowEnt) FollowCheck() {
 	userId := qutil.ObjToString(this.GetSession("userId"))
-	baseUserId := qutil.Int64All(this.GetSession("base_user_id"))
-	entId := qutil.Int64All(this.GetSession("entId"))
-	accountId := qutil.Int64All(this.GetSession("accountId"))
 	rData, errMsg := func() (interface{}, error) {
-		followEntManager, err := entity.CreateEntFollowManager(userId, baseUserId, accountId, entId)
+		followEntManager, err := entity.CreateEntFollowManager(this.Session())
 		if err != nil {
 			return nil, err
 		}
@@ -82,11 +76,8 @@ func (this *FollowEnt) FollowCheck() {
 // List 关注中标企业列表
 func (this *FollowEnt) List() {
 	userId := qutil.ObjToString(this.GetSession("userId"))
-	baseUserId := qutil.Int64All(this.GetSession("base_user_id"))
-	entId := qutil.Int64All(this.GetSession("entId"))
-	accountId := qutil.Int64All(this.GetSession("accountId"))
 	rData, errMsg := func() (interface{}, error) {
-		followEntManager, err := entity.CreateEntFollowManager(userId, baseUserId, accountId, entId)
+		followEntManager, err := entity.CreateEntFollowManager(this.Session())
 		if err != nil {
 			return nil, err
 		}
@@ -118,11 +109,8 @@ func (this *FollowEnt) List() {
 
 func (this *FollowEnt) PcSimpleFollowList() {
 	userId := qutil.ObjToString(this.GetSession("userId"))
-	baseUserId := qutil.Int64All(this.GetSession("base_user_id"))
-	entid := qutil.Int64All(this.GetSession("entId"))
-	accountId := qutil.Int64All(this.GetSession("accountId"))
 	rData, errMsg := func() (interface{}, error) {
-		followEntManager, err := entity.CreateEntFollowManager(userId, baseUserId, accountId, entid)
+		followEntManager, err := entity.CreateEntFollowManager(this.Session())
 		if err != nil {
 			return nil, err
 		}
@@ -145,15 +133,12 @@ func (this *FollowEnt) PcSimpleFollowList() {
 // AddFollow 添加关注企业
 func (this *FollowEnt) AddFollow() {
 	userId := qutil.ObjToString(this.GetSession("userId"))
-	baseUserId := qutil.Int64All(this.GetSession("base_user_id"))
-	entid := qutil.Int64All(this.GetSession("entId"))
-	accountId := qutil.Int64All(this.GetSession("accountId"))
 	rData, errMsg := func() (interface{}, error) {
 		entId := this.GetString("entId")
 		if entId == "" {
 			return nil, errors.New("企业为空")
 		}
-		followEntManager, err := entity.CreateEntFollowManager(userId, baseUserId, accountId, entid)
+		followEntManager, err := entity.CreateEntFollowManager(this.Session())
 		if err != nil {
 			return nil, err
 		}
@@ -172,12 +157,9 @@ func (this *FollowEnt) AddFollow() {
 // DelFollow 取关企业
 func (this *FollowEnt) DelFollow() {
 	userId := qutil.ObjToString(this.GetSession("userId"))
-	baseUserId := qutil.Int64All(this.GetSession("base_user_id"))
-	entid := qutil.Int64All(this.GetSession("entId"))
-	accountId := qutil.Int64All(this.GetSession("accountId"))
 	rData, errMsg := func() (interface{}, error) {
 		entId := this.GetString("entId")
-		followEntManager, err := entity.CreateEntFollowManager(userId, baseUserId, accountId, entid)
+		followEntManager, err := entity.CreateEntFollowManager(this.Session())
 		if err != nil {
 			return nil, err
 		}
@@ -196,11 +178,8 @@ func (this *FollowEnt) DelFollow() {
 // EntChangeList 企业基本信息变更
 func (this *FollowEnt) EntChangeList() {
 	userId := qutil.ObjToString(this.GetSession("userId"))
-	baseUserId := qutil.Int64All(this.GetSession("base_user_id"))
-	entId := qutil.Int64All(this.GetSession("entId"))
-	accountId := qutil.Int64All(this.GetSession("accountId"))
 	rData, errMsg := func() (interface{}, error) {
-		cepm, err := entity.CreateEntFollowManager(userId, baseUserId, accountId, entId, "entChange")
+		cepm, err := entity.CreateEntFollowManager(this.Session(), "entChange")
 
 		if err != nil {
 			return nil, err
@@ -226,11 +205,8 @@ func (this *FollowEnt) EntChangeList() {
 // ChangeGroup 更换关注企业分组
 func (this *FollowEnt) ChangeGroup() {
 	userId := qutil.ObjToString(this.GetSession("userId"))
-	baseUserId := qutil.Int64All(this.GetSession("base_user_id"))
-	entId := qutil.Int64All(this.GetSession("entId"))
-	accountId := qutil.Int64All(this.GetSession("accountId"))
 	rData, errMsg := func() (interface{}, error) {
-		cepm, err := entity.CreateEntFollowManager(userId, baseUserId, accountId, entId)
+		cepm, err := entity.CreateEntFollowManager(this.Session())
 		if err != nil {
 			return nil, err
 		}

+ 10 - 40
src/jfw/modules/bigmember/src/service/follow/project.go

@@ -33,11 +33,8 @@ type FollowProject struct {
 // AddProject 项目关注
 func (this *FollowProject) AddProject() {
 	userId := qutil.ObjToString(this.GetSession("userId"))
-	baseUserId := qutil.Int64All(this.GetSession("base_user_id"))
-	entId := qutil.Int64All(this.GetSession("entId"))
-	accountId := qutil.Int64All(this.GetSession("accountId"))
 	rData, errMsg := func() (interface{}, error) {
-		projectManager, err := entity.CreateProjectFollowManager(userId, baseUserId, accountId, entId)
+		projectManager, err := entity.CreateProjectFollowManager(this.Session())
 		if err != nil {
 			return nil, err
 		}
@@ -61,11 +58,8 @@ func (this *FollowProject) AddProject() {
 // CancelProject 取消关注
 func (this *FollowProject) CancelProject() {
 	userId := qutil.ObjToString(this.GetSession("userId"))
-	baseUserId := qutil.Int64All(this.GetSession("base_user_id"))
-	entId := qutil.Int64All(this.GetSession("entId"))
-	accountId := qutil.Int64All(this.GetSession("accountId"))
 	rData, errMsg := func() (interface{}, error) {
-		projectManager, err := entity.CreateProjectFollowManager(userId, baseUserId, accountId, entId)
+		projectManager, err := entity.CreateProjectFollowManager(this.Session())
 		if err != nil {
 			return nil, err
 		}
@@ -89,11 +83,8 @@ func (this *FollowProject) CancelProject() {
 // FollowCheck 是否关注项目
 func (this *FollowProject) FollowCheck() {
 	userId := qutil.ObjToString(this.GetSession("userId"))
-	baseUserId := qutil.Int64All(this.GetSession("base_user_id"))
-	entId := qutil.Int64All(this.GetSession("entId"))
-	accountId := qutil.Int64All(this.GetSession("accountId"))
 	rData, errMsg := func() (interface{}, error) {
-		projectManager, err := entity.CreateProjectFollowManager(userId, baseUserId, accountId, entId)
+		projectManager, err := entity.CreateProjectFollowManager(this.Session())
 		if err != nil {
 			return nil, err
 		}
@@ -119,14 +110,11 @@ func (this *FollowProject) FollowList() {
 	userId := qutil.ObjToString(this.GetSession("userId"))
 	entUserId := qutil.IntAll(this.GetSession("entUserId"))
 	isClaim := qutil.IntAll(this.GetString("isClaim"))
-	baseUserId := qutil.Int64All(this.GetSession("base_user_id"))
-	entId := qutil.Int64All(this.GetSession("entId"))
-	accountId := qutil.Int64All(this.GetSession("accountId"))
 	name := this.GetString("name")
 	area := this.GetString("area")
 	areaAll := strings.Split(area, ",")
 	rData, errMsg := func() (interface{}, error) {
-		projectManager, err := entity.CreateProjectFollowManager(userId, baseUserId, accountId, entId)
+		projectManager, err := entity.CreateProjectFollowManager(this.Session())
 		if err != nil {
 			return nil, err
 		}
@@ -185,11 +173,8 @@ func IsArea(areaAll []string, area string) bool {
 // FollowDetail 关注项目详情页&设置
 func (this *FollowProject) FollowDetail() {
 	userId := qutil.ObjToString(this.GetSession("userId"))
-	baseUserId := qutil.Int64All(this.GetSession("base_user_id"))
-	entId := qutil.Int64All(this.GetSession("entId"))
-	accountId := qutil.Int64All(this.GetSession("accountId"))
 	rData, errMsg := func() (interface{}, error) {
-		projectManager, err := entity.CreateProjectFollowManager(userId, baseUserId, accountId, entId)
+		projectManager, err := entity.CreateProjectFollowManager(this.Session())
 		if err != nil {
 			return nil, err
 		}
@@ -280,11 +265,8 @@ func mergeFollowDetail(followInfo, projectInfo map[string]interface{}, sid strin
 // FollowRead 项目信息已读
 func (this *FollowProject) FollowRead() {
 	userId := qutil.ObjToString(this.GetSession("userId"))
-	baseUserId := qutil.Int64All(this.GetSession("base_user_id"))
-	entId := qutil.Int64All(this.GetSession("entId"))
-	accountId := qutil.Int64All(this.GetSession("accountId"))
 	rData, errMsg := func() (interface{}, error) {
-		projectManager, err := entity.CreateProjectFollowManager(userId, baseUserId, accountId, entId)
+		projectManager, err := entity.CreateProjectFollowManager(this.Session())
 		if err != nil {
 			return nil, err
 		}
@@ -308,11 +290,8 @@ func (this *FollowProject) FollowRead() {
 // Remove30Day 批量删除30天没有更新的项目
 func (this *FollowProject) Remove30Day() {
 	userId := qutil.ObjToString(this.GetSession("userId"))
-	baseUserId := qutil.Int64All(this.GetSession("base_user_id"))
-	entId := qutil.Int64All(this.GetSession("entId"))
-	accountId := qutil.Int64All(this.GetSession("accountId"))
 	rData, errMsg := func() (interface{}, error) {
-		projectManager, err := entity.CreateProjectFollowManager(userId, baseUserId, accountId, entId)
+		projectManager, err := entity.CreateProjectFollowManager(this.Session())
 		if err != nil {
 			return nil, err
 		}
@@ -334,11 +313,8 @@ func (this *FollowProject) Remove30Day() {
 // AddTime 添加提醒时间&开标时间
 func (this *FollowProject) AddTime() {
 	userId := qutil.ObjToString(this.GetSession("userId"))
-	baseUserId := qutil.Int64All(this.GetSession("base_user_id"))
-	entId := qutil.Int64All(this.GetSession("entId"))
-	accountId := qutil.Int64All(this.GetSession("accountId"))
 	rData, errMsg := func() (interface{}, error) {
-		projectManager, err := entity.CreateProjectFollowManager(userId, baseUserId, accountId, entId)
+		projectManager, err := entity.CreateProjectFollowManager(this.Session())
 		if err != nil {
 			return nil, err
 		}
@@ -363,11 +339,8 @@ func (this *FollowProject) AddTime() {
 // RemindSwitch 项目提醒开关
 func (this *FollowProject) RemindSwitch() {
 	userId := qutil.ObjToString(this.GetSession("userId"))
-	baseUserId := qutil.Int64All(this.GetSession("base_user_id"))
-	entId := qutil.Int64All(this.GetSession("entId"))
-	accountId := qutil.Int64All(this.GetSession("accountId"))
 	rData, errMsg := func() (interface{}, error) {
-		projectManager, err := entity.CreateProjectFollowManager(userId, baseUserId, accountId, entId)
+		projectManager, err := entity.CreateProjectFollowManager(this.Session())
 		if err != nil {
 			return nil, err
 		}
@@ -390,12 +363,9 @@ func (this *FollowProject) RemindSwitch() {
 // ScreenArea 获取已关注的项目地区
 func (this *FollowProject) ScreenArea() {
 	userId := qutil.ObjToString(this.GetSession("userId"))
-	baseUserId := qutil.Int64All(this.GetSession("base_user_id"))
-	entId := qutil.Int64All(this.GetSession("entId"))
-	accountId := qutil.Int64All(this.GetSession("accountId"))
 	entUserId := qutil.IntAll(this.GetSession("entUserId"))
 	rData, errMsg := func() (interface{}, error) {
-		projectManager, err := entity.CreateProjectFollowManager(userId, baseUserId, accountId, entId)
+		projectManager, err := entity.CreateProjectFollowManager(this.Session())
 		if err != nil {
 			return nil, err
 		}

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

@@ -4,6 +4,7 @@ import (
 	. "app.yhyue.com/moapp/jybase/api"
 	qutil "app.yhyue.com/moapp/jybase/common"
 	elastic "app.yhyue.com/moapp/jybase/esv1"
+	"app.yhyue.com/moapp/jybase/go-xweb/httpsession"
 	"app.yhyue.com/moapp/jybase/mongodb"
 	"app.yhyue.com/moapp/jypkg/common/src/qfw/util/jy"
 	"encoding/json"
@@ -54,16 +55,13 @@ func NewClient() *http.Client {
 //GetPdfFile 下载项目内容pdf文件
 func (this *FollowProject) GetPdfFile() {
 	userId := qutil.ObjToString(this.GetSession("userId"))
-	baseUserId := qutil.Int64All(this.GetSession("base_user_id"))
-	entId := qutil.Int64All(this.GetSession("entId"))
-	accountId := qutil.Int64All(this.GetSession("accountId"))
 	rData, errMsg := func() (interface{}, error) {
 		sid := util.DecodeId(this.GetString("sid")) //获取信息id
 		if sid == "" {
 			return nil, fmt.Errorf("未知项目")
 		}
 		//校验是否为付费用户
-		if !checkPay(userId, baseUserId, accountId, entId) {
+		if !checkPay(this.Session()) {
 			return "", fmt.Errorf("非法请求")
 		}
 		pid, lastTime, err := getProjectSimpleData(sid)
@@ -124,9 +122,9 @@ func (this *FollowProject) GetPdfDetail() {
 }
 
 //校验是否是付费用户
-func checkPay(userId string, baseUserId, accountId, entId int64) bool {
-	bigPower := jy.GetBigVipUserBaseMsg("10000", userId, baseUserId, accountId, entId, config.Config.Etcd.Key, config.Config.Etcd.Key)
-
+func checkPay(session *httpsession.Session) bool {
+	bigPower := jy.GetBigVipUserBaseMsg("10000", session, config.Config.Etcd.Key, config.Config.Etcd.Key)
+	userId := qutil.InterfaceToStr(session.Get("userId"))
 	if bigPower.Status > 0 || bigPower.VipStatus > 0 {
 		return true
 	}

+ 14 - 56
src/jfw/modules/bigmember/src/service/portrait/memberPortraitAction.go

@@ -39,11 +39,8 @@ type EntPortrait struct {
 //EntDetail 企业基本信息
 func (this *EntPortrait) EntDetail() {
 	userId := qutil.ObjToString(this.GetSession("userId"))
-	baseUserId := qutil.Int64All(this.GetSession("base_user_id"))
-	entId := qutil.Int64All(this.GetSession("entId"))
-	accountId := qutil.Int64All(this.GetSession("accountId"))
 	rData, errMsg := func() (interface{}, error) {
-		cepm, _, err, _ := entity.CreatePortraitManager(userId, baseUserId, accountId, entId, "entDetail")
+		cepm, _, err, _ := entity.CreatePortraitManager(this.Session(), "entDetail")
 		if err != nil {
 			return nil, err
 		}
@@ -63,11 +60,8 @@ func (this *EntPortrait) EntDetail() {
 //WinnerContacts 中标企业历史联系人
 func (this *EntPortrait) WinnerContacts() {
 	userId := qutil.ObjToString(this.GetSession("userId"))
-	baseUserId := qutil.Int64All(this.GetSession("base_user_id"))
-	entId := qutil.Int64All(this.GetSession("entId"))
-	accountId := qutil.Int64All(this.GetSession("accountId"))
 	rData, errMsg := func() (interface{}, error) {
-		cepm, hasPower, err, _ := entity.CreatePortraitManager(userId, baseUserId, accountId, entId, "entPortrait")
+		cepm, hasPower, err, _ := entity.CreatePortraitManager(this.Session(), "entPortrait")
 		if err != nil {
 			return nil, err
 		}
@@ -92,15 +86,12 @@ func (this *EntPortrait) WinnerContacts() {
 // WinnerSelects 企业画像可供筛选的条件
 func (this *EntPortrait) WinnerSelects() {
 	userId := qutil.ObjToString(this.GetSession("userId"))
-	baseUserId := qutil.Int64All(this.GetSession("base_user_id"))
-	entid := qutil.Int64All(this.GetSession("entId"))
-	accountId := qutil.Int64All(this.GetSession("accountId"))
 	rData, errMsg := func() (interface{}, error) {
 		entId := util.DecodeId(this.GetString("entId"))
 		if entId == "" {
 			return nil, fmt.Errorf("企业参数异常")
 		}
-		_, _, err, _ := entity.CreatePortraitManager(userId, baseUserId, accountId, entid, "entNewMsg")
+		_, _, err, _ := entity.CreatePortraitManager(this.Session(), "entNewMsg")
 		if err != nil {
 			return nil, err
 		}
@@ -119,15 +110,12 @@ func (this *EntPortrait) WinnerSelects() {
 //WinnerNewMsg 企业画像-最新项目动态
 func (this *EntPortrait) WinnerNewMsg() {
 	userId := qutil.ObjToString(this.GetSession("userId"))
-	baseUserId := qutil.Int64All(this.GetSession("base_user_id"))
-	entid := qutil.Int64All(this.GetSession("entId"))
-	accountId := qutil.Int64All(this.GetSession("accountId"))
 	rData, errMsg := func() (interface{}, error) {
 		entId := util.DecodeId(this.GetString("entId"))
 		if entId == "" {
 			return nil, fmt.Errorf("企业参数异常")
 		}
-		cepm, hasPower, err, _ := entity.CreatePortraitManager(userId, baseUserId, accountId, entid, "entNewMsg")
+		cepm, hasPower, err, _ := entity.CreatePortraitManager(this.Session(), "entNewMsg")
 		if err != nil {
 			return nil, err
 		}
@@ -168,15 +156,12 @@ func (this *EntPortrait) WinnerNewMsg() {
 //WinnerNewMsgExport 企业画像-最新项目动态
 func (this *EntPortrait) WinnerNewMsgExport() {
 	userId := qutil.ObjToString(this.GetSession("userId"))
-	baseUserId := qutil.Int64All(this.GetSession("base_user_id"))
-	entid := qutil.Int64All(this.GetSession("entId"))
-	accountId := qutil.Int64All(this.GetSession("accountId"))
 	rData, errMsg := func() (interface{}, error) {
 		entId := util.DecodeId(this.GetString("entId"))
 		if entId == "" {
 			return nil, fmt.Errorf("企业参数异常")
 		}
-		cepm, hasPower, err, free := entity.CreatePortraitManager(userId, baseUserId, accountId, entid, "entNewMsg")
+		cepm, hasPower, err, free := entity.CreatePortraitManager(this.Session(), "entNewMsg")
 		if err != nil {
 			return nil, err
 		}
@@ -222,11 +207,8 @@ func (this *EntPortrait) WinnerNewMsgExport() {
 //WinnerPortrait 企业画像-画像数据查询
 func (this *EntPortrait) WinnerPortrait() {
 	userId := qutil.ObjToString(this.GetSession("userId"))
-	baseUserId := qutil.Int64All(this.GetSession("base_user_id"))
-	entid := qutil.Int64All(this.GetSession("entId"))
-	accountId := qutil.Int64All(this.GetSession("accountId"))
 	rData, errMsg := func() (interface{}, error) {
-		cepm, hasPower, err, _ := entity.CreatePortraitManager(userId, baseUserId, accountId, entid, "entPortrait")
+		cepm, hasPower, err, _ := entity.CreatePortraitManager(this.Session(), "entPortrait")
 		if err != nil {
 			return nil, err
 		}
@@ -255,11 +237,8 @@ func (this *EntPortrait) WinnerPortrait() {
 //WinnerMiniPortrait 三级页中标单位引流数据展示(免费)
 func (this *EntPortrait) WinnerMiniPortrait() {
 	userId := qutil.ObjToString(this.GetSession("userId"))
-	baseUserId := qutil.Int64All(this.GetSession("base_user_id"))
-	entid := qutil.Int64All(this.GetSession("entId"))
-	accountId := qutil.Int64All(this.GetSession("accountId"))
 	rData, errMsg := func() (interface{}, error) {
-		cepm, _, err, _ := entity.CreatePortraitManager(userId, baseUserId, accountId, entid, "entPortrait")
+		cepm, _, err, _ := entity.CreatePortraitManager(this.Session(), "entPortrait")
 		if err != nil {
 			return nil, err
 		}
@@ -292,15 +271,12 @@ func (this *EntPortrait) WinnerMiniPortrait() {
 //dev.6.2.1免费用户可筛选画像
 func (this *EntPortrait) BuyerSelects() {
 	userId := qutil.ObjToString(this.GetSession("userId"))
-	baseUserId := qutil.Int64All(this.GetSession("base_user_id"))
-	entid := qutil.Int64All(this.GetSession("entId"))
-	accountId := qutil.Int64All(this.GetSession("accountId"))
 	rData, errMsg := func() (interface{}, error) {
 		buyer := this.GetString("buyer")
 		if buyer == "" {
 			return nil, fmt.Errorf("企业参数异常")
 		}
-		_, _, err, _ := entity.CreatePortraitManager(userId, baseUserId, accountId, entid, "buyerPortrait")
+		_, _, err, _ := entity.CreatePortraitManager(this.Session(), "buyerPortrait")
 		if err != nil {
 			return nil, err
 		}
@@ -316,11 +292,8 @@ func (this *EntPortrait) BuyerSelects() {
 //BuyerNewMsg 采购单位画像-最新招标动态(免费用户仅可查看3条记录,付费50条)
 func (this *EntPortrait) BuyerNewMsg() {
 	userId := qutil.ObjToString(this.GetSession("userId"))
-	baseUserId := qutil.Int64All(this.GetSession("base_user_id"))
-	entid := qutil.Int64All(this.GetSession("entId"))
-	accountId := qutil.Int64All(this.GetSession("accountId"))
 	rData, errMsg := func() (interface{}, error) {
-		cepm, hasPower, err, _ := entity.CreatePortraitManager(userId, baseUserId, accountId, entid, "buyerPortrait")
+		cepm, hasPower, err, _ := entity.CreatePortraitManager(this.Session(), "buyerPortrait")
 		if err != nil {
 			return nil, err
 		}
@@ -360,11 +333,8 @@ func (this *EntPortrait) BuyerNewMsg() {
 
 func (this *EntPortrait) BuyerNewMsgExport() {
 	userId := qutil.ObjToString(this.GetSession("userId"))
-	baseUserId := qutil.Int64All(this.GetSession("base_user_id"))
-	entid := qutil.Int64All(this.GetSession("entId"))
-	accountId := qutil.Int64All(this.GetSession("accountId"))
 	rData, errMsg := func() (interface{}, error) {
-		cepm, hasPower, err, free := entity.CreatePortraitManager(userId, baseUserId, accountId, entid, "buyerPortrait")
+		cepm, hasPower, err, free := entity.CreatePortraitManager(this.Session(), "buyerPortrait")
 		if err != nil {
 			return nil, err
 		}
@@ -408,11 +378,8 @@ func (this *EntPortrait) BuyerNewMsgExport() {
 //BuyerContacts 采购单位联系人(必须开通会员)
 func (this *EntPortrait) BuyerContacts() {
 	userId := qutil.ObjToString(this.GetSession("userId"))
-	baseUserId := qutil.Int64All(this.GetSession("base_user_id"))
-	entid := qutil.Int64All(this.GetSession("entId"))
-	accountId := qutil.Int64All(this.GetSession("accountId"))
 	rData, errMsg := func() (interface{}, error) {
-		cepm, hasPower, err, _ := entity.CreatePortraitManager(userId, baseUserId, accountId, entid, "buyerPortrait")
+		cepm, hasPower, err, _ := entity.CreatePortraitManager(this.Session(), "buyerPortrait")
 		if err != nil {
 			return nil, err
 		}
@@ -437,11 +404,8 @@ func (this *EntPortrait) BuyerContacts() {
 //BuyerPortrait 采购单位画像-数据(免费用户可查看基本信息、项目统计、合作企业资本、年龄及地区分布)
 func (this *EntPortrait) BuyerPortrait() {
 	userId := qutil.ObjToString(this.GetSession("userId"))
-	baseUserId := qutil.Int64All(this.GetSession("base_user_id"))
-	entid := qutil.Int64All(this.GetSession("entId"))
-	accountId := qutil.Int64All(this.GetSession("accountId"))
 	rData, errMsg := func() (interface{}, error) {
-		cepm, hasPower, err, _ := entity.CreatePortraitManager(userId, baseUserId, accountId, entid, "buyerPortrait")
+		cepm, hasPower, err, _ := entity.CreatePortraitManager(this.Session(), "buyerPortrait")
 		if err != nil {
 			return nil, err
 		}
@@ -471,11 +435,8 @@ func (this *EntPortrait) BuyerPortrait() {
 //BuyerMiniPortrait 三级页采购单位引流数据展示(免费)
 func (this *EntPortrait) BuyerMiniPortrait() {
 	userId := qutil.ObjToString(this.GetSession("userId"))
-	baseUserId := qutil.Int64All(this.GetSession("base_user_id"))
-	entid := qutil.Int64All(this.GetSession("entId"))
-	accountId := qutil.Int64All(this.GetSession("accountId"))
 	rData, errMsg := func() (interface{}, error) {
-		cepm, _, err, _ := entity.CreatePortraitManager(userId, baseUserId, accountId, entid, "buyerPortrait")
+		cepm, _, err, _ := entity.CreatePortraitManager(this.Session(), "buyerPortrait")
 		if err != nil {
 			return nil, err
 		}
@@ -515,14 +476,11 @@ func (this *EntPortrait) BuyerMiniPortrait() {
 // PortraitContacts 画像通讯录
 func (this *EntPortrait) PortraitContacts() {
 	userId := qutil.ObjToString(this.GetSession("userId"))
-	baseUserId := qutil.Int64All(this.GetSession("base_user_id"))
-	entid := qutil.Int64All(this.GetSession("entId"))
-	accountId := qutil.Int64All(this.GetSession("accountId"))
 	rData, errMsg := func() (interface{}, error) {
 		entType, _ := this.GetInt("entType")
 		entName := this.GetString("entName")
 		// 画像通讯里访问权限
-		cepm, err := entity.CreatePortraitManagerForContacts(userId, baseUserId, accountId, entid, entType, entName)
+		cepm, err := entity.CreatePortraitManagerForContacts(this.Session(), entType, entName)
 
 		if err != nil {
 			return nil, err

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

@@ -41,15 +41,12 @@ type SubVipPortrait struct {
 //SubVipEntDetail 超级订阅升级版查询基本信息
 func (this *SubVipPortrait) SubVipEntDetail() {
 	userId := qutil.ObjToString(this.GetSession("userId"))
-	baseUserId := qutil.Int64All(this.GetSession("base_user_id"))
-	entid := qutil.Int64All(this.GetSession("entId"))
-	accountId := qutil.Int64All(this.GetSession("accountId"))
 	rData, errMsg := func() (interface{}, error) {
 		entId := util.DecodeId(this.GetString("entId"))
 		if entId == "" {
 			return nil, fmt.Errorf("参数异常")
 		}
-		cepm, _, err, _ := entity.CreateSubVipPortraitManager(userId, "entDetail", entId, true, baseUserId, accountId, entid)
+		cepm, _, err, _ := entity.CreateSubVipPortraitManager(userId, "entDetail", entId, true, this.Session())
 		if err != nil {
 			return nil, err
 		}
@@ -68,15 +65,12 @@ func (this *SubVipPortrait) SubVipEntDetail() {
 //SubVipWinnerNewMsg 超级订阅升级版查看最新中标动态
 func (this *SubVipPortrait) SubVipWinnerNewMsg() {
 	userId := qutil.ObjToString(this.GetSession("userId"))
-	baseUserId := qutil.Int64All(this.GetSession("base_user_id"))
-	entid := qutil.Int64All(this.GetSession("entId"))
-	accountId := qutil.Int64All(this.GetSession("accountId"))
 	rData, errMsg := func() (interface{}, error) {
 		entId := util.DecodeId(this.GetString("entId"))
 		if entId == "" {
 			return nil, fmt.Errorf("参数异常")
 		}
-		cepm, power, err, _ := entity.CreateSubVipPortraitManager(userId, "entNewMsg", entId, true, baseUserId, accountId, entid)
+		cepm, power, err, _ := entity.CreateSubVipPortraitManager(userId, "entNewMsg", entId, true, this.Session())
 		if err != nil {
 			return nil, err
 		}
@@ -118,15 +112,12 @@ func (this *SubVipPortrait) SubVipWinnerNewMsg() {
 //WinnerNewMsgExport 超级订阅升级版查看最新中标动态数据导出
 func (this *SubVipPortrait) WinnerNewMsgExport() {
 	userId := qutil.ObjToString(this.GetSession("userId"))
-	baseUserId := qutil.Int64All(this.GetSession("base_user_id"))
-	entid := qutil.Int64All(this.GetSession("entId"))
-	accountId := qutil.Int64All(this.GetSession("accountId"))
 	rData, errMsg := func() (interface{}, error) {
 		entId := util.DecodeId(this.GetString("entId"))
 		if entId == "" {
 			return nil, fmt.Errorf("参数异常")
 		}
-		cepm, power, err, free := entity.CreateSubVipPortraitManager(userId, "entNewMsg", entId, true, baseUserId, accountId, entid)
+		cepm, power, err, free := entity.CreateSubVipPortraitManager(userId, "entNewMsg", entId, true, this.Session())
 		if err != nil {
 			return nil, err
 		}
@@ -172,15 +163,12 @@ func (this *SubVipPortrait) WinnerNewMsgExport() {
 //SubVipNewMsgSelects 获取画像可筛选项
 func (this *SubVipPortrait) SubVipNewMsgSelects() {
 	userId := qutil.ObjToString(this.GetSession("userId"))
-	baseUserId := qutil.Int64All(this.GetSession("base_user_id"))
-	entid := qutil.Int64All(this.GetSession("entId"))
-	accountId := qutil.Int64All(this.GetSession("accountId"))
 	rData, errMsg := func() (interface{}, error) {
 		entId := util.DecodeId(this.GetString("entId"))
 		if entId == "" {
 			return nil, fmt.Errorf("参数异常")
 		}
-		_, _, err, _ := entity.CreateSubVipPortraitManager(userId, "entNewMsg", entId, true, baseUserId, accountId, entid)
+		_, _, err, _ := entity.CreateSubVipPortraitManager(userId, "entNewMsg", entId, true, this.Session())
 		if err != nil {
 			return nil, err
 		}
@@ -196,15 +184,12 @@ func (this *SubVipPortrait) SubVipNewMsgSelects() {
 //SubVipPortrait 超级订阅升级版查看企业画像
 func (this *SubVipPortrait) SubVipPortrait() {
 	userId := qutil.ObjToString(this.GetSession("userId"))
-	baseUserId := qutil.Int64All(this.GetSession("base_user_id"))
-	entid := qutil.Int64All(this.GetSession("entId"))
-	accountId := qutil.Int64All(this.GetSession("accountId"))
 	rData, errMsg := func() (interface{}, error) {
 		entId := util.DecodeId(this.GetString("entId"))
 		if entId == "" {
 			return nil, fmt.Errorf("参数异常")
 		}
-		cepm, power, err, _ := entity.CreateSubVipPortraitManager(userId, "entPortrait", entId, true, baseUserId, accountId, entid)
+		cepm, power, err, _ := entity.CreateSubVipPortraitManager(userId, "entPortrait", entId, true, this.Session())
 		if err != nil {
 			return nil, err
 		}
@@ -232,11 +217,8 @@ func (this *SubVipPortrait) SubVipPortrait() {
 //PortraitUsage 超级订阅升级版画像浏览量查询
 func (this *SubVipPortrait) PortraitUsage() {
 	userId := qutil.ObjToString(this.GetSession("userId"))
-	baseUserId := qutil.Int64All(this.GetSession("base_user_id"))
-	entId := qutil.Int64All(this.GetSession("entId"))
-	accountId := qutil.Int64All(this.GetSession("accountId"))
 	rData, errMsg := func() (interface{}, error) {
-		bigMsg := jy.GetBigVipUserBaseMsg("10000", userId, baseUserId, accountId, entId, config.Config.Etcd.Key, config.Config.Etcd.Key)
+		bigMsg := jy.GetBigVipUserBaseMsg("10000", this.Session(), config.Config.Etcd.Key, config.Config.Etcd.Key)
 
 		if bigMsg.VipStatus <= 0 && bigMsg.Vip_BuySet.Upgrade != 1 {
 			return nil, fmt.Errorf("非法请求")
@@ -269,9 +251,6 @@ func (this *SubVipPortrait) PortraitUsage() {
 //PortraitRecord 超级订阅升级版画像查看记录
 func (this *SubVipPortrait) PortraitRecord() {
 	userId := qutil.ObjToString(this.GetSession("userId"))
-	baseUserId := qutil.Int64All(this.GetSession("base_user_id"))
-	entId := qutil.Int64All(this.GetSession("entId"))
-	accountId := qutil.Int64All(this.GetSession("accountId"))
 	rData, errMsg := func() (interface{}, error) {
 		year, _ := this.GetInteger("year")
 		month, _ := this.GetInteger("month")
@@ -284,7 +263,7 @@ func (this *SubVipPortrait) PortraitRecord() {
 		if pageSize < 1 || pageSize > 50 {
 			pageSize = 50
 		}
-		bigMsg := jy.GetBigVipUserBaseMsg("10000", userId, baseUserId, accountId, entId, config.Config.Etcd.Key, config.Config.Etcd.Key)
+		bigMsg := jy.GetBigVipUserBaseMsg("10000", this.Session(), config.Config.Etcd.Key, config.Config.Etcd.Key)
 		if bigMsg.VipStatus <= 0 && bigMsg.Vip_BuySet.Upgrade != 1 {
 			return nil, fmt.Errorf("非法请求")
 		}
@@ -328,15 +307,12 @@ func (this *SubVipPortrait) PortraitRecord() {
 //BuyerSelects 超级订阅筛选画像
 func (this *SubVipPortrait) BuyerSelects() {
 	userId := qutil.ObjToString(this.GetSession("userId"))
-	baseUserId := qutil.Int64All(this.GetSession("base_user_id"))
-	entid := qutil.Int64All(this.GetSession("entId"))
-	accountId := qutil.Int64All(this.GetSession("accountId"))
 	rData, errMsg := func() (interface{}, error) {
 		buyer := this.GetString("buyer")
 		if buyer == "" {
 			return nil, fmt.Errorf("参数异常")
 		}
-		_, _, err, _ := entity.CreateSubVipPortraitManager(userId, "buyerPortrait", buyer, false, baseUserId, accountId, entid)
+		_, _, err, _ := entity.CreateSubVipPortraitManager(userId, "buyerPortrait", buyer, false, this.Session())
 		if err != nil {
 			return nil, err
 		}
@@ -352,9 +328,6 @@ func (this *SubVipPortrait) BuyerSelects() {
 //BuyerNewMsg 超级订阅采购单位画像动态
 func (this *SubVipPortrait) BuyerNewMsg() {
 	userId := qutil.ObjToString(this.GetSession("userId"))
-	baseUserId := qutil.Int64All(this.GetSession("base_user_id"))
-	entid := qutil.Int64All(this.GetSession("entId"))
-	accountId := qutil.Int64All(this.GetSession("accountId"))
 	rData, errMsg := func() (interface{}, error) {
 		buyer := this.GetString("buyer")
 		if buyer == "" {
@@ -362,7 +335,7 @@ func (this *SubVipPortrait) BuyerNewMsg() {
 		}
 		pageNum, _ := this.GetInteger("pageNum")
 		pageSize, _ := this.GetInteger("pageSize")
-		cepm, power, err, _ := entity.CreateSubVipPortraitManager(userId, "buyerPortrait", buyer, false, baseUserId, accountId, entid)
+		cepm, power, err, _ := entity.CreateSubVipPortraitManager(userId, "buyerPortrait", buyer, false, this.Session())
 		if err != nil {
 			return nil, err
 		}
@@ -398,15 +371,12 @@ func (this *SubVipPortrait) BuyerNewMsg() {
 //BuyerNewMsgExport 超级订阅采购单位画像动态数据导出
 func (this *SubVipPortrait) BuyerNewMsgExport() {
 	userId := qutil.ObjToString(this.GetSession("userId"))
-	baseUserId := qutil.Int64All(this.GetSession("base_user_id"))
-	entid := qutil.Int64All(this.GetSession("entId"))
-	accountId := qutil.Int64All(this.GetSession("accountId"))
 	rData, errMsg := func() (interface{}, error) {
 		buyer := this.GetString("buyer")
 		if buyer == "" {
 			return nil, fmt.Errorf("参数异常")
 		}
-		cepm, power, err, free := entity.CreateSubVipPortraitManager(userId, "buyerPortrait", buyer, false, baseUserId, accountId, entid)
+		cepm, power, err, free := entity.CreateSubVipPortraitManager(userId, "buyerPortrait", buyer, false, this.Session())
 		if err != nil {
 			return nil, err
 		}
@@ -448,15 +418,12 @@ func (this *SubVipPortrait) BuyerNewMsgExport() {
 //BuyerContacts 超级订阅采购单位联系人
 func (this *SubVipPortrait) BuyerContacts() {
 	userId := qutil.ObjToString(this.GetSession("userId"))
-	baseUserId := qutil.Int64All(this.GetSession("base_user_id"))
-	entid := qutil.Int64All(this.GetSession("entId"))
-	accountId := qutil.Int64All(this.GetSession("accountId"))
 	rData, errMsg := func() (interface{}, error) {
 		buyerName := this.GetString("buyer")
 		if buyerName == "" {
 			return nil, fmt.Errorf("企业参数异常")
 		}
-		cepm, power, err, _ := entity.CreateSubVipPortraitManager(userId, "buyerPortrait", buyerName, false, baseUserId, accountId, entid)
+		cepm, power, err, _ := entity.CreateSubVipPortraitManager(userId, "buyerPortrait", buyerName, false, this.Session())
 		if err != nil {
 			return nil, err
 		}
@@ -480,15 +447,12 @@ func (this *SubVipPortrait) BuyerContacts() {
 //BuyerPortrait 超级订阅采购单位画像-数据
 func (this *SubVipPortrait) BuyerPortrait() {
 	userId := qutil.ObjToString(this.GetSession("userId"))
-	baseUserId := qutil.Int64All(this.GetSession("base_user_id"))
-	entid := qutil.Int64All(this.GetSession("entId"))
-	accountId := qutil.Int64All(this.GetSession("accountId"))
 	rData, errMsg := func() (interface{}, error) {
 		buyerName := this.GetString("buyer")
 		if buyerName == "" {
 			return nil, fmt.Errorf("参数异常")
 		}
-		cepm, power, err, _ := entity.CreateSubVipPortraitManager(userId, "buyerPortrait", buyerName, false, baseUserId, accountId, entid)
+		cepm, power, err, _ := entity.CreateSubVipPortraitManager(userId, "buyerPortrait", buyerName, false, this.Session())
 		if err != nil {
 			return nil, err
 		}

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

@@ -3,6 +3,7 @@ package push
 import (
 	. "app.yhyue.com/moapp/jybase/api"
 	util "app.yhyue.com/moapp/jybase/common"
+	"app.yhyue.com/moapp/jybase/go-xweb/httpsession"
 	"app.yhyue.com/moapp/jypkg/common/src/qfw/util/jy"
 	"encoding/json"
 	"jy/src/jfw/modules/bigmember/src/config"
@@ -38,9 +39,6 @@ type pushSet struct {
 //4.6.0修改 只把有权益的存入map返给前端, k:权益 v:是否开启
 func (a *Action) Items() {
 	userId, _ := a.GetSession("userId").(string)
-	baseUserId := util.Int64All(a.GetSession("base_user_id"))
-	entId := util.Int64All(a.GetSession("entId"))
-	accountId := util.Int64All(a.GetSession("accountId"))
 	user, _ := Mgo.FindById("user", userId, `{"i_member_status":1,"i_vip_status":1,"s_phone":1,"s_m_phone":1,"o_member_jy":1}`)
 	s_phone, _ := (*user)["s_phone"].(string)
 	if s_phone == "" {
@@ -56,8 +54,8 @@ func (a *Action) Items() {
 	}
 	if member_status > 0 {
 		o_member_jy, _ := (*user)["o_member_jy"].(map[string]interface{})
-		data["member_subscribe"] = OpenStatus(o_member_jy, "member_subscribe", userId, baseUserId, accountId, entId) //大会员订阅
-		delete(data, "free_subscribe")                                                                               //有大会员订阅没有免费订阅
+		data["member_subscribe"] = OpenStatus(o_member_jy, "member_subscribe", a.Session()) //大会员订阅
+		delete(data, "free_subscribe")                                                      //有大会员订阅没有免费订阅
 	}
 	if member_status <= 0 && vip_status <= 0 {
 		data["follow_ent"] = true     //企业关注
@@ -76,9 +74,6 @@ func (a *Action) Items() {
 }
 func (a *Action) Detail() {
 	userId, _ := a.GetSession("userId").(string)
-	baseUserId := util.Int64All(a.GetSession("base_user_id"))
-	entId := util.Int64All(a.GetSession("entId"))
-	accountId := util.Int64All(a.GetSession("accountId"))
 	if !R.CheckReqParam(a.ResponseWriter, a.Request, "item") {
 		return
 	}
@@ -102,7 +97,7 @@ func (a *Action) Detail() {
 			"wxpush":         util.IntAll(o_member_jy["i_wxpush"]),
 		}
 		power := []int{}
-		BigMsg := jy.GetBigVipUserBaseMsg("10000", userId, baseUserId, accountId, entId, config.Config.Etcd.Key, config.Config.Etcd.Key)
+		BigMsg := jy.GetBigVipUserBaseMsg("10000", a.Session(), config.Config.Etcd.Key, config.Config.Etcd.Key)
 		for k, _ := range BigMsg.PowerMap {
 			power = append(power, k)
 		}
@@ -394,7 +389,7 @@ func (a *Action) Update() {
 }
 
 //判断按钮是否全部开启
-func OpenStatus(ojy map[string]interface{}, types, userId string, baseUserId, accountId, entId int64) bool {
+func OpenStatus(ojy map[string]interface{}, types string, session *httpsession.Session) bool {
 	push, data := M{}, M{}
 	pushStatus, subscribe := false, false
 	switch types {
@@ -409,7 +404,7 @@ func OpenStatus(ojy map[string]interface{}, types, userId string, baseUserId, ac
 			"follow_ent":     util.IntAllDef(ojy["i_follow_ent"], 1),
 		}
 		power := []int{}
-		BigMsg := jy.GetBigVipUserBaseMsg("10000", userId, baseUserId, accountId, entId, config.Config.Etcd.Key, config.Config.Etcd.Key)
+		BigMsg := jy.GetBigVipUserBaseMsg("10000", session, config.Config.Etcd.Key, config.Config.Etcd.Key)
 		for k, _ := range BigMsg.PowerMap {
 			power = append(power, k)
 		}

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

@@ -1,6 +1,7 @@
 package report
 
 import (
+	"app.yhyue.com/moapp/jybase/go-xweb/httpsession"
 	"fmt"
 	"jy/src/jfw/modules/bigmember/src/config"
 	"jy/src/jfw/modules/bigmember/src/db"
@@ -25,26 +26,21 @@ type MarketAnalysis struct {
 }
 
 // checkPower 权限校验
-func checkPower(userId string, baseUserId, accountId, entId int64) (string, error) {
+func checkPower(session *httpsession.Session) (string, error) {
+	userId := qutil.InterfaceToStr(session.Get("base_user_id"))
 	if userId == "" {
 		return "", fmt.Errorf("未登录")
 	}
 	//仅购买《周报/月报/定制化市场分析报告》的大会员有权限
-	bigMeg := jy.GetBigVipUserBaseMsg("10000", userId, baseUserId, accountId, entId, config.Config.Etcd.Key, config.Config.Etcd.Key)
-	//if bigMeg.Status <= 0 || !bigMeg.CheckBigVipBackPower("report") {
-	//	return "", fmt.Errorf("非法请求")
-	//}
+	bigMeg := jy.GetBigVipUserBaseMsg("10000", session, config.Config.Etcd.Key, config.Config.Etcd.Key)
 	return bigMeg.Pid, nil
 }
 
 // DoAnalysis 开始分析报告
 func (this *MarketAnalysis) DoAnalysis() {
 	userId := qutil.ObjToString(this.GetSession("userId"))
-	baseUserId := qutil.Int64All(this.GetSession("base_user_id"))
-	entId := qutil.Int64All(this.GetSession("entId"))
-	accountId := qutil.Int64All(this.GetSession("accountId"))
 	rData, errMsg := func() (interface{}, error) {
-		pid, powerErr := checkPower(userId, baseUserId, accountId, entId)
+		pid, powerErr := checkPower(this.Session())
 		if powerErr != nil {
 			return nil, powerErr
 		}
@@ -76,11 +72,8 @@ func (this *MarketAnalysis) DoAnalysis() {
 // GetAnalysisResult 获取分析结果
 func (this *MarketAnalysis) GetAnalysisResult() {
 	userId := qutil.ObjToString(this.GetSession("userId"))
-	baseUserId := qutil.Int64All(this.GetSession("base_user_id"))
-	entId := qutil.Int64All(this.GetSession("entId"))
-	accountId := qutil.Int64All(this.GetSession("accountId"))
 	rData, errMsg := func() (interface{}, error) {
-		pid, powerErr := checkPower(userId, baseUserId, accountId, entId)
+		pid, powerErr := checkPower(this.Session())
 		if powerErr != nil {
 			return nil, powerErr
 		}
@@ -109,11 +102,8 @@ func (this *MarketAnalysis) GetAnalysisResult() {
 // AnalysisHistory 分析报告历史
 func (this *MarketAnalysis) AnalysisHistory() {
 	userId := qutil.ObjToString(this.GetSession("userId"))
-	baseUserId := qutil.Int64All(this.GetSession("base_user_id"))
-	entId := qutil.Int64All(this.GetSession("entId"))
-	accountId := qutil.Int64All(this.GetSession("accountId"))
 	rData, errMsg := func() (interface{}, error) {
-		pid, powerErr := checkPower(userId, baseUserId, accountId, entId)
+		pid, powerErr := checkPower(this.Session())
 		if powerErr != nil {
 			return nil, powerErr
 		}

+ 1 - 4
src/jfw/modules/bigmember/src/service/trial/trial.go

@@ -17,11 +17,8 @@ type Trial struct {
 func (this *Trial) UserInfo() {
 	defer qutil.Catch()
 	userId := qutil.ObjToString(this.GetSession("userId"))
-	baseUserId := qutil.Int64All(this.GetSession("base_user_id"))
-	entId := qutil.Int64All(this.GetSession("entId"))
-	accountId := qutil.Int64All(this.GetSession("accountId"))
 	rData, errMsg := func() (interface{}, error) {
-		info := entity.GetUserTrialInfoById(userId, baseUserId, accountId, entId)
+		info := entity.GetUserTrialInfoById(this.Session())
 		return info, nil
 	}()
 	if errMsg != nil {

+ 19 - 25
src/jfw/modules/bigmember/src/service/use/use.go

@@ -46,7 +46,7 @@ func (u *Use) SubPageMoveTip() {
 				},
 			})
 		} else { //查询是否提示弹框
-			if uData, _ := db.Mgo.FindById("user", userId, `"i_member_status":1,"i_member_starttime":1,"o_member_jy":1`); uData != nil && len(*uData) > 0 {
+			/*if uData, _ := db.Mgo.FindById("user", userId, `"i_member_status":1,"i_member_starttime":1,"o_member_jy":1`); uData != nil && len(*uData) > 0 {
 				startTime := qu.Int64All((*uData)["i_member_starttime"])
 				memberStatus := qu.Int64All((*uData)["i_member_status"])
 				if memberStatus > 0 && startTime < config.Config.OldSubscribeMoveTip {
@@ -55,7 +55,18 @@ func (u *Use) SubPageMoveTip() {
 						flag = true
 					}
 				}
-			}
+			}*/
+			//bigMsg := jy.GetBigVipUserBaseMsg("10000", u.Session(), config.Config.Etcd.Hosts, config.Config.Etcd.Key)
+			/*后期需要更改
+			  startTime := qu.Int64All(bigMsg.s)
+			  memberStatus := qu.Int64All((*uData)["i_member_status"])
+			  if memberStatus > 0 && startTime < config.Config.OldSubscribeMoveTip {
+			          o_member_jy, ok := (*uData)["o_member_jy"].(map[string]interface{})
+			          if ok && qu.Int64All(o_member_jy["i_moveTip"]) == 0 {
+			                  flag = true
+			          }
+			  }*/
+
 		}
 	}
 	u.ServeJson(map[string]interface{}{
@@ -67,9 +78,6 @@ func (u *Use) SubPageMoveTip() {
 func (u *Use) Add() {
 	r := func() Result {
 		userid := qu.ObjToString(u.GetSession("userId"))
-		baseUserId := qu.Int64All(u.GetSession("base_user_id"))
-		entId := qu.Int64All(u.GetSession("entId"))
-		accountId := qu.Int64All(u.GetSession("accountId"))
 		if userid == "" {
 			return Result{Data: M{"status": -1}, Error_msg: "未登录"}
 		}
@@ -135,12 +143,12 @@ func (u *Use) Add() {
 				}
 				set["competitor"] = competitor //竞争对手
 				set["competitorIds"] = ids     //竞争对手id
-				followEntManager, err := entity.CreateEntFollowManager(userid, baseUserId, accountId, entId)
+				followEntManager, err := entity.CreateEntFollowManager(u.Session())
 				if err != nil {
 					log.Println("add err:", userid, err)
 				} else if followEntManager.HasPower {
 					for k, v := range ids {
-						BigMsg := jy.GetBigVipUserBaseMsg("10000", userid, baseUserId, accountId, entId, config.Config.Etcd.Key, config.Config.Etcd.Key)
+						BigMsg := jy.GetBigVipUserBaseMsg("10000", u.Session(), config.Config.Etcd.Key, config.Config.Etcd.Key)
 						if BigMsg.Status != 4 {
 							err = followEntManager.AddFollowEnt(v, "", true)
 							if err != nil {
@@ -440,9 +448,6 @@ func (u *Use) Attachment() {
 		if userid == "" {
 			return Result{Data: nil, Error_msg: "未登录"}
 		}
-		baseUserId := qu.Int64All(u.GetSession("base_user_id"))
-		entId := qu.Int64All(u.GetSession("entId"))
-		accountId := qu.Int64All(u.GetSession("accountId"))
 		//前端传的是加密的id 需要解密
 		infoId := util.DecodeId(u.GetString("infoId")) //"5ddf222ce9d1f601e469e00c  5f50c37dc0145440737556d0"
 		// 调用rpc
@@ -455,7 +460,7 @@ func (u *Use) Attachment() {
 			rep.Rep = []map[string]interface{}{}
 		}
 		m := rep.Rep
-		BaseMsg := jy.GetBigVipUserBaseMsg("10000", userid, baseUserId, accountId, entId, config.Config.Etcd.Key, config.Config.Etcd.Key)
+		BaseMsg := jy.GetBigVipUserBaseMsg("10000", u.Session(), config.Config.Etcd.Key, config.Config.Etcd.Key)
 		status := BaseMsg.Status
 		if status <= 0 {
 			for _, v := range m {
@@ -499,9 +504,6 @@ func (u *Use) Equity() {
 				"customers": config.Config.Customers,
 			}, Error_msg: "未登录"}
 		}
-		baseUserId := qu.Int64All(u.GetSession("base_user_id"))
-		entId := qu.Int64All(u.GetSession("entId"))
-		accountId := qu.Int64All(u.GetSession("accountId"))
 		person, ok := db.Mgo.FindOneByField("user", map[string]interface{}{
 			"_id": mongodb.StringTOBsonId(userid),
 		}, `{"s_nickname":1,"s_headimageurl":1,"s_phone":1,"i_member_status":1,"i_member_endtime":1,"o_member_jy":1,"s_member_mainid":1,"i_member_sub_status":1,"i_bidfileCount":1}`)
@@ -544,7 +546,7 @@ func (u *Use) Equity() {
 			account := SubAccout(userid)          //子账号
 			surplus, _ := GetSurplusCount(userid) //剩余次数
 			power := []int{}                      //GetNewPower(userid)
-			powerMap := jy.GetBigVipUserBaseMsg("10000", userid, baseUserId, accountId, entId, config.Config.Etcd.Key, config.Config.Etcd.Key).PowerMap
+			powerMap := jy.GetBigVipUserBaseMsg("10000", u.Session(), config.Config.Etcd.Key, config.Config.Etcd.Key).PowerMap
 			for k, _ := range powerMap {
 				power = append(power, k)
 			}
@@ -657,12 +659,7 @@ type UserInfo struct {
 func (u *Use) IsAdd() {
 	r := func() Result {
 		//uRefer := u.Refer()
-		userid := qu.ObjToString(u.GetSession("userId"))
-		baseUserId := qu.Int64All(u.GetSession("base_user_id"))
-		entId := qu.Int64All(u.GetSession("entId"))
-		accountId := qu.Int64All(u.GetSession("accountId"))
 		var userInfo = &UserInfo{}
-
 		/*phone, _ := u.GetSession("phone").(string)
 		  entId := qu.IntAll(u.GetSession("entId"))
 		  if userid == "" {
@@ -787,7 +784,7 @@ 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", userid, baseUserId, accountId, entId, config.Config.Etcd.Key, config.Config.Etcd.Key)
+		bigPower := jy.GetBigVipUserBaseMsg("10000", u.Session(), config.Config.Etcd.Key, config.Config.Etcd.Key)
 		userInfo = &UserInfo{
 			BigMemberStatus: bigPower.Status,
 			Combo:           level_map[bigPower.Status],
@@ -848,9 +845,6 @@ func (u *Use) Aiused_history() {
 		if userid == "" {
 			return Result{Data: nil, Error_msg: "未登录"}
 		}
-		baseUserId := qu.Int64All(u.GetSession("base_user_id"))
-		entId := qu.Int64All(u.GetSession("entId"))
-		accountId := qu.Int64All(u.GetSession("accountId"))
 		isSub := true
 		mainid, _, member_status := util.MainUserId(userid, "", 0)
 		if mainid == userid {
@@ -858,7 +852,7 @@ func (u *Use) Aiused_history() {
 		}
 		//获取用户权限详情
 		power := []int{} //GetNewPower(userid)
-		bigPower := jy.GetBigVipUserBaseMsg("10000", userid, baseUserId, accountId, entId, config.Config.Etcd.Key, config.Config.Etcd.Key)
+		bigPower := jy.GetBigVipUserBaseMsg("10000", u.Session(), config.Config.Etcd.Key, config.Config.Etcd.Key)
 		for k, _ := range bigPower.PowerMap {
 			power = append(power, k)
 		}

+ 2 - 8
src/jfw/modules/publicapply/src/attachmentdow/service/service.go

@@ -31,14 +31,11 @@ func (u *Dow) SupplyInfoFileDownload() {
 	}
 	r := func() Result {
 		userid := qu.ObjToString(u.GetSession("userId"))
-		baseUserId := qu.Int64All(u.GetSession("base_user_id"))
-		entId := qu.Int64All(u.GetSession("entId"))
-		accountId := qu.Int64All(u.GetSession("accountId"))
 		if userid == "" {
 			return Result{Data: nil, Error_msg: "未登录"}
 		}
 
-		BaseMsg := jy.GetBigVipUserBaseMsg("10000", userid, baseUserId, accountId, entId, config.Config.Etcd.Hosts, config.Config.Etcd.Key)
+		BaseMsg := jy.GetBigVipUserBaseMsg("10000", u.Session(), config.Config.Etcd.Hosts, config.Config.Etcd.Key)
 		vipStatus := jy.GetVipState(db.Mysql, db.Mgo, userid)
 		isPower := false
 		//大会员下载权限判断
@@ -119,14 +116,11 @@ func (u *Dow) Subdow() {
 	}
 	r := func() Result {
 		userid := qu.ObjToString(u.GetSession("userId"))
-		baseUserId := qu.Int64All(u.GetSession("base_user_id"))
-		entId := qu.Int64All(u.GetSession("entId"))
-		accountId := qu.Int64All(u.GetSession("accountId"))
 		if userid == "" {
 			return Result{Data: nil, Error_msg: "未登录"}
 		}
 
-		BaseMsg := jy.GetBigVipUserBaseMsg("10000", userid, baseUserId, accountId, entId, config.Config.Etcd.Hosts, config.Config.Etcd.Key)
+		BaseMsg := jy.GetBigVipUserBaseMsg("10000", u.Session(), config.Config.Etcd.Hosts, config.Config.Etcd.Key)
 		vipStatus := jy.GetVipState(db.Mysql, db.Mgo, userid)
 
 		var (

+ 12 - 8
src/jfw/modules/publicapply/src/bidcollection/entity/entity.go

@@ -1,6 +1,7 @@
 package entity
 
 import (
+	"app.yhyue.com/moapp/jybase/go-xweb/httpsession"
 	"fmt"
 	"jy/src/jfw/modules/publicapply/src/config"
 	"jy/src/jfw/modules/publicapply/src/db"
@@ -173,12 +174,13 @@ type BidInfo struct {
 }
 
 //收藏招标信息(批量收藏)|取消收藏(批量取消)
-func BidCollOrRemByIds(bidAction BidAction, userid string, baseUserId, entId, accountId int64) map[string]interface{} {
+func BidCollOrRemByIds(bidAction BidAction, session *httpsession.Session) map[string]interface{} {
 	var i = 0
 	ok, msg := true, ""
+	userid := qu.ObjToString(session.Get("userId"))
 	insertValue := []interface{}{}
 	maxCount := config.BidCollConfig.FreeUserCollLimit
-	isPay, _ := Power(userid, baseUserId, entId, accountId)
+	isPay, _ := Power(session)
 	redisArr := []string{}
 	if isPay {
 		maxCount = config.BidCollConfig.PayUserCollLimit
@@ -251,7 +253,8 @@ type LabelInfo struct {
 }
 
 //新增标签(并使用)|删除标签 RV0=
-func LabelAction(labInfo *LabelInfo, userid string, baseUserId, entId, accountId int64) map[string]interface{} {
+func LabelAction(labInfo *LabelInfo, session *httpsession.Session) map[string]interface{} {
+	userid := qu.ObjToString(session.Get("userId"))
 	ibool, ok, msg := true, true, ""
 	redisArr := []string{}
 	if labInfo.Laction == "D" && labInfo.Lids != "" {
@@ -332,7 +335,7 @@ func LabelAction(labInfo *LabelInfo, userid string, baseUserId, entId, accountId
 				collMap[v] = true
 			}
 			maxCount := config.BidCollConfig.FreeUserCollLimit
-			isPay, _ := Power(userid, baseUserId, entId, accountId)
+			isPay, _ := Power(session)
 			if isPay {
 				maxCount = config.BidCollConfig.PayUserCollLimit
 			}
@@ -388,14 +391,15 @@ func LabelAction(labInfo *LabelInfo, userid string, baseUserId, entId, accountId
 	}
 }
 
-func GetCollList(c *util.CollList, userid string, baseUserId, entId, accountId int64) map[string]interface{} {
+func GetCollList(c *util.CollList, session *httpsession.Session) map[string]interface{} {
+	userid := qu.ObjToString(session.Get("userId"))
 	pagesize_max := config.BidCollConfig.Pagesize
 	rdata := map[string]interface{}{
 		"count":        0,
 		"haveNextPage": false,
 		"res":          []map[string]interface{}{},
 	}
-	isPay, _ := Power(userid, baseUserId, entId, accountId)
+	isPay, _ := Power(session)
 	if !isPay {
 		pagesize_max = config.BidCollConfig.FreePageSize
 	}
@@ -431,12 +435,12 @@ func GetCollList(c *util.CollList, userid string, baseUserId, entId, accountId i
 }
 
 //是否是付费用户 -bool: true:是 fasle:不是
-func Power(userid string, baseUserId, entId, accountId int64) (bool, map[string]interface{}) {
+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", userid, baseUserId, accountId, entId, config.Config.Etcd.Key, config.Config.Etcd.Key)
+	resp := jy.GetBigVipUserBaseMsg("10000", session, config.Config.Etcd.Key, config.Config.Etcd.Key)
 	if resp != nil {
 		if resp.VipStatus > 1 {
 			vipstatus = 1

+ 109 - 124
src/jfw/modules/publicapply/src/bidcollection/service/service.go

@@ -1,157 +1,142 @@
 package service
 
 import (
-        "encoding/json"
-        "jy/src/jfw/modules/publicapply/src/bidcollection/entity"
-        "jy/src/jfw/modules/publicapply/src/config"
-        "jy/src/jfw/modules/publicapply/src/util"
+	"encoding/json"
+	"jy/src/jfw/modules/publicapply/src/bidcollection/entity"
+	"jy/src/jfw/modules/publicapply/src/config"
+	"jy/src/jfw/modules/publicapply/src/util"
 
-        . "app.yhyue.com/moapp/jybase/api"
-        qu "app.yhyue.com/moapp/jybase/common"
+	. "app.yhyue.com/moapp/jybase/api"
+	qu "app.yhyue.com/moapp/jybase/common"
 )
 
 //招标信息是否被收藏
 func (this *ServiceStruct) IsCollAction() {
-        userId, _ := this.GetSession("userId").(string)
-        defer qu.Catch()
-        r := func() Result {
-                if this.Method() != "POST" {
-                        return Result{Data: nil, Error_msg: Error_msg_1005}
-                }
-                if this.GetString("bids") == "" {
-                        return Result{Data: nil, Error_msg: Error_msg_1003}
-                }
-                if this.GetString("label") != "" {
-                        return Result{Data: entity.IsCollByBidsBackInfo(this.GetString("bids"), userId)}
-                }
-                return Result{Data: entity.IsCollByBids(this.GetString("bids"), userId)}
-        }()
-        this.ServeJson(r)
+	userId, _ := this.GetSession("userId").(string)
+	defer qu.Catch()
+	r := func() Result {
+		if this.Method() != "POST" {
+			return Result{Data: nil, Error_msg: Error_msg_1005}
+		}
+		if this.GetString("bids") == "" {
+			return Result{Data: nil, Error_msg: Error_msg_1003}
+		}
+		if this.GetString("label") != "" {
+			return Result{Data: entity.IsCollByBidsBackInfo(this.GetString("bids"), userId)}
+		}
+		return Result{Data: entity.IsCollByBids(this.GetString("bids"), userId)}
+	}()
+	this.ServeJson(r)
 }
 
 //获取标签
 func (this *ServiceStruct) GetLabelAction() {
-        userId, _ := this.GetSession("userId").(string)
-        defer qu.Catch()
-        r := func() Result {
-                if this.Method() != "POST" {
-                        return Result{Data: nil, Error_msg: Error_msg_1005}
-                }
-                return Result{Data: entity.GetLabelByUser(userId)}
-        }()
-        this.ServeJson(r)
+	userId, _ := this.GetSession("userId").(string)
+	defer qu.Catch()
+	r := func() Result {
+		if this.Method() != "POST" {
+			return Result{Data: nil, Error_msg: Error_msg_1005}
+		}
+		return Result{Data: entity.GetLabelByUser(userId)}
+	}()
+	this.ServeJson(r)
 }
 
 //招标信息收藏|移除收藏
 func (this *ServiceStruct) BCAction() {
-        userId, _ := this.GetSession("userId").(string)
-        baseUserId := qu.Int64All(this.GetSession("base_user_id"))
-        entId := qu.Int64All(this.GetSession("entId"))
-        accountId := qu.Int64All(this.GetSession("accountId"))
-        defer qu.Catch()
-        r := func() Result {
-                if this.Method() != "POST" {
-                        return Result{Data: nil, Error_msg: Error_msg_1005}
-                }
-                bidAction := new(entity.BidAction)
-                if string(this.Body()) == "" {
-                        return Result{Data: nil, Error_msg: Error_msg_1003}
-                }
-                //接收参数
-                json.Unmarshal(this.Body(), &bidAction)
-                if len((*bidAction).Binfo) == 0 {
-                        return Result{Data: nil, Error_msg: Error_msg_1002}
-                }
-                m := entity.BidCollOrRemByIds(*bidAction, userId, baseUserId, entId, accountId)
-                return Result{Data: m["status"], Error_msg: qu.ObjToString(m["msg"])}
-        }()
-        this.ServeJson(r)
+	defer qu.Catch()
+	r := func() Result {
+		if this.Method() != "POST" {
+			return Result{Data: nil, Error_msg: Error_msg_1005}
+		}
+		bidAction := new(entity.BidAction)
+		if string(this.Body()) == "" {
+			return Result{Data: nil, Error_msg: Error_msg_1003}
+		}
+		//接收参数
+		json.Unmarshal(this.Body(), &bidAction)
+		if len((*bidAction).Binfo) == 0 {
+			return Result{Data: nil, Error_msg: Error_msg_1002}
+		}
+		m := entity.BidCollOrRemByIds(*bidAction, this.Session())
+		return Result{Data: m["status"], Error_msg: qu.ObjToString(m["msg"])}
+	}()
+	this.ServeJson(r)
 }
 
 //添加或绑定标签|删除标签
 func (this *ServiceStruct) LabelAction() {
-        userId, _ := this.GetSession("userId").(string)
-        baseUserId := qu.Int64All(this.GetSession("base_user_id"))
-        entId := qu.Int64All(this.GetSession("entId"))
-        accountId := qu.Int64All(this.GetSession("accountId"))
-        defer qu.Catch()
-        r := func() Result {
-                if this.Method() != "POST" {
-                        return Result{Data: nil, Error_msg: Error_msg_1005}
-                }
-                labelInfo := new(entity.LabelInfo)
-                if string(this.Body()) == "" {
-                        return Result{Data: nil, Error_msg: Error_msg_1003}
-                }
-                //接收参数
-                json.Unmarshal(this.Body(), &labelInfo)
-                if len(labelInfo.Binfo) == 0 && labelInfo.Lids == "" && labelInfo.Lname == "" {
-                        return Result{Data: nil, Error_msg: Error_msg_1002}
-                }
-                m := entity.LabelAction(labelInfo, userId, baseUserId, entId, accountId)
-                return Result{Data: m["status"], Error_msg: qu.ObjToString(m["msg"])}
-        }()
-        this.ServeJson(r)
+	defer qu.Catch()
+	r := func() Result {
+		if this.Method() != "POST" {
+			return Result{Data: nil, Error_msg: Error_msg_1005}
+		}
+		labelInfo := new(entity.LabelInfo)
+		if string(this.Body()) == "" {
+			return Result{Data: nil, Error_msg: Error_msg_1003}
+		}
+		//接收参数
+		json.Unmarshal(this.Body(), &labelInfo)
+		if len(labelInfo.Binfo) == 0 && labelInfo.Lids == "" && labelInfo.Lname == "" {
+			return Result{Data: nil, Error_msg: Error_msg_1002}
+		}
+		m := entity.LabelAction(labelInfo, this.Session())
+		return Result{Data: m["status"], Error_msg: qu.ObjToString(m["msg"])}
+	}()
+	this.ServeJson(r)
 }
 
 //收藏列表
 func (this *ServiceStruct) CollList() {
-        userId, _ := this.GetSession("userId").(string)
-        baseUserId := qu.Int64All(this.GetSession("base_user_id"))
-        entId := qu.Int64All(this.GetSession("entId"))
-        accountId := qu.Int64All(this.GetSession("accountId"))
-        defer qu.Catch()
-        r := func() Result {
-                if this.Method() != "POST" {
-                        return Result{Data: nil, Error_msg: Error_msg_1005}
-                }
-                collList := new(util.CollList)
-                if string(this.Body()) == "" {
-                        return Result{Data: nil, Error_msg: Error_msg_1003}
-                }
-                //接收参数
-                if err := json.Unmarshal(this.Body(), &collList); err != nil {
-                        return Result{Data: nil, Error_msg: Error_msg_1003}
-                }
-                //
-                return Result{Data: entity.GetCollList(collList, userId, baseUserId, entId, accountId)}
-        }()
-        this.ServeJson(r)
+	defer qu.Catch()
+	r := func() Result {
+		if this.Method() != "POST" {
+			return Result{Data: nil, Error_msg: Error_msg_1005}
+		}
+		collList := new(util.CollList)
+		if string(this.Body()) == "" {
+			return Result{Data: nil, Error_msg: Error_msg_1003}
+		}
+		//接收参数
+		if err := json.Unmarshal(this.Body(), &collList); err != nil {
+			return Result{Data: nil, Error_msg: Error_msg_1003}
+		}
+		//
+		return Result{Data: entity.GetCollList(collList, this.Session())}
+	}()
+	this.ServeJson(r)
 }
 
 //新增标签
 func (this *ServiceStruct) AddLabel() {
-        userId, _ := this.GetSession("userId").(string)
-        defer qu.Catch()
-        r := func() Result {
-                if this.Method() != "POST" {
-                        return Result{Data: nil, Error_msg: Error_msg_1005}
-                }
-                if this.GetString("name") == "" {
-                        return Result{Data: nil, Error_msg: Error_msg_1003}
-                }
-                rdata := entity.AddLab(this.GetString("name"), userId)
-                return Result{Data: rdata["labid"], Error_msg: qu.ObjToString(rdata["msg"])}
-        }()
-        this.ServeJson(r)
+	userId, _ := this.GetSession("userId").(string)
+	defer qu.Catch()
+	r := func() Result {
+		if this.Method() != "POST" {
+			return Result{Data: nil, Error_msg: Error_msg_1005}
+		}
+		if this.GetString("name") == "" {
+			return Result{Data: nil, Error_msg: Error_msg_1003}
+		}
+		rdata := entity.AddLab(this.GetString("name"), userId)
+		return Result{Data: rdata["labid"], Error_msg: qu.ObjToString(rdata["msg"])}
+	}()
+	this.ServeJson(r)
 }
 
 //是否有权限(超级订阅、商机管理、大会员)
 func (this *ServiceStruct) Power() {
-        defer qu.Catch()
-        userId, _ := this.GetSession("userId").(string)
-        entId := qu.Int64All(this.GetSession("entId"))
-        baseUserId := qu.Int64All(this.GetSession("base_user_id"))
-        accountId := qu.Int64All(this.GetSession("accountId"))
-        r := func() Result {
-                m, msg := map[string]interface{}{}, ""
-                if userId != "" {
-                        _, m = entity.Power(userId, baseUserId, entId, accountId)
-                        registedate, _ := m["registedate"].(int64)
-                        m["isOld"] = registedate != 0 && registedate < config.Config.BidSearchOldUserLimit
-                        delete(m, "registedate")
-                }
-                return Result{Data: m, Error_msg: msg}
-        }()
-        this.ServeJson(r)
+	defer qu.Catch()
+	userId, _ := this.GetSession("userId").(string)
+	r := func() Result {
+		m, msg := map[string]interface{}{}, ""
+		if userId != "" {
+			_, m = entity.Power(this.Session())
+			registedate, _ := m["registedate"].(int64)
+			m["isOld"] = registedate != 0 && registedate < config.Config.BidSearchOldUserLimit
+			delete(m, "registedate")
+		}
+		return Result{Data: m, Error_msg: msg}
+	}()
+	this.ServeJson(r)
 }

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

@@ -1,6 +1,7 @@
 package entity
 
 import (
+	"app.yhyue.com/moapp/jybase/go-xweb/httpsession"
 	"fmt"
 	"jy/src/jfw/modules/publicapply/src/config"
 	"jy/src/jfw/modules/publicapply/src/db"
@@ -16,14 +17,13 @@ import (
 )
 
 type CustomerOperation struct {
-	UserId     string `json:"userId"`
-	EntId      int    `json:"entId"`
-	Name       string `json:"name"`
-	Province   string `json:"province"`
-	City       string `json:"city"`
-	B          bool   `json:"b"` //true 取关;默认 false 关注。
-	BaseUserId int64
-	AccountId  int64
+	UserId   string `json:"userId"`
+	EntId    int    `json:"entId"`
+	Name     string `json:"name"`
+	Province string `json:"province"`
+	City     string `json:"city"`
+	B        bool   `json:"b"` //true 取关;默认 false 关注。
+	Session  *httpsession.Session
 }
 
 func NewCustomerOperation() CustomerOperation {
@@ -96,7 +96,7 @@ func (this *CustomerOperation) CList(pageSize, pageNo, entUserId int, keyword, i
 	}
 
 	//大会员客户关注上限
-	BigMsg := jy.GetBigVipUserBaseMsg("10000", this.UserId, this.BaseUserId, this.AccountId, qu.Int64All(this.EntId), config.Config.Etcd.Hosts, config.Config.Etcd.Key)
+	BigMsg := jy.GetBigVipUserBaseMsg("10000", this.Session, config.Config.Etcd.Hosts, config.Config.Etcd.Key)
 	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.UserId, this.BaseUserId, this.AccountId, qu.Int64All(this.EntId), config.Config.Etcd.Hosts, config.Config.Etcd.Key); userPower.Status > 0 {
+		if userPower := jy.GetBigVipUserBaseMsg("10000", this.Session, config.Config.Etcd.Hosts, config.Config.Etcd.Key); userPower.Status > 0 {
 			count := redis.GetInt(redisName, fmt.Sprintf(redisCountKey, this.UserId))
 			if count < 1 {
 				query := map[string]interface{}{

+ 2 - 8
src/jfw/modules/publicapply/src/customer/service/service.go

@@ -57,9 +57,7 @@ func (this *ServiceStruct) Exclude() {
 // 关注客户列表
 func (this *ServiceStruct) CstList() {
 	userId, _ := this.GetSession("userId").(string)
-	baseUserId := qu.Int64All(this.GetSession("base_user_id"))
 	entId := qu.IntAll(this.GetSession("entId"))
-	accountId := qu.Int64All(this.GetSession("accountId"))
 	defer qu.Catch()
 	r := func() Result {
 		if this.Method() != "POST" {
@@ -67,8 +65,7 @@ func (this *ServiceStruct) CstList() {
 		}
 		cotion := entity.NewCustomerOperation()
 		cotion.UserId = userId
-		cotion.AccountId = accountId
-		cotion.BaseUserId = baseUserId
+		cotion.Session = this.Session()
 		cotion.EntId = entId
 		entUserId := qu.IntAll(this.GetSession("entUserId")) //获取企业id
 		pageSize, _ := this.GetInteger("pagesize")
@@ -92,9 +89,7 @@ func (this *ServiceStruct) CstList() {
 // 关注or取关客户
 func (this *ServiceStruct) CstAtt() {
 	userId, _ := this.GetSession("userId").(string)
-	baseUserId := qu.Int64All(this.GetSession("base_user_id"))
 	entId := qu.IntAll(this.GetSession("entId"))
-	accountId := qu.Int64All(this.GetSession("accountId"))
 	defer qu.Catch()
 	r := func() Result {
 		if this.Method() != "POST" {
@@ -112,8 +107,7 @@ func (this *ServiceStruct) CstAtt() {
 		cotion.UserId = userId
 		cotion.EntId = entId
 		cotion.UserId = userId
-		cotion.AccountId = accountId
-		cotion.BaseUserId = baseUserId
+		cotion.Session = this.Session()
 		msg := cotion.CheckPower()
 		if !cotion.B && msg != "" {
 			return Result{Data: false, Error_msg: msg}

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

@@ -19,9 +19,6 @@ type EnterpriseSearchAction struct {
 // DoEntSearch 企业搜索
 func (esa *EnterpriseSearchAction) DoEntSearch() {
 	userId, _ := esa.GetSession("userId").(string)
-	baseUserId := qutil.Int64All(esa.GetSession("base_user_id"))
-	entId := qutil.Int64All(esa.GetSession("entId"))
-	accountId := qutil.Int64All(esa.GetSession("accountId"))
 	rData, errMsg := func() (interface{}, error) {
 		entSearch, err := (&entity.EnterpriseSearch{
 			Match:       esa.GetString("match"),
@@ -42,7 +39,7 @@ func (esa *EnterpriseSearchAction) DoEntSearch() {
 			return nil, err
 		}
 		//查询是否是会员
-		if vipData := jy.GetBigVipUserBaseMsg("10000", userId, baseUserId, accountId, entId, config.Config.Etcd.Hosts, config.Config.Etcd.Key); vipData.Status > 0 || vipData.VipStatus > 0 {
+		if vipData := jy.GetBigVipUserBaseMsg("10000", esa.Session(), config.Config.Etcd.Hosts, config.Config.Etcd.Key); vipData.Status > 0 || vipData.VipStatus > 0 {
 			entSearch.IsVip = true
 		}
 		//查询

+ 14 - 13
src/jfw/modules/publicapply/src/go.mod

@@ -3,16 +3,18 @@ module jy/src/jfw/modules/publicapply/src
 go 1.18
 
 require (
-	app.yhyue.com/moapp/jybase v0.0.0-20221229074840-790b25997170
-	app.yhyue.com/moapp/jypkg v0.0.0-20230106055658-e5f85a4ffd9c
+	app.yhyue.com/moapp/jybase v0.0.0-20230109053435-fe962d69e751
+	app.yhyue.com/moapp/jypkg v0.0.0-20230110033557-004ea51c1d18
+	bp.jydev.jianyu360.cn/BaseService/userCenter v0.0.0-20230109023014-2cd2a0b9b979
 	github.com/SKatiyar/qr v0.0.0-20151201054752-25b6bdf44e67
 	github.com/gogf/gf/v2 v2.0.6
+	github.com/zeromicro/go-zero v1.4.3
 	go.mongodb.org/mongo-driver v1.11.1
 )
 
 require (
 	app.yhyue.com/moapp/esv1 v0.0.0-20220414031211-3da4123e648d // indirect
-	app.yhyue.com/moapp/message v0.0.0-20221202072401-d825fc65512c // indirect
+	app.yhyue.com/moapp/message v0.0.0-20221223100203-6402e389d9ae // indirect
 	bp.jydev.jianyu360.cn/BaseService/powerCheckCenter v0.0.0-20230106052936-bd3ab7edf7a4 // indirect
 	github.com/BurntSushi/toml v0.4.1 // indirect
 	github.com/beorn7/perks v1.0.1 // indirect
@@ -76,18 +78,17 @@ require (
 	github.com/xdg-go/scram v1.1.1 // indirect
 	github.com/xdg-go/stringprep v1.0.3 // indirect
 	github.com/youmark/pkcs8 v0.0.0-20181117223130-1be2e3e5546d // indirect
-	github.com/zeromicro/go-zero v1.4.3 // indirect
 	go.etcd.io/etcd/api/v3 v3.5.5 // indirect
 	go.etcd.io/etcd/client/pkg/v3 v3.5.5 // indirect
 	go.etcd.io/etcd/client/v3 v3.5.5 // indirect
-	go.opentelemetry.io/otel v1.10.0 // indirect
-	go.opentelemetry.io/otel/exporters/jaeger v1.10.0 // indirect
-	go.opentelemetry.io/otel/exporters/otlp/internal/retry v1.10.0 // indirect
-	go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.10.0 // indirect
-	go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.10.0 // indirect
-	go.opentelemetry.io/otel/exporters/zipkin v1.10.0 // indirect
-	go.opentelemetry.io/otel/sdk v1.10.0 // indirect
-	go.opentelemetry.io/otel/trace v1.10.0 // indirect
+	go.opentelemetry.io/otel v1.11.0 // indirect
+	go.opentelemetry.io/otel/exporters/jaeger v1.11.0 // indirect
+	go.opentelemetry.io/otel/exporters/otlp/internal/retry v1.11.0 // indirect
+	go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.11.0 // indirect
+	go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.11.0 // indirect
+	go.opentelemetry.io/otel/exporters/zipkin v1.11.0 // indirect
+	go.opentelemetry.io/otel/sdk v1.11.0 // indirect
+	go.opentelemetry.io/otel/trace v1.11.0 // indirect
 	go.opentelemetry.io/proto/otlp v0.19.0 // indirect
 	go.uber.org/atomic v1.9.0 // indirect
 	go.uber.org/automaxprocs v1.5.1 // indirect
@@ -97,7 +98,7 @@ require (
 	golang.org/x/net v0.0.0-20221014081412-f15817d10f9b // indirect
 	golang.org/x/oauth2 v0.0.0-20221014153046-6fdb5e3db783 // indirect
 	golang.org/x/sync v0.1.0 // indirect
-	golang.org/x/sys v0.0.0-20220728004956-3c1f35247d10 // indirect
+	golang.org/x/sys v0.0.0-20220919091848-fb04ddd9f9c8 // indirect
 	golang.org/x/term v0.0.0-20210927222741-03fcf44c2211 // indirect
 	golang.org/x/text v0.4.0 // indirect
 	golang.org/x/time v0.3.0 // indirect

+ 121 - 15
src/jfw/modules/publicapply/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-20221229074840-790b25997170 h1:gjx6+x7P1Vp/++OyfuEdR3Bcjj4/HrgIaRnE1cMTP3k=
-app.yhyue.com/moapp/jybase v0.0.0-20221229074840-790b25997170/go.mod h1:efAeRPDpJ13JuNODuqtfLlKQSQgCbnUcwGPzhFU5krY=
-app.yhyue.com/moapp/jypkg v0.0.0-20230106055658-e5f85a4ffd9c h1:3tmWsZPTkhmkPJ1fbDLqrklgnooC1DRNwsjxEoMYbwg=
-app.yhyue.com/moapp/jypkg v0.0.0-20230106055658-e5f85a4ffd9c/go.mod h1:7D6zNxrg+Tma3VC43TLu7XPczubl4uJavua89kaFS1Q=
-app.yhyue.com/moapp/message v0.0.0-20221202072401-d825fc65512c h1:CrcvbsXZ4aQkNikBi7FUUQZNnY8hKsNo2LLe/SqeXs8=
-app.yhyue.com/moapp/message v0.0.0-20221202072401-d825fc65512c/go.mod h1:b0zZHev3gmJao1Fo+2Z2KPVjsuLOJVvVxf+kCnu9WkA=
+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-20230109053435-fe962d69e751 h1:Z3Ye/xauzer3FymqIElv9/iEIfDOUkQBfnQPcKthoSc=
+app.yhyue.com/moapp/jybase v0.0.0-20230109053435-fe962d69e751/go.mod h1:zB47XTeJvpcbtBRYgkQuxOICWNexiZfbUO+7aUf6mNs=
+app.yhyue.com/moapp/jypkg v0.0.0-20230110033557-004ea51c1d18 h1:VEImnN1BTIOgjEwUUvqatGqz9/CUoLPumMfRvrbgAEY=
+app.yhyue.com/moapp/jypkg v0.0.0-20230110033557-004ea51c1d18/go.mod h1:n2XBXZGvxUuc4AZMeMYUZuK7ayrwDQ7UdrZd6AJkUVM=
+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-20230106052936-bd3ab7edf7a4 h1:Xv1D9avDKeaM5kQTisF/pIt8y7B7yQ/hAxuWEg75LMs=
 bp.jydev.jianyu360.cn/BaseService/powerCheckCenter v0.0.0-20230106052936-bd3ab7edf7a4/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-20230109023014-2cd2a0b9b979 h1:hC97JNmBonTAsnDH4XMWLXVqWdo85tCo0ge04cy0e4E=
+bp.jydev.jianyu360.cn/BaseService/userCenter v0.0.0-20230109023014-2cd2a0b9b979/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,10 +397,15 @@ 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=
@@ -385,6 +413,7 @@ 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=
@@ -392,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=
@@ -409,9 +439,12 @@ 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 h1:jR6wZggBxwWygeXcdNyguCOCIjPsZyNUNlAkTx2fu0U=
 github.com/alicebob/miniredis/v2 v2.23.1/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=
@@ -420,6 +453,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=
@@ -470,9 +504,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=
@@ -494,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=
@@ -511,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=
@@ -528,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=
@@ -539,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=
@@ -594,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=
@@ -702,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=
@@ -753,11 +803,14 @@ 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/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=
@@ -798,11 +851,14 @@ 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=
@@ -818,6 +874,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=
@@ -833,6 +890,7 @@ github.com/mattn/go-runewidth v0.0.13 h1:lTGmDsbAYt5DmK6OnoV7EuIF1wEIFAcxld6ypU4
 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=
@@ -854,6 +912,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=
@@ -869,6 +928,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=
@@ -878,6 +938,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=
@@ -886,6 +947,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=
@@ -931,6 +993,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=
@@ -957,6 +1020,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=
@@ -986,6 +1050,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=
@@ -1035,27 +1100,34 @@ 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 h1:sTQ++6fxQHJnpGCN7h2CUrhWmbvhBqEgE75cJl635SM=
 github.com/zeromicro/go-zero v1.4.3/go.mod h1:UmDjuW7LHd9j7+nnnPBcXF0HLNmjJw6OjHPTlSp7X7Y=
 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=
@@ -1070,31 +1142,46 @@ 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.10.0 h1:Y7DTJMR6zs1xkS/upamJYk0SxxN4C9AqRd77jmZnyY4=
+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.10.0 h1:7W3aVVjEYayu/GOqOVF4mbTvnCuxF1wWu3eRxFGQXvw=
+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/otlp/internal/retry v1.10.0 h1:TaB+1rQhddO1sF71MpZOZAuSPW1klK2M8XxfrBMfK7Y=
+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=
 go.opentelemetry.io/otel/exporters/otlp/internal/retry v1.10.0/go.mod h1:78XhIg8Ht9vR4tbLNUhXsiOnE2HOuSeKAiAcoVQEpOY=
-go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.10.0 h1:pDDYmo0QadUPal5fwXoY1pmMpFcdyhXOmL5drCrI3vU=
+go.opentelemetry.io/otel/exporters/otlp/internal/retry v1.11.0 h1:0dly5et1i/6Th3WHn0M6kYiJfFNzhhxanrJ0bOfnjEo=
+go.opentelemetry.io/otel/exporters/otlp/internal/retry v1.11.0/go.mod h1:+Lq4/WkdCkjbGcBMVHHg2apTbv8oMBf29QCnyCCJjNQ=
 go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.10.0/go.mod h1:Krqnjl22jUJ0HgMzw5eveuCvFDXY4nSYb4F8t5gdrag=
-go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.10.0 h1:KtiUEhQmj/Pa874bVYKGNVdq8NPKiacPbaRRtgXi+t4=
+go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.11.0 h1:eyJ6njZmH16h9dOKCi7lMswAnGsSOwgTqWzfxqcuNr8=
+go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.11.0/go.mod h1:FnDp7XemjN3oZ3xGunnfOUTVwd2XcvLbtRAuOSU3oc8=
 go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.10.0/go.mod h1:OfUCyyIiDvNXHWpcWgbF+MWvqPZiNa3YDEnivcnYsV0=
+go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.11.0 h1:j2RFV0Qdt38XQ2Jvi4WIsQ56w8T7eSirYbMw19VXRDg=
+go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.11.0/go.mod h1:pILgiTEtrqvZpoiuGdblDgS5dbIaTgDrkIuKfEFkt+A=
+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.10.0 h1:HcPAFsFpEBKF+G5NIOA+gBsxifd3Ej+wb+KsdBLa15E=
+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.10.0 h1:jZ6K7sVn04kk/3DNUdJ4mqRlGDiXAVuIG+MMENpTNdY=
+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=
 go.opentelemetry.io/otel/trace v1.0.0/go.mod h1:PXTWqayeFUlJV1YDNhsJYB184+IvAH814St6o6ajzIs=
 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.10.0 h1:npQMbR8o7mum8uF95yFbOEJffhs1sbCOfDh8zAJiH5E=
+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=
 go.opentelemetry.io/proto/otlp v0.7.0/go.mod h1:PqfVotwruBrMGOCsRd/89rSnXhoiJIqeYNgFYFoEGnI=
 go.opentelemetry.io/proto/otlp v0.19.0 h1:IVN6GR+mhC4s5yfcTbmzHYODqvWAp3ZedA2SJPI1Nnw=
 go.opentelemetry.io/proto/otlp v0.19.0/go.mod h1:H7XAot3MsfNsj7EXtrA2q5xSNQ10UqI405h3+duxN4U=
@@ -1125,8 +1212,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=
@@ -1173,6 +1262,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=
@@ -1298,6 +1388,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=
@@ -1330,6 +1421,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=
@@ -1373,8 +1465,9 @@ golang.org/x/sys v0.0.0-20220610221304-9f5ed59c137d/go.mod h1:oPkhp1MJrh7nUepCBc
 golang.org/x/sys v0.0.0-20220615213510-4f61da869c0c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
 golang.org/x/sys v0.0.0-20220624220833-87e55d714810/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
 golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
-golang.org/x/sys v0.0.0-20220728004956-3c1f35247d10 h1:WIoqL4EROvwiPdUtaip4VcDdpZ4kha7wBWZrbVKCIZg=
 golang.org/x/sys v0.0.0-20220728004956-3c1f35247d10/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
+golang.org/x/sys v0.0.0-20220919091848-fb04ddd9f9c8 h1:h+EGohizhe9XlX18rfpa8k8RAc5XyaeamM+0VHRd4lc=
+golang.org/x/sys v0.0.0-20220919091848-fb04ddd9f9c8/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
 golang.org/x/term v0.0.0-20201117132131-f5c789dd3221/go.mod h1:Nr5EML6q2oocZ2LXRh80K7BxOlk5/8JxuGnuhpl+muw=
 golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
 golang.org/x/term v0.0.0-20210220032956-6a3ed077a48d/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
@@ -1397,7 +1490,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 +1513,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 +1543,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 +1795,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 +1852,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 +1879,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=

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

@@ -2,6 +2,7 @@ package entity
 
 import (
 	qutil "app.yhyue.com/moapp/jybase/common"
+	"app.yhyue.com/moapp/jybase/go-xweb/httpsession"
 	"app.yhyue.com/moapp/jypkg/common/src/qfw/util/jy"
 	"fmt"
 	"jy/src/jfw/modules/publicapply/src/config"
@@ -30,12 +31,11 @@ type KeyWordsSet struct {
 	Power         int
 	EntId         int
 	EntUserId     int
-	BaseUserId    int64
-	AccountId     int64
+	Session       *httpsession.Session
 }
 
 func (this *KeyWordsSet) UpdateKeyWords() map[string]interface{} {
-	power := jy.GetBigVipUserBaseMsg("10000", this.UserId, this.BaseUserId, this.AccountId, qutil.Int64All(this.EntId), config.Config.Etcd.Hosts, config.Config.Etcd.Key)
+	power := jy.GetBigVipUserBaseMsg("10000", this.Session, config.Config.Etcd.Hosts, config.Config.Etcd.Key)
 	if this.Type == "m" && power.Status < 0 {
 		return map[string]interface{}{"flag": false, "msg": "暂无权限"}
 	}
@@ -49,33 +49,34 @@ func (this *KeyWordsSet) UpdateKeyWords() map[string]interface{} {
 	if this.Type != "f" && (power.Status > 0 || power.VipStatus > 0) {
 		switch this.ActionType {
 		case "SK": //保存/修改关键词
-			return AddKeyWords(types, this.UserId, this.ClassifyIndex, this.ClassifyName, this.KeyWordIndex, this.KeyWordName, this.KeyWordsCount, this.NotKeyWord, this.AppendKeyWord, this.MatchWay, this.Power, this.EntUserId, this.EntId)
+			return AddKeyWords(types, this.UserId, this.ClassifyIndex, this.ClassifyName, this.KeyWordIndex, this.KeyWordName, this.KeyWordsCount, this.NotKeyWord, this.AppendKeyWord, this.MatchWay, this.Power, this.Session)
 		case "DK": //删除关键词
-			return DeleteKeyWords(types, this.DeleteKey, this.UserId, this.Power, this.EntUserId, this.EntId)
+			return DeleteKeyWords(types, this.DeleteKey, this.UserId, this.Power, this.Session)
 		case "SC": //保存/修改分类
-			return AddClass(types, this.ClassifyIndex, this.ClassifyName, this.UserId, this.Power, this.EntUserId, this.EntId)
+			return AddClass(types, this.ClassifyIndex, this.ClassifyName, this.UserId, this.Power, this.Session)
 		case "DC": //删除分类
-			return DeleteClass(types, this.ClassifyIndex, this.UserId, this.Power, this.EntUserId, this.EntId)
+			return DeleteClass(types, this.ClassifyIndex, this.UserId, this.Power, this.Session)
 		case "directSubKWS": //搜索列表直接订阅关键词
-			return directSubKWS(types, this.KeyWordName, this.UserId, this.Power, this.EntUserId, this.EntId)
+			return directSubKWS(types, this.KeyWordName, this.UserId, this.Power, this.Session)
 		}
 	} else {
 		this.ClassifyIndex = "0"
 		this.ClassifyName = "未分类"
 		switch this.ActionType {
 		case "SK": //保存/修改关键词
-			return AddKeyWordsFree(types, this.UserId, this.ClassifyIndex, this.ClassifyName, this.KeyWordIndex, this.KeyWordName, this.KeyWordsCount, this.NotKeyWord, this.AppendKeyWord, this.MatchWay)
+			return AddKeyWordsFree(types, this.UserId, this.ClassifyIndex, this.ClassifyName, this.KeyWordIndex, this.KeyWordName, this.KeyWordsCount, this.NotKeyWord, this.AppendKeyWord, this.MatchWay, this.Session)
 		case "DK": //删除关键词
-			return DeleteKeyWordsFree(types, this.DeleteKey, this.UserId)
+			return DeleteKeyWordsFree(types, this.DeleteKey, this.Session)
 		case "directSubKWS": //搜索列表直接订阅关键词
-			return directSubKWSFree(types, this.KeyWordName, this.UserId)
+			return directSubKWSFree(types, this.KeyWordName, this.Session)
 		}
 	}
 	return map[string]interface{}{"flag": true, "msg": ""}
 }
 
 //
-func directSubKWSFree(updateItems string, keys string, userId string) map[string]interface{} {
+func directSubKWSFree(updateItems string, keys string, session *httpsession.Session) map[string]interface{} {
+	userId := qutil.ObjToString(session.Get("userId"))
 	data, ok := db.Mgo.FindById("user", userId, fmt.Sprintf(`{"%s":1}`, updateItems))
 	var repleat = false
 	var kwsCount = 0
@@ -154,9 +155,10 @@ func directSubKWSFree(updateItems string, keys string, userId string) map[string
 }
 
 //免费用户删除关键词
-func DeleteKeyWordsFree(types, deletekey, userId string) map[string]interface{} {
+func DeleteKeyWordsFree(types, deletekey string, session *httpsession.Session) map[string]interface{} {
 	//免费用户只有一个分类
 	var index = "0"
+	userId := qutil.ObjToString(session.Get("userId"))
 	dMap, err := util.JsonToMap(deletekey)
 	newMap, saveData := []interface{}{}, map[string]interface{}{}
 	if err == nil && len(dMap) > 0 {
@@ -181,13 +183,13 @@ func DeleteKeyWordsFree(types, deletekey, userId string) map[string]interface{}
 		flag = db.Mgo.UpdateById("user", userId, map[string]interface{}{
 			"$set": saveData,
 		})
-		SetLog(userId, types, 0, 0, 0)
+		SetLog(userId, types, 0, session)
 	}
 	return map[string]interface{}{"flag": flag, "msg": ""}
 }
 
 //免费用户修改 保存关键词
-func AddKeyWordsFree(types, userId, classIndex, className, keywordsIndex, keywordName, keywordCount string, notKeyword, appendKeyword []string, matchWay int) map[string]interface{} {
+func AddKeyWordsFree(types, userId, classIndex, className, keywordsIndex, keywordName, keywordCount string, notKeyword, appendKeyword []string, matchWay int, session *httpsession.Session) map[string]interface{} {
 	flag := true
 	data, ok := db.Mgo.FindById("user", userId, `{"`+types+`":1}`)
 	saveData := map[string]interface{}{}
@@ -253,13 +255,13 @@ func AddKeyWordsFree(types, userId, classIndex, className, keywordsIndex, keywor
 			//清楚缓存
 			jy.ClearBigVipUserPower(userId)
 		}
-		SetLog(userId, types, 0, 0, 0)
+		SetLog(userId, types, 0, session)
 	}
 	return map[string]interface{}{"flag": flag, "msg": ""}
 }
 
 //保存/修改关键词
-func AddKeyWords(types, userId, classIndex, className, keywordsIndex, keywordName, keywordCount string, notKeyword, appendKeyword []string, matchWay int, power, entUserId, entId int) map[string]interface{} {
+func AddKeyWords(types, userId, classIndex, className, keywordsIndex, keywordName, keywordCount string, notKeyword, appendKeyword []string, matchWay int, power int, session *httpsession.Session) map[string]interface{} {
 	flag := true
 	if power != 1 {
 		//个人版
@@ -326,15 +328,15 @@ func AddKeyWords(types, userId, classIndex, className, keywordsIndex, keywordNam
 			flag = db.Mgo.UpdateById("user", userId, map[string]interface{}{
 				"$set": saveData,
 			})
-			SetLog(userId, types, power, entUserId, entId)
+			SetLog(userId, types, power, session)
 		}
 	} else {
 		//企业个人版
 		//先查看有没有关键词
 		types := "o_entniche"
 		query := map[string]interface{}{
-			"i_userid": entUserId,
-			"i_entid":  entId,
+			"i_userid": qutil.IntAll(session.Get("entUserId")),
+			"i_entid":  qutil.IntAll(session.Get("entId")),
 			"i_type":   1,
 		}
 		data, ok := db.Mgo.Find("entniche_rule", query, `{"`+types+`.a_items":1}`, nil, false, -1, -1)
@@ -406,14 +408,14 @@ func AddKeyWords(types, userId, classIndex, className, keywordsIndex, keywordNam
 		flag = db.Mgo.Update("entniche_rule", query, map[string]interface{}{
 			"$set": saveData,
 		}, true, false)
-		SetLog(userId, types, power, entUserId, entId)
+		SetLog(userId, types, power, session)
 	}
 
 	return map[string]interface{}{"flag": flag, "msg": ""}
 }
 
 //删除关键词可以批量
-func DeleteKeyWords(types, deletekey, userId string, power, entUserId, entId int) map[string]interface{} {
+func DeleteKeyWords(types, deletekey, userId string, power int, session *httpsession.Session) map[string]interface{} {
 	flag := true
 	if power != 1 {
 		dMap, err := util.JsonToMap(deletekey)
@@ -455,15 +457,15 @@ func DeleteKeyWords(types, deletekey, userId string, power, entUserId, entId int
 			flag = db.Mgo.UpdateById("user", userId, map[string]interface{}{
 				"$set": saveData,
 			})
-			SetLog(userId, types, 0, 0, 0)
+			SetLog(userId, types, 0, session)
 		}
 	} else {
 		types := "o_entniche"
 		dMap, err := util.JsonToMap(deletekey)
 		newMap := []interface{}{}
 		query := map[string]interface{}{
-			"i_userid": entUserId,
-			"i_entid":  entId,
+			"i_userid": qutil.IntAll(session.Get("entUserId")),
+			"i_entid":  qutil.IntAll(session.Get("entId")),
 			"i_type":   1,
 		}
 		if err == nil && len(dMap) > 0 {
@@ -505,7 +507,7 @@ func DeleteKeyWords(types, deletekey, userId string, power, entUserId, entId int
 				"l_updatetime":       time.Now().Unix(),
 				"o_entniche.a_items": newMap,
 			}}, true, false)
-			SetLog(userId, types, power, entUserId, entId)
+			SetLog(userId, types, power, session)
 		}
 
 	}
@@ -513,7 +515,7 @@ func DeleteKeyWords(types, deletekey, userId string, power, entUserId, entId int
 }
 
 //删除分类【可以批量删除】
-func DeleteClass(types, classIndex, userId string, power, entUserId, entId int) map[string]interface{} {
+func DeleteClass(types, classIndex, userId string, power int, session *httpsession.Session) map[string]interface{} {
 	flag := true
 	if power != 1 {
 		items, saveData := []interface{}{}, map[string]interface{}{}
@@ -537,13 +539,13 @@ func DeleteClass(types, classIndex, userId string, power, entUserId, entId int)
 			flag = db.Mgo.UpdateById("user", userId, map[string]interface{}{
 				"$set": saveData,
 			})
-			SetLog(userId, types, 0, 0, 0)
+			SetLog(userId, types, 0, session)
 		}
 	} else {
 		types := "o_entniche"
 		query := map[string]interface{}{
-			"i_userid": entUserId,
-			"i_entid":  entId,
+			"i_userid": qutil.IntAll(session.Get("entUserId")),
+			"i_entid":  qutil.IntAll(session.Get("entId")),
 			"i_type":   1,
 		}
 		items := []interface{}{}
@@ -568,14 +570,14 @@ func DeleteClass(types, classIndex, userId string, power, entUserId, entId int)
 				"l_updatetime":       time.Now().Unix(),
 				"o_entniche.a_items": items,
 			}}, true, false)
-			SetLog(userId, types, power, entUserId, entId)
+			SetLog(userId, types, power, session)
 		}
 	}
 	return map[string]interface{}{"flag": flag, "msg": ""}
 }
 
 //创建分类名
-func AddClass(types, classIndex, className, userId string, power, entUserId, entId int) map[string]interface{} {
+func AddClass(types, classIndex, className, userId string, power int, session *httpsession.Session) map[string]interface{} {
 	flag := true
 	if power != 1 {
 		saveData := map[string]interface{}{}
@@ -614,13 +616,13 @@ func AddClass(types, classIndex, className, userId string, power, entUserId, ent
 			flag = db.Mgo.UpdateById("user", userId, map[string]interface{}{
 				"$set": saveData,
 			})
-			SetLog(userId, types, 0, 0, 0)
+			SetLog(userId, types, 0, session)
 		}
 	} else {
 		types := "o_entniche"
 		query := map[string]interface{}{
-			"i_userid": entUserId,
-			"i_entid":  entId,
+			"i_userid": qutil.IntAll(session.Get("entUserId")),
+			"i_entid":  qutil.IntAll(session.Get("entId")),
 			"i_type":   1,
 		}
 		saveData := map[string]interface{}{}
@@ -661,7 +663,7 @@ func AddClass(types, classIndex, className, userId string, power, entUserId, ent
 			flag = db.Mgo.Update("entniche_rule", query, map[string]interface{}{
 				"$set": saveData,
 			}, true, false)
-			SetLog(userId, types, power, entUserId, entId)
+			SetLog(userId, types, power, session)
 		}
 	}
 	return map[string]interface{}{"flag": flag, "msg": ""}
@@ -718,12 +720,11 @@ type UpdateOther struct {
 	Power           int
 	EntId           int
 	EntUserId       int
-	BaseUserId      int64
-	AccountId       int64
+	Session         *httpsession.Session
 }
 
 func (this *UpdateOther) UpdateOther() map[string]interface{} {
-	power := jy.GetBigVipUserBaseMsg("10000", this.UserId, this.BaseUserId, this.AccountId, qutil.Int64All(this.EntId), config.Config.Etcd.Hosts, config.Config.Etcd.Key)
+	power := jy.GetBigVipUserBaseMsg("10000", this.Session, config.Config.Etcd.Hosts, config.Config.Etcd.Key)
 	if this.Type == "m" && power.Status < 0 {
 		return map[string]interface{}{"flag": false, "msg": "暂无权限"}
 	}
@@ -769,7 +770,7 @@ func (this *UpdateOther) UpdateOther() map[string]interface{} {
 				//清楚缓存
 				jy.ClearBigVipUserPower(this.UserId)
 			}
-			SetLog(this.UserId, types, this.Power, this.EntUserId, this.EntId)
+			SetLog(this.UserId, types, this.Power, this.Session)
 		} else {
 			query := map[string]interface{}{
 				"i_userid": this.EntUserId,
@@ -782,7 +783,7 @@ func (this *UpdateOther) UpdateOther() map[string]interface{} {
 				//清楚缓存
 				jy.ClearBigVipUserPower(this.UserId)
 			}
-			SetLog(this.UserId, types, this.Power, this.EntUserId, this.EntId)
+			SetLog(this.UserId, types, this.Power, this.Session)
 
 		}
 
@@ -831,7 +832,7 @@ func UpdateKeyTip(types string) map[string]interface{} {
 	}
 }
 
-func directSubKWS(updateItems string, keys string, userId string, power, entUserId, entId int) map[string]interface{} {
+func directSubKWS(updateItems string, keys string, userId string, power int, session *httpsession.Session) map[string]interface{} {
 	flag := "n"
 	if power != 1 {
 		data, ok := db.Mgo.FindById("user", userId, fmt.Sprintf(`{"%s":1}`, updateItems))
@@ -907,8 +908,8 @@ func directSubKWS(updateItems string, keys string, userId string, power, entUser
 	} else {
 		updateItems = "o_entniche"
 		query := map[string]interface{}{
-			"i_userid": entUserId,
-			"i_entid":  entId,
+			"i_userid": qutil.IntAll(session.Get("entUserId")),
+			"i_entid":  qutil.IntAll(session.Get("entId")),
 			"i_type":   1,
 		}
 		data, ok := db.Mgo.Find("entniche_rule", query, `{"o_entniche.a_items":1}`, nil, false, -1, -1)
@@ -990,11 +991,11 @@ func directSubKWS(updateItems string, keys string, userId string, power, entUser
 }
 
 //订阅设置记录
-func SetLog(userid, types string, power, entUserId, entId int) {
+func SetLog(userid, types string, power int, session *httpsession.Session) {
 	if power == 1 {
 		query := map[string]interface{}{
-			"i_userid": entUserId,
-			"i_entid":  entId,
+			"i_userid": qutil.IntAll(session.Get("entUserId")),
+			"i_entid":  qutil.IntAll(session.Get("entId")),
 			"i_type":   1,
 		}
 		res, _ := db.Mgo.FindOne("entniche_rule", query)

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

@@ -2,6 +2,7 @@ package entity
 
 import (
 	qutil "app.yhyue.com/moapp/jybase/common"
+	"app.yhyue.com/moapp/jybase/go-xweb/httpsession"
 	"app.yhyue.com/moapp/jybase/redis"
 	"app.yhyue.com/moapp/jypkg/common/src/qfw/util/jy"
 	"errors"
@@ -17,14 +18,13 @@ import (
 
 //订阅设置设置修改
 type SubscribeSet struct {
-	Area       map[string]interface{} //地区
-	Industry   []string               //行业
-	UserId     string                 //用户id
-	Type       string                 //类型
-	EntId      int
-	EntUserId  int
-	BaseUserId int64
-	AccountId  int64
+	Area      map[string]interface{} //地区
+	Industry  []string               //行业
+	UserId    string                 //用户id
+	Type      string                 //类型
+	EntId     int
+	EntUserId int
+	Session   *httpsession.Session
 }
 
 func (this *SubscribeSet) SetAreaAndIndustry() *FuncResult {
@@ -38,20 +38,20 @@ func (this *SubscribeSet) SetAreaAndIndustry() *FuncResult {
 		if infoCount > 0 {
 			power = 1
 		}
-		return memberSet(area, industry, userId, power, this.EntUserId, this.EntId)
+		return memberSet(area, industry, userId, power, this.Session)
 	} else if typ == "v" {
 		infoCount := db.Mysql.CountBySql("select  count(id) from  entniche_wait_empower where  ent_id=? and  end_time>NOW() and  product_type like '%VIP订阅%' ", this.EntId)
 		if infoCount > 0 {
 			power = 1
 		}
-		return vipSet(area, industry, userId, power, this.EntUserId, this.EntId)
+		return vipSet(area, industry, userId, power, this.Session)
 	} else {
-		return freeSet(area, industry, userId)
+		return freeSet(area, industry, userId, this.Session)
 	}
 }
 
 //
-func freeSet(area map[string]interface{}, industry []string, userId string) *FuncResult {
+func freeSet(area map[string]interface{}, industry []string, userId string, session *httpsession.Session) *FuncResult {
 	//isfirst:是否第一次设置地区;ppb:是否购买省级订阅包; areacount:省份订阅包购买的省份数量-1:全国 无限制调整
 	isfirst, ppb, areacount := IsCanSet(userId, area)
 	//购买省份订阅包 已调整地区次数
@@ -100,7 +100,7 @@ func freeSet(area map[string]interface{}, industry []string, userId string) *Fun
 			log.Println(fmt.Sprintf("免费用户设置地区 扣除次数异常  userId:%s", userId))
 		}
 	}
-	SetLog(userId, "o_jy", 0, 0, 0)
+	SetLog(userId, "o_jy", 0, session)
 	return &FuncResult{true, nil, map[string]interface{}{
 		"doSuccess": true,
 	}}
@@ -178,7 +178,7 @@ func areaSort(area []string) string {
 }
 
 //
-func vipSet(area map[string]interface{}, industry []string, userId string, power, entUserId, entId int) *FuncResult {
+func vipSet(area map[string]interface{}, industry []string, userId string, power int, session *httpsession.Session) *FuncResult {
 	if len(industry) == 1 && industry[0] == "" {
 		industry = []string{}
 	}
@@ -188,8 +188,8 @@ func vipSet(area map[string]interface{}, industry []string, userId string, power
 	}
 	if power == 1 {
 		query := map[string]interface{}{
-			"i_userid": entUserId,
-			"i_entid":  entId,
+			"i_userid": qutil.IntAll(session.Get("entUserId")),
+			"i_entid":  qutil.IntAll(session.Get("entId")),
 			"i_type":   1,
 		}
 		res, _ := db.Mgo.FindOne("entniche_rule", query)
@@ -207,33 +207,33 @@ func vipSet(area map[string]interface{}, industry []string, userId string, power
 		return &FuncResult{false, errors.New("订阅内容超出套餐"), nil}
 	}
 	if power == 1 {
-		if !VipSubChange(userId, qutil.ObjToMap((*rData)["o_entniche"]), &area, industry, power, entUserId, entId) {
+		if !VipSubChange(userId, qutil.ObjToMap((*rData)["o_entniche"]), &area, industry, power, session) {
 			return &FuncResult{false, errors.New("保存修改出错"), nil}
 		}
 	} else {
-		if !VipSubChange(userId, qutil.ObjToMap((*rData)["o_vipjy"]), &area, industry, power, entUserId, entId) {
+		if !VipSubChange(userId, qutil.ObjToMap((*rData)["o_vipjy"]), &area, industry, power, session) {
 			return &FuncResult{false, errors.New("保存修改出错"), nil}
 		}
 	}
 
-	SetLog(userId, "o_vipjy", power, entUserId, entId)
+	SetLog(userId, "o_vipjy", power, session)
 	return &FuncResult{true, nil, map[string]interface{}{
 		"doSuccess": true,
 	}}
 }
 
 //大会员订阅设置
-func memberSet(area map[string]interface{}, industry []string, userId string, power, entUserId, entId, baseUserId, accountId int) *FuncResult {
-	if data := jy.GetBigVipUserBaseMsg("10000", userId, qutil.Int64All(baseUserId), qutil.Int64All(accountId), qutil.Int64All(entId), config.Config.Etcd.Key, config.Config.Etcd.Key); data.Status <= 0 {
+func memberSet(area map[string]interface{}, industry []string, userId string, power int, session *httpsession.Session) *FuncResult {
+	if data := jy.GetBigVipUserBaseMsg("10000", session, config.Config.Etcd.Key, config.Config.Etcd.Key); data.Status <= 0 {
 		return &FuncResult{false, errors.New("请求异常,非大会员状态"), nil}
 	}
 	if len(industry) == 1 && industry[0] == "" {
 		industry = []string{}
 	}
-	if !MemberSubChange(userId, &area, industry, power, entUserId, entId) {
+	if !MemberSubChange(userId, &area, industry, power, session) {
 		return &FuncResult{false, errors.New("保存修改出错"), nil}
 	}
-	SetLog(userId, "o_member_jy", power, entUserId, entId)
+	SetLog(userId, "o_member_jy", power, session)
 	return &FuncResult{true, nil, map[string]interface{}{
 		"doSuccess": true,
 	}}
@@ -542,12 +542,12 @@ func needUpgrade(newBuySet, oldBuySet *SubvipBuySet) bool {
 }
 
 //超级订阅 订阅修改
-func VipSubChange(userId string, oldVip, areaNew *map[string]interface{}, industryNew []string, power, entUserId, entId int) bool {
+func VipSubChange(userId string, oldVip, areaNew *map[string]interface{}, industryNew []string, power int, session *httpsession.Session) bool {
 	updateOk := false
 	if power == 1 {
 		query := map[string]interface{}{
-			"i_userid": entUserId,
-			"i_entid":  entId,
+			"i_userid": qutil.IntAll(session.Get("entUserId")),
+			"i_entid":  qutil.IntAll(session.Get("entId")),
 			"i_type":   1,
 		}
 		updateOk = db.Mgo.Update("entniche_rule", query,
@@ -582,11 +582,11 @@ func VipSubChange(userId string, oldVip, areaNew *map[string]interface{}, indust
 }
 
 //超级订阅 订阅修改
-func MemberSubChange(userId string, areaNew *map[string]interface{}, industryNew []string, power, entUserId, entId int) bool {
+func MemberSubChange(userId string, areaNew *map[string]interface{}, industryNew []string, power int, session *httpsession.Session) bool {
 	if power == 1 {
 		query := map[string]interface{}{
-			"i_userid": entUserId,
-			"i_entid":  entId,
+			"i_userid": qutil.IntAll(session.Get("entUserId")),
+			"i_entid":  qutil.IntAll(session.Get("entId")),
 			"i_type":   1,
 		}
 		if updateOk := db.Mgo.Update("entniche_rule", query,

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

@@ -38,22 +38,19 @@ func (sp *SubscribePush) VipSwitch() {
 		if userId == "" {
 			return nil, fmt.Errorf("未登录")
 		}
-		baseUserId := util.Int64All(sp.GetSession("base_user_id"))
-		entId := util.Int64All(sp.GetSession("entId"))
-		accountId := util.Int64All(sp.GetSession("accountId"))
 		switchOk := false
 		vt := sp.GetString("vt")
 		if vt == "" {
 			vt = jy.SwitchService.GetEntniche(sp.Session(), db.Mgo, db.Mysql)
 		} else if vt == jy.SubVipFlag {
-			vipMsg := jy.GetBigVipUserBaseMsg("10000", userId, baseUserId, accountId, entId, config.Config.Etcd.Hosts, config.Config.Etcd.Key)
+			vipMsg := jy.GetBigVipUserBaseMsg("10000", sp.Session(), config.Config.Etcd.Hosts, config.Config.Etcd.Key)
 			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", userId, baseUserId, accountId, entId, config.Config.Etcd.Hosts, config.Config.Etcd.Key)
+			vipMsg := jy.GetBigVipUserBaseMsg("10000", sp.Session(), config.Config.Etcd.Hosts, config.Config.Etcd.Key)
 			if vipMsg.Status <= 0 {
 				return nil, fmt.Errorf("未购买大会员")
 			}

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

@@ -2,6 +2,7 @@ package service
 
 import (
 	qutil "app.yhyue.com/moapp/jybase/common"
+	"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"
 	"jy/src/jfw/modules/publicapply/src/db"
@@ -14,6 +15,7 @@ type Subscribe struct {
 	*xweb.Action
 	update      xweb.Mapper `xweb:"/subscribe/update"`      //订阅修改
 	setUserInfo xweb.Mapper `xweb:"/subscribe/setUserInfo"` //各种修改【关键词、关键词匹配方式、信息类型、项目匹配】
+	session     *httpsession.Session
 }
 
 // 大会员、超级订阅订阅修改
@@ -21,21 +23,18 @@ func (s *Subscribe) Update() {
 	userId := qutil.ObjToString(s.GetSession("userId"))
 	ent_id := qutil.IntAll(s.GetSession("entId"))
 	entUserId := qutil.IntAll(s.GetSession("entUserId"))
-	baseUserId := qutil.Int64All(s.GetSession("base_user_id"))
-	accountId := qutil.Int64All(s.GetSession("accountId"))
 	vSwitch := s.GetString("vSwitch")
 	if vSwitch == "" {
 		vSwitch = jy.SwitchService.Get(s.Session(), db.Mgo) //v:vip m:member
 	}
 	sub := &entity.SubscribeSet{
-		Area:       *qutil.ObjToMap(s.GetString("area")),
-		Industry:   strings.Split(s.GetString("industry"), ","),
-		UserId:     userId,
-		Type:       vSwitch,
-		EntId:      ent_id,
-		EntUserId:  entUserId,
-		AccountId:  accountId,
-		BaseUserId: baseUserId,
+		Area:      *qutil.ObjToMap(s.GetString("area")),
+		Industry:  strings.Split(s.GetString("industry"), ","),
+		UserId:    userId,
+		Type:      vSwitch,
+		EntId:     ent_id,
+		EntUserId: entUserId,
+		Session:   s.session,
 	}
 	r := sub.SetAreaAndIndustry()
 	if r.Err != nil {
@@ -50,8 +49,6 @@ func (s *Subscribe) SetUserInfo() {
 	userId := qutil.ObjToString(s.GetSession("userId"))
 	entId := qutil.IntAll(s.GetSession("entId"))
 	entUserId := qutil.IntAll(s.GetSession("entUserId"))
-	baseUserId := qutil.Int64All(s.GetSession("base_user_id"))
-	accountId := qutil.Int64All(s.GetSession("accountId"))
 	vSwitch := s.GetString("vSwitch")
 	if vSwitch == "" {
 		vSwitch = jy.SwitchService.Get(s.Session(), db.Mgo) //v:vip m:member "":free
@@ -90,8 +87,7 @@ func (s *Subscribe) SetUserInfo() {
 			Power:         power,
 			EntUserId:     entUserId,
 			EntId:         entId,
-			AccountId:     accountId,
-			BaseUserId:    baseUserId,
+			Session:       s.session,
 		}
 		r = sub.UpdateKeyWords()
 	} else {
@@ -109,8 +105,7 @@ func (s *Subscribe) SetUserInfo() {
 			Power:           power,
 			EntUserId:       entUserId,
 			EntId:           entId,
-			AccountId:       accountId,
-			BaseUserId:      baseUserId,
+			Session:         s.session,
 		}
 		r = uo.UpdateOther()
 	}

+ 17 - 20
src/jfw/modules/publicapply/src/userbase/entity/entity.go

@@ -1,6 +1,7 @@
 package entity
 
 import (
+	"app.yhyue.com/moapp/jybase/go-xweb/httpsession"
 	"encoding/json"
 	"fmt"
 	"jy/src/jfw/modules/publicapply/src/config"
@@ -18,12 +19,10 @@ import (
 )
 
 type UserInfo struct {
-	UserId     string //用户id
-	Platform   string //平台 PC WX APP
-	Names      string //功能名称
-	BaseUserId int64
-	AccountId  int64
-	EntId      int64
+	UserId   string //用户id
+	Platform string //平台 PC WX APP
+	Names    string //功能名称
+	Session  *httpsession.Session
 }
 
 type FuncNames struct {
@@ -32,11 +31,11 @@ type FuncNames struct {
 	Img  string `json:"img"`
 }
 
-func NewUserInfo(userId, platform, names string, baseUserId, accountId, entId int64) *UserInfo {
+func NewUserInfo(userId, platform, names string, session *httpsession.Session) *UserInfo {
 	if platform == "" {
 		platform = "PC"
 	}
-	return &UserInfo{userId, platform, names, baseUserId, accountId, entId}
+	return &UserInfo{userId, platform, names, session}
 }
 
 //保存
@@ -48,7 +47,7 @@ func (this *UserInfo) SaveNameByUserId() bool {
 	var namesarr = []string{}
 	if this.Names != "" {
 		for _, v := range strings.Split(this.Names, ",") {
-			if !ChargeMap[v] || IsPower(v, this.UserId, this.BaseUserId, this.AccountId, this.EntId) {
+			if !ChargeMap[v] || IsPower(v, this.Session) {
 				namesarr = append(namesarr, v)
 			}
 		}
@@ -94,7 +93,7 @@ func (this *UserInfo) GetNameByUserId() (fns []*FuncNames) {
 	} else {
 		for _, v := range BaseFuncInfo.CommonFunctions {
 			if v.Isbase {
-				if v.Name == "订阅管理" && !IsPower(v.Name, this.UserId, this.BaseUserId, this.AccountId, this.EntId) {
+				if v.Name == "订阅管理" && !IsPower(v.Name, this.Session) {
 					continue
 				}
 				fns = append(fns, &FuncNames{
@@ -117,7 +116,7 @@ var ChargeMap = map[string]bool{}
 func (this *UserInfo) AllNames() (fns []*FuncNames) {
 	for _, v := range BaseFuncInfo.CommonFunctions {
 		ChargeMap[v.Name] = v.Charge
-		if !v.Charge || IsPower(v.Name, this.UserId, this.BaseUserId, this.AccountId, this.EntId) {
+		if !v.Charge || IsPower(v.Name, this.Session) {
 			fns = append(fns, &FuncNames{
 				Name: v.Name,
 				Url:  thisByPlat(this.Platform, "url", &v),
@@ -157,8 +156,8 @@ func thisByPlat(platform, name string, bcv *initjson.BaseFunc) (res string) {
 }
 
 //查看是否有使用此功能的权限
-func IsPower(name, userId string, baseUserId, accountId, entId int64) (b bool) {
-	BigPower := jy.GetBigVipUserBaseMsg("10000", userId, baseUserId, accountId, entId, config.Config.Etcd.Hosts, config.Config.Etcd.Key)
+func IsPower(name string, session *httpsession.Session) (b bool) {
+	BigPower := jy.GetBigVipUserBaseMsg("10000", session, config.Config.Etcd.Hosts, config.Config.Etcd.Key)
 	if BigPower.Status > 0 {
 		switch name {
 		case "企业情报监控":
@@ -269,12 +268,10 @@ func SellerTokenDecrypt(token string) (uId, sName string, sid int, desc map[stri
 
 //用户一次性弹窗信息集合
 type TipInfoStruct struct {
-	UserId     string
-	DoType     string
-	TipName    string
-	BaseUserId int64
-	AccountId  int64
-	EntId      int64
+	UserId  string
+	DoType  string
+	TipName string
+	Session *httpsession.Session
 }
 
 //
@@ -301,7 +298,7 @@ func (this *TipInfoStruct) GetTipInfo() (flag bool) {
 	} else { //查询是否提示弹框
 		//判断是否严重用户注册时间
 		if config.Config.TipInfo[this.TipName] > 0 {
-			userBase := jy.GetBigVipUserBaseMsg("10000", this.UserId, this.BaseUserId, this.AccountId, util.Int64All(this.EntId), config.Config.Etcd.Hosts, config.Config.Etcd.Key)
+			userBase := jy.GetBigVipUserBaseMsg("10000", this.Session, config.Config.Etcd.Hosts, config.Config.Etcd.Key)
 			//此时间点后注册的新用户
 			if userBase.Registedate > config.Config.TipInfo[this.TipName] {
 				return true

+ 6 - 7
src/jfw/modules/publicapply/src/userbase/entity/menu.go

@@ -1,18 +1,17 @@
 package entity
 
 import (
+	"app.yhyue.com/moapp/jybase/go-xweb/httpsession"
 	"jy/src/jfw/modules/publicapply/src/userbase/initjson"
 )
 
 type MenuInfoStruct struct {
-	UserId     string `json:"userId"`
-	BaseUserId int64  `json:"baseUserId"`
-	EntId      int64  `json:"entId"`
-	AccountId  int64  `json:"accountId"`
+	UserId  string `json:"userId"`
+	Session *httpsession.Session
 }
 
-func NewMenuInfo(userId string, baseUserId, accountId, entId int64) *MenuInfoStruct {
-	return &MenuInfoStruct{userId, baseUserId, accountId, entId}
+func NewMenuInfo(userId string, session *httpsession.Session) *MenuInfoStruct {
+	return &MenuInfoStruct{userId, session}
 }
 
 //大会员菜单
@@ -28,7 +27,7 @@ func (this *MenuInfoStruct) GetMenuInfo() (menus []*initjson.MenuLevel) {
 				Isusable: mv.Isusable,
 			}
 			if !msll.Isusable {
-				if IsPower(msll.Name, this.UserId, this.BaseUserId, this.AccountId, this.EntId) {
+				if IsPower(msll.Name, this.Session) {
 					msll.Isusable = true
 				} else {
 					//子账号 隐藏订阅管理

+ 9 - 26
src/jfw/modules/publicapply/src/userbase/service/service.go

@@ -11,18 +11,15 @@ import (
 //大会员菜单
 func (this *ServiceStruct) BigmemberMenu() {
 	userId, _ := this.GetSession("userId").(string)
-	baseUserId := qu.Int64All(this.GetSession("base_user_id"))
-	entId := qu.Int64All(this.GetSession("entId"))
-	accountId := qu.Int64All(this.GetSession("accountId"))
 	defer qu.Catch()
 	r := func() Result {
 		if this.Method() != "POST" {
 			return Result{Data: nil, Error_msg: Error_msg_1005}
 		}
-		if !entity.IsPower("", userId, baseUserId, accountId, entId) {
+		if !entity.IsPower("", this.Session()) {
 			return Result{Data: nil, Error_msg: Error_msg_1004}
 		}
-		newMenu := entity.NewMenuInfo(userId, baseUserId, accountId, entId)
+		newMenu := entity.NewMenuInfo(userId, this.Session())
 		return Result{Data: newMenu.GetMenuInfo()}
 	}()
 	this.ServeJson(r)
@@ -33,16 +30,13 @@ func (this *ServiceStruct) AllFunctions() {
 	userId, _ := this.GetSession("userId").(string)
 	defer qu.Catch()
 	r := func() Result {
-		baseUserId := qu.Int64All(this.GetSession("base_user_id"))
-		entId := qu.Int64All(this.GetSession("entId"))
-		accountId := qu.Int64All(this.GetSession("accountId"))
 		if this.Method() != "POST" {
 			return Result{Data: nil, Error_msg: Error_msg_1005}
 		}
-		if !entity.IsPower("", userId, baseUserId, accountId, entId) {
+		if !entity.IsPower("", this.Session()) {
 			return Result{Data: nil, Error_msg: Error_msg_1004}
 		}
-		newFN := entity.NewUserInfo(userId, "", "", baseUserId, accountId, entId)
+		newFN := entity.NewUserInfo(userId, "", "", this.Session())
 		return Result{Data: newFN.AllNames()}
 	}()
 	this.ServeJson(r)
@@ -53,18 +47,15 @@ func (this *ServiceStruct) SaveFunctions() {
 	userId, _ := this.GetSession("userId").(string)
 	defer qu.Catch()
 	r := func() Result {
-		baseUserId := qu.Int64All(this.GetSession("base_user_id"))
-		entId := qu.Int64All(this.GetSession("entId"))
-		accountId := qu.Int64All(this.GetSession("accountId"))
 		if this.Method() != "POST" {
 			return Result{Data: nil, Error_msg: Error_msg_1005}
 		}
 		names := this.GetString("names")
-		if !entity.IsPower("", userId, baseUserId, accountId, entId) {
+		if !entity.IsPower("", this.Session()) {
 			return Result{Data: nil, Error_msg: Error_msg_1004}
 		}
 		platform := this.GetString("platform")
-		newFN := entity.NewUserInfo(userId, platform, names, baseUserId, accountId, entId)
+		newFN := entity.NewUserInfo(userId, platform, names, this.Session())
 		return Result{Data: newFN.SaveNameByUserId()}
 	}()
 	this.ServeJson(r)
@@ -75,17 +66,14 @@ func (this *ServiceStruct) UbFunctions() {
 	userId, _ := this.GetSession("userId").(string)
 	defer qu.Catch()
 	r := func() Result {
-		baseUserId := qu.Int64All(this.GetSession("base_user_id"))
-		entId := qu.Int64All(this.GetSession("entId"))
-		accountId := qu.Int64All(this.GetSession("accountId"))
 		if this.Method() != "POST" {
 			return Result{Data: nil, Error_msg: Error_msg_1005}
 		}
-		if !entity.IsPower("", userId, baseUserId, accountId, entId) {
+		if !entity.IsPower("", this.Session()) {
 			return Result{Data: nil, Error_msg: Error_msg_1004}
 		}
 		platform := this.GetString("platform")
-		newFN := entity.NewUserInfo(userId, platform, "", baseUserId, accountId, entId)
+		newFN := entity.NewUserInfo(userId, platform, "", this.Session())
 		return Result{Data: newFN.GetNameByUserId()}
 	}()
 	this.ServeJson(r)
@@ -120,9 +108,6 @@ func (this *ServiceStruct) TipInfo() {
 	userId, _ := this.GetSession("userId").(string)
 	defer qu.Catch()
 	r := func() Result {
-		baseUserId := qu.Int64All(this.GetSession("base_user_id"))
-		entId := qu.Int64All(this.GetSession("entId"))
-		accountId := qu.Int64All(this.GetSession("accountId"))
 		if this.Method() != "POST" {
 			return Result{Data: nil, Error_msg: Error_msg_1005}
 		}
@@ -130,9 +115,7 @@ func (this *ServiceStruct) TipInfo() {
 		if tipInfo.TipName == "" {
 			return Result{Data: nil, Error_msg: Error_msg_1002}
 		}
-		tipInfo.EntId = entId
-		tipInfo.AccountId = accountId
-		tipInfo.BaseUserId = baseUserId
+		tipInfo.Session = this.Session()
 		return Result{Data: tipInfo.GetTipInfo()}
 	}()
 	this.ServeJson(r)

+ 123 - 119
src/jfw/modules/subscribepay/src/config.json

@@ -1,122 +1,126 @@
 {
-	"mongodbServers": "192.168.3.206:27080",
-    "mongodbPoolSize": 5,
-    "mongodbName": "qfw",
-    "mongoent":{
-    	"address": "192.168.3.206:27001,192.168.3.206:27002",
-		"size": 5,
-		"dbName": "qfw_data",
-		"userName": "jyDevGroup",
-		"password": "jy@DevGroup"
+  "mongodbServers": "192.168.3.206:27080",
+  "mongodbPoolSize": 5,
+  "mongodbName": "qfw",
+  "mongoent": {
+    "address": "192.168.3.206:27001,192.168.3.206:27002",
+    "size": 5,
+    "dbName": "qfw_data",
+    "userName": "jyDevGroup",
+    "password": "jy@DevGroup"
+  },
+  "mongobidding": {
+    "address": "192.168.3.206:27001,192.168.3.206:27002",
+    "size": 5,
+    "dbName": "qfw_data",
+    "replSet": "",
+    "collection": "bidding",
+    "collection_change": "bidding_back",
+    "userName": "jyDevGroup",
+    "password": "jy@DevGroup"
+  },
+  "mongolog": {
+    "address": "192.168.3.206:27090",
+    "size": 5,
+    "dbName": "qfw",
+    "replSet": "",
+    "userName": "admin",
+    "password": "123456"
+  },
+  "redisaddrs": "other=192.168.3.206:1712,session=192.168.3.11:1713,push=123.56.53.97:1713,newother=192.168.3.206:1712",
+  "elasticsearch": "http://192.168.3.206:9800",
+  "mongoqyfw": {
+    "address": "192.168.3.206:27080",
+    "size": 5,
+    "dbName": "jyqyfw"
+  },
+  "elasticPoolSize": 30,
+  "appid": "wx5b1c6e7cc4dac0e4",
+  "appsecret": "b026103ffebd2291b3edb7a269612112",
+  "webport": "86",
+  "webrpcport": "8600",
+  "weixinrpc": "127.0.0.1:8083",
+  "mysql": {
+    "dbName": "jianyu",
+    "address": "192.168.3.11:3366",
+    "userName": "root",
+    "passWord": "Topnet123",
+    "maxOpenConns": 5,
+    "maxIdleConns": 5
+  },
+  "infoMysql": {
+    "dbName": "base_service",
+    "address": "192.168.3.11:3366",
+    "userName": "root",
+    "passWord": "Topnet123",
+    "maxOpenConns": 2,
+    "maxIdleConns": 2
+  },
+  "appPushServiceRpc": "127.0.0.1:5566",
+  "webdomain": "http://web-zxl.jydev.jianyu360.com",
+  "appdomain": "http://web-zxl.jydev.jianyu360.com",
+  "wxdomain": "http://web-zxl.jydev.jianyu360.com",
+  "mail": [
+    {
+      "addr": "smtp.exmail.qq.com",
+      "port": 465,
+      "pwd": "ue9Rg9Sf4CVtdm5a",
+      "user": "public03@topnet.net.cn"
     },
-	"mongobidding":{
-		"address": "192.168.3.206:27001,192.168.3.206:27002",
-		"size": 5,
-		"dbName": "qfw_data",
-		"replSet": "",
-		"collection": "bidding",
-		"collection_change": "bidding_back",
-		"userName": "jyDevGroup",
-		"password": "jy@DevGroup"
-	},
-	"mongolog": {
-		"address": "192.168.3.206:27090",
- 		"size": 5,
- 		"dbName": "qfw",
-		"replSet": "",
-		"userName": "admin",
-		"password": "123456"
-	},
-    "redisaddrs": "other=192.168.3.206:1712,session=192.168.3.11:1713,push=123.56.53.97:1713,newother=192.168.3.206:1712",
-    "elasticsearch": "http://192.168.3.206:9800",
-    "mongoqyfw": {
-      "address": "192.168.3.206:27080",
-      "size": 5,
-      "dbName": "jyqyfw"
-    },
-    "elasticPoolSize": 30,
-    "appid": "wx5b1c6e7cc4dac0e4",
-    "appsecret": "b026103ffebd2291b3edb7a269612112",
-    "webport": "86",
-    "webrpcport": "8600",
-    "weixinrpc": "127.0.0.1:8083",
-    "mysql": {
-        "dbName": "jianyu",
-        "address": "192.168.3.11:3366",
-        "userName": "root",
-        "passWord": "Topnet123",
-		"maxOpenConns":5,
-		"maxIdleConns":5
-	},
-    "infoMysql": {
-        "dbName": "base_service",
-        "address": "192.168.3.11:3366",
-        "userName": "root",
-        "passWord": "Topnet123",
-		"maxOpenConns":2,
-		"maxIdleConns":2
-	},
-  	"appPushServiceRpc": "127.0.0.1:5566",
-  	"webdomain": "http://web-zxl.jydev.jianyu360.com",
-  	"appdomain": "http://web-zxl.jydev.jianyu360.com",
-    "wxdomain": "http://web-zxl.jydev.jianyu360.com",
-  	"mail": [
-	    {
-	      "addr": "smtp.exmail.qq.com",
-	      "port": 465,
-	      "pwd": "ue9Rg9Sf4CVtdm5a",
-	      "user": "public03@topnet.net.cn"
-	    },
-		{
-	      "addr": "smtp.exmail.qq.com",
-	      "port": 465,
-	      "pwd": "ue9Rg9Sf4CVtdm5a",
-	      "user": "public03@topnet.net.cn"
-	    }
-  	],
-	"orderCountdown": "48h",
-	"allPayMoney": 1,
-	"autoMergeTime": 1599667200,
-	"profitTitle": "您有%s元佣金可领取!",
-	"profitDescript": "您的好友已通过您的分享购买%s成功!您已获得%s元佣金!",
-	"termValidity": 60,
-	"accountMergeOnline":"2021-04-07 12:00:00",
-	"optimalTime":"2021-08-03 12:00:00",
-	"activityName":"1111",
-	"shareRedisName":"other",
-	"product":{
-	    "历史数据":true,
-		"VIP订阅":true,
-		"企业商机管理":true,
-		"大会员":true,
-		"大会员-AI中标预测包":true,
-		"大会员-子账号":true,
-		"大会员-补充包":true,
-		"剑鱼币":true,
-		"数据流量包":true,
-		"省份订阅包":true,
-		"附件下载包":true,
-		"采购单位画像包":true,
-		"数据报告":true,
-		"中标必听课":true
-	},
-	"smsServiceRpc":"127.0.0.1:932",
-	"nsq":"192.168.3.240:4260",
-  	"nsq_topic": "jy_event",
-  	"userCenterApi":"https://web-zxl.jydev.jianyu360.com",
-  	"vipKeyMaxLength":300,
-  	"activityOrderCountdown":30,
-  	"companySize": 10,
-  	"webSiteParameter": {
-	    "addr": "https://webdev-qmx_admin.jydev.jianyu360.com/api/admin/",
-	    "action": "/message/sendMessageApi",
-	    "title": "你有新的未支付订单",
-	    "content": "购买超级订阅,立享专属限时优惠!点击前往支付>>",
-	    "link": "/front/vipOrder/vipOrderDetail?order_code=%s",
-	    "androidUrl": "/jyapp/vipsubscribe/toOrderDetailPage?orderCode=%s",
-	    "iosUrl": "/jyapp/vipsubscribe/toOrderDetailPage?orderCode=%s",
-	    "weChatUrl": "/front/vipsubscribe/toOrderDetailPage?orderCode=%s"
- 	},
-  	"keywordsLimit":35,
-  	"breakRenewTipTime":"2022-09-30 00:00:00"
+    {
+      "addr": "smtp.exmail.qq.com",
+      "port": 465,
+      "pwd": "ue9Rg9Sf4CVtdm5a",
+      "user": "public03@topnet.net.cn"
+    }
+  ],
+  "orderCountdown": "48h",
+  "allPayMoney": 1,
+  "autoMergeTime": 1599667200,
+  "profitTitle": "您有%s元佣金可领取!",
+  "profitDescript": "您的好友已通过您的分享购买%s成功!您已获得%s元佣金!",
+  "termValidity": 60,
+  "accountMergeOnline": "2021-04-07 12:00:00",
+  "optimalTime": "2021-08-03 12:00:00",
+  "activityName": "1111",
+  "shareRedisName": "other",
+  "product": {
+    "历史数据": true,
+    "VIP订阅": true,
+    "企业商机管理": true,
+    "大会员": true,
+    "大会员-AI中标预测包": true,
+    "大会员-子账号": true,
+    "大会员-补充包": true,
+    "剑鱼币": true,
+    "数据流量包": true,
+    "省份订阅包": true,
+    "附件下载包": true,
+    "采购单位画像包": true,
+    "数据报告": true,
+    "中标必听课": true
+  },
+  "smsServiceRpc": "127.0.0.1:932",
+  "nsq": "192.168.3.240:4260",
+  "nsq_topic": "jy_event",
+  "userCenterApi": "https://web-zxl.jydev.jianyu360.com",
+  "vipKeyMaxLength": 300,
+  "activityOrderCountdown": 30,
+  "companySize": 10,
+  "webSiteParameter": {
+    "addr": "https://webdev-qmx_admin.jydev.jianyu360.com/api/admin/",
+    "action": "/message/sendMessageApi",
+    "title": "你有新的未支付订单",
+    "content": "购买超级订阅,立享专属限时优惠!点击前往支付>>",
+    "link": "/front/vipOrder/vipOrderDetail?order_code=%s",
+    "androidUrl": "/jyapp/vipsubscribe/toOrderDetailPage?orderCode=%s",
+    "iosUrl": "/jyapp/vipsubscribe/toOrderDetailPage?orderCode=%s",
+    "weChatUrl": "/front/vipsubscribe/toOrderDetailPage?orderCode=%s"
+  },
+  "keywordsLimit": 35,
+  "breakRenewTipTime": "2022-09-30 00:00:00",
+  "etcd": {
+    "hosts": "192.168.3.206:27080",
+    "key": "powercheck.rpc"
+  }
 }

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

@@ -92,6 +92,10 @@ type config struct {
 	}
 	KeywordsLimit     int
 	BreakRenewTipTime string
+	Etcd              struct {
+		Hosts string
+		Key   string
+	} `json:"etcd"`
 }
 type mgoConf struct {
 	Address           string

+ 4 - 3
src/jfw/modules/subscribepay/src/entity/basePack.go

@@ -1,6 +1,7 @@
 package entity
 
 import (
+	"app.yhyue.com/moapp/jybase/go-xweb/httpsession"
 	"encoding/json"
 	"fmt"
 	"jy/src/jfw/modules/subscribepay/src/config"
@@ -30,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(this.UserId, util.Mysql, util.MQFW)
+	BaseMsg := jy.GetBigVipUserBaseMsg("10000", this.Session, config.Config.Etcd.Hosts, config.Config.Etcd.Key)
 	log.Println("---:", this.Remarks)
 	if BaseMsg.Status > 0 && BaseMsg.PowerMap[3] {
 		if this.Remarks["infoType"] != nil && this.Remarks["infoType"].(string) == "S" {
@@ -236,8 +237,8 @@ func SupplyInfoFile(fileName, msgId string) (r map[string]interface{}) {
 }
 
 //消费
-func JyConsumePack(userId, product, platform string, remarks map[string]interface{}) (r map[string]interface{}, m string, c int) {
-	CStruct := InitUseBalance(userId, product, product, "", "", nil, remarks, 1, platform)
+func JyConsumePack(userId, product, platform string, remarks map[string]interface{}, session *httpsession.Session) (r map[string]interface{}, m string, c int) {
+	CStruct := InitUseBalance(userId, product, product, "", "", nil, remarks, 1, platform, session)
 	switch product {
 	case "附件下载包":
 		r, m, c = CStruct.fileConsume()

+ 4 - 1
src/jfw/modules/subscribepay/src/entity/commonApi.go

@@ -1,6 +1,7 @@
 package entity
 
 import (
+	"app.yhyue.com/moapp/jybase/go-xweb/httpsession"
 	"encoding/json"
 	"fmt"
 	"jy/src/jfw/modules/subscribepay/src/config"
@@ -119,10 +120,11 @@ type UseBalanceStruct struct {
 	DuplicateRemoval string                 //是否去重0不去1去重【数据流量包用到】
 	InfoId           []string               //数据Id,多个以逗号隔开【数据流量包用到】
 	Platform         string                 //平台:PC;APP;WX
+	Session          *httpsession.Session
 }
 
 //
-func InitUseBalance(userId, product, resourceType, ruleId, duplicateRemoval string, infoId []string, remarks map[string]interface{}, num int, platform string) *UseBalanceStruct {
+func InitUseBalance(userId, product, resourceType, ruleId, duplicateRemoval string, infoId []string, remarks map[string]interface{}, num int, platform string, session *httpsession.Session) *UseBalanceStruct {
 	return &UseBalanceStruct{
 		AccountId:        userId,
 		Name:             product,
@@ -135,6 +137,7 @@ func InitUseBalance(userId, product, resourceType, ruleId, duplicateRemoval stri
 		DuplicateRemoval: duplicateRemoval, //是否去重0不去1去重【数据流量包用到】
 		InfoId:           infoId,
 		Platform:         platform,
+		Session:          session,
 	}
 }
 

+ 3 - 3
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(userId, util.Mysql, util.MQFW)
+	vipStatus := jy.GetBigVipUserBaseMsg("10000", sess, config.Config.Etcd.Hosts, config.Config.Etcd.Key)
 	if vipStatus.Status > 0 && vipStatus.DailyNum > 0 {
 		packetMsg := dataexport.GetDataPacketMsg(vipStatus.GetUseId(), vipStatus.DailyNum)
 		packDetail["dailyPack"] = map[string]interface{}{
@@ -525,8 +525,8 @@ func cacheResult(err error, filePath, key string) {
 }
 
 // UseDailyPack 每日限量包
-func (this *dataExportPackStruct) UseDailyPack(userId, selectId, phone, email string, selectCount int) error {
-	vipStatus := jy.GetBigVipUserBaseMsg(userId, util.Mysql, util.MQFW)
+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)
 	if vipStatus.Status <= 0 || vipStatus.DailyNum == 0 {
 		return fmt.Errorf("非法请求")
 	}

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

@@ -97,7 +97,7 @@ func (this *commonOrderStruct) RequestCheck(product string, m map[string]interfa
 		insertMap:创建订单的参数
 		msg:错误信息
 */
-func (this *commonOrderStruct) InserMap(product, productId, userid, lotteryId, discountId string, m map[string]interface{}) (orderinfo *OrderInfo, msg string) {
+func (this *commonOrderStruct) InserMap(product, productId, userid, lotteryId, discountId string, m map[string]interface{}, session *httpsession.Session) (orderinfo *OrderInfo, msg string) {
 	switch product {
 	case "历史数据":
 		orderinfo, msg = dataExportOrder(m, userid)
@@ -106,7 +106,7 @@ func (this *commonOrderStruct) InserMap(product, productId, userid, lotteryId, d
 	case "企业商机管理":
 		orderinfo, msg = entnicheOrder(m, userid)
 	case "大会员":
-		orderinfo, msg = memberOrder(m, userid)
+		orderinfo, msg = memberOrder(m, userid, session)
 	case "剑鱼币":
 		orderinfo, msg = integralOrder(m, userid)
 	case "数据流量包":
@@ -114,9 +114,9 @@ func (this *commonOrderStruct) InserMap(product, productId, userid, lotteryId, d
 	case "省份订阅包":
 		orderinfo, msg = areaPackOrder(m, userid)
 	case "附件下载包":
-		orderinfo, msg = filePackOrder(m, userid)
+		orderinfo, msg = filePackOrder(m, userid, session)
 	case "采购单位画像包":
-		orderinfo, msg = buyerPortraitPackOrder(m, userid)
+		orderinfo, msg = buyerPortraitPackOrder(m, userid, session)
 	case "数据报告":
 		orderinfo, msg = newDataReportOrder(m, userid)
 	case "中标必听课":
@@ -886,7 +886,7 @@ func vipUpgrade(m map[string]interface{}, userId string) (*OrderInfo, string) {
 }
 
 //大会员
-func memberOrder(m map[string]interface{}, userId string) (*OrderInfo, string) {
+func memberOrder(m map[string]interface{}, userId string, session *httpsession.Session) (*OrderInfo, string) {
 	//校验是否有转账待审核订单
 	num := util.Mysql.Count("dataexport_order", map[string]interface{}{
 		"user_id":       userId,
@@ -904,7 +904,7 @@ func memberOrder(m map[string]interface{}, userId string) (*OrderInfo, string) {
 		return nil, "手机号格式异常"
 	}
 	//校验是否是大会员
-	vipStatus := jy.GetBigVipUserBaseMsg(userId, util.Mysql, util.MQFW)
+	vipStatus := jy.GetBigVipUserBaseMsg("10000", session, config.Config.Etcd.Hosts, config.Config.Etcd.Key)
 	if vipStatus.Status > 0 && vipStatus.Status != 4 { //已经是大会员
 		return nil, "您已经是大会员用户"
 	}
@@ -1114,8 +1114,8 @@ func areaPackOrder(m map[string]interface{}, userId string) (*OrderInfo, string)
 }
 
 //附件下载包
-func filePackOrder(m map[string]interface{}, userId string) (*OrderInfo, string) {
-	if jy.GetBigVipUserBaseMsg(userId, util.Mysql, util.MQFW).VipStatus <= 0 {
+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 {
 		return nil, "非超级订阅用户,暂无权益"
 	}
 	num := qu.IntAll(m["num"])
@@ -1188,8 +1188,8 @@ func GiveInfo(userid string, useProduct, useProductType, discountId int) []map[s
 }
 
 //采购单位画像包 -超级订阅升级版用户可以购买使用
-func buyerPortraitPackOrder(m map[string]interface{}, userId string) (*OrderInfo, string) {
-	uData := jy.GetBigVipUserBaseMsg(userId, util.Mysql, util.MQFW)
+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)
 	if uData.VipStatus <= 0 || uData.Vip_BuySet.Upgrade <= 0 {
 		return nil, "非新版超级订阅用户,暂无权益"
 	}

+ 4 - 3
src/jfw/modules/subscribepay/src/entity/resourcePackStruct.go

@@ -1,6 +1,7 @@
 package entity
 
 import (
+	"app.yhyue.com/moapp/jybase/go-xweb/httpsession"
 	"encoding/json"
 	"fmt"
 	"jy/src/jfw/modules/subscribepay/src/config"
@@ -115,7 +116,7 @@ type ReturnStruct struct {
 	Product       string                 `json:"product,omitempty"`       //产品类型 用户获取商品id
 }
 
-func (this *resoucePackStruct) Filter(product, userid, lotteryId, discountId string, m map[string]interface{}) (ReturnStruct, string) {
+func (this *resoucePackStruct) Filter(product, userid, lotteryId, discountId string, m map[string]interface{}, session *httpsession.Session) (ReturnStruct, string) {
 	filter := map[string]interface{}{}
 	rs := ReturnStruct{}
 	msg := ""
@@ -124,7 +125,7 @@ func (this *resoucePackStruct) Filter(product, userid, lotteryId, discountId str
 	case "dataExportPack":
 	//TODO
 	case "attachmentDownPack": //超级订阅用户可以购买
-		if jy.GetBigVipUserBaseMsg(userid, util.Mysql, util.MQFW).VipStatus <= 0 {
+		if jy.GetBigVipUserBaseMsg("10000", session, config.Config.Etcd.Hosts, config.Config.Etcd.Key).VipStatus <= 0 {
 			msg = "非超级订阅用户,暂无权益"
 		}
 		num := qu.IntAll(m["num"])
@@ -149,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(userid, util.Mysql, util.MQFW)
+		uData := jy.GetBigVipUserBaseMsg("10000", session, config.Config.Etcd.Hosts, config.Config.Etcd.Key)
 		if uData.VipStatus <= 0 || uData.Vip_BuySet.Upgrade <= 0 {
 			msg = "非新版超级订阅用户,暂无权益"
 		}

+ 4 - 4
src/jfw/modules/subscribepay/src/filter/mergefilter.go

@@ -1,13 +1,13 @@
 package filter
 
 import (
-	"config"
+	"app.yhyue.com/moapp/jybase/redis"
+	"app.yhyue.com/moapp/jypkg/common/src/qfw/util/jy"
 	"fmt"
+	"jy/src/jfw/modules/subscribepay/src/config"
+	"jy/src/jfw/modules/subscribepay/src/util"
 	"log"
 	"net/http"
-	"app.yhyue.com/moapp/jypkg/common/src/qfw/util/jy"
-	"app.yhyue.com/moapp/jybase/redis"
-	"jy/src/jfw/modules/subscribepay/src/util"
 
 	"app.yhyue.com/moapp/jybase/go-xweb/httpsession"
 )

+ 80 - 5
src/jfw/modules/subscribepay/src/go.mod

@@ -4,10 +4,11 @@ go 1.18
 
 require (
 	app.yhyue.com/moapp/jybase v0.0.0-20221230025810-b88f2a62c467
-	app.yhyue.com/moapp/jypkg v0.0.0-20221230014931-c9afd45ba90b
+	app.yhyue.com/moapp/jypkg v0.0.0-20230110033535-d6c3e4b755cf
 	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/go-xweb/xweb v0.2.1
 	github.com/shopspring/decimal v1.3.1
 	github.com/tealeg/xlsx v1.0.5
 	go.mongodb.org/mongo-driver v1.11.1
@@ -17,29 +18,103 @@ require (
 require (
 	app.yhyue.com/moapp/esv1 v0.0.0-20220414031211-3da4123e648d // indirect
 	app.yhyue.com/moapp/message v0.0.0-20221202072401-d825fc65512c // indirect
+	bp.jydev.jianyu360.cn/BaseService/powerCheckCenter v0.0.0-20230106052936-bd3ab7edf7a4 // 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/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
+	github.com/dgryski/go-rendezvous v0.0.0-20200823014737-9f7001d12a5f // indirect
 	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/garyburd/redigo v1.6.2 // indirect
-	github.com/go-sql-driver/mysql v1.6.0 // indirect
-	github.com/golang-jwt/jwt/v4 v4.4.2 // indirect
+	github.com/go-logr/logr v1.2.3 // indirect
+	github.com/go-logr/stdr v1.2.2 // indirect
+	github.com/go-redis/redis/v8 v8.11.5 // indirect
+	github.com/go-sql-driver/mysql v1.7.0 // indirect
+	github.com/go-xweb/httpsession v0.0.0-20141220075701-356d3b4d38d6 // indirect
+	github.com/go-xweb/log v0.0.0-20140701090824-270d183ad77e // indirect
+	github.com/go-xweb/uuid v0.0.0-20140604020037-d7dce341f851 // indirect
+	github.com/gogo/protobuf v1.3.2 // indirect
+	github.com/golang-jwt/jwt/v4 v4.4.3 // indirect
+	github.com/golang/mock v1.6.0 // indirect
+	github.com/golang/protobuf v1.5.2 // indirect
 	github.com/golang/snappy v0.0.4 // indirect
 	github.com/gomodule/redigo v1.8.9 // indirect
+	github.com/google/go-cmp v0.5.9 // indirect
+	github.com/google/gofuzz v1.2.0 // indirect
+	github.com/google/pprof v0.0.0-20211214055906-6f57359322fd // indirect
+	github.com/googleapis/gnostic v0.5.5 // indirect
+	github.com/grpc-ecosystem/grpc-gateway/v2 v2.7.0 // indirect
 	github.com/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/lunny/csession v0.0.0-20130910075847-fe53c5de3dfd // indirect
+	github.com/mattn/go-colorable v0.1.9 // indirect
+	github.com/mattn/go-isatty v0.0.14 // indirect
+	github.com/matttproud/golang_protobuf_extensions v1.0.2-0.20181231171920-c182affec369 // indirect
+	github.com/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/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
 	github.com/pkg/errors v0.9.1 // indirect
+	github.com/prometheus/client_golang v1.13.0 // indirect
+	github.com/prometheus/client_model v0.2.0 // indirect
+	github.com/prometheus/common v0.37.0 // indirect
+	github.com/prometheus/procfs v0.8.0 // indirect
 	github.com/robfig/cron v1.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
 	github.com/xdg-go/stringprep v1.0.3 // indirect
 	github.com/youmark/pkcs8 v0.0.0-20181117223130-1be2e3e5546d // indirect
+	github.com/zeromicro/go-zero v1.4.3 // indirect
+	go.etcd.io/etcd/api/v3 v3.5.5 // indirect
+	go.etcd.io/etcd/client/pkg/v3 v3.5.5 // indirect
+	go.etcd.io/etcd/client/v3 v3.5.5 // indirect
+	go.opentelemetry.io/otel v1.10.0 // indirect
+	go.opentelemetry.io/otel/exporters/jaeger v1.10.0 // indirect
+	go.opentelemetry.io/otel/exporters/otlp/internal/retry v1.10.0 // indirect
+	go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.10.0 // indirect
+	go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.10.0 // indirect
+	go.opentelemetry.io/otel/exporters/zipkin v1.10.0 // indirect
+	go.opentelemetry.io/otel/sdk v1.10.0 // indirect
+	go.opentelemetry.io/otel/trace v1.10.0 // indirect
+	go.opentelemetry.io/proto/otlp v0.19.0 // indirect
+	go.uber.org/atomic v1.9.0 // indirect
+	go.uber.org/automaxprocs v1.5.1 // indirect
+	go.uber.org/multierr v1.8.0 // indirect
+	go.uber.org/zap v1.21.0 // indirect
 	golang.org/x/crypto v0.0.0-20220622213112-05595931fe9d // indirect
-	golang.org/x/sync v0.0.0-20210220032951-036812b2e83c // indirect
-	golang.org/x/text v0.3.8-0.20211105212822-18b340fc7af2 // indirect
+	golang.org/x/net v0.0.0-20221014081412-f15817d10f9b // indirect
+	golang.org/x/oauth2 v0.0.0-20221014153046-6fdb5e3db783 // indirect
+	golang.org/x/sync v0.1.0 // indirect
+	golang.org/x/sys v0.0.0-20220728004956-3c1f35247d10 // indirect
+	golang.org/x/term v0.0.0-20210927222741-03fcf44c2211 // indirect
+	golang.org/x/text v0.4.0 // indirect
+	golang.org/x/time v0.3.0 // indirect
+	google.golang.org/appengine v1.6.7 // indirect
+	google.golang.org/genproto v0.0.0-20221111202108-142d8a6fa32e // indirect
+	google.golang.org/grpc v1.51.0 // indirect
+	google.golang.org/protobuf v1.28.1 // indirect
 	gopkg.in/alexcesaro/quotedprintable.v3 v3.0.0-20150716171945-2caba252f4dc // indirect
+	gopkg.in/inf.v0 v0.9.1 // indirect
+	gopkg.in/yaml.v2 v2.4.0 // indirect
+	gopkg.in/yaml.v3 v3.0.1 // indirect
 	gorm.io/driver/mysql v1.0.5 // indirect
 	gorm.io/gorm v1.21.3 // indirect
+	k8s.io/api v0.22.9 // indirect
+	k8s.io/apimachinery v0.22.9 // indirect
+	k8s.io/client-go v0.22.9 // indirect
+	k8s.io/klog/v2 v2.80.1 // indirect
+	k8s.io/utils v0.0.0-20221108210102-8e77b1f39fe2 // indirect
+	sigs.k8s.io/structured-merge-diff/v4 v4.2.1 // indirect
+	sigs.k8s.io/yaml v1.2.0 // indirect
 )

ファイルの差分が大きいため隠しています
+ 531 - 6
src/jfw/modules/subscribepay/src/go.sum


+ 4 - 2
src/jfw/modules/subscribepay/src/rpcfollow/share.go

@@ -1,7 +1,9 @@
 package rpcfollow
 
 import (
+	"app.yhyue.com/moapp/jybase/go-xweb/httpsession"
 	"encoding/json"
+	"jy/src/jfw/modules/subscribepay/src/config"
 	"jy/src/jfw/modules/subscribepay/src/entity"
 	"jy/src/jfw/modules/subscribepay/src/util"
 	"time"
@@ -100,10 +102,10 @@ func (s *JyPayRpc) ShareFissionNew(p *frpc.JYShareUserIdsRes, r *frpc.JYShareRes
 }
 
 //获取用户权益信息
-func (s *JyPayRpc) GetUserPowerInfo(p *frpc.JYShareUserIdsRes, r *frpc.JYShareResp) error {
+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(ps.UserId, util.Mysql, util.MQFW)
+		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

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

@@ -2,8 +2,8 @@ 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"
 	"time"
 
@@ -33,7 +33,7 @@ func (this *ResourcePack) ConsumePack() {
 			"infoType": infoType,
 		}
 		log.Println(infoType, "----", remarks)
-		Ret, Msg, Code := entity.JyConsumePack(userId, productName, platform, remarks)
+		Ret, Msg, Code := entity.JyConsumePack(userId, productName, platform, remarks, this.Session())
 		if Msg != "" && Code == 0 {
 			return nil, fmt.Sprintf("%s 使用异常:%s", productName, Msg)
 		}
@@ -66,7 +66,7 @@ func (this *ResourcePack) RecordList() {
 		if productName == "" || platform == "" {
 			return "参数有误", nil
 		}
-		vipMsg := jy.GetBigVipUserBaseMsg(userId, util.Mysql, util.MQFW)
+		vipMsg := jy.GetBigVipUserBaseMsg("10000", this.Session(), config.Config.Etcd.Hosts, config.Config.Etcd.Key)
 		if vipMsg.VipStatus <= 0 {
 			return "无权限,请联系管理员", nil
 		}

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

@@ -36,7 +36,7 @@ func (this *Bigmember) CreateOrderCheck() {
 			"course_status": 2,
 		})
 		//校验是否是大会员
-		vipStatus := jy.GetBigVipUserBaseMsg(userId, util.Mysql, util.MQFW)
+		vipStatus := jy.GetBigVipUserBaseMsg("10000", this.Session(), config.Config.Etcd.Hosts, config.Config.Etcd.Key)
 		return map[string]interface{}{
 			"vipStatus":        vipStatus.Status,
 			"hasPid":           vipStatus.Pid != "",
@@ -71,7 +71,7 @@ func (b *Bigmember) CreateOrder() {
 		level, _ := b.GetInteger("level") //1:专业版;2:智慧版;3:商机版;4:试用版 5:试用版 6:商机版2.0 7:专家版2.0
 		cycle, _ := b.GetInteger("cycle")
 		//校验是否是大会员
-		vipStatus := jy.GetBigVipUserBaseMsg(userId, util.Mysql, util.MQFW)
+		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}
 		}

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

@@ -529,7 +529,7 @@ func (this *CommonAction) Createorder() {
 		i_discountId := qutil.IntAll(data["discountId"])  //赠品相关
 		discountId := strconv.Itoa(i_discountId)
 
-		inserMap, msg := entity.JyCommonOrderStruct.InserMap(product, productId, userid, lotteryId, discountId, data)
+		inserMap, msg := entity.JyCommonOrderStruct.InserMap(product, productId, userid, lotteryId, discountId, data, this.Session())
 		//错误信息
 		if msg != "" {
 			return nil, fmt.Errorf(msg)

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

@@ -359,7 +359,7 @@ func (this *DataExportPack) PackPay() {
 				userPhone = reqPhone
 				userMail = reqMail
 			}
-			err := entity.JyDataExportPack.UseDailyPack(userId, filterId, userPhone, userMail, selectCount)
+			err := entity.JyDataExportPack.UseDailyPack(userId, filterId, userPhone, userMail, selectCount, this.Session())
 			if err != nil {
 				return nil, err
 			}
@@ -432,7 +432,7 @@ func (this *DataExportPack) RecordList() {
 		pageSize, _ := this.GetInteger("pageSize")
 		pageNum, _ := this.GetInteger("pageNum")
 
-		vipMsg := jy.GetBigVipUserBaseMsg(userId, util.Mysql, util.MQFW)
+		vipMsg := jy.GetBigVipUserBaseMsg("10000", this.Session(), config.Config.Etcd.Hosts, config.Config.Etcd.Key)
 		entId := qutil.IntAll(this.GetSession("entId"))
 		entUserId := qutil.IntAll(this.GetSession("entUserId"))
 

+ 7 - 7
src/jfw/modules/subscribepay/src/service/exceptionVerification.go

@@ -1,16 +1,16 @@
 package service
 
 import (
-	. "api"
-	"config"
+	. "app.yhyue.com/moapp/jybase/api"
+	qutil "app.yhyue.com/moapp/jybase/common"
+	"app.yhyue.com/moapp/jybase/go-xweb/xweb"
+	"app.yhyue.com/moapp/jybase/redis"
+	"app.yhyue.com/moapp/jypkg/common/src/qfw/util/jy"
 	"fmt"
-	"github.com/go-xweb/xweb"
+	"jy/src/jfw/modules/subscribepay/src/config"
+	"jy/src/jfw/modules/subscribepay/src/util"
 	"log"
-	qutil "qfw/util"
-	"qfw/util/jy"
-	"qfw/util/redis"
 	"time"
-	"util"
 )
 
 type ExceptionVerification struct {

+ 0 - 4
src/jfw/modules/subscribepay/src/service/phoneCollent.go

@@ -91,14 +91,10 @@ func (this *PhoneCollent) NeedBind() {
 			reg := time.Unix(regtime, 0)
 			//新用户时间
 			accountMergeOnline := config.Config.AccountMergeOnline
-<<<<<<< HEAD
 			onLineTime, _ := time.ParseInLocation(Date_Full_Layout, accountMergeOnline, time.Local)
 			if remind, _ := (*person)["b_merge_remind"].(bool); remind { //不再提醒
 				return false
 			}
-=======
-			onLineTime, _ := time.ParseInLocation(qutil.Date_Full_Layout, accountMergeOnline, time.Local)
->>>>>>> master
 			if onLineTime.Before(reg) { //新用户
 				return true
 			}

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

@@ -84,7 +84,7 @@ func (this *ResourcePack) CreateOrder() {
 	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)
+	filter, msg := entity.JyresoucePack.Filter(product, userId, lotteryId, discountId, data, this.Session())
 	//错误信息
 	if msg != "" {
 		this.ServeJson(OrderResult{Msg: msg})
@@ -159,7 +159,7 @@ func (this *ResourcePack) Account() {
 		this.ServeJson(Result{Error_msg: "参数错误"})
 		return
 	}
-	vipMsg := jy.GetBigVipUserBaseMsg(userId, util.Mysql, util.MQFW)
+	vipMsg := jy.GetBigVipUserBaseMsg("10000", this.Session(), config.Config.Etcd.Hosts, config.Config.Etcd.Key)
 	if vipMsg.VipStatus <= 0 {
 		this.ServeJson(Result{Error_msg: "无权限,请联系管理员"})
 		return

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

@@ -1,594 +1,594 @@
 package service
 
 import (
-        . "api"
-        "config"
-        "encoding/base64"
-        "encoding/json"
-        "entity"
-        "errors"
-        "fmt"
-        "log"
-        "net/url"
-        "pay"
-        qutil "qfw/util"
-        "qfw/util/jy"
-        "qfw/util/redis"
-        "strconv"
-        "time"
-        "util"
-
-        "github.com/SKatiyar/qr"
-        "github.com/go-xweb/xweb"
-        "go.mongodb.org/mongo-driver/bson"
+	. "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"
+	"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)
-                //错误信息
-                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(qutil.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(qutil.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)
-                }
+			bb, err := json.Marshal(filterMap)
+			if err != nil {
+				return nil, fmt.Errorf("创建订单异常-Marshal")
+			}
+			inserMap.Filter = string(bb)
+		}
 
-                now := time.Now()
-                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":          qutil.FormatDate(&now, qutil.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,         //默认审核通过
-                }
+		now := time.Now()
+		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,         //默认审核通过
+		}
 
-                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(qutil.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":  qutil.FormatDate(&now, qutil.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(qutil.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(userId, util.Mysql, util.MQFW)
-                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), //免费订阅区分新老用户
-                        "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("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), //免费订阅区分新老用户
+			"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)
-        }()
-        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)
-                        //如果手机号号为空查找通过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)
+			//如果手机号号为空查找通过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())
 }

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

@@ -1,643 +1,643 @@
 package service
 
 import (
-        "config"
-        "encoding/json"
-        "entity"
-        "errors"
-        "fmt"
-        "log"
-        "math"
-        "pay"
-        qutil "qfw/util"
-        "qfw/util/jy"
-        "strings"
-        "time"
-        "util"
-
-        "github.com/go-xweb/xweb"
-        "go.mongodb.org/mongo-driver/bson"
+	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"
+	"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(userId, util.Mysql, util.MQFW)
-                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), //免费订阅区分新老用户
-                        "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("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), //免费订阅区分新老用户
+			"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{}
-                }
-                updateOk := util.MQFW.UpdateById("user", userId,
-                        bson.M{"$set": bson.M{
-                                "o_vipjy.o_area":       area,     //设置地区
-                                "o_vipjy.a_buyerclass": industry, //设置行业
-                        }})
-                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{}
+		}
+		updateOk := util.MQFW.UpdateById("user", userId,
+			bson.M{"$set": bson.M{
+				"o_vipjy.o_area":       area,     //设置地区
+				"o_vipjy.a_buyerclass": industry, //设置行业
+			}})
+		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"))
-                insertMap := map[string]interface{}{
-                        "order_money":          final_price,
-                        "order_status":         order_status,
-                        "user_openid":          openId,
-                        "order_code":           ordercode,
-                        "product_type":         "VIP订阅",
-                        "create_time":          qutil.FormatDate(&now, qutil.Date_Full_Layout),
-                        "original_price":       final_price + discount_price, //原价
-                        "filter_id":            "",
-                        "user_id":              userId,
-                        "filter":               string(filterStr), //筛选
-                        "vip_endtime":          qutil.FormatDate(&endTime, qutil.Date_Full_Layout),
-                        "vip_starttime":        qutil.FormatDate(&startTime, qutil.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,                   //默认审核通过
-                }
-                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) {
-                                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"))
+		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,                   //默认审核通过
+		}
+		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) {
+				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 != "" {
-                        updateOk := util.MQFW.UpdateById("user", userId,
-                                bson.M{"$set": bson.M{
-                                        "o_vipjy.a_buyerclass": industry, //设置行业
-                                        "isread":               isread,
-                                }})
-                        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 != "" {
+			updateOk := util.MQFW.UpdateById("user", userId,
+				bson.M{"$set": bson.M{
+					"o_vipjy.a_buyerclass": industry, //设置行业
+					"isread":               isread,
+				}})
+			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) 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{})
-        if len(ojy) > 0 {
-                if ojy["i_new"] != nil {
-                        return qutil.IntAllDef(ojy["i_new"], 1)
-                }
-                optime, _ := time.ParseInLocation(qutil.Date_Full_Layout, config.Config.OptimalTime, time.Local)
-                regtime, _ := (*mData)["l_registedate"].(int64)
-                //如果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{})
+	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)["l_registedate"].(int64)
+		//如果a_key 存在 即为老用户
+		if (ojy["a_key"] == nil && time.Unix(regtime, 0).Before(optime)) || (time.Unix(regtime, 0).After(optime)) {
+			return 1
+		}
+	}
+	return 0
 }

+ 4 - 3
src/jfw/modules/subscribepay/src/service/vipSubscribePay.go

@@ -1,6 +1,7 @@
 package service
 
 import (
+	"app.yhyue.com/moapp/jybase/go-xweb/httpsession"
 	"encoding/json"
 	"errors"
 	"fmt"
@@ -44,20 +45,20 @@ func (this *SubVipPayOrder) GetSelectPrice() {
 		//卡卷信息的id
 		lotteryId := this.GetString("lotteryId")
 		useProduct, _ := this.GetInteger("useProduct")
-		return CommonBilling(area, timeRenew, userId, lotteryId, orderType, 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) *entity.FuncResult {
+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(userId, util.Mysql, util.MQFW)
+	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 { //购买价格

この差分においてかなりの量のファイルが変更されているため、一部のファイルを表示していません