getPk(); $row->getQuery()->where($pk, $row[$pk])->update(['weigh' => $row[$pk]]); }); } public function getStatusList() { return ['0' => __('Status 0'), '1' => __('Status 1')]; } public function getShowtypeList() { return ['1' => __('Showtype 1'), '2' => __('Showtype 2'), '3' => __('Showtype 3'), '4' => __('Showtype 4'), '5' => __('Showtype 5'), '6' => __('Showtype 6'), '7' => __('Showtype 7'), '8' => __('Showtype 8'), '9' => __('Showtype 9')]; } public function getIsZhuantiList() { return ['1' => __('Is_zhuanti 1'), '0' => __('Is_zhuanti 0')]; } public function getStatusTextAttr($value, $data) { $value = $value ? $value : (isset($data['status']) ? $data['status'] : ''); $list = $this->getStatusList(); return isset($list[$value]) ? $list[$value] : ''; } public function getShowtypeTextAttr($value, $data) { $value = $value ? $value : (isset($data['showtype']) ? $data['showtype'] : ''); $list = $this->getShowtypeList(); return isset($list[$value]) ? $list[$value] : ''; } public function getIsZhuantiTextAttr($value, $data) { $value = $value ? $value : (isset($data['is_zhuanti']) ? $data['is_zhuanti'] : ''); $list = $this->getIsZhuantiList(); return isset($list[$value]) ? $list[$value] : ''; } }