修复sql查询

This commit is contained in:
whyour 2022-02-20 10:15:17 +08:00
parent f0f2c6b537
commit 7e34f4990d
2 changed files with 2 additions and 2 deletions

View File

@ -42,7 +42,7 @@ export default async () => {
where: { where: {
isDisabled: { [Op.ne]: 1 }, isDisabled: { [Op.ne]: 1 },
command: { command: {
[Op.or]: [{ [Op.like]: `%ql repo%` }, { [Op.like]: `%$ql raw%` }], [Op.or]: [{ [Op.like]: `%ql repo%` }, { [Op.like]: `%ql raw%` }],
}, },
}, },
}).then((docs) => { }).then((docs) => {

View File

@ -80,7 +80,7 @@ export default class DependenceService {
const encodeText = encodeURIComponent(searchValue); const encodeText = encodeURIComponent(searchValue);
const reg = { const reg = {
[Op.or]: [ [Op.or]: [
{ [Op.like]: `%${searchValue}&` }, { [Op.like]: `%${searchValue}%` },
{ [Op.like]: `%${encodeText}%` }, { [Op.like]: `%${encodeText}%` },
], ],
}; };