Update ShopTruckTemplate.php

This commit is contained in:
邹景立 2021-01-28 11:10:01 +08:00
parent fbcb40bf1c
commit 583ba860ff

View File

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