where('id', 'in', '(' . $ids . ')')->del(); //false //die($res); if ($res) { if (defined('ADM_LOG') && ADM_LOG == 1) { Db::table('log')->add(['group' => 'adm', 'type' => 'goods_o_del', 'status' => 200, 'time' => time(), 'ip' => getip(), 'data' => json_encode($_POST)]); } //记录日志 json(200, '删除成功'); } else { if (defined('ADM_LOG') && ADM_LOG == 1) { Db::table('log')->add(['group' => 'adm', 'type' => 'goods_o_del', 'status' => 201, 'time' => time(), 'ip' => getip(), 'data' => json_encode($_POST)]); } //记录日志 json(201, '删除失败'); } } else { json(201, '没有需要删除的数据'); } } ?>