Your Name há 2 anos atrás
pai
commit
a2599c6de6
2 ficheiros alterados com 15 adições e 1 exclusões
  1. 14 0
      learn/active/database/info_refund_log.php
  2. 1 1
      learn/active/lib/Manage.php

+ 14 - 0
learn/active/database/info_refund_log.php

@@ -194,5 +194,19 @@ return array
             'order' => array('cdate' => 'desc'),
             'col' => '*',
         ),
+        'getTui' => array
+        (
+            # 匹配的正则或函数 选填项
+            'option' => array
+            (
+                'order_id' => 'yes',
+                'code_id' => 'yes',
+                'state' => 1,
+                'status' => 2,
+            ),
+            'type' => 'one',
+            'order' => array('cdate' => 'desc'),
+            'col' => 'sum(price) as price',
+        ),
     ),
 );

+ 1 - 1
learn/active/lib/Manage.php

@@ -503,7 +503,7 @@ Class Manage
                             }
                         } else if ($v['status'] == 3) {
                             if ($active['refundagin_type'] == 2) {
-                                $log = Dever::db('active/info_refund_log')->find(array('code_id'=>$v['id'],'status'=>2));
+                                $log = Dever::db('active/info_refund_log')->getTui(array('order_id'=>$id,'code_id'=>$v['id']));
                                 if ($log && $log['price'] < $active['price']) {
                                     $url = Dever::url('project/database/update?project=active&table=info_refund_log&search_option_price='.$active['price'].'&search_option_code_id='.$v['id'].'&search_option_order_id='.$id.'&col=price,order_id,code_id,desc', 'manage');
                                     $name = '再次退款';