getModel()->where($where)->where('module_type', 1)->field($field)->when($page&&$limit,function($query)use($page,$limit){ $query->page($page,$limit); })->select(); } /** * 移动图片 * @param array $data */ public function move(array $data) { return $this->getModel()->whereIn('att_id', $data['images'])->update(['pid' => $data['pid']]); } }