diff --git a/api/controllers/wxapp/licheb/User.php b/api/controllers/wxapp/licheb/User.php index 093cf12c..47bbea23 100644 --- a/api/controllers/wxapp/licheb/User.php +++ b/api/controllers/wxapp/licheb/User.php @@ -313,7 +313,7 @@ class User extends Wxapp ]; $brands = $this->auto_brand_model->select($where, '', 0, 0, 'id,name'); foreach ($brands as $key2 => $val2) { - $count_items = $this->mdItems->count(['brand_id' => $val2['id'], 'biz_id' => $val['id'] + $count_items = $this->mdItems->count(['brand_id' => $val2['id'], 'status<>' => 0, 'biz_id' => $val['id'] , 'bill_time' => '0000-00-00 00:00:00']); $bg_color = $count_items ? '#fff' : '#999'; $auto_brands[] = ['name' => $val2['name'], 'bg_color' => $bg_color]; diff --git a/api/controllers/wxapp/material/Biz.php b/api/controllers/wxapp/material/Biz.php index d78a1f7e..346a3cb9 100644 --- a/api/controllers/wxapp/material/Biz.php +++ b/api/controllers/wxapp/material/Biz.php @@ -58,7 +58,7 @@ class Biz extends Wxapp } $lists = []; $sql = "SELECT id,brand_id,s_id,v_id,cor_id,ori_price FROM lc_items WHERE biz_id={$biz_id} -AND bill_time='0000-00-00 00:00:00' GROUP BY cor_id ORDER BY in_time DESC"; +AND bill_time='0000-00-00 00:00:00' AND status<>0 GROUP BY cor_id ORDER BY in_time DESC"; $res = $this->mdItems->db->query($sql)->result_array(); $brand_ids = $s_ids = $attr_vids = array(); foreach ($res as $v) {