|
@@ -3,7 +3,7 @@ package history
|
|
|
import (
|
|
|
"app.yhyue.com/moapp/jybase/common"
|
|
|
"app.yhyue.com/moapp/jybase/encrypt"
|
|
|
- "app.yhyue.com/moapp/jybase/logger"
|
|
|
+ "app.yhyue.com/moapp/jybase/go-xweb/log"
|
|
|
"app.yhyue.com/moapp/jybase/mail"
|
|
|
"app.yhyue.com/moapp/jybase/mongodb"
|
|
|
"app.yhyue.com/moapp/jybase/redis"
|
|
@@ -255,7 +255,7 @@ func GetIdRange() (bson.M, bool) {
|
|
|
return tmpRange, true
|
|
|
}
|
|
|
} else { //结束id不大于起始id 退出
|
|
|
- logger.Debug("Search End ID Range Error. Sid:", util.LatestId, "Eid:", endId)
|
|
|
+ log.Debug("Search End ID Range Error. Sid:", util.LatestId, "Eid:", endId)
|
|
|
break
|
|
|
}
|
|
|
}
|
|
@@ -295,11 +295,11 @@ func GetIdRange() (bson.M, bool) {
|
|
|
// LatestId = endId
|
|
|
// return tmpRange, true
|
|
|
// } else {
|
|
|
- // logger.Debug("ID Range Error,Start ID:", LatestId, "End ID:", endId)
|
|
|
+ // log.Debug("ID Range Error,Start ID:", LatestId, "End ID:", endId)
|
|
|
// return bson.M{}, false
|
|
|
// }
|
|
|
// }
|
|
|
- // logger.Debug("Search End ID No Data", query, "Error:", err)
|
|
|
+ // log.Debug("Search End ID No Data", query, "Error:", err)
|
|
|
|
|
|
}
|
|
|
|
|
@@ -489,7 +489,7 @@ func MergeDatas(history, tmp map[string]interface{}, isTagRule, isDepartRmvRep b
|
|
|
item2 := common.ObjToString(tmp["item"])
|
|
|
history["item"] = MergeField(item1, item2)
|
|
|
history["itemdist"].(map[string]interface{})[item2] = matchkey2
|
|
|
- logger.Debug("组装后的item:", history["item"], history["itemdist"])
|
|
|
+ log.Debug("组装后的item:", history["item"], history["itemdist"])
|
|
|
|
|
|
if isTagRule { //标签模式 tagname、tagid合并
|
|
|
tagname1 := common.ObjToString(history["tagname"])
|
|
@@ -566,9 +566,9 @@ func AssembelSave(tmp map[string]interface{}, IsSearchHosp, IsSearchEnps bool, h
|
|
|
if dataTable == 2 {
|
|
|
isExist, err := redis.Exists("other", "entexportdata_"+id+"_"+fmt.Sprintln(entId))
|
|
|
if err != nil {
|
|
|
- logger.Debug("企业订阅数据导出redis判重失败")
|
|
|
+ log.Debug("企业订阅数据导出redis判重失败")
|
|
|
} else if isExist {
|
|
|
- logger.Debug("数据重复,id ", id, "entid ", entId)
|
|
|
+ log.Debug("数据重复,id ", id, "entid ", entId)
|
|
|
return
|
|
|
}
|
|
|
}
|
|
@@ -597,7 +597,7 @@ func AssembelSave(tmp map[string]interface{}, IsSearchHosp, IsSearchEnps bool, h
|
|
|
if !isOk {
|
|
|
util.MgoSave.Save(util.SaveCollProject, tmp)
|
|
|
}
|
|
|
- logger.Debug("项目id去重,项目id:", projectId, isOk)
|
|
|
+ log.Debug("项目id去重,项目id:", projectId, isOk)
|
|
|
}
|
|
|
} else {
|
|
|
tmp["projectId"] = ""
|
|
@@ -744,7 +744,7 @@ func AssembelSave(tmp map[string]interface{}, IsSearchHosp, IsSearchEnps bool, h
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
- logger.Debug("查询附件结果:", id, "附件数量:", len(filesArr))
|
|
|
+ log.Debug("查询附件结果:", id, "附件数量:", len(filesArr))
|
|
|
if len(filesArr) > 0 {
|
|
|
if FilterFilehrefAppidMap[appid] {
|
|
|
filesArrs := []map[string]interface{}{}
|
|
@@ -801,7 +801,7 @@ func AssembelSave(tmp map[string]interface{}, IsSearchHosp, IsSearchEnps bool, h
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
- logger.Debug("查询附件结果:", id, "附件数量:", len(filesArr))
|
|
|
+ log.Debug("查询附件结果:", id, "附件数量:", len(filesArr))
|
|
|
if len(filesArr) > 0 {
|
|
|
if FilterFilehrefAppidMap[appid] {
|
|
|
filesArrs := []map[string]interface{}{}
|
|
@@ -982,7 +982,7 @@ func AssembelSave(tmp map[string]interface{}, IsSearchHosp, IsSearchEnps bool, h
|
|
|
}
|
|
|
if noticeFilter == 1 && (dataTable == 0 || dataTable == 1) && isOk {
|
|
|
ok := checkBidId(appid, id, dataTable)
|
|
|
- logger.Debug("公告去重结果", id, dataTable, ok)
|
|
|
+ log.Debug("公告去重结果", id, dataTable, ok)
|
|
|
if !ok {
|
|
|
isOk = false
|
|
|
tmp["chongfu"] = id
|
|
@@ -1245,7 +1245,7 @@ func SaveMgo() {
|
|
|
|
|
|
// 数据存库
|
|
|
func SaveUsermailMgo() {
|
|
|
- logger.Debug("Mgo Save Usermail...")
|
|
|
+ log.Debug("Mgo Save Usermail...")
|
|
|
arru := make([]map[string]interface{}, 500)
|
|
|
indexu := 0
|
|
|
counts := 0
|
|
@@ -1284,84 +1284,84 @@ func SaveUsermailMgo() {
|
|
|
|
|
|
// 打印初始化信息
|
|
|
func PrintLog(cus *Customer) {
|
|
|
- logger.Debug("----------------------打标签规则----------------------------")
|
|
|
+ log.Debug("----------------------打标签规则----------------------------")
|
|
|
for i, tr := range cus.TagRules {
|
|
|
- logger.Debug("tagrules:", i, tr.ID, tr.Name, tr.CustomerId, tr.DepartRuleIds, tr.Fields)
|
|
|
+ log.Debug("tagrules:", i, tr.ID, tr.Name, tr.CustomerId, tr.DepartRuleIds, tr.Fields)
|
|
|
for j, kw := range tr.KW {
|
|
|
- logger.Debug("kw_matchkey---", kw.MatchType, len(kw.MatchType))
|
|
|
- logger.Debug("------------CReg--------------")
|
|
|
+ log.Debug("kw_matchkey---", kw.MatchType, len(kw.MatchType))
|
|
|
+ log.Debug("------------CReg--------------")
|
|
|
for ck1, cr := range kw.KeyReg.CReg {
|
|
|
- logger.Debug("CR---", ck1, cr.CrVal, cr.CsVal, cr.IsLetter)
|
|
|
+ log.Debug("CR---", ck1, cr.CrVal, cr.CsVal, cr.IsLetter)
|
|
|
}
|
|
|
- logger.Debug("------------AReg--------------")
|
|
|
+ log.Debug("------------AReg--------------")
|
|
|
for ck1, ar := range kw.KeyReg.AReg {
|
|
|
- logger.Debug("AR---", ck1, ar.CsVal)
|
|
|
+ log.Debug("AR---", ck1, ar.CsVal)
|
|
|
for _, arc := range ar.AndRegKid {
|
|
|
- logger.Debug("ARC---", arc.CrVal, arc.IsLetter)
|
|
|
+ log.Debug("ARC---", arc.CrVal, arc.IsLetter)
|
|
|
}
|
|
|
}
|
|
|
- logger.Debug("+++++++++++++++++++++AW++++++++++++++++++++++")
|
|
|
- logger.Debug("aw_matchkey---", tr.AW[j].MatchType, len(tr.AW[j].MatchType))
|
|
|
- logger.Debug("------------CReg--------------")
|
|
|
+ log.Debug("+++++++++++++++++++++AW++++++++++++++++++++++")
|
|
|
+ log.Debug("aw_matchkey---", tr.AW[j].MatchType, len(tr.AW[j].MatchType))
|
|
|
+ log.Debug("------------CReg--------------")
|
|
|
for ck2, cr := range tr.AW[j].KeyReg.CReg {
|
|
|
- logger.Debug("CR---", ck2, cr.CrVal, cr.CsVal, cr.IsLetter)
|
|
|
+ log.Debug("CR---", ck2, cr.CrVal, cr.CsVal, cr.IsLetter)
|
|
|
}
|
|
|
- logger.Debug("------------AReg--------------")
|
|
|
+ log.Debug("------------AReg--------------")
|
|
|
for ck2, ar := range tr.AW[j].KeyReg.AReg {
|
|
|
- logger.Debug("AR---", ck2, ar.CsVal)
|
|
|
+ log.Debug("AR---", ck2, ar.CsVal)
|
|
|
for _, arc := range ar.AndRegKid {
|
|
|
- logger.Debug("ARC---", arc.CrVal, arc.IsLetter)
|
|
|
+ log.Debug("ARC---", arc.CrVal, arc.IsLetter)
|
|
|
}
|
|
|
}
|
|
|
- logger.Debug("++++++++++++++++++++NW+++++++++++++++++++++++")
|
|
|
- logger.Debug("nw_matchkey---", tr.NW[j].MatchType, len(tr.NW[j].MatchType))
|
|
|
- logger.Debug("------------CReg--------------")
|
|
|
+ log.Debug("++++++++++++++++++++NW+++++++++++++++++++++++")
|
|
|
+ log.Debug("nw_matchkey---", tr.NW[j].MatchType, len(tr.NW[j].MatchType))
|
|
|
+ log.Debug("------------CReg--------------")
|
|
|
for ck1, cr := range tr.NW[j].KeyReg.CReg {
|
|
|
- logger.Debug("CR---", ck1, cr.CrVal, cr.CsVal, cr.IsLetter)
|
|
|
+ log.Debug("CR---", ck1, cr.CrVal, cr.CsVal, cr.IsLetter)
|
|
|
}
|
|
|
- logger.Debug("------------AReg--------------")
|
|
|
+ log.Debug("------------AReg--------------")
|
|
|
for ck1, ar := range tr.NW[j].KeyReg.AReg {
|
|
|
- logger.Debug("AR---", ck1, ar.CsVal)
|
|
|
+ log.Debug("AR---", ck1, ar.CsVal)
|
|
|
for _, arc := range ar.AndRegKid {
|
|
|
- logger.Debug("ARC---", arc.CrVal, arc.IsLetter)
|
|
|
+ log.Debug("ARC---", arc.CrVal, arc.IsLetter)
|
|
|
}
|
|
|
}
|
|
|
- logger.Debug("tagname-------------", tr.TagNames[j])
|
|
|
- logger.Debug("-------------------------------------------------")
|
|
|
+ log.Debug("tagname-------------", tr.TagNames[j])
|
|
|
+ log.Debug("-------------------------------------------------")
|
|
|
}
|
|
|
}
|
|
|
- logger.Debug("----------------------查询规则----------------------------")
|
|
|
+ log.Debug("----------------------查询规则----------------------------")
|
|
|
for i, dm := range cus.Departments {
|
|
|
- logger.Debug("deparment:", i, dm.ID, dm.Name, dm.CustomerID)
|
|
|
+ log.Debug("deparment:", i, dm.ID, dm.Name, dm.CustomerID)
|
|
|
for j, sr := range dm.Rules {
|
|
|
- logger.Debug("ck---", j, sr.ID, sr.Name, sr.CustomerID, sr.DepartmentID, sr.GCW.KeyReg, len(sr.GCW.KeyReg), sr.GCW.MatchType, len(sr.GCW.MatchType), sr.Fields, len(sr.Fields), sr.EsQuery)
|
|
|
+ log.Debug("ck---", j, sr.ID, sr.Name, sr.CustomerID, sr.DepartmentID, sr.GCW.KeyReg, len(sr.GCW.KeyReg), sr.GCW.MatchType, len(sr.GCW.MatchType), sr.Fields, len(sr.Fields), sr.EsQuery)
|
|
|
for j, kw := range sr.KW {
|
|
|
- logger.Debug("kw_matchkey---", kw.MatchType, len(kw.MatchType))
|
|
|
- logger.Debug("------------CReg--------------")
|
|
|
+ log.Debug("kw_matchkey---", kw.MatchType, len(kw.MatchType))
|
|
|
+ log.Debug("------------CReg--------------")
|
|
|
for ck1, cr := range kw.KeyReg.CReg {
|
|
|
- logger.Debug("CR---", ck1, cr.CrVal, cr.CsVal, cr.IsLetter)
|
|
|
+ log.Debug("CR---", ck1, cr.CrVal, cr.CsVal, cr.IsLetter)
|
|
|
}
|
|
|
- logger.Debug("------------AReg--------------")
|
|
|
+ log.Debug("------------AReg--------------")
|
|
|
for ck1, ar := range kw.KeyReg.AReg {
|
|
|
- logger.Debug("AR---", ck1, ar.CsVal)
|
|
|
+ log.Debug("AR---", ck1, ar.CsVal)
|
|
|
for _, arc := range ar.AndRegKid {
|
|
|
- logger.Debug("ARC---", arc.CrVal, arc.IsLetter)
|
|
|
+ log.Debug("ARC---", arc.CrVal, arc.IsLetter)
|
|
|
}
|
|
|
}
|
|
|
- logger.Debug("+++++++++++++++++++++AW++++++++++++++++++++++")
|
|
|
- logger.Debug("aw_matchkey---", sr.AW[j].MatchType, len(sr.AW[j].MatchType))
|
|
|
- logger.Debug("------------CReg--------------")
|
|
|
+ log.Debug("+++++++++++++++++++++AW++++++++++++++++++++++")
|
|
|
+ log.Debug("aw_matchkey---", sr.AW[j].MatchType, len(sr.AW[j].MatchType))
|
|
|
+ log.Debug("------------CReg--------------")
|
|
|
for ck2, cr := range sr.AW[j].KeyReg.CReg {
|
|
|
- logger.Debug("CR---", ck2, cr.CrVal, cr.CsVal, cr.IsLetter)
|
|
|
+ log.Debug("CR---", ck2, cr.CrVal, cr.CsVal, cr.IsLetter)
|
|
|
}
|
|
|
- logger.Debug("------------AReg--------------")
|
|
|
+ log.Debug("------------AReg--------------")
|
|
|
for ck2, ar := range sr.AW[j].KeyReg.AReg {
|
|
|
- logger.Debug("AR---", ck2, ar.CsVal)
|
|
|
+ log.Debug("AR---", ck2, ar.CsVal)
|
|
|
for _, arc := range ar.AndRegKid {
|
|
|
- logger.Debug("ARC---", arc.CrVal, arc.IsLetter)
|
|
|
+ log.Debug("ARC---", arc.CrVal, arc.IsLetter)
|
|
|
}
|
|
|
}
|
|
|
- logger.Debug("--------------------------------------------------------------------------------------")
|
|
|
+ log.Debug("--------------------------------------------------------------------------------------")
|
|
|
}
|
|
|
}
|
|
|
}
|
|
@@ -1370,25 +1370,25 @@ func PrintLog(cus *Customer) {
|
|
|
// 匹配
|
|
|
func RegMatchTest(fieldText map[string]interface{}, matchType []string, matchReg *Reg, matchKey map[string]bool, matchKeyType map[string]bool, goon, isAddWord bool) (match bool) {
|
|
|
defer common.Catch()
|
|
|
- logger.Debug("matchType---", matchType)
|
|
|
+ log.Debug("matchType---", matchType)
|
|
|
if len(matchType) == 0 && isAddWord { //特殊处理附加词为空的情况
|
|
|
match = true
|
|
|
return
|
|
|
}
|
|
|
for _, mt := range matchType {
|
|
|
if text := common.ObjToString(fieldText[mt]); text != "" {
|
|
|
- logger.Debug("匹配方式---", mt, "text---", text)
|
|
|
- logger.Debug("--------------开始查找逗号分隔----------------", len(matchReg.CReg))
|
|
|
+ log.Debug("匹配方式---", mt, "text---", text)
|
|
|
+ log.Debug("--------------开始查找逗号分隔----------------", len(matchReg.CReg))
|
|
|
for i, cr := range matchReg.CReg { //逗号分隔,任意一个匹配表示匹配成功
|
|
|
- logger.Debug("iiii---", i, cr.CrVal, goon, matchKey)
|
|
|
+ log.Debug("iiii---", i, cr.CrVal, goon, matchKey)
|
|
|
if goon && matchKey[cr.CsVal] { //matchkey已存在不在匹配
|
|
|
continue
|
|
|
}
|
|
|
if indexArr := cr.CrVal.FindAllStringIndex(text, -1); len(indexArr) > 0 { //匹配成功
|
|
|
if !cr.IsLetter { //reg无字母
|
|
|
- logger.Debug("goon---", goon)
|
|
|
+ log.Debug("goon---", goon)
|
|
|
if goon {
|
|
|
- logger.Debug("key++++++++++ ++++++++++", cr.CsVal)
|
|
|
+ log.Debug("key++++++++++ ++++++++++", cr.CsVal)
|
|
|
matchKey[cr.CsVal] = true
|
|
|
matchKeyType[mt] = true
|
|
|
match = true
|
|
@@ -1397,9 +1397,9 @@ func RegMatchTest(fieldText map[string]interface{}, matchType []string, matchReg
|
|
|
return
|
|
|
}
|
|
|
} else if cr.IsLetter && CheckLetter(text, cr.CrVal, indexArr) { //reg有字母,判断是否是包含关系(AAAIBBB or AI){//
|
|
|
- logger.Debug("goon---", goon)
|
|
|
+ log.Debug("goon---", goon)
|
|
|
if goon {
|
|
|
- logger.Debug("key++++++++++++++++++++", cr.CsVal)
|
|
|
+ log.Debug("key++++++++++++++++++++", cr.CsVal)
|
|
|
matchKey[cr.CsVal] = true
|
|
|
matchKeyType[mt] = true
|
|
|
match = true
|
|
@@ -1410,16 +1410,16 @@ func RegMatchTest(fieldText map[string]interface{}, matchType []string, matchReg
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
- logger.Debug("--------------开始查找&&分隔----------------", len(matchReg.AReg))
|
|
|
+ log.Debug("--------------开始查找&&分隔----------------", len(matchReg.AReg))
|
|
|
for j, ar := range matchReg.AReg { //&&分割,所有匹配表示匹配成功
|
|
|
- logger.Debug("jjjj---", j, ar.CsVal, goon, matchKey)
|
|
|
+ log.Debug("jjjj---", j, ar.CsVal, goon, matchKey)
|
|
|
if goon && matchKey[ar.CsVal] {
|
|
|
continue
|
|
|
}
|
|
|
IsAregMatch := false
|
|
|
- logger.Debug("ar.AndRegKid---", j, ar.AndRegKid, len(ar.AndRegKid))
|
|
|
+ log.Debug("ar.AndRegKid---", j, ar.AndRegKid, len(ar.AndRegKid))
|
|
|
for n, arc := range ar.AndRegKid { //ar.AndRegKid若有值必不小于2
|
|
|
- logger.Debug("nnnn---", n, arc.CrVal, arc.IsLetter)
|
|
|
+ log.Debug("nnnn---", n, arc.CrVal, arc.IsLetter)
|
|
|
if indexArr := arc.CrVal.FindAllStringIndex(text, -1); len(indexArr) < 1 { //匹配失败(ar.AndRegKid中任意一个未匹配则失败)
|
|
|
break
|
|
|
} else { //匹配成功,判断字母
|
|
@@ -1431,11 +1431,11 @@ func RegMatchTest(fieldText map[string]interface{}, matchType []string, matchReg
|
|
|
IsAregMatch = true
|
|
|
}
|
|
|
}
|
|
|
- logger.Debug("IsAregMatch---", IsAregMatch)
|
|
|
+ log.Debug("IsAregMatch---", IsAregMatch)
|
|
|
if IsAregMatch {
|
|
|
- logger.Debug("goon---", goon)
|
|
|
+ log.Debug("goon---", goon)
|
|
|
if goon {
|
|
|
- logger.Debug("key++++++++++++++++++++", ar.CsVal)
|
|
|
+ log.Debug("key++++++++++++++++++++", ar.CsVal)
|
|
|
matchKey[ar.CsVal] = true
|
|
|
matchKeyType[mt] = true
|
|
|
match = true
|
|
@@ -1500,7 +1500,7 @@ func GetXlsxs(mMap []map[string]interface{}, i_contact int, fn, email, id string
|
|
|
if dataSource == 1 {
|
|
|
xf, err := xlsx.OpenFile("web/res/fields.xlsx")
|
|
|
if err != nil {
|
|
|
- logger.Error("fields file not foud", err.Error())
|
|
|
+ log.Error("fields file not foud", err.Error())
|
|
|
}
|
|
|
style := xlsx.NewStyle()
|
|
|
style.Font.Size = 12
|
|
@@ -2228,21 +2228,21 @@ func GetXlsxs(mMap []map[string]interface{}, i_contact int, fn, email, id string
|
|
|
if b, _ := PathExists(dir); !b {
|
|
|
err1 := os.MkdirAll(dir, os.ModePerm)
|
|
|
if err1 != nil {
|
|
|
- logger.Debug("mkdir err", dir)
|
|
|
+ log.Debug("mkdir err", dir)
|
|
|
}
|
|
|
//fname := t + ".xlsx"
|
|
|
}
|
|
|
fname := fmt.Sprintf("%s_%s_%s.xlsx", fn, t, common.GetRandom(4))
|
|
|
- logger.Debug("fname", fname)
|
|
|
+ log.Debug("fname", fname)
|
|
|
err = xf.Save(dir + fname)
|
|
|
if err != nil {
|
|
|
- logger.Debug("xls error", fname)
|
|
|
+ log.Debug("xls error", fname)
|
|
|
} else {
|
|
|
for i := 0; i < len(Gmails); i++ {
|
|
|
gmail := Gmails[i]
|
|
|
status := mail.GSendMail_q("剑鱼标讯", email, "", "", fn, "", dir+fname, fname, gmail)
|
|
|
if status {
|
|
|
- logger.Debug("send mail success", fname, email)
|
|
|
+ log.Debug("send mail success", fname, email)
|
|
|
break
|
|
|
}
|
|
|
}
|
|
@@ -2250,7 +2250,7 @@ func GetXlsxs(mMap []map[string]interface{}, i_contact int, fn, email, id string
|
|
|
} else {
|
|
|
xf, err := xlsx.OpenFile("web/res/full_field.xlsx")
|
|
|
if err != nil {
|
|
|
- logger.Debug("fields file not foud", err.Error())
|
|
|
+ log.Debug("fields file not foud", err.Error())
|
|
|
}
|
|
|
style := xlsx.NewStyle()
|
|
|
style.Font.Size = 12
|
|
@@ -2281,21 +2281,21 @@ func GetXlsxs(mMap []map[string]interface{}, i_contact int, fn, email, id string
|
|
|
if b, _ := PathExists(dir); !b {
|
|
|
err1 := os.MkdirAll(dir, os.ModePerm)
|
|
|
if err1 != nil {
|
|
|
- logger.Debug("mkdir err", dir)
|
|
|
+ log.Debug("mkdir err", dir)
|
|
|
}
|
|
|
}
|
|
|
//fname := t + ".xlsx"
|
|
|
fname := fmt.Sprintf("%s_%s_%s.xlsx", fn, t, common.GetRandom(4))
|
|
|
- logger.Debug("fname", fname)
|
|
|
+ log.Debug("fname", fname)
|
|
|
err = xf.Save(dir + fname)
|
|
|
if err != nil {
|
|
|
- logger.Debug("xls error", fname)
|
|
|
+ log.Debug("xls error", fname)
|
|
|
} else {
|
|
|
for i := 0; i < len(Gmails); i++ {
|
|
|
gmail := Gmails[i]
|
|
|
status := mail.GSendMail_q("剑鱼标讯", email, "", "", fn, "", dir+fname, fname, gmail)
|
|
|
if status {
|
|
|
- logger.Debug("send mail success", fname, email)
|
|
|
+ log.Debug("send mail success", fname, email)
|
|
|
break
|
|
|
}
|
|
|
}
|
|
@@ -2338,10 +2338,10 @@ func GetProjectId(id string) (string, int64, int64) {
|
|
|
}
|
|
|
}
|
|
|
projectId = strings.Join(projectIdArr, ",")
|
|
|
- logger.Debug("projectId", projectId)
|
|
|
+ log.Debug("projectId", projectId)
|
|
|
//
|
|
|
} else {
|
|
|
- logger.Debug("ES未查到项目id", id)
|
|
|
+ log.Debug("ES未查到项目id", id)
|
|
|
}
|
|
|
return projectId, zbtime, yitime
|
|
|
}
|
|
@@ -2351,7 +2351,7 @@ func InitProjectId(appid string) {
|
|
|
count := 0
|
|
|
defer func() {
|
|
|
util.MgoSave.DestoryMongoConn(session)
|
|
|
- logger.Debug("本次共取到%d个projectId\n", count)
|
|
|
+ log.Debug("本次共取到%d个projectId\n", count)
|
|
|
}()
|
|
|
save := util.Sysconfig["save"].(map[string]interface{})
|
|
|
query := map[string]interface{}{"appid": appid}
|
|
@@ -2376,7 +2376,7 @@ func InitUsermailProjectId(appid string) {
|
|
|
count := 0
|
|
|
defer func() {
|
|
|
util.MgoCus.DestoryMongoConn(session)
|
|
|
- logger.Debug("本次共取到%d个projectId\n", count)
|
|
|
+ log.Debug("本次共取到%d个projectId\n", count)
|
|
|
}()
|
|
|
customer := util.Sysconfig["customer"].(map[string]interface{})
|
|
|
query := map[string]interface{}{"appid": appid}
|
|
@@ -2401,14 +2401,14 @@ func checkBidId(appid, id string, dataTable int) bool {
|
|
|
if dataTable == 1 {
|
|
|
countData, ok := util.MgoSave.FindOne(util.SaveUserMail, map[string]interface{}{"appid": appid, "id": id})
|
|
|
if ok && countData != nil && len(*countData) > 0 {
|
|
|
- logger.Debug("用户 ", appid, " 在 ", util.SaveUserMail, " 中找到重复公告id ", id)
|
|
|
+ log.Debug("用户 ", appid, " 在 ", util.SaveUserMail, " 中找到重复公告id ", id)
|
|
|
isOk = false
|
|
|
}
|
|
|
}
|
|
|
if dataTable == 0 {
|
|
|
countData, ok := util.MgoSave.FindOne(util.SaveColl, map[string]interface{}{"appid": appid, "id": id})
|
|
|
if ok && countData != nil && len(*countData) > 0 {
|
|
|
- logger.Debug("用户 ", appid, " 在 ", util.SaveColl, " 中找到重复公告id ", id)
|
|
|
+ log.Debug("用户 ", appid, " 在 ", util.SaveColl, " 中找到重复公告id ", id)
|
|
|
isOk = false
|
|
|
}
|
|
|
}
|
|
@@ -2475,7 +2475,7 @@ func GetWinnerStyle(s_winner string, v map[string]interface{}) {
|
|
|
for _, vw := range strings.Split(s_winner, ",") {
|
|
|
//j := 1
|
|
|
for _, key := range keyList {
|
|
|
- logger.Debug("中标类型匹配", key)
|
|
|
+ log.Debug("中标类型匹配", key)
|
|
|
vvs := util.Sysconfig["winner_style_match"].(map[string]interface{})[key].(map[string]interface{})
|
|
|
keyWord := common.ObjToString(vvs["keyWord"])
|
|
|
name := common.ObjToString(vvs["name"])
|
|
@@ -2507,7 +2507,7 @@ func GetWinnerStyle(s_winner string, v map[string]interface{}) {
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
- logger.Debug("中标类型:", wname)
|
|
|
+ log.Debug("中标类型:", wname)
|
|
|
v["winner_style"] = wname
|
|
|
} else {
|
|
|
v["winner_style"] = ""
|
|
@@ -2558,7 +2558,7 @@ func saveMysqlPush(tmp map[string]interface{}, entId int) bool {
|
|
|
}
|
|
|
b := util.JyMysql.Insert("pushentniche", saveMap)
|
|
|
if b <= 0 {
|
|
|
- logger.Debug("数据插入pushentniche表失败,id ", common.ObjToString(tmp["id"]), "entid ", entId)
|
|
|
+ log.Debug("数据插入pushentniche表失败,id ", common.ObjToString(tmp["id"]), "entid ", entId)
|
|
|
return false
|
|
|
} else {
|
|
|
redis.Put("other", "entexportdata_"+infoid+"_"+fmt.Sprintln(entId), 1, -1)
|