浏览代码

自助导出转 go mod

Jianghan 8 月之前
父节点
当前提交
727ab538fd
共有 100 个文件被更改,包括 1267 次插入523 次删除
  1. 1 1
      .gitignore
  2. 7 0
      README.md
  3. 28 29
      SEPlatform/client/client.go
  4. 19 19
      SEPlatform/client/customerRule.go
  5. 65 64
      SEPlatform/client/ownTag.go
  6. 2 2
      SEPlatform/client/util_client.go
  7. 0 0
      SEPlatform/config.json
  8. 0 0
      SEPlatform/doc/客户服务数据模型.xlsx
  9. 0 0
      SEPlatform/doc/标签系统导入模版.xlsx
  10. 0 0
      SEPlatform/es.json
  11. 0 0
      SEPlatform/filter/filter.go
  12. 0 0
      SEPlatform/filter/sessfilter.go
  13. 17 16
      SEPlatform/front/front.go
  14. 2 2
      SEPlatform/front/logic.go
  15. 11 11
      SEPlatform/front/menu.go
  16. 10 10
      SEPlatform/front/role.go
  17. 51 0
      SEPlatform/go.mod
  18. 438 0
      SEPlatform/go.sum
  19. 11 16
      SEPlatform/main.go
  20. 53 0
      SEPlatform/models/tag.go
  21. 15 17
      SEPlatform/recharge/recharge.go
  22. 94 95
      SEPlatform/service/customer_service.go
  23. 16 16
      SEPlatform/service/feedback_service.go
  24. 14 15
      SEPlatform/service/private_rule.go
  25. 11 14
      SEPlatform/service/private_service.go
  26. 39 41
      SEPlatform/service/second_push.go
  27. 213 0
      SEPlatform/sqlmodel/rules_es.go
  28. 0 0
      SEPlatform/util/chain-zhang/pinyin/LICENSE
  29. 0 0
      SEPlatform/util/chain-zhang/pinyin/Makefile
  30. 0 0
      SEPlatform/util/chain-zhang/pinyin/README.md
  31. 0 0
      SEPlatform/util/chain-zhang/pinyin/codecov.yml
  32. 0 0
      SEPlatform/util/chain-zhang/pinyin/error.go
  33. 0 0
      SEPlatform/util/chain-zhang/pinyin/go.mod
  34. 0 0
      SEPlatform/util/chain-zhang/pinyin/pinyin.go
  35. 0 0
      SEPlatform/util/chain-zhang/pinyin/pinyin.txt
  36. 0 0
      SEPlatform/util/chain-zhang/pinyin/pinyin_test.go
  37. 0 0
      SEPlatform/util/chain-zhang/pinyin/resource.go
  38. 5 7
      SEPlatform/util/clearHtml.go
  39. 20 24
      SEPlatform/util/config.go
  40. 6 5
      SEPlatform/util/cost_util.go
  41. 0 0
      SEPlatform/util/deepcopy.go
  42. 0 0
      SEPlatform/util/dfa.go
  43. 1 1
      SEPlatform/util/jylog.go
  44. 32 29
      SEPlatform/util/parsxlsx.go
  45. 12 13
      SEPlatform/util/util.go
  46. 74 76
      SEPlatform/util/utiltag.go
  47. 0 0
      SEPlatform/web/res/bower_components/Ionicons/.bower.json
  48. 0 0
      SEPlatform/web/res/bower_components/Ionicons/LICENSE
  49. 0 0
      SEPlatform/web/res/bower_components/Ionicons/bower.json
  50. 0 0
      SEPlatform/web/res/bower_components/Ionicons/cheatsheet.html
  51. 0 0
      SEPlatform/web/res/bower_components/Ionicons/component.json
  52. 0 0
      SEPlatform/web/res/bower_components/Ionicons/composer.json
  53. 0 0
      SEPlatform/web/res/bower_components/Ionicons/css/ionicons.css
  54. 0 0
      SEPlatform/web/res/bower_components/Ionicons/css/ionicons.min.css
  55. 0 0
      SEPlatform/web/res/bower_components/Ionicons/fonts/ionicons.eot
  56. 0 0
      SEPlatform/web/res/bower_components/Ionicons/fonts/ionicons.svg
  57. 0 0
      SEPlatform/web/res/bower_components/Ionicons/fonts/ionicons.ttf
  58. 0 0
      SEPlatform/web/res/bower_components/Ionicons/fonts/ionicons.woff
  59. 0 0
      SEPlatform/web/res/bower_components/Ionicons/less/_ionicons-font.less
  60. 0 0
      SEPlatform/web/res/bower_components/Ionicons/less/_ionicons-icons.less
  61. 0 0
      SEPlatform/web/res/bower_components/Ionicons/less/_ionicons-variables.less
  62. 0 0
      SEPlatform/web/res/bower_components/Ionicons/less/ionicons.less
  63. 0 0
      SEPlatform/web/res/bower_components/Ionicons/png/512/alert-circled.png
  64. 0 0
      SEPlatform/web/res/bower_components/Ionicons/png/512/alert.png
  65. 0 0
      SEPlatform/web/res/bower_components/Ionicons/png/512/android-add-contact.png
  66. 0 0
      SEPlatform/web/res/bower_components/Ionicons/png/512/android-add.png
  67. 0 0
      SEPlatform/web/res/bower_components/Ionicons/png/512/android-alarm.png
  68. 0 0
      SEPlatform/web/res/bower_components/Ionicons/png/512/android-archive.png
  69. 0 0
      SEPlatform/web/res/bower_components/Ionicons/png/512/android-arrow-back.png
  70. 0 0
      SEPlatform/web/res/bower_components/Ionicons/png/512/android-arrow-down-left.png
  71. 0 0
      SEPlatform/web/res/bower_components/Ionicons/png/512/android-arrow-down-right.png
  72. 0 0
      SEPlatform/web/res/bower_components/Ionicons/png/512/android-arrow-forward.png
  73. 0 0
      SEPlatform/web/res/bower_components/Ionicons/png/512/android-arrow-up-left.png
  74. 0 0
      SEPlatform/web/res/bower_components/Ionicons/png/512/android-arrow-up-right.png
  75. 0 0
      SEPlatform/web/res/bower_components/Ionicons/png/512/android-battery.png
  76. 0 0
      SEPlatform/web/res/bower_components/Ionicons/png/512/android-book.png
  77. 0 0
      SEPlatform/web/res/bower_components/Ionicons/png/512/android-calendar.png
  78. 0 0
      SEPlatform/web/res/bower_components/Ionicons/png/512/android-call.png
  79. 0 0
      SEPlatform/web/res/bower_components/Ionicons/png/512/android-camera.png
  80. 0 0
      SEPlatform/web/res/bower_components/Ionicons/png/512/android-chat.png
  81. 0 0
      SEPlatform/web/res/bower_components/Ionicons/png/512/android-checkmark.png
  82. 0 0
      SEPlatform/web/res/bower_components/Ionicons/png/512/android-clock.png
  83. 0 0
      SEPlatform/web/res/bower_components/Ionicons/png/512/android-close.png
  84. 0 0
      SEPlatform/web/res/bower_components/Ionicons/png/512/android-contact.png
  85. 0 0
      SEPlatform/web/res/bower_components/Ionicons/png/512/android-contacts.png
  86. 0 0
      SEPlatform/web/res/bower_components/Ionicons/png/512/android-data.png
  87. 0 0
      SEPlatform/web/res/bower_components/Ionicons/png/512/android-developer.png
  88. 0 0
      SEPlatform/web/res/bower_components/Ionicons/png/512/android-display.png
  89. 0 0
      SEPlatform/web/res/bower_components/Ionicons/png/512/android-download.png
  90. 0 0
      SEPlatform/web/res/bower_components/Ionicons/png/512/android-drawer.png
  91. 0 0
      SEPlatform/web/res/bower_components/Ionicons/png/512/android-dropdown.png
  92. 0 0
      SEPlatform/web/res/bower_components/Ionicons/png/512/android-earth.png
  93. 0 0
      SEPlatform/web/res/bower_components/Ionicons/png/512/android-folder.png
  94. 0 0
      SEPlatform/web/res/bower_components/Ionicons/png/512/android-forums.png
  95. 0 0
      SEPlatform/web/res/bower_components/Ionicons/png/512/android-friends.png
  96. 0 0
      SEPlatform/web/res/bower_components/Ionicons/png/512/android-hand.png
  97. 0 0
      SEPlatform/web/res/bower_components/Ionicons/png/512/android-image.png
  98. 0 0
      SEPlatform/web/res/bower_components/Ionicons/png/512/android-inbox.png
  99. 0 0
      SEPlatform/web/res/bower_components/Ionicons/png/512/android-information.png
  100. 0 0
      SEPlatform/web/res/bower_components/Ionicons/png/512/android-keypad.png

+ 1 - 1
.gitignore

@@ -6,7 +6,7 @@ bin
 */src/src
 *.data
 */bin
-/src/util/utiltag_test.go
+/SEPlatform/util/utiltag_test.go
 .idea/
 customerdata/.DS_Store
 customerdata/src/.DS_Store

+ 7 - 0
README.md

@@ -1 +1,8 @@
 海康威视、赛博英杰、浪潮定制化客户管理系统
+
+
+
+
+
+### CMPlatform 客户管理平台
+### SEPlatform 自助导出管理系统

+ 28 - 29
src/client/client.go → SEPlatform/client/client.go

@@ -1,19 +1,18 @@
 package client
 
 import (
+	qu "app.yhyue.com/moapp/jybase/common"
+	"app.yhyue.com/moapp/jybase/encrypt"
+	"app.yhyue.com/moapp/jybase/go-xweb/xweb"
+	"app.yhyue.com/moapp/jybase/mongodb"
 	"encoding/json"
 	"fmt"
-	mongoutil "qfw/mongodb"
-	qu "qfw/util"
+	"github.com/lauyoume/gopinyin"
+	"go.mongodb.org/mongo-driver/bson"
 	"regexp"
+	. "seplatform/util"
 	"strconv"
 	"time"
-	. "util"
-
-	"github.com/go-xweb/xweb"
-	"github.com/lauyoume/gopinyin"
-
-	"gopkg.in/mgo.v2/bson"
 )
 
 type Client struct {
@@ -21,7 +20,7 @@ type Client struct {
 	index           xweb.Mapper `xweb:"/client/index"`       //客户首页
 	cuserRuleDel    xweb.Mapper `xweb:"/client/rule/del"`    //删除规则
 	adminIndex      xweb.Mapper `xweb:"/admin/index"`        //管理员首页
-	personnelIndex  xweb.Mapper `xweb:"/personnel/index"`    //员工首页
+	personnelIndex  xweb.Mapper `xweb:"/personel/index"`     //员工首页
 	cuserRuleCreate xweb.Mapper `xweb:"/client/rule/create"` //新建规则
 	cuserRuleEdit   xweb.Mapper `xweb:"/client/rule/edit"`   //修改规则
 	exportLog       xweb.Mapper `xweb:"/client/exportLog"`   //导出页面
@@ -54,7 +53,7 @@ func (this *Client) AdminIndex() {
 					v["departName"] = dName
 				}
 			}
-			v["id"] = qu.SE.EncodeString(strconv.Itoa(userId))
+			v["id"] = encrypt.SE.EncodeString(strconv.Itoa(userId))
 		}
 		this.T["entUserArr"] = *entUserArr
 	}
