Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
S
sportsschoolserver
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
sportsschoolserver
Commits
808354bf
Commit
808354bf
authored
Nov 08, 2021
by
chenjinjing
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
no message
parent
1ac763f5
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
7 deletions
+12
-7
ydygl.ts
src/biz/ydygl.ts
+1
-1
ydyglData.ts
src/data/ydyglData.ts
+11
-6
No files found.
src/biz/ydygl.ts
View file @
808354bf
...
...
@@ -60,6 +60,6 @@ export async function getCompetition(req, res) {
let
data
=
await
get
积分赛淘汰赛数据
(
time
,
type
);
let
ret
:
any
=
{};
let
dataName
=
type
==
1
?
"淘汰赛"
:
"校内积分赛"
;
ret
[
"api1"
]
=
getListData
(
dataName
,
data
,
[
"排名"
,
"球员"
,
"场次"
,
"胜场"
,
"负场"
,
"积分"
],
{
"排名"
:
"rank"
,
"学员"
:
"trainee"
,
"场次"
:
"session"
,
"胜场"
:
"win"
,
"负场"
:
"lose"
,
"积分"
:
"points"
}
);
ret
[
"api1
1
"
]
=
getListData
(
dataName
,
data
,
[
"排名"
,
"球员"
,
"场次"
,
"胜场"
,
"负场"
,
"积分"
],
{
"排名"
:
"rank"
,
"学员"
:
"trainee"
,
"场次"
:
"session"
,
"胜场"
:
"win"
,
"负场"
:
"lose"
,
"积分"
:
"points"
}
);
res
.
send
(
ret
);
}
src/data/ydyglData.ts
View file @
808354bf
...
...
@@ -113,13 +113,18 @@ async function 月训练量趋势() {
}
// 比赛类型 他们给的文档字段有问题 需要核对
export
async
function
基本信息
()
{
//需要确认 student 表的pid和 recent_match表的 self_pid 有没有关联 此处默认有关联
//需要确认 a对战b 数据库会出现一条数据还是两条数据 此出默认两条数据
//需要确认 recent_match表中的状态字段是多余的
//需要确认 recent_match 表中的 日期单词拼错了
let
sql
=
"select * from "
;
export
async
function
基础数据
()
{
//需要确认 student 表的pid和 recent_match表的 self_pid 有没有关联 此处默认有关联 没有关联
//需要确认 a对战b 数据库会出现一条数据还是两条数据 此出默认两条数据 根据a显示数据 a有几场数据出现几条数据
//需要确认 recent_match表中的状态字段是多余的
//需要确认 recent_match 表中的 日期单词拼错了 改成了m_date
let
sql
=
`select * from(select m.m_id,m.self_name,m.self_score,m.self_pic,m.opponent_name,m.opponent_pic,m.opponent_score,m.m_date,row_number()
over(partition by m.self_name order by m.self_name asc) rn
from student s,recent_match m
where s.p_id=m.self_pid group by m.m_id,m.self_name,m.self_score,m.self_pic,m.opponent_name,m.opponent_pic,m.opponent_score,m.m_date
)t where rn <=5`
;
//todo 这里的sql需要优化
...
...
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