Compare commits
3 Commits
d116630a24
...
17db93bd7d
Author | SHA1 | Date | |
---|---|---|---|
![]() |
17db93bd7d | ||
![]() |
2a76a60b91 | ||
![]() |
75d4b3fc0c |
@ -1023,9 +1023,7 @@ class PlaneController extends PublicController
|
||||
}
|
||||
}
|
||||
/**
|
||||
* 删除指定的飞行数据记录
|
||||
* @param string idArr 以逗号分隔的ID字符串
|
||||
* @return json
|
||||
* @description: 删除指定的飞行数据记录
|
||||
*/
|
||||
public function deleteFlyDataByIdArr()
|
||||
{
|
||||
@ -1037,7 +1035,8 @@ class PlaneController extends PublicController
|
||||
$idArrStr = I('post.idArr', '', 'trim');
|
||||
|
||||
if (empty($idArrStr)) {
|
||||
$this->ajaxReturn(array('status' => 0, 'msg' => '参数错误,idArr 不能为空'));
|
||||
echo json_encode(array('status' => 0, 'msg' => '参数错误,idArr 不能为空'));
|
||||
exit;
|
||||
}
|
||||
|
||||
$idArr = explode(',', $idArrStr);
|
||||
@ -1048,19 +1047,19 @@ class PlaneController extends PublicController
|
||||
});
|
||||
|
||||
if (empty($idArr)) {
|
||||
$this->ajaxReturn(array('status' => 0, 'msg' => '参数错误,idArr 无有效 ID'));
|
||||
echo json_encode(array('status' => 0, 'msg' => '参数错误,idArr 无有效 ID'));
|
||||
exit;
|
||||
}
|
||||
|
||||
$where['id'] = array('in', $idArr);
|
||||
|
||||
// 执行删除操作
|
||||
$result = M('flight_log')->where($where)->delete();
|
||||
|
||||
if ($result === false) {
|
||||
$this->ajaxReturn(array('status' => 0, 'msg' => '删除失败'));
|
||||
$flight_logDb = D('flight_log');
|
||||
if ($total = $flight_logDb->where($where)->delete()) {
|
||||
echo json_encode(array('status' => 1, 'msg' => '删除成功', 'total' => $total));
|
||||
} else {
|
||||
echo json_encode(array('status' => 0, 'msg' => '删除失败'));
|
||||
}
|
||||
|
||||
$this->ajaxReturn(array('status' => 1, 'msg' => '删除成功', 'deleted_count' => $result));
|
||||
}
|
||||
/**
|
||||
* @description: 上传保存飞机飞行数据(从解锁到加锁)
|
||||
|
Loading…
Reference in New Issue
Block a user