Browse Source

优化获取损耗代号接口

huangsanjia 1 year ago
parent
commit
dfb634ee8d
1 changed files with 3 additions and 1 deletions
  1. 3 1
      application/api/controller/Product.php

+ 3 - 1
application/api/controller/Product.php

@@ -945,7 +945,9 @@ class Product extends Api
             $this->error('参数不能为空');
         }
         $code = $params['code'];
-        $data = \db('dic_lzsh')->where('sys_bh','like',$code.'%')->whereOr('sys_mc','like',$code.'%')
+        $where['sys_bh|sys_mc|适用机型'] = array('like','%'.$code.'%');
+        $data = \db('dic_lzsh')
+                ->where($where)
             ->field('rtrim(sys_bh) as sys_bh, rtrim(sys_mc) as sys_mc,sys_rate0,sys_rate1')
             ->select();
         $this->success('请求成功',$data);