修改数据表单名

This commit is contained in:
邹景立 2021-04-08 14:13:28 +08:00
parent 2162191595
commit e0a02c367a
2 changed files with 3 additions and 3 deletions

View File

@ -48,8 +48,8 @@ class Template extends Controller
$this->fetch('form_region');
} else {
$data = $this->_vali(['nos.default' => '', 'oks.default' => '']);
if ($data['nos']) $this->app->db->name('DataBasePostageRegion')->whereIn('id', str2arr($data['nos']))->update(['status' => 0]);
if ($data['oks']) $this->app->db->name('DataBasePostageRegion')->whereIn('id', str2arr($data['oks']))->update(['status' => 1]);
if ($data['nos']) $this->app->db->name('BasePostageRegion')->whereIn('id', str2arr($data['nos']))->update(['status' => 0]);
if ($data['oks']) $this->app->db->name('BasePostageRegion')->whereIn('id', str2arr($data['oks']))->update(['status' => 1]);
$this->success('修改配送区域成功!', 'javascript:history.back()');
}
}

View File

@ -69,7 +69,7 @@ class ExpressService extends Service
*/
public function region(int $level = 3, ?int $status = null): array
{
$query = $this->app->db->name('DataBasePostageRegion');
$query = $this->app->db->name('BasePostageRegion');
if (is_numeric($level)) $query->where('level', '<=', $level);
if (is_numeric($status)) $query->where(['status' => $status]);
$items = DataExtend::arr2tree($query->column('id,pid,name,status', 'id'), 'id', 'pid', 'subs');