zhangjinkun@topnet.net.cn 9 жил өмнө
parent
commit
86246be88b

+ 1 - 1
common/src/qfw/util/credit/credit.go

@@ -121,7 +121,7 @@ func UpuserCreditA(code, userId string, credit_a int) (bool, int) {
 		ret = 1 << (tmp - 1)
 	}
 	n_credit_a := uint64(credit_a) + ret
-	b := mogo.Update("user", `{"_id":"`+userId+`"}`, "{'$set':{'ss':'test','age':int64(n_credit_a)}}", true, false)
+	b := mogo.Update("user", `{"_id":"`+userId+`"}`, "{'$set':{'age':int64(n_credit_a)}}", true, false)
 	log.Println("gengxin", b)
 	return b, int(n_credit_a)
 }

+ 3 - 2
core/src/qfw/member/membermanager.go

@@ -1081,6 +1081,7 @@ func returnFront(m *Member, key string) error {
 
 //更新cookie sessoin
 func UpdateCookieSession(action *xweb.Action, loginType string, flag bool, r map[string]interface{}) {
+	log.Println(r)
 	freeze := IntAll(r["i_freeze"])
 	action.Session().Set("i_freeze", freeze)
 	if r["s_nickname"] == nil || r["s_nickname"].(string) == "" {
@@ -1119,7 +1120,7 @@ func UpdateSession(action *xweb.Action, r map[string]interface{}) {
 		if r["s_nickname"] != nil && r["s_nickname"].(string) != "" {
 			setSessMap["nickName"] = r["s_nickname"]
 		}
-		setSessMap["userId"] = r["_id"]
+		setSessMap["userId"] = BsonIdToSId(r["_id"])
 		setSessMap["s_m_openid"] = r["s_m_openid"]
 		setSessMap["userType"] = IntAllDef(r["i_type"], 2)
 		setSessMap["userInfo"] = &r
@@ -1159,7 +1160,7 @@ func UpdateSession(action *xweb.Action, r map[string]interface{}) {
 		action.SetSession("identWay", IntAll(r["i_identificationway"]))   //认证状态
 		action.SetSession("opLocDistrict", r["opLocDistrict"])            //行政区划代码
 		**/
-		action.Session().UpdateByCustomField("id", r["_id"], "", &setSessMap)
+		action.Session().UpdateByCustomField("id", BsonIdToSId(r["_id"]), "", &setSessMap)
 	}, func(e interface{}) {
 		log.Println("登录报错", e)
 	})

+ 28 - 5
core/src/timetask.json

@@ -1,5 +1,28 @@
-<<<<<<< HEAD
-{"comment":{"c_rate":720,"commentrate":900},"market":{"demand":{"attr":["i_hits","i_bids","i_status"],"timepoint":"2016-01-21 14:42:23"},"service":{"attr":["i_hits","i_sales","i_comments","i_score","i_appcounts"],"timepoint":"2016-01-21 14:42:23"}},"marketisstart":true,"marketrate":300}
-=======
-{"comment":{"c_rate":720,"commentrate":900},"market":{"demand":{"attr":["i_hits","i_bids","i_status"],"timepoint":"2016-01-21 10:15:34"},"service":{"attr":["i_hits","i_sales","i_comments","i_score","i_appcounts"],"timepoint":"2016-01-21 10:15:34"}},"marketisstart":true,"marketrate":300}
->>>>>>> ffa6a97477331850e613c77ac970dbd80d2448d5
+{
+    "comment": {
+        "c_rate": 720,
+        "commentrate": 900
+    },
+    "market": {
+        "demand": {
+            "attr": [
+                "i_hits",
+                "i_bids",
+                "i_status"
+            ],
+            "timepoint": "2016-01-21 14:42:23"
+        },
+        "service": {
+            "attr": [
+                "i_hits",
+                "i_sales",
+                "i_comments",
+                "i_score",
+                "i_appcounts"
+            ],
+            "timepoint": "2016-01-21 14:42:23"
+        }
+    },
+    "marketisstart": true,
+    "marketrate": 300
+}