Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
T
ts-api-demo
Project
Project
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
wmvm
ts-api-demo
Commits
0041884a
Commit
0041884a
authored
Nov 27, 2024
by
1486327116
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
添加代理相关接口
parent
aacb2918
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
2 deletions
+9
-2
hotPairConfig.control.ts
src/functional/mvc/control/hotPairConfig.control.ts
+1
-1
hotPairConfig.service.ts
src/functional/mvc/service/hotPairConfig.service.ts
+8
-1
No files found.
src/functional/mvc/control/hotPairConfig.control.ts
View file @
0041884a
...
@@ -16,7 +16,7 @@ export const list = async (req: any, hotPairConfigPageVO: HotPairConfigPageVO) =
...
@@ -16,7 +16,7 @@ export const list = async (req: any, hotPairConfigPageVO: HotPairConfigPageVO) =
try
{
try
{
hotPairConfigPageVO
.
page
=
Optional
.
opt
(
hotPairConfigPageVO
,
'page'
,
1
);
hotPairConfigPageVO
.
page
=
Optional
.
opt
(
hotPairConfigPageVO
,
'page'
,
1
);
hotPairConfigPageVO
.
size
=
Optional
.
opt
(
hotPairConfigPageVO
,
'size'
,
20
);
hotPairConfigPageVO
.
size
=
Optional
.
opt
(
hotPairConfigPageVO
,
'size'
,
20
);
let
res
=
await
hotPairConfigService
.
list
(
hotPairConfigPageVO
.
pair
,
Number
(
hotPairConfigPageVO
.
page
),
Number
(
hotPairConfigPageVO
.
size
));
let
res
=
await
hotPairConfigService
.
list
(
hotPairConfigPageVO
.
pair
,
Number
(
hotPairConfigPageVO
.
type
),
Number
(
hotPairConfigPageVO
.
page
),
Number
(
hotPairConfigPageVO
.
size
));
return
Res3Utils
.
result
(
res
);
return
Res3Utils
.
result
(
res
);
}
}
catch
(
e
)
{
catch
(
e
)
{
...
...
src/functional/mvc/service/hotPairConfig.service.ts
View file @
0041884a
...
@@ -14,6 +14,8 @@ export interface HotPairConfigVO {
...
@@ -14,6 +14,8 @@ export interface HotPairConfigVO {
pair
?:
string
|
any
;
pair
?:
string
|
any
;
weight
?:
number
;
weight
?:
number
;
type
?:
number
;
createdAt
?:
Date
|
any
;
createdAt
?:
Date
|
any
;
...
@@ -28,11 +30,16 @@ export interface HotPairConfigPageVO extends HotPairConfigVO {
...
@@ -28,11 +30,16 @@ export interface HotPairConfigPageVO extends HotPairConfigVO {
size
?:
number
size
?:
number
}
}
export
async
function
list
(
pair
:
any
,
page
:
number
,
size
:
number
)
{
export
async
function
list
(
pair
:
any
,
type
:
number
,
page
:
number
,
size
:
number
)
{
let
where
=
Object
.
create
(
null
);
let
where
=
Object
.
create
(
null
);
if
(
pair
)
{
if
(
pair
)
{
where
.
pair
=
{
[
ormDB
.
Op
.
like
]:
`
${
pair
}
%`
};
where
.
pair
=
{
[
ormDB
.
Op
.
like
]:
`
${
pair
}
%`
};
}
}
if
(
type
==
1
)
{
where
.
type
=
1
;
}
else
{
where
.
type
=
0
;
}
let
resList
=
await
hotPairConfig
.
prototype
.
findAndCount
({
let
resList
=
await
hotPairConfig
.
prototype
.
findAndCount
({
where
:
where
,
where
:
where
,
...
...
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