获取物品列表时, 只返回数量大于0的物品

This commit is contained in:
zhl 2021-02-08 16:23:06 +08:00
parent d5319663c4
commit 41e1c85e90

View File

@ -11,7 +11,7 @@ export default class ItemController extends BaseController {
@router('post /api/:accountid/items') @router('post /api/:accountid/items')
async itemList(req: any) { async itemList(req: any) {
let { accountid, type, items } = req.params let { accountid, type, items } = req.params
let queryData: any = { accountid } let queryData: any = { accountid, count: {$gt: 0} }
if (type != undefined) { if (type != undefined) {
queryData.itemtype = type << 0 queryData.itemtype = type << 0
} }