diff --git a/project/controller/back_packageController.js b/project/controller/back_packageController.js index 96178d389c950cc8d6919d7aa42910e052c02cd9..b63a4af0bde57394d34502a677a3a4bbdf8a70f1 100644 --- a/project/controller/back_packageController.js +++ b/project/controller/back_packageController.js @@ -98,9 +98,9 @@ module.exports = { editController:(req,res)=>{ let package_id = req.body.package_id; let package_name = req.body.package_name; - // let create_date = req.body.create_date; + let create_date = req.body.create_date; let package_price=req.body.package_price; - packagemodule.editconfig(package_id,package_name,package_price,(err,data)=>{ + packagemodule.editconfig(package_name,create_date,package_price,package_id,(err,data)=>{ if(!err){ if(data.length > 0){ console.log(data); diff --git a/project/dao/back_packagemodule.js b/project/dao/back_packagemodule.js index c263b4b9885f24002c70b629ee6c6ac0db437852..ec2ae6ebe3e6558f3c97272af4f892529b40f363 100644 --- a/project/dao/back_packagemodule.js +++ b/project/dao/back_packagemodule.js @@ -38,13 +38,13 @@ module.exports = { dbpool.connect(sql,arr,fn) }, //编辑修改 - editconfig:(package_id,package_name,package_price,fn)=>{ - let sql=`UPDATE package_table SET package_name=? ,package_price=? WHERE package_id =?`; + editconfig:(package_name,create_date,package_price,package_id,fn)=>{ + let sql=`UPDATE package_table SET package_name= ? ,create_date = ? ,package_price= ? WHERE package_id = ? `; console.log(package_id); console.log(package_name); // console.log(create_date); console.log(package_price); - let arr=[package_id,package_name,package_price]; + let arr=[package_name,create_date,package_price,package_id]; dbpool.connect(sql,arr,fn) }, //单个商品展示