@@ -65,24 +64,24 @@ func (this *Client) PersonnelIndex() {
 	defer qu.Catch()
 	id := this.GetString("id")
 	if this.Method() == "POST" {
-		start, _ := this.GetInteger("start")
-		limit, _ := this.GetInteger("length")
-		draw, _ := this.GetInteger("draw")
+		start, _ := this.GetInt("start")
+		limit, _ := this.GetInt("length")
+		draw, _ := this.GetInt("draw")
 		entUserId := 0
 		user := this.GetSession("user").(map[string]interface{})
 		if id == "" {
 			entUserId = qu.IntAll(user["id"])
 		} else {
-			entUserId, _ = strconv.Atoi(qu.SE.DecodeString(id))
+			entUserId, _ = strconv.Atoi(encrypt.SE.DecodeString(id))
 		}
 		entId := qu.IntAll(user["ent_id"])
 		count := Mgo.Count("entniche_rule", map[string]interface{}{"entId": entId, "entUserId": entUserId})
 
-		entRuleArr, ok := Mgo.Find("entniche_rule", map[string]interface{}{"entId": entId, "entUserId": entUserId}, `{"_id":-1}`, nil, false, start, limit)
+		entRuleArr, ok := Mgo.Find("entniche_rule", map[string]interface{}{"entId": entId, "entUserId": entUserId}, `{"_id":-1}`, nil, false, int(start), int(limit))
 		if ok && entRuleArr != nil && *entRuleArr != nil && len(*entRuleArr) > 0 {
 			for _, v := range *entRuleArr {
-				ruleid := mongoutil.BsonIdToSId(v["_id"])
-				v["_id"] = qu.SE.EncodeString(ruleid)
+				ruleid := mongodb.BsonIdToSId(v["_id"])
+				v["_id"] = encrypt.SE.EncodeString(ruleid)
 			}
 			this.ServeJson(map[string]interface{}{
 				"draw":            draw,
@@ -105,7 +104,7 @@ func (this *Client) PersonnelIndex() {
 		if id == "" {
 			entUserId = qu.IntAll(user["id"])
 		} else {
-			entUserId, _ = strconv.Atoi(qu.SE.DecodeString(id))
+			entUserId, _ = strconv.Atoi(encrypt.SE.DecodeString(id))
 		}
 		entId := qu.IntAll(user["ent_id"])
 		leftNumData := JyMysql.FindOne("user_account", map[string]interface{}{"user_id": entUserId, "ent_id": entId}, "left_num", "")
@@ -122,7 +121,7 @@ func (this *Client) PersonnelIndex() {
 func (c *Client) CuserRuleDel() {
 	defer qu.Catch()
 	_id := c.GetString("_id")
-	b := Mgo.Del("entniche_rule", map[string]interface{}{"_id": mongoutil.StringTOBsonId(qu.SE.DecodeString(_id))})
+	b := Mgo.Del("entniche_rule", map[string]interface{}{"_id": mongodb.StringTOBsonId(encrypt.SE.DecodeString(_id))})
 	c.ServeJson(map[string]interface{}{
 		"rep": b,
 	})
@@ -183,7 +182,7 @@ func (c *Client) CuserRuleCreate() {
 			data["appid"] = qu.ObjToString(user["appid"])
 			data["entId"] = qu.IntAll(user["ent_id"])
 			query := bson.M{
-				"_id": mongoutil.StringTOBsonId(id),
+				"_id": mongodb.StringTOBsonId(id),
 			}
 			rep = Mgo.Update("entniche_rule", query, bson.M{"$set": data}, false, false)
 		}
@@ -198,7 +197,7 @@ func (c *Client) CuserRuleCreate() {
 		user := c.GetSession("user").(map[string]interface{})
 		c.T["did"] = user["ent_id"]
 		c.T["cid"] = user["id"]
-		entstr := qu.SE.DecodeString(c.GetString("entUserId"))
+		entstr := encrypt.SE.DecodeString(c.GetString("entUserId"))
 		c.T["entUserId"], _ = strconv.Atoi(entstr)
 		c.T["province"] = Province
 		c.T["city"] = ProvinceCitys
@@ -218,10 +217,10 @@ func (c *Client) CuserRuleCreate() {
 
 func (c *Client) CuserRuleEdit() {
 	defer qu.Catch()
-	id := qu.SE.DecodeString(c.GetString("id"))
-	query := bson.M{"_id": mongoutil.StringTOBsonId(id)}
+	id := encrypt.SE.DecodeString(c.GetString("id"))
+	query := bson.M{"_id": mongodb.StringTOBsonId(id)}
 	data, _ := Mgo.FindOneByField("entniche_rule", query, `{}`)
-	(*data)["id"] = mongoutil.BsonIdToSId((*data)["_id"])
+	(*data)["id"] = mongodb.BsonIdToSId((*data)["_id"])
 	c.T["cid"] = (*data)["s_userid"]
 	c.T["ids"] = qu.ObjToString((*data)["s_departid"]) + "," + qu.ObjToString((*data)["s_userid"])
 	c.T["data"] = *data
@@ -246,11 +245,11 @@ func (this *Client) DataPreview() {
 
 func (this *Client) ExportLog() {
 	if this.Method() == "POST" {
-		id, _ := this.GetInteger("id")
+		id, _ := this.GetInt("id")
 
-		start, _ := this.GetInteger("start")
-		limit, _ := this.GetInteger("length")
-		draw, _ := this.GetInteger("draw")
+		start, _ := this.GetInt("start")
+		limit, _ := this.GetInt("length")
+		draw, _ := this.GetInt("draw")
 		sqls := fmt.Sprintf("select count(1) from user_expend_record where user_id = %d", id)
 		count := JyMysql.CountBySql(sqls)
 		if count > 0 {
@@ -280,7 +279,7 @@ func (this *Client) ExportLog() {
 			})
 		}
 	} else {
-		id, _ := strconv.Atoi(qu.SE.DecodeString(this.GetString("id")))
+		id, _ := strconv.Atoi(encrypt.SE.DecodeString(this.GetString("id")))
 		this.T["id"] = id
 		this.Render("client/exportLog.html", &this.T)
 	}

+ 19 - 19
src/client/customerRule.go → SEPlatform/client/customerRule.go

@@ -1,23 +1,23 @@
 package client
 
 import (
+	qu "app.yhyue.com/moapp/jybase/common"
+	"app.yhyue.com/moapp/jybase/encrypt"
+	"app.yhyue.com/moapp/jybase/go-xweb/xweb"
+	"app.yhyue.com/moapp/jybase/mongodb"
+	"app.yhyue.com/moapp/jybase/redis"
 	"encoding/json"
 	"errors"
 	"fmt"
+	"github.com/lauyoume/gopinyin"
+	"go.mongodb.org/mongo-driver/bson"
 	"io/ioutil"
 	"log"
-	mongoutil "qfw/mongodb"
-	qu "qfw/util"
-	"qfw/util/redis"
 	"regexp"
-	sql "sqlmodel"
+	sql "seplatform/sqlmodel"
+	. "seplatform/util"
 	"strings"
 	"time"
-	. "util"
-
-	"github.com/go-xweb/xweb"
-	"github.com/lauyoume/gopinyin"
-	"gopkg.in/mgo.v2/bson"
 )
 
 type CustomerRule struct {
@@ -60,7 +60,7 @@ func (c *CustomerRule) CuserRuleCreate() {
 			s_namekey := gopinyin.Convert(qu.ObjToString(data["s_name"]), false)
 			data["s_namekey"] = s_namekey
 			data["b_delete"] = false
-			data["s_dataid"] = qu.SE.EncodeString(fmt.Sprintf("%v", i_createtime) + s_namekey + ids[0])
+			data["s_dataid"] = encrypt.SE.EncodeString(fmt.Sprintf("%v", i_createtime) + s_namekey + ids[0])
 			id = Mgo.Save("cuserdepartrule", data)
 			if id != "" {
 				rep = true
@@ -69,7 +69,7 @@ func (c *CustomerRule) CuserRuleCreate() {
 			}
 		} else {
 			query := bson.M{
-				"_id": mongoutil.StringTOBsonId(id),
+				"_id": mongodb.StringTOBsonId(id),
 			}
 			rep = Mgo.Update("cuserdepartrule", query, bson.M{"$set": data}, false, false)
 		}
@@ -314,7 +314,7 @@ func (r *CustomerRule) DemoData() {
 	defer qu.Catch()
 	if r.Method() == "POST" {
 		id := r.GetString("id")
-		draw, _ := r.GetInteger("draw")
+		draw, _ := r.GetInt("draw")
 		tag, _ := Mgo.FindById("entniche_rule", id, `{}`)
 		tags := *tag
 		maths := make([]map[string]string, 0)
@@ -371,10 +371,10 @@ func (r *CustomerRule) DemoData() {
 				subType := qu.ObjToString(item["subtype"])
 				subTypeStr := "拟建,采购意向,预告,预审,预审结果,论证意见,需求公示"
 				if strings.Contains(subTypeStr, subType) {
-					item["s_jyhref"] = `https://www.jianyu360.cn/article/bdprivate/` + qu.CommonEncodeArticle("bdprivate", info_id) + `.html`
+					item["s_jyhref"] = `https://www.jianyu360.cn/article/bdprivate/` + encrypt.CommonEncodeArticle("bdprivate", info_id) + `.html`
 				} else {
 					// item["s_jyhref"] = `https://www.jianyu360.cn/article/content/` + qu.CommonEncodeArticle("content", info_id) + `.html`
-					item["s_jyhref"] = `https://www.jianyu360.cn/article/entservice/` + qu.SE3.EncodeString(info_id) + `.html?appid`
+					item["s_jyhref"] = `https://www.jianyu360.cn/article/entservice/` + encrypt.SE3.EncodeString(info_id) + `.html?appid`
 				}
 				//
 				item["i_createtime"] = time.Now().Unix()
@@ -388,15 +388,15 @@ func (r *CustomerRule) DemoData() {
 				}
 				findwinner := strings.TrimSpace(qu.ObjToString(item["winner"]))
 				if findwinner != "" {
-					finddata := MgoEnps.FindOne(EnpsColl, bson.M{"company_name": findwinner})
+					finddata, _ := MgoEnps.FindOne(EnpsColl, bson.M{"company_name": findwinner})
 					if finddata != nil {
-						if legal_person := qu.ObjToString(finddata["legal_person"]); legal_person != "" {
+						if legal_person := qu.ObjToString((*finddata)["legal_person"]); legal_person != "" {
 							item["legal_person"] = legal_person
 						}
-						if email := qu.ObjToString(finddata["company_email"]); email != "" {
+						if email := qu.ObjToString((*finddata)["company_email"]); email != "" {
 							item["company_email"] = email
 						}
-						if phone := qu.ObjToString(finddata["company_phone"]); phone != "" {
+						if phone := qu.ObjToString((*finddata)["company_phone"]); phone != "" {
 							item["company_phone"] = phone
 						}
 						item["qyk"] = finddata
@@ -488,7 +488,7 @@ func (this *CustomerRule) DataTest(id string) {
 	//
 	log.Println("id", id)
 	//加载一个客户
-	customer, _ := Mgo.Find("cuserdepartrule", map[string]interface{}{"_id": mongoutil.StringTOBsonId(id)}, nil, nil, false, -1, -1)
+	customer, _ := Mgo.Find("cuserdepartrule", map[string]interface{}{"_id": mongodb.StringTOBsonId(id)}, nil, nil, false, -1, -1)
 	if len(*customer) == 1 {
 		c := (*customer)[0]
 

+ 65 - 64
src/client/ownTag.go → SEPlatform/client/ownTag.go

@@ -1,19 +1,21 @@
 package client
 
 import (
+	qu "app.yhyue.com/moapp/jybase/common"
+	"app.yhyue.com/moapp/jybase/encrypt"
+	"app.yhyue.com/moapp/jybase/go-xweb/xweb"
+	"app.yhyue.com/moapp/jybase/mongodb"
 	"encoding/json"
 	"fmt"
-	"github.com/go-xweb/xweb"
 	"github.com/lauyoume/gopinyin"
-	"gopkg.in/mgo.v2/bson"
+	"go.mongodb.org/mongo-driver/bson"
+	"go.mongodb.org/mongo-driver/bson/primitive"
 	"io/ioutil"
 	"log"
-	mongoutil "qfw/mongodb"
-	qu "qfw/util"
+	. "seplatform/util"
 	"strconv"
 	"strings"
 	"time"
-	. "util"
 )
 
 type OwnTag struct {
@@ -37,7 +39,7 @@ type OwnTag struct {
 	customerAllRule      xweb.Mapper `xweb:"/client/customer/history/allrule"`       //用户历史规则
 }
 
-//保存客户信息
+// 保存客户信息
 func (c *OwnTag) CustomerSave() {
 	defer qu.Catch()
 	if c.Method() == "POST" {
@@ -103,7 +105,7 @@ func (c *OwnTag) CustomerSave() {
 
 			delete(data, "mails")
 			query := bson.M{
-				"_id": mongoutil.StringTOBsonId(id),
+				"_id": mongodb.StringTOBsonId(id),
 			}
 			rep = Mgo.Update("cuser", query, bson.M{"$set": data}, false, false)
 
@@ -114,7 +116,7 @@ func (c *OwnTag) CustomerSave() {
 	}
 }
 
-//新建/编辑标签
+// 新建/编辑标签
 func (c *OwnTag) EuserTagEdit() {
 	defer qu.Catch()
 	if c.Method() == "POST" {
@@ -136,7 +138,7 @@ func (c *OwnTag) EuserTagEdit() {
 				_id = Mgo.Save("eusertagrule", data)
 			} else {
 				query := bson.M{
-					"_id": mongoutil.StringTOBsonId(_id),
+					"_id": mongodb.StringTOBsonId(_id),
 				}
 				rep = Mgo.Update("eusertagrule", query, bson.M{"$set": data}, false, false)
 			}
@@ -150,7 +152,7 @@ func (c *OwnTag) EuserTagEdit() {
 				rep = AddHistoryLogTag(data, false, _id)
 			} else {
 				query := bson.M{
-					"_id": mongoutil.StringTOBsonId(_id),
+					"_id": mongodb.StringTOBsonId(_id),
 				}
 				reps := Mgo.Update("eusertagrule", query, bson.M{"$set": data}, false, false)
 				if reps {
@@ -175,19 +177,18 @@ func (c *OwnTag) EuserTagEdit() {
 	}
 }
 
-//
 func (c *OwnTag) CustomerHistory() {
 	defer qu.Catch()
 	id := c.GetString("id")
 	user := c.GetSession("user").(map[string]interface{})
 	query := bson.M{}
-	query["_id"] = mongoutil.StringTOBsonId(id)
+	query["_id"] = mongodb.StringTOBsonId(id)
 
 	hid := c.GetString("hid")
 	history_id := ""
 	if hid != "" {
 		history_id = hid
-		hData, ok := Mgo.FindOne("historylog", bson.M{"_id": mongoutil.StringTOBsonId(history_id)})
+		hData, ok := Mgo.FindOne("historylog", bson.M{"_id": mongodb.StringTOBsonId(history_id)})
 		if ok && hData != nil && len(*hData) > 0 {
 			c.T["history_rule"] = (*hData)["dep_rules"]
 			c.T["tagrule"] = (*hData)["tag_rules"]
@@ -228,7 +229,7 @@ func (c *OwnTag) CustomerHistory() {
 	c.Render("client/customer_history.html", &c.T)
 }
 
-//导入关键词
+// 导入关键词
 func (c *OwnTag) EuserImport() {
 	defer qu.Catch()
 	if c.Method() == "POST" {
@@ -252,15 +253,15 @@ func (c *OwnTag) EuserImport() {
 	}
 }
 
-//编辑客户信息
+// 编辑客户信息
 func (c *OwnTag) CustomerEdit() {
 	defer qu.Catch()
 	id := c.GetString("id")
 	query := bson.M{}
-	query["_id"] = mongoutil.StringTOBsonId(id)
+	query["_id"] = mongodb.StringTOBsonId(id)
 	data, _ := Mgo.FindOneByField("cuser", query, `{}`)
 	depart, _ := Mgo.Find("cuserdepart", bson.M{"s_userid": id, "b_delete": false}, nil, nil, false, -1, -1)
-	(*data)["_id"] = mongoutil.BsonIdToSId((*data)["_id"])
+	(*data)["_id"] = mongodb.BsonIdToSId((*data)["_id"])
 	if (*data)["i_state"] == 1 {
 		tagRule, _ := Mgo.Find("eusertagrule", bson.M{"s_userid": id, "b_delete": false}, nil, nil, false, -1, -1)
 		c.T["tagrule"] = *tagRule
@@ -270,12 +271,12 @@ func (c *OwnTag) CustomerEdit() {
 	c.Render("client/index.html", &c.T)
 }
 
-//标签的启用禁用
+// 标签的启用禁用
 func (c *OwnTag) TagSetup() {
 	defer qu.Catch()
 	if c.Method() == "POST" {
 		_id := c.GetString("_id")
-		i_isuse, _ := c.GetInteger("i_isuse")
+		i_isuse, _ := c.GetInt("i_isuse")
 		set := bson.M{
 			"$set": bson.M{
 				"i_isuse": i_isuse,
@@ -288,7 +289,7 @@ func (c *OwnTag) TagSetup() {
 	}
 }
 
-//删除标签
+// 删除标签
 func (c *OwnTag) TagDel() {
 	defer qu.Catch()
 	_id := c.GetString("_id")
@@ -303,14 +304,14 @@ func (c *OwnTag) TagDel() {
 	})
 }
 
-//关联规则列表
+// 关联规则列表
 func (c *OwnTag) CuserRuleList() {
 	defer qu.Catch()
 	if c.Method() == "POST" {
 		eid := c.GetString("eid")
-		start, _ := c.GetInteger("start")
-		limit, _ := c.GetInteger("length")
-		draw, _ := c.GetInteger("draw")
+		start, _ := c.GetInt("start")
+		limit, _ := c.GetInt("length")
+		draw, _ := c.GetInt("draw")
 		searchStr := c.GetString("search[value]")
 		search := strings.TrimSpace(searchStr)
 		query := bson.M{
@@ -323,7 +324,7 @@ func (c *OwnTag) CuserRuleList() {
 				bson.M{"s_name": bson.M{"$regex": search}},
 			}
 		}
-		data, _ := Mgo.Find("euserdepartrule", query, `{"i_createtime":-1}`, nil, false, start, limit)
+		data, _ := Mgo.Find("euserdepartrule", query, `{"i_createtime":-1}`, nil, false, int(start), int(limit))
 		for _, v := range *data {
 			d, _ := Mgo.FindById("euserdepart", qu.ObjToString(v["s_departid"]), nil)
 			v["s_depart"] = qu.ObjToString((*d)["s_name"])
@@ -379,7 +380,7 @@ func (c *OwnTag) Addhistoryrule() {
 					"i_extfieldstype": i_extfieldstype,
 				},
 			}
-			isupdata := Mgo.UpdateById("historylog", mongoutil.StringTOBsonId(his_id), set)
+			isupdata := Mgo.UpdateById("historylog", mongodb.StringTOBsonId(his_id), set)
 			if isupdata {
 				c.ServeJson(map[string]interface{}{
 					"history_id": his_id,
@@ -433,7 +434,7 @@ func (c *OwnTag) HistoryRuleCreate() {
 				}
 				s_id = Mgo.Save("euserdepart", d_data)
 			} else {
-				s_id = mongoutil.BsonIdToSId((*dData)["_id"])
+				s_id = mongodb.BsonIdToSId((*dData)["_id"])
 			}
 			data["s_userid"] = user_id
 			data["s_departid"] = s_id
@@ -442,7 +443,7 @@ func (c *OwnTag) HistoryRuleCreate() {
 			s_namekey := gopinyin.Convert(qu.ObjToString(data["s_name"]), false)
 			data["s_namekey"] = s_namekey
 			data["b_delete"] = true
-			data["s_dataid"] = qu.SE.EncodeString(fmt.Sprintf("%v", i_createtime) + s_namekey + s_id)
+			data["s_dataid"] = encrypt.SE.EncodeString(fmt.Sprintf("%v", i_createtime) + s_namekey + s_id)
 			data["i_type"] = "historyData"
 			id = Mgo.Save("euserdepartrule", data)
 			if id != "" {
@@ -452,7 +453,7 @@ func (c *OwnTag) HistoryRuleCreate() {
 			}
 		} else {
 			query := bson.M{
-				"_id": mongoutil.StringTOBsonId(id),
+				"_id": mongodb.StringTOBsonId(id),
 			}
 			reps := Mgo.Update("euserdepartrule", query, bson.M{"$set": data}, false, false)
 			if reps {
@@ -486,24 +487,24 @@ func (c *OwnTag) HistoryRuleCreate() {
 	}
 }
 
-//历史任务删除私有标签
+// 历史任务删除私有标签
 func (c *OwnTag) HistoryTagDel() {
 	defer qu.Catch()
 	// userid := c.GetString("userid")
 	tagid := c.GetString("tagid")
 	hid := c.GetString("hid")
-	user_info, _ := Mgo.FindOne("historylog", bson.M{"_id": mongoutil.StringTOBsonId(hid)})
+	user_info, _ := Mgo.FindOne("historylog", bson.M{"_id": mongodb.StringTOBsonId(hid)})
 	if user_info != nil && *user_info != nil {
 		if (*user_info)["tag_rules"] != nil {
 			user_tag_rules := qu.ObjArrToMapArr((*user_info)["tag_rules"].([]interface{}))
 			ruleMap := map[string]bool{tagid: true}
 			ruleArr := []map[string]interface{}{}
 			for _, m := range user_tag_rules {
-				if !ruleMap[mongoutil.BsonIdToSId(m["_id"])] {
+				if !ruleMap[mongodb.BsonIdToSId(m["_id"])] {
 					ruleArr = append(ruleArr, m)
 				}
 			}
-			is_updata := Mgo.Update("historylog", bson.M{"_id": mongoutil.StringTOBsonId(hid)}, bson.M{"$set": bson.M{"tag_rules": ruleArr}}, false, false)
+			is_updata := Mgo.Update("historylog", bson.M{"_id": mongodb.StringTOBsonId(hid)}, bson.M{"$set": bson.M{"tag_rules": ruleArr}}, false, false)
 			c.ServeJson(map[string]interface{}{
 				"rep": is_updata,
 			})
@@ -515,7 +516,7 @@ func (c *OwnTag) HistoryTagDel() {
 	})
 }
 
-//私有标签关联数据
+// 私有标签关联数据
 func (c *OwnTag) HistoryTagAssociated() {
 	defer qu.Catch()
 	userid := c.GetString("userid")
@@ -525,14 +526,14 @@ func (c *OwnTag) HistoryTagAssociated() {
 
 	if userid != "" {
 		user_info, _ := Mgo.FindOne("historylog", map[string]interface{}{
-			"_id": mongoutil.StringTOBsonId(hid),
+			"_id": mongodb.StringTOBsonId(hid),
 		})
 		if user_info != nil && *user_info != nil {
 			tagrules := (*user_info)["tag_rules"]
 			if tagrules != nil {
 				tagrulesArr := qu.ObjArrToMapArr(tagrules.([]interface{}))
 				for _, m := range tagrulesArr {
-					if rule_id == mongoutil.BsonIdToSId(m["_id"]) {
+					if rule_id == mongodb.BsonIdToSId(m["_id"]) {
 						m["o_departruleids"] = tags
 					}
 				}
@@ -542,7 +543,7 @@ func (c *OwnTag) HistoryTagAssociated() {
 					},
 				}
 				is_updata := Mgo.Update("historylog", map[string]interface{}{
-					"_id": mongoutil.StringTOBsonId(hid),
+					"_id": mongodb.StringTOBsonId(hid),
 				}, set, false, false)
 				c.ServeJson(map[string]interface{}{
 					"rep": is_updata,
@@ -552,14 +553,14 @@ func (c *OwnTag) HistoryTagAssociated() {
 	}
 }
 
-//保存历史规则
+// 保存历史规则
 func (c *OwnTag) SaveHistoryRule() {
 	rules_id := c.GetString("rulesid")
 	history_id := c.GetString("hid")
 	// userid := c.GetString("userid")
 	if history_id != "" {
 		user_history, _ := Mgo.FindOne("historylog", map[string]interface{}{
-			"_id": mongoutil.StringTOBsonId(history_id),
+			"_id": mongodb.StringTOBsonId(history_id),
 		})
 		if *user_history != nil && user_history != nil {
 			//获取私有标签
@@ -571,21 +572,21 @@ func (c *OwnTag) SaveHistoryRule() {
 				if len(dep_rules) > 0 {
 					for _, r := range dep_rules {
 						dep_new_rules = append(dep_new_rules, r)
-						ruleMap[mongoutil.BsonIdToSId(r["_id"])] = true
+						ruleMap[mongodb.BsonIdToSId(r["_id"])] = true
 					}
 				}
 				rules_id_list := strings.Split(rules_id, ",")
 				for _, rule := range rules_id_list {
 					if !ruleMap[rule] {
 						query := bson.M{
-							"_id":      mongoutil.StringTOBsonId(rule),
+							"_id":      mongodb.StringTOBsonId(rule),
 							"b_delete": false,
 						}
 						res, _ := Mgo.FindOne("euserdepartrule", query)
 						if res != nil && len(*res) != 0 {
 							//获取规则所属部门信息
 							department_info, _ := Mgo.FindOne("euserdepart", map[string]interface{}{
-								"_id":      mongoutil.StringTOBsonId((*res)["s_departid"].(string)),
+								"_id":      mongodb.StringTOBsonId((*res)["s_departid"].(string)),
 								"b_delete": false,
 							})
 							(*res)["is_new"] = false
@@ -602,7 +603,7 @@ func (c *OwnTag) SaveHistoryRule() {
 					},
 				}
 				ok := Mgo.Update("historylog", map[string]interface{}{
-					"_id": mongoutil.StringTOBsonId(history_id),
+					"_id": mongodb.StringTOBsonId(history_id),
 				}, set, false, false)
 				//log.Println("ok", ok)
 				c.ServeJson(map[string]interface{}{
@@ -614,14 +615,14 @@ func (c *OwnTag) SaveHistoryRule() {
 				dep_rules := []map[string]interface{}{}
 				for _, rule := range rules_id_list {
 					query := bson.M{
-						"_id":      mongoutil.StringTOBsonId(rule),
+						"_id":      mongodb.StringTOBsonId(rule),
 						"b_delete": false,
 					}
 					res, _ := Mgo.FindOne("euserdepartrule", query)
 					if res != nil && *res != nil {
 						//获取规则所属部门信息
 						department_info, _ := Mgo.FindOne("euserdepart", map[string]interface{}{
-							"_id":      mongoutil.StringTOBsonId((*res)["s_departid"].(string)),
+							"_id":      mongodb.StringTOBsonId((*res)["s_departid"].(string)),
 							"b_delete": false,
 						})
 						(*res)["is_new"] = false
@@ -637,7 +638,7 @@ func (c *OwnTag) SaveHistoryRule() {
 					},
 				}
 				isupdata := Mgo.Update("historylog", map[string]interface{}{
-					"_id": mongoutil.StringTOBsonId(history_id),
+					"_id": mongodb.StringTOBsonId(history_id),
 				}, set, false, false)
 				c.ServeJson(map[string]interface{}{
 					"status": isupdata,
@@ -658,18 +659,18 @@ func (c *OwnTag) DelHistoryRule() {
 	id := c.GetString("id")
 	hid := c.GetString("hid")
 	if hid != "" {
-		data, ok := Mgo.FindOne("historylog", bson.M{"_id": mongoutil.StringTOBsonId(hid)})
+		data, ok := Mgo.FindOne("historylog", bson.M{"_id": mongodb.StringTOBsonId(hid)})
 		if ok && data != nil && *data != nil {
 			if (*data)["dep_rules"] != nil {
 				dep_rules := qu.ObjArrToMapArr((*data)["dep_rules"].([]interface{}))
 				ruleMap := map[string]bool{id: true}
 				ruleArr := []map[string]interface{}{}
 				for _, m := range dep_rules {
-					if !ruleMap[mongoutil.BsonIdToSId(m["_id"])] {
+					if !ruleMap[mongodb.BsonIdToSId(m["_id"])] {
 						ruleArr = append(ruleArr, m)
 					}
 				}
-				ok := Mgo.Update("historylog", bson.M{"_id": mongoutil.StringTOBsonId(hid)}, bson.M{"$set": bson.M{"dep_rules": ruleArr}}, false, false)
+				ok := Mgo.Update("historylog", bson.M{"_id": mongodb.StringTOBsonId(hid)}, bson.M{"$set": bson.M{"dep_rules": ruleArr}}, false, false)
 				c.ServeJson(map[string]interface{}{
 					"success": ok,
 				})
@@ -687,19 +688,19 @@ func (c *OwnTag) HistoryRuleEdit() {
 		o_rulesStr := data["o_rules"].(string)
 		json.Unmarshal([]byte(o_rulesStr), &o_rules)
 		data["o_rules"] = o_rules
-		data["_id"] = mongoutil.StringTOBsonId(rid)
+		data["_id"] = mongodb.StringTOBsonId(rid)
 		if qu.IntAll(data["i_esquerytype"]) == 1 { //自动生成es
 			data["s_esquery"] = Utiltags(data)
 		}
-		datas, ok := Mgo.FindOne("historylog", map[string]interface{}{"_id": mongoutil.StringTOBsonId(hid)})
+		datas, ok := Mgo.FindOne("historylog", map[string]interface{}{"_id": mongodb.StringTOBsonId(hid)})
 		if ok && datas != nil && *datas != nil {
 			dep_rules := qu.ObjArrToMapArr((*datas)["dep_rules"].([]interface{}))
 			for k, v := range dep_rules {
-				if rid == mongoutil.BsonIdToSId(v["_id"]) {
+				if rid == mongodb.BsonIdToSId(v["_id"]) {
 					dep_rules[k] = data
 				}
 			}
-			rep := Mgo.Update("historylog", map[string]interface{}{"_id": mongoutil.StringTOBsonId(hid)}, map[string]interface{}{"$set": map[string]interface{}{"dep_rules": dep_rules}}, false, false)
+			rep := Mgo.Update("historylog", map[string]interface{}{"_id": mongodb.StringTOBsonId(hid)}, map[string]interface{}{"$set": map[string]interface{}{"dep_rules": dep_rules}}, false, false)
 			c.ServeJson(map[string]interface{}{
 				"rep":       rep,
 				"s_esquery": data["s_esquery"],
@@ -707,11 +708,11 @@ func (c *OwnTag) HistoryRuleEdit() {
 		}
 	} else {
 		id := c.GetString("id")
-		data, ok := Mgo.FindOne("historylog", map[string]interface{}{"_id": mongoutil.StringTOBsonId(hid)})
+		data, ok := Mgo.FindOne("historylog", map[string]interface{}{"_id": mongodb.StringTOBsonId(hid)})
 		if ok && data != nil && *data != nil {
 			dep_rules := qu.ObjArrToMapArr((*data)["dep_rules"].([]interface{}))
 			for _, v := range dep_rules {
-				if rid == mongoutil.BsonIdToSId(v["_id"]) {
+				if rid == mongodb.BsonIdToSId(v["_id"]) {
 					c.T["data"] = v
 				}
 			}
@@ -735,7 +736,7 @@ func (c *OwnTag) HistoryRuleEdit() {
 	}
 }
 
-//选择历史规则
+// 选择历史规则
 func (c *OwnTag) CustomerAllRule() {
 	customerId := c.GetString("c_id")
 	history_id := c.GetString("hid")
@@ -745,7 +746,7 @@ func (c *OwnTag) CustomerAllRule() {
 	}
 	inc_query := bson.M{
 		"user_id": customerId,
-		"_id":     mongoutil.StringTOBsonId(history_id),
+		"_id":     mongodb.StringTOBsonId(history_id),
 	}
 	//获取新增历史规则
 	inc_rules := []map[string]interface{}{}
@@ -754,7 +755,7 @@ func (c *OwnTag) CustomerAllRule() {
 	if inc_data != nil && *inc_data != nil {
 		for _, t := range (*inc_data)["dep_rules"].([]interface{}) {
 			if !t.(map[string]interface{})["is_new"].(bool) {
-				inc_rule["id"] = t.(map[string]interface{})["_id"].(bson.ObjectId).Hex() //规则id
+				inc_rule["id"] = t.(map[string]interface{})["_id"].(primitive.ObjectID).Hex() //规则id
 				inc_rule["s_depart_name"] = t.(map[string]interface{})["s_depart_name"]
 				inc_rule["s_name"] = t.(map[string]interface{})["s_name"]
 				inc_rule["s_depart_status"] = t.(map[string]interface{})["s_depart_status"]
@@ -771,7 +772,7 @@ func (c *OwnTag) CustomerAllRule() {
 		for _, m := range *data {
 			history_rule_data := make(map[string]interface{})
 			q := bson.M{
-				"s_departid": m["_id"].(bson.ObjectId).Hex(),
+				"s_departid": m["_id"].(primitive.ObjectID).Hex(),
 				"b_delete":   false,
 			}
 			history_rule_data["department_isuse"] = m["i_isuse"]
@@ -779,7 +780,7 @@ func (c *OwnTag) CustomerAllRule() {
 			depart_rule_data, _ := Mgo.Find("euserdepartrule", q, `{"i_createtime":-1}`, `{"s_name":1,"i_updatetime":1,"i_isuse":1,"_id":1}`, false, 0, 0)
 			if depart_rule_data != nil && len(*depart_rule_data) != 0 {
 				for _, j := range *depart_rule_data {
-					j["_id"] = j["_id"].(bson.ObjectId).Hex()
+					j["_id"] = j["_id"].(primitive.ObjectID).Hex()
 				}
 				history_rule_data["department_rule"] = depart_rule_data
 				history_rule_data["is_slected"] = true
@@ -800,7 +801,7 @@ func (c *OwnTag) CustomerAllRule() {
 }
 
 func AddHistoryLogTag(ruleData map[string]interface{}, isUpdate bool, id string) bool {
-	history_id := mongoutil.StringTOBsonId(qu.ObjToString(ruleData["hid"]))
+	history_id := mongodb.StringTOBsonId(qu.ObjToString(ruleData["hid"]))
 	hData, ok := Mgo.FindOne("historylog", bson.M{"_id": history_id})
 	if ok && hData != nil && *hData != nil && len(*hData) > 0 {
 		tag_rules := []map[string]interface{}{}
@@ -810,7 +811,7 @@ func AddHistoryLogTag(ruleData map[string]interface{}, isUpdate bool, id string)
 		ruleData["is_new"] = true
 		if isUpdate {
 			for k, v := range tag_rules {
-				if mongoutil.BsonIdToSId(v["_id"]) == id {
+				if mongodb.BsonIdToSId(v["_id"]) == id {
 					tag_rules[k] = ruleData
 				}
 			}
@@ -825,7 +826,7 @@ func AddHistoryLogTag(ruleData map[string]interface{}, isUpdate bool, id string)
 }
 
 func AddHistoryLogDep(ruleData map[string]interface{}, isUpdate bool, id string) bool {
-	history_id := mongoutil.StringTOBsonId(ruleData["history_id"].(string))
+	history_id := mongodb.StringTOBsonId(ruleData["history_id"].(string))
 	hData, ok := Mgo.FindOne("historylog", bson.M{"_id": history_id})
 	if ok && hData != nil && *hData != nil && len(*hData) > 0 {
 		dep_rules := []map[string]interface{}{}
@@ -835,7 +836,7 @@ func AddHistoryLogDep(ruleData map[string]interface{}, isUpdate bool, id string)
 		ruleData["is_new"] = true
 		if isUpdate {
 			for k, v := range dep_rules {
-				if mongoutil.BsonIdToSId(v["_id"]) == id {
+				if mongodb.BsonIdToSId(v["_id"]) == id {
 					dep_rules[k] = ruleData
 				}
 			}

+ 2 - 2
src/client/util_client.go → SEPlatform/client/util_client.go

@@ -1,14 +1,14 @@
 package client
 
 import (
-	qu "qfw/util"
+	qu "app.yhyue.com/moapp/jybase/common"
 	"regexp"
 	"strings"
 )
 
 var LetterCase = regexp.MustCompile("[A-Za-z]")
 
-//匹配方式map
+// 匹配方式map
 var MatchType = map[string]interface{}{
 	"1": "title",
 	"2": "detail",

+ 0 - 0
src/config.json → SEPlatform/config.json


+ 0 - 0
src/doc/客户服务数据模型.xlsx → SEPlatform/doc/客户服务数据模型.xlsx


+ 0 - 0
src/doc/标签系统导入模版.xlsx → SEPlatform/doc/标签系统导入模版.xlsx


+ 0 - 0
src/es.json → SEPlatform/es.json


+ 0 - 0
src/filter/filter.go → SEPlatform/filter/filter.go


+ 0 - 0
src/filter/sessfilter.go → SEPlatform/filter/sessfilter.go


+ 17 - 16
src/front/front.go → SEPlatform/front/front.go

@@ -1,19 +1,20 @@
 package front
 
 import (
+	qu "app.yhyue.com/moapp/jybase/common"
+	"app.yhyue.com/moapp/jybase/encrypt"
+	"app.yhyue.com/moapp/jybase/go-xweb/xweb"
+	"app.yhyue.com/moapp/jybase/mongodb"
+	"app.yhyue.com/moapp/jybase/sms"
+	"github.com/dchest/captcha"
+	"github.com/gorilla/sessions"
+	"go.mongodb.org/mongo-driver/bson"
+	"go.mongodb.org/mongo-driver/bson/primitive"
 	"log"
-	mongoutil "qfw/mongodb"
-	qu "qfw/util"
-	"qfw/util/sms"
 	"regexp"
+	. "seplatform/util"
 	"strconv"
 	"time"
-	. "util"
-
-	"github.com/dchest/captcha"
-	"github.com/go-xweb/xweb"
-	"github.com/gorilla/sessions"
-	"gopkg.in/mgo.v2/bson"
 )
 
 var UserMenu map[string][]map[string]interface{} //存储菜单
@@ -200,7 +201,7 @@ func (f *Front) UpdatePwd() {
 	password := f.GetString("pwd")
 	set := bson.M{
 		"$set": bson.M{
-			"s_pwd": qu.SE.EncodeString(password),
+			"s_pwd": encrypt.SE.EncodeString(password),
 		},
 	}
 	if Mgo.UpdateById("user", id, set) {
@@ -229,7 +230,7 @@ func (f *Front) User() {
 		}
 		data, _ := Mgo.Find("user", query, `{"_id":1}`, nil, false, -1, -1)
 		for _, d := range *data {
-			d["s_pwd"] = qu.SE.DecodeString(qu.ObjToString(d["s_pwd"]))
+			d["s_pwd"] = encrypt.SE.DecodeString(qu.ObjToString(d["s_pwd"]))
 			d["role_name"] = roleMap[qu.ObjToString(d["s_role"])]
 		}
 		f.ServeJson(map[string]interface{}{
@@ -245,7 +246,7 @@ func (f *Front) UserDel() {
 	defer qu.Catch()
 	_id := f.GetString("_id")
 	query := bson.M{
-		"_id": mongoutil.StringTOBsonId(_id),
+		"_id": mongodb.StringTOBsonId(_id),
 	}
 	b := Mgo.Del("user", query)
 	f.ServeJson(map[string]interface{}{
@@ -264,16 +265,16 @@ func (f *Front) UserSave() {
 			"s_role":       role,
 			"s_name":       name,
 			"s_email":      email,
-			"s_pwd":        qu.SE.EncodeString(pwd),
+			"s_pwd":        encrypt.SE.EncodeString(pwd),
 			"i_comeintime": time.Now().Unix(),
 		},
 	}
 	query := bson.M{
-		"_id": mongoutil.StringTOBsonId(_id),
+		"_id": mongodb.StringTOBsonId(_id),
 	}
 	if _id == "" {
 		query = bson.M{
-			"_id": bson.NewObjectId(),
+			"_id": primitive.NewObjectID(),
 		}
 	}
 
@@ -305,7 +306,7 @@ func GetUserMenu(role string) []map[string]interface{} {
 		_id := d["_id"]
 		maps = map[string]interface{}{
 			"delete": false,
-			"s_pid":  mongoutil.BsonIdToSId(_id),
+			"s_pid":  mongodb.BsonIdToSId(_id),
 		}
 		if role != "0" {
 			maps["role."+role] = true

+ 2 - 2
src/front/logic.go → SEPlatform/front/logic.go

@@ -1,9 +1,9 @@
 package front
 
 import (
-	qu "qfw/util"
+	qu "app.yhyue.com/moapp/jybase/common"
+	. "seplatform/util"
 	"time"
-	. "util"
 )
 
 func (f *Front) LogicManager() {

+ 11 - 11
src/front/menu.go → SEPlatform/front/menu.go

@@ -1,12 +1,12 @@
 package front
 
 import (
-	mongoutil "qfw/mongodb"
-	qu "qfw/util"
+	qu "app.yhyue.com/moapp/jybase/common"
+	"app.yhyue.com/moapp/jybase/mongodb"
+	"go.mongodb.org/mongo-driver/bson"
+	"go.mongodb.org/mongo-driver/bson/primitive"
+	. "seplatform/util"
 	"time"
-	. "util"
-
-	"gopkg.in/mgo.v2/bson"
 )
 
 func (f *Front) Menu() {
@@ -28,12 +28,12 @@ func (f *Front) MenuSave() {
 	css := f.GetString("css")
 	id := f.GetString("id")
 	query := bson.M{
-		"_id":    mongoutil.StringTOBsonId(id),
+		"_id":    mongodb.StringTOBsonId(id),
 		"delete": false,
 	}
 	if id == "" {
 		query = bson.M{
-			"_id":    bson.NewObjectId(),
+			"_id":    primitive.NewObjectID(),
 			"delete": false,
 		}
 	}
@@ -58,7 +58,7 @@ func (f *Front) MenuDel() {
 	defer qu.Catch()
 	_id := f.GetString("_id")
 	query := bson.M{
-		"_id": mongoutil.StringTOBsonId(_id),
+		"_id": mongodb.StringTOBsonId(_id),
 	}
 	set := bson.M{
 		"$set": bson.M{
@@ -96,12 +96,12 @@ func (f *Front) MenuSecondSave() {
 	id := f.GetString("id")
 	pid := f.GetString("pid")
 	query := bson.M{
-		"_id":    mongoutil.StringTOBsonId(id),
+		"_id":    mongodb.StringTOBsonId(id),
 		"delete": false,
 	}
 	if id == "" {
 		query = bson.M{
-			"_id":    bson.NewObjectId(),
+			"_id":    primitive.NewObjectID(),
 			"delete": false,
 		}
 	}
@@ -127,7 +127,7 @@ func (f *Front) MenuSecondDel() {
 	defer qu.Catch()
 	_id := f.GetString("_id")
 	query := bson.M{
-		"_id": mongoutil.StringTOBsonId(_id),
+		"_id": mongodb.StringTOBsonId(_id),
 	}
 	set := bson.M{
 		"$set": bson.M{

+ 10 - 10
src/front/role.go → SEPlatform/front/role.go

@@ -1,11 +1,11 @@
 package front
 
 import (
+	qu "app.yhyue.com/moapp/jybase/common"
+	"app.yhyue.com/moapp/jybase/mongodb"
 	"encoding/json"
-	"gopkg.in/mgo.v2/bson"
-	mongoutil "qfw/mongodb"
-	qu "qfw/util"
-	. "util"
+	"go.mongodb.org/mongo-driver/bson"
+	. "seplatform/util"
 )
 
 func (f *Front) RoleManager() {
@@ -33,7 +33,7 @@ func (f *Front) RoleNew() {
 					"level": level,
 				},
 			}
-			bol := Mgo.UpdateById("role", mongoutil.StringTOBsonId(_id), set)
+			bol := Mgo.UpdateById("role", mongodb.StringTOBsonId(_id), set)
 			if bol {
 				f.ServeJson(map[string]interface{}{
 					"rep": true,
@@ -103,7 +103,7 @@ func (f *Front) RoleSave() {
 	if s_id == nil && s_id1 == nil {
 		for _, v := range secondmenus {
 			maps := map[string]interface{}{
-				"_id": bson.ObjectIdHex(v),
+				"_id": mongodb.StringTOBsonId(v),
 			}
 			data := map[string]interface{}{
 				"role." + role: true,
@@ -115,7 +115,7 @@ func (f *Front) RoleSave() {
 		}
 		for _, v := range secondmenus1 {
 			maps := map[string]interface{}{
-				"_id": bson.ObjectIdHex(v),
+				"_id": mongodb.StringTOBsonId(v),
 			}
 			data := map[string]interface{}{
 				"role." + role: false,
@@ -129,7 +129,7 @@ func (f *Front) RoleSave() {
 	b := false
 	if (len(secondmenus) == 0 && len(secondmenus1) == 0) || (len(secondmenus) > 0) {
 		maps := map[string]interface{}{
-			"_id": bson.ObjectIdHex(pid),
+			"_id": mongodb.StringTOBsonId(pid),
 		}
 		data := map[string]interface{}{
 			"role." + role: true,
@@ -141,7 +141,7 @@ func (f *Front) RoleSave() {
 	}
 	if len(secondmenus) == 0 && len(secondmenus1) > 0 {
 		maps := map[string]interface{}{
-			"_id": bson.ObjectIdHex(pid),
+			"_id": mongodb.StringTOBsonId(pid),
 		}
 		data := map[string]interface{}{
 			"role." + role: false,
@@ -161,7 +161,7 @@ func (f *Front) RoleDel() {
 	_id := f.GetString("_id")
 	role := f.GetString("role")
 	maps := map[string]interface{}{
-		"_id": bson.ObjectIdHex(_id),
+		"_id": mongodb.StringTOBsonId(_id),
 	}
 	data := map[string]interface{}{
 		"role." + role: false,

+ 51 - 0
SEPlatform/go.mod

@@ -0,0 +1,51 @@
+module seplatform
+
+go 1.23
+
+require (
+	app.yhyue.com/moapp/jybase v0.0.0-20241028060726-9b8837ab6e42
+	github.com/Chain-Zhang/pinyin v0.1.3
+	github.com/PuerkitoBio/goquery v1.10.0
+	github.com/dchest/captcha v1.0.0
+	github.com/gorilla/sessions v1.4.0
+	github.com/lauyoume/gopinyin v0.0.0-20150113020433-f8d942704e7f
+	github.com/olivere/elastic/v7 v7.0.22
+	github.com/robfig/cron v1.2.0
+	github.com/shopspring/decimal v1.4.0
+	github.com/tealeg/xlsx v1.0.5
+	go.mongodb.org/mongo-driver v1.17.1
+	golang.org/x/text v0.20.0
+)
+
+require (
+	app.yhyue.com/moapp/esv1 v0.0.0-20220414031211-3da4123e648d // indirect
+	github.com/andybalholm/cascadia v1.3.2 // indirect
+	github.com/garyburd/redigo v1.6.2 // indirect
+	github.com/go-sql-driver/mysql v1.6.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/golang/snappy v0.0.4 // indirect
+	github.com/gomodule/redigo v1.8.9 // indirect
+	github.com/gorilla/securecookie v1.1.2 // indirect
+	github.com/howeyc/fsnotify v0.9.0 // indirect
+	github.com/jinzhu/inflection v1.0.0 // indirect
+	github.com/jinzhu/now v1.1.1 // indirect
+	github.com/josharian/intern v1.0.0 // indirect
+	github.com/klauspost/compress v1.13.6 // indirect
+	github.com/lunny/csession v0.0.0-20130910075847-fe53c5de3dfd // indirect
+	github.com/mailru/easyjson v0.7.7 // indirect
+	github.com/mattn/go-sqlite3 v1.14.24 // indirect
+	github.com/montanaflynn/stats v0.7.1 // indirect
+	github.com/olivere/elastic v6.2.37+incompatible // indirect
+	github.com/pkg/errors v0.9.1 // indirect
+	github.com/xdg-go/pbkdf2 v1.0.0 // indirect
+	github.com/xdg-go/scram v1.1.2 // indirect
+	github.com/xdg-go/stringprep v1.0.4 // indirect
+	github.com/youmark/pkcs8 v0.0.0-20240726163527-a2c0da244d78 // indirect
+	golang.org/x/crypto v0.27.0 // indirect
+	golang.org/x/net v0.29.0 // indirect
+	golang.org/x/sync v0.9.0 // indirect
+	gorm.io/driver/mysql v1.0.5 // indirect
+	gorm.io/gorm v1.21.3 // indirect
+)

+ 438 - 0
SEPlatform/go.sum

@@ -0,0 +1,438 @@
+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/jybase v0.0.0-20241028060726-9b8837ab6e42 h1:W4vYVQtoPsSCor6mO1iTjQlucodrxXeN38fKiWkPhE4=
+app.yhyue.com/moapp/jybase v0.0.0-20241028060726-9b8837ab6e42/go.mod h1:XHNATN6tsJKHdCB0DbUtFdPPHXexTUFyB3RlO+lUUoM=
+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=
+github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU=
+github.com/Chain-Zhang/pinyin v0.1.3 h1:RzErNyNwVa8z2sOLCuXSOtVdY/AsARb8mBzI2p2qtnE=
+github.com/Chain-Zhang/pinyin v0.1.3/go.mod h1:5iHpt9p4znrnaP59/hfPMnAojajkDxQaP9io+tRMPho=
+github.com/PuerkitoBio/goquery v1.10.0 h1:6fiXdLuUvYs2OJSvNRqlNPoBm6YABE226xrbavY5Wv4=
+github.com/PuerkitoBio/goquery v1.10.0/go.mod h1:TjZZl68Q3eGHNBA8CWaxAN7rOU1EbDz3CWuolcO5Yu4=
+github.com/RoaringBitmap/roaring v1.5.0/go.mod h1:plvDsJQpxOC5bw8LRteu/MLWHsHez/3y6cubLI4/1yE=
+github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc=
+github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc=
+github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0=
+github.com/alecthomas/units v0.0.0-20190717042225-c3de453c63f4/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0=
+github.com/alecthomas/units v0.0.0-20190924025748-f65c72e2690d/go.mod h1:rBZYJk541a8SKzHPHnH3zbiI+7dagKZ0cgpgrD7Fyho=
+github.com/andybalholm/cascadia v1.3.2 h1:3Xi6Dw5lHF15JtdcmAHD3i1+T8plmv7BQ/nsViSLyss=
+github.com/andybalholm/cascadia v1.3.2/go.mod h1:7gtRlve5FxPPgIgX36uWBX58OdBsSS6lUvCFb+h7KvU=
+github.com/antihax/optional v1.0.0/go.mod h1:uupD/76wgC+ih3iEmQUL+0Ugr19nfwCT1kdvxnR2qWY=
+github.com/aws/aws-sdk-go v1.35.20/go.mod h1:tlPOdRjfxPBpNIwqDj61rmsnA85v9jc0Ps9+muhnW+k=
+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=
+github.com/beorn7/perks v1.0.0/go.mod h1:KWe93zE9D1o94FZ5RNwFwVgaQK1VOXiVxmqh+CedLV8=
+github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw=
+github.com/bits-and-blooms/bitset v1.2.0/go.mod h1:gIdJ4wp64HaoK2YrL1Q5/N7Y16edYb8uY+O0FJTyyDA=
+github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU=
+github.com/cespare/xxhash/v2 v2.1.1/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs=
+github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw=
+github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc=
+github.com/cncf/udpa/go v0.0.0-20201120205902-5459f2c99403/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk=
+github.com/cncf/udpa/go v0.0.0-20210930031921-04548b0d99d4/go.mod h1:6pvJx4me5XPnfI9Z40ddWsdw2W/uZgQLFXToKeRcDiI=
+github.com/cncf/xds/go v0.0.0-20210922020428-25de7278fc84/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs=
+github.com/cncf/xds/go v0.0.0-20211001041855-01bcc9b48dfe/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs=
+github.com/cncf/xds/go v0.0.0-20211011173535-cb28da3451f1/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs=
+github.com/coreos/go-semver v0.3.0/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3EedlOD2RNk=
+github.com/coreos/go-systemd/v22 v22.3.2/go.mod h1:Y58oyj3AT4RCenI/lSvhwexgC+NSVTIJ3seZv2GcEnc=
+github.com/coscms/tagfast v0.0.0-20150925144250-2b69b2496250/go.mod h1:zX8vynptAghuV/KG8BOZlDeo4DsTKWfBQ154RWlkay0=
+github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E=
+github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
+github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
+github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
+github.com/dchest/captcha v1.0.0 h1:vw+bm/qMFvTgcjQlYVTuQBJkarm5R0YSsDKhm1HZI2o=
+github.com/dchest/captcha v1.0.0/go.mod h1:7zoElIawLp7GUMLcj54K9kbw+jEyvz2K0FDdRRYhvWo=
+github.com/donnie4w/go-logger v0.0.0-20170827050443-4740c51383f4/go.mod h1:L7S4x0R7vv3xoOhGuyAJyCO2MYzWOpccM4Isn8jIUgY=
+github.com/dustin/go-humanize v1.0.0/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk=
+github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4=
+github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4=
+github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1mIlRU8Am5FuJP05cCM98=
+github.com/envoyproxy/go-control-plane v0.9.9-0.20201210154907-fd9021fe5dad/go.mod h1:cXg6YxExXjJnVBQHBLXeUAgxn2UodCpnH306RInaBQk=
+github.com/envoyproxy/go-control-plane v0.9.9-0.20210217033140-668b12f5399d/go.mod h1:cXg6YxExXjJnVBQHBLXeUAgxn2UodCpnH306RInaBQk=
+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/fortytw2/leaktest v1.3.0 h1:u8491cBMTQ8ft8aeV+adlcytMZylmA5nnwwkRZjI8vw=
+github.com/fortytw2/leaktest v1.3.0/go.mod h1:jDsjWgpAGjm2CA7WthBh/CdZYEPF31XHquHwclZch5g=
+github.com/fsnotify/fsnotify v1.4.9/go.mod h1:znqG4EE+3YCdAaPaxE2ZRY/06pZUdp0tY4IgpuI1SZQ=
+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 v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04=
+github.com/go-kit/kit v0.8.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as=
+github.com/go-kit/kit v0.9.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as=
+github.com/go-kit/log v0.1.0/go.mod h1:zbhenjAZHb184qTLMA9ZjW7ThYL0H2mk7Q6pNt4vbaY=
+github.com/go-logfmt/logfmt v0.3.0/go.mod h1:Qt1PoO58o5twSAckw1HlFXLmHsOX5/0LbT9GBnD5lWE=
+github.com/go-logfmt/logfmt v0.4.0/go.mod h1:3RMwSq7FuexP4Kalkev3ejPJsZTpXXBr9+V4qmtdjCk=
+github.com/go-logfmt/logfmt v0.5.0/go.mod h1:wCYkCAKZfumFQihp8CzCvQ3paCTfi41vtzG1KdI/P7A=
+github.com/go-sql-driver/mysql v1.5.0/go.mod h1:DCzpHaOWr8IXmIStZouvnhqoel9Qv2LBy8hT2VhHyBg=
+github.com/go-sql-driver/mysql v1.6.0 h1:BCTh4TKNUYmOmMUcQ3IipzF5prigylS7XXjEkfCHuOE=
+github.com/go-sql-driver/mysql v1.6.0/go.mod h1:DCzpHaOWr8IXmIStZouvnhqoel9Qv2LBy8hT2VhHyBg=
+github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY=
+github.com/go-xweb/httpsession v0.0.0-20141220075701-356d3b4d38d6 h1:DUiWdm3rS8cC96Y0XeVkDeizzEK6X+qiNgXytLVtbkM=
+github.com/go-xweb/httpsession v0.0.0-20141220075701-356d3b4d38d6/go.mod h1:lwPk13GS+i/NK4FkMm68IcJrAwiu+HtjYa1Y4kW59aY=
+github.com/go-xweb/log v0.0.0-20140701090824-270d183ad77e h1:xmffs7hgrWpAOcquZrdlWpAEaAdlI9myaYcUUmhIP7k=
+github.com/go-xweb/log v0.0.0-20140701090824-270d183ad77e/go.mod h1:ASmYUSBf32lWkkNVX/pnOU4MLuUQpFH4qYHvWHt/l0w=
+github.com/go-xweb/uuid v0.0.0-20140604020037-d7dce341f851 h1:D46USD6oGNWzoJ/h5CWaFq3ELLoLoJzllJ03Xh78VYg=
+github.com/go-xweb/uuid v0.0.0-20140604020037-d7dce341f851/go.mod h1:OmDEC58ZYO1Esk+Uy32SB6LWof9lyROl7q76dBFOCWw=
+github.com/go-xweb/xweb v0.2.1 h1:u5t/ttuSfxiIMDTXj/Pouw9C2ASNABWT16JWHyrtdvY=
+github.com/go-xweb/xweb v0.2.1/go.mod h1:vPjYJgfidYAgBKIwiAyKFC1hfczlqsw9rRT8LtwrGew=
+github.com/godbus/dbus/v5 v5.0.4/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5xrFpKfA=
+github.com/gogo/protobuf v1.1.1/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ=
+github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q=
+github.com/golang-jwt/jwt/v4 v4.4.2/go.mod h1:m21LjoU+eqJr34lmDMbreY2eSTRJ1cv77w39/MY0Ch0=
+github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q=
+github.com/golang/groupcache v0.0.0-20190702054246-869f871628b6/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc=
+github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A=
+github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U=
+github.com/golang/protobuf v1.3.1/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U=
+github.com/golang/protobuf v1.3.2/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U=
+github.com/golang/protobuf v1.3.3/go.mod h1:vzj43D7+SQXF/4pzW/hwtAqwc6iTitCiVSaWz5lYuqw=
+github.com/golang/protobuf v1.4.0-rc.1/go.mod h1:ceaxUfeHdC40wWswd/P6IGgMaK3YpKi5j83Wpe3EHw8=
+github.com/golang/protobuf v1.4.0-rc.1.0.20200221234624-67d41d38c208/go.mod h1:xKAWHe0F5eneWXFV3EuXVDTCmh+JuBKY0li0aMyXATA=
+github.com/golang/protobuf v1.4.0-rc.2/go.mod h1:LlEzMj4AhA7rCAGe4KMBDvJI+AwstrUpVNzEA03Pprs=
+github.com/golang/protobuf v1.4.0-rc.4.0.20200313231945-b860323f09d0/go.mod h1:WU3c8KckQ9AFe+yFwt9sWVRKCVIyN9cPHBJSNnbL67w=
+github.com/golang/protobuf v1.4.0/go.mod h1:jodUvKwWbYaEsadDk5Fwe5c77LiNKVO9IDvqG2KuDX0=
+github.com/golang/protobuf v1.4.1/go.mod h1:U8fpvMrcmy5pZrNK1lt4xCsGvpyWQ/VVv6QDs8UjoX8=
+github.com/golang/protobuf v1.4.2/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI=
+github.com/golang/protobuf v1.4.3/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI=
+github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk=
+github.com/golang/protobuf v1.5.2/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY=
+github.com/golang/snappy v0.0.1/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q=
+github.com/golang/snappy v0.0.4 h1:yAGX7huGHXlcLOEtBnF4w7FQwA26wojNCwOYAEhLjQM=
+github.com/golang/snappy v0.0.4/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q=
+github.com/gomodule/redigo v1.8.9 h1:Sl3u+2BI/kk+VEatbj0scLdrFhjPmbxOc1myhDP41ws=
+github.com/gomodule/redigo v1.8.9/go.mod h1:7ArFNvsTjH8GMMzB4uy1snslv2BwmginuMs06a1uzZE=
+github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M=
+github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU=
+github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU=
+github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
+github.com/google/go-cmp v0.5.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
+github.com/google/go-cmp v0.5.2/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
+github.com/google/go-cmp v0.5.4/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
+github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
+github.com/google/go-cmp v0.5.6/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
+github.com/google/go-cmp v0.5.7/go.mod h1:n+brtR0CgQNWTVd5ZUFpTBC8YFBDLK/h/bpaJ8/DtOE=
+github.com/google/go-cmp v0.5.8/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY=
+github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI=
+github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY=
+github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg=
+github.com/google/gofuzz v1.2.0 h1:xRy4A+RhZaiKjJ1bPfwQ8sedCA+YS2YcCHW6ec7JMi0=
+github.com/google/gofuzz v1.2.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg=
+github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
+github.com/gorilla/securecookie v1.1.2 h1:YCIWL56dvtr73r6715mJs5ZvhtnY73hBvEF8kXD8ePA=
+github.com/gorilla/securecookie v1.1.2/go.mod h1:NfCASbcHqRSY+3a8tlWJwsQap2VX5pwzwo4h3eOamfo=
+github.com/gorilla/sessions v1.4.0 h1:kpIYOp/oi6MG/p5PgxApU8srsSw9tuFbt46Lt7auzqQ=
+github.com/gorilla/sessions v1.4.0/go.mod h1:FLWm50oby91+hl7p/wRxDth9bWSuk0qVL2emc7lT5ik=
+github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0/go.mod h1:8NvIoxWQoOIhqOTXgfV/d3M/q6VIi02HzZEHgUlZvzk=
+github.com/grpc-ecosystem/grpc-gateway v1.16.0/go.mod h1:BDjrQk3hbvj6Nolgz8mAMFbcEtjT1g+wF4CSlocrBnw=
+github.com/howeyc/fsnotify v0.9.0 h1:0gtV5JmOKH4A8SsFxG2BczSeXWWPvcMT0euZt5gDAxY=
+github.com/howeyc/fsnotify v0.9.0/go.mod h1:41HzSPxBGeFRQKEEwgh49TRw/nKBsYZ2cF1OzPjSJsA=
+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.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=
+github.com/jmespath/go-jmespath/internal/testify v1.5.1/go.mod h1:L3OGu8Wl2/fWfCI6z80xFu9LTZmf1ZRjMHUOPmWr69U=
+github.com/josharian/intern v1.0.0 h1:vlS4z54oSdjm0bgjRigI+G1HpF+tI+9rE5LLzOg8HmY=
+github.com/josharian/intern v1.0.0/go.mod h1:5DoeVV0s6jJacbCEi61lwdGj/aVlrQvzHFFd8Hwg//Y=
+github.com/jpillora/backoff v1.0.0/go.mod h1:J/6gKK9jxlEcS3zixgDgUAsiuZ7yrSoa/FX5e0EB2j4=
+github.com/json-iterator/go v1.1.6/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU=
+github.com/json-iterator/go v1.1.10/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4=
+github.com/json-iterator/go v1.1.11/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4=
+github.com/julienschmidt/httprouter v1.2.0/go.mod h1:SYymIcj16QtmaHHD7aYtjjsJG7VTCxuUUipMqKk8s4w=
+github.com/julienschmidt/httprouter v1.3.0/go.mod h1:JR6WtHb+2LUe8TCKY3cZOxFyyO8IZAc4RVcycCCAKdM=
+github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8=
+github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck=
+github.com/klauspost/compress v1.13.6 h1:P76CopJELS0TiO2mebmnzgWaajssP/EszplttgQxcgc=
+github.com/klauspost/compress v1.13.6/go.mod h1:/3/Vjq9QcHkK5uEr5lBEmyoZ1iFhe47etQ6QUkpK6sk=
+github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ=
+github.com/konsorten/go-windows-terminal-sequences v1.0.3/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ=
+github.com/kr/logfmt v0.0.0-20140226030751-b84e30acd515/go.mod h1:+0opPa2QZZtGFBFZlji/RkVcI2GknAs/DXo4wKdlNEc=
+github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo=
+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/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/lauyoume/gopinyin v0.0.0-20150113020433-f8d942704e7f h1:yBnCmV9OOvxS+uXfDy/Uq/H4O7GbMbiHy7m5MCpCulE=
+github.com/lauyoume/gopinyin v0.0.0-20150113020433-f8d942704e7f/go.mod h1:JxpPpDSex9zv9VOpo5h/izRHRfD/jCYTFSBmgIIzR1M=
+github.com/lunny/csession v0.0.0-20130910075847-fe53c5de3dfd h1:DXxmBCahjva4Ox4AWOv6pR1Csv33zSj97SaLOElfIsw=
+github.com/lunny/csession v0.0.0-20130910075847-fe53c5de3dfd/go.mod h1:3w9PScemEkJoLw3OYvLWMoD8XRCmXgGwsSpT6pFpJ0g=
+github.com/mailru/easyjson v0.7.6/go.mod h1:xzfreul335JAWq5oZzymOObrkdz5UnU4kGfJJLY9Nlc=
+github.com/mailru/easyjson v0.7.7 h1:UGYAvKxe3sBsEDzO8ZeWOSlIQfWFlxbzLZe7hwFURr0=
+github.com/mailru/easyjson v0.7.7/go.mod h1:xzfreul335JAWq5oZzymOObrkdz5UnU4kGfJJLY9Nlc=
+github.com/mattn/go-sqlite3 v1.14.24 h1:tpSp2G2KyMnnQu99ngJ47EIkWVmliIizyZBfPrBWDRM=
+github.com/mattn/go-sqlite3 v1.14.24/go.mod h1:Uh1q+B4BYcTPb+yiD3kU8Ct7aC0hY9fxUwlHK0RXw+Y=
+github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0=
+github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q=
+github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q=
+github.com/modern-go/reflect2 v0.0.0-20180701023420-4b7aa43c6742/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0=
+github.com/modern-go/reflect2 v1.0.1/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0=
+github.com/montanaflynn/stats v0.0.0-20171201202039-1bf9dbcd8cbe/go.mod h1:wL8QJuTMNUDYhXwkmfOly8iTdp5TEcJFWZD2D7SIkUc=
+github.com/montanaflynn/stats v0.7.1 h1:etflOAAHORrCC44V+aR6Ftzort912ZU+YLiSTuV8eaE=
+github.com/montanaflynn/stats v0.7.1/go.mod h1:etXPPgVO6n31NxCd9KQUMvCM+ve0ruNzt6R8Bnaayow=
+github.com/mschoch/smat v0.2.0/go.mod h1:kc9mz7DoBKqDyiRL7VZN8KvXQMWeTaVnttLRXOlotKw=
+github.com/mwitkow/go-conntrack v0.0.0-20161129095857-cc309e4a2223/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U=
+github.com/mwitkow/go-conntrack v0.0.0-20190716064945-2f068394615f/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U=
+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=
+github.com/olivere/elastic/v7 v7.0.22 h1:esBA6JJwvYgfms0EVlH7Z+9J4oQ/WUADF2y/nCNDw7s=
+github.com/olivere/elastic/v7 v7.0.22/go.mod h1:VDexNy9NjmtAkrjNoI7tImv7FR4tf5zUA3ickqu5Pc8=
+github.com/opentracing/opentracing-go v1.2.0/go.mod h1:GxEUsuufX4nBwe+T+Wl9TAgYrxe9dPLANfrWvHYVTgc=
+github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
+github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
+github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4=
+github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
+github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
+github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
+github.com/prometheus/client_golang v0.9.1/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw=
+github.com/prometheus/client_golang v1.0.0/go.mod h1:db9x61etRT2tGnBNRi70OPL5FsnadC4Ky3P0J6CfImo=
+github.com/prometheus/client_golang v1.7.1/go.mod h1:PY5Wy2awLA44sXw4AOSfFBetzPP4j5+D6mVACh+pe2M=
+github.com/prometheus/client_golang v1.11.1/go.mod h1:Z6t4BnS23TR94PD6BsDNk8yVqroYurpAkEiz0P2BEV0=
+github.com/prometheus/client_model v0.0.0-20180712105110-5c3871d89910/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo=
+github.com/prometheus/client_model v0.0.0-20190129233127-fd36f4220a90/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA=
+github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA=
+github.com/prometheus/client_model v0.2.0/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA=
+github.com/prometheus/common v0.4.1/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4=
+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/procfs v0.0.0-20181005140218-185b4288413d/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk=
+github.com/prometheus/procfs v0.0.2/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA=
+github.com/prometheus/procfs v0.1.3/go.mod h1:lV6e/gmhEcM9IjHGsFOCxxuZ+z1YqCvr4OA4YeYWdaU=
+github.com/prometheus/procfs v0.6.0/go.mod h1:cz+aTbrPOrUb4q7XlbU9ygM+/jj0fzG6c1xBZuNvfVA=
+github.com/robfig/cron v1.2.0 h1:ZjScXvvxeQ63Dbyxy76Fj3AT3Ut0aKsyd2/tl3DTMuQ=
+github.com/robfig/cron v1.2.0/go.mod h1:JGuDeoQd7Z6yL4zQhZ3OPEVHB7fL6Ka6skscFHfmt2k=
+github.com/rogpeppe/fastuuid v1.2.0/go.mod h1:jVj6XXZzXRy/MSR5jhDC/2q6DgLz+nrA6LYCDYWNEvQ=
+github.com/shopspring/decimal v1.4.0 h1:bxl37RwXBklmTi0C79JfXCEBD1cqqHt0bbgBAGFp81k=
+github.com/shopspring/decimal v1.4.0/go.mod h1:gawqmDU56v4yIKSwfBSFip1HdCCXN8/+DMd9qYNcwME=
+github.com/sirupsen/logrus v1.2.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo=
+github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6MwdIuYE2rE=
+github.com/sirupsen/logrus v1.6.0/go.mod h1:7uNnSEd1DgxDLC74fIahvMZmmYsHGZGEOFrfsX/uA88=
+github.com/smartystreets/assertions v1.1.1/go.mod h1:tcbTF8ujkAEcZ8TElKY+i30BzYlVhC/LOxJk7iOWnoo=
+github.com/smartystreets/go-aws-auth v0.0.0-20180515143844-0c1422d1fdb9/go.mod h1:SnhjPscd9TpLiy1LpzGSKh3bXCfxxXuqd9xmQJy3slM=
+github.com/smartystreets/gunit v1.4.2/go.mod h1:ZjM1ozSIMJlAz/ay4SG8PeKF00ckUp+zMHZXV9/bvak=
+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.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw=
+github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs=
+github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI=
+github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4=
+github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA=
+github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
+github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
+github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
+github.com/stretchr/testify v1.8.0 h1:pSgiaMZlXftHpm5L7V1+rVB+AZJydKsMxsQBIJw4PKk=
+github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU=
+github.com/tealeg/xlsx v1.0.5 h1:+f8oFmvY8Gw1iUXzPk+kz+4GpbDZPK1FhPiQRd+ypgE=
+github.com/tealeg/xlsx v1.0.5/go.mod h1:btRS8dz54TDnvKNosuAqxrM1QgN1udgk9O34bDCnORM=
+github.com/tidwall/pretty v1.0.0/go.mod h1:XNkn88O1ChpSDQmQeStsy+sBenx6DDtFZJxhVysOjyk=
+github.com/xdg-go/pbkdf2 v1.0.0 h1:Su7DPu48wXMwC3bs7MCNG+z4FhcyEuz5dlvchbq0B0c=
+github.com/xdg-go/pbkdf2 v1.0.0/go.mod h1:jrpuAogTd400dnrH08LKmI/xc1MbPOebTwRqcT5RDeI=
+github.com/xdg-go/scram v1.0.2/go.mod h1:1WAq6h33pAW+iRreB34OORO2Nf7qel3VV3fjBj+hCSs=
+github.com/xdg-go/scram v1.1.2 h1:FHX5I5B4i4hKRVRBCFRxq1iQRej7WO3hhBuJf+UUySY=
+github.com/xdg-go/scram v1.1.2/go.mod h1:RT/sEzTbU5y00aCK8UOx6R7YryM0iF1N2MOmC3kKLN4=
+github.com/xdg-go/stringprep v1.0.2/go.mod h1:8F9zXuvzgwmyT5DUm4GUfZGDdT3W+LCvS6+da4O5kxM=
+github.com/xdg-go/stringprep v1.0.4 h1:XLI/Ng3O1Atzq0oBs3TWm+5ZVgkq2aqdlvP9JtoZ6c8=
+github.com/xdg-go/stringprep v1.0.4/go.mod h1:mPGuuIYwz7CmR2bT9j4GbQqutWS1zV24gijq1dTyGkM=
+github.com/yl2chen/cidranger v1.0.2/go.mod h1:9U1yz7WPYDwf0vpNWFaeRh0bjwz5RVgRy/9UEQfHl0g=
+github.com/youmark/pkcs8 v0.0.0-20181117223130-1be2e3e5546d/go.mod h1:rHwXgn7JulP+udvsHwJoVG1YGAP6VLg4y9I5dyZdqmA=
+github.com/youmark/pkcs8 v0.0.0-20240726163527-a2c0da244d78 h1:ilQV1hzziu+LLM3zUTJ0trRztfwgjqKnBWNtSRkbmwM=
+github.com/youmark/pkcs8 v0.0.0-20240726163527-a2c0da244d78/go.mod h1:aL8wCCfTfSfmXjznFBSZNN13rSJjlIOI1fUNAtF7rmI=
+github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
+github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
+github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k=
+github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY=
+go.etcd.io/etcd/api/v3 v3.5.4/go.mod h1:5GB2vv4A4AOn3yk7MftYGHkUfGtDHnEraIjym4dYz5A=
+go.etcd.io/etcd/client/pkg/v3 v3.5.4/go.mod h1:IJHfcCEKxYu1Os13ZdwCwIUTUVGYTSAM3YSwc9/Ac1g=
+go.etcd.io/etcd/client/v3 v3.5.4/go.mod h1:ZaRkVgBZC+L+dLCjTcF1hRXpgZXQPOvnA/Ak/gq3kiY=
+go.mongodb.org/mongo-driver v1.9.1/go.mod h1:0sQWfOeY63QTntERDJJ/0SuKK0T1uVSgKCuAROlKEPY=
+go.mongodb.org/mongo-driver v1.17.1 h1:Wic5cJIwJgSpBhe3lx3+/RybR5PiYRMpVFgO7cOHyIM=
+go.mongodb.org/mongo-driver v1.17.1/go.mod h1:wwWm/+BuOddhcq3n68LKRmgk2wXzmF6s0SFOa0GINL4=
+go.opencensus.io v0.22.5/go.mod h1:5pWMHQbX5EPX2/62yrJeAkowc+lfs/XD7Uxpq3pI6kk=
+go.opentelemetry.io/proto/otlp v0.7.0/go.mod h1:PqfVotwruBrMGOCsRd/89rSnXhoiJIqeYNgFYFoEGnI=
+go.uber.org/atomic v1.7.0/go.mod h1:fEN4uk6kAWBTFdckzkM89CLk9XfWZrxpCo0nPH17wJc=
+go.uber.org/atomic v1.9.0/go.mod h1:fEN4uk6kAWBTFdckzkM89CLk9XfWZrxpCo0nPH17wJc=
+go.uber.org/goleak v1.1.11/go.mod h1:cwTWslyiVhfpKIDGSZEM2HlOvcqm+tG4zioyIeLoqMQ=
+go.uber.org/goleak v1.1.12/go.mod h1:cwTWslyiVhfpKIDGSZEM2HlOvcqm+tG4zioyIeLoqMQ=
+go.uber.org/multierr v1.6.0/go.mod h1:cdWPpRnG4AhwMwsgIHip0KRBQjJy5kYEpYjJxpXp9iU=
+go.uber.org/multierr v1.8.0/go.mod h1:7EAYxJLBy9rStEaz58O2t4Uvip6FSURkq8/ppBp95ak=
+go.uber.org/zap v1.17.0/go.mod h1:MXVU+bhUf/A7Xi2HNOnopQOrmycQ5Ih87HtOu4q5SSo=
+go.uber.org/zap v1.21.0/go.mod h1:wjWOCqI0f2ZZrJF/UufIOkiC8ii6tm1iqIsLo76RfJw=
+golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4=
+golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
+golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=
+golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto=
+golang.org/x/crypto v0.0.0-20201216223049-8b5274cf687f/go.mod h1:jdWPYTVW3xRLrWPugEBEK3UY2ZEsg3UU495nc5E+M+I=
+golang.org/x/crypto v0.0.0-20210920023735-84f357641f63/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc=
+golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc=
+golang.org/x/crypto v0.27.0 h1:GXm2NjJrPaiv/h1tb2UH8QfgC/hOf/+z0p6PT8o1w7A=
+golang.org/x/crypto v0.27.0/go.mod h1:1Xngt8kV6Dvbssa53Ziq6Eqn0HqbZi5Z6R0ZpwQzt70=
+golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA=
+golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE=
+golang.org/x/lint v0.0.0-20190227174305-5b3e6a55c961/go.mod h1:wehouNa3lNwaWXcvxsM5YxQ5yQlVC4a0KAMCusXpPoU=
+golang.org/x/lint v0.0.0-20190313153728-d0100b6bd8b3/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc=
+golang.org/x/lint v0.0.0-20190930215403-16217165b5de/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc=
+golang.org/x/lint v0.0.0-20210508222113-6edffad5e616/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY=
+golang.org/x/mod v0.1.1-0.20191105210325-c90efee705ee/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg=
+golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
+golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
+golang.org/x/mod v0.4.2/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
+golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4=
+golang.org/x/mod v0.8.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs=
+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-20181114220301-adae6a3d119a/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
+golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
+golang.org/x/net v0.0.0-20190213061140-3a22650c66bd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
+golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=
+golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=
+golang.org/x/net v0.0.0-20190613194153-d28f0bde5980/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
+golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
+golang.org/x/net v0.0.0-20200202094626-16171245cfb2/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
+golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
+golang.org/x/net v0.0.0-20200625001655-4c5254603344/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA=
+golang.org/x/net v0.0.0-20200822124328-c89045814202/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA=
+golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU=
+golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg=
+golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4/go.mod h1:p54w0d4576C0XHj96bSt6lcn1PtDYWL6XObtHCRCNQM=
+golang.org/x/net v0.0.0-20220531201128-c960675eff93/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c=
+golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c=
+golang.org/x/net v0.6.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs=
+golang.org/x/net v0.9.0/go.mod h1:d48xBJpPfHeWQsugry2m+kC02ZBRGRgulfHnEXEuWns=
+golang.org/x/net v0.29.0 h1:5ORfpBpCs4HzDYoodCDBbwHzdR5UrLBZ3sOnUJmFoHo=
+golang.org/x/net v0.29.0/go.mod h1:gLkgy8jTGERgjzMic6DS9+SP0ajcu6Xu3Orq/SpETg0=
+golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U=
+golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw=
+golang.org/x/oauth2 v0.0.0-20200107190931-bf48bf16ab8d/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw=
+golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
+golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
+golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
+golang.org/x/sync v0.0.0-20190227155943-e225da77a7e6/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
+golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
+golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
+golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
+golang.org/x/sync v0.0.0-20201207232520-09787c993a3a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
+golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
+golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
+golang.org/x/sync v0.1.0/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
+golang.org/x/sync v0.9.0 h1:fEo0HyrW1GIgZdpbhCRO0PkJajUS5H9IFUztCgEo2jQ=
+golang.org/x/sync v0.9.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk=
+golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
+golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
+golang.org/x/sys v0.0.0-20181116152217-5ac8a444bdc5/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
+golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
+golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
+golang.org/x/sys v0.0.0-20190422165155-953cdadca894/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
+golang.org/x/sys v0.0.0-20190502145724-3ef323f4f1fd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
+golang.org/x/sys v0.0.0-20191005200804-aed5e4c7ecf9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
+golang.org/x/sys v0.0.0-20191026070338-33540a1f6037/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
+golang.org/x/sys v0.0.0-20200106162015-b016eb3dc98e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
+golang.org/x/sys v0.0.0-20200323222414-85ca7c5b95cd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
+golang.org/x/sys v0.0.0-20200615200032-f1bc736245b1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
+golang.org/x/sys v0.0.0-20200625212154-ddb9806d33ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
+golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
+golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
+golang.org/x/sys v0.0.0-20210119212857-b64e53b001e4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
+golang.org/x/sys v0.0.0-20210124154548-22da62e12c0c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
+golang.org/x/sys v0.0.0-20210330210617-4fbd30eecc44/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
+golang.org/x/sys v0.0.0-20210403161142-5e06dd20ab57/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
+golang.org/x/sys v0.0.0-20210510120138-977fb7262007/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
+golang.org/x/sys v0.0.0-20210603081109-ebe580a85c40/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
+golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
+golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
+golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
+golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
+golang.org/x/sys v0.7.0/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-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8=
+golang.org/x/term v0.5.0/go.mod h1:jMB1sMXY+tzblOD4FWmEbocvup2/aLOaQEp7JmGp78k=
+golang.org/x/term v0.7.0/go.mod h1:P32HKFT3hSsZrRxla30E9HqToFYAQPCMs/zFMBUFqPY=
+golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
+golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk=
+golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
+golang.org/x/text v0.3.5/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
+golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ=
+golang.org/x/text v0.3.8/go.mod h1:E6s5w1FMmriuDzIBO73fBruAKo1PCIq6d2Q6DHfQ8WQ=
+golang.org/x/text v0.7.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8=
+golang.org/x/text v0.9.0/go.mod h1:e1OnstbJyHTd6l/uOt8jFFHp6TRDWZR/bV3emEE/zU8=
+golang.org/x/text v0.20.0 h1:gK/Kv2otX8gz+wn7Rmb3vT96ZwuoxnQlY+HlJVj7Qug=
+golang.org/x/text v0.20.0/go.mod h1:D4IsuqiFMhST5bX19pQ9ikHC2GsaKyk/oF+pn3ducp4=
+golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
+golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
+golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY=
+golang.org/x/tools v0.0.0-20190311212946-11955173bddd/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs=
+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-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
+golang.org/x/tools v0.0.0-20200130002326-2f3ba24bd6e7/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28=
+golang.org/x/tools v0.0.0-20200619180055-7c47624df98f/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE=
+golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA=
+golang.org/x/tools v0.1.2/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk=
+golang.org/x/tools v0.1.5/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk=
+golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc=
+golang.org/x/tools v0.6.0/go.mod h1:Xwgl3UAJ/d3gWutnCtw505GrjyAbvKui8lOU390QaIU=
+golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
+golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
+golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
+golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
+google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM=
+google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4=
+google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc=
+google.golang.org/genproto v0.0.0-20190425155659-357c62f0e4bb/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE=
+google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc=
+google.golang.org/genproto v0.0.0-20200513103714-09dca8ec2884/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c=
+google.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013/go.mod h1:NbSheEEYHJ7i3ixzK3sjbqSGDJWnxyFXZblF3eUsNvo=
+google.golang.org/genproto v0.0.0-20210602131652-f16073e35f0c/go.mod h1:UODoCrxHCcBojKKwX1terBiRUaqAsFqJiF615XL43r0=
+google.golang.org/genproto v0.0.0-20220602131408-e326c6e8e9c8/go.mod h1:yKyY4AMRwFiC8yMMNaMi+RkCnjZJt9LoWuvhXjMs+To=
+google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c=
+google.golang.org/grpc v1.20.1/go.mod h1:10oTOabMzJvdu6/UiuZezV6QK5dSlG84ov/aaiqXj38=
+google.golang.org/grpc v1.23.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg=
+google.golang.org/grpc v1.25.1/go.mod h1:c3i+UQWmh7LiEpx4sFZnkU36qjEYZ0imhYfXVyQciAY=
+google.golang.org/grpc v1.27.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk=
+google.golang.org/grpc v1.33.1/go.mod h1:fr5YgcSWrqhRRxogOsw7RzIpsmvOZ6IcH4kBYTpR3n0=
+google.golang.org/grpc v1.36.0/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU=
+google.golang.org/grpc v1.38.0/go.mod h1:NREThFqKR1f3iQ6oBuvc5LadQuXVGo9rkm5ZGrQdJfM=
+google.golang.org/grpc v1.46.2/go.mod h1:vN9eftEi1UMyUsIF80+uQXhHjbXYbm0uXoFCACuMGWk=
+google.golang.org/grpc v1.47.0/go.mod h1:vN9eftEi1UMyUsIF80+uQXhHjbXYbm0uXoFCACuMGWk=
+google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8=
+google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0=
+google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM=
+google.golang.org/protobuf v1.20.1-0.20200309200217-e05f789c0967/go.mod h1:A+miEFZTKqfCUM6K7xSMQL9OKL/b6hQv+e19PK+JZNE=
+google.golang.org/protobuf v1.21.0/go.mod h1:47Nbq4nVaFHyn7ilMalzfO3qCViNmqZ2kzikPIcrTAo=
+google.golang.org/protobuf v1.22.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU=
+google.golang.org/protobuf v1.23.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU=
+google.golang.org/protobuf v1.23.1-0.20200526195155-81db48ad09cc/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU=
+google.golang.org/protobuf v1.25.0/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=
+google.golang.org/protobuf v1.28.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I=
+gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw=
+gopkg.in/alexcesaro/quotedprintable.v3 v3.0.0-20150716171945-2caba252f4dc/go.mod h1:m7x9LTH6d71AHyAX77c9yqWCCa3UKHcVEj9y7hAtKDk=
+gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
+gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
+gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
+gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk=
+gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q=
+gopkg.in/gomail.v2 v2.0.0-20160411212932-81ebce5c23df/go.mod h1:LRQQ+SO6ZHR7tOkpBDuZnXENFzX8qRjMDMyPD6BRkCw=
+gopkg.in/natefinch/lumberjack.v2 v2.2.1/go.mod h1:YD8tP3GAjkrDg1eZH7EGmyESg/lsYskCTPBJVb9jqSc=
+gopkg.in/yaml.v2 v2.2.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
+gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
+gopkg.in/yaml.v2 v2.2.3/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
+gopkg.in/yaml.v2 v2.2.4/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
+gopkg.in/yaml.v2 v2.2.5/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
+gopkg.in/yaml.v2 v2.2.8/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
+gopkg.in/yaml.v2 v2.3.0/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
+gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ=
+gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
+gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
+gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA=
+gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
+gorm.io/driver/mysql v1.0.5 h1:WAAmvLK2rG0tCOqrf5XcLi2QUwugd4rcVJ/W3aoon9o=
+gorm.io/driver/mysql v1.0.5/go.mod h1:N1OIhHAIhx5SunkMGqWbGFVeh4yTNWKmMo1GOAsohLI=
+gorm.io/gorm v1.21.3 h1:qDFi55ZOsjZTwk5eN+uhAmHi8GysJ/qCTichM/yO7ME=
+gorm.io/gorm v1.21.3/go.mod h1:0HFTzE/SqkGTzK6TlDPPQbAYCluiVvhzoA1+aVyzenw=
+honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4=
+honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4=
+sigs.k8s.io/yaml v1.2.0/go.mod h1:yfXDCHCao9+ENCvLSE62v9VSji2MKu5jeNfTrofGhJc=

+ 11 - 16
src/main.go → SEPlatform/main.go

@@ -1,26 +1,21 @@
 package main
 
 import (
-	"client"
-	_ "filter"
-	"front"
-
-	// "history"
-
+	"app.yhyue.com/moapp/jybase/common"
+	"app.yhyue.com/moapp/jybase/go-xweb/xweb"
+	"app.yhyue.com/moapp/jybase/redis"
 	"log"
-	qu "qfw/util"
-	"qfw/util/redis"
-	"recharge"
-	"service"
+	"seplatform/client"
+	"seplatform/front"
+	"seplatform/recharge"
+	"seplatform/service"
+	"seplatform/util"
 	"time"
-	"util"
-
-	"github.com/go-xweb/xweb"
 )
 
 func init() {
-	qu.ReadConfig(&util.Sysconfig) //初始化配置
-	util.InitMgoPool()             //初始化连接
+	common.ReadConfig(&util.Sysconfig) //初始化配置
+	util.InitMgoPool()                 //初始化连接
 	util.InitOther()
 	//xweb框架配置
 	xweb.Config.RecoverPanic = true
@@ -50,5 +45,5 @@ func init() {
 
 func main() {
 	log.Println("port:", util.Sysconfig["port"])
-	xweb.Run(":" + qu.ObjToString(util.Sysconfig["port"]))
+	xweb.Run(":" + common.ObjToString(util.Sysconfig["port"]))
 }

+ 53 - 0
SEPlatform/models/tag.go

@@ -0,0 +1,53 @@
+package models
+
+import "go.mongodb.org/mongo-driver/bson/primitive"
+
+type Tag struct {
+	Id                   primitive.ObjectID `json:"_id" bson:"_id"`
+	Scustomer            string             `json:"s_customer" bson:"s_customer"`
+	Scustomerkey         string             `json:"s_customerkey" bson:"s_customerkey"`
+	Scustomername        string             `json:"s_customername" bson:"s_customername"`
+	Stagname             string             `json:"s_name" bson:"s_name"`
+	Stagnamekey          string             `json:"s_namekey" bson:"s_namekey"`
+	Ssalesperson         string             `json:"s_salesperson" bson:"s_salesperson"`
+	Istarttime           int                `json:"i_starttime" bson:"i_starttime"`
+	Iendtime             int                `json:"i_endtime" bson:"i_endtime"`
+	Sarea                string             `json:"s_area" bson:"s_area"`
+	Scity                string             `json:"s_city" bson:"s_city"`
+	Sdistrict            string             `json:"s_district" bson:"s_district"`
+	Sbudget              string             `json:"s_budgetlimit" bson:"s_budgetlimit"`
+	Sbidamount           string             `json:"s_bidamountlimit" bson:"s_bidamountlimit"`
+	Sglobaladdkey        string             `json:"s_globaladdkey" bson:"s_globaladdkey"`
+	Sglobaladdkeymatch   string             `json:"s_globaladdkeymatch" bson:"s_globaladdkeymatch"`
+	Sglobalnotkey        string             `json:"s_globalnotkey" bson:"s_globalnotkey"`
+	Sglobalnotkeymatch   string             `json:"s_globalnotkeymatch" bson:"s_globalnotkeymatch"`
+	Stoptype             string             `json:"s_toptype" bson:"s_toptype"`
+	Ssubtype             string             `json:"s_subtype" bson:"s_subtype"`
+	Sglobalbuyerclass    string             `json:"s_globalbuyerclass" bson:"s_globalbuyerclass"`
+	Sglobalsubscopeclass string             `json:"s_globalsubscopeclass" bson:"s_globalsubscopeclass"`
+	Sglobaltopscopeclass string             `json:"s_globaltopscopeclass" bson:"s_globaltopscopeclass"`
+	Orules               []ORules           `json:"o_rules" bson:"s_buyerclass"`
+	Sexistfields         string             `json:"s_existfields" bson:"s_existfields"`
+	Imaxnum              int                `json:"i_maxnum" bson:"i_maxnum"`
+	Iextfieldstype       int                `json:"i_extfieldstype" bson:"i_extfieldstype"`
+	Sesquery             string             `json:"s_esquery" bson:"s_esquery"`
+	Iesquerytype         int                `json:"i_esquerytype" bson:"i_esquerytype"`
+	Sdataid              string             `json:"s_dataid" bson:"s_dataid"`
+	Icreatetime          int                `json:"i_createtime" bson:"i_createtime"`
+	Iupdatetime          int                `json:"i_updatetime" bson:"i_updatetime"`
+	Screateuser          string             `json:"s_createuser" bson:"s_createuser"`
+	Supdateuser          string             `json:"s_updateuser" bson:"s_updateuser"`
+	SbudgetFieldExist    int                `json:"i_budgetfieldexist" bson:"i_budgetfieldexist"`
+	SbidamountFieldExist int                `json:"i_bidamountfieldexist" bson:"i_bidamountfieldexist"`
+}
+type ORules struct {
+	Smatchkey      string `json:"s_matchkey"  bson:"s_matchkey"`
+	Skeymatch      string `json:"s_keymatch" bson:"s_keymatch"`
+	Saddkey        string `json:"s_addkey" bson:"s_addkey"`
+	Saddkeymatch   string `json:"s_addkeymatch" bson:"s_addkeymatch"`
+	Snotkey        string `json:"s_notkey" bson:"s_notkey"`
+	Snotkeymatch   string `json:"s_notkeymatch" bson:"s_notkeymatch"`
+	Stopscopeclass string `json:"s_topscopeclass" bson:"s_topscopeclass"`
+	Ssubscopeclass string `json:"s_subscopeclass" bson:"s_subscopeclass"`
+	Sbuyerclass    string `json:"s_buyerclass" bson:"s_buyerclass"`
+}

+ 15 - 17
src/recharge/recharge.go → SEPlatform/recharge/recharge.go

@@ -1,24 +1,24 @@
 package recharge
 
 import (
-	. "api"
+	. "app.yhyue.com/moapp/jybase/api"
+	qu "app.yhyue.com/moapp/jybase/common"
+	"app.yhyue.com/moapp/jybase/go-xweb/xweb"
 	"database/sql"
 	"errors"
-	"github.com/go-xweb/xweb"
 	"log"
-	"qfw/util"
+	. "seplatform/util"
 	"time"
-	util2 "util"
 )
 
 type EntRecharge struct {
 	*xweb.Action
-	recharge       xweb.Mapper `xweb:"/back/Recharge"`   //后台充值接口
+	recharge xweb.Mapper `xweb:"/back/Recharge"` //后台充值接口
 }
 
 // 充值用户额度
 func (this *EntRecharge) Recharge() {
-	if this.Method()=="GET"{
+	if this.Method() == "GET" {
 		this.Render("recharge.html")
 	}
 	if !R.CheckReqParam(this.ResponseWriter, this.Request, "phone", "entId", "rechargeNum") {
@@ -27,8 +27,8 @@ func (this *EntRecharge) Recharge() {
 	// 获取用户id 企业id
 	form := this.GetForm()
 	phone := form.Get("phone")
-	entId := util.IntAll(form.Get("entId"))
-	rechargeNum := util.IntAll(form.Get("rechargeNum"))
+	entId := qu.IntAll(form.Get("entId"))
+	rechargeNum := qu.IntAll(form.Get("rechargeNum"))
 	remark := form.Get("remark")
 	// 充值
 	err := UserRecharge(phone, rechargeNum, entId, remark)
@@ -39,11 +39,10 @@ func (this *EntRecharge) Recharge() {
 	}
 }
 
-
 // 用户额度充值
 func UserRecharge(phone string, rechargeNum int, entId int, remark string) error {
 	// 查询用户是否存在
-	tmpRs := util2.JyMysql.FindOne("entniche_user", map[string]interface{}{"phone": phone, "ent_id": entId}, "", "")
+	tmpRs := JyMysql.FindOne("entniche_user", map[string]interface{}{"phone": phone, "ent_id": entId}, "", "")
 	if tmpRs == nil {
 		log.Printf("用户手机号有误:phone-%s,\n", phone)
 		return errors.New("用户id错误")
@@ -51,28 +50,28 @@ func UserRecharge(phone string, rechargeNum int, entId int, remark string) error
 	userId := int((*tmpRs)["id"].(int64))
 	// 查询是否已经在账户余额表
 	queryMap := map[string]interface{}{"user_id": userId, "ent_id": entId}
-	rs := util2.JyMysql.FindOne("user_account", queryMap, "", "")
+	rs := JyMysql.FindOne("user_account", queryMap, "", "")
 	if rs == nil {
 		// 用户额度表还没有该用户的记录 1.初始化一条记录
 		nowStr := time.Now().Local().Format("2006-01-02 15:04:05")
-		addRs := util2.JyMysql.Insert("user_account", map[string]interface{}{"user_id": userId, "ent_id": entId, "left_num": 0, "create_at": nowStr})
+		addRs := JyMysql.Insert("user_account", map[string]interface{}{"user_id": userId, "ent_id": entId, "left_num": 0, "create_at": nowStr})
 		println(addRs)
 	}
 	// 充值前剩余
-	result := util2.JyMysql.FindOne("user_account", queryMap, "", "")
+	result := JyMysql.FindOne("user_account", queryMap, "", "")
 	if result == nil {
 		return errors.New("用户账户查询失败")
 	}
 	before := int((*result)["left_num"].(int64))
 	after := before + rechargeNum
 	// 充值
-	rechargeRs := util2.JyMysql.ExecTx("用户充值", func(tx *sql.Tx) bool {
+	rechargeRs := JyMysql.ExecTx("用户充值", func(tx *sql.Tx) bool {
 		// 更新剩余额度
 		updateNowStr := time.Now().Local().Format("2006-01-02 15:04:05")
-		ok1 := util2.JyMysql.UpdateOrDeleteBySqlByTx(tx, "update user_account set left_num=?,update_at=? where user_id=? and ent_id=?", after, updateNowStr, userId, entId) > 0
+		ok1 := JyMysql.UpdateOrDeleteBySqlByTx(tx, "update user_account set left_num=?,update_at=? where user_id=? and ent_id=?", after, updateNowStr, userId, entId) > 0
 		// 生充值记录
 		sqlStr := "insert into user_recharge_record (user_id,ent_id,`before`,`after`,trade,create_at,remark) values(?,?,?,?,?,?,?)"
-		ok2 := util2.JyMysql.InsertBySqlByTx(tx, sqlStr, userId, entId, before, after, rechargeNum, updateNowStr, remark) != -1
+		ok2 := JyMysql.InsertBySqlByTx(tx, sqlStr, userId, entId, before, after, rechargeNum, updateNowStr, remark) != -1
 		return ok1 && ok2
 	})
 	if rechargeRs != true {
@@ -81,4 +80,3 @@ func UserRecharge(phone string, rechargeNum int, entId int, remark string) error
 	}
 	return nil
 }
-

+ 94 - 95
src/service/customer_service.go → SEPlatform/service/customer_service.go

@@ -1,21 +1,22 @@
 package service
 
 import (
+	qu "app.yhyue.com/moapp/jybase/common"
+	"app.yhyue.com/moapp/jybase/encrypt"
+	"app.yhyue.com/moapp/jybase/go-xweb/xweb"
+	"app.yhyue.com/moapp/jybase/mongodb"
 	"encoding/json"
 	"fmt"
+	"github.com/lauyoume/gopinyin"
+	"go.mongodb.org/mongo-driver/bson"
+	"go.mongodb.org/mongo-driver/bson/primitive"
 	"io/ioutil"
 	"log"
 	"net/http"
-	mongoutil "qfw/mongodb"
-	qu "qfw/util"
+	. "seplatform/util"
 	"strconv"
 	"strings"
 	"time"
-	. "util"
-
-	"github.com/go-xweb/xweb"
-	"github.com/lauyoume/gopinyin"
-	"gopkg.in/mgo.v2/bson"
 )
 
 type Customer struct {
@@ -69,9 +70,9 @@ type Customer struct {
 func (c *Customer) CustomerList() {
 	defer qu.Catch()
 	if c.Method() == "POST" {
-		start, _ := c.GetInteger("start")
-		limit, _ := c.GetInteger("length")
-		draw, _ := c.GetInteger("draw")
+		start, _ := c.GetInt("start")
+		limit, _ := c.GetInt("length")
+		draw, _ := c.GetInt("draw")
 		searchStr := c.GetString("search[value]")
 		search := strings.TrimSpace(searchStr)
 		query := bson.M{
@@ -83,7 +84,7 @@ func (c *Customer) CustomerList() {
 			}
 		}
 
-		data, _ := Mgo.Find("cuser", query, `{"i_updatetime":-1}`, nil, false, start, limit)
+		data, _ := Mgo.Find("cuser", query, `{"i_updatetime":-1}`, nil, false, int(start), int(limit))
 		count := Mgo.Count("cuser", query)
 		c.ServeJson(map[string]interface{}{
 			"draw":            draw,
@@ -109,10 +110,10 @@ func (c *Customer) CustomerEdit() {
 	defer qu.Catch()
 	id := c.GetString("id")
 	query := bson.M{}
-	query["_id"] = mongoutil.StringTOBsonId(id)
+	query["_id"] = mongodb.StringTOBsonId(id)
 	data, _ := Mgo.FindOneByField("cuser", query, `{}`)
 	depart, _ := Mgo.Find("cuserdepart", bson.M{"s_userid": id, "b_delete": false}, nil, nil, false, -1, -1)
-	(*data)["_id"] = mongoutil.BsonIdToSId((*data)["_id"])
+	(*data)["_id"] = mongodb.BsonIdToSId((*data)["_id"])
 	if (*data)["i_state"] == 1 {
 		tagRule, _ := Mgo.Find("eusertagrule", bson.M{"s_userid": id, "b_delete": false}, nil, nil, false, -1, -1)
 		c.T["tagrule"] = *tagRule
@@ -127,10 +128,10 @@ func (c *Customer) CustomerEuser() {
 	id := c.GetString("id")
 	query := bson.M{}
 
-	query["_id"] = mongoutil.StringTOBsonId(id)
+	query["_id"] = mongodb.StringTOBsonId(id)
 	data, _ := Mgo.FindOneByField("euser", query, `{}`)
 	depart, _ := Mgo.Find("euserdepart", bson.M{"s_userid": id, "b_delete": false}, nil, nil, false, -1, -1)
-	(*data)["_id"] = mongoutil.BsonIdToSId((*data)["_id"])
+	(*data)["_id"] = mongodb.BsonIdToSId((*data)["_id"])
 	if (*data)["i_state"] == 1 {
 		tagRule, _ := Mgo.Find("eusertagrule", bson.M{"s_userid": id, "b_delete": false}, nil, nil, false, -1, -1)
 		c.T["tagrule"] = *tagRule
@@ -176,7 +177,7 @@ func (c *Customer) CustomerSave() {
 			}
 		} else {
 			query := bson.M{
-				"_id": mongoutil.StringTOBsonId(id),
+				"_id": mongodb.StringTOBsonId(id),
 			}
 			rep = Mgo.Update("cuser", query, bson.M{"$set": data}, false, false)
 		}
@@ -225,12 +226,12 @@ func (c *Customer) DepartEdit() {
 	})
 }
 
-//部门启用、停用
+// 部门启用、停用
 func (c *Customer) SetupDepart() {
 	defer qu.Catch()
 	if c.Method() == "POST" {
 		_id := c.GetString("_id")
-		i_isuse, _ := c.GetInteger("i_isuse")
+		i_isuse, _ := c.GetInt("i_isuse")
 		nowtime := time.Now().Unix()
 		set := bson.M{
 			"$set": bson.M{
@@ -276,12 +277,12 @@ func (c *Customer) DepartDel() {
 			return
 		} else {
 			idAndSet := []map[string]interface{}{}
-			idAndSet = append(idAndSet, bson.M{"_id": mongoutil.StringTOBsonId(v)}) //查询条件
-			idAndSet = append(idAndSet, bson.M{"$set": bson.M{"b_delete": true}})   //修改的数据
+			idAndSet = append(idAndSet, bson.M{"_id": mongodb.StringTOBsonId(v)}) //查询条件
+			idAndSet = append(idAndSet, bson.M{"$set": bson.M{"b_delete": true}}) //修改的数据
 			update = append(update, idAndSet)
 			/*update = append(update, []map[string]interface{}{
 				map[string]interface{}{
-					"_id": mongoutil.StringTOBsonId(v),
+					"_id": mongodb.StringTOBsonId(v),
 				},
 				map[string]interface{}{
 					"$set": map[string]interface{}{
@@ -297,7 +298,7 @@ func (c *Customer) DepartDel() {
 	})
 }
 
-//转企
+// 转企
 func (c *Customer) CuserToEuser() {
 	defer qu.Catch()
 
@@ -326,7 +327,7 @@ func (c *Customer) CuserToEuser() {
 		},
 	}
 
-	b := Mgo.Update("cuser", bson.M{"_id": mongoutil.StringTOBsonId(_id)}, set, false, false)
+	b := Mgo.Update("cuser", bson.M{"_id": mongodb.StringTOBsonId(_id)}, set, false, false)
 
 	if !b {
 		c.ServeJson(map[string]interface{}{
@@ -335,7 +336,7 @@ func (c *Customer) CuserToEuser() {
 		return
 	}
 	//2、复制信息(部门、规则)
-	b = Mgo.Update("euser", bson.M{"_id": mongoutil.StringTOBsonId(_id)}, cuser, true, false)
+	b = Mgo.Update("euser", bson.M{"_id": mongodb.StringTOBsonId(_id)}, cuser, true, false)
 	if !b {
 		c.ServeJson(map[string]interface{}{
 			"rep": b,
@@ -364,10 +365,8 @@ func GetCustomerAppId(customer string) string {
 		req, err := http.NewRequest("POST", url, nil)
 		if err == nil {
 			resp, err := client.Do(req)
-			qu.Debug("1", err)
 			defer resp.Body.Close()
 			body, err := ioutil.ReadAll(resp.Body)
-			qu.Debug("2", err)
 			if err == nil {
 				resp := map[string]interface{}{}
 				json.Unmarshal(body, &resp)
@@ -379,7 +378,7 @@ func GetCustomerAppId(customer string) string {
 				}
 			}
 		} else {
-			qu.Debug("调企业用户接口失败", err)
+			log.Println("调企业用户接口失败", err)
 		}
 	}
 	//if appid != "" { //保存
@@ -393,7 +392,7 @@ func GetCustomerAppId(customer string) string {
 	return appid
 }
 
-//同步
+// 同步
 func (c *Customer) SynEuser() {
 	defer qu.Catch()
 	_id := c.GetString("_id")
@@ -405,14 +404,14 @@ func (c *Customer) SynEuser() {
 			"i_lastsynctime": nowTime,
 		},
 	}
-	b := Mgo.Update("cuser", bson.M{"_id": mongoutil.StringTOBsonId(_id)}, set, false, false)
+	b := Mgo.Update("cuser", bson.M{"_id": mongodb.StringTOBsonId(_id)}, set, false, false)
 	if !b {
 		c.ServeJson(map[string]interface{}{
 			"rep": b,
 		})
 		return
 	}
-	b = Mgo.Update("euser", bson.M{"_id": mongoutil.StringTOBsonId(_id)}, cuser, true, false)
+	b = Mgo.Update("euser", bson.M{"_id": mongodb.StringTOBsonId(_id)}, cuser, true, false)
 	if !b {
 		c.ServeJson(map[string]interface{}{
 			"rep": b,
@@ -447,9 +446,9 @@ func (c *Customer) SynEuser() {
 func (c *Customer) EntEuserList() {
 	defer qu.Catch()
 	if c.Method() == "POST" {
-		start, _ := c.GetInteger("start")
-		limit, _ := c.GetInteger("length")
-		draw, _ := c.GetInteger("draw")
+		start, _ := c.GetInt("start")
+		limit, _ := c.GetInt("length")
+		draw, _ := c.GetInt("draw")
 		searchStr := c.GetString("search[value]")
 		search := strings.TrimSpace(searchStr)
 		query := bson.M{
@@ -461,7 +460,7 @@ func (c *Customer) EntEuserList() {
 			}
 		}
 
-		data, _ := Mgo.Find("euser", query, `{"i_createtime":-1}`, nil, false, start, limit)
+		data, _ := Mgo.Find("euser", query, `{"i_createtime":-1}`, nil, false, int(start), int(limit))
 		count := Mgo.Count("euser", query)
 		c.ServeJson(map[string]interface{}{
 			"draw":            draw,
@@ -478,9 +477,9 @@ func (c *Customer) CuserRule() {
 	defer qu.Catch()
 	ids := strings.Split(c.GetString("ids"), ",")
 	if c.Method() == "POST" {
-		start, _ := c.GetInteger("start")
-		limit, _ := c.GetInteger("length")
-		draw, _ := c.GetInteger("draw")
+		start, _ := c.GetInt("start")
+		limit, _ := c.GetInt("length")
+		draw, _ := c.GetInt("draw")
 		searchStr := c.GetString("search[value]")
 		search := strings.TrimSpace(searchStr)
 		query := bson.M{
@@ -494,7 +493,7 @@ func (c *Customer) CuserRule() {
 			}
 		}
 
-		data, _ := Mgo.Find("cuserdepartrule", query, `{"i_createtime":-1}`, nil, false, start, limit)
+		data, _ := Mgo.Find("cuserdepartrule", query, `{"i_createtime":-1}`, nil, false, int(start), int(limit))
 		count := Mgo.Count("cuserdepartrule", query)
 		c.ServeJson(map[string]interface{}{
 			"draw":            draw,
@@ -514,9 +513,9 @@ func (c *Customer) EuserRule() {
 	defer qu.Catch()
 	ids := strings.Split(c.GetString("ids"), ",")
 	if c.Method() == "POST" {
-		start, _ := c.GetInteger("start")
-		limit, _ := c.GetInteger("length")
-		draw, _ := c.GetInteger("draw")
+		start, _ := c.GetInt("start")
+		limit, _ := c.GetInt("length")
+		draw, _ := c.GetInt("draw")
 		searchStr := c.GetString("search[value]")
 		search := strings.TrimSpace(searchStr)
 		query := bson.M{
@@ -530,7 +529,7 @@ func (c *Customer) EuserRule() {
 			}
 		}
 
-		data, _ := Mgo.Find("euserdepartrule", query, `{"i_createtime":-1}`, nil, false, start, limit)
+		data, _ := Mgo.Find("euserdepartrule", query, `{"i_createtime":-1}`, nil, false, int(start), int(limit))
 		count := Mgo.Count("euserdepartrule", query)
 		c.ServeJson(map[string]interface{}{
 			"draw":            draw,
@@ -574,7 +573,7 @@ func (c *Customer) CuserRuleCreate() {
 			s_namekey := gopinyin.Convert(qu.ObjToString(data["s_name"]), false)
 			data["s_namekey"] = s_namekey
 			data["b_delete"] = false
-			data["s_dataid"] = qu.SE.EncodeString(fmt.Sprintf("%v", i_createtime) + s_namekey + ids[0])
+			data["s_dataid"] = encrypt.SE.EncodeString(fmt.Sprintf("%v", i_createtime) + s_namekey + ids[0])
 			id = Mgo.Save("cuserdepartrule", data)
 			if id != "" {
 				rep = true
@@ -583,7 +582,7 @@ func (c *Customer) CuserRuleCreate() {
 			}
 		} else {
 			query := bson.M{
-				"_id": mongoutil.StringTOBsonId(id),
+				"_id": mongodb.StringTOBsonId(id),
 			}
 			rep = Mgo.Update("cuserdepartrule", query, bson.M{"$set": data}, false, false)
 		}
@@ -616,9 +615,9 @@ func (c *Customer) CuserRuleCreate() {
 func (c *Customer) CuserRuleEdit() {
 	defer qu.Catch()
 	id := c.GetString("id")
-	query := bson.M{"_id": mongoutil.StringTOBsonId(id)}
+	query := bson.M{"_id": mongodb.StringTOBsonId(id)}
 	data, _ := Mgo.FindOneByField("cuserdepartrule", query, `{}`)
-	(*data)["id"] = mongoutil.BsonIdToSId((*data)["_id"])
+	(*data)["id"] = mongodb.BsonIdToSId((*data)["_id"])
 	c.T["cid"] = (*data)["s_userid"]
 	c.T["ids"] = qu.ObjToString((*data)["s_departid"]) + "," + qu.ObjToString((*data)["s_userid"])
 	c.T["data"] = *data
@@ -639,9 +638,9 @@ func (c *Customer) CuserRuleEdit() {
 func (c *Customer) EuserRule1() {
 	defer qu.Catch()
 	id := c.GetString("id")
-	query := bson.M{"_id": mongoutil.StringTOBsonId(id)}
+	query := bson.M{"_id": mongodb.StringTOBsonId(id)}
 	data, _ := Mgo.FindOneByField("euserdepartrule", query, `{}`)
-	(*data)["id"] = mongoutil.BsonIdToSId((*data)["_id"])
+	(*data)["id"] = mongodb.BsonIdToSId((*data)["_id"])
 	var existfields = []string{}
 	if _, ok := (*data)["s_existfields"]; ok {
 		s_existfields := (*data)["s_existfields"].(string)
@@ -688,7 +687,7 @@ func (c *Customer) CuserRuleSetup() {
 	defer qu.Catch()
 	if c.Method() == "POST" {
 		_id := c.GetString("_id")
-		i_isuse, _ := c.GetInteger("i_isuse")
+		i_isuse, _ := c.GetInt("i_isuse")
 		set := bson.M{
 			"$set": bson.M{
 				"i_isuse": i_isuse,
@@ -806,7 +805,7 @@ func (c *Customer) EuserTagEdit() {
 				_id = Mgo.Save("eusertagrule", data)
 			} else {
 				query := bson.M{
-					"_id": mongoutil.StringTOBsonId(_id),
+					"_id": mongodb.StringTOBsonId(_id),
 				}
 				rep = Mgo.Update("eusertagrule", query, bson.M{"$set": data}, false, false)
 			}
@@ -820,7 +819,7 @@ func (c *Customer) EuserTagEdit() {
 				rep = AddHistoryLogTag(data, false, _id)
 			} else {
 				query := bson.M{
-					"_id": mongoutil.StringTOBsonId(_id),
+					"_id": mongodb.StringTOBsonId(_id),
 				}
 				reps := Mgo.Update("eusertagrule", query, bson.M{"$set": data}, false, false)
 				if reps {
@@ -863,7 +862,7 @@ func (c *Customer) EuserTag() {
 			_id = Mgo.Save("eusertagrule", data)
 		} else {
 			query := bson.M{
-				"_id": mongoutil.StringTOBsonId(_id),
+				"_id": mongodb.StringTOBsonId(_id),
 			}
 			rep = Mgo.Update("eusertagrule", query, bson.M{"$set": data}, false, false)
 		}
@@ -911,7 +910,7 @@ func (c *Customer) TagSetup() {
 	defer qu.Catch()
 	if c.Method() == "POST" {
 		_id := c.GetString("_id")
-		i_isuse, _ := c.GetInteger("i_isuse")
+		i_isuse, _ := c.GetInt("i_isuse")
 		set := bson.M{
 			"$set": bson.M{
 				"i_isuse": i_isuse,
@@ -942,9 +941,9 @@ func (c *Customer) CuserRuleList() {
 	defer qu.Catch()
 	if c.Method() == "POST" {
 		eid := c.GetString("eid")
-		start, _ := c.GetInteger("start")
-		limit, _ := c.GetInteger("length")
-		draw, _ := c.GetInteger("draw")
+		start, _ := c.GetInt("start")
+		limit, _ := c.GetInt("length")
+		draw, _ := c.GetInt("draw")
 		searchStr := c.GetString("search[value]")
 		search := strings.TrimSpace(searchStr)
 		query := bson.M{
@@ -957,7 +956,7 @@ func (c *Customer) CuserRuleList() {
 				bson.M{"s_name": bson.M{"$regex": search}},
 			}
 		}
-		data, _ := Mgo.Find("euserdepartrule", query, `{"i_createtime":-1}`, nil, false, start, limit)
+		data, _ := Mgo.Find("euserdepartrule", query, `{"i_createtime":-1}`, nil, false, int(start), int(limit))
 		for _, v := range *data {
 			d, _ := Mgo.FindById("euserdepart", qu.ObjToString(v["s_departid"]), nil)
 			v["s_depart"] = qu.ObjToString((*d)["s_name"])
@@ -992,13 +991,13 @@ func (c *Customer) CustomerHistory() {
 	id := c.GetString("id")
 	user := c.GetSession("user").(map[string]interface{})
 	query := bson.M{}
-	query["_id"] = mongoutil.StringTOBsonId(id)
+	query["_id"] = mongodb.StringTOBsonId(id)
 
 	hid := c.GetString("hid")
 	history_id := ""
 	if hid != "" {
 		history_id = hid
-		hData, ok := Mgo.FindOne("historylog", bson.M{"_id": mongoutil.StringTOBsonId(history_id)})
+		hData, ok := Mgo.FindOne("historylog", bson.M{"_id": mongodb.StringTOBsonId(history_id)})
 		if ok && hData != nil && len(*hData) > 0 {
 			c.T["history_rule"] = (*hData)["dep_rules"]
 			c.T["tagrule"] = (*hData)["tag_rules"]
@@ -1040,7 +1039,7 @@ func (c *Customer) CustomerHistory() {
 	c.Render("private/customer_history.html", &c.T)
 }
 
-//选择历史规则
+// 选择历史规则
 func (c *Customer) CustomerAllRule() {
 	customerId := c.GetString("c_id")
 	history_id := c.GetString("hid")
@@ -1050,7 +1049,7 @@ func (c *Customer) CustomerAllRule() {
 	}
 	inc_query := bson.M{
 		"user_id": customerId,
-		"_id":     mongoutil.StringTOBsonId(history_id),
+		"_id":     mongodb.StringTOBsonId(history_id),
 	}
 	//获取新增历史规则
 	inc_rules := []map[string]interface{}{}
@@ -1059,7 +1058,7 @@ func (c *Customer) CustomerAllRule() {
 	if inc_data != nil && *inc_data != nil {
 		for _, t := range (*inc_data)["dep_rules"].([]interface{}) {
 			if !t.(map[string]interface{})["is_new"].(bool) {
-				inc_rule["id"] = t.(map[string]interface{})["_id"].(bson.ObjectId).Hex() //规则id
+				inc_rule["id"] = t.(map[string]interface{})["_id"].(primitive.ObjectID).Hex() //规则id
 				inc_rule["s_depart_name"] = t.(map[string]interface{})["s_depart_name"]
 				inc_rule["s_name"] = t.(map[string]interface{})["s_name"]
 				inc_rule["s_depart_status"] = t.(map[string]interface{})["s_depart_status"]
@@ -1076,7 +1075,7 @@ func (c *Customer) CustomerAllRule() {
 		for _, m := range *data {
 			history_rule_data := make(map[string]interface{})
 			q := bson.M{
-				"s_departid": m["_id"].(bson.ObjectId).Hex(),
+				"s_departid": m["_id"].(primitive.ObjectID).Hex(),
 				"b_delete":   false,
 			}
 			history_rule_data["department_isuse"] = m["i_isuse"]
@@ -1084,7 +1083,7 @@ func (c *Customer) CustomerAllRule() {
 			depart_rule_data, _ := Mgo.Find("euserdepartrule", q, `{"i_createtime":-1}`, `{"s_name":1,"i_updatetime":1,"i_isuse":1,"_id":1}`, false, 0, 0)
 			if depart_rule_data != nil && len(*depart_rule_data) != 0 {
 				for _, j := range *depart_rule_data {
-					j["_id"] = j["_id"].(bson.ObjectId).Hex()
+					j["_id"] = j["_id"].(primitive.ObjectID).Hex()
 				}
 				history_rule_data["department_rule"] = depart_rule_data
 				history_rule_data["is_slected"] = true
@@ -1104,14 +1103,14 @@ func (c *Customer) CustomerAllRule() {
 	}
 }
 
-//保存历史规则
+// 保存历史规则
 func (c *Customer) SaveHistoryRule() {
 	rules_id := c.GetString("rulesid")
 	history_id := c.GetString("hid")
 	// userid := c.GetString("userid")
 	if history_id != "" {
 		user_history, _ := Mgo.FindOne("historylog", map[string]interface{}{
-			"_id": mongoutil.StringTOBsonId(history_id),
+			"_id": mongodb.StringTOBsonId(history_id),
 		})
 		if *user_history != nil && user_history != nil {
 			//获取私有标签
@@ -1123,21 +1122,21 @@ func (c *Customer) SaveHistoryRule() {
 				if len(dep_rules) > 0 {
 					for _, r := range dep_rules {
 						dep_new_rules = append(dep_new_rules, r)
-						ruleMap[mongoutil.BsonIdToSId(r["_id"])] = true
+						ruleMap[mongodb.BsonIdToSId(r["_id"])] = true
 					}
 				}
 				rules_id_list := strings.Split(rules_id, ",")
 				for _, rule := range rules_id_list {
 					if !ruleMap[rule] {
 						query := bson.M{
-							"_id":      mongoutil.StringTOBsonId(rule),
+							"_id":      mongodb.StringTOBsonId(rule),
 							"b_delete": false,
 						}
 						res, _ := Mgo.FindOne("euserdepartrule", query)
 						if res != nil && len(*res) != 0 {
 							//获取规则所属部门信息
 							department_info, _ := Mgo.FindOne("euserdepart", map[string]interface{}{
-								"_id":      mongoutil.StringTOBsonId((*res)["s_departid"].(string)),
+								"_id":      mongodb.StringTOBsonId((*res)["s_departid"].(string)),
 								"b_delete": false,
 							})
 							(*res)["is_new"] = false
@@ -1154,7 +1153,7 @@ func (c *Customer) SaveHistoryRule() {
 					},
 				}
 				ok := Mgo.Update("historylog", map[string]interface{}{
-					"_id": mongoutil.StringTOBsonId(history_id),
+					"_id": mongodb.StringTOBsonId(history_id),
 				}, set, false, false)
 				//log.Println("ok", ok)
 				c.ServeJson(map[string]interface{}{
@@ -1166,14 +1165,14 @@ func (c *Customer) SaveHistoryRule() {
 				dep_rules := []map[string]interface{}{}
 				for _, rule := range rules_id_list {
 					query := bson.M{
-						"_id":      mongoutil.StringTOBsonId(rule),
+						"_id":      mongodb.StringTOBsonId(rule),
 						"b_delete": false,
 					}
 					res, _ := Mgo.FindOne("euserdepartrule", query)
 					if res != nil && *res != nil {
 						//获取规则所属部门信息
 						department_info, _ := Mgo.FindOne("euserdepart", map[string]interface{}{
-							"_id":      mongoutil.StringTOBsonId((*res)["s_departid"].(string)),
+							"_id":      mongodb.StringTOBsonId((*res)["s_departid"].(string)),
 							"b_delete": false,
 						})
 						(*res)["is_new"] = false
@@ -1189,7 +1188,7 @@ func (c *Customer) SaveHistoryRule() {
 					},
 				}
 				isupdata := Mgo.Update("historylog", map[string]interface{}{
-					"_id": mongoutil.StringTOBsonId(history_id),
+					"_id": mongodb.StringTOBsonId(history_id),
 				}, set, false, false)
 				c.ServeJson(map[string]interface{}{
 					"status": isupdata,
@@ -1242,7 +1241,7 @@ func (c *Customer) HistoryRuleCreate() {
 				}
 				s_id = Mgo.Save("euserdepart", d_data)
 			} else {
-				s_id = mongoutil.BsonIdToSId((*dData)["_id"])
+				s_id = mongodb.BsonIdToSId((*dData)["_id"])
 			}
 			data["s_userid"] = user_id
 			data["s_departid"] = s_id
@@ -1251,7 +1250,7 @@ func (c *Customer) HistoryRuleCreate() {
 			s_namekey := gopinyin.Convert(qu.ObjToString(data["s_name"]), false)
 			data["s_namekey"] = s_namekey
 			data["b_delete"] = true
-			data["s_dataid"] = qu.SE.EncodeString(fmt.Sprintf("%v", i_createtime) + s_namekey + s_id)
+			data["s_dataid"] = encrypt.SE.EncodeString(fmt.Sprintf("%v", i_createtime) + s_namekey + s_id)
 			data["i_type"] = "historyData"
 			id = Mgo.Save("euserdepartrule", data)
 			if id != "" {
@@ -1261,7 +1260,7 @@ func (c *Customer) HistoryRuleCreate() {
 			}
 		} else {
 			query := bson.M{
-				"_id": mongoutil.StringTOBsonId(id),
+				"_id": mongodb.StringTOBsonId(id),
 			}
 			reps := Mgo.Update("euserdepartrule", query, bson.M{"$set": data}, false, false)
 			if reps {
@@ -1296,7 +1295,7 @@ func (c *Customer) HistoryRuleCreate() {
 	}
 }
 
-//私有标签关联数据
+// 私有标签关联数据
 func (c *Customer) HistoryTagAssociated() {
 	defer qu.Catch()
 	userid := c.GetString("userid")
@@ -1306,14 +1305,14 @@ func (c *Customer) HistoryTagAssociated() {
 
 	if userid != "" {
 		user_info, _ := Mgo.FindOne("historylog", map[string]interface{}{
-			"_id": mongoutil.StringTOBsonId(hid),
+			"_id": mongodb.StringTOBsonId(hid),
 		})
 		if user_info != nil && *user_info != nil {
 			tagrules := (*user_info)["tag_rules"]
 			if tagrules != nil {
 				tagrulesArr := qu.ObjArrToMapArr(tagrules.([]interface{}))
 				for _, m := range tagrulesArr {
-					if rule_id == mongoutil.BsonIdToSId(m["_id"]) {
+					if rule_id == mongodb.BsonIdToSId(m["_id"]) {
 						m["o_departruleids"] = tags
 					}
 				}
@@ -1323,7 +1322,7 @@ func (c *Customer) HistoryTagAssociated() {
 					},
 				}
 				is_updata := Mgo.Update("historylog", map[string]interface{}{
-					"_id": mongoutil.StringTOBsonId(hid),
+					"_id": mongodb.StringTOBsonId(hid),
 				}, set, false, false)
 				c.ServeJson(map[string]interface{}{
 					"rep": is_updata,
@@ -1339,7 +1338,7 @@ func getTserTag(userid string) *[]map[string]interface{} {
 }
 
 func AddHistoryLogDep(ruleData map[string]interface{}, isUpdate bool, id string) bool {
-	history_id := mongoutil.StringTOBsonId(ruleData["history_id"].(string))
+	history_id := mongodb.StringTOBsonId(ruleData["history_id"].(string))
 	hData, ok := Mgo.FindOne("historylog", bson.M{"_id": history_id})
 	if ok && hData != nil && *hData != nil && len(*hData) > 0 {
 		dep_rules := []map[string]interface{}{}
@@ -1349,7 +1348,7 @@ func AddHistoryLogDep(ruleData map[string]interface{}, isUpdate bool, id string)
 		ruleData["is_new"] = true
 		if isUpdate {
 			for k, v := range dep_rules {
-				if mongoutil.BsonIdToSId(v["_id"]) == id {
+				if mongodb.BsonIdToSId(v["_id"]) == id {
 					dep_rules[k] = ruleData
 				}
 			}
@@ -1364,7 +1363,7 @@ func AddHistoryLogDep(ruleData map[string]interface{}, isUpdate bool, id string)
 }
 
 func AddHistoryLogTag(ruleData map[string]interface{}, isUpdate bool, id string) bool {
-	history_id := mongoutil.StringTOBsonId(qu.ObjToString(ruleData["hid"]))
+	history_id := mongodb.StringTOBsonId(qu.ObjToString(ruleData["hid"]))
 	hData, ok := Mgo.FindOne("historylog", bson.M{"_id": history_id})
 	if ok && hData != nil && *hData != nil && len(*hData) > 0 {
 		tag_rules := []map[string]interface{}{}
@@ -1374,7 +1373,7 @@ func AddHistoryLogTag(ruleData map[string]interface{}, isUpdate bool, id string)
 		ruleData["is_new"] = true
 		if isUpdate {
 			for k, v := range tag_rules {
-				if mongoutil.BsonIdToSId(v["_id"]) == id {
+				if mongodb.BsonIdToSId(v["_id"]) == id {
 					tag_rules[k] = ruleData
 				}
 			}
@@ -1388,24 +1387,24 @@ func AddHistoryLogTag(ruleData map[string]interface{}, isUpdate bool, id string)
 
 }
 
-//历史任务删除私有标签
+// 历史任务删除私有标签
 func (c *Customer) HistoryTagDel() {
 	defer qu.Catch()
 	// userid := c.GetString("userid")
 	tagid := c.GetString("tagid")
 	hid := c.GetString("hid")
-	user_info, _ := Mgo.FindOne("historylog", bson.M{"_id": mongoutil.StringTOBsonId(hid)})
+	user_info, _ := Mgo.FindOne("historylog", bson.M{"_id": mongodb.StringTOBsonId(hid)})
 	if user_info != nil && *user_info != nil {
 		if (*user_info)["tag_rules"] != nil {
 			user_tag_rules := qu.ObjArrToMapArr((*user_info)["tag_rules"].([]interface{}))
 			ruleMap := map[string]bool{tagid: true}
 			ruleArr := []map[string]interface{}{}
 			for _, m := range user_tag_rules {
-				if !ruleMap[mongoutil.BsonIdToSId(m["_id"])] {
+				if !ruleMap[mongodb.BsonIdToSId(m["_id"])] {
 					ruleArr = append(ruleArr, m)
 				}
 			}
-			is_updata := Mgo.Update("historylog", bson.M{"_id": mongoutil.StringTOBsonId(hid)}, bson.M{"$set": bson.M{"tag_rules": ruleArr}}, false, false)
+			is_updata := Mgo.Update("historylog", bson.M{"_id": mongodb.StringTOBsonId(hid)}, bson.M{"$set": bson.M{"tag_rules": ruleArr}}, false, false)
 			c.ServeJson(map[string]interface{}{
 				"rep": is_updata,
 			})
@@ -1452,18 +1451,18 @@ func (c *Customer) DelHistoryRule() {
 	hid := c.GetString("hid")
 	log.Println(id, hid)
 	if hid != "" {
-		data, ok := Mgo.FindOne("historylog", bson.M{"_id": mongoutil.StringTOBsonId(hid)})
+		data, ok := Mgo.FindOne("historylog", bson.M{"_id": mongodb.StringTOBsonId(hid)})
 		if ok && data != nil && *data != nil {
 			if (*data)["dep_rules"] != nil {
 				dep_rules := qu.ObjArrToMapArr((*data)["dep_rules"].([]interface{}))
 				ruleMap := map[string]bool{id: true}
 				ruleArr := []map[string]interface{}{}
 				for _, m := range dep_rules {
-					if !ruleMap[mongoutil.BsonIdToSId(m["_id"])] {
+					if !ruleMap[mongodb.BsonIdToSId(m["_id"])] {
 						ruleArr = append(ruleArr, m)
 					}
 				}
-				ok := Mgo.Update("historylog", bson.M{"_id": mongoutil.StringTOBsonId(hid)}, bson.M{"$set": bson.M{"dep_rules": ruleArr}}, false, false)
+				ok := Mgo.Update("historylog", bson.M{"_id": mongodb.StringTOBsonId(hid)}, bson.M{"$set": bson.M{"dep_rules": ruleArr}}, false, false)
 				c.ServeJson(map[string]interface{}{
 					"success": ok,
 				})
@@ -1481,9 +1480,9 @@ func (c *Customer) Addhistoryrule() {
 			//newHistory["tag_rules"] = usertags
 			push_model, _ := strconv.Atoi(c.GetString("send_mode"))
 			push_type, _ := strconv.Atoi(c.GetString("push_type"))
-			isDup, _ := c.GetInteger("isDup")
-			i_projectdup, _ := c.GetInteger("i_projectdup")
-			i_datatable, _ := c.GetInteger("i_datatable")
+			isDup, _ := c.GetInt("isDup")
+			i_projectdup, _ := c.GetInt("i_projectdup")
+			i_datatable, _ := c.GetInt("i_datatable")
 			log.Println(isDup, i_projectdup, i_datatable)
 			i_updatetime, _ := strconv.ParseInt(c.GetString("i_updatetime"), 10, 64)
 			i_extfieldstype, _ := strconv.Atoi(c.GetString("i_extfieldstype"))
@@ -1503,7 +1502,7 @@ func (c *Customer) Addhistoryrule() {
 					"i_datatable":     i_datatable,
 				},
 			}
-			isupdata := Mgo.UpdateById("historylog", mongoutil.StringTOBsonId(his_id), set)
+			isupdata := Mgo.UpdateById("historylog", mongodb.StringTOBsonId(his_id), set)
 			if isupdata {
 				c.ServeJson(map[string]interface{}{
 					"history_id": his_id,

+ 16 - 16
src/service/feedback_service.go → SEPlatform/service/feedback_service.go

@@ -1,12 +1,12 @@
 package service
 
 import (
-	"github.com/go-xweb/xweb"
-	"gopkg.in/mgo.v2/bson"
-	mongoutil "qfw/mongodb"
-	qu "qfw/util"
+	qu "app.yhyue.com/moapp/jybase/common"
+	"app.yhyue.com/moapp/jybase/go-xweb/xweb"
+	"app.yhyue.com/moapp/jybase/mongodb"
+	"go.mongodb.org/mongo-driver/bson"
+	. "seplatform/util"
 	"strings"
-	. "util"
 )
 
 type Feedback struct {
@@ -15,13 +15,13 @@ type Feedback struct {
 	feedbackDetail xweb.Mapper `xweb:"/service/feedback/detail"` //反馈信息详情
 }
 
-//反馈列表
+// 反馈列表
 func (f *Feedback) FeedbackList() {
 	defer qu.Catch()
 	if f.Method() == "POST" {
-		start, _ := f.GetInteger("start")
-		limit, _ := f.GetInteger("length")
-		draw, _ := f.GetInteger("draw")
+		start, _ := f.GetInt("start")
+		limit, _ := f.GetInt("length")
+		draw, _ := f.GetInt("draw")
 		searchStr := f.GetString("search[value]")
 		search := strings.TrimSpace(searchStr)
 		//qu.Debug(start, limit, draw, search)
@@ -33,7 +33,7 @@ func (f *Feedback) FeedbackList() {
 			}
 		}
 
-		data, _ := Mgo.Find("feedback", query, `{"_id":-1}`, nil, false, start, limit)
+		data, _ := Mgo.Find("feedback", query, `{"_id":-1}`, nil, false, int(start), int(limit))
 		count := Mgo.Count("feedback", query)
 		f.ServeJson(map[string]interface{}{
 			"draw":            draw,
@@ -46,13 +46,13 @@ func (f *Feedback) FeedbackList() {
 	}
 }
 
-//反馈信息详情
+// 反馈信息详情
 func (f *Feedback) FeedbackDetail() {
 	defer qu.Catch()
 	if f.Method() == "POST" {
-		start, _ := f.GetInteger("start")
-		limit, _ := f.GetInteger("length")
-		draw, _ := f.GetInteger("draw")
+		start, _ := f.GetInt("start")
+		limit, _ := f.GetInt("length")
+		draw, _ := f.GetInt("draw")
 		searchStr := f.GetString("search[value]")
 		search := strings.TrimSpace(searchStr)
 		matchkey := f.GetString("matchkey")
@@ -69,7 +69,7 @@ func (f *Feedback) FeedbackDetail() {
 				"$regex": search,
 			}
 		}
-		data, _ := Mgo.Find("feedback_info", query, nil, nil, false, start, limit)
+		data, _ := Mgo.Find("feedback_info", query, nil, nil, false, int(start), int(limit))
 		count := Mgo.Count("feedback_info", query)
 		f.ServeJson(map[string]interface{}{
 			"draw":            draw,
@@ -80,7 +80,7 @@ func (f *Feedback) FeedbackDetail() {
 	} else {
 		id := f.GetString("_id")
 		query := bson.M{
-			"_id": mongoutil.StringTOBsonId(id),
+			"_id": mongodb.StringTOBsonId(id),
 		}
 		data, _ := Mgo.FindOne("feedback", query)
 		f.T["id"] = id

+ 14 - 15
src/service/private_rule.go → SEPlatform/service/private_rule.go

@@ -1,21 +1,20 @@
 package service
 
 import (
+	qu "app.yhyue.com/moapp/jybase/common"
+	"app.yhyue.com/moapp/jybase/go-xweb/xweb"
+	"app.yhyue.com/moapp/jybase/mongodb"
 	"encoding/json"
 	"fmt"
+	"go.mongodb.org/mongo-driver/bson"
 	"io"
 	"io/ioutil"
 	"net/http"
 	"os"
-	mongoutil "qfw/mongodb"
-	qu "qfw/util"
+	. "seplatform/util"
 	"strconv"
 	"strings"
 	"time"
-	. "util"
-
-	"github.com/go-xweb/xweb"
-	"gopkg.in/mgo.v2/bson"
 )
 
 type Rule struct {
@@ -26,10 +25,10 @@ type Rule struct {
 	archive xweb.Mapper `xweb:"/service/rule/archive"` //存档
 	history xweb.Mapper `xweb:"/service/rule/history"` //变更列表
 
-	downloadData     xweb.Mapper `xweb:"/service/cuser/rule/downloadata"`      //下载数据
-	downloadRule     xweb.Mapper `xweb:"/service/cuser/rule/downloadrule"`     //下载规则
-	demoData         xweb.Mapper `xweb:"/service/rule/preview"`          //预览数据
-	exportEs         xweb.Mapper `xweb:"/service/rule/exportes"`         //导出es
+	downloadData xweb.Mapper `xweb:"/service/cuser/rule/downloadata"`  //下载数据
+	downloadRule xweb.Mapper `xweb:"/service/cuser/rule/downloadrule"` //下载规则
+	demoData     xweb.Mapper `xweb:"/service/rule/preview"`            //预览数据
+	exportEs     xweb.Mapper `xweb:"/service/rule/exportes"`           //导出es
 }
 
 func (r *Rule) RuleImport() {
@@ -64,7 +63,7 @@ func (r *Rule) Archive() {
 		rep := false
 		_id := r.GetString("_id")
 		query := bson.M{
-			"_id": mongoutil.StringTOBsonId(_id),
+			"_id": mongodb.StringTOBsonId(_id),
 		}
 		tag, _ := Mgo.FindOne("tags", query)
 		if len(*tag) > 0 {
@@ -158,13 +157,13 @@ func (r *Rule) DemoData() {
 	defer qu.Catch()
 	if r.Method() == "POST" {
 		sDataid := r.GetString("s_dataid")
-		start, _ := r.GetInteger("start")
-		limit, _ := r.GetInteger("length")
-		draw, _ := r.GetInteger("draw")
+		start, _ := r.GetInt("start")
+		limit, _ := r.GetInt("length")
+		draw, _ := r.GetInt("draw")
 		query := bson.M{
 			"s_dataid": sDataid,
 		}
-		data, _ := Mgo.Find("tagsdata", query, `{"publishtime":-1}`, nil, false, start, limit)
+		data, _ := Mgo.Find("tagsdata", query, `{"publishtime":-1}`, nil, false, int(start), int(limit))
 		count := Mgo.Count("tagsdata", query)
 		for _, v := range *data {
 			if v["budget"] != nil {

+ 11 - 14
src/service/private_service.go → SEPlatform/service/private_service.go

@@ -1,24 +1,23 @@
 package service
 
 import (
+	qu "app.yhyue.com/moapp/jybase/common"
+	"app.yhyue.com/moapp/jybase/encrypt"
+	"app.yhyue.com/moapp/jybase/go-xweb/xweb"
+	"app.yhyue.com/moapp/jybase/redis"
 	"encoding/json"
 	"fmt"
+	"github.com/tealeg/xlsx"
+	"go.mongodb.org/mongo-driver/bson"
 	"io/ioutil"
 	"log"
 	"net/http"
 	"os"
-	qu "qfw/util"
-	gm "qfw/util/mail"
-	"qfw/util/redis"
 	"regexp"
+	. "seplatform/util"
 	"strings"
 	"time"
 	"unicode/utf8"
-	. "util"
-
-	"github.com/go-xweb/xweb"
-	"github.com/tealeg/xlsx"
-	"gopkg.in/mgo.v2/bson"
 )
 
 var (
@@ -39,7 +38,7 @@ func (f *Private) Keydatademo(world string) {
 	tmp := make(map[string]interface{})
 	destr := SEPreview.DecodeString(world)
 	typeStr := f.GetString("type")
-	qu.Debug(destr)
+	log.Println(destr)
 	if len(destr) > 10 {
 		var tagfield *map[string]interface{}
 		if typeStr == "private" {
@@ -301,7 +300,7 @@ func GetXlsxfile(mMap []map[string]interface{}, dataType int, fn string, fields
 			row.AddCell().SetValue(v["projectname"])
 			row.AddCell().SetValue(v["detail"])
 			row.AddCell().SetValue(v["jybxhref"])
-			ids := SE.EncodeString(qu.ObjToString(v["id"]))
+			ids := encrypt.SE.EncodeString(qu.ObjToString(v["id"]))
 			row.AddCell().SetValue(ids)
 			if len(fields) > 0 {
 				for _, vv := range fields {
@@ -385,7 +384,7 @@ func GetXlsxfile(mMap []map[string]interface{}, dataType int, fn string, fields
 			row.AddCell().SetValue(v["legal_person"])
 			row.AddCell().SetValue(v["company_phone"])
 			row.AddCell().SetValue(v["company_email"])
-			ids := SE.EncodeString(qu.ObjToString(v["id"]))
+			ids := encrypt.SE.EncodeString(qu.ObjToString(v["id"]))
 			row.AddCell().SetValue(ids)
 			if len(fields) > 0 {
 				for _, vv := range fields {
@@ -451,12 +450,10 @@ type keynum struct {
 	Num int
 }
 
-var gmail *gm.GmailAuth
-
 func urlToId(url string) string {
 	url = pre.ReplaceAllString(url, "")
 	url = suf.ReplaceAllString(url, "")
-	return qu.CommonDecodeArticle("content", url)[0]
+	return encrypt.CommonDecodeArticle("content", url)[0]
 }
 
 func deletefields(fieldnum int, data *map[string]interface{}) map[string]interface{} {

+ 39 - 41
src/service/second_push.go → SEPlatform/service/second_push.go

@@ -1,24 +1,22 @@
 package service
 
 import (
+	qu "app.yhyue.com/moapp/jybase/common"
+	"app.yhyue.com/moapp/jybase/go-xweb/xweb"
+	"app.yhyue.com/moapp/jybase/mongodb"
 	"encoding/json"
 	"fmt"
+	"go.mongodb.org/mongo-driver/bson"
+	"go.mongodb.org/mongo-driver/bson/primitive"
 	"log"
-	mongoutil "qfw/mongodb"
-	qu "qfw/util"
+	. "seplatform/util"
 	"strconv"
 	"strings"
 	"time"
-	. "util"
-
-	"github.com/go-xweb/xweb"
-
-	"gopkg.in/mgo.v2/bson"
 )
 
 var (
 	xlsxArr []map[string]interface{}
-	SE      = qu.SimpleEncrypt{Key: "topJYBX2019"}
 )
 
 type SecondPush struct {
@@ -38,13 +36,13 @@ func (s *SecondPush) SecondPush() {
 	id := s.GetString("id")
 	user := s.GetSession("user").(map[string]interface{})
 	query := bson.M{}
-	query["_id"] = mongoutil.StringTOBsonId(id)
+	query["_id"] = mongodb.StringTOBsonId(id)
 
 	s_pushid := s.GetString("s_pushid")
 	secondpush_id := ""
 	if s_pushid != "" {
 		secondpush_id = s_pushid
-		hData, ok := Mgo.FindOne("second_push", bson.M{"_id": mongoutil.StringTOBsonId(secondpush_id)})
+		hData, ok := Mgo.FindOne("second_push", bson.M{"_id": mongodb.StringTOBsonId(secondpush_id)})
 		if ok && hData != nil && len(*hData) > 0 {
 			s.T["spush_rule"] = (*hData)["dep_rules"]
 			(*hData)["_id"] = id
@@ -87,7 +85,7 @@ func (s *SecondPush) GetUserRule() {
 		for _, m := range *data {
 			history_rule_data := make(map[string]interface{})
 			q := bson.M{
-				"s_departid": mongoutil.BsonIdToSId(m["_id"]),
+				"s_departid": mongodb.BsonIdToSId(m["_id"]),
 				"b_delete":   false,
 			}
 			history_rule_data["department_isuse"] = m["i_isuse"]
@@ -95,7 +93,7 @@ func (s *SecondPush) GetUserRule() {
 			depart_rule_data, _ := Mgo.Find("euserdepartrule", q, `{"i_createtime":-1}`, `{"s_name":1,"i_updatetime":1,"i_isuse":1,"_id":1}`, false, 0, 0)
 			if depart_rule_data != nil && len(*depart_rule_data) != 0 {
 				for _, j := range *depart_rule_data {
-					j["_id"] = mongoutil.BsonIdToSId(j["_id"])
+					j["_id"] = mongodb.BsonIdToSId(j["_id"])
 				}
 				history_rule_data["department_rule"] = depart_rule_data
 				history_rule_data["is_slected"] = true
@@ -121,7 +119,7 @@ func (s *SecondPush) SaveSpushRule() {
 	// userid := s.GetString("userid")
 	if s_pushid != "" {
 		user_history, _ := Mgo.FindOne("second_push", map[string]interface{}{
-			"_id": mongoutil.StringTOBsonId(s_pushid),
+			"_id": mongodb.StringTOBsonId(s_pushid),
 		})
 		if *user_history != nil && user_history != nil {
 			if (*user_history)["dep_rules"] != nil {
@@ -131,21 +129,21 @@ func (s *SecondPush) SaveSpushRule() {
 				if len(dep_rules) > 0 {
 					for _, r := range dep_rules {
 						dep_new_rules = append(dep_new_rules, r)
-						ruleMap[mongoutil.BsonIdToSId(r["_id"])] = true
+						ruleMap[mongodb.BsonIdToSId(r["_id"])] = true
 					}
 				}
 				rules_id_list := strings.Split(rules_id, ",")
 				for _, rule := range rules_id_list {
 					if !ruleMap[rule] {
 						query := bson.M{
-							"_id":      mongoutil.StringTOBsonId(rule),
+							"_id":      mongodb.StringTOBsonId(rule),
 							"b_delete": false,
 						}
 						res, _ := Mgo.FindOne("euserdepartrule", query)
 						if res != nil && len(*res) != 0 {
 							//获取规则所属部门信息
 							department_info, _ := Mgo.FindOne("euserdepart", map[string]interface{}{
-								"_id":      mongoutil.StringTOBsonId((*res)["s_departid"].(string)),
+								"_id":      mongodb.StringTOBsonId((*res)["s_departid"].(string)),
 								"b_delete": false,
 							})
 							(*res)["is_new"] = false
@@ -162,7 +160,7 @@ func (s *SecondPush) SaveSpushRule() {
 					},
 				}
 				ok := Mgo.Update("second_push", map[string]interface{}{
-					"_id": mongoutil.StringTOBsonId(s_pushid),
+					"_id": mongodb.StringTOBsonId(s_pushid),
 				}, set, false, false)
 				s.ServeJson(map[string]interface{}{
 					"status": ok,
@@ -173,14 +171,14 @@ func (s *SecondPush) SaveSpushRule() {
 				dep_rules := []map[string]interface{}{}
 				for _, rule := range rules_id_list {
 					query := bson.M{
-						"_id":      mongoutil.StringTOBsonId(rule),
+						"_id":      mongodb.StringTOBsonId(rule),
 						"b_delete": false,
 					}
 					res, _ := Mgo.FindOne("euserdepartrule", query)
 					if res != nil && *res != nil {
 						//获取规则所属部门信息
 						department_info, _ := Mgo.FindOne("euserdepart", map[string]interface{}{
-							"_id":      mongoutil.StringTOBsonId((*res)["s_departid"].(string)),
+							"_id":      mongodb.StringTOBsonId((*res)["s_departid"].(string)),
 							"b_delete": false,
 						})
 						(*res)["is_new"] = false
@@ -196,7 +194,7 @@ func (s *SecondPush) SaveSpushRule() {
 					},
 				}
 				isupdata := Mgo.Update("second_push", map[string]interface{}{
-					"_id": mongoutil.StringTOBsonId(s_pushid),
+					"_id": mongodb.StringTOBsonId(s_pushid),
 				}, set, false, false)
 				s.ServeJson(map[string]interface{}{
 					"status": isupdata,
@@ -217,7 +215,7 @@ func (s *SecondPush) SecondPushTask() {
 	log.Println("开始二次推送任务...")
 	s_pushid := s.GetString("s_pushid")
 	if s_pushid != "" {
-		customer, _ := Mgo.Find("second_push", map[string]interface{}{"_id": mongoutil.StringTOBsonId(s_pushid)}, nil, nil, false, -1, -1)
+		customer, _ := Mgo.Find("second_push", map[string]interface{}{"_id": mongodb.StringTOBsonId(s_pushid)}, nil, nil, false, -1, -1)
 		if len(*customer) == 1 {
 			c := (*customer)[0]
 			customer_name := qu.ObjToString(c["s_name"]) //客户名称
@@ -228,11 +226,11 @@ func (s *SecondPush) SecondPushTask() {
 			updateMap := [][]map[string]interface{}{}
 			if len(c) != 0 && c != nil {
 				if c["dep_rules"] != nil && len(c["dep_rules"].([]interface{})) != 0 {
-					idMap := map[bson.ObjectId]bool{}
+					idMap := map[primitive.ObjectID]bool{}
 					for _, m := range c["dep_rules"].([]interface{}) {
-						log.Println("ruleid", mongoutil.BsonIdToSId(m.(map[string]interface{})["_id"]))
+						log.Println("ruleid", mongodb.BsonIdToSId(m.(map[string]interface{})["_id"]))
 						q := bson.M{
-							"ruleid": bson.M{"$regex": mongoutil.BsonIdToSId(m.(map[string]interface{})["_id"])},
+							"ruleid": bson.M{"$regex": mongodb.BsonIdToSId(m.(map[string]interface{})["_id"])},
 							"bget":   1,
 							"createtime": bson.M{
 								"$gte": starttime,
@@ -243,8 +241,8 @@ func (s *SecondPush) SecondPushTask() {
 						if len(*d) > 0 && d != nil {
 							for _, l := range *d {
 								// 根据id进行去重
-								if _, ok := idMap[l["_id"].(bson.ObjectId)]; !ok {
-									idMap[l["_id"].(bson.ObjectId)] = true
+								if _, ok := idMap[l["_id"].(primitive.ObjectID)]; !ok {
+									idMap[l["_id"].(primitive.ObjectID)] = true
 									// 项目匹配为"1" 以及项目id为空时进行项目id匹配   同时更新数据库
 									if projectIdSearch == "1" && (l["projectId"] == "" || l["projectId"] == nil) {
 										updateMap = searchProjectId(l, updateMap)
@@ -354,7 +352,7 @@ func getProjectId(id string) string {
 
 func UpdateHistoryState(state int, s_pushid string, count int) {
 	if state == 2 {
-		Mgo.Update("second_push", map[string]interface{}{"_id": mongoutil.StringTOBsonId(s_pushid)}, map[string]interface{}{
+		Mgo.Update("second_push", map[string]interface{}{"_id": mongodb.StringTOBsonId(s_pushid)}, map[string]interface{}{
 			"$set": map[string]interface{}{
 				"state":        state,
 				"result_count": count,
@@ -364,7 +362,7 @@ func UpdateHistoryState(state int, s_pushid string, count int) {
 		return
 	}
 
-	Mgo.Update("second_push", map[string]interface{}{"_id": mongoutil.StringTOBsonId(s_pushid)}, map[string]interface{}{
+	Mgo.Update("second_push", map[string]interface{}{"_id": mongodb.StringTOBsonId(s_pushid)}, map[string]interface{}{
 		"$set": map[string]interface{}{
 			"state": state,
 		},
@@ -372,7 +370,7 @@ func UpdateHistoryState(state int, s_pushid string, count int) {
 }
 
 func (s *SecondPush) HistoryClone(hid string) {
-	data, ok := Mgo.FindOne("second_push", map[string]interface{}{"_id": mongoutil.StringTOBsonId(hid)})
+	data, ok := Mgo.FindOne("second_push", map[string]interface{}{"_id": mongodb.StringTOBsonId(hid)})
 	if ok && data != nil && *data != nil {
 		(*data)["state"] = 0
 		(*data)["result_count"] = nil
@@ -391,19 +389,19 @@ func (s *SecondPush) HistoryRuleEdit() {
 		o_rulesStr := data["o_rules"].(string)
 		json.Unmarshal([]byte(o_rulesStr), &o_rules)
 		data["o_rules"] = o_rules
-		data["_id"] = mongoutil.StringTOBsonId(rid)
+		data["_id"] = mongodb.StringTOBsonId(rid)
 		if qu.IntAll(data["i_esquerytype"]) == 1 { //自动生成es
 			data["s_esquery"] = Utiltags(data)
 		}
-		datas, ok := Mgo.FindOne("second_push", map[string]interface{}{"_id": mongoutil.StringTOBsonId(hid)})
+		datas, ok := Mgo.FindOne("second_push", map[string]interface{}{"_id": mongodb.StringTOBsonId(hid)})
 		if ok && datas != nil && *datas != nil {
 			dep_rules := qu.ObjArrToMapArr((*datas)["dep_rules"].([]interface{}))
 			for k, v := range dep_rules {
-				if rid == mongoutil.BsonIdToSId(v["_id"]) {
+				if rid == mongodb.BsonIdToSId(v["_id"]) {
 					dep_rules[k] = data
 				}
 			}
-			rep := Mgo.Update("second_push", map[string]interface{}{"_id": mongoutil.StringTOBsonId(hid)}, map[string]interface{}{"$set": map[string]interface{}{"dep_rules": dep_rules}}, false, false)
+			rep := Mgo.Update("second_push", map[string]interface{}{"_id": mongodb.StringTOBsonId(hid)}, map[string]interface{}{"$set": map[string]interface{}{"dep_rules": dep_rules}}, false, false)
 			s.ServeJson(map[string]interface{}{
 				"rep":       rep,
 				"s_esquery": data["s_esquery"],
@@ -411,11 +409,11 @@ func (s *SecondPush) HistoryRuleEdit() {
 		}
 	} else {
 		id := s.GetString("id")
-		data, ok := Mgo.FindOne("second_push", map[string]interface{}{"_id": mongoutil.StringTOBsonId(hid)})
+		data, ok := Mgo.FindOne("second_push", map[string]interface{}{"_id": mongodb.StringTOBsonId(hid)})
 		if ok && data != nil && *data != nil {
 			dep_rules := qu.ObjArrToMapArr((*data)["dep_rules"].([]interface{}))
 			for _, v := range dep_rules {
-				if rid == mongoutil.BsonIdToSId(v["_id"]) {
+				if rid == mongodb.BsonIdToSId(v["_id"]) {
 					s.T["data"] = v
 				}
 			}
@@ -450,7 +448,7 @@ func GetXlsxs(mMap []map[string]interface{}, fn, email, id, appid string) {
 	// 		isfilehref = true
 	// 	}
 	// 	query := bson.M{
-	// 		"_id": bson.ObjectIdHex(id),
+	// 		"_id": primitive.ObjectIDHex(id),
 	// 	}
 	// 	data, ok := Mgo.FindOne("second_push", query)
 	// 	if ok && (*data) != nil && len(*data) > 0 {
@@ -872,7 +870,7 @@ func (s *SecondPush) AddSecondPushRule() {
 					"projectIdSearch": s.GetString("projectIdSearch"),
 				},
 			}
-			isupdata := Mgo.UpdateById("second_push", mongoutil.StringTOBsonId(his_id), set)
+			isupdata := Mgo.UpdateById("second_push", mongodb.StringTOBsonId(his_id), set)
 			if isupdata {
 				s.ServeJson(map[string]interface{}{
 					"history_id": his_id,
@@ -900,7 +898,7 @@ func (s *SecondPush) SecondPushList() {
 }
 
 func (s *SecondPush) SecondPushClone(hid string) {
-	data, ok := Mgo.FindOne("second_push", map[string]interface{}{"_id": mongoutil.StringTOBsonId(hid)})
+	data, ok := Mgo.FindOne("second_push", map[string]interface{}{"_id": mongodb.StringTOBsonId(hid)})
 	user := s.GetSession("user").(map[string]interface{})
 	if ok && data != nil && *data != nil {
 		(*data)["state"] = 0
@@ -917,18 +915,18 @@ func (s *SecondPush) DelSecondPushRule() {
 	id := s.GetString("id")
 	hid := s.GetString("s_pushid")
 	if hid != "" {
-		data, ok := Mgo.FindOne("second_push", bson.M{"_id": mongoutil.StringTOBsonId(hid)})
+		data, ok := Mgo.FindOne("second_push", bson.M{"_id": mongodb.StringTOBsonId(hid)})
 		if ok && data != nil && *data != nil {
 			if (*data)["dep_rules"] != nil {
 				dep_rules := qu.ObjArrToMapArr((*data)["dep_rules"].([]interface{}))
 				ruleMap := map[string]bool{id: true}
 				ruleArr := []map[string]interface{}{}
 				for _, m := range dep_rules {
-					if !ruleMap[mongoutil.BsonIdToSId(m["_id"])] {
+					if !ruleMap[mongodb.BsonIdToSId(m["_id"])] {
 						ruleArr = append(ruleArr, m)
 					}
 				}
-				ok := Mgo.Update("second_push", bson.M{"_id": mongoutil.StringTOBsonId(hid)}, bson.M{"$set": bson.M{"dep_rules": ruleArr}}, false, false)
+				ok := Mgo.Update("second_push", bson.M{"_id": mongodb.StringTOBsonId(hid)}, bson.M{"$set": bson.M{"dep_rules": ruleArr}}, false, false)
 				s.ServeJson(map[string]interface{}{
 					"success": ok,
 				})

+ 213 - 0
SEPlatform/sqlmodel/rules_es.go

@@ -0,0 +1,213 @@
+package sqlmodel
+
+type QueryObjecct struct {
+	Bool *BoolObject `json:"bool,omitempty"`
+	// Filtered struct {
+	// 	Filter *Filter `json:"filter,omitempty"`
+	// 	Query  *Query  `json:"query,omitempty"`
+	// } `json:"filtered,omitempty"`
+}
+
+type Query struct {
+	Bool *BoolObject `json:"bool,omitempty"`
+}
+
+type Filter struct {
+	Bool *BoolObject `json:"bool,omitempty"`
+}
+
+// 省市县
+type AreaCityDistrictMust struct {
+	*AreaCityDistrict `json:"terms,omitempty"`
+}
+
+// 省市县
+type AreaCityDistrict struct {
+	Area     []string `json:"area,omitempty"`
+	City     []string `json:"city,omitempty"`
+	District []string `json:"district,omitempty"`
+}
+
+type DistrictObject struct {
+	Term struct {
+		City     string `json:"city,omitempty"`
+		District string `json:"district,omitempty"`
+	} `json:"term,omitempty"`
+}
+
+// 一级分类、二级分类
+type ToptypeSubtypeMust struct {
+	*ToptypeSubtype `json:"terms,omitempty"`
+}
+
+// 一级分类、二级分类
+type ToptypeSubtype struct {
+	Toptype []string `json:"toptype,omitempty"`
+	Subtype []string `json:"subtype,omitempty"`
+}
+
+//一级公告类型
+//type ScopeclassMust1 struct {
+//	*Scopeclass `json:"prefix,omitempty"`
+//}
+
+// 公告类型
+type ScopeclassMust struct {
+	*Scopeclass `json:"terms,omitempty"`
+}
+type Scopeclass struct {
+	Globaltopscopeclass []string `json:"s_topscopeclass,omitempty"`
+	Globalsubscopeclass []string `json:"s_subscopeclass,omitempty"`
+}
+
+type BudgetMust struct {
+	BudgetObj *BudgetObj `json:"range,omitempty"`
+}
+type BudgetObj struct {
+	Budget *BudgetOrBidamount `json:"budget,omitempty"`
+}
+type BidamountMust struct {
+	BidamountObj *BidamountObj `json:"range,omitempty"`
+}
+type BidamountObj struct {
+	Bidamount *BudgetOrBidamount `json:"bidamount,omitempty"`
+}
+type BudgetOrBidamount struct {
+	Gte float64 `json:"gte,omitempty"`
+	Lt  float64 `json:"lt,omitempty"`
+}
+
+// 时间范围
+type PublishtimeMust struct {
+	PublishtimeObject *PublishtimeObject `json:"range,omitempty"`
+}
+
+// 时间范围
+type PublishtimeObject struct {
+	//查询时间
+	Publishtime  *Publishtime  `json:"publishtime,omitempty"`
+	Publishtime1 *Publishtime1 `json:"publishtime1,omitempty"`
+	Publishtime2 *Publishtime2 `json:"publishtime2,omitempty"`
+}
+
+// 查询时间
+type Publishtime struct {
+	Gte int `json:"gte"`
+	Lt  int `json:"lt"`
+}
+type Publishtime1 struct {
+	Gte int `json:"gte"`
+}
+type Publishtime2 struct {
+	Lt int `json:"lt"`
+}
+
+// 字段是或否存在
+type ExistfieldsObjectMust struct {
+	ExistfieldsObject *ExistfieldsObject `json:"constant_score,omitempty"`
+}
+
+// 字段存在 存在放MustNot,字符串为空忽略
+type ExistfieldsObject struct {
+	Filter struct {
+		Exists struct {
+			Field string `json:"field,omitempty"`
+		} `json:"exists,omitempty"`
+	} `json:"filter,omitempty"`
+}
+
+type ShouldObj struct {
+	MatchPhrase *MatchPhrase `json:"match_phrase,omitempty"`
+	MultiMatch  *MultiMatch  `json:"multi_match,omitempty"`
+}
+
+// 匹配方式
+type MatchPhrase struct {
+	Title       string `json:"title,omitempty"`
+	Detail      string `json:"detail,omitempty"`
+	Purchasing  string `json:"purchasing,omitempty"`
+	Attachments string `json:"attachments,omitempty"`
+	Projectname string `json:"projectname,omitempty"`
+}
+
+type MultiMatch struct {
+	Query  string   `json:"query,omitempty"`
+	Type   string   `json:"type,omitempty"`
+	Fields []string `json:"fields,omitempty"`
+}
+
+// 匹配方式 采购单位、中标单位 正则匹配
+type Regular struct {
+	Regexp1 *MultiMatch `json:"regexp1,omitempty"`
+	Regexp2 *MultiMatch `json:"regexp2,omitempty"`
+}
+type Regular_Buyer struct {
+	//Buyer string `json:"buyer.mbuyer,omitempty"`
+	Query  string   `json:"query,omitempty"`
+	Type   string   `json:"type,omitempty"`
+	Fields []string `json:"fields,omitempty"`
+}
+type Regular_winner struct {
+	//Winner string `json:"s_winner.mwinner,omitempty"`
+	Query  string   `json:"query,omitempty"`
+	Type   string   `json:"type,omitempty"`
+	Fields []string `json:"fields,omitempty"`
+}
+
+/********************************************/
+type BuyerMatch struct {
+	*Buyer `json:"terms,omitempty"`
+}
+type Buyer struct {
+	Buyer []string `json:"buyer,omitempty"`
+}
+
+type WinnerMatch struct {
+	*Winner `json:"terms,omitempty"`
+}
+type Winner struct {
+	Winner []string `json:"s_winner,omitempty"`
+}
+
+/********************************************/
+
+// 排除词 must_not
+type NotkeyObject struct {
+	MatchPhrase *MatchPhrase `json:"match_phrase,omitempty"`
+	MultiMatch  *MultiMatch  `json:"multi_match,omitempty"`
+}
+
+// 采购单位行业 should
+type BuyerclassObject struct {
+	Terms struct {
+		Buyerclass []string `json:"buyerclass,omitempty"`
+	} `json:"terms,omitempty"`
+}
+
+type TopscopeclassObject struct {
+	Terms struct {
+		Topscopeclass []string `json:"s_topscopeclass,omitempty"`
+	} `json:"terms,omitempty"`
+}
+
+// 公告行业二级 should
+type SubscopeclassObject struct {
+	Terms struct {
+		Subscopeclass []string `json:"s_subscopeclass,omitempty"`
+	} `json:"terms,omitempty"`
+}
+
+// xf should
+type NewEsObject struct {
+	Bool struct {
+		Must    []interface{} `json:"must,omitempty"`
+		MustNot []interface{} `json:"must_not,omitempty"`
+		Should  []interface{} `json:"should,omitempty"`
+	} `json:"bool,omitempty"`
+}
+
+type BoolObject struct {
+	Must    []interface{} `json:"must,omitempty"`
+	MustNot []interface{} `json:"must_not,omitempty"`
+	Should  []interface{} `json:"should,omitempty"`
+}

+ 0 - 0
src/util/chain-zhang/pinyin/LICENSE → SEPlatform/util/chain-zhang/pinyin/LICENSE


+ 0 - 0
src/util/chain-zhang/pinyin/Makefile → SEPlatform/util/chain-zhang/pinyin/Makefile


+ 0 - 0
src/util/chain-zhang/pinyin/README.md → SEPlatform/util/chain-zhang/pinyin/README.md


+ 0 - 0
src/util/chain-zhang/pinyin/codecov.yml → SEPlatform/util/chain-zhang/pinyin/codecov.yml


+ 0 - 0
src/util/chain-zhang/pinyin/error.go → SEPlatform/util/chain-zhang/pinyin/error.go


+ 0 - 0
src/util/chain-zhang/pinyin/go.mod → SEPlatform/util/chain-zhang/pinyin/go.mod


+ 0 - 0
src/util/chain-zhang/pinyin/pinyin.go → SEPlatform/util/chain-zhang/pinyin/pinyin.go


+ 0 - 0
src/util/chain-zhang/pinyin/pinyin.txt → SEPlatform/util/chain-zhang/pinyin/pinyin.txt


+ 0 - 0
src/util/chain-zhang/pinyin/pinyin_test.go → SEPlatform/util/chain-zhang/pinyin/pinyin_test.go


+ 0 - 0
src/util/chain-zhang/pinyin/resource.go → SEPlatform/util/chain-zhang/pinyin/resource.go


+ 5 - 7
src/util/clearHtml.go → SEPlatform/util/clearHtml.go

@@ -1,14 +1,13 @@
 package util
 
 import (
+	qu "app.yhyue.com/moapp/jybase/common"
 	"github.com/PuerkitoBio/goquery"
-	qu "qfw/util"
 	"regexp"
 	"strings"
 	"unicode/utf8"
 )
 
-//
 type Cut struct {
 	tag           *regexp.Regexp
 	scripttag     *regexp.Regexp
@@ -26,7 +25,6 @@ type Cut struct {
 	retainTags2CR []string
 }
 
-//
 func NewCut() *Cut {
 	t, _ := regexp.Compile("<[^>]+>")
 	m, _ := regexp.Compile("([\r\n][\u3000\u2003\u00a0\\s]*)+|[\r\n]+")
@@ -46,7 +44,7 @@ func NewCut() *Cut {
 		inputag:       input,
 		colstag:       cols,
 		rowstag:       rows,
-		isborder:	border,
+		isborder:      border,
 		display:       dis,
 		multiCR:       m,
 		replBlankLine: regexp.MustCompile("\\s+[\r\n]"),
@@ -56,7 +54,7 @@ func NewCut() *Cut {
 	}
 }
 
-//清理HTML标签
+// 清理HTML标签
 func (c *Cut) ClearHtml(src string) string {
 	src = strings.Replace(src, ">\n", ">", -1)
 	src = strings.Replace(src, " ", "", -1)
@@ -140,11 +138,11 @@ func (c *Cut) ClearHtml(src string) string {
 	src = c.replStartWrap.ReplaceAllString(src, "")
 	src = c.replBlankLine.ReplaceAllString(src, "\n")
 	//清除多余换行
-	//return c.multiCR.ReplaceAllString(src, "\n")
+	//return c.multiCR.ReplaceAllString(SEPlatform, "\n")
 	return strings.Replace(src, "\n", "<br/>", -1)
 }
 
-//判断table是否加表格线
+// 判断table是否加表格线
 func isHasBoder(con string, reg *regexp.Regexp) bool {
 	res := reg.FindAllStringSubmatch(con, -1)
 	hasBorder := false

+ 20 - 24
src/util/config.go → SEPlatform/util/config.go

@@ -1,21 +1,17 @@
 package util
 
 import (
+	qu "app.yhyue.com/moapp/jybase/common"
+	elastic "app.yhyue.com/moapp/jybase/es"
+	"app.yhyue.com/moapp/jybase/mongodb"
+	"app.yhyue.com/moapp/jybase/mysql"
+	"app.yhyue.com/moapp/jybase/redis"
 	"bytes"
-	"io/ioutil"
-	"qfw/mongodb"
-	qu "qfw/util"
-
-	// "qfw/util/elastic"
-	elastic "es"
-	"qfw/util/mysql"
-	"qfw/util/redis"
-	"sort"
-	"util/chain-zhang/pinyin"
-	mgo "util/mgodb"
-
+	"github.com/Chain-Zhang/pinyin"
 	"golang.org/x/text/encoding/simplifiedchinese"
 	"golang.org/x/text/transform"
+	"io/ioutil"
+	"sort"
 )
 
 var (
@@ -30,13 +26,13 @@ var (
 	Subday          float64
 	PreviewHref     string //数据预览地址
 	CustomerApi     string
-	LatestId        = ""            //起始id
-	MgoTag          *mgo.MongodbSim //标签库连接
-	MgoSave         *mgo.MongodbSim //数据保存库连接
-	MgoBuyer        *mgo.MongodbSim //医院等级信息
-	MgoEnps         *mgo.MongodbSim //企业信息
-	MgoExtract      *mgo.MongodbSim //抽取
-	MgoBidding      *mgo.MongodbSim //bidding
+	LatestId        = ""                //起始id
+	MgoTag          *mongodb.MongodbSim //标签库连接
+	MgoSave         *mongodb.MongodbSim //数据保存库连接
+	MgoBuyer        *mongodb.MongodbSim //医院等级信息
+	MgoEnps         *mongodb.MongodbSim //企业信息
+	MgoExtract      *mongodb.MongodbSim //抽取
+	MgoBidding      *mongodb.MongodbSim //bidding
 	BiddingColl     string
 	SaveColl        string
 	HospColl        string
@@ -280,7 +276,7 @@ func initdb() {
 	SaveCollProject = qu.ObjToString(save["coll_project"])
 	SaveCollbid = qu.ObjToString(save["coll_bid"])
 	SaveUserMail = qu.ObjToString(save["coll_usermail"])
-	MgoSave = &mgo.MongodbSim{
+	MgoSave = &mongodb.MongodbSim{
 		MongodbAddr: qu.ObjToString(save["addr"]),
 		DbName:      qu.ObjToString(save["db"]),
 		Size:        qu.IntAllDef(save["size"], 15),
@@ -290,7 +286,7 @@ func initdb() {
 	buyerinfo := Sysconfig["buyerinfo"].(map[string]interface{})
 	HospColl = qu.ObjToString(buyerinfo["hospcoll"])
 	BuyerEntColl = qu.ObjToString(buyerinfo["buyerentcoll"])
-	MgoBuyer = &mgo.MongodbSim{
+	MgoBuyer = &mongodb.MongodbSim{
 		MongodbAddr: qu.ObjToString(buyerinfo["addr"]),
 		DbName:      qu.ObjToString(buyerinfo["db"]),
 		Size:        qu.IntAllDef(buyerinfo["size"], 15),
@@ -302,7 +298,7 @@ func initdb() {
 	//mgo enterprise
 	enterprise := Sysconfig["enterprise"].(map[string]interface{})
 	EnpsColl = qu.ObjToString(enterprise["coll"])
-	MgoEnps = &mgo.MongodbSim{
+	MgoEnps = &mongodb.MongodbSim{
 		MongodbAddr: qu.ObjToString(enterprise["addr"]),
 		DbName:      qu.ObjToString(enterprise["db"]),
 		Size:        qu.IntAllDef(enterprise["size"], 15),
@@ -314,7 +310,7 @@ func initdb() {
 	//bidding库
 	bidding := Sysconfig["bidding_mgo"].(map[string]interface{})
 	BiddingColl = qu.ObjToString(bidding["coll"])
-	MgoBidding = &mgo.MongodbSim{
+	MgoBidding = &mongodb.MongodbSim{
 		MongodbAddr: qu.ObjToString(bidding["addr"]),
 		DbName:      qu.ObjToString(bidding["db"]),
 		Size:        qu.IntAll(bidding["size"]),
@@ -325,7 +321,7 @@ func initdb() {
 	MgoBidding.InitPool()
 	extract := Sysconfig["extract"].(map[string]interface{})
 	ExtractColl = qu.ObjToString(extract["coll"])
-	MgoExtract = &mgo.MongodbSim{
+	MgoExtract = &mongodb.MongodbSim{
 		MongodbAddr: qu.ObjToString(extract["addr"]),
 		DbName:      qu.ObjToString(extract["db"]),
 		Size:        qu.IntAllDef(extract["size"], 15),

+ 6 - 5
src/util/cost_util.go → SEPlatform/util/cost_util.go

@@ -1,9 +1,10 @@
 package util
 
 import (
+	qu "app.yhyue.com/moapp/jybase/common"
+	"app.yhyue.com/moapp/jybase/date"
 	"database/sql"
 	"log"
-	"qfw/util"
 	"time"
 )
 
@@ -18,7 +19,7 @@ func GetCurrentCount2(entId, userId int) int {
 		JyMysql.Insert("user_account", map[string]interface{}{"user_id": userId, "ent_id": entId, "left_num": 0, "create_at": nowStr})
 		return count
 	}
-	count = util.IntAll((*userData)["left_num"])
+	count = qu.IntAll((*userData)["left_num"])
 	return count
 }
 
@@ -77,12 +78,12 @@ func SaveExportLog2(entId, entUserId, count, newCount int, xlsxUrl, types, filte
 	// }
 	userData := JyMysql.FindOne("entniche_user", query, "name,phone", "")
 	if userData != nil {
-		name := util.ObjToString((*userData)["name"])
-		phone := util.ObjToString((*userData)["phone"])
+		name := qu.ObjToString((*userData)["name"])
+		phone := qu.ObjToString((*userData)["phone"])
 		now := time.Now()
 		exportId = JyMysql.Insert("entniche_export_log", map[string]interface{}{
 			"user_name":    name,
-			"export_time":  util.FormatDate(&now, util.Date_Full_Layout),
+			"export_time":  date.FormatDate(&now, date.Date_Full_Layout),
 			"data_source":  "3",
 			"export_num":   count,
 			"deduct_num":   newCount,

+ 0 - 0
src/util/deepcopy.go → SEPlatform/util/deepcopy.go


+ 0 - 0
src/util/dfa.go → SEPlatform/util/dfa.go


+ 1 - 1
src/util/jylog.go → SEPlatform/util/jylog.go

@@ -11,7 +11,7 @@ import (
 	"regexp"
 	"time"
 
-	"github.com/go-xweb/xweb"
+	"app.yhyue.com/moapp/jybase/go-xweb/xweb"
 	"github.com/robfig/cron"
 )
 

+ 32 - 29
src/util/parsxlsx.go → SEPlatform/util/parsxlsx.go

@@ -1,14 +1,17 @@
 package util
 
 import (
+	qu "app.yhyue.com/moapp/jybase/common"
+	"app.yhyue.com/moapp/jybase/date"
+	"app.yhyue.com/moapp/jybase/encrypt"
+	"app.yhyue.com/moapp/jybase/mongodb"
 	"fmt"
 	"log"
-	"qfw/util"
 	"strings"
 	"time"
 
 	"github.com/tealeg/xlsx"
-	"gopkg.in/mgo.v2/bson"
+	"go.mongodb.org/mongo-driver/bson"
 )
 
 const (
@@ -25,15 +28,15 @@ const (
 	Tagname = "s_name" //标签的关键词规则名称
 )
 
-var SES = util.SimpleEncrypt{Key: "topJYBX2019"}
+var SES = encrypt.SimpleEncrypt{Key: "topJYBX2019"}
 
-//通用标签相关字段
+// 通用标签相关字段
 var export_fields = []string{"s_userid", "s_name", "", "s_area", "s_city", "s_district", "s_toptype", "s_subtype", "i_starttime", "i_endtime", "s_budgetlimit", "s_bidamountlimit", "s_globaltopscopeclass", "s_globalsubscopeclass", "s_globalbuyerclass", "s_globaladdkey", "s_globaladdkeymatch", "s_globalnotkey", "s_globalnotkeymatch", "s_globalclearkey", "s_globalclearkeymatch", "s_existfields", "i_extfieldstype"}
 
-//关键词标签相关字段
+// 关键词标签相关字段
 var export_o_rules = []string{"s_matchkey", "s_keymatch", "s_addkey", "s_addkeymatch", "s_notkey", "s_notkeymatch", "s_buyerclass"}
 
-//定义值为数字的多个匹配方式map
+// 定义值为数字的多个匹配方式map
 var export_numfield = map[string]bool{
 	"s_globaladdkeymatch":   true,
 	"s_globalnotkeymatch":   true,
@@ -43,7 +46,7 @@ var export_numfield = map[string]bool{
 	"s_notkeymatch":         true,
 }
 
-//匹配方式map
+// 匹配方式map
 var export_matchtype = map[string]interface{}{
 	"1": "标题匹配",
 	"2": "全文匹配",
@@ -56,7 +59,7 @@ var export_matchtype = map[string]interface{}{
 	"9": "中标单位匹配(正则)",
 }
 
-//字段包类型
+// 字段包类型
 var export_extfieldstype = map[string]interface{}{
 	"1": "标准字段包",
 	"2": "高级字段包",
@@ -239,17 +242,17 @@ var bzpath, gjpath, rpath string = "web/res/%s_数据_%s_%s.xlsx", "web/res/%s_
 func ResponseXlsx_Data(id string) string {
 	if id != "" {
 		query := bson.M{
-			"_id": bson.ObjectIdHex(id),
+			"_id": mongodb.StringTOBsonId(id),
 		}
 		data, _ := Mgo.FindOne("cuserdepartrule", query)
 		ruleName := (*data)["s_name"]
 		if (*data) != nil && len(*data) > 0 {
 			isStandard := true
-			if util.Int64All((*data)["i_extfieldstype"]) == Advanced {
+			if qu.Int64All((*data)["i_extfieldstype"]) == Advanced {
 				isStandard = false
 			}
 
-			data, _ := Mgo.Find("tagsdata", bson.M{"s_dataid": util.ObjToString((*data)["s_dataid"])}, nil, nil, false, -1, -1)
+			data, _ := Mgo.Find("tagsdata", bson.M{"s_dataid": qu.ObjToString((*data)["s_dataid"])}, nil, nil, false, -1, -1)
 			if (*data) == nil || len(*data) == 0 {
 				return ""
 			}
@@ -269,14 +272,14 @@ func ResponseXlsx_Data(id string) string {
 					row.AddCell().SetValue(v["title"])
 					row.AddCell().SetValue(v["subtype"])
 					if v["publishtime"] != nil {
-						row.AddCell().SetValue(time.Unix(util.Int64All(v["publishtime"]), 0).Format("2006-01-02"))
+						row.AddCell().SetValue(time.Unix(qu.Int64All(v["publishtime"]), 0).Format("2006-01-02"))
 					} else {
 						row.AddCell()
 					}
 					row.AddCell().SetValue(v["buyer"])
 					row.AddCell().SetValue(v["winner"])
 					if v["bidamount"] != nil {
-						row.AddCell().SetFloat(util.Float64All(v["bidamount"]))
+						row.AddCell().SetFloat(qu.Float64All(v["bidamount"]))
 					} else {
 						row.AddCell()
 					}
@@ -287,7 +290,7 @@ func ResponseXlsx_Data(id string) string {
 				xf.Sheets = xf.Sheets[:1]
 				xf.Sheets[0].Name = "详细数据"
 				t := time.Now().Format("20060102")
-				fname := fmt.Sprintf(bzpath, ruleName, t, util.GetRandom(4))
+				fname := fmt.Sprintf(bzpath, ruleName, t, qu.GetRandom(4))
 				err := xf.Save(fname)
 				if err != nil {
 					log.Println(err)
@@ -306,7 +309,7 @@ func ResponseXlsx_Data(id string) string {
 					row.AddCell().SetValue(v["subtype"])
 					row.AddCell().SetValue(v["detail"])
 					if v["publishtime"] != nil {
-						row.AddCell().SetValue(time.Unix(util.Int64All(v["publishtime"]), 0).Format("2006-01-02"))
+						row.AddCell().SetValue(time.Unix(qu.Int64All(v["publishtime"]), 0).Format("2006-01-02"))
 					} else {
 						row.AddCell()
 					}
@@ -316,17 +319,17 @@ func ResponseXlsx_Data(id string) string {
 					row.AddCell().SetValue(v["projectcode"])
 					row.AddCell().SetValue(v["projectscope"])
 					if v["budget"] != nil {
-						row.AddCell().SetFloat(util.Float64All(v["budget"]))
+						row.AddCell().SetFloat(qu.Float64All(v["budget"]))
 					} else {
 						row.AddCell()
 					}
 					if v["bidamount"] != nil {
-						row.AddCell().SetFloat(util.Float64All(v["bidamount"]))
+						row.AddCell().SetFloat(qu.Float64All(v["bidamount"]))
 					} else {
 						row.AddCell()
 					}
 					if v["bidopentime"] != nil {
-						row.AddCell().SetValue(time.Unix(util.Int64All(v["bidopentime"]), 0).Format("2006-01-02"))
+						row.AddCell().SetValue(time.Unix(qu.Int64All(v["bidopentime"]), 0).Format("2006-01-02"))
 					} else {
 						row.AddCell()
 					}
@@ -340,13 +343,13 @@ func ResponseXlsx_Data(id string) string {
 					row.AddCell().SetValue(v["legal_person"])
 					row.AddCell().SetValue(v["company_phone"])
 					row.AddCell().SetValue(v["company_email"])
-					ids := SES.EncodeString(util.ObjToString(v["info_id"]))
+					ids := SES.EncodeString(qu.ObjToString(v["info_id"]))
 					row.AddCell().SetValue(ids)
 				}
 				xf.Sheets = xf.Sheets[1:2]
 				xf.Sheets[0].Name = "详细数据"
 				t := time.Now().Format("20060102")
-				fname := fmt.Sprintf(gjpath, ruleName, t, util.GetRandom(4))
+				fname := fmt.Sprintf(gjpath, ruleName, t, qu.GetRandom(4))
 				err := xf.Save(fname)
 				if err != nil {
 					log.Println(err)
@@ -360,7 +363,7 @@ func ResponseXlsx_Data(id string) string {
 }
 
 func ResponseXlsx_Rule(id string) string {
-	defer util.Catch()
+	defer qu.Catch()
 	var data *map[string]interface{}
 	data, _ = Mgo.FindById("cuserdepartrule", id, `{}`)
 
@@ -392,14 +395,14 @@ func ResponseXlsx_Rule(id string) string {
 		}
 		field_val := ""
 		if strings.HasPrefix(field, "s_") {
-			field_val = util.ObjToString((*data)[field])
+			field_val = qu.ObjToString((*data)[field])
 			if export_numfield[field] { //找出值为数字的匹配方式,转换成中文
 				field_val = numValToWord(field_val)
 			}
 		} else if strings.HasPrefix(field, "i_") { //i_startime i_endtime
-			t := util.Int64All((*data)[field])
+			t := qu.Int64All((*data)[field])
 			if t > 0 {
-				field_val = util.FormatDateByInt64(&t, util.Date_Full_Layout)
+				field_val = date.FormatDateByInt64(&t, date.Date_Full_Layout)
 			}
 		}
 		r.AddCell().SetValue(field_val)
@@ -409,7 +412,7 @@ func ResponseXlsx_Rule(id string) string {
 		new_row := sh.AddRow()
 		o_tmp := o_rule.(map[string]interface{})
 		for _, match := range export_o_rules {
-			cell_val := util.ObjToString(o_tmp[match])
+			cell_val := qu.ObjToString(o_tmp[match])
 			if export_numfield[match] { //找出值为数字的匹配方式,转换成中文
 				cell_val = numValToWord(cell_val)
 			}
@@ -423,20 +426,20 @@ func ResponseXlsx_Rule(id string) string {
 	}
 	ruleName := (*data)["s_name"]
 	t := time.Now().Format("20060102")
-	fname := fmt.Sprintf(rpath, ruleName, t, util.GetRandom(4))
+	fname := fmt.Sprintf(rpath, ruleName, t, qu.GetRandom(4))
 	xf.Save(fname)
 	return fname
 }
 
-//匹配方式的数字值,转为对应的汉字
+// 匹配方式的数字值,转为对应的汉字
 func numValToWord(numval string) (word string) {
 	field_arr := strings.Split(numval, ",")
 	for i, val := range field_arr {
 		if i == 0 {
-			word = util.ObjToString(export_matchtype[val])
+			word = qu.ObjToString(export_matchtype[val])
 			continue
 		}
-		word = word + "," + util.ObjToString(export_matchtype[val])
+		word = word + "," + qu.ObjToString(export_matchtype[val])
 	}
 	return
 }

+ 12 - 13
src/util/util.go → SEPlatform/util/util.go

@@ -1,15 +1,14 @@
 package util
 
 import (
+	"app.yhyue.com/moapp/jybase/common"
+	"app.yhyue.com/moapp/jybase/encrypt"
 	"encoding/base64"
+	"github.com/shopspring/decimal"
+	"go.mongodb.org/mongo-driver/bson/primitive"
 	"net/http"
-	qu "qfw/util"
 	"reflect"
 	"strconv"
-
-	"go.mongodb.org/mongo-driver/bson/primitive"
-
-	"github.com/shopspring/decimal"
 )
 
 type SimpleEncrypt struct {
@@ -17,9 +16,9 @@ type SimpleEncrypt struct {
 }
 
 var SEPreview = &SimpleEncrypt{Key: "topnet2015topnet2015"}
-var SE2 = qu.SimpleEncrypt{Key: "topJYBX2019"}
+var SE2 = encrypt.SimpleEncrypt{Key: "topJYBX2019"}
 
-//数据类型转换
+// 数据类型转换
 func GetPostForm(r *http.Request) map[string]interface{} {
 	val := map[string]interface{}{}
 	for k, _ := range r.Form {
@@ -48,7 +47,7 @@ func GetPostForm(r *http.Request) map[string]interface{} {
 	return val
 }
 
-//从数组中删除元素
+// 从数组中删除元素
 func deleteSlice(arr []string, v string) []string {
 	for k, v1 := range arr {
 		if v1 == v {
@@ -64,31 +63,31 @@ func deleteSlice(arr []string, v string) []string {
 func FormatNumber(tmp map[string]interface{}) {
 	for k, v := range tmp {
 		if reflect.TypeOf(v).Name() == reflect.Float64.String() {
-			num, _ := decimal.NewFromString(strconv.FormatFloat(qu.Float64All(v), 'e', -1, 64))
+			num, _ := decimal.NewFromString(strconv.FormatFloat(common.Float64All(v), 'e', -1, 64))
 			tmp[k], _ = num.Float64()
 		}
 	}
 }
 
-//获取最新年报
+// 获取最新年报
 func Sort_year_report(year_report primitive.A) map[string]interface{} {
 	new_year_report := year_report[0]
 	for i := 0; i < len(year_report); i++ {
-		if qu.IntAll(new_year_report.(map[string]interface{})["report_year"]) < qu.IntAll(year_report[i].(map[string]interface{})["report_year"]) {
+		if common.IntAll(new_year_report.(map[string]interface{})["report_year"]) < common.IntAll(year_report[i].(map[string]interface{})["report_year"]) {
 			new_year_report = year_report[i]
 		}
 	}
 	return new_year_report.(map[string]interface{})
 }
 
-//解密String
+// 解密String
 func (s *SimpleEncrypt) DecodeString(str string) string {
 	data, _ := base64.URLEncoding.DecodeString(str)
 	s.doEncode(data)
 	return string(data)
 }
 
-//加密String
+// 加密String
 func (s *SimpleEncrypt) EncodeString(str string) string {
 	data := []byte(str)
 	s.doEncode(data)

+ 74 - 76
src/util/utiltag.go → SEPlatform/util/utiltag.go

@@ -1,24 +1,22 @@
 package util
 
 import (
+	qu "app.yhyue.com/moapp/jybase/common"
+	"app.yhyue.com/moapp/jybase/encrypt"
+	elastic "app.yhyue.com/moapp/jybase/es"
+	"app.yhyue.com/moapp/jybase/mongodb"
 	"context"
 	"encoding/json"
 	"errors"
 	"fmt"
+	es "github.com/olivere/elastic/v7"
+	"go.mongodb.org/mongo-driver/bson"
 	"log"
-	"models"
-	"mongodb"
-	"qfw/util"
-
-	// "qfw/util/elastic"
-	esv "es"
-	sql "sqlmodel"
+	"seplatform/models"
+	sql "seplatform/sqlmodel"
 	"strings"
 	"sync"
 	"time"
-
-	es "github.com/olivere/elastic"
-	"gopkg.in/mgo.v2/bson"
 )
 
 const (
@@ -56,7 +54,7 @@ const (
 )
 
 func UtilEsSaveData(sdataid string, datas *[]map[string]interface{}) error {
-	defer util.Catch()
+	defer qu.Catch()
 	if !Mgo.Del("tagsdata", bson.M{"s_dataid": sdataid}) {
 		return errors.New("mongo del err")
 	}
@@ -83,21 +81,21 @@ func (m *MySource) Source() (interface{}, error) {
 
 // 客户规则
 func UtilEsFind1(tags map[string]interface{}) (error, int64) {
-	defer util.Catch()
+	defer qu.Catch()
 	ch := make(chan bool, 20)
 	wg := &sync.WaitGroup{}
 	arrsync := &sync.RWMutex{}
-	sdataid := util.ObjToString(tags["s_dataid"])
-	esquery := util.ObjToString(tags["s_esquery"])
+	sdataid := qu.ObjToString(tags["s_dataid"])
+	esquery := qu.ObjToString(tags["s_esquery"])
 	if IsNewSql != 0 {
-		esquery = util.ObjToString(tags["s_esquery_search"])
+		esquery = qu.ObjToString(tags["s_esquery_search"])
 	}
-	clearKey := util.ObjToString(tags["s_globalclearkey"])
-	clearKeyMatch := util.ObjToString(tags["s_globalclearkeymatch"])
+	clearKey := qu.ObjToString(tags["s_globalclearkey"])
+	clearKeyMatch := qu.ObjToString(tags["s_globalclearkeymatch"])
 	if len(esquery) < 1 || len(sdataid) < 1 {
 		return errors.New("s_esquery or s_dataid no found"), 0
 	}
-	i_maxnum := util.Int64All(tags["i_maxnum"])
+	i_maxnum := qu.Int64All(tags["i_maxnum"])
 	if i_maxnum <= 0 {
 		i_maxnum = 100
 	}
@@ -107,22 +105,22 @@ func UtilEsFind1(tags map[string]interface{}) (error, int64) {
 		for _, v := range orules {
 			orule, _ := v.(map[string]interface{})
 			maths = append(maths, map[string]string{
-				"s_matchkey": util.ObjToString(orule["s_matchkey"]),
-				"s_keymatch": util.ObjToString(orule["s_keymatch"]),
+				"s_matchkey": qu.ObjToString(orule["s_matchkey"]),
+				"s_keymatch": qu.ObjToString(orule["s_keymatch"]),
 			})
 		}
 	} else if orules, ok := tags["o_rules"].([]map[string]interface{}); ok {
 		for _, v := range orules {
 			maths = append(maths, map[string]string{
-				"s_matchkey": util.ObjToString(v["s_matchkey"]),
-				"s_keymatch": util.ObjToString(v["s_keymatch"]),
+				"s_matchkey": qu.ObjToString(v["s_matchkey"]),
+				"s_keymatch": qu.ObjToString(v["s_keymatch"]),
 			})
 		}
 	} else {
 		return errors.New("o_rules no found"), 0
 	}
 	ctx, _ := context.WithTimeout(context.Background(), 1*time.Hour)
-	esCon := esv.VarEs.(*esv.EsV7)
+	esCon := elastic.VarEs.(*elastic.EsV7)
 	client := esCon.GetEsConn()
 	defer esCon.DestoryEsConn(client)
 	// esquery = esquery[:len(esquery)-1] + `,"size":` + fmt.Sprintf("%d", i_maxnum) + `}`
@@ -148,18 +146,18 @@ func UtilEsFind1(tags map[string]interface{}) (error, int64) {
 				if json.Unmarshal(tmpHit.Source, &item) == nil {
 					item["appid"] = tags["appid"]
 					item["rulename"] = tags["s_name"]
-					info_id := util.ObjToString(item["id"])
+					info_id := qu.ObjToString(item["id"])
 					item["info_id"] = info_id
 					item["s_dataid"] = sdataid
 					// item["s_jyhref"] = fmt.Sprintf(Url, util.CommonEncodeArticle("content", info_id))
 					//
-					subType := util.ObjToString(item["subtype"])
+					subType := qu.ObjToString(item["subtype"])
 					subTypeStr := "拟建,采购意向,预告,预审,预审结果,论证意见,需求公示"
 					if strings.Contains(subTypeStr, subType) {
-						item["s_jyhref"] = `https://www.jianyu360.cn/article/bdprivate/` + util.CommonEncodeArticle("bdprivate", info_id) + `.html`
+						item["s_jyhref"] = `https://www.jianyu360.cn/article/bdprivate/` + encrypt.CommonEncodeArticle("bdprivate", info_id) + `.html`
 					} else {
 						// item["s_jyhref"] = `https://www.jianyu360.cn/article/content/` + qu.CommonEncodeArticle("content", info_id) + `.html`
-						item["s_jyhref"] = `https://www.jianyu360.cn/article/entservice/` + util.SE3.EncodeString(info_id) + `.html?appid`
+						item["s_jyhref"] = `https://www.jianyu360.cn/article/entservice/` + encrypt.SE3.EncodeString(info_id) + `.html?appid`
 					}
 					//
 					item["i_createtime"] = time.Now().Unix()
@@ -175,79 +173,79 @@ func UtilEsFind1(tags map[string]interface{}) (error, int64) {
 							item["s_matchkey"] = matchKeys
 						}
 					}
-					findwinner := strings.TrimSpace(util.ObjToString(item["winner"]))
+					findwinner := strings.TrimSpace(qu.ObjToString(item["winner"]))
 					if findwinner != "" {
-						finddata := MgoEnps.FindOne(EnpsColl, bson.M{"company_name": findwinner})
+						finddata, _ := MgoEnps.FindOne(EnpsColl, bson.M{"company_name": findwinner})
 						if finddata != nil {
-							if legal_person := util.ObjToString(finddata["legal_person"]); legal_person != "" {
+							if legal_person := qu.ObjToString((*finddata)["legal_person"]); legal_person != "" {
 								item["legal_person"] = legal_person
 							}
-							if email := util.ObjToString(finddata["company_email"]); email != "" {
+							if email := qu.ObjToString((*finddata)["company_email"]); email != "" {
 								item["company_email"] = email
 							}
-							if phone := util.ObjToString(finddata["company_phone"]); phone != "" {
+							if phone := qu.ObjToString((*finddata)["company_phone"]); phone != "" {
 								item["company_phone"] = phone
 							}
 							item["qyk"] = finddata
-							if company_area := util.ObjToString(finddata["company_area"]); company_area != "" {
+							if company_area := qu.ObjToString((*finddata)["company_area"]); company_area != "" {
 								item["company_area"] = company_area
 							}
-							if company_city := util.ObjToString(finddata["company_city"]); company_city != "" {
+							if company_city := qu.ObjToString((*finddata)["company_city"]); company_city != "" {
 								item["company_city"] = company_city
 							}
-							if company_district := util.ObjToString(finddata["company_district"]); company_district != "" {
+							if company_district := qu.ObjToString((*finddata)["company_district"]); company_district != "" {
 								item["company_district"] = company_district
 							}
 							//中标单位的社会征信代码
-							if credit_no := util.ObjToString(finddata["credit_no"]); credit_no != "" {
+							if credit_no := qu.ObjToString((*finddata)["credit_no"]); credit_no != "" {
 								item["winner_credit_no"] = credit_no
 							}
 						}
 					}
-					agency := strings.TrimSpace(util.ObjToString(item["agency"]))
+					agency := strings.TrimSpace(qu.ObjToString(item["agency"]))
 					if agency != "" {
-						finddata := MgoEnps.FindOne(EnpsColl, bson.M{"company_name": agency})
+						finddata, _ := MgoEnps.FindOne(EnpsColl, bson.M{"company_name": agency})
 						if finddata != nil {
 							//社会征信代码
-							if credit_no := util.ObjToString(finddata["credit_no"]); credit_no != "" {
+							if credit_no := qu.ObjToString((*finddata)["credit_no"]); credit_no != "" {
 								item["agency_credit_no"] = credit_no
 							}
 						}
 					}
-					buyer := strings.TrimSpace(util.ObjToString(item["buyer"]))
+					buyer := strings.TrimSpace(qu.ObjToString(item["buyer"]))
 					if buyer != "" {
-						finddata := MgoBuyer.FindOne(BuyerEntColl, bson.M{"company_name": buyer})
+						finddata, _ := MgoBuyer.FindOne(BuyerEntColl, bson.M{"company_name": buyer})
 						if finddata != nil {
 							//社会征信代码
-							if credit_no := util.ObjToString(finddata["credit_no"]); credit_no != "" {
+							if credit_no := qu.ObjToString((*finddata)["credit_no"]); credit_no != "" {
 								item["buyer_credit_no"] = credit_no
 							}
 						}
 					}
 					//匹配公告附件
-					info := MgoBidding.FindOne("bidding", bson.M{"_id": mongodb.StringTOBsonId(info_id)})
+					info, _ := MgoBidding.FindOne("bidding", bson.M{"_id": mongodb.StringTOBsonId(info_id)})
 					if info != nil {
 						log.Println("id", item["info_id"])
-						if info["projectinfo"] != nil {
-							projectInfo := util.ObjToMap(info["projectinfo"])
+						if (*info)["projectinfo"] != nil {
+							projectInfo := qu.ObjToMap((*info)["projectinfo"])
 							if projectInfo != nil && len(*projectInfo) > 0 {
 								if (*projectInfo)["attachments"] != nil {
 									filesArr := []map[string]interface{}{}
-									fileUrl := util.ObjToString(Sysconfig["file_downloadurl"])
+									fileUrl := qu.ObjToString(Sysconfig["file_downloadurl"])
 									if attachments, oks := (*projectInfo)["attachments"].(map[string]interface{}); oks {
 										for _, v := range attachments {
 											if atta, ok := v.(map[string]interface{}); ok {
-												if atta["fid"] != nil && util.ObjToString(atta["fid"]) != "" {
+												if atta["fid"] != nil && qu.ObjToString(atta["fid"]) != "" {
 													fileMap := map[string]interface{}{
 														"filename": atta["filename"],
-														"url":      fileUrl + util.ObjToString(atta["fid"]),
+														"url":      fileUrl + qu.ObjToString(atta["fid"]),
 													}
 													filesArr = append(filesArr, fileMap)
 												} else {
 													if atta["org_url"] != nil {
 														fileMap := map[string]interface{}{
 															"filename": atta["filename"],
-															"url":      util.ObjToString(atta["org_url"]),
+															"url":      qu.ObjToString(atta["org_url"]),
 														}
 														filesArr = append(filesArr, fileMap)
 													}
@@ -284,38 +282,38 @@ func UtilEsFind1(tags map[string]interface{}) (error, int64) {
 			}}, false, false)
 		return UtilEsSaveData(sdataid, &datas), count
 	} else {
-		util.Debug(err)
+		log.Println(err)
 		return err, 0
 	}
 }
 
 func ClearKeys(types, key string, data map[string]interface{}) {
 	if strings.Contains(types, "1") {
-		title := util.ObjToString(data["title"])
+		title := qu.ObjToString(data["title"])
 		data["title"] = strings.ReplaceAll(title, key, "")
 	}
 	if strings.Contains(types, "2") {
-		detail := util.ObjToString(data["detail"])
+		detail := qu.ObjToString(data["detail"])
 		data["detail"] = strings.ReplaceAll(detail, key, "")
 	}
 	if strings.Contains(types, "3") {
-		purchasing := util.ObjToString(data["purchasing"])
+		purchasing := qu.ObjToString(data["purchasing"])
 		data["purchasing"] = strings.ReplaceAll(purchasing, key, "")
 	}
 	if strings.Contains(types, "4") {
-		filetext := util.ObjToString(data["filetext"])
+		filetext := qu.ObjToString(data["filetext"])
 		data["filetext"] = strings.ReplaceAll(filetext, key, "")
 	}
 	if strings.Contains(types, "5") {
-		projectname := util.ObjToString(data["projectname"])
+		projectname := qu.ObjToString(data["projectname"])
 		data["projectname"] = strings.ReplaceAll(projectname, key, "")
 	}
 	if strings.Contains(types, "6") || strings.Contains(types, "8") {
-		buyer := util.ObjToString(data["buyer"])
+		buyer := qu.ObjToString(data["buyer"])
 		data["buyer"] = strings.ReplaceAll(buyer, key, "")
 	}
 	if strings.Contains(types, "7") || strings.Contains(types, "9") {
-		winner := util.ObjToString(data["s_winner"])
+		winner := qu.ObjToString(data["s_winner"])
 		data["s_winner"] = strings.ReplaceAll(winner, key, "")
 	}
 }
@@ -341,7 +339,7 @@ func GetTimeInterval(startTime, entTime time.Time, n int) []map[string]interface
 }
 
 func Utiltags(tag map[string]interface{}) string {
-	defer util.Catch()
+	defer qu.Catch()
 	tmpbyte, _ := json.Marshal(tag)
 	tab := models.Tag{}
 	err := json.Unmarshal(tmpbyte, &tab)
@@ -511,18 +509,18 @@ func Utiltags(tag map[string]interface{}) string {
 		if strings.Contains(tab.Sbidamount, "大于") && strings.Contains(tab.Sbidamount, "小于") {
 			arr := strings.Split(tab.Sbidamount, ",")
 			limit := &sql.BudgetOrBidamount{
-				Gte: util.Float64All(strings.Replace(arr[0], "大于", "", -1)),
-				Lt:  util.Float64All(strings.Replace(arr[1], "小于", "", -1)),
+				Gte: qu.Float64All(strings.Replace(arr[0], "大于", "", -1)),
+				Lt:  qu.Float64All(strings.Replace(arr[1], "小于", "", -1)),
 			}
 			bidamountSql.Bool.Should = append(bidamountSql.Bool.Should, sql.BidamountMust{BidamountObj: &sql.BidamountObj{Bidamount: limit}})
 		} else if strings.Contains(tab.Sbidamount, "大于") {
 			limit := &sql.BudgetOrBidamount{
-				Gte: util.Float64All(strings.Replace(tab.Sbidamount, "大于", "", -1)),
+				Gte: qu.Float64All(strings.Replace(tab.Sbidamount, "大于", "", -1)),
 			}
 			bidamountSql.Bool.Should = append(bidamountSql.Bool.Should, sql.BidamountMust{BidamountObj: &sql.BidamountObj{Bidamount: limit}})
 		} else if strings.Contains(tab.Sbidamount, "小于") {
 			limit := &sql.BudgetOrBidamount{
-				Lt: util.Float64All(strings.Replace(tab.Sbidamount, "小于", "", -1)),
+				Lt: qu.Float64All(strings.Replace(tab.Sbidamount, "小于", "", -1)),
 			}
 			bidamountSql.Bool.Should = append(bidamountSql.Bool.Should, sql.BidamountMust{BidamountObj: &sql.BidamountObj{Bidamount: limit}})
 		}
@@ -549,18 +547,18 @@ func Utiltags(tag map[string]interface{}) string {
 		if strings.Contains(tab.Sbudget, "大于") && strings.Contains(tab.Sbudget, "小于") {
 			arr := strings.Split(tab.Sbudget, ",")
 			limit := &sql.BudgetOrBidamount{
-				Gte: util.Float64All(strings.Replace(arr[0], "大于", "", -1)),
-				Lt:  util.Float64All(strings.Replace(arr[1], "小于", "", -1)),
+				Gte: qu.Float64All(strings.Replace(arr[0], "大于", "", -1)),
+				Lt:  qu.Float64All(strings.Replace(arr[1], "小于", "", -1)),
 			}
 			budgetSql.Bool.Should = append(budgetSql.Bool.Should, sql.BudgetMust{BudgetObj: &sql.BudgetObj{Budget: limit}})
 		} else if strings.Contains(tab.Sbudget, "大于") {
 			limit := &sql.BudgetOrBidamount{
-				Gte: util.Float64All(strings.Replace(tab.Sbudget, "大于", "", -1)),
+				Gte: qu.Float64All(strings.Replace(tab.Sbudget, "大于", "", -1)),
 			}
 			budgetSql.Bool.Should = append(budgetSql.Bool.Should, sql.BudgetMust{BudgetObj: &sql.BudgetObj{Budget: limit}})
 		} else if strings.Contains(tab.Sbudget, "小于") {
 			limit := &sql.BudgetOrBidamount{
-				Lt: util.Float64All(strings.Replace(tab.Sbudget, "小于", "", -1)),
+				Lt: qu.Float64All(strings.Replace(tab.Sbudget, "小于", "", -1)),
 			}
 			budgetSql.Bool.Should = append(budgetSql.Bool.Should, sql.BudgetMust{BudgetObj: &sql.BudgetObj{Budget: limit}})
 		}
@@ -699,8 +697,8 @@ func strsToArr(strs string, typestr string) []string {
 	return nil
 }
 func init() {
-	EsIndex = util.ObjToString(Sysconfig["elasticsearch_index"])
-	EsType = util.ObjToString(Sysconfig["elasticsearch_type"])
+	EsIndex = qu.ObjToString(Sysconfig["elasticsearch_index"])
+	EsType = qu.ObjToString(Sysconfig["elasticsearch_type"])
 }
 
 func method1(newEsObject sql.NewEsObject, keyword, keymatch string, tmps []string) sql.NewEsObject {
@@ -889,31 +887,31 @@ func GetMactchKey(match []map[string]string, data map[string]interface{}) string
 		types := keys["s_keymatch"]
 		key := keys["s_matchkey"]
 		if strings.Contains(types, "1") {
-			title := util.ObjToString(data["title"])
+			title := qu.ObjToString(data["title"])
 			keyWord = KeyWordToData(types, title, key, keyWord)
 		}
 		if strings.Contains(types, "2") {
-			detail := util.ObjToString(data["detail"])
+			detail := qu.ObjToString(data["detail"])
 			keyWord = KeyWordToData(types, detail, key, keyWord)
 		}
 		if strings.Contains(types, "3") {
-			purchasing := util.ObjToString(data["purchasing"])
+			purchasing := qu.ObjToString(data["purchasing"])
 			keyWord = KeyWordToData(types, purchasing, key, keyWord)
 		}
 		if strings.Contains(types, "4") {
-			filetext := util.ObjToString(data["filetext"])
+			filetext := qu.ObjToString(data["filetext"])
 			keyWord = KeyWordToData(types, filetext, key, keyWord)
 		}
 		if strings.Contains(types, "5") {
-			projectname := util.ObjToString(data["projectname"])
+			projectname := qu.ObjToString(data["projectname"])
 			keyWord = KeyWordToData(types, projectname, key, keyWord)
 		}
 		if strings.Contains(types, "6") || strings.Contains(types, "8") {
-			buyer := util.ObjToString(data["buyer"])
+			buyer := qu.ObjToString(data["buyer"])
 			keyWord = KeyWordToData(types, buyer, key, keyWord)
 		}
 		if strings.Contains(types, "7") || strings.Contains(types, "9") {
-			winner := util.ObjToString(data["s_winner"])
+			winner := qu.ObjToString(data["s_winner"])
 			keyWord = KeyWordToData(types, winner, key, keyWord)
 		}
 	}
@@ -960,7 +958,7 @@ func GetProjectId(id string) string {
 	data := Es.Get("projectset", "projectset", querys)
 	if data != nil && *data != nil && len(*data) > 0 {
 		for _, v := range *data {
-			projectIdArr = append(projectIdArr, util.ObjToString(v["_id"]))
+			projectIdArr = append(projectIdArr, qu.ObjToString(v["_id"]))
 		}
 		projectId = strings.Join(projectIdArr, ",")
 		log.Println("projectId", projectId)

+ 0 - 0
src/web/res/bower_components/Ionicons/.bower.json → SEPlatform/web/res/bower_components/Ionicons/.bower.json


+ 0 - 0
src/web/res/bower_components/Ionicons/LICENSE → SEPlatform/web/res/bower_components/Ionicons/LICENSE


+ 0 - 0
src/web/res/bower_components/Ionicons/bower.json → SEPlatform/web/res/bower_components/Ionicons/bower.json


+ 0 - 0
src/web/res/bower_components/Ionicons/cheatsheet.html → SEPlatform/web/res/bower_components/Ionicons/cheatsheet.html


+ 0 - 0
src/web/res/bower_components/Ionicons/component.json → SEPlatform/web/res/bower_components/Ionicons/component.json


+ 0 - 0
src/web/res/bower_components/Ionicons/composer.json → SEPlatform/web/res/bower_components/Ionicons/composer.json


+ 0 - 0
src/web/res/bower_components/Ionicons/css/ionicons.css → SEPlatform/web/res/bower_components/Ionicons/css/ionicons.css


+ 0 - 0
src/web/res/bower_components/Ionicons/css/ionicons.min.css → SEPlatform/web/res/bower_components/Ionicons/css/ionicons.min.css


+ 0 - 0
src/web/res/bower_components/Ionicons/fonts/ionicons.eot → SEPlatform/web/res/bower_components/Ionicons/fonts/ionicons.eot


+ 0 - 0
src/web/res/bower_components/Ionicons/fonts/ionicons.svg → SEPlatform/web/res/bower_components/Ionicons/fonts/ionicons.svg


+ 0 - 0
src/web/res/bower_components/Ionicons/fonts/ionicons.ttf → SEPlatform/web/res/bower_components/Ionicons/fonts/ionicons.ttf


+ 0 - 0
src/web/res/bower_components/Ionicons/fonts/ionicons.woff → SEPlatform/web/res/bower_components/Ionicons/fonts/ionicons.woff


+ 0 - 0
src/web/res/bower_components/Ionicons/less/_ionicons-font.less → SEPlatform/web/res/bower_components/Ionicons/less/_ionicons-font.less


+ 0 - 0
src/web/res/bower_components/Ionicons/less/_ionicons-icons.less → SEPlatform/web/res/bower_components/Ionicons/less/_ionicons-icons.less


+ 0 - 0
src/web/res/bower_components/Ionicons/less/_ionicons-variables.less → SEPlatform/web/res/bower_components/Ionicons/less/_ionicons-variables.less


+ 0 - 0
src/web/res/bower_components/Ionicons/less/ionicons.less → SEPlatform/web/res/bower_components/Ionicons/less/ionicons.less


+ 0 - 0
src/web/res/bower_components/Ionicons/png/512/alert-circled.png → SEPlatform/web/res/bower_components/Ionicons/png/512/alert-circled.png


+ 0 - 0
src/web/res/bower_components/Ionicons/png/512/alert.png → SEPlatform/web/res/bower_components/Ionicons/png/512/alert.png


+ 0 - 0
src/web/res/bower_components/Ionicons/png/512/android-add-contact.png → SEPlatform/web/res/bower_components/Ionicons/png/512/android-add-contact.png


+ 0 - 0
src/web/res/bower_components/Ionicons/png/512/android-add.png → SEPlatform/web/res/bower_components/Ionicons/png/512/android-add.png


+ 0 - 0
src/web/res/bower_components/Ionicons/png/512/android-alarm.png → SEPlatform/web/res/bower_components/Ionicons/png/512/android-alarm.png


+ 0 - 0
src/web/res/bower_components/Ionicons/png/512/android-archive.png → SEPlatform/web/res/bower_components/Ionicons/png/512/android-archive.png


+ 0 - 0
src/web/res/bower_components/Ionicons/png/512/android-arrow-back.png → SEPlatform/web/res/bower_components/Ionicons/png/512/android-arrow-back.png


+ 0 - 0
src/web/res/bower_components/Ionicons/png/512/android-arrow-down-left.png → SEPlatform/web/res/bower_components/Ionicons/png/512/android-arrow-down-left.png


+ 0 - 0
src/web/res/bower_components/Ionicons/png/512/android-arrow-down-right.png → SEPlatform/web/res/bower_components/Ionicons/png/512/android-arrow-down-right.png


+ 0 - 0
src/web/res/bower_components/Ionicons/png/512/android-arrow-forward.png → SEPlatform/web/res/bower_components/Ionicons/png/512/android-arrow-forward.png


+ 0 - 0
src/web/res/bower_components/Ionicons/png/512/android-arrow-up-left.png → SEPlatform/web/res/bower_components/Ionicons/png/512/android-arrow-up-left.png


+ 0 - 0
src/web/res/bower_components/Ionicons/png/512/android-arrow-up-right.png → SEPlatform/web/res/bower_components/Ionicons/png/512/android-arrow-up-right.png


+ 0 - 0
src/web/res/bower_components/Ionicons/png/512/android-battery.png → SEPlatform/web/res/bower_components/Ionicons/png/512/android-battery.png


+ 0 - 0
src/web/res/bower_components/Ionicons/png/512/android-book.png → SEPlatform/web/res/bower_components/Ionicons/png/512/android-book.png


+ 0 - 0
src/web/res/bower_components/Ionicons/png/512/android-calendar.png → SEPlatform/web/res/bower_components/Ionicons/png/512/android-calendar.png


+ 0 - 0
src/web/res/bower_components/Ionicons/png/512/android-call.png → SEPlatform/web/res/bower_components/Ionicons/png/512/android-call.png


+ 0 - 0
src/web/res/bower_components/Ionicons/png/512/android-camera.png → SEPlatform/web/res/bower_components/Ionicons/png/512/android-camera.png


+ 0 - 0
src/web/res/bower_components/Ionicons/png/512/android-chat.png → SEPlatform/web/res/bower_components/Ionicons/png/512/android-chat.png


+ 0 - 0
src/web/res/bower_components/Ionicons/png/512/android-checkmark.png → SEPlatform/web/res/bower_components/Ionicons/png/512/android-checkmark.png


+ 0 - 0
src/web/res/bower_components/Ionicons/png/512/android-clock.png → SEPlatform/web/res/bower_components/Ionicons/png/512/android-clock.png


+ 0 - 0
src/web/res/bower_components/Ionicons/png/512/android-close.png → SEPlatform/web/res/bower_components/Ionicons/png/512/android-close.png


+ 0 - 0
src/web/res/bower_components/Ionicons/png/512/android-contact.png → SEPlatform/web/res/bower_components/Ionicons/png/512/android-contact.png


+ 0 - 0
src/web/res/bower_components/Ionicons/png/512/android-contacts.png → SEPlatform/web/res/bower_components/Ionicons/png/512/android-contacts.png


+ 0 - 0
src/web/res/bower_components/Ionicons/png/512/android-data.png → SEPlatform/web/res/bower_components/Ionicons/png/512/android-data.png


+ 0 - 0
src/web/res/bower_components/Ionicons/png/512/android-developer.png → SEPlatform/web/res/bower_components/Ionicons/png/512/android-developer.png


+ 0 - 0
src/web/res/bower_components/Ionicons/png/512/android-display.png → SEPlatform/web/res/bower_components/Ionicons/png/512/android-display.png


+ 0 - 0
src/web/res/bower_components/Ionicons/png/512/android-download.png → SEPlatform/web/res/bower_components/Ionicons/png/512/android-download.png


+ 0 - 0
src/web/res/bower_components/Ionicons/png/512/android-drawer.png → SEPlatform/web/res/bower_components/Ionicons/png/512/android-drawer.png


+ 0 - 0
src/web/res/bower_components/Ionicons/png/512/android-dropdown.png → SEPlatform/web/res/bower_components/Ionicons/png/512/android-dropdown.png


+ 0 - 0
src/web/res/bower_components/Ionicons/png/512/android-earth.png → SEPlatform/web/res/bower_components/Ionicons/png/512/android-earth.png


+ 0 - 0
src/web/res/bower_components/Ionicons/png/512/android-folder.png → SEPlatform/web/res/bower_components/Ionicons/png/512/android-folder.png


+ 0 - 0
src/web/res/bower_components/Ionicons/png/512/android-forums.png → SEPlatform/web/res/bower_components/Ionicons/png/512/android-forums.png


+ 0 - 0
src/web/res/bower_components/Ionicons/png/512/android-friends.png → SEPlatform/web/res/bower_components/Ionicons/png/512/android-friends.png


+ 0 - 0
src/web/res/bower_components/Ionicons/png/512/android-hand.png → SEPlatform/web/res/bower_components/Ionicons/png/512/android-hand.png


+ 0 - 0
src/web/res/bower_components/Ionicons/png/512/android-image.png → SEPlatform/web/res/bower_components/Ionicons/png/512/android-image.png


+ 0 - 0
src/web/res/bower_components/Ionicons/png/512/android-inbox.png → SEPlatform/web/res/bower_components/Ionicons/png/512/android-inbox.png


+ 0 - 0
src/web/res/bower_components/Ionicons/png/512/android-information.png → SEPlatform/web/res/bower_components/Ionicons/png/512/android-information.png


+ 0 - 0
src/web/res/bower_components/Ionicons/png/512/android-keypad.png → SEPlatform/web/res/bower_components/Ionicons/png/512/android-keypad.png


部分文件因为文件数量过多而无法显示