Skip to content

Commit

Permalink
修改查询接口
Browse files Browse the repository at this point in the history
  • Loading branch information
wangjingyu committed Oct 24, 2022
1 parent 97dba3a commit 1f19264
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
2 changes: 1 addition & 1 deletion app/controller/mywife.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ class MyWifeController extends Controller {
food: ctx.request.body?.food || undefined,
times: ctx.request.body?.times || undefined,
love: ctx.request.body?.love || undefined,
whichTime: ctx.request.body?.whichTime || '全部'
whichTime: ctx.request.body?.whichTime || undefined,
});
}
// 增加食物列表
Expand Down
1 change: 1 addition & 0 deletions app/service/MyWife.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ class Test extends egg.Service {
food: params?.food || { $ne: null },
love: params?.love || { $ne: null },
times: params?.times || { $ne: null },
whichTime: params?.whichTime || { $ne: null },
// Article为modal/article.js里面命名的名字
// id: 2,
// _id: app.mongoose.Types.ObjectId('6231b28691e2bcb857babb56'),
Expand Down
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "backend-example",
"version": "1.0.0",
"description": "",
"name": "lunch-command",
"version": "1.0.1",
"description": "推荐今天吃什么后端代码",
"private": true,
"egg": {
"typescript": true,
Expand Down

0 comments on commit 1f19264

Please sign in to comment.