mirror of
https://gitee.com/xiongmao1988/rax-medical.git
synced 2025-08-23 20:44:58 +08:00
27 lines
774 B
JavaScript
27 lines
774 B
JavaScript
import common from "./common.js";
|
|
const app = common.app;
|
|
const connection = common.connection;
|
|
const m_get = common.m_get;
|
|
const nowTime = common.nowTime;
|
|
|
|
const getTable = () => app.post('/getfeature', function (req, res) {
|
|
const database = req.body.database;
|
|
const table = `FeatureTable`;
|
|
const order = `ID`;
|
|
const Clause = false;
|
|
const start = ~~req.body.start;
|
|
const end = ~~req.body.end;
|
|
connection(database).query(m_get(table, Clause, order, start, end), function (error, results, fields) {
|
|
if (error) {
|
|
console.log(`${nowTime()} 错误:${JSON.stringify(error)}`);
|
|
return res.status(500).send(error);
|
|
} else {
|
|
res.send(results);
|
|
}
|
|
});
|
|
});
|
|
|
|
export default {
|
|
getTable
|
|
};
|