constant.go 3.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081
  1. package p
  2. import (
  3. "regexp"
  4. . "app.yhyue.com/moapp/jybase/encrypt"
  5. )
  6. const (
  7. Mgo_BulkSize = 100
  8. Mgo_ListSize = 200
  9. Mysql_BulkSize = 200
  10. Bigmember_Service_Entchange = 12
  11. Bigmember_Service_Followent = 13
  12. Bigmember_Service_Followproject = 14
  13. Bigmember_Service_Entchange_Followent = 16
  14. Bigmember_Service_Report = 10
  15. Bigmember_Service_Projectforecast = 9
  16. OneDaySecond = 86400
  17. ThreeDay = 259200
  18. SevenDay = 604800
  19. Mgo_User = "user"
  20. Mgo_Ent_User = "ent_user"
  21. Es_Bidding = "bidding"
  22. Es_Projectset = "projectset"
  23. Pushcache_1 = "pushcache_1"
  24. Pushcache_2_a = "pushcache_2_a"
  25. Pushcache_2_b = "pushcache_2_b"
  26. Pushcache_2_c = "pushcache_2_c"
  27. Es_ProjectQuery = `{"query":{"bool":{"must":{"terms":{"list.infoid":[%s]}}}},"_source":["_id","list.infoid","list.publishtime"],"sort":{"id":"desc"},"from":0,"size":%d}`
  28. Ent_EmpowerVip = "VIP订阅"
  29. Ent_EmpowerMember = "大会员"
  30. MatchWay_Title = "1"
  31. MatchWay_Detail = "2"
  32. MatchWay_Filetext = "3"
  33. MatchWay_Projectname = "4"
  34. MatchWay_Purchasing = "5"
  35. Es_Query_By_Ids = `{"query":{"bool":{"must":{"terms":{"id":[%s]}}}},"_source":["%s"],"size":%d}`
  36. Redis_NoMsgTipWxTmplCount = "noMsgTipWxTmplCount_%s"
  37. )
  38. var (
  39. Se = SimpleEncrypt{Key: "topnet"}
  40. MailReg = regexp.MustCompile("^.+@.+$")
  41. TitleClearRe = regexp.MustCompile("<[^>]+>([^<]+)?<[^>]+>")
  42. WeekNum = map[string]int{
  43. "Monday": 1,
  44. "Tuesday": 2,
  45. "Wednesday": 3,
  46. "Thursday": 4,
  47. "Friday": 5,
  48. "Saturday": 6,
  49. "Sunday": 7,
  50. }
  51. KeyFilterReg = regexp.MustCompile("^(项目|中标|公告)$")
  52. KeyRetainReg = regexp.MustCompile("[\\p{Han}a-zA-Z0-9]")
  53. SaveBiddingField = []string{"_id", "area", "city", "district", "buyerclass", "publishtime", "s_subscopeclass", "subtype", "title", "toptype", "buyer", "bidamount", "budget", "projectname", "projectcode", "s_winner", "agency", "bidopentime", "attachment_count", "site", "buyertel", "buyerperson", "agencyperson", "agencytel", "winnerperson", "winnertel", "signendtime", "bidendtime", "entidlist"}
  54. SpaceReg = regexp.MustCompile("\\s+")
  55. UserCollFields = map[string]interface{}{
  56. "_id": 1,
  57. "o_jy": 1,
  58. "i_vip_status": 1,
  59. "o_vipjy": 1,
  60. "i_member_status": 1,
  61. "o_member_jy": 1,
  62. "o_pushset": 1,
  63. "s_m_openid": 1,
  64. "a_m_openid": 1,
  65. "s_phone": 1,
  66. "s_m_phone": 1,
  67. "s_jpushid": 1,
  68. "s_opushid": 1,
  69. "i_ispush": 1,
  70. "s_appponetype": 1,
  71. "base_user_id": 1,
  72. "i_mainaccount": 1,
  73. "s_member_mainid": 1,
  74. "i_member_sub_status": 1,
  75. "subpush_inactive": 1,
  76. }
  77. )