parent
09a7918ab3
commit
e76e2a15f2
|
@ -10,6 +10,12 @@ module.exports = Self => {
|
|||
type: 'number',
|
||||
description: 'The item id',
|
||||
},
|
||||
{
|
||||
arg: 'filter',
|
||||
type: 'object',
|
||||
description: 'Filter defining where, order, offset, and limit - must be a JSON-encoded string',
|
||||
http: {source: 'query'}
|
||||
}
|
||||
],
|
||||
returns: [
|
||||
{
|
||||
|
@ -24,7 +30,7 @@ module.exports = Self => {
|
|||
},
|
||||
});
|
||||
|
||||
Self.itemLackDetail = async(itemFk, options) => {
|
||||
Self.itemLackDetail = async(itemFk, filter, options) => {
|
||||
const conn = Self.dataSource.connector;
|
||||
|
||||
const myOptions = {};
|
||||
|
@ -80,6 +86,11 @@ module.exports = Self => {
|
|||
`,
|
||||
[itemFk, 2]);
|
||||
|
||||
// if (filter.where.alertLevel) {
|
||||
// stmt.merge({
|
||||
// sql: `AND ts.alertLevel=?`, params: ['FREE']});
|
||||
// }
|
||||
// stmt.merge(conn.makeWhere(filter));
|
||||
const sql = ParameterizedSQL.join([stmt], ';');
|
||||
const result = await conn.executeStmt(sql, myOptions);
|
||||
return result;
|
||||
|
|
Loading…
Reference in New Issue