mirror of
https://gitee.com/zoujingli/ThinkAdmin.git
synced 2025-08-10 15:39:45 +08:00
修改数据表单名
This commit is contained in:
parent
2162191595
commit
e0a02c367a
@ -48,8 +48,8 @@ class Template extends Controller
|
|||||||
$this->fetch('form_region');
|
$this->fetch('form_region');
|
||||||
} else {
|
} else {
|
||||||
$data = $this->_vali(['nos.default' => '', 'oks.default' => '']);
|
$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['nos']) $this->app->db->name('BasePostageRegion')->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['oks']) $this->app->db->name('BasePostageRegion')->whereIn('id', str2arr($data['oks']))->update(['status' => 1]);
|
||||||
$this->success('修改配送区域成功!', 'javascript:history.back()');
|
$this->success('修改配送区域成功!', 'javascript:history.back()');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -69,7 +69,7 @@ class ExpressService extends Service
|
|||||||
*/
|
*/
|
||||||
public function region(int $level = 3, ?int $status = null): array
|
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($level)) $query->where('level', '<=', $level);
|
||||||
if (is_numeric($status)) $query->where(['status' => $status]);
|
if (is_numeric($status)) $query->where(['status' => $status]);
|
||||||
$items = DataExtend::arr2tree($query->column('id,pid,name,status', 'id'), 'id', 'pid', 'subs');
|
$items = DataExtend::arr2tree($query->column('id,pid,name,status', 'id'), 'id', 'pid', 'subs');
|
||||||
|
Loading…
x
Reference in New Issue
Block a user