dever 3 năm trước cách đây
mục cha
commit
7dc4b3ad2a
1 tập tin đã thay đổi với 1 bổ sung1 xóa
  1. 1 1
      service/bill/database/goods_stat.php

+ 1 - 1
service/bill/database/goods_stat.php

@@ -197,7 +197,7 @@ return array
             'type' => 'all',
             'order' => array('day' => 'desc', 'cdate' => 'desc'),
             'page' => array(20, 'list'),
-            'group' => 'CONCAT_WS("_", type, type_id, sku_id)',
+            'group' => '(case when type == 2 then concat_ws("_", type, type_id) else concat_ws("_", type, type_id, sku_id) end)',
             'col' => '*,sum(total_num) as total_num, sum(sell_num) as sell_num, sum(cash) as cash',
         ),
     ),