Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
S
shouzhouServer
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
chenjinjing
shouzhouServer
Commits
c5320fbf
Commit
c5320fbf
authored
Jul 16, 2024
by
Leo Zheng
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
给guchengLoad和gateStatus增加了日期参数
parent
2c4e0209
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
2 deletions
+8
-2
gateStatusStrategy.ts
src/biz/strategies/left/gateStatusStrategy.ts
+4
-1
guchengLoadStrategy.ts
src/biz/strategies/left/guchengLoadStrategy.ts
+4
-1
No files found.
src/biz/strategies/left/gateStatusStrategy.ts
View file @
c5320fbf
...
...
@@ -26,7 +26,10 @@ export class gateStatusStrategy extends abstractDataStrategyLeft {
* 执行门状态策略,生成随机的门状态。
* @returns 门状态的对象表示。
*/
execute
():
any
{
execute
(
params
?:
any
):
any
{
if
(
!
params
||
!
params
.
query
||
!
params
.
query
.
date
)
{
throw
new
Error
(
"Date parameter is required."
)
}
this
.
gateStatusMap
.
forEach
((
value
,
key
,
map
)
=>
{
map
.
set
(
key
,
randomStatusGenerator
.
getRandomStatus
());
});
...
...
src/biz/strategies/left/guchengLoadStrategy.ts
View file @
c5320fbf
...
...
@@ -14,7 +14,10 @@ export class guchengLoadStrategy extends abstractDataStrategyLeft {
* 执行古城负载策略,生成随机的负载状态。
* @returns 随机的负载状态。
*/
execute
():
any
{
execute
(
params
?:
any
):
any
{
if
(
!
params
||
!
params
.
query
||
!
params
.
query
.
date
)
{
throw
new
Error
(
"Date parameter is required."
)
}
return
randomStatusGenerator
.
getRandomStatus
();
}
}
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