1234567891011121314151617181920212223242526272829303132333435363738394041424344454647 |
- <?php
-
-
- namespace app\home\model;
-
- use think\Db;
- use think\Model;
-
-
- class ProductImg extends Model
- {
-
- protected function initialize()
- {
-
- parent::initialize();
- }
-
-
-
- public function getProImg($aids = [], $field = '*')
- {
- $where = [];
- !empty($aids) && $where['aid'] = ['IN', $aids];
- $result = Db::name('ProductImg')->field($field)
- ->where($where)
- ->order('sort_order asc')
- ->select();
- !empty($result) && $result = group_same_key($result, 'aid');
-
- return $result;
- }
- }
|