Commit 51a6b4ff authored by wty's avatar wty

修复问题4

parent 95cdbd11
This diff is collapsed.
This diff is collapsed.
......@@ -17,11 +17,14 @@ getMysql.then(Mysql => {
}
request(domain + '/query/queryToolBox', {}, (error, response, body) => {
console.log(domain + '/query/queryToolBox')
console.log('body:',body)
console.log('body:', body)
const data = JSON.parse(body).data
const lastToolBoxId = data[data.length - 1].toolbox_id
const SQL = 'INSERT INTO type_childtype_toolbox (toolbox_id,type_id,child_type_id) VALUES (?,?,?)'
Mysql.query(SQL, [lastToolBoxId,type_id,child_type_id], (err, result) => {
const params = [lastToolBoxId, type_id]
if (typeof child_type_id !== 'number') params.push(null)
else params.push(child_type_id)
Mysql.query(SQL, params, (err, result) => {
if (err) {
res.send({
success: false,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment