|
@@ -76,7 +76,6 @@ func (this *KeyWordsSet) UpdateKeyWords() map[string]interface{} {
|
|
|
return map[string]interface{}{"flag": true, "msg": ""}
|
|
|
}
|
|
|
|
|
|
-//
|
|
|
func directSubKWSFree(types string, keys string, session *httpsession.Session) map[string]interface{} {
|
|
|
userId := qutil.ObjToString(session.Get("userId"))
|
|
|
var repleat = false
|
|
@@ -160,7 +159,7 @@ func directSubKWSFree(types string, keys string, session *httpsession.Session) m
|
|
|
return map[string]interface{}{"flag": flag}
|
|
|
}
|
|
|
|
|
|
-//免费用户删除关键词
|
|
|
+// 免费用户删除关键词
|
|
|
func DeleteKeyWordsFree(types, deletekey string, session *httpsession.Session) map[string]interface{} {
|
|
|
//免费用户只有一个分类
|
|
|
var index = "0"
|
|
@@ -194,7 +193,7 @@ func DeleteKeyWordsFree(types, deletekey string, session *httpsession.Session) m
|
|
|
return map[string]interface{}{"flag": flag, "msg": ""}
|
|
|
}
|
|
|
|
|
|
-//免费用户修改 保存关键词
|
|
|
+// 免费用户修改 保存关键词
|
|
|
func AddKeyWordsFree(types, userId, classIndex, className, keywordsIndex, keywordName, keywordCount string, notKeyword, appendKeyword []string, matchWay int, session *httpsession.Session) map[string]interface{} {
|
|
|
flag := true
|
|
|
data := config.Compatible.Select(userId, `{"`+types+`":1}`)
|
|
@@ -286,7 +285,7 @@ func AddKeyWordsFree(types, userId, classIndex, className, keywordsIndex, keywor
|
|
|
return map[string]interface{}{"flag": flag, "msg": ""}
|
|
|
}
|
|
|
|
|
|
-//保存/修改关键词
|
|
|
+// 保存/修改关键词
|
|
|
func AddKeyWords(types, userId, classIndex, className, keywordsIndex, keywordName, keywordCount string, notKeyword, appendKeyword []string, matchWay int, session *httpsession.Session) map[string]interface{} {
|
|
|
flag := true
|
|
|
positionType := qutil.Int64All(session.Get("positionType"))
|
|
@@ -370,7 +369,7 @@ func AddKeyWords(types, userId, classIndex, className, keywordsIndex, keywordNam
|
|
|
return map[string]interface{}{"flag": flag, "msg": ""}
|
|
|
}
|
|
|
|
|
|
-//删除关键词可以批量
|
|
|
+// 删除关键词可以批量
|
|
|
func DeleteKeyWords(types, deletekey, userId string, session *httpsession.Session) map[string]interface{} {
|
|
|
flag := true
|
|
|
dMap, err := util.JsonToMap(deletekey)
|
|
@@ -417,7 +416,7 @@ func DeleteKeyWords(types, deletekey, userId string, session *httpsession.Sessio
|
|
|
return map[string]interface{}{"flag": flag, "msg": ""}
|
|
|
}
|
|
|
|
|
|
-//删除分类【可以批量删除】
|
|
|
+// 删除分类【可以批量删除】
|
|
|
func DeleteClass(types, classIndex, userId string, session *httpsession.Session) map[string]interface{} {
|
|
|
flag := true
|
|
|
items, saveData := []interface{}{}, map[string]interface{}{}
|
|
@@ -446,7 +445,7 @@ func DeleteClass(types, classIndex, userId string, session *httpsession.Session)
|
|
|
return map[string]interface{}{"flag": flag, "msg": ""}
|
|
|
}
|
|
|
|
|
|
-//创建分类名
|
|
|
+// 创建分类名
|
|
|
func AddClass(types, classIndex, className, userId string, session *httpsession.Session) map[string]interface{} {
|
|
|
flag := true
|
|
|
saveData := map[string]interface{}{}
|
|
@@ -491,7 +490,7 @@ func AddClass(types, classIndex, className, userId string, session *httpsession.
|
|
|
|
|
|
}
|
|
|
|
|
|
-//关键词判重
|
|
|
+// 关键词判重
|
|
|
func KeyWordsRepeat(obj map[string]interface{}, aitems []interface{}) bool {
|
|
|
// 录入的关键词
|
|
|
key, _ := obj["key"].([]string)
|
|
@@ -594,21 +593,18 @@ func (this *UpdateOther) UpdateOther() map[string]interface{} {
|
|
|
return map[string]interface{}{"flag": flag, "msg": ""}
|
|
|
}
|
|
|
|
|
|
-//
|
|
|
func UpdateProjectMatch(types string, pmindex int) map[string]interface{} {
|
|
|
return map[string]interface{}{
|
|
|
types + ".i_projectmatch": pmindex,
|
|
|
}
|
|
|
}
|
|
|
|
|
|
-//
|
|
|
func UpdateSaveSeniorset(types string, matchtype int) map[string]interface{} {
|
|
|
return map[string]interface{}{
|
|
|
types + ".i_matchway": matchtype,
|
|
|
}
|
|
|
}
|
|
|
|
|
|
-//
|
|
|
func UpdateInfoType(types string, infotype string) map[string]interface{} {
|
|
|
if infotype != "" {
|
|
|
return map[string]interface{}{
|
|
@@ -621,14 +617,13 @@ func UpdateInfoType(types string, infotype string) map[string]interface{} {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
-//
|
|
|
func UpdateOtherBuyerClass(types string, other int) map[string]interface{} {
|
|
|
return map[string]interface{}{
|
|
|
types + ".i_matchbuyerclass_other": other,
|
|
|
}
|
|
|
}
|
|
|
|
|
|
-//UpdateKeyTip 关键词升级提示
|
|
|
+// UpdateKeyTip 关键词升级提示
|
|
|
func UpdateKeyTip(types string) map[string]interface{} {
|
|
|
return map[string]interface{}{
|
|
|
types + ".b_keytip": true,
|
|
@@ -710,7 +705,7 @@ func directSubKWS(updateItems string, keys string, userId string, session *https
|
|
|
return map[string]interface{}{"flag": flag}
|
|
|
}
|
|
|
|
|
|
-//订阅设置记录
|
|
|
+// 订阅设置记录
|
|
|
func SetLog(userid, types string, power int64, session *httpsession.Session) {
|
|
|
if power == 1 {
|
|
|
query := map[string]interface{}{
|
|
@@ -723,14 +718,14 @@ func SetLog(userid, types string, power int64, session *httpsession.Session) {
|
|
|
(*res)["userid"] = userid
|
|
|
(*res)["type"] = types
|
|
|
(*res)["createtime"] = time.Now().Unix()
|
|
|
- db.Mgo_Log.Save("ovipjy_log", res)
|
|
|
+ go db.Mgo_Log.Save("ovipjy_log", res)
|
|
|
}
|
|
|
} else {
|
|
|
if data := config.Compatible.Select(userid, `{"o_vipjy":1,"o_member_jy":1,"o_jy":1}`); len(*data) > 0 && data != nil {
|
|
|
(*data)["userid"] = userid
|
|
|
(*data)["type"] = types
|
|
|
(*data)["createtime"] = time.Now().Unix()
|
|
|
- db.Mgo_Log.Save("ovipjy_log", data)
|
|
|
+ go db.Mgo_Log.Save("ovipjy_log", data)
|
|
|
}
|
|
|
}
|
|
|
}
|