@@ -32,7 +32,7 @@ export class FVO_Good {
export class QDTO_Good extends SearchBase {
constructor() {
- const like_prop = ['name'];
+ const like_prop = [];
const props = ['name', 'type', 'supplier_id', 'is_use'];
const mapping = [];
super({ like_prop, props, mapping });
@@ -12,7 +12,7 @@ export class GoodService extends BaseService<modelType> {
async search(filter): Promise<object> {
const { name, is_use } = filter;
const list = await this.model.aggregate([
- { $match: { name: { $regex: name }, is_use: is_use } },
+ { $match: { name: { $regex: name || '' }, is_use: is_use } },
{
$project: {
_id: 1,