where($condition)->field($field)->select()->toArray(); } public function addattr($data) { return Db::name('goodsattrindex')->insertGetId($data); } }