getPk(); $brand_key = SnowFlake::getInstance()->createID(); $row->getQuery()->where($pk,$row[$pk])->update(['brand_key' => $brand_key]); }); } public function getStatusList() { return ['normal' => __('Normal'), 'hidden' => __('Hidden')]; } public function getStatusTextAttr($value, $data) { $value = $value ? $value : (isset($data['status']) ? $data['status'] : ''); $list = $this->getStatusList(); return isset($list[$value]) ? $list[$value] : ''; } }