Skip to content

Commit

Permalink
add interface_2
Browse files Browse the repository at this point in the history
  • Loading branch information
yexuan committed Dec 10, 2018
1 parent f51da8c commit 79f1c5c
Showing 1 changed file with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ const Sequelize=require('sequelize')
const conn=require('../../promise/promise').connection();

// 模型层定义
let industoryyield = conn.define(
let industryyield = conn.define(
// 默认表名(一般这里写单数),生成时会自动转换成复数形式
// 这个值还会作为访问模型相关的模型时的属性名,所以建议用小写形式
'industoryyield',
Expand Down Expand Up @@ -38,10 +38,10 @@ let industoryyield = conn.define(
);

module.exports={
industoryyield,
industryyield,
//查询所有
findAll:function(req,res){
industoryyield.findAll().then(msg=>{
industryyield.findAll().then(msg=>{
res.send(msg)
},
function(err){
Expand All @@ -50,7 +50,7 @@ module.exports={
},
//增加
create:function(req,res){
industoryyield.create({
industryyield.create({
'Sid':req.query.Sid,
'Cid':req.query.Cid,
'thingid':req.query.thingid,
Expand All @@ -67,7 +67,7 @@ module.exports={
},
//删除
delete:function(req,res){
industoryyield.destroy({
industryyield.destroy({
'where':{
'id':req.query.id,
}
Expand All @@ -86,7 +86,7 @@ module.exports={
},
//更新
update:function(req,res){
industoryyield.update(
industryyield.update(
{
'Sid':req.query.Sid,
'Cid':req.query.Cid,
Expand Down

0 comments on commit 79f1c5c

Please sign in to comment.