【类 型】:
【原 因】: 【过 程】: 【影 响】:
This commit is contained in:
parent
d6975cbd82
commit
1c0592d6e3
@ -199,7 +199,6 @@ class PlaneController extends PublicController
|
|||||||
*/
|
*/
|
||||||
public function addAir()
|
public function addAir()
|
||||||
{
|
{
|
||||||
//总管理员 可接收任何shop_id 非总管理员 只可以调用自身shop_id 否则会中断
|
|
||||||
$this->isPower();
|
$this->isPower();
|
||||||
|
|
||||||
if ($_REQUEST['shop_id'] && $_REQUEST['name'] && $_REQUEST['date']) {
|
if ($_REQUEST['shop_id'] && $_REQUEST['name'] && $_REQUEST['date']) {
|
||||||
@ -210,6 +209,10 @@ class PlaneController extends PublicController
|
|||||||
if ($_REQUEST['desc']) {
|
if ($_REQUEST['desc']) {
|
||||||
$data['describe'] = $_REQUEST['desc'];
|
$data['describe'] = $_REQUEST['desc'];
|
||||||
}
|
}
|
||||||
|
if ($_REQUEST['bind_class_id']) {
|
||||||
|
$data['bind_class_id'] = $_REQUEST['bind_class_id'];
|
||||||
|
}
|
||||||
|
|
||||||
$airDb = D('airplane_register');
|
$airDb = D('airplane_register');
|
||||||
if ($airDb->data($data)->add()) {
|
if ($airDb->data($data)->add()) {
|
||||||
echo json_encode(array('status' => 1, 'msg' => '创建成功'));
|
echo json_encode(array('status' => 1, 'msg' => '创建成功'));
|
||||||
@ -225,7 +228,6 @@ class PlaneController extends PublicController
|
|||||||
*/
|
*/
|
||||||
public function saveAir()
|
public function saveAir()
|
||||||
{
|
{
|
||||||
//总管理员 可接收任何shop_id 非总管理员 只可以调用自身shop_id 否则会中断
|
|
||||||
$this->isPower();
|
$this->isPower();
|
||||||
|
|
||||||
if ($_REQUEST['shop_id'] && $_REQUEST['name'] && $_REQUEST['id']) {
|
if ($_REQUEST['shop_id'] && $_REQUEST['name'] && $_REQUEST['id']) {
|
||||||
@ -237,8 +239,13 @@ class PlaneController extends PublicController
|
|||||||
} else {
|
} else {
|
||||||
$data['describe'] = null;
|
$data['describe'] = null;
|
||||||
}
|
}
|
||||||
|
if ($_REQUEST['bind_class_id']) {
|
||||||
|
$data['bind_class_id'] = $_REQUEST['bind_class_id'];
|
||||||
|
}
|
||||||
|
|
||||||
$where['id'] = $_REQUEST['id'];
|
$where['id'] = $_REQUEST['id'];
|
||||||
$where['shop_id'] = $_REQUEST['shop_id'];
|
$where['shop_id'] = $_REQUEST['shop_id'];
|
||||||
|
|
||||||
$airDb = D('airplane_register');
|
$airDb = D('airplane_register');
|
||||||
if ($airDb->where($where)->save($data)) {
|
if ($airDb->where($where)->save($data)) {
|
||||||
echo json_encode(array('status' => 1, 'msg' => '更新成功'));
|
echo json_encode(array('status' => 1, 'msg' => '更新成功'));
|
||||||
@ -249,6 +256,7 @@ class PlaneController extends PublicController
|
|||||||
echo json_encode(array('status' => 0, 'msg' => '参数有误'));
|
echo json_encode(array('status' => 0, 'msg' => '参数有误'));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @description: 删除指定飞机
|
* @description: 删除指定飞机
|
||||||
*/
|
*/
|
||||||
|
Loading…
Reference in New Issue
Block a user