package p import ( "regexp" . "app.yhyue.com/moapp/jybase/encrypt" ) const ( Mgo_BulkSize = 100 Mgo_ListSize = 200 Mysql_BulkSize = 200 Bigmember_Service_Entchange = 12 Bigmember_Service_Followent = 13 Bigmember_Service_Followproject = 14 Bigmember_Service_Entchange_Followent = 16 Bigmember_Service_Report = 10 Bigmember_Service_Projectforecast = 9 OneDaySecond = 86400 ThreeDay = 259200 SevenDay = 604800 Mgo_User = "user" Mgo_Ent_User = "ent_user" Es_Bidding = "bidding" Es_Projectset = "projectset" Pushcache_1 = "pushcache_1" Pushcache_2_a = "pushcache_2_a" Pushcache_2_b = "pushcache_2_b" Pushcache_2_c = "pushcache_2_c" Es_ProjectQuery = `{"query":{"bool":{"must":{"terms":{"list.infoid":[%s]}}}},"_source":["_id","list.infoid","list.publishtime"],"sort":{"id":"desc"},"from":0,"size":%d}` Ent_EmpowerVip = "VIP订阅" Ent_EmpowerMember = "大会员" MatchWay_Title = "1" MatchWay_Detail = "2" MatchWay_Filetext = "3" MatchWay_Projectname = "4" MatchWay_Purchasing = "5" Es_Query_By_Ids = `{"query":{"bool":{"must":{"terms":{"id":[%s]}}}},"_source":["%s"],"size":%d}` Redis_NoMsgTipWxTmplCount = "noMsgTipWxTmplCount_%s" ) var ( Se = SimpleEncrypt{Key: "topnet"} MailReg = regexp.MustCompile("^.+@.+$") TitleClearRe = regexp.MustCompile("<[^>]+>([^<]+)?<[^>]+>") WeekNum = map[string]int{ "Monday": 1, "Tuesday": 2, "Wednesday": 3, "Thursday": 4, "Friday": 5, "Saturday": 6, "Sunday": 7, } KeyFilterReg = regexp.MustCompile("^(项目|中标|公告)$") KeyRetainReg = regexp.MustCompile("[\\p{Han}a-zA-Z0-9]") 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"} SpaceReg = regexp.MustCompile("\\s+") UserCollFields = map[string]interface{}{ "_id": 1, "o_jy": 1, "i_vip_status": 1, "o_vipjy": 1, "i_member_status": 1, "o_member_jy": 1, "o_pushset": 1, "s_m_openid": 1, "a_m_openid": 1, "s_phone": 1, "s_m_phone": 1, "s_jpushid": 1, "s_opushid": 1, "i_ispush": 1, "s_appponetype": 1, "base_user_id": 1, "i_mainaccount": 1, "s_member_mainid": 1, "i_member_sub_status": 1, "subpush_inactive": 1, } )