Browse Source

会员积分

zhangjinkun@topnet.net.cn 9 years ago
parent
commit
624e6bfe5a
2 changed files with 6 additions and 1 deletions
  1. 2 1
      common/src/qfw/util/credit/credit.go
  2. 4 0
      core/src/timetask.json

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

@@ -121,7 +121,8 @@ 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':{'age':int64(n_credit_a)}}", true, false)
+
+	b := mogo.Update("user", `{"_id":"`+userId+`"}`, &map[string]interface{}{"credit_a": int64(n_credit_a)}, true, false)
 	log.Println("gengxin", b)
 	return b, int(n_credit_a)
 }

+ 4 - 0
core/src/timetask.json

@@ -1,3 +1,4 @@
+<<<<<<< HEAD
 {
     "comment": {
         "c_rate": 720,
@@ -26,3 +27,6 @@
     "marketisstart": true,
     "marketrate": 300
 }
+=======
+{"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}
+>>>>>>> 3fa5568eeb4a55d403f99760cd50bb85364b7a7a