rabin 3 years ago
parent
commit
88b6915839
1 changed files with 7 additions and 1 deletions
  1. 7 1
      app/card/src/Api.php

+ 7 - 1
app/card/src/Api.php

@@ -159,7 +159,13 @@ class Api extends Core
 
             # 验证代理商权益
             if ($data['type'] == 2) {
-                $agent = Dever::db('agent/member_goods')->
+                $where['sku_id'] = $data['id'];
+                $where['type'] = 2;
+                $where['type_id'] = $data['card_id'];
+                $agent = Dever::db('agent/member_goods')->find($where);
+                if ($agent) {
+                    Dever::db('agent/member_goods')->update(array('where_id' => $agent['id'], 'sell_num' => $agent['total_num']))
+                }
             }
         }