mirror of
https://github.com/cool-team-official/cool-admin-midway-packages.git
synced 2025-12-14 15:32:51 +00:00
fieldEq 支持类似 b.type 多表情况下的对应筛选
This commit is contained in:
parent
34f86e4a85
commit
d16a84b57b
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@cool-midway/core",
|
"name": "@cool-midway/core",
|
||||||
"version": "7.0.0-beta4",
|
"version": "7.0.0-beta5",
|
||||||
"description": "",
|
"description": "",
|
||||||
"main": "dist/index.js",
|
"main": "dist/index.js",
|
||||||
"typings": "index.d.ts",
|
"typings": "index.d.ts",
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@cool-midway/core",
|
"name": "@cool-midway/core",
|
||||||
"version": "7.0.0-beta4",
|
"version": "7.0.0-beta5",
|
||||||
"description": "",
|
"description": "",
|
||||||
"main": "index.js",
|
"main": "index.js",
|
||||||
"typings": "index.d.ts",
|
"typings": "index.d.ts",
|
||||||
|
|||||||
@ -458,8 +458,14 @@ export abstract class BaseService {
|
|||||||
}
|
}
|
||||||
// 字段全匹配
|
// 字段全匹配
|
||||||
if (!_.isEmpty(option.fieldEq)) {
|
if (!_.isEmpty(option.fieldEq)) {
|
||||||
for (const key of option.fieldEq) {
|
for (let key of option.fieldEq) {
|
||||||
const c = {};
|
const c = {};
|
||||||
|
// 如果key有包含.的情况下操作
|
||||||
|
if(typeof key === "string" && key.includes('.')){
|
||||||
|
const keys = key.split('.');
|
||||||
|
const lastKey = keys.pop();
|
||||||
|
key = {requestParam: lastKey, column: keys.join('.')};
|
||||||
|
}
|
||||||
// 单表字段无别名的情况下操作
|
// 单表字段无别名的情况下操作
|
||||||
if (typeof key === "string") {
|
if (typeof key === "string") {
|
||||||
if (query[key] || (query[key] == 0 && query[key] == "")) {
|
if (query[key] || (query[key] == 0 && query[key] == "")) {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user