|
@@ -1218,7 +1218,7 @@ func ZmUserEquityRecovery(userTable string) {
|
|
|
it := sess.DB("qfw").C(userTable).Find(map[string]interface{}{
|
|
|
"i_zhima_status": map[string]interface{}{
|
|
|
"$gt": 0},
|
|
|
- }).Select(map[string]interface{}{"i_zhima_number": 1, "i_zhima_status": 1, "i_zhima_endtime": 1, "i_zhima_starttime": 1}).Iter()
|
|
|
+ }).Select(map[string]interface{}{"i_zhima_number": 1, "i_zhima_status": 1, "_id": 1, "i_userid": 1, "i_zhima_endtime": 1, "i_zhima_starttime": 1}).Iter()
|
|
|
for m := make(map[string]interface{}); it.Next(&m); {
|
|
|
userId := BsonIdToSId(m["_id"])
|
|
|
if userTable == CollEntUser {
|
|
@@ -1249,6 +1249,7 @@ func ZmUserEquityRecovery(userTable string) {
|
|
|
if number > 0 {
|
|
|
util.Mysql.Insert("bid_credit_balance_details", map[string]interface{}{
|
|
|
"user_id": userId,
|
|
|
+ "pack_type": i_zhima_status,
|
|
|
"operation": 3,
|
|
|
"number": -number,
|
|
|
"residue_number": 0,
|
|
@@ -1258,6 +1259,7 @@ func ZmUserEquityRecovery(userTable string) {
|
|
|
if newZmTime.Format("2006-01-02") != time.Unix(i_zhima_endtime, 0).Format("2006-01-02") {
|
|
|
util.Mysql.Insert("bid_credit_balance_details", map[string]interface{}{
|
|
|
"user_id": userId,
|
|
|
+ "pack_type": i_zhima_status,
|
|
|
"operation": 4,
|
|
|
"number": i_zhima_number,
|
|
|
"residue_number": i_zhima_number,
|