Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
Y
yafangsuo_dataServer
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
node_server
yafangsuo_dataServer
Commits
5283b29f
Commit
5283b29f
authored
Sep 20, 2023
by
chenjinjing
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
no message
parent
90df5b8a
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
0 deletions
+5
-0
findData.ts
src/biz/mysql/findData.ts
+5
-0
No files found.
src/biz/mysql/findData.ts
View file @
5283b29f
...
@@ -22,6 +22,7 @@ import { BizError } from "../../util/bizError";
...
@@ -22,6 +22,7 @@ import { BizError } from "../../util/bizError";
function
analysisParamToWhere
(
param
,
column
)
{
function
analysisParamToWhere
(
param
,
column
)
{
let
where
=
{};
let
where
=
{};
let
order
=
[];
let
order
=
[];
let
group
=
""
;
let
limit
=
0
;
let
limit
=
0
;
for
(
let
key
in
param
)
{
for
(
let
key
in
param
)
{
if
(
typeof
param
[
key
]
==
"object"
)
{
if
(
typeof
param
[
key
]
==
"object"
)
{
...
@@ -68,6 +69,9 @@ function analysisParamToWhere(param, column) {
...
@@ -68,6 +69,9 @@ function analysisParamToWhere(param, column) {
case
"%limit%"
:
case
"%limit%"
:
limit
=
param
[
key
];
limit
=
param
[
key
];
break
;
break
;
case
"%group%"
:
group
=
param
[
key
];
break
;
default
:
where
[
key
]
=
param
[
key
];
default
:
where
[
key
]
=
param
[
key
];
}
}
}
}
...
@@ -77,6 +81,7 @@ function analysisParamToWhere(param, column) {
...
@@ -77,6 +81,7 @@ function analysisParamToWhere(param, column) {
if
(
column
&&
column
.
length
)
selectParam
.
attributes
=
column
;
if
(
column
&&
column
.
length
)
selectParam
.
attributes
=
column
;
if
(
order
&&
order
.
length
)
selectParam
.
order
=
order
;
if
(
order
&&
order
.
length
)
selectParam
.
order
=
order
;
if
(
limit
)
selectParam
.
limit
=
limit
;
if
(
limit
)
selectParam
.
limit
=
limit
;
if
(
group
)
selectParam
.
group
=
group
;
return
selectParam
;
return
selectParam
;
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment