Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gk
Project
Project
Details
Activity
Releases
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
micro_app
gk
Commits
58b980e0
Commit
58b980e0
authored
Jul 25, 2022
by
chenlin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
接口增加计时组别类型
parent
c580c51a
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
27 additions
and
6 deletions
+27
-6
Road.java
src/main/java/com/dlbridge/jadp/plugins/cmpt/bean/Road.java
+11
-2
RoadMapper.xml
.../com/dlbridge/jadp/plugins/cmpt/dao/mapper/RoadMapper.xml
+13
-3
RoadService.java
...a/com/dlbridge/jadp/plugins/cmpt/service/RoadService.java
+3
-1
No files found.
src/main/java/com/dlbridge/jadp/plugins/cmpt/bean/Road.java
View file @
58b980e0
...
...
@@ -29,13 +29,22 @@ public class Road {
private
double
fileSize
;
private
int
times
;
@ApiModelProperty
(
value
=
"计时组别类型"
,
notes
=
"(1:个人,2:团队)"
)
private
int
roadType
;
@ApiModelProperty
(
value
=
"组别类型名"
,
notes
=
"组别类型名"
)
private
String
roadTypeName
;
private
String
createTime
;
@Override
public
boolean
equals
(
Object
o
)
{
if
(
this
==
o
)
return
true
;
if
(
o
==
null
||
getClass
()
!=
o
.
getClass
())
return
false
;
if
(
this
==
o
)
{
return
true
;
}
if
(
o
==
null
||
getClass
()
!=
o
.
getClass
())
{
return
false
;
}
Road
road
=
(
Road
)
o
;
return
roadId
.
equals
(
road
.
roadId
);
}
...
...
src/main/java/com/dlbridge/jadp/plugins/cmpt/dao/mapper/RoadMapper.xml
View file @
58b980e0
...
...
@@ -3,9 +3,19 @@
<mapper
namespace=
"com.dlbridge.jadp.plugins.cmpt.dao.mapper.RoadMapper"
>
<select
id=
"queryRoads"
resultType=
"com.dlbridge.jadp.plugins.cmpt.bean.Road"
>
select road_id roadId,cmpt_id cmptId,road_name name,file_name fileName,file_url fileUrl,times,file_size fileSize
from gk_road
where cmpt_id = #{cmptId} and is_delete = 0
select a.road_id roadId
, a.cmpt_id cmptId
, a.road_name name
, a.file_name fileName
, a.file_url fileUrl
, a.times
, a.file_size fileSize
, b.item_type roadType
, case when b.item_type = 2 then '团队赛' when b.item_type = 1 then '个人赛' else '其他' end roadTypeName
from gk_road a
LEFT JOIN geerunner.cmpt_item b ON a.cmpt_id = b.cmpt_id AND a.road_id = b.item_id
WHERE a.cmpt_id = #{cmptId}
AND a.is_delete = 0
</select>
<update
id=
"delete"
>
...
...
src/main/java/com/dlbridge/jadp/plugins/cmpt/service/RoadService.java
View file @
58b980e0
...
...
@@ -44,7 +44,9 @@ public class RoadService {
public
List
<
Road
>
queryRoads
(
Integer
cmptId
)
{
log
.
info
(
"RoadService enter"
);
List
<
Road
>
roads
=
remoteService
.
getRoads
(
cmptId
);
if
(
roads
==
null
)
return
null
;
if
(
roads
==
null
)
{
return
null
;
}
for
(
Road
road
:
roads
)
{
log
.
info
(
"RoadService api接口 getName:"
+
road
.
getName
()
+
" getRoadId:"
+
road
.
getRoadId
()
+
" getFileName:"
+
road
.
getFileName
()
+
" getFileUrl:"
+
road
.
getFileUrl
());
}
...
...
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